@managespace/sdk 0.0.161 → 0.0.163
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/extensibility/functions/extensibility-function.d.ts +10 -2
- package/dist/extensibility/functions/extensibility-function.d.ts.map +1 -1
- package/dist/extensibility/types/mapped-ports.d.ts +1 -1
- package/dist/extensibility/types/mapped-ports.d.ts.map +1 -1
- package/dist/extensibility/types/step-function-signature.d.ts.map +1 -1
- package/dist/extensibility/workflow/workflow-step.d.ts.map +1 -1
- package/dist/extensibility/workflow/workflow-step.js +1 -7
- package/dist/extensibility/workflow/workflow.d.ts.map +1 -1
- package/dist/extensibility/workflow/workflow.js +18 -12
- package/package.json +1 -1
- package/src/extensibility/functions/extensibility-function.ts +9 -1
- package/src/extensibility/types/mapped-ports.ts +1 -2
- package/src/extensibility/types/step-function-signature.ts +1 -1
- package/src/extensibility/workflow/workflow-step.ts +0 -10
- package/src/extensibility/workflow/workflow.ts +20 -15
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { DefaultApi } from '../../generated';
|
|
2
2
|
import { ExtReturnType } from '../types';
|
|
3
3
|
import { ExtPlugin, ExtBasePayload } from '../types';
|
|
4
|
-
export declare const defineExFn: <T extends ExtPlugin>(callback: (payload: ExtBasePayload & T["payload"], api: DefaultApi
|
|
4
|
+
export declare const defineExFn: <T extends ExtPlugin>(callback: (payload: ExtBasePayload & T["payload"], api: DefaultApi & {
|
|
5
|
+
configurationSettings: {
|
|
6
|
+
[key: string]: string | number | boolean | Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
}) => Promise<ExtReturnType<T["responseType"], null>>) => {
|
|
5
9
|
message: string;
|
|
6
|
-
callback: (payload: ExtBasePayload & T["payload"], api: DefaultApi
|
|
10
|
+
callback: (payload: ExtBasePayload & T["payload"], api: DefaultApi & {
|
|
11
|
+
configurationSettings: {
|
|
12
|
+
[key: string]: string | number | boolean | Record<string, unknown>;
|
|
13
|
+
};
|
|
14
|
+
}) => Promise<ExtReturnType<T["responseType"], null>>;
|
|
7
15
|
};
|
|
8
16
|
//# sourceMappingURL=extensibility-function.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensibility-function.d.ts","sourceRoot":"","sources":["../../../src/extensibility/functions/extensibility-function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAErD,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"extensibility-function.d.ts","sourceRoot":"","sources":["../../../src/extensibility/functions/extensibility-function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAErD,eAAO,MAAM,UAAU;;;;;;;;;;;CAuBtB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefinedWorkflowStep } from '../workflow/workflow-step';
|
|
2
2
|
import { DefaultPorts } from './default-result';
|
|
3
3
|
export type MappedPorts<T extends string = DefaultPorts> = {
|
|
4
|
-
[K in T]?: DefaultPorts | undefined | DefinedWorkflowStep
|
|
4
|
+
[K in T]?: DefaultPorts | undefined | DefinedWorkflowStep<any>;
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=mapped-ports.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapped-ports.d.ts","sourceRoot":"","sources":["../../../src/extensibility/types/mapped-ports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"mapped-ports.d.ts","sourceRoot":"","sources":["../../../src/extensibility/types/mapped-ports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,IAAI;KACtD,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,mBAAmB,CAAC,GAAG,CAAC;CACjE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-function-signature.d.ts","sourceRoot":"","sources":["../../../src/extensibility/types/step-function-signature.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"step-function-signature.d.ts","sourceRoot":"","sources":["../../../src/extensibility/types/step-function-signature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACH,uBAAuB,EACvB,sBAAsB,EACzB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,IAAI,CACjE,OAAO,EAAE,uBAAuB,GAAG,GAAG,EACtC,GAAG,EAAE,UAAU,GAAG;IACd,qBAAqB,EAAE;QACnB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACtE,CAAC;CACL,EACD,KAAK,EAAE,GAAG,KACT,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-step.d.ts","sourceRoot":"","sources":["../../../src/extensibility/workflow/workflow-step.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow-step.d.ts","sourceRoot":"","sources":["../../../src/extensibility/workflow/workflow-step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAE/D,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,IAAI;IAC/D,QAAQ,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC;IACnC,cAAc,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,mBAAmB,CAAC,CAAC,CAAC,CAAC;CACnE,CAAC;AAEF,eAAO,MAAM,kBAAkB,iGAY9B,CAAC"}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defineWorkflowStep = void 0;
|
|
4
|
-
const defineWorkflowStep = (
|
|
5
|
-
// callback: (
|
|
6
|
-
// payload: WorkflowStepBasePayload & any,
|
|
7
|
-
// api: DefaultApi,
|
|
8
|
-
// state: any,
|
|
9
|
-
// ) => Promise<WorkflowStepReturnType<T>>,
|
|
10
|
-
callback) => {
|
|
4
|
+
const defineWorkflowStep = (callback) => {
|
|
11
5
|
const step = {
|
|
12
6
|
callback,
|
|
13
7
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../../src/extensibility/workflow/workflow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../../src/extensibility/workflow/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,eAAO,MAAM,MAAM,qGAGD,MAAM;;;;CAGvB,CAAC;AAGF,eAAO,MAAM,cAAc,iCAAkC,GAAG,EAAE;kCAI5B,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAE3C,CAAC"}
|
|
@@ -14,33 +14,39 @@ const defineWorkflow = (...args) => {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
exports.defineWorkflow = defineWorkflow;
|
|
17
|
-
// type
|
|
18
|
-
// const
|
|
19
|
-
//
|
|
17
|
+
// type OtherTestPorts = 'four' | 'five' | 'six';
|
|
18
|
+
// const stepTestThree = defineWorkflowStep<testThree>(
|
|
19
|
+
// async (payload, api, state) => {
|
|
20
|
+
// const test3 = api.configurationSettings['test'];
|
|
21
|
+
// return {
|
|
22
|
+
// // result: 'Success',
|
|
23
|
+
// result: '4',
|
|
24
|
+
// state: {},
|
|
25
|
+
// };
|
|
26
|
+
// },
|
|
27
|
+
// ).setDescription('test');
|
|
28
|
+
// type TestPorts = 'one' | 'two' | 'three';
|
|
29
|
+
// const stepTest = defineWorkflowStep<TestPorts>(async (payload, api, state) => {
|
|
20
30
|
// return {
|
|
21
|
-
//
|
|
22
|
-
// result: '1',
|
|
31
|
+
// result: 'one',
|
|
23
32
|
// state: {},
|
|
24
33
|
// };
|
|
25
34
|
// }).setDescription('test');
|
|
26
35
|
// const stepTestTwo = defineWorkflowStep<DefaultPorts>(
|
|
27
36
|
// async (payload, api, state) => {
|
|
28
|
-
// const test3 = api.configurationSettings['test'];
|
|
29
37
|
// return {
|
|
30
38
|
// result: 'Success',
|
|
31
|
-
// // result: '1',
|
|
32
39
|
// state: {},
|
|
33
40
|
// };
|
|
34
41
|
// },
|
|
35
42
|
// ).setDescription('test');
|
|
36
43
|
// const defineTest = defineWorkflow<CommunicationMethod.SendEmail>(
|
|
37
|
-
// define<
|
|
38
|
-
//
|
|
39
|
-
//
|
|
44
|
+
// define<TestPorts>(stepTest, {
|
|
45
|
+
// one: stepTestTwo,
|
|
46
|
+
// three: stepTest,
|
|
40
47
|
// }),
|
|
41
48
|
// define<DefaultPorts>(stepTestTwo, {
|
|
42
|
-
// ManualInputReceived:
|
|
49
|
+
// ManualInputReceived: stepTest,
|
|
43
50
|
// Success: 'End',
|
|
44
|
-
// // '1': stepTest,
|
|
45
51
|
// }),
|
|
46
52
|
// );
|
package/package.json
CHANGED
|
@@ -5,7 +5,15 @@ import { ExtPlugin, ExtBasePayload } from '../types';
|
|
|
5
5
|
export const defineExFn = <T extends ExtPlugin>(
|
|
6
6
|
callback: (
|
|
7
7
|
payload: ExtBasePayload & T['payload'],
|
|
8
|
-
api: DefaultApi
|
|
8
|
+
api: DefaultApi & {
|
|
9
|
+
configurationSettings: {
|
|
10
|
+
[key: string]:
|
|
11
|
+
| string
|
|
12
|
+
| number
|
|
13
|
+
| boolean
|
|
14
|
+
| Record<string, unknown>;
|
|
15
|
+
};
|
|
16
|
+
},
|
|
9
17
|
) => Promise<ExtReturnType<T['responseType']>>,
|
|
10
18
|
) => {
|
|
11
19
|
// let fnDescription = 'some default description';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DefinedWorkflowStep } from '../workflow/workflow-step';
|
|
2
2
|
import { DefaultPorts } from './default-result';
|
|
3
|
-
import { StepFunctionSignature } from './step-function-signature';
|
|
4
3
|
|
|
5
4
|
export type MappedPorts<T extends string = DefaultPorts> = {
|
|
6
|
-
[K in T]?: DefaultPorts | undefined | DefinedWorkflowStep
|
|
5
|
+
[K in T]?: DefaultPorts | undefined | DefinedWorkflowStep<any>;
|
|
7
6
|
};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import { DefaultApi } from '../../generated';
|
|
2
1
|
import { DefaultPorts, StepFunctionSignature } from '../types';
|
|
3
|
-
import {
|
|
4
|
-
WorkflowStepBasePayload,
|
|
5
|
-
WorkflowStepReturnType,
|
|
6
|
-
} from '../types/workflow-step';
|
|
7
2
|
|
|
8
3
|
export type DefinedWorkflowStep<T extends string = DefaultPorts> = {
|
|
9
4
|
callback: StepFunctionSignature<T>;
|
|
@@ -11,11 +6,6 @@ export type DefinedWorkflowStep<T extends string = DefaultPorts> = {
|
|
|
11
6
|
};
|
|
12
7
|
|
|
13
8
|
export const defineWorkflowStep = <T extends string = DefaultPorts>(
|
|
14
|
-
// callback: (
|
|
15
|
-
// payload: WorkflowStepBasePayload & any,
|
|
16
|
-
// api: DefaultApi,
|
|
17
|
-
// state: any,
|
|
18
|
-
// ) => Promise<WorkflowStepReturnType<T>>,
|
|
19
9
|
callback: StepFunctionSignature<T>,
|
|
20
10
|
): DefinedWorkflowStep<T> => {
|
|
21
11
|
const step = {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { CommunicationMethod } from '../functions';
|
|
2
1
|
import { DefaultPorts, ExtPlugin, MappedPorts } from '../types';
|
|
3
|
-
import {
|
|
4
|
-
import { DefinedWorkflowStep, defineWorkflowStep } from './workflow-step';
|
|
2
|
+
import { DefinedWorkflowStep } from './workflow-step';
|
|
5
3
|
|
|
6
4
|
export const define = <T extends string = DefaultPorts>(
|
|
7
5
|
fn: DefinedWorkflowStep<T>,
|
|
@@ -20,36 +18,43 @@ export const defineWorkflow = <T extends ExtPlugin>(...args: any[]) => {
|
|
|
20
18
|
};
|
|
21
19
|
};
|
|
22
20
|
|
|
23
|
-
// type
|
|
21
|
+
// type OtherTestPorts = 'four' | 'five' | 'six';
|
|
22
|
+
// const stepTestThree = defineWorkflowStep<testThree>(
|
|
23
|
+
// async (payload, api, state) => {
|
|
24
|
+
// const test3 = api.configurationSettings['test'];
|
|
25
|
+
// return {
|
|
26
|
+
// // result: 'Success',
|
|
27
|
+
// result: '4',
|
|
28
|
+
// state: {},
|
|
29
|
+
// };
|
|
30
|
+
// },
|
|
31
|
+
// ).setDescription('test');
|
|
24
32
|
|
|
25
|
-
//
|
|
26
|
-
|
|
33
|
+
// type TestPorts = 'one' | 'two' | 'three';
|
|
34
|
+
|
|
35
|
+
// const stepTest = defineWorkflowStep<TestPorts>(async (payload, api, state) => {
|
|
27
36
|
// return {
|
|
28
|
-
//
|
|
29
|
-
// result: '1',
|
|
37
|
+
// result: 'one',
|
|
30
38
|
// state: {},
|
|
31
39
|
// };
|
|
32
40
|
// }).setDescription('test');
|
|
33
41
|
|
|
34
42
|
// const stepTestTwo = defineWorkflowStep<DefaultPorts>(
|
|
35
43
|
// async (payload, api, state) => {
|
|
36
|
-
// const test3 = api.configurationSettings['test'];
|
|
37
44
|
// return {
|
|
38
45
|
// result: 'Success',
|
|
39
|
-
// // result: '1',
|
|
40
46
|
// state: {},
|
|
41
47
|
// };
|
|
42
48
|
// },
|
|
43
49
|
// ).setDescription('test');
|
|
44
50
|
|
|
45
51
|
// const defineTest = defineWorkflow<CommunicationMethod.SendEmail>(
|
|
46
|
-
// define<
|
|
47
|
-
//
|
|
48
|
-
//
|
|
52
|
+
// define<TestPorts>(stepTest, {
|
|
53
|
+
// one: stepTestTwo,
|
|
54
|
+
// three: stepTest,
|
|
49
55
|
// }),
|
|
50
56
|
// define<DefaultPorts>(stepTestTwo, {
|
|
51
|
-
// ManualInputReceived:
|
|
57
|
+
// ManualInputReceived: stepTest,
|
|
52
58
|
// Success: 'End',
|
|
53
|
-
// // '1': stepTest,
|
|
54
59
|
// }),
|
|
55
60
|
// );
|