twenty-sdk 2.31.0 → 2.33.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.
Files changed (45) hide show
  1. package/dist/billing/index.cjs +1 -1
  2. package/dist/billing/index.cjs.map +1 -1
  3. package/dist/billing/index.mjs +2 -2
  4. package/dist/billing/index.mjs.map +1 -1
  5. package/dist/{catalog-sync-Ch6nB5uf.mjs → catalog-sync-DUp5hpKi.mjs} +1 -1
  6. package/dist/{catalog-sync-yH3B_al1.js → catalog-sync-DoEI8JO8.js} +1 -1
  7. package/dist/cli/utilities/dev/orchestrator/dev-mode-orchestrator.d.ts +2 -0
  8. package/dist/cli/utilities/translations/collect-translatable-strings.d.ts +2 -1
  9. package/dist/cli/utilities/translations/compile-application-translations.d.ts +1 -1
  10. package/dist/cli/utilities/translations/compile-catalog-to-message-ids.d.ts +8 -0
  11. package/dist/cli/utilities/translations/locale-catalog-format.d.ts +7 -0
  12. package/dist/cli.cjs +37 -37
  13. package/dist/cli.mjs +3139 -3132
  14. package/dist/define/index.cjs +14 -14
  15. package/dist/define/index.cjs.map +1 -1
  16. package/dist/define/index.d.ts +35 -4
  17. package/dist/define/index.mjs +2745 -2733
  18. package/dist/define/index.mjs.map +1 -1
  19. package/dist/front-component/index.cjs +22 -3
  20. package/dist/front-component/index.cjs.map +1 -1
  21. package/dist/front-component/index.d.ts +48 -5
  22. package/dist/front-component/index.mjs +2026 -655
  23. package/dist/front-component/index.mjs.map +1 -1
  24. package/dist/front-component-renderer/build.cjs +1 -1
  25. package/dist/front-component-renderer/build.mjs +1 -1
  26. package/dist/{get-front-component-build-plugins-DA62IZes.mjs → get-front-component-build-plugins-Cn-MWltl.mjs} +69 -67
  27. package/dist/{get-front-component-build-plugins-C-Webbfn.js → get-front-component-build-plugins-DsfkhD6M.js} +8 -8
  28. package/dist/{get-function-input-schema-GNk3NRLJ-DwfXUGPz.js → get-function-input-schema-GNk3NRLJ-B8zXGirB.js} +1 -1
  29. package/dist/{get-function-input-schema-GNk3NRLJ-C5HXalke.mjs → get-function-input-schema-GNk3NRLJ-CwF3VRY5.mjs} +1 -1
  30. package/dist/logic-function/index.cjs +9 -9
  31. package/dist/logic-function/index.cjs.map +1 -1
  32. package/dist/logic-function/index.d.ts +17 -4
  33. package/dist/logic-function/index.mjs +439 -435
  34. package/dist/logic-function/index.mjs.map +1 -1
  35. package/dist/{login-BHgUJK94.mjs → login-153niBFr.mjs} +5897 -4474
  36. package/dist/{login-BzHQgxeV.js → login-Cl5xmujh.js} +66 -47
  37. package/dist/operations.cjs +1 -1
  38. package/dist/operations.mjs +3 -3
  39. package/dist/utils/index.cjs +1 -1
  40. package/dist/utils/index.cjs.map +1 -1
  41. package/dist/utils/index.mjs +2 -2
  42. package/dist/utils/index.mjs.map +1 -1
  43. package/package.json +2 -2
  44. package/dist/cli/utilities/client/twenty-client-template.d.ts +0 -42
  45. package/dist/cli/utilities/translations/generate-message-id.d.ts +0 -1
@@ -1,8 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { PathParam, NavigateOptions as NavigateOptions$1 } from 'react-router-dom';
3
3
 
