twenty-sdk 2.15.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.
- package/dist/{AllIcons-DEGfvqso-PUvdkUZm.mjs → AllIcons-CdbaxNyc-CJcUHQBl.mjs} +317 -317
- package/dist/AllIcons-CdbaxNyc-DR-8e_UM.js +1 -0
- package/dist/assets/halftone-backdrop.png +0 -0
- package/dist/billing/index.cjs +1 -1
- package/dist/billing/index.cjs.map +1 -1
- package/dist/billing/index.mjs +2 -1
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{catalog-sync-DcpUieU5.mjs → catalog-sync-BYM3GqZl.mjs} +1 -1
- package/dist/{catalog-sync-C5Bb1KSh.js → catalog-sync-w6yKppKP.js} +1 -1
- package/dist/cli/utilities/build/common/build-application.d.ts +2 -0
- package/dist/cli/utilities/build/cover/apply-generated-cover.d.ts +9 -0
- package/dist/cli/utilities/build/cover/assets/twenty-logo-mark-path.d.ts +1 -0
- package/dist/cli/utilities/build/cover/generate-cover-image.d.ts +5 -0
- package/dist/cli/utilities/build/cover/generated-asset.type.d.ts +4 -0
- package/dist/cli/utilities/build/cover/generated-cover-path.d.ts +1 -0
- package/dist/cli.cjs +31 -31
- package/dist/cli.mjs +831 -831
- package/dist/define/index.cjs +19 -19
- package/dist/define/index.cjs.map +1 -1
- package/dist/define/index.d.ts +16 -10
- package/dist/define/index.mjs +2280 -980
- package/dist/define/index.mjs.map +1 -1
- package/dist/front-component/index.cjs +1 -1
- package/dist/front-component/index.cjs.map +1 -1
- package/dist/front-component/index.d.ts +1 -0
- package/dist/front-component/index.mjs +2 -2
- package/dist/front-component/index.mjs.map +1 -1
- package/dist/front-component-renderer.cjs +1 -1
- package/dist/get-function-input-schema-GNk3NRLJ-D8x7FINz.js +1 -0
- package/dist/{get-function-input-schema-GNk3NRLJ-oMYSgib9.mjs → get-function-input-schema-GNk3NRLJ-zQkANyT3.mjs} +1 -1
- package/dist/{icon-BSeT8K5G-WVhoiRKN.mjs → icon-DMT-YeKi-C9-AduNa.mjs} +660 -636
- package/dist/icon-DMT-YeKi-Cz0W5sJA.js +1 -0
- package/dist/isDefined-Dtu5EYqP-Dp026Ry1.js +1 -0
- package/dist/logic-function/index.cjs +1 -1
- package/dist/logic-function/index.cjs.map +1 -1
- package/dist/logic-function/index.d.ts +15 -9
- package/dist/logic-function/index.mjs +1 -0
- package/dist/logic-function/index.mjs.map +1 -1
- package/dist/{login-LjERatsq.js → login-D7nyXinY.js} +52 -52
- package/dist/{login-Cm5IBGFm.mjs → login-rU5te3B6.mjs} +6507 -5117
- package/dist/operations.cjs +1 -1
- package/dist/operations.mjs +1 -1
- package/dist/ui/index.cjs +8 -16
- package/dist/ui/index.mjs +5533 -10649
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.mjs +2 -1
- package/dist/utils/index.mjs.map +1 -1
- package/package.json +4 -3
- package/dist/AllIcons-DEGfvqso-DwtvkCyL.js +0 -1
- package/dist/get-function-input-schema-GNk3NRLJ-DMgchWCN.js +0 -1
- package/dist/icon-BSeT8K5G-Cuhg-Bz6.js +0 -1
|
Binary file
|
package/dist/billing/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`TWENTY_API_URL`,t=`TWENTY_APP_ACCESS_TOKEN`,n=5e3,r=async({creditsUsedMicro:r,operationType:i,quantity:a=1,resourceContext:o})=>{let s=process.env[e],c=process.env[t];if(!(!s||!c))try{let e=await fetch(`${s.replace(/\/$/,``)}/app/billing/charge`,{method:`POST`,headers:{Authorization:`Bearer ${c}`,"Content-Type":`application/json`},body:JSON.stringify({creditsUsedMicro:r,quantity:a,operationType:i,resourceContext:o}),signal:AbortSignal.timeout(n)});if(!e.ok){let t=await e.text().catch(()=>``);console.error(`chargeCredits: ${e.status} ${e.statusText}: ${t}`)}}catch(e){console.error(`chargeCredits: ${e instanceof Error?e.message:String(e)}`)}};exports.chargeCredits=r;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("uuid");var e=`TWENTY_API_URL`,t=`TWENTY_APP_ACCESS_TOKEN`,n=5e3,r=async({creditsUsedMicro:r,operationType:i,quantity:a=1,resourceContext:o})=>{let s=process.env[e],c=process.env[t];if(!(!s||!c))try{let e=await fetch(`${s.replace(/\/$/,``)}/app/billing/charge`,{method:`POST`,headers:{Authorization:`Bearer ${c}`,"Content-Type":`application/json`},body:JSON.stringify({creditsUsedMicro:r,quantity:a,operationType:i,resourceContext:o}),signal:AbortSignal.timeout(n)});if(!e.ok){let t=await e.text().catch(()=>``);console.error(`chargeCredits: ${e.status} ${e.statusText}: ${t}`)}}catch(e){console.error(`chargeCredits: ${e instanceof Error?e.message:String(e)}`)}};exports.chargeCredits=r;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../../twenty-shared/dist/application.mjs","../../src/sdk/billing/charge-credits.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 BILLING_CHARGE_TIMEOUT_MS = 5_000;\n\nexport type ChargeCreditsParams = {\n creditsUsedMicro: number;\n operationType: string;\n quantity?: number;\n resourceContext?: string;\n};\n\n// Records credit usage against the running application via the Twenty\n// server's `/app/billing/charge` endpoint. Reads `TWENTY_API_URL` and\n// `TWENTY_APP_ACCESS_TOKEN` from the execution env (injected by the\n// logic-function runtime). No-ops silently when either is missing so\n// local/test runs don't crash. Failures are non-fatal — a billing error\n// never surfaces as a tool failure.\nexport const chargeCredits = async ({\n creditsUsedMicro,\n operationType,\n quantity = 1,\n resourceContext,\n}: ChargeCreditsParams): Promise<void> => {\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 return;\n }\n\n try {\n const response = await fetch(\n `${apiUrl.replace(/\\/$/, '')}/app/billing/charge`,\n {\n method: 'POST',\n headers: {\n Authorization: `Bearer ${token}`,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n creditsUsedMicro,\n quantity,\n operationType,\n resourceContext,\n }),\n signal: AbortSignal.timeout(BILLING_CHARGE_TIMEOUT_MS),\n },\n );\n\n if (!response.ok) {\n const body = await response.text().catch(() => '');\n\n console.error(\n `chargeCredits: ${response.status} ${response.statusText}: ${body}`,\n );\n }\n } catch (error) {\n console.error(\n `chargeCredits: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n};\n"],"mappings":"mEACA,IAAwC,EAAI,iBAAkB,EAAI,0BCI5D,EAA4B,IAerB,EAAgB,MAAO,CAClC,mBACA,gBACA,WAAW,EACX,qBACwC,CACxC,IAAM,EAAS,QAAQ,IAAI,GACrB,EAAQ,QAAQ,IAAI,GAEtB,MAAC,GAAU,CAAC,GAIhB,GAAI,CACF,IAAM,EAAW,MAAM,MACrB,GAAG,EAAO,QAAQ,MAAO,EAAE,EAAE,qBAC7B,CACE,OAAQ,OACR,QAAS,CACP,cAAe,UAAU,IACzB,eAAgB,kBAClB,EACA,KAAM,KAAK,UAAU,CACnB,mBACA,WACA,gBACA,iBACF,CAAC,EACD,OAAQ,YAAY,QAAQ,CAAyB,CACvD,CACF,EAEA,GAAI,CAAC,EAAS,GAAI,CAChB,IAAM,EAAO,MAAM,EAAS,KAAK,EAAE,UAAY,EAAE,EAEjD,QAAQ,MACN,kBAAkB,EAAS,OAAO,GAAG,EAAS,WAAW,IAAI,GAC/D,CACF,CACF,OAAS,EAAO,CACd,QAAQ,MACN,kBAAkB,aAAiB,MAAQ,EAAM,QAAU,OAAO,CAAK,GACzE,CACF,CACF"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../../twenty-shared/dist/ViewKey-Dib-Wyry.mjs","../../../twenty-shared/dist/application.mjs","../../src/sdk/billing/charge-credits.ts"],"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 BILLING_CHARGE_TIMEOUT_MS = 5_000;\n\nexport type ChargeCreditsParams = {\n creditsUsedMicro: number;\n operationType: string;\n quantity?: number;\n resourceContext?: string;\n};\n\n// Records credit usage against the running application via the Twenty\n// server's `/app/billing/charge` endpoint. Reads `TWENTY_API_URL` and\n// `TWENTY_APP_ACCESS_TOKEN` from the execution env (injected by the\n// logic-function runtime). No-ops silently when either is missing so\n// local/test runs don't crash. Failures are non-fatal — a billing error\n// never surfaces as a tool failure.\nexport const chargeCredits = async ({\n creditsUsedMicro,\n operationType,\n quantity = 1,\n resourceContext,\n}: ChargeCreditsParams): Promise<void> => {\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 return;\n }\n\n try {\n const response = await fetch(\n `${apiUrl.replace(/\\/$/, '')}/app/billing/charge`,\n {\n method: 'POST',\n headers: {\n Authorization: `Bearer ${token}`,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n creditsUsedMicro,\n quantity,\n operationType,\n resourceContext,\n }),\n signal: AbortSignal.timeout(BILLING_CHARGE_TIMEOUT_MS),\n },\n );\n\n if (!response.ok) {\n const body = await response.text().catch(() => '');\n\n console.error(\n `chargeCredits: ${response.status} ${response.statusText}: ${body}`,\n );\n }\n } catch (error) {\n console.error(\n `chargeCredits: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n};\n"],"mappings":"mFACA,ICEwC,EAAI,iBAAkB,EAAI,0BCE5D,EAA4B,IAerB,EAAgB,MAAO,CAClC,mBACA,gBACA,WAAW,EACX,qBACwC,CACxC,IAAM,EAAS,QAAQ,IAAI,GACrB,EAAQ,QAAQ,IAAI,GAEtB,MAAC,GAAU,CAAC,GAIhB,GAAI,CACF,IAAM,EAAW,MAAM,MACrB,GAAG,EAAO,QAAQ,MAAO,EAAE,EAAE,qBAC7B,CACE,OAAQ,OACR,QAAS,CACP,cAAe,UAAU,IACzB,eAAgB,kBAClB,EACA,KAAM,KAAK,UAAU,CACnB,mBACA,WACA,gBACA,iBACF,CAAC,EACD,OAAQ,YAAY,QAAQ,CAAyB,CACvD,CACF,EAEA,GAAI,CAAC,EAAS,GAAI,CAChB,IAAM,EAAO,MAAM,EAAS,KAAK,EAAE,UAAY,EAAE,EAEjD,QAAQ,MACN,kBAAkB,EAAS,OAAO,GAAG,EAAS,WAAW,IAAI,GAC/D,CACF,CACF,OAAS,EAAO,CACd,QAAQ,MACN,kBAAkB,aAAiB,MAAQ,EAAM,QAAU,OAAO,CAAK,GACzE,CACF,CACF"}
|
package/dist/billing/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import "uuid";
|
|
2
|
+
//#region ../twenty-shared/dist/ViewKey-Dib-Wyry.mjs
|
|
2
3
|
var e = "TWENTY_API_URL", t = "TWENTY_APP_ACCESS_TOKEN", n = 5e3, r = async ({ creditsUsedMicro: r, operationType: i, quantity: a = 1, resourceContext: o }) => {
|
|
3
4
|
let s = process.env[e], c = process.env[t];
|
|
4
5
|
if (!(!s || !c)) try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../twenty-shared/dist/application.mjs","../../src/sdk/billing/charge-credits.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 BILLING_CHARGE_TIMEOUT_MS = 5_000;\n\nexport type ChargeCreditsParams = {\n creditsUsedMicro: number;\n operationType: string;\n quantity?: number;\n resourceContext?: string;\n};\n\n// Records credit usage against the running application via the Twenty\n// server's `/app/billing/charge` endpoint. Reads `TWENTY_API_URL` and\n// `TWENTY_APP_ACCESS_TOKEN` from the execution env (injected by the\n// logic-function runtime). No-ops silently when either is missing so\n// local/test runs don't crash. Failures are non-fatal — a billing error\n// never surfaces as a tool failure.\nexport const chargeCredits = async ({\n creditsUsedMicro,\n operationType,\n quantity = 1,\n resourceContext,\n}: ChargeCreditsParams): Promise<void> => {\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 return;\n }\n\n try {\n const response = await fetch(\n `${apiUrl.replace(/\\/$/, '')}/app/billing/charge`,\n {\n method: 'POST',\n headers: {\n Authorization: `Bearer ${token}`,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n creditsUsedMicro,\n quantity,\n operationType,\n resourceContext,\n }),\n signal: AbortSignal.timeout(BILLING_CHARGE_TIMEOUT_MS),\n },\n );\n\n if (!response.ok) {\n const body = await response.text().catch(() => '');\n\n console.error(\n `chargeCredits: ${response.status} ${response.statusText}: ${body}`,\n );\n }\n } catch (error) {\n console.error(\n `chargeCredits: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n};\n"],"mappings":";AACA,IAAwC,IAAI,kBAAkB,IAAI,2BCI5D,IAA4B,KAerB,IAAgB,OAAO,EAClC,qBACA,kBACA,cAAW,GACX,yBACwC;CACxC,IAAM,IAAS,QAAQ,IAAI,IACrB,IAAQ,QAAQ,IAAI;CAEtB,OAAC,KAAU,CAAC,IAIhB,IAAI;EACF,IAAM,IAAW,MAAM,MACrB,GAAG,EAAO,QAAQ,OAAO,EAAE,EAAE,sBAC7B;GACE,QAAQ;GACR,SAAS;IACP,eAAe,UAAU;IACzB,gBAAgB;GAClB;GACA,MAAM,KAAK,UAAU;IACnB;IACA;IACA;IACA;GACF,CAAC;GACD,QAAQ,YAAY,QAAQ,CAAyB;EACvD,CACF;EAEA,IAAI,CAAC,EAAS,IAAI;GAChB,IAAM,IAAO,MAAM,EAAS,KAAK,EAAE,YAAY,EAAE;GAEjD,QAAQ,MACN,kBAAkB,EAAS,OAAO,GAAG,EAAS,WAAW,IAAI,GAC/D;EACF;CACF,SAAS,GAAO;EACd,QAAQ,MACN,kBAAkB,aAAiB,QAAQ,EAAM,UAAU,OAAO,CAAK,GACzE;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["t"],"sources":["../../../twenty-shared/dist/ViewKey-Dib-Wyry.mjs","../../../twenty-shared/dist/application.mjs","../../src/sdk/billing/charge-credits.ts"],"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 BILLING_CHARGE_TIMEOUT_MS = 5_000;\n\nexport type ChargeCreditsParams = {\n creditsUsedMicro: number;\n operationType: string;\n quantity?: number;\n resourceContext?: string;\n};\n\n// Records credit usage against the running application via the Twenty\n// server's `/app/billing/charge` endpoint. Reads `TWENTY_API_URL` and\n// `TWENTY_APP_ACCESS_TOKEN` from the execution env (injected by the\n// logic-function runtime). No-ops silently when either is missing so\n// local/test runs don't crash. Failures are non-fatal — a billing error\n// never surfaces as a tool failure.\nexport const chargeCredits = async ({\n creditsUsedMicro,\n operationType,\n quantity = 1,\n resourceContext,\n}: ChargeCreditsParams): Promise<void> => {\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 return;\n }\n\n try {\n const response = await fetch(\n `${apiUrl.replace(/\\/$/, '')}/app/billing/charge`,\n {\n method: 'POST',\n headers: {\n Authorization: `Bearer ${token}`,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n creditsUsedMicro,\n quantity,\n operationType,\n resourceContext,\n }),\n signal: AbortSignal.timeout(BILLING_CHARGE_TIMEOUT_MS),\n },\n );\n\n if (!response.ok) {\n const body = await response.text().catch(() => '');\n\n console.error(\n `chargeCredits: ${response.status} ${response.statusText}: ${body}`,\n );\n }\n } catch (error) {\n console.error(\n `chargeCredits: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n};\n"],"mappings":";;AACA,ICEwC,IAAI,kBAAkB,IAAI,2BCE5D,IAA4B,KAerB,IAAgB,OAAO,EAClC,qBACA,kBACA,cAAW,GACX,yBACwC;CACxC,IAAM,IAAS,QAAQ,IAAI,IACrB,IAAQ,QAAQ,IAAI;CAEtB,OAAC,KAAU,CAAC,IAIhB,IAAI;EACF,IAAM,IAAW,MAAM,MACrB,GAAG,EAAO,QAAQ,OAAO,EAAE,EAAE,sBAC7B;GACE,QAAQ;GACR,SAAS;IACP,eAAe,UAAU;IACzB,gBAAgB;GAClB;GACA,MAAM,KAAK,UAAU;IACnB;IACA;IACA;IACA;GACF,CAAC;GACD,QAAQ,YAAY,QAAQ,CAAyB;EACvD,CACF;EAEA,IAAI,CAAC,EAAS,IAAI;GAChB,IAAM,IAAO,MAAM,EAAS,KAAK,EAAE,YAAY,EAAE;GAEjD,QAAQ,MACN,kBAAkB,EAAS,OAAO,GAAG,EAAS,WAAW,IAAI,GAC/D;EACF;CACF,SAAS,GAAO;EACd,QAAQ,MACN,kBAAkB,aAAiB,QAAQ,EAAM,UAAU,OAAO,CAAK,GACzE;CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./get-front-component-build-plugins-DBupR4cF.js"),t=require("./login-
|
|
1
|
+
const e=require("./get-front-component-build-plugins-DBupR4cF.js"),t=require("./login-D7nyXinY.js");let n=require("chalk");n=e.i(n);var r=class{async execute(e){e.remote&&t.V.setActiveRemote(e.remote);let r=t.V.getActiveRemote();console.log(n.default.blue(`Syncing marketplace catalog on ${r}...`));let i=await new t.L().syncMarketplaceCatalog();i.success||(console.error(n.default.red(`Catalog sync failed: ${i.error instanceof Error?i.error.message:String(i.error)}`)),process.exit(1)),console.log(n.default.green(`✓ Marketplace catalog synced successfully`))}};exports.CatalogSyncCommand=r;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type Manifest } from 'twenty-shared/application';
|
|
2
2
|
import { FileFolder } from 'twenty-shared/types';
|
|
3
|
+
import { type GeneratedAsset } from '../../../../cli/utilities/build/cover/generated-asset.type';
|
|
3
4
|
import { type EntityFilePaths } from '../../../../cli/utilities/build/manifest/manifest-extract-config';
|
|
4
5
|
export type AppBuildOptions = {
|
|
5
6
|
appPath: string;
|
|
6
7
|
manifest: Manifest;
|
|
7
8
|
filePaths: EntityFilePaths;
|
|
9
|
+
generatedAssets?: GeneratedAsset[];
|
|
8
10
|
};
|
|
9
11
|
export type BuiltFileInfo = {
|
|
10
12
|
checksum: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Manifest } from 'twenty-shared/application';
|
|
2
|
+
import { type GeneratedAsset } from '../../../../cli/utilities/build/cover/generated-asset.type';
|
|
3
|
+
export declare const applyGeneratedCover: ({ appPath, manifest, }: {
|
|
4
|
+
appPath: string;
|
|
5
|
+
manifest: Manifest;
|
|
6
|
+
}) => Promise<{
|
|
7
|
+
manifest: Manifest;
|
|
8
|
+
generatedAssets: GeneratedAsset[];
|
|
9
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TWENTY_LOGO_MARK_PATH = "M6.822 14.174c0-2.435 1.996-4.411 4.456-4.411h8.574c.125 0 .241.075.293.19a.31.31 0 0 1-.056.344l-1.88 2.023c-.326.35-.787.552-1.27.552H11.3c-.738 0-1.338.594-1.338 1.325v3.336a.78.78 0 0 1-.783.777H7.61a.78.78 0 0 1-.783-.777v-3.36zM33.5 25.553c0 2.434-1.996 4.411-4.456 4.411h-3.642c-2.46 0-4.454-1.977-4.454-4.411v-6.315c0-.43.16-.842.456-1.16l2.124-2.285a.33.33 0 0 1 .355-.081.32.32 0 0 1 .205.295v9.527c0 .73.598 1.322 1.337 1.322h3.6a1.33 1.33 0 0 0 1.337-1.322V14.197c0-.73-.599-1.325-1.337-1.325H24.84c-.481 0-.938.201-1.265.547L11.088 26.856h7.503a.78.78 0 0 1 .784.778v1.552a.78.78 0 0 1-.784.778H8.481a1.655 1.655 0 0 1-1.662-1.644v-.824c0-.412.156-.809.44-1.114l13.999-15.06a4.9 4.9 0 0 1 3.594-1.56h4.189c2.46 0 4.454 1.977 4.454 4.412v11.379z";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GENERATED_COVER_PATH = "public/cover.generated.png";
|