Files
twenty/packages/twenty-server/src/engine/metadata-modules/logic-function/dtos/logic-function-execution-result.dto.ts
T
Charles Bochet da6f1bbef3 Rename serverlessFunction to logicFunction (#17494)
## Summary

Rename "Serverless Function" to "Logic Function" across the codebase for
clearer naming.

### Environment Variable Changes

| Old | New |
|-----|-----|
| `SERVERLESS_TYPE` | `LOGIC_FUNCTION_TYPE` |
| `SERVERLESS_LAMBDA_REGION` | `LOGIC_FUNCTION_LAMBDA_REGION` |
| `SERVERLESS_LAMBDA_ROLE` | `LOGIC_FUNCTION_LAMBDA_ROLE` |
| `SERVERLESS_LAMBDA_SUBHOSTING_URL` |
`LOGIC_FUNCTION_LAMBDA_SUBHOSTING_URL` |
| `SERVERLESS_LAMBDA_ACCESS_KEY_ID` |
`LOGIC_FUNCTION_LAMBDA_ACCESS_KEY_ID` |
| `SERVERLESS_LAMBDA_SECRET_ACCESS_KEY` |
`LOGIC_FUNCTION_LAMBDA_SECRET_ACCESS_KEY` |

### Breaking Changes

- Environment variables must be updated in production deployments
- Database migration renames `serverlessFunction` → `logicFunction`
tables
2026-01-28 01:42:19 +01:00

49 lines
1.1 KiB
TypeScript

import { Field, ObjectType, registerEnumType } from '@nestjs/graphql';
import { IsObject, IsOptional } from 'class-validator';
import graphqlTypeJson from 'graphql-type-json';
export enum LogicFunctionExecutionStatus {
IDLE = 'IDLE',
SUCCESS = 'SUCCESS',
ERROR = 'ERROR',
}
registerEnumType(LogicFunctionExecutionStatus, {
name: 'LogicFunctionExecutionStatus',
description: 'Status of the logic function execution',
});
@ObjectType('LogicFunctionExecutionResult')
export class LogicFunctionExecutionResultDTO {
@IsObject()
@Field(() => graphqlTypeJson, {
description: 'Execution result in JSON format',
nullable: true,
})
data?: JSON;
@Field({ description: 'Execution Logs' })
logs: string;
@Field({ description: 'Execution duration in milliseconds' })
duration: number;
@Field(() => LogicFunctionExecutionStatus, {
description: 'Execution status',
})
status: LogicFunctionExecutionStatus;
@IsObject()
@IsOptional()
@Field(() => graphqlTypeJson, {
description: 'Execution error in JSON format',
nullable: true,
})
error?: {
errorType: string;
errorMessage: string;
stackTrace: string;
};
}