4
- type TranslationValues = Record<string, string | number>;
5
-
6
4
  type MessageDescriptor = {
7
5
  message: string;
8
6
  context?: string;
@@ -43,6 +41,8 @@ declare const APP_LOCALES: {
43
41
  };
44
42
  type AppLocale = keyof typeof APP_LOCALES;
45
43
 
44
+ type TranslationValues = Record<string, string | number>;
45
+
46
46
  type TransProps = {
47
47
  children?: ReactNode;
48
48
  message?: string;
@@ -67,11 +67,13 @@ declare enum AppPath {
67
67
  BookCall = "/book-call",
68
68
  AiChat = "/chat/:threadId?",
69
69
  Index = "/",
70
+ Home = "/home",
70
71
  TasksPage = "/objects/tasks",
71
72
  OpportunitiesPage = "/objects/opportunities",
72
73
  RecordIndexPage = "/objects/:objectNamePlural",
73
74
  RecordShowPage = "/object/:objectNameSingular/:objectRecordId",
74
75
  PageLayoutPage = "/page/:pageLayoutId",
76
+ WorkflowCoreIndexPage = "/workflow-core",
75
77
  Settings = "settings",
76
78
  SettingsCatchAll = "/settings/*",
77
79
  Developers = "developers",
@@ -126,11 +128,14 @@ declare enum SidePanelPages {
126
128
  PageLayoutRecordPageWidgetTypeSelect = "page-layout-record-page-widget-type-select",
127
129
  ComposeEmail = "compose-email",
128
130
  SendCampaignTest = "send-campaign-test",
129
- EmailBlockSettings = "email-block-settings"
131
+ EmailBlockSettings = "email-block-settings",
132
+ SettingsMetadataTranslations = "settings-metadata-translations"
130
133
  }
131
134
 
132
135
  declare const getAppPath: <T extends AppPath>(to: T, params?: { [key in PathParam<T>]: string | null; } | undefined, queryParams?: Record<string, any> | undefined) => string;
133
136
 
137
+ type FrontComponentStorageType = 'localStorage' | 'sessionStorage';
138
+
134
139
  type NavigateFunction = <T extends AppPath>(to: T, params?: Parameters<typeof getAppPath<T>>[1], queryParams?: Record<string, any>, options?: NavigateOptions) => Promise<void>;
135
140
  type OpenSidePanelPageParams = {
136
141
  page: SidePanelPages.ViewRecord;
@@ -191,7 +196,39 @@ type CloseSidePanelFunction = () => Promise<void>;
191
196
  type UpdateProgressFunction = (progress: number) => Promise<void>;
192
197
  type RequestAccessTokenRefreshFunction = () => Promise<string>;
193
198
  type CopyToClipboardFunction = (text: string) => Promise<void>;
199
+ type UploadedFrontComponentFile = {
200
+ fileId: string;
201
+ path: string;
202
+ url: string;
203
+ size: number;
204
+ mimeType: string;
205
+ };
206
+ type UploadFileParams = {
207
+ fieldMetadataId: string;
208
+ fileName?: string;
209
+ };
210
+ type UploadFileFailureReason = 'invalid-params' | 'upload-failed';
211
+ type UploadFileResult = {
212
+ status: 'uploaded';
213
+ file: UploadedFrontComponentFile;
214
+ } | {
215
+ status: 'failed';
216
+ reason: UploadFileFailureReason;
217
+ };
218
+ type UploadFileFunction = (file: Blob, params: UploadFileParams) => Promise<UploadFileResult>;
194
219
  type OpenCommandConfirmationModalHostFunction = (params: Parameters<OpenCommandConfirmationModalFunction>[0]) => Promise<void>;
220
+ type StorageSetFunction = (params: {
221
+ storageType: FrontComponentStorageType;
222
+ key: string;
223
+ serializedValue: string;
224
+ }) => Promise<void>;
225
+ type StorageDeleteFunction = (params: {
226
+ storageType: FrontComponentStorageType;
227
+ key: string;
228
+ }) => Promise<void>;
229
+ type StorageClearFunction = (params: {
230
+ storageType: FrontComponentStorageType;
231
+ }) => Promise<void>;
195
232
  type FrontComponentHostCommunicationApiStore = {
196
233
  navigate?: NavigateFunction;
197
234
  requestAccessTokenRefresh?: RequestAccessTokenRefreshFunction;
@@ -202,6 +239,10 @@ type FrontComponentHostCommunicationApiStore = {
202
239
  closeSidePanel?: CloseSidePanelFunction;
203
240
  updateProgress?: UpdateProgressFunction;
204
241
  copyToClipboard?: CopyToClipboardFunction;
242
+ uploadFile?: UploadFileFunction;
243
+ storageSet?: StorageSetFunction;
244
+ storageDelete?: StorageDeleteFunction;
245
+ storageClear?: StorageClearFunction;
205
246
  };
206
247
  declare global {
207
248
  var frontComponentHostCommunicationApi: FrontComponentHostCommunicationApiStore;
@@ -225,6 +266,8 @@ declare const unmountFrontComponent: UnmountFrontComponentFunction;
225
266
 
226
267
  declare const updateProgress: UpdateProgressFunction;
227
268
 
269
+ declare const uploadFile: UploadFileFunction;
270
+
228
271
  declare const useColorScheme: () => "light" | "dark";
229
272
 
230
273
  type FrontComponentExecutionContext = {
@@ -294,5 +337,5 @@ type CommandModalProps = {
294
337
  };
295
338
  declare const CommandModal: ({ title, subtitle, execute, confirmButtonText, confirmButtonAccent, }: CommandModalProps) => null;
296
339
 
297
- export { AppPath, Command, CommandLink, CommandModal, CommandOpenSidePanelPage, SidePanelPages, Trans, closeSidePanel, copyToClipboard, enqueueSnackbar, getApplicationVariable, getFrontComponentCommandErrorDedupeKey, msg, navigate, openCommandConfirmationModal, openSidePanelPage, t, unmountFrontComponent, updateProgress, useColorScheme, useFrontComponentExecutionContext, useFrontComponentId, useLocale, useRecordId, useSelectedRecordIds, useTranslate, useUserId };
298
- export type { CloseSidePanelFunction, CommandConfirmationModalAccent, CommandConfirmationModalResult, CommandLinkProps, CommandModalProps, CommandOpenSidePanelPageProps, CommandProps, CopyToClipboardFunction, EnqueueSnackbarFunction, EnqueueSnackbarParams, FrontComponentExecutionContext, MessageDescriptor, NavigateFunction, OpenCommandConfirmationModalFunction, OpenCommandConfirmationModalHostFunction, OpenSidePanelPageFunction, OpenSidePanelPageParams, RequestAccessTokenRefreshFunction, SnackBarVariant, TransProps, TranslationValues, UnmountFrontComponentFunction, UpdateProgressFunction, UseTranslateResult };
340
+ export { AppPath, Command, CommandLink, CommandModal, CommandOpenSidePanelPage, SidePanelPages, Trans, closeSidePanel, copyToClipboard, enqueueSnackbar, getApplicationVariable, getFrontComponentCommandErrorDedupeKey, msg, navigate, openCommandConfirmationModal, openSidePanelPage, t, unmountFrontComponent, updateProgress, uploadFile, useColorScheme, useFrontComponentExecutionContext, useFrontComponentId, useLocale, useRecordId, useSelectedRecordIds, useTranslate, useUserId };
341
+ export type { CloseSidePanelFunction, CommandConfirmationModalAccent, CommandConfirmationModalResult, CommandLinkProps, CommandModalProps, CommandOpenSidePanelPageProps, CommandProps, CopyToClipboardFunction, EnqueueSnackbarFunction, EnqueueSnackbarParams, FrontComponentExecutionContext, FrontComponentStorageType, MessageDescriptor, NavigateFunction, OpenCommandConfirmationModalFunction, OpenCommandConfirmationModalHostFunction, OpenSidePanelPageFunction, OpenSidePanelPageParams, RequestAccessTokenRefreshFunction, SnackBarVariant, StorageClearFunction, StorageDeleteFunction, StorageSetFunction, TransProps, TranslationValues, UnmountFrontComponentFunction, UpdateProgressFunction, UploadFileFailureReason, UploadFileFunction, UploadFileParams, UploadFileResult, UploadedFrontComponentFile, UseTranslateResult };