twenty-sdk 2.3.1 → 2.4.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.
@@ -244,6 +244,8 @@ declare global {
244
244
 
245
245
  declare const closeSidePanel: CloseSidePanelFunction;
246
246
 
247
+ declare const getApplicationVariable: (key: string) => string | undefined;
248
+
247
249
  declare const enqueueSnackbar: EnqueueSnackbarFunction;
248
250
 
249
251
  declare const navigate: NavigateFunction;
@@ -314,5 +316,5 @@ type CommandModalProps = {
314
316
  };
315
317
  declare const CommandModal: ({ title, subtitle, execute, confirmButtonText, confirmButtonAccent, }: CommandModalProps) => null;
316
318
 
317
- 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, useSelectedRecordIds, useUserId };
319
+ export { AppPath, Command, CommandLink, CommandModal, CommandOpenSidePanelPage, SidePanelPages, closeSidePanel, enqueueSnackbar, every, everyDefined, everyEquals, favoriteRecordIds, featureFlags, getApplicationVariable, 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, useSelectedRecordIds, useUserId };
318
320
  export type { CloseSidePanelFunction, CommandConfirmationModalAccent, CommandConfirmationModalResult, CommandLinkProps, CommandModalProps, CommandOpenSidePanelPageProps, CommandProps, EnqueueSnackbarFunction, EnqueueSnackbarParams, FrontComponentExecutionContext, NavigateFunction, OpenCommandConfirmationModalFunction, OpenCommandConfirmationModalHostFunction, OpenSidePanelPageFunction, RequestAccessTokenRefreshFunction, SnackBarVariant, UnmountFrontComponentFunction, UpdateProgressFunction };
@@ -5728,6 +5728,9 @@ const $e = globalThis.frontComponentHostCommunicationApi, oo = () => {
5728
5728
  throw new Error("closeSidePanelFunction is not set");
5729
5729
  return e();
5730
5730
  }, uo = (e) => {
5731
+ const t = process.env.applicationVariables;
5732
+ return t ? JSON.parse(t)[e] : void 0;
5733
+ }, lo = (e) => {
5731
5734
  const t = $e.enqueueSnackbar;
5732
5735
  if (!X(t))
5733
5736
  throw new Error("enqueueSnackbarFunction is not set");
@@ -5752,7 +5755,7 @@ const $e = globalThis.frontComponentHostCommunicationApi, oo = () => {
5752
5755
  if (!X(e))
5753
5756
  throw new Error("unmountFrontComponentFunction is not set");
5754
5757
  return e();
5755
- }, lo = (e) => {
5758
+ }, co = (e) => {
5756
5759
  const t = $e.updateProgress;
5757
5760
  if (!X(t))
5758
5761
  throw new Error("updateProgressFunction is not set");
@@ -5772,14 +5775,14 @@ const $e = globalThis.frontComponentHostCommunicationApi, oo = () => {
5772
5775
  };
5773
5776
  return $s(p), p(), () => gs(p);
5774
5777
  }, [e]), t;
