@stackone/connect-sdk 1.9.2 → 1.11.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/index.es.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/types/connectors/schemas.d.ts +196 -29
- package/package.json +1 -1
package/dist/index.es.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{StepFunctionName as t,StepFunctionsFactory as e,AUTHENTICATION_SCHEMA as n}from"@stackone/core";import{safeEvaluate as o}from"@stackone/expressions";import{parse as r}from"yaml";import{z as i}from"zod";import{HttpClientManager as s}from"@stackone/transport";import{match as a}from"path-to-regexp";const
|
|
1
|
+
import{StepFunctionName as t,StepFunctionsFactory as e,AUTHENTICATION_SCHEMA as n}from"@stackone/core";import{safeEvaluate as o}from"@stackone/expressions";import{parse as r}from"yaml";import{z as i}from"zod";import{HttpClientManager as s}from"@stackone/transport";import{match as a}from"path-to-regexp";const p=async({block:n,stepFunctionName:o,params:r,buildStepFunction:i=e.build})=>{const s=i({functionName:o}).fn,a=await s({block:n,params:r}),p=o===t.MAP_FIELDS?{[t.MAP_FIELDS.toString()]:{output:{data:a.block.result},errors:a.errors,successful:a.successful}}:{};return{...a.block,steps:{...a?.block?.steps??{},...p}}},c=async({block:t,buildStepFunction:n=e.build})=>{const r=t.operation?.steps||[];let i={...t};const s=Object.keys(r);for(const t of s){const e=r[t].stepFunction,o=n({functionName:e.functionName,version:e.version,validateSchemas:!0}).fn,s=await o({block:i,params:e.params});i={...s.block,steps:{...s.block.steps,[t]:{successful:s.successful,errors:s.errors,output:s.output}}}}const a=t.operation?.result?o(t.operation.result,i):void 0;return{...i,outputs:a}},u=i.object({key:i.string(),label:i.string(),type:i.string(),required:i.boolean().optional(),secret:i.boolean().optional(),placeholder:i.string().optional(),description:i.string().optional(),tooltip:i.string().optional()}),l=i.object({StackOne:i.string(),info:i.object({title:i.string(),version:i.string(),key:i.string(),description:i.string().optional()}),baseUrl:i.string(),authentication:i.record(i.string(),i.object({type:i.string(),label:i.string(),authorization:n,environments:i.object({key:i.string(),name:i.string()}).array(),support:i.object({link:i.string(),description:i.string().optional()}),configFields:u.array().optional(),setupFields:u.array().optional(),testOperationsIds:i.string().array().optional()})).array().optional(),operations:i.object({operationId:i.string(),categories:i.string().array(),operationType:i.string(),schema:i.string().optional(),entrypointUrl:i.string().optional(),entrypointHttpMethod:i.string().optional(),description:i.string(),inputs:i.object({name:i.string(),type:i.string(),required:i.boolean(),description:i.string(),in:i.string()}).array().optional(),fieldConfigs:i.object({targetFieldKey:i.string(),expression:i.string(),type:i.string(),isUnified:i.boolean()}).array(),steps:i.object({stepId:i.string(),description:i.string(),stepFunction:i.object({functionName:i.string(),version:i.string().optional(),parameters:i.record(i.string(),i.unknown())})}).array(),result:i.string()}).array()});function d(t){try{const e=r(t),n=l.parse(e),o={title:n.info.title,version:n.info.version,key:n.info.key,description:n.info.description},i=f(n),s={baseUrl:n.baseUrl,authentication:g(i)},a=m(n,s);return o.operations=a,o.authentication=i,o.categories=y(Object.values(a)),o}catch(t){throw new Error(`Error parsing YAML file: ${t.message}`)}}const g=t=>{const e={};for(const[n,o]of Object.entries(t))if(o&&"object"==typeof o){const{setupFields:t,configFields:r,support:i,testOperationsIds:s,...a}=o;e[n]=g(a)}else e[n]=o;return e},y=t=>{const e=t.reduce(((t,e)=>{for(const n of e.categories)t.add(n);return t}),new Set);return Array.from(e)},f=t=>{const e={};for(const n of t.authentication??[]){const[t]=Object.keys(n),o=n[t].environments.reduce(((e,o)=>{const{key:r,name:i}=o,{environments:s,...a}=n[t];return e[r]={...a,envKey:r,envName:i},e}),{});e[t]=o}return e},m=(t,e)=>t.operations.reduce(((t,n)=>{const o=(t=>t.entrypointUrl&&t.entrypointHttpMethod?`${t.entrypointHttpMethod.toUpperCase()} ${t.entrypointUrl}`:void 0)(n),r=(t=>"list"===t.operationType?`GET /${t.schema}`:`GET /${t.schema}/:id`)(n),i=(t=>"list"===t.operationType?`/${t.schema}`:`/${t.schema}/:id`)(n);return t[o??r]={id:n.operationId,categories:n.categories,description:n.description,operationType:n.operationType,entrypointUrl:n.entrypointUrl??i,entrypointHttpMethod:n.entrypointHttpMethod??"get",inputs:n.inputs,steps:n.steps.reduce(((t,o)=>(t[o.stepId]={id:o.stepId,description:o.description,stepFunction:{functionName:o.stepFunction.functionName,version:o.stepFunction.version,params:{..."request"===o.stepFunction.functionName?e:{},..."map_fields"===o.stepFunction.functionName||"typecast"===o.stepFunction.functionName?{fields:n.fieldConfigs}:{},...o.stepFunction.parameters}}},t)),{}),result:n.result},t}),{}),b=(t,e)=>{if(!t.inputs)return{};const n=k(t.inputs).parse(e);return{...n.headers??{},...n.query??{},...n.path??{},...n.body??{}}},h=t=>{const e={};return t.forEach((t=>{let n;switch(t.type.toLowerCase()){case"string":n=i.string();break;case"number":n=i.number();break;case"boolean":n=i.boolean();break;default:n=i.any()}e[t.name]=t.required?n:n.optional()})),i.object(e)},k=t=>{const e=t.filter((t=>"path"===t.in)),n=t.filter((t=>"query"===t.in)),o=t.filter((t=>"body"===t.in)),r=t.filter((t=>"headers"===t.in));return i.object({path:h(e).optional(),query:h(n).optional(),body:h(o).optional(),headers:h(r).optional()})},v=async({inputs:t,category:e,providerKey:n,authConfigKey:o,environment:r="production",operation:i,accountSecureId:a,projectSecureId:p,credentials:c,logger:u,getHttpClient:l=async()=>s.getInstance()})=>{const d=await l();return{inputs:t,fieldConfigs:[],context:{projectSecureId:p,accountSecureId:a,connector:n,category:e,schema:i.schema?.key,service:"",resource:"",operationType:i.operationType,authenticationType:o,environment:r},operation:i,credentials:c,httpClient:d,logger:u}},j=(t,e,n)=>{const o=n.toUpperCase();if(!t.operations)return;const r=Object.keys(t.operations),i=I(e,o,r);return i?{operation:t.operations?.[i.path],params:i.params}:void 0},F=t=>{const e=t.startsWith("/")?t.slice(1):t;return e.endsWith("/")?e.slice(0,-1):e},I=(t,e,n)=>{const o=F(t);for(const t of n)if(t.startsWith(e)){const n=t.replace(`${e} `,"").trim(),r=a(F(n))(F(o));if(!1!==r)return{path:t,params:r.params}}};export{v as createBlock,p as executeStepFunction,j as getOperationFromUrl,b as parseOperationInputs,d as parseYamlConnector,c as runStepOperation};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("@stackone/core"),e=require("@stackone/expressions"),n=require("yaml"),r=require("zod"),o=require("@stackone/transport"),i=require("path-to-regexp");const s=r.z.object({
|
|
1
|
+
"use strict";var t=require("@stackone/core"),e=require("@stackone/expressions"),n=require("yaml"),r=require("zod"),o=require("@stackone/transport"),i=require("path-to-regexp");const s=r.z.object({key:r.z.string(),label:r.z.string(),type:r.z.string(),required:r.z.boolean().optional(),secret:r.z.boolean().optional(),placeholder:r.z.string().optional(),description:r.z.string().optional(),tooltip:r.z.string().optional()}),a=r.z.object({StackOne:r.z.string(),info:r.z.object({title:r.z.string(),version:r.z.string(),key:r.z.string(),description:r.z.string().optional()}),baseUrl:r.z.string(),authentication:r.z.record(r.z.string(),r.z.object({type:r.z.string(),label:r.z.string(),authorization:t.AUTHENTICATION_SCHEMA,environments:r.z.object({key:r.z.string(),name:r.z.string()}).array(),support:r.z.object({link:r.z.string(),description:r.z.string().optional()}),configFields:s.array().optional(),setupFields:s.array().optional(),testOperationsIds:r.z.string().array().optional()})).array().optional(),operations:r.z.object({operationId:r.z.string(),categories:r.z.string().array(),operationType:r.z.string(),schema:r.z.string().optional(),entrypointUrl:r.z.string().optional(),entrypointHttpMethod:r.z.string().optional(),description:r.z.string(),inputs:r.z.object({name:r.z.string(),type:r.z.string(),required:r.z.boolean(),description:r.z.string(),in:r.z.string()}).array().optional(),fieldConfigs:r.z.object({targetFieldKey:r.z.string(),expression:r.z.string(),type:r.z.string(),isUnified:r.z.boolean()}).array(),steps:r.z.object({stepId:r.z.string(),description:r.z.string(),stepFunction:r.z.object({functionName:r.z.string(),version:r.z.string().optional(),parameters:r.z.record(r.z.string(),r.z.unknown())})}).array(),result:r.z.string()}).array()});const p=t=>{const e={};for(const[n,r]of Object.entries(t))if(r&&"object"==typeof r){const{setupFields:t,configFields:o,support:i,testOperationsIds:s,...a}=r;e[n]=p(a)}else e[n]=r;return e},c=t=>{const e=t.reduce(((t,e)=>{for(const n of e.categories)t.add(n);return t}),new Set);return Array.from(e)},u=t=>{const e={};for(const n of t.authentication??[]){const[t]=Object.keys(n),r=n[t].environments.reduce(((e,r)=>{const{key:o,name:i}=r,{environments:s,...a}=n[t];return e[o]={...a,envKey:o,envName:i},e}),{});e[t]=r}return e},l=(t,e)=>t.operations.reduce(((t,n)=>{const r=(t=>t.entrypointUrl&&t.entrypointHttpMethod?`${t.entrypointHttpMethod.toUpperCase()} ${t.entrypointUrl}`:void 0)(n),o=(t=>"list"===t.operationType?`GET /${t.schema}`:`GET /${t.schema}/:id`)(n),i=(t=>"list"===t.operationType?`/${t.schema}`:`/${t.schema}/:id`)(n);return t[r??o]={id:n.operationId,categories:n.categories,description:n.description,operationType:n.operationType,entrypointUrl:n.entrypointUrl??i,entrypointHttpMethod:n.entrypointHttpMethod??"get",inputs:n.inputs,steps:n.steps.reduce(((t,r)=>(t[r.stepId]={id:r.stepId,description:r.description,stepFunction:{functionName:r.stepFunction.functionName,version:r.stepFunction.version,params:{..."request"===r.stepFunction.functionName?e:{},..."map_fields"===r.stepFunction.functionName||"typecast"===r.stepFunction.functionName?{fields:n.fieldConfigs}:{},...r.stepFunction.parameters}}},t)),{}),result:n.result},t}),{}),d=t=>{const e={};return t.forEach((t=>{let n;switch(t.type.toLowerCase()){case"string":n=r.z.string();break;case"number":n=r.z.number();break;case"boolean":n=r.z.boolean();break;default:n=r.z.any()}e[t.name]=t.required?n:n.optional()})),r.z.object(e)},g=t=>{const e=t.filter((t=>"path"===t.in)),n=t.filter((t=>"query"===t.in)),o=t.filter((t=>"body"===t.in)),i=t.filter((t=>"headers"===t.in));return r.z.object({path:d(e).optional(),query:d(n).optional(),body:d(o).optional(),headers:d(i).optional()})},y=t=>{const e=t.startsWith("/")?t.slice(1):t;return e.endsWith("/")?e.slice(0,-1):e},z=(t,e,n)=>{const r=y(t);for(const t of n)if(t.startsWith(e)){const n=t.replace(`${e} `,"").trim(),o=i.match(y(n))(y(r));if(!1!==o)return{path:t,params:o.params}}};exports.createBlock=async({inputs:t,category:e,providerKey:n,authConfigKey:r,environment:i="production",operation:s,accountSecureId:a,projectSecureId:p,credentials:c,logger:u,getHttpClient:l=async()=>o.HttpClientManager.getInstance()})=>{const d=await l();return{inputs:t,fieldConfigs:[],context:{projectSecureId:p,accountSecureId:a,connector:n,category:e,schema:s.schema?.key,service:"",resource:"",operationType:s.operationType,authenticationType:r,environment:i},operation:s,credentials:c,httpClient:d,logger:u}},exports.executeStepFunction=async({block:e,stepFunctionName:n,params:r,buildStepFunction:o=t.StepFunctionsFactory.build})=>{const i=o({functionName:n}).fn,s=await i({block:e,params:r}),a=n===t.StepFunctionName.MAP_FIELDS?{[t.StepFunctionName.MAP_FIELDS.toString()]:{output:{data:s.block.result},errors:s.errors,successful:s.successful}}:{};return{...s.block,steps:{...s?.block?.steps??{},...a}}},exports.getOperationFromUrl=(t,e,n)=>{const r=n.toUpperCase();if(!t.operations)return;const o=Object.keys(t.operations),i=z(e,r,o);return i?{operation:t.operations?.[i.path],params:i.params}:void 0},exports.parseOperationInputs=(t,e)=>{if(!t.inputs)return{};const n=g(t.inputs).parse(e);return{...n.headers??{},...n.query??{},...n.path??{},...n.body??{}}},exports.parseYamlConnector=function(t){try{const e=n.parse(t),r=a.parse(e),o={title:r.info.title,version:r.info.version,key:r.info.key,description:r.info.description},i=u(r),s={baseUrl:r.baseUrl,authentication:p(i)},d=l(r,s);return o.operations=d,o.authentication=i,o.categories=c(Object.values(d)),o}catch(t){throw new Error(`Error parsing YAML file: ${t.message}`)}},exports.runStepOperation=async({block:n,buildStepFunction:r=t.StepFunctionsFactory.build})=>{const o=n.operation?.steps||[];let i={...n};const s=Object.keys(o);for(const t of s){const e=o[t].stepFunction,n=r({functionName:e.functionName,version:e.version,validateSchemas:!0}).fn,s=await n({block:i,params:e.params});i={...s.block,steps:{...s.block.steps,[t]:{successful:s.successful,errors:s.errors,output:s.output}}}}const a=n.operation?.result?e.safeEvaluate(n.operation.result,i):void 0;return{...i,outputs:a}};
|
|
@@ -6,18 +6,15 @@ export declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
6
6
|
version: z.ZodString;
|
|
7
7
|
key: z.ZodString;
|
|
8
8
|
description: z.ZodOptional<z.ZodString>;
|
|
9
|
-
categories: z.ZodArray<z.ZodString, "many">;
|
|
10
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
key: string;
|
|
11
11
|
title: string;
|
|
12
12
|
version: string;
|
|
13
|
-
key: string;
|
|
14
|
-
categories: string[];
|
|
15
13
|
description?: string | undefined;
|
|
16
14
|
}, {
|
|
15
|
+
key: string;
|
|
17
16
|
title: string;
|
|
18
17
|
version: string;
|
|
19
|
-
key: string;
|
|
20
|
-
categories: string[];
|
|
21
18
|
description?: string | undefined;
|
|
22
19
|
}>;
|
|
23
20
|
baseUrl: z.ZodString;
|
|
@@ -49,7 +46,7 @@ export declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
49
46
|
type: "bearer";
|
|
50
47
|
token: string;
|
|
51
48
|
}>]>;
|
|
52
|
-
environments: z.ZodArray<z.
|
|
49
|
+
environments: z.ZodArray<z.ZodObject<{
|
|
53
50
|
key: z.ZodString;
|
|
54
51
|
name: z.ZodString;
|
|
55
52
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -58,10 +55,77 @@ export declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
58
55
|
}, {
|
|
59
56
|
key: string;
|
|
60
57
|
name: string;
|
|
61
|
-
}
|
|
58
|
+
}>, "many">;
|
|
59
|
+
support: z.ZodObject<{
|
|
60
|
+
link: z.ZodString;
|
|
61
|
+
description: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
link: string;
|
|
64
|
+
description?: string | undefined;
|
|
65
|
+
}, {
|
|
66
|
+
link: string;
|
|
67
|
+
description?: string | undefined;
|
|
68
|
+
}>;
|
|
69
|
+
configFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
70
|
+
key: z.ZodString;
|
|
71
|
+
label: z.ZodString;
|
|
72
|
+
type: z.ZodString;
|
|
73
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
+
secret: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
76
|
+
description: z.ZodOptional<z.ZodString>;
|
|
77
|
+
tooltip: z.ZodOptional<z.ZodString>;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
key: string;
|
|
80
|
+
label: string;
|
|
81
|
+
type: string;
|
|
82
|
+
required?: boolean | undefined;
|
|
83
|
+
secret?: boolean | undefined;
|
|
84
|
+
placeholder?: string | undefined;
|
|
85
|
+
description?: string | undefined;
|
|
86
|
+
tooltip?: string | undefined;
|
|
87
|
+
}, {
|
|
88
|
+
key: string;
|
|
89
|
+
label: string;
|
|
90
|
+
type: string;
|
|
91
|
+
required?: boolean | undefined;
|
|
92
|
+
secret?: boolean | undefined;
|
|
93
|
+
placeholder?: string | undefined;
|
|
94
|
+
description?: string | undefined;
|
|
95
|
+
tooltip?: string | undefined;
|
|
96
|
+
}>, "many">>;
|
|
97
|
+
setupFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
98
|
+
key: z.ZodString;
|
|
99
|
+
label: z.ZodString;
|
|
100
|
+
type: z.ZodString;
|
|
101
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
102
|
+
secret: z.ZodOptional<z.ZodBoolean>;
|
|
103
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
104
|
+
description: z.ZodOptional<z.ZodString>;
|
|
105
|
+
tooltip: z.ZodOptional<z.ZodString>;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
key: string;
|
|
108
|
+
label: string;
|
|
109
|
+
type: string;
|
|
110
|
+
required?: boolean | undefined;
|
|
111
|
+
secret?: boolean | undefined;
|
|
112
|
+
placeholder?: string | undefined;
|
|
113
|
+
description?: string | undefined;
|
|
114
|
+
tooltip?: string | undefined;
|
|
115
|
+
}, {
|
|
116
|
+
key: string;
|
|
117
|
+
label: string;
|
|
118
|
+
type: string;
|
|
119
|
+
required?: boolean | undefined;
|
|
120
|
+
secret?: boolean | undefined;
|
|
121
|
+
placeholder?: string | undefined;
|
|
122
|
+
description?: string | undefined;
|
|
123
|
+
tooltip?: string | undefined;
|
|
124
|
+
}>, "many">>;
|
|
125
|
+
testOperationsIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
62
126
|
}, "strip", z.ZodTypeAny, {
|
|
63
|
-
type: string;
|
|
64
127
|
label: string;
|
|
128
|
+
type: string;
|
|
65
129
|
authorization: {
|
|
66
130
|
type: "basic";
|
|
67
131
|
username: string;
|
|
@@ -71,13 +135,38 @@ export declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
71
135
|
type: "bearer";
|
|
72
136
|
token: string;
|
|
73
137
|
};
|
|
74
|
-
environments:
|
|
138
|
+
environments: {
|
|
75
139
|
key: string;
|
|
76
140
|
name: string;
|
|
77
|
-
}
|
|
141
|
+
}[];
|
|
142
|
+
support: {
|
|
143
|
+
link: string;
|
|
144
|
+
description?: string | undefined;
|
|
145
|
+
};
|
|
146
|
+
configFields?: {
|
|
147
|
+
key: string;
|
|
148
|
+
label: string;
|
|
149
|
+
type: string;
|
|
150
|
+
required?: boolean | undefined;
|
|
151
|
+
secret?: boolean | undefined;
|
|
152
|
+
placeholder?: string | undefined;
|
|
153
|
+
description?: string | undefined;
|
|
154
|
+
tooltip?: string | undefined;
|
|
155
|
+
}[] | undefined;
|
|
156
|
+
setupFields?: {
|
|
157
|
+
key: string;
|
|
158
|
+
label: string;
|
|
159
|
+
type: string;
|
|
160
|
+
required?: boolean | undefined;
|
|
161
|
+
secret?: boolean | undefined;
|
|
162
|
+
placeholder?: string | undefined;
|
|
163
|
+
description?: string | undefined;
|
|
164
|
+
tooltip?: string | undefined;
|
|
165
|
+
}[] | undefined;
|
|
166
|
+
testOperationsIds?: string[] | undefined;
|
|
78
167
|
}, {
|
|
79
|
-
type: string;
|
|
80
168
|
label: string;
|
|
169
|
+
type: string;
|
|
81
170
|
authorization: {
|
|
82
171
|
type: "basic";
|
|
83
172
|
username: string;
|
|
@@ -87,13 +176,39 @@ export declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
87
176
|
type: "bearer";
|
|
88
177
|
token: string;
|
|
89
178
|
};
|
|
90
|
-
environments:
|
|
179
|
+
environments: {
|
|
91
180
|
key: string;
|
|
92
181
|
name: string;
|
|
93
|
-
}
|
|
182
|
+
}[];
|
|
183
|
+
support: {
|
|
184
|
+
link: string;
|
|
185
|
+
description?: string | undefined;
|
|
186
|
+
};
|
|
187
|
+
configFields?: {
|
|
188
|
+
key: string;
|
|
189
|
+
label: string;
|
|
190
|
+
type: string;
|
|
191
|
+
required?: boolean | undefined;
|
|
192
|
+
secret?: boolean | undefined;
|
|
193
|
+
placeholder?: string | undefined;
|
|
194
|
+
description?: string | undefined;
|
|
195
|
+
tooltip?: string | undefined;
|
|
196
|
+
}[] | undefined;
|
|
197
|
+
setupFields?: {
|
|
198
|
+
key: string;
|
|
199
|
+
label: string;
|
|
200
|
+
type: string;
|
|
201
|
+
required?: boolean | undefined;
|
|
202
|
+
secret?: boolean | undefined;
|
|
203
|
+
placeholder?: string | undefined;
|
|
204
|
+
description?: string | undefined;
|
|
205
|
+
tooltip?: string | undefined;
|
|
206
|
+
}[] | undefined;
|
|
207
|
+
testOperationsIds?: string[] | undefined;
|
|
94
208
|
}>>, "many">>;
|
|
95
209
|
operations: z.ZodArray<z.ZodObject<{
|
|
96
210
|
operationId: z.ZodString;
|
|
211
|
+
categories: z.ZodArray<z.ZodString, "many">;
|
|
97
212
|
operationType: z.ZodString;
|
|
98
213
|
schema: z.ZodOptional<z.ZodString>;
|
|
99
214
|
entrypointUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -107,15 +222,15 @@ export declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
107
222
|
in: z.ZodString;
|
|
108
223
|
}, "strip", z.ZodTypeAny, {
|
|
109
224
|
type: string;
|
|
225
|
+
required: boolean;
|
|
110
226
|
description: string;
|
|
111
227
|
name: string;
|
|
112
|
-
required: boolean;
|
|
113
228
|
in: string;
|
|
114
229
|
}, {
|
|
115
230
|
type: string;
|
|
231
|
+
required: boolean;
|
|
116
232
|
description: string;
|
|
117
233
|
name: string;
|
|
118
|
-
required: boolean;
|
|
119
234
|
in: string;
|
|
120
235
|
}>, "many">>;
|
|
121
236
|
fieldConfigs: z.ZodArray<z.ZodObject<{
|
|
@@ -171,6 +286,7 @@ export declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
171
286
|
}, "strip", z.ZodTypeAny, {
|
|
172
287
|
description: string;
|
|
173
288
|
operationId: string;
|
|
289
|
+
categories: string[];
|
|
174
290
|
operationType: string;
|
|
175
291
|
fieldConfigs: {
|
|
176
292
|
type: string;
|
|
@@ -193,14 +309,15 @@ export declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
193
309
|
entrypointHttpMethod?: string | undefined;
|
|
194
310
|
inputs?: {
|
|
195
311
|
type: string;
|
|
312
|
+
required: boolean;
|
|
196
313
|
description: string;
|
|
197
314
|
name: string;
|
|
198
|
-
required: boolean;
|
|
199
315
|
in: string;
|
|
200
316
|
}[] | undefined;
|
|
201
317
|
}, {
|
|
202
318
|
description: string;
|
|
203
319
|
operationId: string;
|
|
320
|
+
categories: string[];
|
|
204
321
|
operationType: string;
|
|
205
322
|
fieldConfigs: {
|
|
206
323
|
type: string;
|
|
@@ -223,25 +340,25 @@ export declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
223
340
|
entrypointHttpMethod?: string | undefined;
|
|
224
341
|
inputs?: {
|
|
225
342
|
type: string;
|
|
343
|
+
required: boolean;
|
|
226
344
|
description: string;
|
|
227
345
|
name: string;
|
|
228
|
-
required: boolean;
|
|
229
346
|
in: string;
|
|
230
347
|
}[] | undefined;
|
|
231
348
|
}>, "many">;
|
|
232
349
|
}, "strip", z.ZodTypeAny, {
|
|
233
350
|
StackOne: string;
|
|
234
351
|
info: {
|
|
352
|
+
key: string;
|
|
235
353
|
title: string;
|
|
236
354
|
version: string;
|
|
237
|
-
key: string;
|
|
238
|
-
categories: string[];
|
|
239
355
|
description?: string | undefined;
|
|
240
356
|
};
|
|
241
357
|
baseUrl: string;
|
|
242
358
|
operations: {
|
|
243
359
|
description: string;
|
|
244
360
|
operationId: string;
|
|
361
|
+
categories: string[];
|
|
245
362
|
operationType: string;
|
|
246
363
|
fieldConfigs: {
|
|
247
364
|
type: string;
|
|
@@ -264,15 +381,15 @@ export declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
264
381
|
entrypointHttpMethod?: string | undefined;
|
|
265
382
|
inputs?: {
|
|
266
383
|
type: string;
|
|
384
|
+
required: boolean;
|
|
267
385
|
description: string;
|
|
268
386
|
name: string;
|
|
269
|
-
required: boolean;
|
|
270
387
|
in: string;
|
|
271
388
|
}[] | undefined;
|
|
272
389
|
}[];
|
|
273
390
|
authentication?: Record<string, {
|
|
274
|
-
type: string;
|
|
275
391
|
label: string;
|
|
392
|
+
type: string;
|
|
276
393
|
authorization: {
|
|
277
394
|
type: "basic";
|
|
278
395
|
username: string;
|
|
@@ -282,24 +399,49 @@ export declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
282
399
|
type: "bearer";
|
|
283
400
|
token: string;
|
|
284
401
|
};
|
|
285
|
-
environments:
|
|
402
|
+
environments: {
|
|
286
403
|
key: string;
|
|
287
404
|
name: string;
|
|
288
|
-
}
|
|
405
|
+
}[];
|
|
406
|
+
support: {
|
|
407
|
+
link: string;
|
|
408
|
+
description?: string | undefined;
|
|
409
|
+
};
|
|
410
|
+
configFields?: {
|
|
411
|
+
key: string;
|
|
412
|
+
label: string;
|
|
413
|
+
type: string;
|
|
414
|
+
required?: boolean | undefined;
|
|
415
|
+
secret?: boolean | undefined;
|
|
416
|
+
placeholder?: string | undefined;
|
|
417
|
+
description?: string | undefined;
|
|
418
|
+
tooltip?: string | undefined;
|
|
419
|
+
}[] | undefined;
|
|
420
|
+
setupFields?: {
|
|
421
|
+
key: string;
|
|
422
|
+
label: string;
|
|
423
|
+
type: string;
|
|
424
|
+
required?: boolean | undefined;
|
|
425
|
+
secret?: boolean | undefined;
|
|
426
|
+
placeholder?: string | undefined;
|
|
427
|
+
description?: string | undefined;
|
|
428
|
+
tooltip?: string | undefined;
|
|
429
|
+
}[] | undefined;
|
|
430
|
+
testOperationsIds?: string[] | undefined;
|
|
289
431
|
}>[] | undefined;
|
|
290
432
|
}, {
|
|
291
433
|
StackOne: string;
|
|
292
434
|
info: {
|
|
435
|
+
key: string;
|
|
293
436
|
title: string;
|
|
294
437
|
version: string;
|
|
295
|
-
key: string;
|
|
296
|
-
categories: string[];
|
|
297
438
|
description?: string | undefined;
|
|
298
439
|
};
|
|
299
440
|
baseUrl: string;
|
|
300
441
|
operations: {
|
|
301
442
|
description: string;
|
|
302
443
|
operationId: string;
|
|
444
|
+
categories: string[];
|
|
303
445
|
operationType: string;
|
|
304
446
|
fieldConfigs: {
|
|
305
447
|
type: string;
|
|
@@ -322,15 +464,15 @@ export declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
322
464
|
entrypointHttpMethod?: string | undefined;
|
|
323
465
|
inputs?: {
|
|
324
466
|
type: string;
|
|
467
|
+
required: boolean;
|
|
325
468
|
description: string;
|
|
326
469
|
name: string;
|
|
327
|
-
required: boolean;
|
|
328
470
|
in: string;
|
|
329
471
|
}[] | undefined;
|
|
330
472
|
}[];
|
|
331
473
|
authentication?: Record<string, {
|
|
332
|
-
type: string;
|
|
333
474
|
label: string;
|
|
475
|
+
type: string;
|
|
334
476
|
authorization: {
|
|
335
477
|
type: "basic";
|
|
336
478
|
username: string;
|
|
@@ -340,9 +482,34 @@ export declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
340
482
|
type: "bearer";
|
|
341
483
|
token: string;
|
|
342
484
|
};
|
|
343
|
-
environments:
|
|
485
|
+
environments: {
|
|
344
486
|
key: string;
|
|
345
487
|
name: string;
|
|
346
|
-
}
|
|
488
|
+
}[];
|
|
489
|
+
support: {
|
|
490
|
+
link: string;
|
|
491
|
+
description?: string | undefined;
|
|
492
|
+
};
|
|
493
|
+
configFields?: {
|
|
494
|
+
key: string;
|
|
495
|
+
label: string;
|
|
496
|
+
type: string;
|
|
497
|
+
required?: boolean | undefined;
|
|
498
|
+
secret?: boolean | undefined;
|
|
499
|
+
placeholder?: string | undefined;
|
|
500
|
+
description?: string | undefined;
|
|
501
|
+
tooltip?: string | undefined;
|
|
502
|
+
}[] | undefined;
|
|
503
|
+
setupFields?: {
|
|
504
|
+
key: string;
|
|
505
|
+
label: string;
|
|
506
|
+
type: string;
|
|
507
|
+
required?: boolean | undefined;
|
|
508
|
+
secret?: boolean | undefined;
|
|
509
|
+
placeholder?: string | undefined;
|
|
510
|
+
description?: string | undefined;
|
|
511
|
+
tooltip?: string | undefined;
|
|
512
|
+
}[] | undefined;
|
|
513
|
+
testOperationsIds?: string[] | undefined;
|
|
347
514
|
}>[] | undefined;
|
|
348
515
|
}>;
|