@unmeshed/sdk 1.0.11 → 1.0.12

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.
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ require("dotenv/config");
7
+ const index_js_1 = __importDefault(require("./index.js"));
8
+ const BASE_URL = process.env.UNMESHED_BASE_URL;
9
+ const PORT = process.env.UNMESHED_PORT;
10
+ const ClIENT_ID = process.env.UNMESHED_CLIENT_ID;
11
+ const AUTH_TOKEN = process.env.UNMESHED_AUTH_TOKEN;
12
+ console.log("UC2", index_js_1.default);
13
+ index_js_1.default.initialize({
14
+ baseUrl: BASE_URL || 'abc',
15
+ port: PORT,
16
+ clientId: ClIENT_ID || 'abc',
17
+ authToken: AUTH_TOKEN || 'token',
18
+ });
19
+ //
20
+ // const request = {
21
+ // name: "sample-http",
22
+ // namespace: "default",
23
+ // input: {},
24
+ // correlationId: "",
25
+ // requestId: "",
26
+ // version: 1,
27
+ // };
28
+ // const workers = [
29
+ // {
30
+ // worker: (input) => ArithmeticOperation(input),
31
+ // namespace: "default",
32
+ // name: "arithmetic_operation_worker",
33
+ // maxInProgress: 10,
34
+ // },
35
+ // ];
36
+ // UnmeshedClient.pollForWorkers(workers);
37
+ //
38
+ // const processId = 28878569;
39
+ // const stepId = 28878571;
40
+ // const processIds = [34, 344];
41
+ // const clientId = "jdjfjf";
42
+ // const endpoint = "your-endpoint";
43
+ // const input = { key: "value" };
44
+ // const id = "12345";
45
+ // const apiCallType = ApiCallType.SYNC;
46
+ //
47
+ // const params = {
48
+ // startTimeEpoch: 1673606400000,
49
+ // endTimeEpoch: 1673692800000,
50
+ // namespace: "default",
51
+ // processTypes: [ProcessType.STANDARD],
52
+ // triggerTypes: [ProcessTriggerType.MANUAL],
53
+ // names: ["process1", "process2", "process3"],
54
+ // processIds: [28883174, 28883162],
55
+ // correlationIds: ["correlationId1", "correlationId2"],
56
+ // requestIds: ["requestId1", "requestId2"],
57
+ // statuses: [ProcessStatus.COMPLETED],
58
+ // limit: 10,
59
+ // offset: 0,
60
+ // };
61
+ // UnmeshedClient.getStepData(stepId)
62
+ // .then((stepData) => {
63
+ // console.log("STEP_DATA", stepData);
64
+ // })
65
+ // .catch((error) => {
66
+ // console.error("Error fetching step data:", error.message);
67
+ // });
68
+ // UnmeshedClient.rerun(processId, ClIENT_ID)
69
+ // .then((data) => {
70
+ // console.log("PROCESS_DATA", data);
71
+ // })
72
+ // .catch((error) => {
73
+ // console.error("Error fetching step data:", error.message);
74
+ // });
75
+ // UnmeshedClient.bulkTerminate(processIds)
76
+ // .then((data) => {
77
+ // console.log("PROCESS_DATA", data);
78
+ // })
79
+ // .catch((error) => {
80
+ // console.error("Error fetching step data:", error.message);
81
+ // });
82
+ //# sourceMappingURL=sampleTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sampleTest.js","sourceRoot":"","sources":["../src/sampleTest.ts"],"names":[],"mappings":";;;;;AACA,yBAAuB;AACvB,0DAAuC;AAEvC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;AAC/C,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;AACvC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;AACjD,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;AAEnD,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,kBAAc,CAAC,CAAA;AAElC,kBAAc,CAAC,UAAU,CAAC;IACxB,OAAO,EAAE,QAAQ,IAAI,KAAK;IAC1B,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,SAAS,IAAI,KAAK;IAC5B,SAAS,EAAE,UAAU,IAAI,OAAO;CACjC,CAAC,CAAC;AAIH,EAAE;AACF,oBAAoB;AACpB,yBAAyB;AACzB,0BAA0B;AAC1B,eAAe;AACf,uBAAuB;AACvB,mBAAmB;AACnB,gBAAgB;AAChB,KAAK;AACL,oBAAoB;AACpB,MAAM;AACN,qDAAqD;AACrD,4BAA4B;AAC5B,2CAA2C;AAC3C,yBAAyB;AACzB,OAAO;AACP,KAAK;AACL,0CAA0C;AAC1C,EAAE;AACF,8BAA8B;AAC9B,2BAA2B;AAC3B,gCAAgC;AAChC,6BAA6B;AAC7B,oCAAoC;AACpC,kCAAkC;AAClC,sBAAsB;AACtB,wCAAwC;AACxC,EAAE;AACF,mBAAmB;AACnB,mCAAmC;AACnC,iCAAiC;AACjC,0BAA0B;AAC1B,0CAA0C;AAC1C,+CAA+C;AAC/C,iDAAiD;AACjD,sCAAsC;AACtC,0DAA0D;AAC1D,8CAA8C;AAC9C,yCAAyC;AACzC,eAAe;AACf,eAAe;AACf,KAAK;AAEL,qCAAqC;AACrC,0BAA0B;AAC1B,0CAA0C;AAC1C,OAAO;AACP,wBAAwB;AACxB,iEAAiE;AACjE,QAAQ;AAER,6CAA6C;AAC7C,sBAAsB;AACtB,yCAAyC;AACzC,OAAO;AACP,wBAAwB;AACxB,iEAAiE;AACjE,QAAQ;AAER,2CAA2C;AAC3C,sBAAsB;AACtB,yCAAyC;AACzC,OAAO;AACP,wBAAwB;AACxB,iEAAiE;AACjE,QAAQ"}
@@ -0,0 +1,313 @@
1
+ import { AxiosRequestConfig } from "axios";
2
+ export declare enum ApiCallType {
3
+ SYNC = "SYNC",
4
+ ASYNC = "ASYNC",
5
+ STREAM = "STREAM"
6
+ }
7
+ export interface ApiMappingData {
8
+ endpoint: string;
9
+ processDefNamespace: string;
10
+ processDefName: string;
11
+ processDefVersion: number;
12
+ authType: string;
13
+ authClaims: string;
14
+ createdBy: string;
15
+ updatedBy: string;
16
+ created: Date;
17
+ updated: Date;
18
+ }
19
+ export type ApiMappingWebhookData = {
20
+ endpoint: string;
21
+ name: string;
22
+ uniqueId: string;
23
+ urlSecret: string;
24
+ description: string;
25
+ userIdentifier: string;
26
+ webhookSource: WebhookSource;
27
+ webhookSourceConfig: Record<string, string>;
28
+ expiryDate: Date;
29
+ userType: SQAuthUserType;
30
+ createdBy: string;
31
+ updatedBy: string;
32
+ created: Date;
33
+ updated: Date;
34
+ };
35
+ export declare enum WebhookSource {
36
+ MS_TEAMS = "MS_TEAMS",
37
+ NOT_DEFINED = "NOT_DEFINED"
38
+ }
39
+ export declare enum SQAuthUserType {
40
+ USER = "USER",
41
+ API = "API",
42
+ INTERNAL = "INTERNAL"
43
+ }
44
+ export declare enum StepType {
45
+ WORKER = "WORKER",
46
+ HTTP = "HTTP",
47
+ WAIT = "WAIT",
48
+ FAIL = "FAIL",
49
+ PYTHON = "PYTHON",
50
+ JAVASCRIPT = "JAVASCRIPT",
51
+ JQ = "JQ",
52
+ MANAGED = "MANAGED",
53
+ BUILTIN = "BUILTIN",
54
+ NOOP = "NOOP",
55
+ PERSISTED_STATE = "PERSISTED_STATE",
56
+ DEPENDSON = "DEPENDSON",
57
+ INTEGRATION = "INTEGRATION",
58
+ EXIT = "EXIT",
59
+ SUB_PROCESS = "SUB_PROCESS",
60
+ LIST = "LIST",
61
+ PARALLEL = "PARALLEL",
62
+ FOREACH = "FOREACH",
63
+ SWITCH = "SWITCH"
64
+ }
65
+ export declare enum StepStatus {
66
+ PENDING = "PENDING",
67
+ SCHEDULED = "SCHEDULED",
68
+ RUNNING = "RUNNING",
69
+ PAUSED = "PAUSED",
70
+ COMPLETED = "COMPLETED",
71
+ FAILED = "FAILED",
72
+ TIMED_OUT = "TIMED_OUT",
73
+ SKIPPED = "SKIPPED",
74
+ CANCELLED = "CANCELLED"
75
+ }
76
+ export declare enum ProcessStatus {
77
+ RUNNING = "RUNNING",
78
+ COMPLETED = "COMPLETED",
79
+ FAILED = "FAILED",
80
+ TIMED_OUT = "TIMED_OUT",
81
+ CANCELLED = "CANCELLED",
82
+ TERMINATED = "TERMINATED",
83
+ REVIEWED = "REVIEWED"
84
+ }
85
+ export declare enum ProcessTriggerType {
86
+ MANUAL = "MANUAL",
87
+ SCHEDULED = "SCHEDULED",
88
+ API_MAPPING = "API_MAPPING",
89
+ WEBHOOK = "WEBHOOK",
90
+ API = "API",
91
+ SUB_PROCESS = "SUB_PROCESS"
92
+ }
93
+ export declare enum ProcessType {
94
+ STANDARD = "STANDARD",
95
+ DYNAMIC = "DYNAMIC",
96
+ API_ORCHESTRATION = "API_ORCHESTRATION",
97
+ INTERNAL = "INTERNAL"
98
+ }
99
+ export type ClientProfileData = {
100
+ clientId: string;
101
+ ipAddress: string;
102
+ friendlyName: string;
103
+ userIdentifier: string;
104
+ stepQueueNames: StepQueueNameData[];
105
+ createdBy: string;
106
+ updatedBy: string;
107
+ created: Date;
108
+ updated: Date;
109
+ expiryDate: Date;
110
+ };
111
+ export type FullClientProfileData = {
112
+ clientId: string;
113
+ ipAddress: string;
114
+ friendlyName: string;
115
+ userIdentifier: string;
116
+ stepQueueNames: StepQueueNameData[];
117
+ createdBy: string;
118
+ updatedBy: string;
119
+ created: Date;
120
+ updated: Date;
121
+ expiryDate: Date;
122
+ tokenValue: string;
123
+ };
124
+ export type StepQueueNameData = {
125
+ orgId: number;
126
+ namespace: string;
127
+ stepType: StepType;
128
+ name: string;
129
+ };
130
+ export type ProcessActionResponseData = {
131
+ count: number;
132
+ details: ProcessActionResponseDetailData[];
133
+ };
134
+ export type ProcessActionResponseDetailData = {
135
+ id: string;
136
+ message: string;
137
+ error: string;
138
+ };
139
+ export type ProcessData = {
140
+ processId: number;
141
+ processType: ProcessType;
142
+ triggerType: ProcessTriggerType;
143
+ namespace: string;
144
+ name: string;
145
+ version: number | null;
146
+ processDefinitionHistoryId: number | null;
147
+ requestId: string;
148
+ correlationId: string;
149
+ status: ProcessStatus;
150
+ input: Record<string, unknown>;
151
+ output: Record<string, unknown>;
152
+ stepIdCount: number | null;
153
+ shardName: string;
154
+ shardInstanceId: number | null;
155
+ stepIds: StepId[];
156
+ stepDataById: Record<number, StepData>;
157
+ created: number;
158
+ updated: number;
159
+ createdBy: string;
160
+ };
161
+ export type StepData = {
162
+ id: number;
163
+ processId: number;
164
+ ref: string;
165
+ parentId: number | null;
166
+ parentRef: string | null;
167
+ namespace: string;
168
+ name: string;
169
+ type: StepType;
170
+ stepDefinitionHistoryId: number | null;
171
+ status: StepStatus;
172
+ input: Record<string, unknown>;
173
+ output: Record<string, unknown>;
174
+ workerId: string;
175
+ start: number;
176
+ schedule: number;
177
+ priority: number;
178
+ updated: number;
179
+ optional: boolean;
180
+ executionList: StepExecutionData[];
181
+ };
182
+ export type StepExecutionData = {
183
+ id: number;
184
+ scheduled: number;
185
+ polled: number;
186
+ start: number;
187
+ updated: number;
188
+ executor: string;
189
+ ref: string;
190
+ runs: number;
191
+ output: Record<string, unknown>;
192
+ };
193
+ export type StepId = {
194
+ id: number;
195
+ processId: number;
196
+ ref: string;
197
+ };
198
+ export type ProcessRequestData = {
199
+ name: string;
200
+ namespace: string;
201
+ version: number | null;
202
+ requestId: string;
203
+ correlationId: string;
204
+ input: Record<string, unknown>;
205
+ };
206
+ export type ProcessSearchRequest = {
207
+ startTimeEpoch: number;
208
+ endTimeEpoch?: number | null;
209
+ namespace: string;
210
+ processTypes: ProcessType[];
211
+ triggerTypes: ProcessTriggerType[];
212
+ names: string[];
213
+ processIds: number[];
214
+ correlationIds: string[];
215
+ requestIds: string[];
216
+ statuses: ProcessStatus[];
217
+ limit: number;
218
+ offset: number;
219
+ };
220
+ export type StepSize = {
221
+ stepQueueNameData: StepQueueNameData;
222
+ size: number | null;
223
+ };
224
+ export type ClientSubmitResult = {
225
+ processId: number;
226
+ stepId: number;
227
+ errorMessage: string | null;
228
+ httpStatusCode: number | null;
229
+ };
230
+ export type WorkRequest = {
231
+ processId: number;
232
+ stepId: number;
233
+ stepExecutionId: number;
234
+ runCount: number;
235
+ stepName: string;
236
+ stepNamespace: string;
237
+ stepRef: string;
238
+ inputParam: Record<string, unknown>;
239
+ isOptional: boolean;
240
+ polled: number;
241
+ scheduled: number;
242
+ updated: number;
243
+ priority: number;
244
+ };
245
+ export type WorkResponse = {
246
+ processId: number;
247
+ stepId: number;
248
+ stepExecutionId: number;
249
+ runCount: number;
250
+ output: Record<string, unknown>;
251
+ status: StepStatus;
252
+ rescheduleAfterSeconds: number | null;
253
+ startedAt: number;
254
+ };
255
+ export type WorkResult = {
256
+ output: unknown;
257
+ taskExecutionId: string;
258
+ startTime: number;
259
+ endTime: number;
260
+ workRequest: WorkRequest;
261
+ };
262
+ export interface ApiClientConfig {
263
+ baseUrl: string;
264
+ clientId: string;
265
+ authToken: string;
266
+ port?: string | number;
267
+ timeout?: number;
268
+ }
269
+ export interface ApiResponse<T = any> {
270
+ data: T;
271
+ status: number;
272
+ headers: Record<string, string>;
273
+ }
274
+ export interface ApiError extends Error {
275
+ status?: number;
276
+ response?: {
277
+ data?: any;
278
+ status: number;
279
+ headers: Record<string, string>;
280
+ };
281
+ }
282
+ export interface QueryParams {
283
+ [key: string]: string | number | boolean | undefined;
284
+ }
285
+ export interface RequestConfig extends Omit<AxiosRequestConfig, "baseURL" | "url" | "method"> {
286
+ headers?: Record<string, string>;
287
+ }
288
+ export interface HandleRequestConfig {
289
+ method: "get" | "post" | "put" | "delete";
290
+ endpoint: string;
291
+ params?: QueryParams;
292
+ data?: Record<string, unknown>;
293
+ config?: RequestConfig;
294
+ }
295
+ export interface ClientRequestConfig {
296
+ params?: QueryParams;
297
+ data?: any;
298
+ config?: RequestConfig;
299
+ }
300
+ interface UnmeshedWorker {
301
+ (input: Record<string, any>): Promise<any>;
302
+ }
303
+ export interface UnmeshedWorkerConfig {
304
+ worker: UnmeshedWorker;
305
+ namespace: string;
306
+ name: string;
307
+ maxInProgress: number;
308
+ }
309
+ export interface PollRequestData {
310
+ stepQueueNameData: StepQueueNameData;
311
+ size: number;
312
+ }
313
+ export {};
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProcessType = exports.ProcessTriggerType = exports.ProcessStatus = exports.StepStatus = exports.StepType = exports.SQAuthUserType = exports.WebhookSource = exports.ApiCallType = void 0;
4
+ var ApiCallType;
5
+ (function (ApiCallType) {
6
+ ApiCallType["SYNC"] = "SYNC";
7
+ ApiCallType["ASYNC"] = "ASYNC";
8
+ ApiCallType["STREAM"] = "STREAM";
9
+ })(ApiCallType || (exports.ApiCallType = ApiCallType = {}));
10
+ var WebhookSource;
11
+ (function (WebhookSource) {
12
+ WebhookSource["MS_TEAMS"] = "MS_TEAMS";
13
+ WebhookSource["NOT_DEFINED"] = "NOT_DEFINED";
14
+ })(WebhookSource || (exports.WebhookSource = WebhookSource = {}));
15
+ var SQAuthUserType;
16
+ (function (SQAuthUserType) {
17
+ SQAuthUserType["USER"] = "USER";
18
+ SQAuthUserType["API"] = "API";
19
+ SQAuthUserType["INTERNAL"] = "INTERNAL";
20
+ })(SQAuthUserType || (exports.SQAuthUserType = SQAuthUserType = {}));
21
+ var StepType;
22
+ (function (StepType) {
23
+ StepType["WORKER"] = "WORKER";
24
+ StepType["HTTP"] = "HTTP";
25
+ StepType["WAIT"] = "WAIT";
26
+ StepType["FAIL"] = "FAIL";
27
+ StepType["PYTHON"] = "PYTHON";
28
+ StepType["JAVASCRIPT"] = "JAVASCRIPT";
29
+ StepType["JQ"] = "JQ";
30
+ StepType["MANAGED"] = "MANAGED";
31
+ StepType["BUILTIN"] = "BUILTIN";
32
+ StepType["NOOP"] = "NOOP";
33
+ StepType["PERSISTED_STATE"] = "PERSISTED_STATE";
34
+ StepType["DEPENDSON"] = "DEPENDSON";
35
+ StepType["INTEGRATION"] = "INTEGRATION";
36
+ StepType["EXIT"] = "EXIT";
37
+ StepType["SUB_PROCESS"] = "SUB_PROCESS";
38
+ StepType["LIST"] = "LIST";
39
+ StepType["PARALLEL"] = "PARALLEL";
40
+ StepType["FOREACH"] = "FOREACH";
41
+ StepType["SWITCH"] = "SWITCH";
42
+ })(StepType || (exports.StepType = StepType = {}));
43
+ var StepStatus;
44
+ (function (StepStatus) {
45
+ StepStatus["PENDING"] = "PENDING";
46
+ StepStatus["SCHEDULED"] = "SCHEDULED";
47
+ StepStatus["RUNNING"] = "RUNNING";
48
+ StepStatus["PAUSED"] = "PAUSED";
49
+ StepStatus["COMPLETED"] = "COMPLETED";
50
+ StepStatus["FAILED"] = "FAILED";
51
+ StepStatus["TIMED_OUT"] = "TIMED_OUT";
52
+ StepStatus["SKIPPED"] = "SKIPPED";
53
+ StepStatus["CANCELLED"] = "CANCELLED";
54
+ })(StepStatus || (exports.StepStatus = StepStatus = {}));
55
+ var ProcessStatus;
56
+ (function (ProcessStatus) {
57
+ ProcessStatus["RUNNING"] = "RUNNING";
58
+ ProcessStatus["COMPLETED"] = "COMPLETED";
59
+ ProcessStatus["FAILED"] = "FAILED";
60
+ ProcessStatus["TIMED_OUT"] = "TIMED_OUT";
61
+ ProcessStatus["CANCELLED"] = "CANCELLED";
62
+ ProcessStatus["TERMINATED"] = "TERMINATED";
63
+ ProcessStatus["REVIEWED"] = "REVIEWED";
64
+ })(ProcessStatus || (exports.ProcessStatus = ProcessStatus = {}));
65
+ var ProcessTriggerType;
66
+ (function (ProcessTriggerType) {
67
+ ProcessTriggerType["MANUAL"] = "MANUAL";
68
+ ProcessTriggerType["SCHEDULED"] = "SCHEDULED";
69
+ ProcessTriggerType["API_MAPPING"] = "API_MAPPING";
70
+ ProcessTriggerType["WEBHOOK"] = "WEBHOOK";
71
+ ProcessTriggerType["API"] = "API";
72
+ ProcessTriggerType["SUB_PROCESS"] = "SUB_PROCESS";
73
+ })(ProcessTriggerType || (exports.ProcessTriggerType = ProcessTriggerType = {}));
74
+ var ProcessType;
75
+ (function (ProcessType) {
76
+ ProcessType["STANDARD"] = "STANDARD";
77
+ ProcessType["DYNAMIC"] = "DYNAMIC";
78
+ ProcessType["API_ORCHESTRATION"] = "API_ORCHESTRATION";
79
+ ProcessType["INTERNAL"] = "INTERNAL";
80
+ })(ProcessType || (exports.ProcessType = ProcessType = {}));
81
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;AAEA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,gCAAiB,CAAA;AACnB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAgCD,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,sCAAqB,CAAA;IACrB,4CAA2B,CAAA;AAC7B,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,6BAAW,CAAA;IACX,uCAAqB,CAAA;AACvB,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB;AAED,IAAY,QAoBX;AApBD,WAAY,QAAQ;IAClB,6BAAiB,CAAA;IACjB,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,6BAAiB,CAAA;IACjB,qCAAyB,CAAA;IACzB,qBAAS,CAAA;IACT,+BAAmB,CAAA;IACnB,+BAAmB,CAAA;IACnB,yBAAa,CAAA;IACb,+CAAmC,CAAA;IACnC,mCAAuB,CAAA;IACvB,uCAA2B,CAAA;IAC3B,yBAAa,CAAA;IACb,uCAA2B,CAAA;IAC3B,yBAAa,CAAA;IACb,iCAAqB,CAAA;IACrB,+BAAmB,CAAA;IACnB,6BAAiB,CAAA;AACnB,CAAC,EApBW,QAAQ,wBAAR,QAAQ,QAoBnB;AAED,IAAY,UAUX;AAVD,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACnB,qCAAuB,CAAA;IACvB,iCAAmB,CAAA;IACnB,+BAAiB,CAAA;IACjB,qCAAuB,CAAA;IACvB,+BAAiB,CAAA;IACjB,qCAAuB,CAAA;IACvB,iCAAmB,CAAA;IACnB,qCAAuB,CAAA;AACzB,CAAC,EAVW,UAAU,0BAAV,UAAU,QAUrB;AAED,IAAY,aAQX;AARD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,wCAAuB,CAAA;IACvB,kCAAiB,CAAA;IACjB,wCAAuB,CAAA;IACvB,wCAAuB,CAAA;IACvB,0CAAyB,CAAA;IACzB,sCAAqB,CAAA;AACvB,CAAC,EARW,aAAa,6BAAb,aAAa,QAQxB;AAED,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC5B,uCAAiB,CAAA;IACjB,6CAAuB,CAAA;IACvB,iDAA2B,CAAA;IAC3B,yCAAmB,CAAA;IACnB,iCAAW,CAAA;IACX,iDAA2B,CAAA;AAC7B,CAAC,EAPW,kBAAkB,kCAAlB,kBAAkB,QAO7B;AAED,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;IACnB,sDAAuC,CAAA;IACvC,oCAAqB,CAAA;AACvB,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB"}
@@ -0,0 +1,3 @@
1
+ export declare class UnmeshedCommonUtils {
2
+ static createSecureHash(input: string): string;
3
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UnmeshedCommonUtils = void 0;
4
+ const crypto_1 = require("crypto");
5
+ class UnmeshedCommonUtils {
6
+ static createSecureHash(input) {
7
+ try {
8
+ const hash = (0, crypto_1.createHash)("sha256");
9
+ hash.update(input, "utf8");
10
+ return hash.digest("hex");
11
+ }
12
+ catch (e) {
13
+ throw new Error("Error creating hash");
14
+ }
15
+ }
16
+ }
17
+ exports.UnmeshedCommonUtils = UnmeshedCommonUtils;
18
+ //# sourceMappingURL=unmeshedCommonUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unmeshedCommonUtils.js","sourceRoot":"","sources":["../../src/utils/unmeshedCommonUtils.ts"],"names":[],"mappings":";;;AAAA,mCAAoC;AAEpC,MAAa,mBAAmB;IAC9B,MAAM,CAAC,gBAAgB,CAAC,KAAa;QACnC,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,IAAA,mBAAU,EAAC,QAAQ,CAAC,CAAC;YAClC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QACzC,CAAC;IACH,CAAC;CACF;AAVD,kDAUC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unmeshed/sdk",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "scripts": {
5
5
  "build": "tsc --build --verbose",
6
6
  "dev": "tsc && node dist/sample/sampleServer.js",
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/unmeshed-javascript-sdk.iml" filepath="$PROJECT_DIR$/.idea/unmeshed-javascript-sdk.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$">
5
- <excludeFolder url="file://$MODULE_DIR$/.tmp" />
6
- <excludeFolder url="file://$MODULE_DIR$/temp" />
7
- <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
- </content>
9
- <orderEntry type="inheritedJdk" />
10
- <orderEntry type="sourceFolder" forTests="false" />
11
- </component>
12
- </module>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
6
- </project>
package/p.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "name": "@unmeshed/sdk",
3
- "version": "1.0.10",
4
- "description": "Unmeshed SDK",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "type": "module",
8
- "scripts": {
9
- "build": "tsc",
10
- "dev": "tsc && node dist/sample/sampleServer.js",
11
- "start": "tsc && node dist/sample/sampleServer.js",
12
- "publishToNpm": "tsc && npm publish --access public"
13
- },
14
- "files": [
15
- "/dist"
16
- ],
17
- "dependencies": {
18
- "@types/axios": "^0.14.4",
19
- "axios": "^1.7.9",
20
- "dotenv": "^16.4.7"
21
- },
22
- "devDependencies": {
23
- "@types/node": "^22.10.6"
24
- }
25
- }
package/tsconfig.json DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "extends": "@tsconfig/node18/tsconfig.json",
3
- "compilerOptions": {
4
- "composite": true,
5
- "incremental": true,
6
- "module": "commonjs",
7
- "moduleResolution": "node",
8
- "sourceMap": true,
9
- "experimentalDecorators": true,
10
- "outDir": "./dist",
11
- "rootDir": "./src",
12
- "noEmit": false
13
- },
14
- "paths": {
15
- "@unmeshed/*": [
16
- "src/*"
17
- ]
18
- },
19
- "files": [
20
- "src/index.ts",
21
- "src/types/index.ts",
22
- "src/utils/unmeshedCommonUtils.ts",
23
- "src/apiClient.ts",
24
- "src/poller/pollerClientImpl.ts",
25
- "src/process/processClientImpl.ts",
26
- "src/registration/registrationClientImpl.ts",
27
- "src/sampleTest.ts"
28
- ]
29
- }