@unmeshed/sdk 1.0.7 → 1.0.8
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.d.ts +18 -16
- package/dist/index.js +1 -1
- package/dist/sample/sampleServer.js +10 -10
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,20 +2,22 @@ import { ApiClient } from "./apiClient";
|
|
|
2
2
|
import pollForWorkers from "./poller/pollerClientImpl";
|
|
3
3
|
import { ApiCallType, ApiClientConfig, ProcessRequestData, ProcessSearchRequest } from "./types";
|
|
4
4
|
export declare const apiClient: ApiClient;
|
|
5
|
-
declare const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
declare const _default: {
|
|
6
|
+
UnmeshedClient: {
|
|
7
|
+
initialize: (config: ApiClientConfig) => void;
|
|
8
|
+
runProcessSync: (ProcessRequestData: ProcessRequestData) => Promise<import("./types").ProcessData>;
|
|
9
|
+
runProcessAsync: (ProcessRequestData: ProcessRequestData) => Promise<import("./types").ProcessData>;
|
|
10
|
+
getProcessData: (processId: number) => Promise<import("./types").ProcessData>;
|
|
11
|
+
getStepData: (stepId: number | null) => Promise<import("./types").StepData>;
|
|
12
|
+
bulkTerminate: (processIds: number[], reason?: string) => Promise<import("./types").ProcessActionResponseData>;
|
|
13
|
+
bulkResume: (processIds: number[]) => Promise<import("./types").ProcessActionResponseData>;
|
|
14
|
+
bulkReviewed: (processIds: number[], reason?: string) => Promise<import("./types").ProcessActionResponseData>;
|
|
15
|
+
rerun: (processId: number, clientId: string, version?: number) => Promise<import("./types").ProcessData>;
|
|
16
|
+
searchProcessExecutions: (params: ProcessSearchRequest) => Promise<any>;
|
|
17
|
+
invokeApiMappingGet: (endpoint: string, id: string, correlationId: string, apiCallType: ApiCallType) => Promise<any>;
|
|
18
|
+
invokeApiMappingPost: (endpoint: string, input: Record<string, any>, id: string, correlationId: string, apiCallType?: ApiCallType) => Promise<any>;
|
|
19
|
+
renewRegistration: () => Promise<string>;
|
|
20
|
+
pollForWorkers: typeof pollForWorkers;
|
|
21
|
+
};
|
|
20
22
|
};
|
|
21
|
-
export default
|
|
23
|
+
export default _default;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../index");
|
|
4
4
|
const types_1 = require("../types");
|
|
5
5
|
require("dotenv/config");
|
|
6
6
|
const ArithmeticWorker_1 = require("./workers/ArithmeticWorker");
|
|
@@ -8,7 +8,7 @@ const BASE_URL = process.env.UNMESHED_BASE_URL;
|
|
|
8
8
|
const PORT = process.env.UNMESHED_PORT;
|
|
9
9
|
const ClIENT_ID = process.env.UNMESHED_CLIENT_ID;
|
|
10
10
|
const AUTH_TOKEN = process.env.UNMESHED_AUTH_TOKEN;
|
|
11
|
-
|
|
11
|
+
index_1.default.initialize({
|
|
12
12
|
baseUrl: BASE_URL,
|
|
13
13
|
port: PORT,
|
|
14
14
|
clientId: ClIENT_ID,
|
|
@@ -30,7 +30,7 @@ const workers = [
|
|
|
30
30
|
maxInProgress: 10,
|
|
31
31
|
},
|
|
32
32
|
];
|
|
33
|
-
|
|
33
|
+
index_1.default.pollForWorkers(workers);
|
|
34
34
|
const processId = 28878569;
|
|
35
35
|
const stepId = 28878571;
|
|
36
36
|
const processIds = [34, 344];
|
|
@@ -67,10 +67,10 @@ const params = {
|
|
|
67
67
|
// .catch((error) => {
|
|
68
68
|
// console.error("Error fetching step data:", error.message);
|
|
69
69
|
// });
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
});
|
|
70
|
+
// UnmeshedClient.bulkTerminate(processIds)
|
|
71
|
+
// .then((data) => {
|
|
72
|
+
// console.log("PROCESS_DATA", data);
|
|
73
|
+
// })
|
|
74
|
+
// .catch((error) => {
|
|
75
|
+
// console.error("Error fetching step data:", error.message);
|
|
76
|
+
// });
|