twenty-sdk 2.37.0 → 2.38.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/billing/index.cjs +3 -3
- package/dist/billing/index.cjs.map +1 -1
- package/dist/billing/index.d.ts +25 -4
- package/dist/billing/index.mjs +495 -464
- package/dist/billing/index.mjs.map +1 -1
- package/dist/catalog-sync-DB_oIbry.js +1 -0
- package/dist/{catalog-sync-mAO3vmdp.mjs → catalog-sync-TFrxc_Y6.mjs} +4 -4
- package/dist/cli/commands/dev/dev-once.d.ts +1 -0
- package/dist/cli/commands/dev/dev.d.ts +1 -0
- package/dist/cli/operations/dev-once.d.ts +1 -0
- package/dist/cli/utilities/api/api-service.d.ts +1 -0
- package/dist/cli/utilities/api/application-api.d.ts +1 -0
- package/dist/cli/utilities/dev/orchestrator/dev-mode-orchestrator.d.ts +1 -0
- package/dist/cli/utilities/dev/orchestrator/steps/format-sync-actions-plan.d.ts +8 -1
- package/dist/cli/utilities/dev/orchestrator/steps/sync-application-orchestrator-step.d.ts +3 -1
- package/dist/cli/utilities/entity/entity-view-template.d.ts +1 -1
- package/dist/cli/utilities/error/parse-server-error.d.ts +1 -0
- package/dist/cli.cjs +30 -30
- package/dist/cli.mjs +5447 -5427
- package/dist/define/index.cjs +14 -14
- package/dist/define/index.cjs.map +1 -1
- package/dist/define/index.d.ts +82 -14
- package/dist/define/index.mjs +5717 -5690
- 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 +23 -6
- package/dist/front-component/index.mjs +2 -2
- package/dist/front-component/index.mjs.map +1 -1
- package/dist/front-component-renderer/build.cjs +1 -1
- package/dist/front-component-renderer/build.mjs +1 -1
- package/dist/{get-front-component-build-plugins-WU9ATS3e.mjs → get-front-component-build-plugins-Bed7hCGi.mjs} +46 -38
- package/dist/{get-front-component-build-plugins-DZIleilT.js → get-front-component-build-plugins-o8cM1FFZ.js} +8 -8
- package/dist/{get-function-input-schema-GNk3NRLJ-DKoJBhuO.js → get-function-input-schema-GNk3NRLJ-A3CmF1qq.js} +1 -1
- package/dist/{get-function-input-schema-GNk3NRLJ-H7iWzfXn.mjs → get-function-input-schema-GNk3NRLJ-BPeB4a-_.mjs} +1 -1
- package/dist/logic-function/index.cjs +4 -4
- package/dist/logic-function/index.cjs.map +1 -1
- package/dist/logic-function/index.d.ts +23 -3
- package/dist/logic-function/index.mjs +26 -12
- package/dist/logic-function/index.mjs.map +1 -1
- package/dist/{login-4PI5lTOa.js → login-2yrPIORt.js} +59 -66
- package/dist/{login-CNByz3vi.mjs → login-QYv7vAbh.mjs} +5348 -5303
- package/dist/operations.cjs +1 -1
- package/dist/operations.mjs +4 -4
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/catalog-sync-Szx_4267.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./get-front-component-build-plugins-
|
|
1
|
+
const e=require("./get-front-component-build-plugins-o8cM1FFZ.js");let t=require("typescript");var n=`TwentyRecord`,r=n=>{let r=n.typeArguments?.[0];if(e.kt(r)&&r.kind===t.SyntaxKind.LiteralType&&r.literal.kind===t.SyntaxKind.StringLiteral)return r.literal.text},i=e=>e.type===`record`?{type:`records`,objectUniversalIdentifier:e.objectUniversalIdentifier}:{type:`array`,items:e},a=o=>{switch(o.kind){case t.SyntaxKind.NumberKeyword:return{type:`number`};case t.SyntaxKind.StringKeyword:return{type:`string`};case t.SyntaxKind.BooleanKeyword:return{type:`boolean`};case t.SyntaxKind.ArrayType:return i(a(o.elementType));case t.SyntaxKind.TypeReference:{let s=o,c=s.typeName.kind===t.SyntaxKind.Identifier?s.typeName.text:void 0;if(c===`Array`||c===`ReadonlyArray`){let t=s.typeArguments?.[0];return i(e.kt(t)?a(t):{})}if(c===n){let t=r(s);if(e.kt(t))return{type:`record`,objectUniversalIdentifier:t}}return{}}case t.SyntaxKind.ObjectKeyword:return{type:`object`};case t.SyntaxKind.TypeLiteral:{let t={};return o.members.forEach(n=>{if(e.kt(n.name)&&e.kt(n.type)){let e=n.name.text;t[e]=a(n.type)}}),{type:`object`,properties:t}}case t.SyntaxKind.UnionType:{let e=o,n=[],r=!0;return e.types.forEach(e=>{if(e.kind===t.SyntaxKind.LiteralType){let i=e.literal;i.kind===t.SyntaxKind.StringLiteral?n.push(i.text):r=!1}else r=!1}),r?{type:`string`,enum:n}:{}}default:return{}}},o=(t,n)=>t.parameters.reduce((t,n)=>{let r=n.type;return e.kt(r)?[...t,a(r)]:[...t,{}]},n),s=n=>n.kind===t.SyntaxKind.FunctionDeclaration?[n]:n.kind===t.SyntaxKind.VariableStatement?n.declarationList.declarations.filter(n=>e.kt(n.initializer)&&n.initializer.kind===t.SyntaxKind.ArrowFunction).map(e=>e.initializer):[],c=e=>{let n=(0,t.createSourceFile)(`temp.ts`,e,t.ScriptTarget.ESNext,!0),r=[];return n.forEachChild(e=>{(e.kind===t.SyntaxKind.FunctionDeclaration||e.kind===t.SyntaxKind.VariableStatement)&&s(e).forEach(e=>{r=o(e,r)})}),r};exports.getFunctionInputSchema=c;
|
|
@@ -2,7 +2,7 @@ import { createRequire as e } from "node:module";
|
|
|
2
2
|
import { fileURLToPath as t } from "node:url";
|
|
3
3
|
import { dirname as n } from "node:path";
|
|
4
4
|
e(import.meta.url), n(t(import.meta.url));
|
|
5
|
-
import {
|
|
5
|
+
import { kt as r } from "./get-front-component-build-plugins-Bed7hCGi.mjs";
|
|
6
6
|
import { ScriptTarget as i, SyntaxKind as a, createSourceFile as o } from "typescript";
|
|
7
7
|
//#region ../twenty-shared/dist/get-function-input-schema-GNk3NRLJ.mjs
|
|
8
8
|
var s = "TwentyRecord", c = (e) => {
|
|
@@ -55,7 +55,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
55
55
|
success
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
`,va=async e=>{let{runAgent:t}=await Q({query:_a,variables:{input:e},caller:`runAgent`});return t},ya=async e=>{let{enqueueJob:t}=await new r.MetadataApiClient().mutation({enqueueJob:{__args:{input:e},enqueued:!0,logicFunctionUniversalIdentifier:!0}});return t},ba=async e=>{let{enqueueJobs:t}=await new r.MetadataApiClient().mutation({enqueueJobs:{__args:{input:e},enqueued:!0,logicFunctionUniversalIdentifier:!0,enqueuedJobsCount:!0}});return t},xa=e=>(0,t.isNonEmptyString)(e)?e[0].toUpperCase()+e.slice(1):``,
|
|
58
|
+
`,va=async e=>{let{runAgent:t}=await Q({query:_a,variables:{input:e},caller:`runAgent`});return t},ya=async e=>{let{enqueueJob:t}=await new r.MetadataApiClient().mutation({enqueueJob:{__args:{input:e},enqueued:!0,logicFunctionUniversalIdentifier:!0,jobId:!0}});return t},ba=async e=>{let{enqueueJobs:t}=await new r.MetadataApiClient().mutation({enqueueJobs:{__args:{input:e},enqueued:!0,logicFunctionUniversalIdentifier:!0,enqueuedJobsCount:!0,jobIds:!0}});return t},xa=async e=>{let{getJobs:t}=await new r.MetadataApiClient().query({getJobs:{__args:{jobIds:e},jobId:!0,state:!0,attemptsMade:!0,failedReason:!0,enqueuedAt:!0,startedAt:!0,finishedAt:!0}});return t},Sa=e=>(0,t.isNonEmptyString)(e)?e[0].toUpperCase()+e.slice(1):``,Ca=e=>({__args:{paging:{first:e.length},filter:{universalIdentifier:{in:e}}},edges:{node:{id:!0,universalIdentifier:!0,nameSingular:!0}}}),wa=async({timelineActivityTypeUniversalIdentifier:t,targetObjectUniversalIdentifier:n,linkedObjectMetadataUniversalIdentifier:a,targetRecordId:o,...s})=>{let c=[...new Set([n,a].filter(e.t))],{timelineActivityTypes:l,objects:u}=await new r.MetadataApiClient().query({timelineActivityTypes:{id:!0,universalIdentifier:!0,isActive:!0},objects:Ca(c)}),d=l.find(({universalIdentifier:e})=>e===t);if(!e.t(d))throw Error(`Timeline activity type ${t} is not installed`);if(!d.isActive)throw Error(`Timeline activity type ${t} is inactive`);let f=new Map(u.edges.map(({node:e})=>[e.universalIdentifier,e])),p=f.get(n);if(!e.t(p))throw Error(`Timeline activity target object ${n} is not installed`);let m=`target${Sa(p.nameSingular)}Id`,h=e.t(a)?f.get(a):void 0;if(e.t(a)&&!e.t(h))throw Error(`Timeline activity linked object ${a} is not installed`);return(await new i.RestApiClient().post(`/rest/timelineActivities`,{...s,timelineActivityTypeId:d.id,linkedObjectMetadataId:h?.id,[m]:o})).data.createTimelineActivity},Ta=`
|
|
59
59
|
query GetAppKeyValue($key: String!, $scope: AppKeyValueScope) {
|
|
60
60
|
appKeyValue(key: $key, scope: $scope) {
|
|
61
61
|
key
|
|
@@ -63,7 +63,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
63
63
|
scope
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
`,
|
|
66
|
+
`,Ea=`
|
|
67
67
|
mutation SetAppKeyValue($input: SetAppKeyValueInput!) {
|
|
68
68
|
setAppKeyValue(input: $input) {
|
|
69
69
|
key
|
|
@@ -71,9 +71,9 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
71
71
|
scope
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
`,
|
|
74
|
+
`,Da=`
|
|
75
75
|
mutation DeleteAppKeyValue($key: String!, $scope: AppKeyValueScope) {
|
|
76
76
|
deleteAppKeyValue(key: $key, scope: $scope)
|
|
77
77
|
}
|
|
78
|
-
`,$=`WORKSPACE`,
|
|
78
|
+
`,$=`WORKSPACE`,Oa={async get(e,t){let{appKeyValue:n}=await Q({query:Ta,variables:{key:e,scope:t?.scope??$},caller:`kv.get`});return n?.value??null},async set(e,t,n){await Q({query:Ea,variables:{input:{key:e,value:t,scope:n?.scope??$}},caller:`kv.set`})},async delete(e,t){let{deleteAppKeyValue:n}=await Q({query:Da,variables:{key:e,scope:t?.scope??$},caller:`kv.delete`});return n}},ka=class{constructor(e,t){this.__twentyHttpResponse=!0,this.body=e,this.status=t?.status,this.headers=t?.headers}};exports.AppConnectionAuthFailedError=ie,exports.Response=ka,exports.RetryableLogicFunctionError=re,exports.createTimelineActivity=wa,exports.enqueueJob=ya,exports.enqueueJobs=ba,exports.findConnectionForRequest=ga,exports.getConnection=pa,exports.getJobs=xa,exports.jsonSchemaToInputSchema=l,exports.kv=Oa,exports.listConnections=ha,exports.runAgent=va;
|
|
79
79
|
//# sourceMappingURL=index.cjs.map
|