@managespace/sdk 0.0.160 → 0.0.161
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/types/mapped-ports.d.ts +1 -1
- package/dist/extensibility/types/mapped-ports.d.ts.map +1 -1
- package/dist/extensibility/workflow/workflow.d.ts.map +1 -1
- package/dist/extensibility/workflow/workflow.js +30 -11
- package/package.json +1 -1
- package/src/extensibility/types/mapped-ports.ts +1 -1
- package/src/extensibility/workflow/workflow.ts +32 -15
|
@@ -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;
|
|
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;AAGhD,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,IAAI;KACtD,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,mBAAmB
|
|
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;AAGhD,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,IAAI;KACtD,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,mBAAmB;CAC5D,CAAC"}
|
|
@@ -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":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAsB,MAAM,iBAAiB,CAAC;AAE1E,eAAO,MAAM,MAAM,qGAGD,MAAM;;;;CAGvB,CAAC;AAGF,eAAO,MAAM,cAAc,iCAAkC,GAAG,EAAE;kCAI5B,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAE3C,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defineWorkflow = exports.define = void 0;
|
|
4
|
-
const workflow_step_1 = require("./workflow-step");
|
|
5
4
|
const define = (fn, ports, maxRunCount) => {
|
|
6
5
|
return { fn, ports, maxRunCount };
|
|
7
6
|
};
|
|
@@ -15,13 +14,33 @@ const defineWorkflow = (...args) => {
|
|
|
15
14
|
};
|
|
16
15
|
};
|
|
17
16
|
exports.defineWorkflow = defineWorkflow;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
// type test = '1' | '2' | '3';
|
|
18
|
+
// const stepTest = defineWorkflowStep<test>(async (payload, api, state) => {
|
|
19
|
+
// const test3 = api.configurationSettings['test'];
|
|
20
|
+
// return {
|
|
21
|
+
// // result: 'Success',
|
|
22
|
+
// result: '1',
|
|
23
|
+
// state: {},
|
|
24
|
+
// };
|
|
25
|
+
// }).setDescription('test');
|
|
26
|
+
// const stepTestTwo = defineWorkflowStep<DefaultPorts>(
|
|
27
|
+
// async (payload, api, state) => {
|
|
28
|
+
// const test3 = api.configurationSettings['test'];
|
|
29
|
+
// return {
|
|
30
|
+
// result: 'Success',
|
|
31
|
+
// // result: '1',
|
|
32
|
+
// state: {},
|
|
33
|
+
// };
|
|
34
|
+
// },
|
|
35
|
+
// ).setDescription('test');
|
|
36
|
+
// const defineTest = defineWorkflow<CommunicationMethod.SendEmail>(
|
|
37
|
+
// define<test>(stepTest, {
|
|
38
|
+
// // ManualInputReceived: stepTestTwo,
|
|
39
|
+
// '1': stepTestTwo,
|
|
40
|
+
// }),
|
|
41
|
+
// define<DefaultPorts>(stepTestTwo, {
|
|
42
|
+
// ManualInputReceived: stepTestTwo,
|
|
43
|
+
// Success: 'End',
|
|
44
|
+
// // '1': stepTest,
|
|
45
|
+
// }),
|
|
46
|
+
// );
|
package/package.json
CHANGED
|
@@ -3,5 +3,5 @@ import { DefaultPorts } from './default-result';
|
|
|
3
3
|
import { StepFunctionSignature } from './step-function-signature';
|
|
4
4
|
|
|
5
5
|
export type MappedPorts<T extends string = DefaultPorts> = {
|
|
6
|
-
[K in T]?: DefaultPorts | undefined | DefinedWorkflowStep
|
|
6
|
+
[K in T]?: DefaultPorts | undefined | DefinedWorkflowStep; // | StepFunctionSignature<T>
|
|
7
7
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CommunicationMethod } from '../functions';
|
|
1
2
|
import { DefaultPorts, ExtPlugin, MappedPorts } from '../types';
|
|
2
3
|
import { StepFunctionSignature } from '../types/step-function-signature';
|
|
3
4
|
import { DefinedWorkflowStep, defineWorkflowStep } from './workflow-step';
|
|
@@ -19,20 +20,36 @@ export const defineWorkflow = <T extends ExtPlugin>(...args: any[]) => {
|
|
|
19
20
|
};
|
|
20
21
|
};
|
|
21
22
|
|
|
22
|
-
type test = '1' | '2' | '3';
|
|
23
|
+
// type test = '1' | '2' | '3';
|
|
23
24
|
|
|
24
|
-
const stepTest = defineWorkflowStep<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
).setDescription('test');
|
|
25
|
+
// const stepTest = defineWorkflowStep<test>(async (payload, api, state) => {
|
|
26
|
+
// const test3 = api.configurationSettings['test'];
|
|
27
|
+
// return {
|
|
28
|
+
// // result: 'Success',
|
|
29
|
+
// result: '1',
|
|
30
|
+
// state: {},
|
|
31
|
+
// };
|
|
32
|
+
// }).setDescription('test');
|
|
33
33
|
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
// const stepTestTwo = defineWorkflowStep<DefaultPorts>(
|
|
35
|
+
// async (payload, api, state) => {
|
|
36
|
+
// const test3 = api.configurationSettings['test'];
|
|
37
|
+
// return {
|
|
38
|
+
// result: 'Success',
|
|
39
|
+
// // result: '1',
|
|
40
|
+
// state: {},
|
|
41
|
+
// };
|
|
42
|
+
// },
|
|
43
|
+
// ).setDescription('test');
|
|
44
|
+
|
|
45
|
+
// const defineTest = defineWorkflow<CommunicationMethod.SendEmail>(
|
|
46
|
+
// define<test>(stepTest, {
|
|
47
|
+
// // ManualInputReceived: stepTestTwo,
|
|
48
|
+
// '1': stepTestTwo,
|
|
49
|
+
// }),
|
|
50
|
+
// define<DefaultPorts>(stepTestTwo, {
|
|
51
|
+
// ManualInputReceived: stepTestTwo,
|
|
52
|
+
// Success: 'End',
|
|
53
|
+
// // '1': stepTest,
|
|
54
|
+
// }),
|
|
55
|
+
// );
|