twenty-sdk 2.31.0 → 2.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/billing/index.cjs +1 -1
- package/dist/billing/index.cjs.map +1 -1
- package/dist/billing/index.mjs +2 -2
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{catalog-sync-Ch6nB5uf.mjs → catalog-sync-C0Td21sN.mjs} +1 -1
- package/dist/{catalog-sync-yH3B_al1.js → catalog-sync-Cn-gDxAz.js} +1 -1
- package/dist/cli/utilities/build/manifest/manifest-extract-config.d.ts +4 -2
- package/dist/cli/utilities/build/manifest/utils/manifest-validation-helpers.d.ts +10 -0
- package/dist/cli/utilities/build/manifest/utils/validate-timeline-activity-types.d.ts +2 -0
- package/dist/cli/utilities/dev/orchestrator/dev-mode-orchestrator.d.ts +2 -0
- package/dist/cli/utilities/entity/entity-timeline-activity-type-template.d.ts +3 -0
- package/dist/cli/utilities/translations/collect-translatable-strings.d.ts +2 -1
- package/dist/cli/utilities/translations/compile-application-translations.d.ts +1 -1
- package/dist/cli/utilities/translations/compile-catalog-to-message-ids.d.ts +8 -0
- package/dist/cli/utilities/translations/locale-catalog-format.d.ts +7 -0
- package/dist/cli.cjs +48 -41
- package/dist/cli.mjs +3160 -3136
- package/dist/define/index.cjs +14 -14
- package/dist/define/index.cjs.map +1 -1
- package/dist/define/index.d.ts +65 -5
- package/dist/define/index.mjs +2769 -2734
- package/dist/define/index.mjs.map +1 -1
- package/dist/front-component/index.cjs +22 -3
- package/dist/front-component/index.cjs.map +1 -1
- package/dist/front-component/index.d.ts +53 -5
- package/dist/front-component/index.mjs +2026 -655
- package/dist/front-component/index.mjs.map +1 -1
- package/dist/front-component-renderer/build.cjs +1 -1
- package/dist/front-component-renderer/build.mjs +1 -1
- package/dist/{get-front-component-build-plugins-DA62IZes.mjs → get-front-component-build-plugins-BZ1HBS5Y.mjs} +70 -68
- package/dist/{get-front-component-build-plugins-C-Webbfn.js → get-front-component-build-plugins-CcV3Cown.js} +8 -8
- package/dist/{get-function-input-schema-GNk3NRLJ-C5HXalke.mjs → get-function-input-schema-GNk3NRLJ-BimwLfRN.mjs} +1 -1
- package/dist/{get-function-input-schema-GNk3NRLJ-DwfXUGPz.js → get-function-input-schema-GNk3NRLJ-Byssjp8I.js} +1 -1
- package/dist/logic-function/index.cjs +9 -9
- package/dist/logic-function/index.cjs.map +1 -1
- package/dist/logic-function/index.d.ts +67 -4
- package/dist/logic-function/index.mjs +595 -551
- package/dist/logic-function/index.mjs.map +1 -1
- package/dist/{login-BzHQgxeV.js → login-Cl-mw1L0.js} +68 -49
- package/dist/{login-BHgUJK94.mjs → login-CuJiHYwZ.mjs} +5963 -4476
- package/dist/operations.cjs +1 -1
- package/dist/operations.mjs +3 -3
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.mjs +2 -2
- package/dist/utils/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/cli/utilities/client/twenty-client-template.d.ts +0 -42
- package/dist/cli/utilities/translations/generate-message-id.d.ts +0 -1
|
@@ -62,6 +62,15 @@ type EnqueueJobResult = {
|
|
|
62
62
|
enqueued: boolean;
|
|
63
63
|
logicFunctionUniversalIdentifier: string;
|
|
64
64
|
};
|
|
65
|
+
type EnqueueJobsInput = EnqueueJobOptions & {
|
|
66
|
+
logicFunctionUniversalIdentifier: string;
|
|
67
|
+
payloads: Record<string, unknown>[];
|
|
68
|
+
};
|
|
69
|
+
type EnqueueJobsResult = {
|
|
70
|
+
enqueued: boolean;
|
|
71
|
+
logicFunctionUniversalIdentifier: string;
|
|
72
|
+
enqueuedJobsCount: number;
|
|
73
|
+
};
|
|
65
74
|
|
|
66
75
|
declare enum HTTPMethod {
|
|
67
76
|
GET = "GET",
|
|
@@ -96,6 +105,7 @@ type LogicFunctionHttpResponse = {
|
|
|
96
105
|
|
|
97
106
|
type ServerRouteTriggerSettings = {
|
|
98
107
|
forwardedRequestHeaders?: string[];
|
|
108
|
+
httpMethods?: (HTTPMethod | `${HTTPMethod}`)[];
|
|
99
109
|
};
|
|
100
110
|
|
|
101
111
|
type InputJsonSchema = {
|
|
@@ -122,6 +132,18 @@ type NodeType = 'object' | 'unknown';
|
|
|
122
132
|
|
|
123
133
|
declare const jsonSchemaToInputSchema: (jsonSchema: InputJsonSchema) => InputSchema;
|
|
124
134
|
|
|
135
|
+
type LogicFunctionExecutionContext = {
|
|
136
|
+
retryCount: number;
|
|
137
|
+
maxRetries: number;
|
|
138
|
+
workspaceId: string;
|
|
139
|
+
userWorkspaceId: string | null;
|
|
140
|
+
workspaceMemberId: string | null;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
declare class RetryableLogicFunctionError extends Error {
|
|
144
|
+
constructor(message: string);
|
|
145
|
+
}
|
|
146
|
+
|
|
125
147
|
type RecordSchemaType = 'record' | 'records';
|
|
126
148
|
type InputSchemaPropertyType = LeafType | NodeType | RecordSchemaType | FieldMetadataType;
|
|
127
149
|
type InputSchemaProperty = {
|
|
@@ -174,6 +196,20 @@ type HttpRouteTriggerSettings = {
|
|
|
174
196
|
forwardedRequestHeaders?: string[];
|
|
175
197
|
};
|
|
176
198
|
|
|
199
|
+
declare const TIMELINE_ACTIVITY_ACTIONS: readonly ["created", "updated", "deleted", "restored", "linked", "unlinked"];
|
|
200
|
+
type TimelineActivityAction = (typeof TIMELINE_ACTIVITY_ACTIONS)[number];
|
|
201
|
+
|
|
202
|
+
type TimelineActivityTypeSnapshot = {
|
|
203
|
+
id: string;
|
|
204
|
+
universalIdentifier: string;
|
|
205
|
+
name: string;
|
|
206
|
+
label: string;
|
|
207
|
+
action: TimelineActivityAction | null;
|
|
208
|
+
icon: string | null;
|
|
209
|
+
objectUniversalIdentifier: string | null;
|
|
210
|
+
frontComponentUniversalIdentifier: string | null;
|
|
211
|
+
};
|
|
212
|
+
|
|
177
213
|
type RunAgentMessageRole = 'user' | 'assistant';
|
|
178
214
|
type RunAgentMessage = {
|
|
179
215
|
role: RunAgentMessageRole;
|
|
@@ -201,9 +237,9 @@ type ServerRouteDispatchResult = {
|
|
|
201
237
|
payload?: object;
|
|
202
238
|
};
|
|
203
239
|
|
|
204
|
-
type LogicFunctionHandler = (
|
|
240
|
+
type LogicFunctionHandler<TPayload = any> = (payload: TPayload, context: LogicFunctionExecutionContext) => any | Promise<any>;
|
|
205
241
|
type ServerRouteResolverResult = ServerRouteDispatchResult | LogicFunctionHttpResponse;
|
|
206
|
-
type ServerRouteResolverHandler = (
|
|
242
|
+
type ServerRouteResolverHandler<TPayload = any> = (payload: TPayload, context: LogicFunctionExecutionContext) => ServerRouteResolverResult | Promise<ServerRouteResolverResult>;
|
|
207
243
|
type LogicFunctionConfigBase = Omit<LogicFunctionManifest, 'sourceHandlerPath' | 'builtHandlerPath' | 'builtHandlerChecksum' | 'handlerName' | 'serverRouteTriggerSettings'>;
|
|
208
244
|
type LogicFunctionConfig = LogicFunctionConfigBase & ({
|
|
209
245
|
serverRouteTriggerSettings?: undefined;
|
|
@@ -361,8 +397,35 @@ declare class AppConnectionAuthFailedError extends Error {
|
|
|
361
397
|
|
|
362
398
|
declare const runAgent: (input: RunAgentInput) => Promise<RunAgentResult>;
|
|
363
399
|
|
|
400
|
+
/**
|
|
401
|
+
* @deprecated Use `enqueueJobs` instead.
|
|
402
|
+
*/
|
|
364
403
|
declare const enqueueJob: (input: EnqueueJobInput) => Promise<EnqueueJobResult>;
|
|
365
404
|
|
|
405
|
+
declare const enqueueJobs: (input: EnqueueJobsInput) => Promise<EnqueueJobsResult>;
|
|
406
|
+
|
|
407
|
+
type CreateTimelineActivityBaseInput = {
|
|
408
|
+
timelineActivityTypeUniversalIdentifier: string;
|
|
409
|
+
targetObjectUniversalIdentifier: string;
|
|
410
|
+
targetRecordId: string;
|
|
411
|
+
happensAt?: string;
|
|
412
|
+
properties?: Record<string, unknown>;
|
|
413
|
+
};
|
|
414
|
+
type CreateTimelineActivityLinkedRecordInput = {
|
|
415
|
+
linkedRecordId: string;
|
|
416
|
+
linkedObjectMetadataUniversalIdentifier: string;
|
|
417
|
+
} | {
|
|
418
|
+
linkedRecordId?: never;
|
|
419
|
+
linkedObjectMetadataUniversalIdentifier?: never;
|
|
420
|
+
};
|
|
421
|
+
type CreateTimelineActivityInput = CreateTimelineActivityBaseInput & CreateTimelineActivityLinkedRecordInput;
|
|
422
|
+
type CreatedTimelineActivity = {
|
|
423
|
+
id: string;
|
|
424
|
+
timelineActivityTypeId: string;
|
|
425
|
+
timelineActivityTypeSnapshot: TimelineActivityTypeSnapshot;
|
|
426
|
+
};
|
|
427
|
+
declare const createTimelineActivity: ({ timelineActivityTypeUniversalIdentifier, targetObjectUniversalIdentifier, linkedObjectMetadataUniversalIdentifier, targetRecordId, ...input }: CreateTimelineActivityInput) => Promise<CreatedTimelineActivity>;
|
|
428
|
+
|
|
366
429
|
type KvOptions = {
|
|
367
430
|
scope?: AppKeyValueScope;
|
|
368
431
|
};
|
|
@@ -384,5 +447,5 @@ declare class Response implements LogicFunctionHttpResponse {
|
|
|
384
447
|
constructor(body: unknown, init?: ResponseInit);
|
|
385
448
|
}
|
|
386
449
|
|
|
387
|
-
export { AppConnectionAuthFailedError, ObjectRecordBaseEvent, ObjectRecordCreateEvent, ObjectRecordDeleteEvent, ObjectRecordDestroyEvent, ObjectRecordRestoreEvent, ObjectRecordUpdateEvent, ObjectRecordUpsertEvent, Response, enqueueJob, findConnectionForRequest, getConnection, jsonSchemaToInputSchema, kv, listConnections, runAgent };
|
|
388
|
-
export type { AppConnection, AppKeyValue, AppKeyValueScope, CronPayload, DatabaseEventPayload, EnqueueJobInput, EnqueueJobOptions, EnqueueJobResult, InputJsonSchema, InstallHandler, InstallPayload, ListConnectionsFilter, LogicFunctionConfig, LogicFunctionHandler, ObjectRecordEvent, ResponseInit, LogicFunctionEvent as RoutePayload, RunAgentInput, RunAgentResult, ServerRouteDispatchResult, ServerRouteResolverResult, UninstallHandler, UninstallPayload };
|
|
450
|
+
export { AppConnectionAuthFailedError, ObjectRecordBaseEvent, ObjectRecordCreateEvent, ObjectRecordDeleteEvent, ObjectRecordDestroyEvent, ObjectRecordRestoreEvent, ObjectRecordUpdateEvent, ObjectRecordUpsertEvent, Response, RetryableLogicFunctionError, createTimelineActivity, enqueueJob, enqueueJobs, findConnectionForRequest, getConnection, jsonSchemaToInputSchema, kv, listConnections, runAgent };
|
|
451
|
+
export type { AppConnection, AppKeyValue, AppKeyValueScope, CreateTimelineActivityInput, CreatedTimelineActivity, CronPayload, DatabaseEventPayload, EnqueueJobInput, EnqueueJobOptions, EnqueueJobResult, EnqueueJobsInput, EnqueueJobsResult, InputJsonSchema, InstallHandler, InstallPayload, ListConnectionsFilter, LogicFunctionConfig, LogicFunctionExecutionContext, LogicFunctionHandler, ObjectRecordEvent, ResponseInit, LogicFunctionEvent as RoutePayload, RunAgentInput, RunAgentResult, ServerRouteDispatchResult, ServerRouteResolverResult, UninstallHandler, UninstallPayload };
|