twenty-sdk 2.14.0 → 2.16.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 (75) hide show
  1. package/README.md +4 -0
  2. package/dist/{AllIcons-BwIoyggb-BCMFgulw.mjs → AllIcons-CdbaxNyc-CJcUHQBl.mjs} +492 -493
  3. package/dist/AllIcons-CdbaxNyc-DR-8e_UM.js +1 -0
  4. package/dist/assets/halftone-backdrop.png +0 -0
  5. package/dist/billing/index.cjs +1 -1
  6. package/dist/billing/index.cjs.map +1 -1
  7. package/dist/billing/index.mjs +2 -1
  8. package/dist/billing/index.mjs.map +1 -1
  9. package/dist/{catalog-sync-CXDxoJ8O.mjs → catalog-sync-BYM3GqZl.mjs} +1 -1
  10. package/dist/catalog-sync-w6yKppKP.js +1 -0
  11. package/dist/cli/commands/dev/dev.d.ts +1 -0
  12. package/dist/cli/operations/index.d.ts +2 -0
  13. package/dist/cli/operations/server-start.d.ts +1 -0
  14. package/dist/cli/utilities/api/api-client.d.ts +3 -1
  15. package/dist/cli/utilities/api/api-response-type.d.ts +1 -0
  16. package/dist/cli/utilities/auth/reauth-helper.d.ts +2 -0
  17. package/dist/cli/utilities/build/common/build-application.d.ts +2 -0
  18. package/dist/cli/utilities/build/cover/apply-generated-cover.d.ts +9 -0
  19. package/dist/cli/utilities/build/cover/assets/twenty-logo-mark-path.d.ts +1 -0
  20. package/dist/cli/utilities/build/cover/generate-cover-image.d.ts +5 -0
  21. package/dist/cli/utilities/build/cover/generated-asset.type.d.ts +4 -0
  22. package/dist/cli/utilities/build/cover/generated-cover-path.d.ts +1 -0
  23. package/dist/cli/utilities/server/docker-container.d.ts +1 -0
  24. package/dist/cli/utilities/version/get-engine-version-range.d.ts +1 -0
  25. package/dist/cli/utilities/version/resolve-highest-engine-version.d.ts +1 -0
  26. package/dist/cli.cjs +34 -34
  27. package/dist/cli.mjs +1605 -1600
  28. package/dist/define/index.cjs +21 -21
  29. package/dist/define/index.cjs.map +1 -1
  30. package/dist/define/index.d.ts +127 -7
  31. package/dist/define/index.mjs +36027 -34678
  32. package/dist/define/index.mjs.map +1 -1
  33. package/dist/front-component/index.cjs +1 -1
  34. package/dist/front-component/index.cjs.map +1 -1
  35. package/dist/front-component/index.d.ts +2 -2
  36. package/dist/front-component/index.mjs +3 -3
  37. package/dist/front-component/index.mjs.map +1 -1
  38. package/dist/front-component-renderer.cjs +1 -1
  39. package/dist/get-function-input-schema-GNk3NRLJ-D8x7FINz.js +1 -0
  40. package/dist/{get-function-input-schema-NI9y_bIk-Cdh2RIb9.mjs → get-function-input-schema-GNk3NRLJ-zQkANyT3.mjs} +31 -21
  41. package/dist/icon-DMT-YeKi-C9-AduNa.mjs +10168 -0
  42. package/dist/icon-DMT-YeKi-Cz0W5sJA.js +1 -0
  43. package/dist/isDefined-Dtu5EYqP-Dp026Ry1.js +1 -0
  44. package/dist/logic-function/get-function-input-schema-GNk3NRLJ-D8x7FINz.js +2 -0
  45. package/dist/logic-function/get-function-input-schema-GNk3NRLJ-D8x7FINz.js.map +1 -0
  46. package/dist/logic-function/get-function-input-schema-GNk3NRLJ-DSc3lI49.mjs +75 -0
  47. package/dist/logic-function/get-function-input-schema-GNk3NRLJ-DSc3lI49.mjs.map +1 -0
  48. package/dist/logic-function/index.cjs +4 -4
  49. package/dist/logic-function/index.cjs.map +1 -1
  50. package/dist/logic-function/index.d.ts +26 -5
  51. package/dist/logic-function/index.mjs +144 -28
  52. package/dist/logic-function/index.mjs.map +1 -1
  53. package/dist/logic-function/isDefined-Dtu5EYqP-CMNeFg4z.mjs +7 -0
  54. package/dist/logic-function/isDefined-Dtu5EYqP-CMNeFg4z.mjs.map +1 -0
  55. package/dist/logic-function/isDefined-Dtu5EYqP-Dp026Ry1.js +2 -0
  56. package/dist/logic-function/isDefined-Dtu5EYqP-Dp026Ry1.js.map +1 -0
  57. package/dist/login-D7nyXinY.js +345 -0
  58. package/dist/{login-oauth-BRpqOH2x.mjs → login-rU5te3B6.mjs} +43931 -42338
  59. package/dist/operations.cjs +1 -1
  60. package/dist/operations.mjs +4 -4
  61. package/dist/ui/index.cjs +25 -6
  62. package/dist/ui/index.d.ts +18 -12
  63. package/dist/ui/index.mjs +15247 -1078
  64. package/dist/utils/index.cjs +1 -1
  65. package/dist/utils/index.cjs.map +1 -1
  66. package/dist/utils/index.d.ts +3 -1
  67. package/dist/utils/index.mjs +11 -9
  68. package/dist/utils/index.mjs.map +1 -1
  69. package/package.json +6 -3
  70. package/dist/AllIcons-BwIoyggb-Pq3paugc.js +0 -1
  71. package/dist/catalog-sync-sANH0f3Y.js +0 -1
  72. package/dist/display-Co0K-nTB-CGtaWbMi.js +0 -83
  73. package/dist/display-Co0K-nTB-DAirZFT6.mjs +0 -54635
  74. package/dist/get-function-input-schema-NI9y_bIk-CqUY25sG.js +0 -1
  75. package/dist/login-oauth-0T8eWvyh.js +0 -345
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`TWENTY_API_URL`,t=`TWENTY_APP_ACCESS_TOKEN`,n=e=>{let t=JSON.parse(atob(e.split(`.`)[1]));return{workspaceId:t.workspaceId,applicationId:t.applicationId}},r=r=>{let i=process.env[e],a=process.env[t];if(!i||!a)throw Error(`getPublicAssetUrl can only be called from within a logic function or front component`);let{workspaceId:o,applicationId:s}=n(a),c=r.startsWith(`/`)?r.slice(1):r;return`${i}/public-assets/${o}/${s}/${(c.startsWith(`public/`)?c:`public/${c}`).split(`/`).map(encodeURIComponent).join(`/`)}`};exports.getPublicAssetUrl=r;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("uuid");let e=require("@sniptt/guards");var t=`TWENTY_API_URL`,n=`TWENTY_APP_ACCESS_TOKEN`,r=e=>{let t=JSON.parse(atob(e.split(`.`)[1]));return{workspaceId:t.workspaceId,applicationId:t.applicationId}},i=e=>{let i=process.env[t],a=process.env[n];if(!i||!a)throw Error(`getPublicAssetUrl can only be called from within a logic function or front component`);let{workspaceId:o,applicationId:s}=r(a),c=e.startsWith(`/`)?e.slice(1):e;return`${i}/public-assets/${o}/${s}/${(c.startsWith(`public/`)?c:`public/${c}`).split(`/`).map(encodeURIComponent).join(`/`)}`},a=t=>!(0,e.isUndefined)(t)&&!(0,e.isNull)(t);exports.getPublicAssetUrl=i,exports.isDefined=a;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../twenty-shared/dist/application.mjs","../../src/sdk/utils/get-public-asset-url.ts"],"sourcesContent":["//#region src/application/constants/AssetDirectory.ts\nvar e = \"public\", t = \"TWENTY_API_KEY\", n = \"TWENTY_API_URL\", r = \"TWENTY_APP_ACCESS_TOKEN\", i = \"generated\", a = { js: \"import { createRequire as __createRequire } from 'module';\\nconst require = __createRequire(import.meta.url);\" }, o = \".twenty/output\", s = \"Standard\", c = \"20202020-64aa-4b6f-b003-9c74b97cee20\", l = /* @__PURE__ */ function(e) {\n\treturn e.Object = \"object\", e.Field = \"field\", e.LogicFunction = \"logicFunction\", e.FrontComponent = \"frontComponent\", e.Role = \"role\", e.Skill = \"skill\", e.Agent = \"agent\", e.ConnectionProvider = \"connectionProvider\", e.View = \"view\", e.ViewField = \"viewField\", e.NavigationMenuItem = \"navigationMenuItem\", e.PageLayout = \"pageLayout\", e.PageLayoutTab = \"pageLayoutTab\", e.CommandMenuItem = \"commandMenuItem\", e;\n}({});\n//#endregion\nexport { e as ASSETS_DIR, t as DEFAULT_API_KEY_NAME, n as DEFAULT_API_URL_NAME, r as DEFAULT_APP_ACCESS_TOKEN_NAME, i as GENERATED_DIR, a as NODE_ESM_CJS_BANNER, o as OUTPUT_DIR, l as SyncableEntity, s as TWENTY_STANDARD_APPLICATION_NAME, c as TWENTY_STANDARD_APPLICATION_UNIVERSAL_IDENTIFIER };\n","import {\n DEFAULT_API_URL_NAME,\n DEFAULT_APP_ACCESS_TOKEN_NAME,\n} from 'twenty-shared/application';\n\nconst decodeTokenPayload = (\n token: string,\n): { workspaceId: string; applicationId: string } => {\n const payload = JSON.parse(atob(token.split('.')[1]));\n\n return {\n workspaceId: payload.workspaceId,\n applicationId: payload.applicationId,\n };\n};\n\n// Returns the public URL for a file in the app's public/ directory.\n// Works in both logic functions and front components.\n// The path is relative to the public/ folder (e.g. \"images/logo.png\").\nexport const getPublicAssetUrl = (path: string): string => {\n const apiUrl = process.env[DEFAULT_API_URL_NAME];\n const token = process.env[DEFAULT_APP_ACCESS_TOKEN_NAME];\n\n if (!apiUrl || !token) {\n throw new Error(\n 'getPublicAssetUrl can only be called from within a logic function or front component',\n );\n }\n\n const { workspaceId, applicationId } = decodeTokenPayload(token);\n const withoutLeadingSlash = path.startsWith('/') ? path.slice(1) : path;\n const withPublicPrefix = withoutLeadingSlash.startsWith('public/')\n ? withoutLeadingSlash\n : `public/${withoutLeadingSlash}`;\n\n const encodedPath = withPublicPrefix\n .split('/')\n .map(encodeURIComponent)\n .join('/');\n\n return `${apiUrl}/public-assets/${workspaceId}/${applicationId}/${encodedPath}`;\n};\n"],"mappings":"mEACA,IAAwC,EAAI,iBAAkB,EAAI,0BCI5D,EACJ,GACmD,CACnD,IAAM,EAAU,KAAK,MAAM,KAAK,EAAM,MAAM,GAAG,EAAE,EAAE,CAAC,EAEpD,MAAO,CACL,YAAa,EAAQ,YACrB,cAAe,EAAQ,aACzB,CACF,EAKa,EAAqB,GAAyB,CACzD,IAAM,EAAS,QAAQ,IAAI,GACrB,EAAQ,QAAQ,IAAI,GAE1B,GAAI,CAAC,GAAU,CAAC,EACd,MAAU,MACR,sFACF,EAGF,GAAM,CAAE,cAAa,iBAAkB,EAAmB,CAAK,EACzD,EAAsB,EAAK,WAAW,GAAG,EAAI,EAAK,MAAM,CAAC,EAAI,EAUnE,MAAO,GAAG,EAAO,iBAAiB,EAAY,GAAG,EAAc,IATtC,EAAoB,WAAW,SAAS,EAC7D,EACA,UAAU,KAGX,MAAM,GAAG,EACT,IAAI,kBAAkB,EACtB,KAAK,GAE0D,GACpE"}
1
+ {"version":3,"file":"index.cjs","names":["e","n","e"],"sources":["../../../twenty-shared/dist/ViewKey-Dib-Wyry.mjs","../../../twenty-shared/dist/application.mjs","../../src/sdk/utils/get-public-asset-url.ts","../../../twenty-shared/dist/isDefined-Dtu5EYqP.mjs"],"sourcesContent":["//#region src/types/ViewKey.ts\nvar e = /* @__PURE__ */ function(e) {\n\treturn e.INDEX = \"INDEX\", e;\n}({});\n//#endregion\nexport { e as t };\n","import { t as e } from \"./ViewKey-Dib-Wyry.mjs\";\nimport { v5 as t } from \"uuid\";\n//#region src/application/constants/AssetDirectory.ts\nvar n = \"public\", r = \"TWENTY_API_KEY\", i = \"TWENTY_API_URL\", a = \"TWENTY_APP_ACCESS_TOKEN\", o = \"TWENTY_FUNCTIONS_URL\", s = \"generated\", c = { js: \"import { createRequire as __createRequire } from 'module';\\nconst require = __createRequire(import.meta.url);\" }, l = \".twenty/output\", u = \"Standard\", d = \"20202020-64aa-4b6f-b003-9c74b97cee20\", f = ({ entityNamespace: e, value: n, applicationUniversalIdentifier: r }) => t(`${e}:${n}`, r), p = ({ applicationUniversalIdentifier: e, name: t }) => f({\n\tentityNamespace: \"agent\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), m = ({ applicationUniversalIdentifier: e, key: t }) => f({\n\tentityNamespace: \"applicationVariable\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), h = \"navigation\", g = ({ applicationUniversalIdentifier: e, engineComponentKey: t }) => f({\n\tentityNamespace: \"commandMenuItem\",\n\tvalue: `GLOBAL:${t}`,\n\tapplicationUniversalIdentifier: e\n}), _ = ({ applicationUniversalIdentifier: e, engineComponentKey: t }) => f({\n\tentityNamespace: \"commandMenuItem\",\n\tvalue: `GLOBAL_OBJECT_CONTEXT:${t}`,\n\tapplicationUniversalIdentifier: e\n}), v = ({ applicationUniversalIdentifier: e, engineComponentKey: t, objectUniversalIdentifier: n }) => f({\n\tentityNamespace: \"commandMenuItem\",\n\tvalue: `RECORD_SELECTION:${t}:${n ?? \"\"}`,\n\tapplicationUniversalIdentifier: e\n}), y = ({ applicationUniversalIdentifier: e, objectUniversalIdentifier: t }) => f({\n\tentityNamespace: \"commandMenuItem\",\n\tvalue: `${t}:${h}`,\n\tapplicationUniversalIdentifier: e\n}), b = ({ applicationUniversalIdentifier: e, name: t }) => f({\n\tentityNamespace: \"connectionProvider\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), x = ({ applicationUniversalIdentifier: e, roleUniversalIdentifier: t, fieldUniversalIdentifier: n }) => f({\n\tentityNamespace: \"fieldPermission\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), S = ({ applicationUniversalIdentifier: e, objectUniversalIdentifier: t, name: n }) => f({\n\tentityNamespace: \"fieldMetadata\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), C = ({ applicationUniversalIdentifier: e, componentName: t }) => f({\n\tentityNamespace: \"frontComponent\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), w = ({ applicationUniversalIdentifier: e, objectUniversalIdentifier: t, name: n }) => f({\n\tentityNamespace: \"index\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), T = ({ applicationUniversalIdentifier: e, name: t }) => f({\n\tentityNamespace: \"logicFunction\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), E = ({ applicationUniversalIdentifier: e, name: t }) => f({\n\tentityNamespace: \"navigationMenuItem\",\n\tvalue: `FOLDER:${t}`,\n\tapplicationUniversalIdentifier: e\n}), D = ({ applicationUniversalIdentifier: e, objectUniversalIdentifier: t }) => f({\n\tentityNamespace: \"navigationMenuItem\",\n\tvalue: `OBJECT:${t}`,\n\tapplicationUniversalIdentifier: e\n}), O = ({ applicationUniversalIdentifier: e, viewUniversalIdentifier: t }) => f({\n\tentityNamespace: \"navigationMenuItem\",\n\tvalue: `VIEW:${t}`,\n\tapplicationUniversalIdentifier: e\n}), k = ({ applicationUniversalIdentifier: e, link: t }) => f({\n\tentityNamespace: \"navigationMenuItem\",\n\tvalue: `LINK:${t}`,\n\tapplicationUniversalIdentifier: e\n}), A = ({ applicationUniversalIdentifier: e, roleUniversalIdentifier: t, objectUniversalIdentifier: n }) => f({\n\tentityNamespace: \"objectPermission\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), j = ({ applicationUniversalIdentifier: e, nameSingular: t }) => f({\n\tentityNamespace: \"objectMetadata\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), M = ({ applicationUniversalIdentifier: e, pageLayoutUniversalIdentifier: t, title: n }) => f({\n\tentityNamespace: \"pageLayoutTab\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), N = \"RECORD_PAGE\", P = ({ applicationUniversalIdentifier: e, objectUniversalIdentifier: t, name: n }) => f({\n\tentityNamespace: \"pageLayout\",\n\tvalue: t ? `${t}:${n}` : n,\n\tapplicationUniversalIdentifier: e\n}), F = ({ applicationUniversalIdentifier: e, objectUniversalIdentifier: t }) => f({\n\tentityNamespace: \"pageLayout\",\n\tvalue: `${t}:${N}`,\n\tapplicationUniversalIdentifier: e\n}), I = ({ applicationUniversalIdentifier: e, pageLayoutTabUniversalIdentifier: t, title: n }) => f({\n\tentityNamespace: \"pageLayoutWidget\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), L = ({ applicationUniversalIdentifier: e, key: t }) => f({\n\tentityNamespace: \"permissionFlag\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), R = ({ applicationUniversalIdentifier: e, roleUniversalIdentifier: t, permissionFlagUniversalIdentifier: n }) => f({\n\tentityNamespace: \"rolePermissionFlag\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), z = ({ applicationUniversalIdentifier: e, label: t }) => f({\n\tentityNamespace: \"role\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), B = ({ applicationUniversalIdentifier: e, fieldMetadataUniversalIdentifier: t }) => f({\n\tentityNamespace: \"searchFieldMetadata\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), V = ({ applicationUniversalIdentifier: e, fieldUniversalIdentifier: t, value: n }) => f({\n\tentityNamespace: \"selectOption\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), H = ({ applicationUniversalIdentifier: e, name: t }) => f({\n\tentityNamespace: \"skill\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), U = ({ applicationUniversalIdentifier: e, viewUniversalIdentifier: t, name: n }) => f({\n\tentityNamespace: \"viewFieldGroup\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), W = ({ applicationUniversalIdentifier: e, viewUniversalIdentifier: t, fieldMetadataUniversalIdentifier: n }) => f({\n\tentityNamespace: \"viewField\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), G = ({ applicationUniversalIdentifier: e, viewUniversalIdentifier: t, fieldMetadataUniversalIdentifier: n, operand: r, subFieldName: i }) => f({\n\tentityNamespace: \"viewFilter\",\n\tvalue: `${t}:${n}:${r}:${i ?? \"\"}`,\n\tapplicationUniversalIdentifier: e\n}), K = ({ applicationUniversalIdentifier: e, viewUniversalIdentifier: t, fieldValue: n }) => f({\n\tentityNamespace: \"viewGroup\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), q = ({ applicationUniversalIdentifier: e, viewUniversalIdentifier: t, fieldMetadataUniversalIdentifier: n }) => f({\n\tentityNamespace: \"viewSort\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), J = ({ applicationUniversalIdentifier: e, objectUniversalIdentifier: t, name: n }) => f({\n\tentityNamespace: \"view\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), Y = ({ applicationUniversalIdentifier: t, objectUniversalIdentifier: n }) => f({\n\tentityNamespace: \"view\",\n\tvalue: `${n}:${e.INDEX}`,\n\tapplicationUniversalIdentifier: t\n}), X = ({ applicationUniversalIdentifier: e, pageLayoutWidgetUniversalIdentifier: t }) => f({\n\tentityNamespace: \"view\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), Z = /* @__PURE__ */ function(e) {\n\treturn e.Object = \"object\", e.Field = \"field\", e.LogicFunction = \"logicFunction\", e.FrontComponent = \"frontComponent\", e.Role = \"role\", e.Skill = \"skill\", e.Agent = \"agent\", e.ConnectionProvider = \"connectionProvider\", e.View = \"view\", e.ViewField = \"viewField\", e.NavigationMenuItem = \"navigationMenuItem\", e.PageLayout = \"pageLayout\", e.PageLayoutTab = \"pageLayoutTab\", e.CommandMenuItem = \"commandMenuItem\", e;\n}({});\n//#endregion\nexport { n as ASSETS_DIR, r as DEFAULT_API_KEY_NAME, i as DEFAULT_API_URL_NAME, a as DEFAULT_APP_ACCESS_TOKEN_NAME, o as DEFAULT_FUNCTIONS_URL_NAME, s as GENERATED_DIR, c as NODE_ESM_CJS_BANNER, l as OUTPUT_DIR, Z as SyncableEntity, u as TWENTY_STANDARD_APPLICATION_NAME, d as TWENTY_STANDARD_APPLICATION_UNIVERSAL_IDENTIFIER, f as computeDeterministicUuid, p as getAgentUniversalIdentifier, m as getApplicationVariableUniversalIdentifier, b as getConnectionProviderUniversalIdentifier, x as getFieldPermissionUniversalIdentifier, S as getFieldUniversalIdentifier, X as getFieldsWidgetViewUniversalIdentifier, E as getFolderNavigationMenuItemUniversalIdentifier, C as getFrontComponentUniversalIdentifier, g as getGlobalCommandMenuItemUniversalIdentifier, _ as getGlobalObjectContextCommandMenuItemUniversalIdentifier, w as getIndexUniversalIdentifier, Y as getIndexViewUniversalIdentifier, k as getLinkNavigationMenuItemUniversalIdentifier, T as getLogicFunctionUniversalIdentifier, y as getNavigationCommandUniversalIdentifier, D as getObjectNavigationMenuItemUniversalIdentifier, A as getObjectPermissionUniversalIdentifier, j as getObjectUniversalIdentifier, M as getPageLayoutTabUniversalIdentifier, P as getPageLayoutUniversalIdentifier, I as getPageLayoutWidgetUniversalIdentifier, L as getPermissionFlagUniversalIdentifier, F as getRecordPageLayoutUniversalIdentifier, v as getRecordSelectionCommandMenuItemUniversalIdentifier, R as getRolePermissionFlagUniversalIdentifier, z as getRoleUniversalIdentifier, B as getSearchFieldUniversalIdentifier, V as getSelectOptionUniversalIdentifier, H as getSkillUniversalIdentifier, U as getViewFieldGroupUniversalIdentifier, W as getViewFieldUniversalIdentifier, G as getViewFilterUniversalIdentifier, K as getViewGroupUniversalIdentifier, O as getViewNavigationMenuItemUniversalIdentifier, q as getViewSortUniversalIdentifier, J as getViewUniversalIdentifier };\n","import {\n DEFAULT_API_URL_NAME,\n DEFAULT_APP_ACCESS_TOKEN_NAME,\n} from 'twenty-shared/application';\n\nconst decodeTokenPayload = (\n token: string,\n): { workspaceId: string; applicationId: string } => {\n const payload = JSON.parse(atob(token.split('.')[1]));\n\n return {\n workspaceId: payload.workspaceId,\n applicationId: payload.applicationId,\n };\n};\n\n// Returns the public URL for a file in the app's public/ directory.\n// Works in both logic functions and front components.\n// The path is relative to the public/ folder (e.g. \"images/logo.png\").\nexport const getPublicAssetUrl = (path: string): string => {\n const apiUrl = process.env[DEFAULT_API_URL_NAME];\n const token = process.env[DEFAULT_APP_ACCESS_TOKEN_NAME];\n\n if (!apiUrl || !token) {\n throw new Error(\n 'getPublicAssetUrl can only be called from within a logic function or front component',\n );\n }\n\n const { workspaceId, applicationId } = decodeTokenPayload(token);\n const withoutLeadingSlash = path.startsWith('/') ? path.slice(1) : path;\n const withPublicPrefix = withoutLeadingSlash.startsWith('public/')\n ? withoutLeadingSlash\n : `public/${withoutLeadingSlash}`;\n\n const encodedPath = withPublicPrefix\n .split('/')\n .map(encodeURIComponent)\n .join('/');\n\n return `${apiUrl}/public-assets/${workspaceId}/${applicationId}/${encodedPath}`;\n};\n","import { isNull as e, isUndefined as t } from \"@sniptt/guards\";\n//#region src/utils/validation/isDefined.ts\nvar n = (n) => !t(n) && !e(n);\n//#endregion\nexport { n as t };\n"],"mappings":"mHACA,ICEwC,EAAI,iBAAkB,EAAI,0BCE5D,EACJ,GACmD,CACnD,IAAM,EAAU,KAAK,MAAM,KAAK,EAAM,MAAM,GAAG,EAAE,EAAE,CAAC,EAEpD,MAAO,CACL,YAAa,EAAQ,YACrB,cAAe,EAAQ,aACzB,CACF,EAKa,EAAqB,GAAyB,CACzD,IAAM,EAAS,QAAQ,IAAI,GACrB,EAAQ,QAAQ,IAAI,GAE1B,GAAI,CAAC,GAAU,CAAC,EACd,MAAU,MACR,sFACF,EAGF,GAAM,CAAE,cAAa,iBAAkB,EAAmB,CAAK,EACzD,EAAsB,EAAK,WAAW,GAAG,EAAI,EAAK,MAAM,CAAC,EAAI,EAUnE,MAAO,GAAG,EAAO,iBAAiB,EAAY,GAAG,EAAc,IATtC,EAAoB,WAAW,SAAS,EAC7D,EACA,UAAU,KAGX,MAAM,GAAG,EACT,IAAI,kBAAkB,EACtB,KAAK,GAE0D,GACpE,ECvCI,EAAK,GAAM,EAAA,EAAA,EAAA,aAAG,CAAC,GAAK,EAAA,EAAA,EAAA,QAAG,CAAC"}
@@ -1,3 +1,5 @@
1
1
  declare const getPublicAssetUrl: (path: string) => string;
