twenty-sdk 2.0.0 → 2.1.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 (36) hide show
  1. package/dist/billing/index.cjs +2 -0
  2. package/dist/billing/index.cjs.map +1 -0
  3. package/dist/billing/index.d.ts +10 -0
  4. package/dist/billing/index.mjs +43 -0
  5. package/dist/billing/index.mjs.map +1 -0
  6. package/dist/cli/commands/add.d.ts +3 -1
  7. package/dist/cli/utilities/build/common/plugins/stub-twenty-sdk-define.plugin.d.ts +7 -0
  8. package/dist/cli/utilities/build/manifest/manifest-extract-config.d.ts +4 -2
  9. package/dist/cli/utilities/entity/entity-page-layout-tab-template.d.ts +3 -0
  10. package/dist/cli/utilities/entity/entity-record-page-layout-template.d.ts +5 -0
  11. package/dist/cli/utilities/entity/entity-view-template.d.ts +9 -3
  12. package/dist/cli.cjs +123 -55
  13. package/dist/cli.mjs +2183 -2020
  14. package/dist/define/index.cjs +13 -13
  15. package/dist/define/index.cjs.map +1 -1
  16. package/dist/define/index.d.ts +29 -4
  17. package/dist/define/index.mjs +995 -978
  18. package/dist/define/index.mjs.map +1 -1
  19. package/dist/front-component/index.cjs +9 -9
  20. package/dist/front-component/index.cjs.map +1 -1
  21. package/dist/front-component/index.d.ts +6 -2
  22. package/dist/front-component/index.mjs +44 -42
  23. package/dist/front-component/index.mjs.map +1 -1
  24. package/dist/{get-function-input-schema-BZ7_XyUh-0e9upvLV.mjs → get-function-input-schema-BZ7_XyUh-CKgoFzji.mjs} +1 -1
  25. package/dist/{get-function-input-schema-BZ7_XyUh-CoN3o7CS.js → get-function-input-schema-BZ7_XyUh-D38OurwZ.js} +1 -1
  26. package/dist/logic-function/index.cjs +2 -0
  27. package/dist/logic-function/index.cjs.map +1 -0
  28. package/dist/logic-function/index.d.ts +215 -0
  29. package/dist/logic-function/index.mjs +2 -0
  30. package/dist/logic-function/index.mjs.map +1 -0
  31. package/dist/operations.cjs +1 -1
  32. package/dist/operations.mjs +2 -2
  33. package/dist/{uninstall-CsGNVq-c.mjs → uninstall-Bw-TK4rL.mjs} +3955 -3701
  34. package/dist/{uninstall-CV3Frzv-.js → uninstall-CYiYoBPe.js} +70 -45
  35. package/package.json +15 -2
  36. package/dist/cli/utilities/build/manifest/utils/generate-default-field-universal-identifier.d.ts +0 -5