5775
- }, ms = (e) => e.frontComponentId, mt = () => gt(ms), vs = (e) => e.selectedRecordIds.length === 1 ? e.selectedRecordIds[0] : null, co = () => gt(vs), ys = (e) => e.selectedRecordIds, ho = () => gt(ys), _s = (e) => e.userId, po = () => gt(_s), fo = (e) => `${e}-command-error`, $o = ({ execute: e }) => {
5778
+ }, ms = (e) => e.frontComponentId, mt = () => gt(ms), vs = (e) => e.selectedRecordIds.length === 1 ? e.selectedRecordIds[0] : null, ho = () => gt(vs), ys = (e) => e.selectedRecordIds, po = () => gt(ys), _s = (e) => e.userId, fo = () => gt(_s), $o = (e) => `${e}-command-error`, go = ({ execute: e }) => {
5776
5779
  const [t, a] = Ie(!1), o = mt();
5777
5780
  return Oe(() => {
5778
5781
  if (t)
5779
5782
  return;
5780
5783
  a(!0), (async () => (await e(), await $t()))();
5781
5784
  }, [e, t, o]), null;
5782
- }, go = ({
5785
+ }, mo = ({
5783
5786
  to: e,
5784
5787
  params: t,
5785
5788
  queryParams: a,
@@ -5791,7 +5794,7 @@ const $e = globalThis.frontComponentHostCommunicationApi, oo = () => {
5791
5794
  return;
5792
5795
  u(!0), (async () => (await cs(e, t, a, o), await $t()))();
5793
5796
  }, [e, t, a, o, p, $]), null;
5794
- }, mo = ({
5797
+ }, vo = ({
5795
5798
  page: e,
5796
5799
  pageTitle: t,
5797
5800
  pageIcon: a,
@@ -5817,7 +5820,7 @@ const $e = globalThis.frontComponentHostCommunicationApi, oo = () => {
5817
5820
  u,
5818
5821
  f
5819
5822
  ]), null;
5820
- }, vo = ({
5823
+ }, yo = ({
5821
5824
  title: e,
5822
5825
  subtitle: t,
5823
5826
  execute: a,
@@ -5985,13 +5988,15 @@ const $e = globalThis.frontComponentHostCommunicationApi, oo = () => {
5985
5988
  name: "primaryPhoneCountryCode",
5986
5989
  type: P.TEXT,
5987
5990
  hidden: !1,
5988
- isRequired: !1
5991
+ isRequired: !1,
5992
+ isIncludedInUniqueConstraint: !0
5989
5993
  },
5990
5994
  {
5991
5995
  name: "primaryPhoneCallingCode",
5992
5996
  type: P.TEXT,
5993
5997
  hidden: !1,
5994
- isRequired: !1
5998
+ isRequired: !1,
5999
+ isIncludedInUniqueConstraint: !0
5995
6000
  },
5996
6001
  {
5997
6002
  name: "additionalPhones",
@@ -6025,19 +6030,20 @@ P.LINKS, P.CURRENCY, P.FULL_NAME, P.ADDRESS, P.ACTOR, P.EMAILS, P.PHONES, P.RICH
6025
6030
  var ks = /* @__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))(ks || {});
6026
6031
  export {
6027
6032
  Oa as AppPath,
6028
- $o as Command,
6029
- go as CommandLink,
6030
- vo as CommandModal,
6031
- mo as CommandOpenSidePanelPage,
6033
+ go as Command,
6034
+ mo as CommandLink,
6035
+ yo as CommandModal,
6036
+ vo as CommandOpenSidePanelPage,
6032
6037
  ks as SidePanelPages,
6033
6038
  oo as closeSidePanel,
6034
- uo as enqueueSnackbar,
6039
+ lo as enqueueSnackbar,
6035
6040
  Js as every,
6036
6041
  Zs as everyDefined,
6037
6042
  Xs as everyEquals,
6038
6043
  Ds as favoriteRecordIds,
6039
6044
  Gs as featureFlags,
6040
- fo as getFrontComponentCommandErrorDedupeKey,
6045
+ uo as getApplicationVariable,
6046
+ $o as getFrontComponentCommandErrorDedupeKey,
6041
6047
  Bs as hasAnySoftDeleteFilterOnView,
6042
6048
  zs as includes,
6043
6049
  so as includesEvery,
@@ -6065,11 +6071,11 @@ export {
6065
6071
  Vs as targetObjectReadPermissions,
6066
6072
  Ws as targetObjectWritePermissions,
6067
6073
  $t as unmountFrontComponent,
6068
- lo as updateProgress,
6074
+ co as updateProgress,
6069
6075
  gt as useFrontComponentExecutionContext,
6070
6076
  mt as useFrontComponentId,
6071
- co as useRecordId,
6072
- ho as useSelectedRecordIds,
6073
- po as useUserId
6077
+ ho as useRecordId,
6078
+ po as useSelectedRecordIds,
6079
+ fo as useUserId
6074
6080
  };
6075
6081
  //# sourceMappingURL=index.mjs.map