2
2
 
3
- export { getPublicAssetUrl };
3
+ declare const isDefined: <T>(value: T | null | undefined) => value is NonNullable<T>;
4
+
5
+ export { getPublicAssetUrl, isDefined };
@@ -1,17 +1,19 @@
1
- //#region ../twenty-shared/dist/application.mjs
2
- var e = "TWENTY_API_URL", t = "TWENTY_APP_ACCESS_TOKEN", n = (e) => {
1
+ import "uuid";
2
+ import { isNull as e, isUndefined as t } from "@sniptt/guards";
3
+ //#region ../twenty-shared/dist/ViewKey-Dib-Wyry.mjs
4
+ var n = "TWENTY_API_URL", r = "TWENTY_APP_ACCESS_TOKEN", i = (e) => {
3
5
  let t = JSON.parse(atob(e.split(".")[1]));
4
6
  return {
5
7
  workspaceId: t.workspaceId,
6
8
  applicationId: t.applicationId
7
9
  };
8
- }, r = (r) => {
9
- let i = process.env[e], a = process.env[t];
10
- if (!i || !a) throw Error("getPublicAssetUrl can only be called from within a logic function or front component");
11
- let { workspaceId: o, applicationId: s } = n(a), c = r.startsWith("/") ? r.slice(1) : r;
12
- return `${i}/public-assets/${o}/${s}/${(c.startsWith("public/") ? c : `public/${c}`).split("/").map(encodeURIComponent).join("/")}`;
13
- };
10
+ }, a = (e) => {
11
+ let t = process.env[n], a = process.env[r];
12
+ if (!t || !a) throw Error("getPublicAssetUrl can only be called from within a logic function or front component");
13
+ let { workspaceId: o, applicationId: s } = i(a), c = e.startsWith("/") ? e.slice(1) : e;
14
+ return `${t}/public-assets/${o}/${s}/${(c.startsWith("public/") ? c : `public/${c}`).split("/").map(encodeURIComponent).join("/")}`;
15
+ }, o = (n) => !t(n) && !e(n);
14
16
  //#endregion
