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
This commit is contained in:
@@ -2,7 +2,7 @@ import {
|
||||
type PackageJson,
|
||||
type Application,
|
||||
type ObjectManifest,
|
||||
type ServerlessFunctionManifest,
|
||||
type LogicFunctionManifest,
|
||||
} from '@/application';
|
||||
import { type FrontComponentManifest } from '@/application/frontComponentManifestType';
|
||||
import { type ObjectExtensionManifest } from '@/application/objectExtensionManifestType';
|
||||
@@ -13,7 +13,7 @@ export type ApplicationManifest = {
|
||||
application: Application;
|
||||
objects: ObjectManifest[];
|
||||
objectExtensions?: ObjectExtensionManifest[];
|
||||
functions: ServerlessFunctionManifest[];
|
||||
functions: LogicFunctionManifest[];
|
||||
frontComponents: FrontComponentManifest[];
|
||||
roles?: RoleManifest[];
|
||||
sources: Sources;
|
||||
|
||||
@@ -15,17 +15,17 @@ export { DEFAULT_API_URL_NAME } from './constants/DefaultApiUrlName';
|
||||
export { SyncableEntity } from './enums/syncable-entities.enum';
|
||||
export type { FieldManifest } from './fieldManifestType';
|
||||
export type { FrontComponentManifest } from './frontComponentManifestType';
|
||||
export type {
|
||||
InputJsonSchema,
|
||||
LogicFunctionManifest,
|
||||
DatabaseEventTrigger,
|
||||
CronTrigger,
|
||||
RouteTrigger,
|
||||
LogicFunctionTriggerManifest,
|
||||
} from './logicFunctionManifestType';
|
||||
export type { ObjectExtensionManifest } from './objectExtensionManifestType';
|
||||
export type { ObjectManifest } from './objectManifestType';
|
||||
export type { PackageJson } from './packageJsonType';
|
||||
export type { RelationFieldManifest } from './relationFieldManifestType';
|
||||
export type { RoleManifest } from './roleManifestType';
|
||||
export type {
|
||||
InputJsonSchema,
|
||||
ServerlessFunctionManifest,
|
||||
DatabaseEventTrigger,
|
||||
CronTrigger,
|
||||
RouteTrigger,
|
||||
ServerlessFunctionTriggerManifest,
|
||||
} from './serverlessFunctionManifestType';
|
||||
export type { SyncableEntityOptions } from './syncableEntityOptionsType';
|
||||
|
||||
+3
-3
@@ -19,11 +19,11 @@ export type InputJsonSchema = {
|
||||
additionalProperties?: boolean | InputJsonSchema;
|
||||
};
|
||||
|
||||
export type ServerlessFunctionManifest = SyncableEntityOptions & {
|
||||
export type LogicFunctionManifest = SyncableEntityOptions & {
|
||||
name?: string;
|
||||
description?: string;
|
||||
timeoutSeconds?: number;
|
||||
triggers: ServerlessFunctionTriggerManifest[];
|
||||
triggers: LogicFunctionTriggerManifest[];
|
||||
sourceHandlerPath: string;
|
||||
builtHandlerPath: string;
|
||||
builtHandlerChecksum: string | null;
|
||||
@@ -51,5 +51,5 @@ export type RouteTrigger = {
|
||||
forwardedRequestHeaders?: string[];
|
||||
};
|
||||
|
||||
export type ServerlessFunctionTriggerManifest = SyncableEntityOptions &
|
||||
export type LogicFunctionTriggerManifest = SyncableEntityOptions &
|
||||
(CronTrigger | DatabaseEventTrigger | RouteTrigger);
|
||||
@@ -8,10 +8,7 @@ export const ALL_METADATA_NAME = {
|
||||
rowLevelPermissionPredicateGroup: 'rowLevelPermissionPredicateGroup',
|
||||
viewFilterGroup: 'viewFilterGroup',
|
||||
index: 'index',
|
||||
serverlessFunction: 'serverlessFunction',
|
||||
cronTrigger: 'cronTrigger',
|
||||
databaseEventTrigger: 'databaseEventTrigger',
|
||||
routeTrigger: 'routeTrigger',
|
||||
logicFunction: 'logicFunction',
|
||||
viewFilter: 'viewFilter',
|
||||
role: 'role',
|
||||
roleTarget: 'roleTarget',
|
||||
|
||||
@@ -3,8 +3,8 @@ export enum FileFolder {
|
||||
WorkspaceLogo = 'workspace-logo',
|
||||
Attachment = 'attachment',
|
||||
PersonPicture = 'person-picture',
|
||||
ServerlessFunction = 'serverless-function',
|
||||
ServerlessFunctionToDelete = 'serverless-function-to-delete',
|
||||
LogicFunction = 'logic-function',
|
||||
LogicFunctionToDelete = 'logic-function-to-delete',
|
||||
File = 'file',
|
||||
AgentChat = 'agent-chat',
|
||||
BuiltFunction = 'built-function',
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* AWS HTTP API v2 compatible request format for serverless functions
|
||||
* AWS HTTP API v2 compatible request format for logic functions
|
||||
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
|
||||
*
|
||||
* @typeParam TBody - The type of the request body. Defaults to `object` for parsed JSON bodies.
|
||||
*/
|
||||
export type ServerlessFunctionEvent<TBody = object> = {
|
||||
export type LogicFunctionEvent<TBody = object> = {
|
||||
/** HTTP headers (filtered by forwardedRequestHeaders in route trigger) */
|
||||
headers: Record<string, string | undefined>;
|
||||
|
||||
@@ -35,10 +35,10 @@ export enum SettingsPath {
|
||||
AISkillDetail = 'ai/skills/:skillId',
|
||||
Applications = 'applications',
|
||||
ApplicationDetail = 'applications/:applicationId',
|
||||
ApplicationServerlessFunctionDetail = 'applications/:applicationId/serverlessFunctions/:serverlessFunctionId',
|
||||
ServerlessFunctions = 'functions',
|
||||
NewServerlessFunction = 'functions/new',
|
||||
ServerlessFunctionDetail = 'functions/:serverlessFunctionId',
|
||||
ApplicationLogicFunctionDetail = 'applications/:applicationId/logicFunctions/:logicFunctionId',
|
||||
LogicFunctions = 'functions',
|
||||
NewLogicFunction = 'functions/new',
|
||||
LogicFunctionDetail = 'functions/:logicFunctionId',
|
||||
ApiWebhooks = 'api-webhooks',
|
||||
RestPlayground = 'playground/rest/:schema',
|
||||
GraphQLPlayground = 'playground/graphql/:schema',
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Equal, Expect } from '@/testing';
|
||||
import { type Equal, type Expect } from '@/testing';
|
||||
import { type ExtractSerializedRelationProperties } from '@/types/ExtractSerializedRelationProperties.type';
|
||||
import { type SerializedRelation } from '@/types/SerializedRelation.type';
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ export type { FromTo } from './FromToType';
|
||||
export { HTTPMethod } from './HttpMethod';
|
||||
export type { IsEmptyRecord } from './IsEmptyRecord.type';
|
||||
export type { IsExactly } from './IsExactly';
|
||||
export type { LogicFunctionEvent } from './LogicFunctionEvent';
|
||||
export { MessageParticipantRole } from './MessageParticipantRole';
|
||||
export type { ModifiedProperties } from './ModifiedProperties';
|
||||
export type { NonNullableRequired } from './NonNullableRequired';
|
||||
@@ -187,7 +188,6 @@ export type {
|
||||
} from './RowLevelPermissionPredicateValue';
|
||||
export type { SerializedRelation } from './SerializedRelation.type';
|
||||
export { SERIALIZED_RELATION_BRAND } from './SerializedRelation.type';
|
||||
export type { ServerlessFunctionEvent } from './ServerlessFunctionEvent';
|
||||
export { SettingsPath } from './SettingsPath';
|
||||
export type { Sources } from './SourcesType';
|
||||
export type {
|
||||
|
||||
@@ -23,8 +23,8 @@ describe('getSettingsPath', () => {
|
||||
).toBe('/settings/objects/companies/name');
|
||||
|
||||
expect(
|
||||
getSettingsPath(SettingsPath.ServerlessFunctionDetail, {
|
||||
serverlessFunctionId: 'func123',
|
||||
getSettingsPath(SettingsPath.LogicFunctionDetail, {
|
||||
logicFunctionId: 'func123',
|
||||
}),
|
||||
).toBe('/settings/functions/func123');
|
||||
|
||||
@@ -88,8 +88,8 @@ describe('getSettingsPath', () => {
|
||||
|
||||
expect(
|
||||
getSettingsPath(
|
||||
SettingsPath.ServerlessFunctionDetail,
|
||||
{ serverlessFunctionId: 'func123' },
|
||||
SettingsPath.LogicFunctionDetail,
|
||||
{ logicFunctionId: 'func123' },
|
||||
{ mode: 'edit' },
|
||||
'code',
|
||||
),
|
||||
|
||||
@@ -4,8 +4,8 @@ import { baseWorkflowActionSettingsSchema } from './base-workflow-action-setting
|
||||
export const workflowCodeActionSettingsSchema =
|
||||
baseWorkflowActionSettingsSchema.extend({
|
||||
input: z.object({
|
||||
serverlessFunctionId: z.string(),
|
||||
serverlessFunctionVersion: z.string(),
|
||||
serverlessFunctionInput: z.record(z.string(), z.any()),
|
||||
logicFunctionId: z.string(),
|
||||
logicFunctionVersion: z.string(),
|
||||
logicFunctionInput: z.record(z.string(), z.any()),
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user