twenty-sdk 2.33.0 → 2.35.1

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/billing/index.cjs.map +1 -1
  3. package/dist/billing/index.mjs.map +1 -1
  4. package/dist/{catalog-sync-DoEI8JO8.js → catalog-sync-Bs-X2ChV.js} +1 -1
  5. package/dist/{catalog-sync-DUp5hpKi.mjs → catalog-sync-C82Xfr2f.mjs} +1 -1
  6. package/dist/cli/utilities/build/manifest/manifest-extract-config.d.ts +4 -2
  7. package/dist/cli/utilities/build/manifest/utils/manifest-validation-helpers.d.ts +10 -0
  8. package/dist/cli/utilities/build/manifest/utils/validate-timeline-activity-types.d.ts +2 -0
  9. package/dist/cli/utilities/entity/entity-timeline-activity-type-template.d.ts +3 -0
  10. package/dist/cli.cjs +27 -20
  11. package/dist/cli.mjs +302 -285
  12. package/dist/define/index.cjs +2 -2
  13. package/dist/define/index.cjs.map +1 -1
  14. package/dist/define/index.d.ts +30 -9
  15. package/dist/define/index.mjs +152 -130
  16. package/dist/define/index.mjs.map +1 -1
  17. package/dist/front-component/index.cjs +1 -1
  18. package/dist/front-component/index.cjs.map +1 -1
  19. package/dist/front-component/index.d.ts +7 -1
  20. package/dist/front-component/index.mjs +7 -7
  21. package/dist/front-component/index.mjs.map +1 -1
  22. package/dist/front-component-renderer/build.cjs +1 -1
  23. package/dist/front-component-renderer/build.mjs +1 -1
  24. package/dist/{get-front-component-build-plugins-DsfkhD6M.js → get-front-component-build-plugins-CcV3Cown.js} +1 -1
  25. package/dist/{get-front-component-build-plugins-Cn-MWltl.mjs → get-front-component-build-plugins-D9VJQHw7.mjs} +2 -2
  26. package/dist/{get-function-input-schema-GNk3NRLJ-B8zXGirB.js → get-function-input-schema-GNk3NRLJ-Byssjp8I.js} +1 -1
  27. package/dist/{get-function-input-schema-GNk3NRLJ-CwF3VRY5.mjs → get-function-input-schema-GNk3NRLJ-Dm0Ljlg4.mjs} +1 -1
  28. package/dist/logic-function/index.cjs +9 -9
  29. package/dist/logic-function/index.cjs.map +1 -1
  30. package/dist/logic-function/index.d.ts +52 -2
  31. package/dist/logic-function/index.mjs +622 -582
  32. package/dist/logic-function/index.mjs.map +1 -1
  33. package/dist/{login-153niBFr.mjs → login-BsiMC4oB.mjs} +954 -891
  34. package/dist/{login-Cl5xmujh.js → login-cG7hCrTK.js} +44 -44
  35. package/dist/operations.cjs +1 -1
  36. package/dist/operations.mjs +1 -1
  37. package/dist/utils/index.cjs.map +1 -1
  38. package/dist/utils/index.mjs.map +1 -1
  39. package/package.json +2 -2
@@ -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",
@@ -187,6 +196,20 @@ type HttpRouteTriggerSettings = {
187
196
  forwardedRequestHeaders?: string[];
188
197
  };
189
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
+
190
213
  type RunAgentMessageRole = 'user' | 'assistant';
191
214
  type RunAgentMessage = {
192
215
  role: RunAgentMessageRole;
@@ -374,8 +397,35 @@ declare class AppConnectionAuthFailedError extends Error {
374
397
 
375
398
  declare const runAgent: (input: RunAgentInput) => Promise<RunAgentResult>;
376
399
 
400
+ /**
401
+ * @deprecated Use `enqueueJobs` instead.
402
+ */
377
403
  declare const enqueueJob: (input: EnqueueJobInput) => Promise<EnqueueJobResult>;
378
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
+
379
429
  type KvOptions = {
380
430
  scope?: AppKeyValueScope;
381
431
  };
@@ -397,5 +447,5 @@ declare class Response implements LogicFunctionHttpResponse {
397
447
  constructor(body: unknown, init?: ResponseInit);
398
448
  }
399
449
 
400
- export { AppConnectionAuthFailedError, ObjectRecordBaseEvent, ObjectRecordCreateEvent, ObjectRecordDeleteEvent, ObjectRecordDestroyEvent, ObjectRecordRestoreEvent, ObjectRecordUpdateEvent, ObjectRecordUpsertEvent, Response, RetryableLogicFunctionError, enqueueJob, findConnectionForRequest, getConnection, jsonSchemaToInputSchema, kv, listConnections, runAgent };
401
- export type { AppConnection, AppKeyValue, AppKeyValueScope, CronPayload, DatabaseEventPayload, EnqueueJobInput, EnqueueJobOptions, EnqueueJobResult, InputJsonSchema, InstallHandler, InstallPayload, ListConnectionsFilter, LogicFunctionConfig, LogicFunctionExecutionContext, 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 };