15
- export { r as getPublicAssetUrl };
17
+ export { a as getPublicAssetUrl, o as isDefined };
16
18
 
17
19
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../twenty-shared/dist/application.mjs","../../src/sdk/utils/get-public-asset-url.ts"],"sourcesContent":["//#region src/application/constants/AssetDirectory.ts\nvar e = \"public\", t = \"TWENTY_API_KEY\", n = \"TWENTY_API_URL\", r = \"TWENTY_APP_ACCESS_TOKEN\", i = \"generated\", a = { js: \"import { createRequire as __createRequire } from 'module';\\nconst require = __createRequire(import.meta.url);\" }, o = \".twenty/output\", s = \"Standard\", c = \"20202020-64aa-4b6f-b003-9c74b97cee20\", l = /* @__PURE__ */ function(e) {\n\treturn e.Object = \"object\", e.Field = \"field\", e.LogicFunction = \"logicFunction\", e.FrontComponent = \"frontComponent\", e.Role = \"role\", e.Skill = \"skill\", e.Agent = \"agent\", e.ConnectionProvider = \"connectionProvider\", e.View = \"view\", e.ViewField = \"viewField\", e.NavigationMenuItem = \"navigationMenuItem\", e.PageLayout = \"pageLayout\", e.PageLayoutTab = \"pageLayoutTab\", e.CommandMenuItem = \"commandMenuItem\", e;\n}({});\n//#endregion\nexport { e as ASSETS_DIR, t as DEFAULT_API_KEY_NAME, n as DEFAULT_API_URL_NAME, r as DEFAULT_APP_ACCESS_TOKEN_NAME, i as GENERATED_DIR, a as NODE_ESM_CJS_BANNER, o as OUTPUT_DIR, l as SyncableEntity, s as TWENTY_STANDARD_APPLICATION_NAME, c as TWENTY_STANDARD_APPLICATION_UNIVERSAL_IDENTIFIER };\n","import {\n DEFAULT_API_URL_NAME,\n DEFAULT_APP_ACCESS_TOKEN_NAME,\n} from 'twenty-shared/application';\n\nconst decodeTokenPayload = (\n token: string,\n): { workspaceId: string; applicationId: string } => {\n const payload = JSON.parse(atob(token.split('.')[1]));\n\n return {\n workspaceId: payload.workspaceId,\n applicationId: payload.applicationId,\n };\n};\n\n// Returns the public URL for a file in the app's public/ directory.\n// Works in both logic functions and front components.\n// The path is relative to the public/ folder (e.g. \"images/logo.png\").\nexport const getPublicAssetUrl = (path: string): string => {\n const apiUrl = process.env[DEFAULT_API_URL_NAME];\n const token = process.env[DEFAULT_APP_ACCESS_TOKEN_NAME];\n\n if (!apiUrl || !token) {\n throw new Error(\n 'getPublicAssetUrl can only be called from within a logic function or front component',\n );\n }\n\n const { workspaceId, applicationId } = decodeTokenPayload(token);\n const withoutLeadingSlash = path.startsWith('/') ? path.slice(1) : path;\n const withPublicPrefix = withoutLeadingSlash.startsWith('public/')\n ? withoutLeadingSlash\n : `public/${withoutLeadingSlash}`;\n\n const encodedPath = withPublicPrefix\n .split('/')\n .map(encodeURIComponent)\n .join('/');\n\n return `${apiUrl}/public-assets/${workspaceId}/${applicationId}/${encodedPath}`;\n};\n"],"mappings":";AACA,IAAwC,IAAI,kBAAkB,IAAI,2BCI5D,KACJ,MACmD;CACnD,IAAM,IAAU,KAAK,MAAM,KAAK,EAAM,MAAM,GAAG,EAAE,EAAE,CAAC;CAEpD,OAAO;EACL,aAAa,EAAQ;EACrB,eAAe,EAAQ;CACzB;AACF,GAKa,KAAqB,MAAyB;CACzD,IAAM,IAAS,QAAQ,IAAI,IACrB,IAAQ,QAAQ,IAAI;CAE1B,IAAI,CAAC,KAAU,CAAC,GACd,MAAU,MACR,sFACF;CAGF,IAAM,EAAE,gBAAa,qBAAkB,EAAmB,CAAK,GACzD,IAAsB,EAAK,WAAW,GAAG,IAAI,EAAK,MAAM,CAAC,IAAI;CAUnE,OAAO,GAAG,EAAO,iBAAiB,EAAY,GAAG,EAAc,IATtC,EAAoB,WAAW,SAAS,IAC7D,IACA,UAAU,KAGX,MAAM,GAAG,EACT,IAAI,kBAAkB,EACtB,KAAK,GAE0D;AACpE"}
1
+ {"version":3,"file":"index.mjs","names":["n","t","t","e"],"sources":["../../../twenty-shared/dist/ViewKey-Dib-Wyry.mjs","../../../twenty-shared/dist/application.mjs","../../src/sdk/utils/get-public-asset-url.ts","../../../twenty-shared/dist/isDefined-Dtu5EYqP.mjs"],"sourcesContent":["//#region src/types/ViewKey.ts\nvar e = /* @__PURE__ */ function(e) {\n\treturn e.INDEX = \"INDEX\", e;\n}({});\n//#endregion\nexport { e as t };\n","import { t as e } from \"./ViewKey-Dib-Wyry.mjs\";\nimport { v5 as t } from \"uuid\";\n//#region src/application/constants/AssetDirectory.ts\nvar n = \"public\", r = \"TWENTY_API_KEY\", i = \"TWENTY_API_URL\", a = \"TWENTY_APP_ACCESS_TOKEN\", o = \"TWENTY_FUNCTIONS_URL\", s = \"generated\", c = { js: \"import { createRequire as __createRequire } from 'module';\\nconst require = __createRequire(import.meta.url);\" }, l = \".twenty/output\", u = \"Standard\", d = \"20202020-64aa-4b6f-b003-9c74b97cee20\", f = ({ entityNamespace: e, value: n, applicationUniversalIdentifier: r }) => t(`${e}:${n}`, r), p = ({ applicationUniversalIdentifier: e, name: t }) => f({\n\tentityNamespace: \"agent\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), m = ({ applicationUniversalIdentifier: e, key: t }) => f({\n\tentityNamespace: \"applicationVariable\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), h = \"navigation\", g = ({ applicationUniversalIdentifier: e, engineComponentKey: t }) => f({\n\tentityNamespace: \"commandMenuItem\",\n\tvalue: `GLOBAL:${t}`,\n\tapplicationUniversalIdentifier: e\n}), _ = ({ applicationUniversalIdentifier: e, engineComponentKey: t }) => f({\n\tentityNamespace: \"commandMenuItem\",\n\tvalue: `GLOBAL_OBJECT_CONTEXT:${t}`,\n\tapplicationUniversalIdentifier: e\n}), v = ({ applicationUniversalIdentifier: e, engineComponentKey: t, objectUniversalIdentifier: n }) => f({\n\tentityNamespace: \"commandMenuItem\",\n\tvalue: `RECORD_SELECTION:${t}:${n ?? \"\"}`,\n\tapplicationUniversalIdentifier: e\n}), y = ({ applicationUniversalIdentifier: e, objectUniversalIdentifier: t }) => f({\n\tentityNamespace: \"commandMenuItem\",\n\tvalue: `${t}:${h}`,\n\tapplicationUniversalIdentifier: e\n}), b = ({ applicationUniversalIdentifier: e, name: t }) => f({\n\tentityNamespace: \"connectionProvider\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), x = ({ applicationUniversalIdentifier: e, roleUniversalIdentifier: t, fieldUniversalIdentifier: n }) => f({\n\tentityNamespace: \"fieldPermission\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), S = ({ applicationUniversalIdentifier: e, objectUniversalIdentifier: t, name: n }) => f({\n\tentityNamespace: \"fieldMetadata\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), C = ({ applicationUniversalIdentifier: e, componentName: t }) => f({\n\tentityNamespace: \"frontComponent\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), w = ({ applicationUniversalIdentifier: e, objectUniversalIdentifier: t, name: n }) => f({\n\tentityNamespace: \"index\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), T = ({ applicationUniversalIdentifier: e, name: t }) => f({\n\tentityNamespace: \"logicFunction\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), E = ({ applicationUniversalIdentifier: e, name: t }) => f({\n\tentityNamespace: \"navigationMenuItem\",\n\tvalue: `FOLDER:${t}`,\n\tapplicationUniversalIdentifier: e\n}), D = ({ applicationUniversalIdentifier: e, objectUniversalIdentifier: t }) => f({\n\tentityNamespace: \"navigationMenuItem\",\n\tvalue: `OBJECT:${t}`,\n\tapplicationUniversalIdentifier: e\n}), O = ({ applicationUniversalIdentifier: e, viewUniversalIdentifier: t }) => f({\n\tentityNamespace: \"navigationMenuItem\",\n\tvalue: `VIEW:${t}`,\n\tapplicationUniversalIdentifier: e\n}), k = ({ applicationUniversalIdentifier: e, link: t }) => f({\n\tentityNamespace: \"navigationMenuItem\",\n\tvalue: `LINK:${t}`,\n\tapplicationUniversalIdentifier: e\n}), A = ({ applicationUniversalIdentifier: e, roleUniversalIdentifier: t, objectUniversalIdentifier: n }) => f({\n\tentityNamespace: \"objectPermission\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), j = ({ applicationUniversalIdentifier: e, nameSingular: t }) => f({\n\tentityNamespace: \"objectMetadata\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), M = ({ applicationUniversalIdentifier: e, pageLayoutUniversalIdentifier: t, title: n }) => f({\n\tentityNamespace: \"pageLayoutTab\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), N = \"RECORD_PAGE\", P = ({ applicationUniversalIdentifier: e, objectUniversalIdentifier: t, name: n }) => f({\n\tentityNamespace: \"pageLayout\",\n\tvalue: t ? `${t}:${n}` : n,\n\tapplicationUniversalIdentifier: e\n}), F = ({ applicationUniversalIdentifier: e, objectUniversalIdentifier: t }) => f({\n\tentityNamespace: \"pageLayout\",\n\tvalue: `${t}:${N}`,\n\tapplicationUniversalIdentifier: e\n}), I = ({ applicationUniversalIdentifier: e, pageLayoutTabUniversalIdentifier: t, title: n }) => f({\n\tentityNamespace: \"pageLayoutWidget\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), L = ({ applicationUniversalIdentifier: e, key: t }) => f({\n\tentityNamespace: \"permissionFlag\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), R = ({ applicationUniversalIdentifier: e, roleUniversalIdentifier: t, permissionFlagUniversalIdentifier: n }) => f({\n\tentityNamespace: \"rolePermissionFlag\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), z = ({ applicationUniversalIdentifier: e, label: t }) => f({\n\tentityNamespace: \"role\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), B = ({ applicationUniversalIdentifier: e, fieldMetadataUniversalIdentifier: t }) => f({\n\tentityNamespace: \"searchFieldMetadata\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), V = ({ applicationUniversalIdentifier: e, fieldUniversalIdentifier: t, value: n }) => f({\n\tentityNamespace: \"selectOption\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), H = ({ applicationUniversalIdentifier: e, name: t }) => f({\n\tentityNamespace: \"skill\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), U = ({ applicationUniversalIdentifier: e, viewUniversalIdentifier: t, name: n }) => f({\n\tentityNamespace: \"viewFieldGroup\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), W = ({ applicationUniversalIdentifier: e, viewUniversalIdentifier: t, fieldMetadataUniversalIdentifier: n }) => f({\n\tentityNamespace: \"viewField\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), G = ({ applicationUniversalIdentifier: e, viewUniversalIdentifier: t, fieldMetadataUniversalIdentifier: n, operand: r, subFieldName: i }) => f({\n\tentityNamespace: \"viewFilter\",\n\tvalue: `${t}:${n}:${r}:${i ?? \"\"}`,\n\tapplicationUniversalIdentifier: e\n}), K = ({ applicationUniversalIdentifier: e, viewUniversalIdentifier: t, fieldValue: n }) => f({\n\tentityNamespace: \"viewGroup\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), q = ({ applicationUniversalIdentifier: e, viewUniversalIdentifier: t, fieldMetadataUniversalIdentifier: n }) => f({\n\tentityNamespace: \"viewSort\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), J = ({ applicationUniversalIdentifier: e, objectUniversalIdentifier: t, name: n }) => f({\n\tentityNamespace: \"view\",\n\tvalue: `${t}:${n}`,\n\tapplicationUniversalIdentifier: e\n}), Y = ({ applicationUniversalIdentifier: t, objectUniversalIdentifier: n }) => f({\n\tentityNamespace: \"view\",\n\tvalue: `${n}:${e.INDEX}`,\n\tapplicationUniversalIdentifier: t\n}), X = ({ applicationUniversalIdentifier: e, pageLayoutWidgetUniversalIdentifier: t }) => f({\n\tentityNamespace: \"view\",\n\tvalue: t,\n\tapplicationUniversalIdentifier: e\n}), Z = /* @__PURE__ */ function(e) {\n\treturn e.Object = \"object\", e.Field = \"field\", e.LogicFunction = \"logicFunction\", e.FrontComponent = \"frontComponent\", e.Role = \"role\", e.Skill = \"skill\", e.Agent = \"agent\", e.ConnectionProvider = \"connectionProvider\", e.View = \"view\", e.ViewField = \"viewField\", e.NavigationMenuItem = \"navigationMenuItem\", e.PageLayout = \"pageLayout\", e.PageLayoutTab = \"pageLayoutTab\", e.CommandMenuItem = \"commandMenuItem\", e;\n}({});\n//#endregion\nexport { n as ASSETS_DIR, r as DEFAULT_API_KEY_NAME, i as DEFAULT_API_URL_NAME, a as DEFAULT_APP_ACCESS_TOKEN_NAME, o as DEFAULT_FUNCTIONS_URL_NAME, s as GENERATED_DIR, c as NODE_ESM_CJS_BANNER, l as OUTPUT_DIR, Z as SyncableEntity, u as TWENTY_STANDARD_APPLICATION_NAME, d as TWENTY_STANDARD_APPLICATION_UNIVERSAL_IDENTIFIER, f as computeDeterministicUuid, p as getAgentUniversalIdentifier, m as getApplicationVariableUniversalIdentifier, b as getConnectionProviderUniversalIdentifier, x as getFieldPermissionUniversalIdentifier, S as getFieldUniversalIdentifier, X as getFieldsWidgetViewUniversalIdentifier, E as getFolderNavigationMenuItemUniversalIdentifier, C as getFrontComponentUniversalIdentifier, g as getGlobalCommandMenuItemUniversalIdentifier, _ as getGlobalObjectContextCommandMenuItemUniversalIdentifier, w as getIndexUniversalIdentifier, Y as getIndexViewUniversalIdentifier, k as getLinkNavigationMenuItemUniversalIdentifier, T as getLogicFunctionUniversalIdentifier, y as getNavigationCommandUniversalIdentifier, D as getObjectNavigationMenuItemUniversalIdentifier, A as getObjectPermissionUniversalIdentifier, j as getObjectUniversalIdentifier, M as getPageLayoutTabUniversalIdentifier, P as getPageLayoutUniversalIdentifier, I as getPageLayoutWidgetUniversalIdentifier, L as getPermissionFlagUniversalIdentifier, F as getRecordPageLayoutUniversalIdentifier, v as getRecordSelectionCommandMenuItemUniversalIdentifier, R as getRolePermissionFlagUniversalIdentifier, z as getRoleUniversalIdentifier, B as getSearchFieldUniversalIdentifier, V as getSelectOptionUniversalIdentifier, H as getSkillUniversalIdentifier, U as getViewFieldGroupUniversalIdentifier, W as getViewFieldUniversalIdentifier, G as getViewFilterUniversalIdentifier, K as getViewGroupUniversalIdentifier, O as getViewNavigationMenuItemUniversalIdentifier, q as getViewSortUniversalIdentifier, J as getViewUniversalIdentifier };\n","import {\n DEFAULT_API_URL_NAME,\n DEFAULT_APP_ACCESS_TOKEN_NAME,\n} from 'twenty-shared/application';\n\nconst decodeTokenPayload = (\n token: string,\n): { workspaceId: string; applicationId: string } => {\n const payload = JSON.parse(atob(token.split('.')[1]));\n\n return {\n workspaceId: payload.workspaceId,\n applicationId: payload.applicationId,\n };\n};\n\n// Returns the public URL for a file in the app's public/ directory.\n// Works in both logic functions and front components.\n// The path is relative to the public/ folder (e.g. \"images/logo.png\").\nexport const getPublicAssetUrl = (path: string): string => {\n const apiUrl = process.env[DEFAULT_API_URL_NAME];\n const token = process.env[DEFAULT_APP_ACCESS_TOKEN_NAME];\n\n if (!apiUrl || !token) {\n throw new Error(\n 'getPublicAssetUrl can only be called from within a logic function or front component',\n );\n }\n\n const { workspaceId, applicationId } = decodeTokenPayload(token);\n const withoutLeadingSlash = path.startsWith('/') ? path.slice(1) : path;\n const withPublicPrefix = withoutLeadingSlash.startsWith('public/')\n ? withoutLeadingSlash\n : `public/${withoutLeadingSlash}`;\n\n const encodedPath = withPublicPrefix\n .split('/')\n .map(encodeURIComponent)\n .join('/');\n\n return `${apiUrl}/public-assets/${workspaceId}/${applicationId}/${encodedPath}`;\n};\n","import { isNull as e, isUndefined as t } from \"@sniptt/guards\";\n//#region src/utils/validation/isDefined.ts\nvar n = (n) => !t(n) && !e(n);\n//#endregion\nexport { n as t };\n"],"mappings":";;;AACA,ICEwC,IAAI,kBAAkB,IAAI,2BCE5D,KACJ,MACmD;CACnD,IAAM,IAAU,KAAK,MAAM,KAAK,EAAM,MAAM,GAAG,EAAE,EAAE,CAAC;CAEpD,OAAO;EACL,aAAa,EAAQ;EACrB,eAAe,EAAQ;CACzB;AACF,GAKa,KAAqB,MAAyB;CACzD,IAAM,IAAS,QAAQ,IAAI,IACrB,IAAQ,QAAQ,IAAI;CAE1B,IAAI,CAAC,KAAU,CAAC,GACd,MAAU,MACR,sFACF;CAGF,IAAM,EAAE,gBAAa,qBAAkB,EAAmB,CAAK,GACzD,IAAsB,EAAK,WAAW,GAAG,IAAI,EAAK,MAAM,CAAC,IAAI;CAUnE,OAAO,GAAG,EAAO,iBAAiB,EAAY,GAAG,EAAc,IATtC,EAAoB,WAAW,SAAS,IAC7D,IACA,UAAU,KAGX,MAAM,GAAG,EACT,IAAI,kBAAkB,EACtB,KAAK,GAE0D;AACpE,GCvCI,KAAK,MAAM,CAACE,EAAE,CAAC,KAAK,CAACC,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twenty-sdk",
3
- "version": "2.14.0",
3
+ "version": "2.16.0",
4
4
  "sideEffects": false,
5
5
  "bin": {
6
6
  "twenty": "dist/cli.cjs"
@@ -85,8 +85,10 @@
85
85
  "preact": "^10.28.3",
86
86
  "react": "^19.2.0",
87
87
  "react-dom": "^19.2.0",
88
+ "semver": "7.6.3",
89
+ "sharp": "^0.34.5",
88
90
  "tinyglobby": "^0.2.15",
89
- "twenty-client-sdk": "2.14.0",
91
+ "twenty-client-sdk": "2.16.0",
90
92
  "typescript": "^5.9.3",
91
93
  "uuid": "^13.0.2"
92
94
  },
@@ -95,6 +97,7 @@
95
97
  "@types/node": "^24.0.0",
96
98
  "@types/react": "^19.2.0",
97
99
  "@types/react-dom": "^19.2.0",
100
+ "@types/semver": "^7.5.8",
98
101
  "@typescript/native-preview": "^7.0.0-dev.20260116.1",
99
102
  "@vitest/coverage-v8": "^4.0.18",
100
103
  "prettier": "^3.1.1",
@@ -103,7 +106,7 @@
103
106
  "tsc-alias": "^1.8.16",
104
107
  "tsx": "^4.7.0",
105
108
  "twenty-shared": "0.0.0",
106
- "twenty-ui-deprecated": "0.0.0",
109
+ "twenty-ui": "1.0.0-alpha.0",
107
110
  "vite": "^8.0.0",
108
111
  "vite-plugin-dts": "^4.5.4",
109
112
  "vite-tsconfig-paths": "^4.2.1",