twenty-sdk 2.9.0 → 2.9.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.
- package/CHANGELOG.md +25 -0
- package/dist/catalog-sync-BCebNxby.js +1 -0
- package/dist/catalog-sync-Zp1B_jdA.mjs +18 -0
- package/dist/cli/utilities/build/manifest/utils/validate-conditional-availability-usage.d.ts +1 -0
- package/dist/cli/utilities/build/manifest/utils/validate-package-json-dependencies.d.ts +1 -0
- package/dist/cli.cjs +61 -61
- package/dist/cli.mjs +1529 -1515
- package/dist/define/index.cjs +38 -16
- package/dist/define/index.cjs.map +1 -1
- package/dist/define/index.d.ts +691 -6
- package/dist/define/index.mjs +13487 -3478
- package/dist/define/index.mjs.map +1 -1
- package/dist/front-component/index.cjs +37 -15
- package/dist/front-component/index.cjs.map +1 -1
- package/dist/front-component/index.d.ts +1 -135
- package/dist/front-component/index.mjs +12833 -3490
- package/dist/front-component/index.mjs.map +1 -1
- package/dist/get-function-input-schema-DTlcRJz3-Dv2yR3dh.mjs +73 -0
- package/dist/get-function-input-schema-DTlcRJz3-dBL33k9U.js +1 -0
- package/dist/login-oauth-CR6NzLmb.js +340 -0
- package/dist/{login-oauth-DSC3zo9c.mjs → login-oauth-rznAUORX.mjs} +15029 -4882
- package/dist/operations.cjs +1 -1
- package/dist/operations.mjs +2 -2
- package/dist/ui/index.cjs +48 -26
- package/dist/ui/index.mjs +20852 -11479
- package/package.json +11 -9
- package/dist/catalog-sync-CanLpG9v.js +0 -1
- package/dist/catalog-sync-DyCidT5d.mjs +0 -16
- package/dist/get-function-input-schema-BZ7_XyUh-COeGJwHh.js +0 -1
- package/dist/get-function-input-schema-BZ7_XyUh-Dql7-b-j.mjs +0 -62
- package/dist/login-oauth-BESuSxoP.js +0 -298
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { createSourceFile as y, ScriptTarget as p, SyntaxKind as r } from "typescript";
|
|
2
|
+
import { o } from "./login-oauth-rznAUORX.mjs";
|
|
3
|
+
const c = (i) => {
|
|
4
|
+
switch (i.kind) {
|
|
5
|
+
case r.NumberKeyword:
|
|
6
|
+
return { type: "number" };
|
|
7
|
+
case r.StringKeyword:
|
|
8
|
+
return { type: "string" };
|
|
9
|
+
case r.BooleanKeyword:
|
|
10
|
+
return { type: "boolean" };
|
|
11
|
+
case r.ArrayType:
|
|
12
|
+
return {
|
|
13
|
+
type: "array",
|
|
14
|
+
items: c(i.elementType)
|
|
15
|
+
};
|
|
16
|
+
case r.TypeReference: {
|
|
17
|
+
const e = i, t = e.typeName.kind === r.Identifier ? e.typeName.text : void 0;
|
|
18
|
+
if (t === "Array" || t === "ReadonlyArray") {
|
|
19
|
+
const a = e.typeArguments?.[0];
|
|
20
|
+
return {
|
|
21
|
+
type: "array",
|
|
22
|
+
items: o(a) ? c(a) : {}
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return {};
|
|
26
|
+
}
|
|
27
|
+
case r.ObjectKeyword:
|
|
28
|
+
return { type: "object" };
|
|
29
|
+
case r.TypeLiteral: {
|
|
30
|
+
const e = {};
|
|
31
|
+
return i.members.forEach((t) => {
|
|
32
|
+
if (o(t.name) && o(t.type)) {
|
|
33
|
+
const a = t.name.text;
|
|
34
|
+
e[a] = c(t.type);
|
|
35
|
+
}
|
|
36
|
+
}), { type: "object", properties: e };
|
|
37
|
+
}
|
|
38
|
+
case r.UnionType: {
|
|
39
|
+
const e = i, t = [];
|
|
40
|
+
let a = !0;
|
|
41
|
+
return e.types.forEach((n) => {
|
|
42
|
+
if (n.kind === r.LiteralType) {
|
|
43
|
+
const s = n.literal;
|
|
44
|
+
s.kind === r.StringLiteral ? t.push(s.text) : a = !1;
|
|
45
|
+
} else
|
|
46
|
+
a = !1;
|
|
47
|
+
}), a ? { type: "string", enum: t } : {};
|
|
48
|
+
}
|
|
49
|
+
default:
|
|
50
|
+
return {};
|
|
51
|
+
}
|
|
52
|
+
}, l = (i, e) => i.parameters.reduce((t, a) => {
|
|
53
|
+
const n = a.type;
|
|
54
|
+
return o(n) ? [...t, c(n)] : [...t, {}];
|
|
55
|
+
}, e), u = (i) => i.kind === r.FunctionDeclaration ? [i] : i.kind === r.VariableStatement ? i.declarationList.declarations.filter(
|
|
56
|
+
(e) => o(e.initializer) && e.initializer.kind === r.ArrowFunction
|
|
57
|
+
).map((e) => e.initializer) : [], f = (i) => {
|
|
58
|
+
const e = y(
|
|
59
|
+
"temp.ts",
|
|
60
|
+
i,
|
|
61
|
+
p.ESNext,
|
|
62
|
+
!0
|
|
63
|
+
);
|
|
64
|
+
let t = [];
|
|
65
|
+
return e.forEachChild((a) => {
|
|
66
|
+
(a.kind === r.FunctionDeclaration || a.kind === r.VariableStatement) && u(a).forEach((n) => {
|
|
67
|
+
t = l(n, t);
|
|
68
|
+
});
|
|
69
|
+
}), t;
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
f as getFunctionInputSchema
|
|
73
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("typescript"),o=require("./login-oauth-CR6NzLmb.js"),y=r=>{switch(r.kind){case e.SyntaxKind.NumberKeyword:return{type:"number"};case e.SyntaxKind.StringKeyword:return{type:"string"};case e.SyntaxKind.BooleanKeyword:return{type:"boolean"};case e.SyntaxKind.ArrayType:return{type:"array",items:y(r.elementType)};case e.SyntaxKind.TypeReference:{const t=r,n=t.typeName.kind===e.SyntaxKind.Identifier?t.typeName.text:void 0;if(n==="Array"||n==="ReadonlyArray"){const i=t.typeArguments?.[0];return{type:"array",items:o.o(i)?y(i):{}}}return{}}case e.SyntaxKind.ObjectKeyword:return{type:"object"};case e.SyntaxKind.TypeLiteral:{const t={};return r.members.forEach(n=>{if(o.o(n.name)&&o.o(n.type)){const i=n.name.text;t[i]=y(n.type)}}),{type:"object",properties:t}}case e.SyntaxKind.UnionType:{const t=r,n=[];let i=!0;return t.types.forEach(a=>{if(a.kind===e.SyntaxKind.LiteralType){const c=a.literal;c.kind===e.SyntaxKind.StringLiteral?n.push(c.text):i=!1}else i=!1}),i?{type:"string",enum:n}:{}}default:return{}}},d=(r,t)=>r.parameters.reduce((n,i)=>{const a=i.type;return o.o(a)?[...n,y(a)]:[...n,{}]},t),s=r=>r.kind===e.SyntaxKind.FunctionDeclaration?[r]:r.kind===e.SyntaxKind.VariableStatement?r.declarationList.declarations.filter(t=>o.o(t.initializer)&&t.initializer.kind===e.SyntaxKind.ArrowFunction).map(t=>t.initializer):[],u=r=>{const t=e.createSourceFile("temp.ts",r,e.ScriptTarget.ESNext,!0);let n=[];return t.forEachChild(i=>{(i.kind===e.SyntaxKind.FunctionDeclaration||i.kind===e.SyntaxKind.VariableStatement)&&s(i).forEach(a=>{n=d(a,n)})}),n};exports.getFunctionInputSchema=u;
|