@@ -112,7 +112,8 @@ interface ObjectRecord {
112
112
  type CommandMenuContextApi = {
113
113
  pageType: ContextStorePageType;
114
114
  isInSidePanel: boolean;
115
- isPageInEditMode: boolean;
115
+ isDashboardPageLayoutInEditMode: boolean;
116
+ isLayoutCustomizationModeEnabled: boolean;
116
117
  favoriteRecordIds: string[];
117
118
  isSelectAll: boolean;
118
119
  hasAnySoftDeleteFilterOnView: boolean;
@@ -122,6 +123,7 @@ type CommandMenuContextApi = {
122
123
  };
123
124
  selectedRecords: ObjectRecord[];
124
125
  featureFlags: Record<string, boolean>;
126
+ permissionFlags: Record<string, boolean>;
125
127
  targetObjectReadPermissions: Record<string, boolean>;
126
128
  targetObjectWritePermissions: Record<string, boolean>;
127
129
  objectMetadataItem: Record<string, unknown>;
@@ -176,6 +178,8 @@ declare enum SidePanelPages {
176
178
 
177
179
  declare const pageType: CommandMenuContextApi["pageType"];
178
180
  declare const isInSidePanel: CommandMenuContextApi["isInSidePanel"];
181
+ declare const isDashboardPageLayoutInEditMode: CommandMenuContextApi["isDashboardPageLayoutInEditMode"];
182
+ declare const isLayoutCustomizationModeEnabled: CommandMenuContextApi["isLayoutCustomizationModeEnabled"];
179
183
  declare const favoriteRecordIds: CommandMenuContextApi["favoriteRecordIds"];
180
184
  declare const isSelectAll: CommandMenuContextApi["isSelectAll"];
181
185
  declare const hasAnySoftDeleteFilterOnView: CommandMenuContextApi["hasAnySoftDeleteFilterOnView"];
@@ -299,5 +303,5 @@ type CommandModalProps = {
299
303
  };
300
304
  declare const CommandModal: ({ title, subtitle, execute, confirmButtonText, confirmButtonAccent, }: CommandModalProps) => null;
301
305
 
302
- export { AppPath, Command, CommandLink, CommandModal, CommandOpenSidePanelPage, SidePanelPages, closeSidePanel, enqueueSnackbar, every, everyDefined, everyEquals, favoriteRecordIds, featureFlags, getFrontComponentCommandErrorDedupeKey, hasAnySoftDeleteFilterOnView, includes, includesEvery, isDefined, isInSidePanel, isNonEmptyString, isSelectAll, navigate, none, noneDefined, noneEquals, numberOfSelectedRecords, objectMetadataItem, objectPermissions, openCommandConfirmationModal, openSidePanelPage, pageType, selectedRecords, some, someDefined, someEquals, someNonEmptyString, targetObjectReadPermissions, targetObjectWritePermissions, unmountFrontComponent, updateProgress, useFrontComponentExecutionContext, useFrontComponentId, useRecordId, useUserId };
306
+ export { AppPath, Command, CommandLink, CommandModal, CommandOpenSidePanelPage, SidePanelPages, closeSidePanel, enqueueSnackbar, every, everyDefined, everyEquals, favoriteRecordIds, featureFlags, getFrontComponentCommandErrorDedupeKey, hasAnySoftDeleteFilterOnView, includes, includesEvery, isDashboardPageLayoutInEditMode, isDefined, isInSidePanel, isLayoutCustomizationModeEnabled, isNonEmptyString, isSelectAll, navigate, none, noneDefined, noneEquals, numberOfSelectedRecords, objectMetadataItem, objectPermissions, openCommandConfirmationModal, openSidePanelPage, pageType, selectedRecords, some, someDefined, someEquals, someNonEmptyString, targetObjectReadPermissions, targetObjectWritePermissions, unmountFrontComponent, updateProgress, useFrontComponentExecutionContext, useFrontComponentId, useRecordId, useUserId };
303
307
  export type { CloseSidePanelFunction, CommandConfirmationModalAccent, CommandConfirmationModalResult, CommandLinkProps, CommandModalProps, CommandOpenSidePanelPageProps, CommandProps, EnqueueSnackbarFunction, EnqueueSnackbarParams, FrontComponentExecutionContext, NavigateFunction, OpenCommandConfirmationModalFunction, OpenCommandConfirmationModalHostFunction, OpenSidePanelPageFunction, RequestAccessTokenRefreshFunction, SnackBarVariant, UnmountFrontComponentFunction, UpdateProgressFunction };
@@ -1,7 +1,7 @@
1
1
  import { isUndefined as l2, isNull as c2, isNonEmptyString as ad, isNonEmptyArray as Oo, isString as f2, isObject as h2 } from "@sniptt/guards";
2
2
  import He, { z as X } from "zod";
3
3
  import { useState as Zr, useRef as p2, useEffect as Jr } from "react";
4
- const Vp = null, Yp = null, Wp = null, jp = null, Kp = null, Zp = null, Jp = null, zp = null, Xp = null, Qp = null, e4 = null, t4 = null, r4 = null, n4 = null, i4 = null, o4 = null, s4 = null, a4 = null, u4 = null, d4 = null, l4 = null, c4 = null, f4 = null, h4 = null, p4 = null, $4 = null, Re = (e) => !l2(e) && !c2(e);
4
+ const Vp = null, Yp = null, Wp = null, jp = null, Kp = null, Zp = null, Jp = null, zp = null, Xp = null, Qp = null, e4 = null, t4 = null, r4 = null, n4 = null, i4 = null, o4 = null, s4 = null, a4 = null, u4 = null, d4 = null, l4 = null, c4 = null, f4 = null, h4 = null, p4 = null, $4 = null, g4 = null, m4 = null, Re = (e) => !l2(e) && !c2(e);
5
5
  var we = "INUMBER", hr = "IOP1", pr = "IOP2", $r = "IOP3", rt = "IVAR", Lt = "IVARNAME", sr = "IFUNCALL", ci = "IFUNDEF", le = "IEXPR", ko = "IEXPREVAL", Ut = "IMEMBER", fi = "IENDSTATEMENT", ar = "IARRAY";
6
6
  function D(e, t) {
7
7
  this.type = e, this.value = t ?? 0;
@@ -9007,12 +9007,12 @@ for (const e of Cd()) {
9007
9007
  new Set(Cd());
9008
9008
  const wp = "frontComponentHostCommunicationApi";
9009
9009
  globalThis[wp] ??= {};
9010
- const Zt = globalThis.frontComponentHostCommunicationApi, g4 = () => {
9010
+ const Zt = globalThis.frontComponentHostCommunicationApi, v4 = () => {
9011
9011
  const e = Zt.closeSidePanel;
9012
9012
  if (!Re(e))
9013
9013
  throw new Error("closeSidePanelFunction is not set");
9014
9014
  return e();
9015
- }, m4 = (e) => {
9015
+ }, y4 = (e) => {
9016
9016
  const t = Zt.enqueueSnackbar;
9017
9017
  if (!Re(t))
9018
9018
  throw new Error("enqueueSnackbarFunction is not set");
@@ -9037,7 +9037,7 @@ const Zt = globalThis.frontComponentHostCommunicationApi, g4 = () => {
9037
9037
  if (!Re(e))
9038
9038
  throw new Error("unmountFrontComponentFunction is not set");
9039
9039
  return e();
9040
- }, v4 = (e) => {
9040
+ }, S4 = (e) => {
9041
9041
  const t = Zt.updateProgress;
9042
9042
  if (!Re(t))
9043
9043
  throw new Error("updateProgressFunction is not set");
@@ -9057,7 +9057,7 @@ const Zt = globalThis.frontComponentHostCommunicationApi, g4 = () => {
9057
9057
  };
9058
9058
  return Ap(i), i(), () => Rp(i);
9059
9059
  }, [e]), t;
9060
- }, Op = (e) => e.frontComponentId, Ki = () => pa(Op), kp = (e) => e.recordId, y4 = () => pa(kp), Np = (e) => e.userId, S4 = () => pa(Np), _4 = (e) => `${e}-command-error`, b4 = ({ execute: e }) => {
9060
+ }, Op = (e) => e.frontComponentId, Ki = () => pa(Op), kp = (e) => e.recordId, _4 = () => pa(kp), Np = (e) => e.userId, b4 = () => pa(Np), w4 = (e) => `${e}-command-error`, E4 = ({ execute: e }) => {
9061
9061
  const [t, r] = Zr(!1), n = Ki();
9062
9062
  return Jr(() => {
9063
9063
  if (t)
@@ -9066,7 +9066,7 @@ const Zt = globalThis.frontComponentHostCommunicationApi, g4 = () => {
9066
9066
  await e(), await ji();
9067
9067
  })();
9068
9068
  }, [e, t, n]), null;
9069
- }, w4 = ({
9069
+ }, C4 = ({
9070
9070
  to: e,
9071
9071
  params: t,
9072
9072
  queryParams: r,
@@ -9080,7 +9080,7 @@ const Zt = globalThis.frontComponentHostCommunicationApi, g4 = () => {
9080
9080
  await Ep(e, t, r, n), await ji();
9081
9081
  })();
9082
9082
  }, [e, t, r, n, i, d]), null;
9083
- }, E4 = ({
9083
+ }, M4 = ({
9084
9084
  page: e,
9085
9085
  pageTitle: t,
9086
9086
  pageIcon: r,
@@ -9108,7 +9108,7 @@ const Zt = globalThis.frontComponentHostCommunicationApi, g4 = () => {
9108
9108
  s,
9109
9109
  c
9110
9110
  ]), null;
9111
- }, C4 = ({
9111
+ }, P4 = ({
9112
9112
  title: e,
9113
9113
  subtitle: t,
9114
9114
  execute: r,
@@ -9318,48 +9318,50 @@ R.LINKS, R.CURRENCY, R.FULL_NAME, R.ADDRESS, R.ACTOR, R.EMAILS, R.PHONES, R.RICH
9318
9318
  var Up = /* @__PURE__ */ ((e) => (e.CommandMenuDisplay = "command-menu-display", e.ViewRecord = "view-record", e.MergeRecords = "merge-records", e.UpdateRecords = "update-records", e.ViewCalendarEvent = "view-calendar-event", e.EditRichText = "edit-rich-text", e.Copilot = "copilot", e.WorkflowTriggerSelectType = "workflow-trigger-select-type", e.WorkflowStepCreate = "workflow-step-create", e.WorkflowStepEditType = "workflow-step-edit-type", e.WorkflowStepView = "workflow-step-view", e.WorkflowStepEdit = "workflow-step-edit", e.WorkflowRunStepView = "workflow-run-step-view", e.SearchRecords = "search-records", e.AskAI = "ask-ai", e.ViewPreviousAiChats = "view-previous-ai-chats", e.PageLayoutDashboardWidgetTypeSelect = "page-layout-dashboard-widget-type-select", e.PageLayoutTabSettings = "page-layout-tab-settings", e.DashboardChartSettings = "dashboard-chart-settings", e.DashboardIframeSettings = "dashboard-iframe-settings", e.DashboardRecordTableSettings = "dashboard-record-table-settings", e.RecordPageFieldsSettings = "record-page-fields-settings", e.RecordPageFieldSettings = "record-page-field-settings", e.ViewFrontComponent = "view-front-component", e.NavigationMenuItemEdit = "navigation-menu-item-edit", e.NavigationMenuAddItem = "navigation-menu-add-item", e.CommandMenuEdit = "command-menu-edit", e.PageLayoutRecordPageWidgetTypeSelect = "page-layout-record-page-widget-type-select", e.ComposeEmail = "compose-email", e))(Up || {});
9319
9319
  export {
9320
9320
  Bc as AppPath,
9321
- b4 as Command,
9322
- w4 as CommandLink,
9323
- C4 as CommandModal,
9324
- E4 as CommandOpenSidePanelPage,
9321
+ E4 as Command,
9322
+ C4 as CommandLink,
9323
+ P4 as CommandModal,
9324
+ M4 as CommandOpenSidePanelPage,
9325
9325
  Up as SidePanelPages,
9326
- g4 as closeSidePanel,
9327
- m4 as enqueueSnackbar,
9328
- o4 as every,
9329
- s4 as everyDefined,
9330
- a4 as everyEquals,
9331
- Wp as favoriteRecordIds,
9332
- Xp as featureFlags,
9333
- _4 as getFrontComponentCommandErrorDedupeKey,
9334
- Kp as hasAnySoftDeleteFilterOnView,
9335
- i4 as includes,
9336
- $4 as includesEvery,
9337
- r4 as isDefined,
9326
+ v4 as closeSidePanel,
9327
+ y4 as enqueueSnackbar,
9328
+ a4 as every,
9329
+ u4 as everyDefined,
9330
+ d4 as everyEquals,
9331
+ Kp as favoriteRecordIds,
9332
+ e4 as featureFlags,
9333
+ w4 as getFrontComponentCommandErrorDedupeKey,
9334
+ Jp as hasAnySoftDeleteFilterOnView,
9335
+ s4 as includes,
9336
+ m4 as includesEvery,
9337
+ Wp as isDashboardPageLayoutInEditMode,
9338
+ i4 as isDefined,
9338
9339
  Yp as isInSidePanel,
9339
- n4 as isNonEmptyString,
9340
- jp as isSelectAll,
9340
+ jp as isLayoutCustomizationModeEnabled,
9341
+ o4 as isNonEmptyString,
9342
+ Zp as isSelectAll,
9341
9343
  Ep as navigate,
9342
- c4 as none,
9343
- f4 as noneDefined,
9344
- h4 as noneEquals,
9345
- Zp as numberOfSelectedRecords,
9346
- t4 as objectMetadataItem,
9347
- Jp as objectPermissions,
9344
+ h4 as none,
9345
+ p4 as noneDefined,
9346
+ $4 as noneEquals,
9347
+ zp as numberOfSelectedRecords,
9348
+ n4 as objectMetadataItem,
9349
+ Xp as objectPermissions,
9348
9350
  Cp as openCommandConfirmationModal,
9349
9351
  Mp as openSidePanelPage,
9350
9352
  Vp as pageType,
9351
- zp as selectedRecords,
9352
- u4 as some,
9353
- d4 as someDefined,
9354
- l4 as someEquals,
9355
- p4 as someNonEmptyString,
9356
- Qp as targetObjectReadPermissions,
9357
- e4 as targetObjectWritePermissions,
9353
+ Qp as selectedRecords,
9354
+ l4 as some,
9355
+ c4 as someDefined,
9356
+ f4 as someEquals,
9357
+ g4 as someNonEmptyString,
9358
+ t4 as targetObjectReadPermissions,
9359
+ r4 as targetObjectWritePermissions,
9358
9360
  ji as unmountFrontComponent,
9359
- v4 as updateProgress,
9361
+ S4 as updateProgress,
9360
9362
  pa as useFrontComponentExecutionContext,
9361
9363
  Ki as useFrontComponentId,
9362
- y4 as useRecordId,
9363
- S4 as useUserId
9364
+ _4 as useRecordId,
9365
+ b4 as useUserId
9364
9366
  };
9365
9367
  //# sourceMappingURL=index.mjs.map