@stackone/connect-sdk 1.6.0 → 1.8.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 CHANGED
@@ -1 +1 @@
1
- import{StepFunctionName as s,StepFunctionsFactory as t}from"@stackone/core";const o=async({block:o,stepFunctionName:c,params:r,buildStepFunction:e=t.build})=>{const u=e({functionName:c}),a=await u({block:o,params:r}),l=c===s.MAP_FIELDS?{[s.MAP_FIELDS.toString()]:{output:{data:a.block.result},errors:a.errors,successfull:a.successfull}}:{};return{...a.block,steps:{...a?.block?.steps??{},...l}}};export{o as executeStepFunction};
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";const a=async({block:n,stepFunctionName:o,params:r,buildStepFunction:i=e.build})=>{const s=i({functionName:o}).fn,a=await s({block:n,params:r}),c=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??{},...c}}},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}},p=i.object({StackOne:i.string(),info:i.object({title:i.string(),version:i.string(),key:i.string(),description:i.string().optional(),categories:i.array(i.string())}),baseUrl:i.string(),authentication:i.record(i.string(),i.object({type:i.string(),label:i.string(),authorization:n,environments:i.record(i.string(),i.object({key:i.string(),name:i.string()})).array()})).array().optional(),operations:i.object({operationId:i.string(),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 u(t){try{const e=r(t),n=p.parse(e),o={title:n.info.title,version:n.info.version,key:n.info.key,description:n.info.description,categories:n.info.categories},i=l(n),s={baseUrl:n.baseUrl,authentication:i},a=d(n,s);return o.operations=a,o}catch(t){throw new Error(`Error parsing YAML file: ${t.message}`)}}const l=t=>{const e={};for(const n of t.authentication??[]){const[t]=Object.keys(n),o=n[t].environments.reduce(((e,o)=>{const[r]=Object.values(o),{environments:i,...s}=n[t];return e[r.key]={...s,envKey:r.key,envName:r.name},e}),{});e[t]=o}return e},d=(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,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}),{}),y=(t,e)=>{if(!t.inputs)return{};const n=m(t.inputs).parse(e);return{...n.headers??{},...n.query??{},...n.path??{},...n.body??{}}},g=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)},m=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:g(e).optional(),query:g(n).optional(),body:g(o).optional(),headers:g(r).optional()})},f=async({inputs:t,category:e,providerKey:n,authConfigKey:o,environment:r="production",operation:i,accountSecureId:a,projectSecureId:c,credentials:p,logger:u,getHttpClient:l=async()=>s.getInstance()})=>{const d=await l();return{inputs:t,fieldConfigs:[],context:{projectSecureId:c,accountSecureId:a,connector:n,category:e,schema:i.schema?.key,service:"",resource:"",operationType:i.operationType,authenticationType:o,environment:r},operation:i,credentials:p,httpClient:d,logger:u}};export{f as createBlock,a as executeStepFunction,y as parseOperationInputs,u as parseYamlConnector,c as runStepOperation};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var t=require("@stackone/core");exports.executeStepFunction=async({block:e,stepFunctionName:c,params:s,buildStepFunction:o=t.StepFunctionsFactory.build})=>{const u=o({functionName:c}),n=await u({block:e,params:s}),r=c===t.StepFunctionName.MAP_FIELDS?{[t.StepFunctionName.MAP_FIELDS.toString()]:{output:{data:n.block.result},errors:n.errors,successfull:n.successfull}}:{};return{...n.block,steps:{...n?.block?.steps??{},...r}}};
1
+ "use strict";var t=require("@stackone/core"),e=require("@stackone/expressions"),n=require("yaml"),r=require("zod"),o=require("@stackone/transport");const i=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(),categories:r.z.array(r.z.string())}),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.record(r.z.string(),r.z.object({key:r.z.string(),name:r.z.string()})).array()})).array().optional(),operations:r.z.object({operationId:r.z.string(),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 s=t=>{const e={};for(const n of t.authentication??[]){const[t]=Object.keys(n),r=n[t].environments.reduce(((e,r)=>{const[o]=Object.values(r),{environments:i,...s}=n[t];return e[o.key]={...s,envKey:o.key,envName:o.name},e}),{});e[t]=r}return e},a=(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,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}),{}),c=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)},p=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:c(e).optional(),query:c(n).optional(),body:c(o).optional(),headers:c(i).optional()})};exports.createBlock=async({inputs:t,category:e,providerKey:n,authConfigKey:r,environment:i="production",operation:s,accountSecureId:a,projectSecureId:c,credentials:p,logger:u,getHttpClient:l=async()=>o.HttpClientManager.getInstance()})=>{const d=await l();return{inputs:t,fieldConfigs:[],context:{projectSecureId:c,accountSecureId:a,connector:n,category:e,schema:s.schema?.key,service:"",resource:"",operationType:s.operationType,authenticationType:r,environment:i},operation:s,credentials:p,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.parseOperationInputs=(t,e)=>{if(!t.inputs)return{};const n=p(t.inputs).parse(e);return{...n.headers??{},...n.query??{},...n.path??{},...n.body??{}}},exports.parseYamlConnector=function(t){try{const e=n.parse(t),r=i.parse(e),o={title:r.info.title,version:r.info.version,key:r.info.key,description:r.info.description,categories:r.info.categories},c=s(r),p={baseUrl:r.baseUrl,authentication:c},u=a(r,p);return o.operations=u,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}};
@@ -0,0 +1,15 @@
1
+ import { Block, Category, ILogger, Operation } from '@stackone/core';
2
+ import { IHttpClient } from '@stackone/transport';
3
+ export declare const createBlock: ({ inputs, category, providerKey, authConfigKey, environment, operation, accountSecureId, projectSecureId, credentials, logger, getHttpClient, }: {
4
+ inputs?: Record<string, unknown>;
5
+ category: Category;
6
+ providerKey: string;
7
+ authConfigKey: string;
8
+ environment?: string;
9
+ operation: Operation;
10
+ accountSecureId: string;
11
+ projectSecureId: string;
12
+ credentials?: Record<string, unknown>;
13
+ logger?: ILogger;
14
+ getHttpClient?: () => Promise<IHttpClient>;
15
+ }) => Promise<Block>;
@@ -0,0 +1,6 @@
1
+ import { Connector, Operation } from '@stackone/core';
2
+ import { HttpMethod } from '@stackone/transport';
3
+ export declare const getOperationFromUrl: (connector: Connector, url: string, method: HttpMethod) => {
4
+ operation: Operation;
5
+ params: Partial<Record<string, string | string[]>>;
6
+ } | undefined;
@@ -0,0 +1,3 @@
1
+ import { Connector, Operation } from '@stackone/core';
2
+ export declare function parseYamlConnector(yamlFileContents: string): Connector;
3
+ export declare const parseOperationInputs: (operation: Operation, inputs: unknown) => Record<string, unknown>;
@@ -0,0 +1,348 @@
1
+ import { z } from 'zod';
2
+ export declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
3
+ StackOne: z.ZodString;
4
+ info: z.ZodObject<{
5
+ title: z.ZodString;
6
+ version: z.ZodString;
7
+ key: z.ZodString;
8
+ description: z.ZodOptional<z.ZodString>;
9
+ categories: z.ZodArray<z.ZodString, "many">;
10
+ }, "strip", z.ZodTypeAny, {
11
+ title: string;
12
+ version: string;
13
+ key: string;
14
+ categories: string[];
15
+ description?: string | undefined;
16
+ }, {
17
+ title: string;
18
+ version: string;
19
+ key: string;
20
+ categories: string[];
21
+ description?: string | undefined;
22
+ }>;
23
+ baseUrl: z.ZodString;
24
+ authentication: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
25
+ type: z.ZodString;
26
+ label: z.ZodString;
27
+ authorization: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
28
+ type: z.ZodLiteral<"basic">;
29
+ username: z.ZodString;
30
+ password: z.ZodString;
31
+ encoding: z.ZodOptional<z.ZodString>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ type: "basic";
34
+ username: string;
35
+ password: string;
36
+ encoding?: string | undefined;
37
+ }, {
38
+ type: "basic";
39
+ username: string;
40
+ password: string;
41
+ encoding?: string | undefined;
42
+ }>, z.ZodObject<{
43
+ type: z.ZodLiteral<"bearer">;
44
+ token: z.ZodString;
45
+ }, "strip", z.ZodTypeAny, {
46
+ type: "bearer";
47
+ token: string;
48
+ }, {
49
+ type: "bearer";
50
+ token: string;
51
+ }>]>;
52
+ environments: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
53
+ key: z.ZodString;
54
+ name: z.ZodString;
55
+ }, "strip", z.ZodTypeAny, {
56
+ key: string;
57
+ name: string;
58
+ }, {
59
+ key: string;
60
+ name: string;
61
+ }>>, "many">;
62
+ }, "strip", z.ZodTypeAny, {
63
+ type: string;
64
+ label: string;
65
+ authorization: {
66
+ type: "basic";
67
+ username: string;
68
+ password: string;
69
+ encoding?: string | undefined;
70
+ } | {
71
+ type: "bearer";
72
+ token: string;
73
+ };
74
+ environments: Record<string, {
75
+ key: string;
76
+ name: string;
77
+ }>[];
78
+ }, {
79
+ type: string;
80
+ label: string;
81
+ authorization: {
82
+ type: "basic";
83
+ username: string;
84
+ password: string;
85
+ encoding?: string | undefined;
86
+ } | {
87
+ type: "bearer";
88
+ token: string;
89
+ };
90
+ environments: Record<string, {
91
+ key: string;
92
+ name: string;
93
+ }>[];
94
+ }>>, "many">>;
95
+ operations: z.ZodArray<z.ZodObject<{
96
+ operationId: z.ZodString;
97
+ operationType: z.ZodString;
98
+ schema: z.ZodOptional<z.ZodString>;
99
+ entrypointUrl: z.ZodOptional<z.ZodString>;
100
+ entrypointHttpMethod: z.ZodOptional<z.ZodString>;
101
+ description: z.ZodString;
102
+ inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
103
+ name: z.ZodString;
104
+ type: z.ZodString;
105
+ required: z.ZodBoolean;
106
+ description: z.ZodString;
107
+ in: z.ZodString;
108
+ }, "strip", z.ZodTypeAny, {
109
+ type: string;
110
+ description: string;
111
+ name: string;
112
+ required: boolean;
113
+ in: string;
114
+ }, {
115
+ type: string;
116
+ description: string;
117
+ name: string;
118
+ required: boolean;
119
+ in: string;
120
+ }>, "many">>;
121
+ fieldConfigs: z.ZodArray<z.ZodObject<{
122
+ targetFieldKey: z.ZodString;
123
+ expression: z.ZodString;
124
+ type: z.ZodString;
125
+ isUnified: z.ZodBoolean;
126
+ }, "strip", z.ZodTypeAny, {
127
+ type: string;
128
+ targetFieldKey: string;
129
+ expression: string;
130
+ isUnified: boolean;
131
+ }, {
132
+ type: string;
133
+ targetFieldKey: string;
134
+ expression: string;
135
+ isUnified: boolean;
136
+ }>, "many">;
137
+ steps: z.ZodArray<z.ZodObject<{
138
+ stepId: z.ZodString;
139
+ description: z.ZodString;
140
+ stepFunction: z.ZodObject<{
141
+ functionName: z.ZodString;
142
+ version: z.ZodOptional<z.ZodString>;
143
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ functionName: string;
146
+ parameters: Record<string, unknown>;
147
+ version?: string | undefined;
148
+ }, {
149
+ functionName: string;
150
+ parameters: Record<string, unknown>;
151
+ version?: string | undefined;
152
+ }>;
153
+ }, "strip", z.ZodTypeAny, {
154
+ description: string;
155
+ stepId: string;
156
+ stepFunction: {
157
+ functionName: string;
158
+ parameters: Record<string, unknown>;
159
+ version?: string | undefined;
160
+ };
161
+ }, {
162
+ description: string;
163
+ stepId: string;
164
+ stepFunction: {
165
+ functionName: string;
166
+ parameters: Record<string, unknown>;
167
+ version?: string | undefined;
168
+ };
169
+ }>, "many">;
170
+ result: z.ZodString;
171
+ }, "strip", z.ZodTypeAny, {
172
+ description: string;
173
+ operationId: string;
174
+ operationType: string;
175
+ fieldConfigs: {
176
+ type: string;
177
+ targetFieldKey: string;
178
+ expression: string;
179
+ isUnified: boolean;
180
+ }[];
181
+ steps: {
182
+ description: string;
183
+ stepId: string;
184
+ stepFunction: {
185
+ functionName: string;
186
+ parameters: Record<string, unknown>;
187
+ version?: string | undefined;
188
+ };
189
+ }[];
190
+ result: string;
191
+ schema?: string | undefined;
192
+ entrypointUrl?: string | undefined;
193
+ entrypointHttpMethod?: string | undefined;
194
+ inputs?: {
195
+ type: string;
196
+ description: string;
197
+ name: string;
198
+ required: boolean;
199
+ in: string;
200
+ }[] | undefined;
201
+ }, {
202
+ description: string;
203
+ operationId: string;
204
+ operationType: string;
205
+ fieldConfigs: {
206
+ type: string;
207
+ targetFieldKey: string;
208
+ expression: string;
209
+ isUnified: boolean;
210
+ }[];
211
+ steps: {
212
+ description: string;
213
+ stepId: string;
214
+ stepFunction: {
215
+ functionName: string;
216
+ parameters: Record<string, unknown>;
217
+ version?: string | undefined;
218
+ };
219
+ }[];
220
+ result: string;
221
+ schema?: string | undefined;
222
+ entrypointUrl?: string | undefined;
223
+ entrypointHttpMethod?: string | undefined;
224
+ inputs?: {
225
+ type: string;
226
+ description: string;
227
+ name: string;
228
+ required: boolean;
229
+ in: string;
230
+ }[] | undefined;
231
+ }>, "many">;
232
+ }, "strip", z.ZodTypeAny, {
233
+ StackOne: string;
234
+ info: {
235
+ title: string;
236
+ version: string;
237
+ key: string;
238
+ categories: string[];
239
+ description?: string | undefined;
240
+ };
241
+ baseUrl: string;
242
+ operations: {
243
+ description: string;
244
+ operationId: string;
245
+ operationType: string;
246
+ fieldConfigs: {
247
+ type: string;
248
+ targetFieldKey: string;
249
+ expression: string;
250
+ isUnified: boolean;
251
+ }[];
252
+ steps: {
253
+ description: string;
254
+ stepId: string;
255
+ stepFunction: {
256
+ functionName: string;
257
+ parameters: Record<string, unknown>;
258
+ version?: string | undefined;
259
+ };
260
+ }[];
261
+ result: string;
262
+ schema?: string | undefined;
263
+ entrypointUrl?: string | undefined;
264
+ entrypointHttpMethod?: string | undefined;
265
+ inputs?: {
266
+ type: string;
267
+ description: string;
268
+ name: string;
269
+ required: boolean;
270
+ in: string;
271
+ }[] | undefined;
272
+ }[];
273
+ authentication?: Record<string, {
274
+ type: string;
275
+ label: string;
276
+ authorization: {
277
+ type: "basic";
278
+ username: string;
279
+ password: string;
280
+ encoding?: string | undefined;
281
+ } | {
282
+ type: "bearer";
283
+ token: string;
284
+ };
285
+ environments: Record<string, {
286
+ key: string;
287
+ name: string;
288
+ }>[];
289
+ }>[] | undefined;
290
+ }, {
291
+ StackOne: string;
292
+ info: {
293
+ title: string;
294
+ version: string;
295
+ key: string;
296
+ categories: string[];
297
+ description?: string | undefined;
298
+ };
299
+ baseUrl: string;
300
+ operations: {
301
+ description: string;
302
+ operationId: string;
303
+ operationType: string;
304
+ fieldConfigs: {
305
+ type: string;
306
+ targetFieldKey: string;
307
+ expression: string;
308
+ isUnified: boolean;
309
+ }[];
310
+ steps: {
311
+ description: string;
312
+ stepId: string;
313
+ stepFunction: {
314
+ functionName: string;
315
+ parameters: Record<string, unknown>;
316
+ version?: string | undefined;
317
+ };
318
+ }[];
319
+ result: string;
320
+ schema?: string | undefined;
321
+ entrypointUrl?: string | undefined;
322
+ entrypointHttpMethod?: string | undefined;
323
+ inputs?: {
324
+ type: string;
325
+ description: string;
326
+ name: string;
327
+ required: boolean;
328
+ in: string;
329
+ }[] | undefined;
330
+ }[];
331
+ authentication?: Record<string, {
332
+ type: string;
333
+ label: string;
334
+ authorization: {
335
+ type: "basic";
336
+ username: string;
337
+ password: string;
338
+ encoding?: string | undefined;
339
+ } | {
340
+ type: "bearer";
341
+ token: string;
342
+ };
343
+ environments: Record<string, {
344
+ key: string;
345
+ name: string;
346
+ }>[];
347
+ }>[] | undefined;
348
+ }>;
@@ -0,0 +1,2 @@
1
+ import { Connector } from '@stackone/core';
2
+ export declare const StackOneTestConnector: Connector;
@@ -1 +1,4 @@
1
- export { executeStepFunction } from './executeStepFunctions';
1
+ export { executeStepFunction } from './runners/executeStepFunctions';
2
+ export { runStepOperation } from './runners/runStepOperation';
3
+ export { parseYamlConnector, parseOperationInputs } from './connectors/parsers';
4
+ export { createBlock } from './blocks/createBlock';
@@ -0,0 +1,5 @@
1
+ import { Block, StepFunctionsFactory } from '@stackone/core';
2
+ export declare const runStepOperation: ({ block, buildStepFunction, }: {
3
+ block: Block;
4
+ buildStepFunction?: typeof StepFunctionsFactory.build;
5
+ }) => Promise<Block>;
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@stackone/connect-sdk",
3
- "version": "1.6.0",
3
+ "version": "1.8.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.mjs",
7
7
  "types": "dist/types/index.d.ts",
8
- "devDependencies": {},
9
8
  "files": [
10
9
  "dist",
11
10
  "package.json",
@@ -25,8 +24,8 @@
25
24
  "code:check:fix": "biome check --write ./src ./*.mjs",
26
25
  "lint": "npm run code:check",
27
26
  "lint:fix": "npm run code:check:fix",
28
- "test": "vitest run",
29
- "test:watch": "vitest watch",
27
+ "test": "FORCE_COLOR=1 vitest run",
28
+ "test:watch": "FORCE_COLOR=1 vitest watch --silent",
30
29
  "publish-release": "npm publish --access=public"
31
30
  },
32
31
  "keywords": [],
@@ -34,7 +33,9 @@
34
33
  "license": "ISC",
35
34
  "dependencies": {
36
35
  "@stackone/core": "*",
36
+ "@stackone/expressions": "*",
37
+ "@stackone/open-api": "*",
37
38
  "@stackone/transport": "*",
38
- "@stackone/open-api": "*"
39
+ "path-to-regexp": "^8.2.0"
39
40
  }
40
41
  }