@bluecopa/core 0.1.83 → 0.1.86
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/README.md +0 -23
- package/dist/api/index.d.ts +0 -1
- package/dist/api/metric/getData.d.ts +7 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.es.js +54 -444
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/api/webcron/executions.d.ts +0 -4
- package/dist/api/webcron/index.d.ts +0 -7
- package/dist/api/webcron/inspection.d.ts +0 -7
- package/dist/api/webcron/schedules.d.ts +0 -9
- package/dist/api/webcron/tasks.d.ts +0 -10
- package/dist/api/webcron/trigger.d.ts +0 -15
- package/dist/api/webcron/types.d.ts +0 -170
- package/dist/api/webcron/webhooks.d.ts +0 -12
package/dist/index.es.js
CHANGED
|
@@ -149,7 +149,7 @@ async function getAllUsers() {
|
|
|
149
149
|
throw { message, status };
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
const index$
|
|
152
|
+
const index$o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
153
153
|
__proto__: null,
|
|
154
154
|
getAllUsers,
|
|
155
155
|
getLoggedInUserDetails
|
|
@@ -171,7 +171,7 @@ async function triggerHttpWorkflowById({
|
|
|
171
171
|
throw { message, status };
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
async function triggerWorkflowById
|
|
174
|
+
async function triggerWorkflowById({
|
|
175
175
|
parentId,
|
|
176
176
|
triggerBy
|
|
177
177
|
}) {
|
|
@@ -229,13 +229,13 @@ async function getAllHttpTriggers() {
|
|
|
229
229
|
throw { message, status };
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
|
-
const index$
|
|
232
|
+
const index$n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
233
233
|
__proto__: null,
|
|
234
234
|
WorkflowStatus,
|
|
235
235
|
getAllHttpTriggers,
|
|
236
236
|
getWorkflowInstanceStatusById,
|
|
237
237
|
triggerHttpWorkflowById,
|
|
238
|
-
triggerWorkflowById
|
|
238
|
+
triggerWorkflowById
|
|
239
239
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
240
240
|
async function getFileUrlByFileId({
|
|
241
241
|
key,
|
|
@@ -361,7 +361,7 @@ async function getFileByFolderIdAndName({
|
|
|
361
361
|
throw data !== void 0 ? { message, status, data } : { message, status };
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
const index$
|
|
364
|
+
const index$m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
365
365
|
__proto__: null,
|
|
366
366
|
fileDownload,
|
|
367
367
|
fileUpload,
|
|
@@ -456,7 +456,7 @@ const runDefinition = async (props) => {
|
|
|
456
456
|
};
|
|
457
457
|
}
|
|
458
458
|
};
|
|
459
|
-
const index$
|
|
459
|
+
const index$l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
460
460
|
__proto__: null,
|
|
461
461
|
runDefinition,
|
|
462
462
|
runPublishedDefinition,
|
|
@@ -494,7 +494,7 @@ const getWorksheetsByType = async (type) => {
|
|
|
494
494
|
throw { message, status };
|
|
495
495
|
}
|
|
496
496
|
};
|
|
497
|
-
const index$
|
|
497
|
+
const index$k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
498
498
|
__proto__: null,
|
|
499
499
|
getWorksheets,
|
|
500
500
|
getWorksheetsByType
|
|
@@ -10030,6 +10030,7 @@ function applyTargetedBindings(fileRead, bindings) {
|
|
|
10030
10030
|
result = applyPipelineBindings(result, bindings);
|
|
10031
10031
|
result = applyScheduleBindings(result, bindings);
|
|
10032
10032
|
result = applyWorkbookBindings(result, bindings);
|
|
10033
|
+
result = applyReconBindings(result, bindings);
|
|
10033
10034
|
return result;
|
|
10034
10035
|
}
|
|
10035
10036
|
async function fetchSolutionBindings() {
|
|
@@ -10060,7 +10061,7 @@ async function applySolutionBindings(fileRead, definitionType) {
|
|
|
10060
10061
|
const bindings = await fetchSolutionBindings();
|
|
10061
10062
|
return applyBindings(fileRead, bindings, definitionType);
|
|
10062
10063
|
}
|
|
10063
|
-
const index$
|
|
10064
|
+
const index$j = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
10064
10065
|
__proto__: null,
|
|
10065
10066
|
applyBindings,
|
|
10066
10067
|
applySolutionBindings,
|
|
@@ -10125,7 +10126,7 @@ const resolveBoundId = (rawId, bindings) => {
|
|
|
10125
10126
|
};
|
|
10126
10127
|
const getData$3 = async (metricSheetId, options) => {
|
|
10127
10128
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
10128
|
-
const bindings = await fetchSolutionBindings();
|
|
10129
|
+
const bindings = (options == null ? void 0 : options.solutionBindings) ?? await fetchSolutionBindings();
|
|
10129
10130
|
const resolvedMetricSheetId = resolveBoundId(metricSheetId, bindings);
|
|
10130
10131
|
const worksheets = await getWorksheets([resolvedMetricSheetId]);
|
|
10131
10132
|
if (_.isEmpty(worksheets)) return {};
|
|
@@ -10233,7 +10234,8 @@ const getData$3 = async (metricSheetId, options) => {
|
|
|
10233
10234
|
lastModifiedDate: hydratedSheet.lastModifiedDate
|
|
10234
10235
|
},
|
|
10235
10236
|
variable: variableName,
|
|
10236
|
-
describe: parentTableVariable
|
|
10237
|
+
describe: parentTableVariable,
|
|
10238
|
+
solutionBindings: bindings
|
|
10237
10239
|
})
|
|
10238
10240
|
);
|
|
10239
10241
|
});
|
|
@@ -10247,7 +10249,8 @@ const getData$3 = async (metricSheetId, options) => {
|
|
|
10247
10249
|
lastModifiedDate: hydratedSheet.lastModifiedDate
|
|
10248
10250
|
},
|
|
10249
10251
|
variable: variableName,
|
|
10250
|
-
describe: parentTableVariable
|
|
10252
|
+
describe: parentTableVariable,
|
|
10253
|
+
solutionBindings: bindings
|
|
10251
10254
|
})).data;
|
|
10252
10255
|
resultData = result.data;
|
|
10253
10256
|
}
|
|
@@ -10255,7 +10258,7 @@ const getData$3 = async (metricSheetId, options) => {
|
|
|
10255
10258
|
resultData = _.flatten(resultData);
|
|
10256
10259
|
return { data: resultData };
|
|
10257
10260
|
};
|
|
10258
|
-
const index$
|
|
10261
|
+
const index$i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
10259
10262
|
__proto__: null,
|
|
10260
10263
|
getData: getData$3
|
|
10261
10264
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -10410,7 +10413,7 @@ async function checkSubscriptionStatus(userId, threadId) {
|
|
|
10410
10413
|
throw { message, status };
|
|
10411
10414
|
}
|
|
10412
10415
|
}
|
|
10413
|
-
const index$
|
|
10416
|
+
const index$h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
10414
10417
|
__proto__: null,
|
|
10415
10418
|
checkSubscriptionStatus,
|
|
10416
10419
|
createThread,
|
|
@@ -10615,7 +10618,7 @@ const getAllDatasets = async () => {
|
|
|
10615
10618
|
throw { message, status };
|
|
10616
10619
|
}
|
|
10617
10620
|
};
|
|
10618
|
-
const index$
|
|
10621
|
+
const index$g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
10619
10622
|
__proto__: null,
|
|
10620
10623
|
getAllDatasets,
|
|
10621
10624
|
getData: getData$2,
|
|
@@ -10934,7 +10937,7 @@ const deleteRow = async (tableId, rowId, idField = "_copa_id") => {
|
|
|
10934
10937
|
throw { message, status };
|
|
10935
10938
|
}
|
|
10936
10939
|
};
|
|
10937
|
-
const index$
|
|
10940
|
+
const index$f = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
10938
10941
|
__proto__: null,
|
|
10939
10942
|
deleteRow,
|
|
10940
10943
|
getData: getData$1,
|
|
@@ -11028,7 +11031,7 @@ async function publishWorkbook({
|
|
|
11028
11031
|
throw { message, status };
|
|
11029
11032
|
}
|
|
11030
11033
|
}
|
|
11031
|
-
const index$
|
|
11034
|
+
const index$e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11032
11035
|
__proto__: null,
|
|
11033
11036
|
getPublishedWorkbookById,
|
|
11034
11037
|
getWorkbookDetails,
|
|
@@ -11296,7 +11299,7 @@ const getRunResultById = async (runId) => {
|
|
|
11296
11299
|
throw { message, status };
|
|
11297
11300
|
}
|
|
11298
11301
|
};
|
|
11299
|
-
const index$
|
|
11302
|
+
const index$d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11300
11303
|
__proto__: null,
|
|
11301
11304
|
createNewRun,
|
|
11302
11305
|
getData,
|
|
@@ -11326,7 +11329,7 @@ async function getTaskDetails({
|
|
|
11326
11329
|
throw { message, status };
|
|
11327
11330
|
}
|
|
11328
11331
|
}
|
|
11329
|
-
const index$
|
|
11332
|
+
const index$c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11330
11333
|
__proto__: null,
|
|
11331
11334
|
getTaskDetails
|
|
11332
11335
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -11372,7 +11375,7 @@ async function getAllReconWorkflows() {
|
|
|
11372
11375
|
throw { message, status };
|
|
11373
11376
|
}
|
|
11374
11377
|
}
|
|
11375
|
-
const index$
|
|
11378
|
+
const index$b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11376
11379
|
__proto__: null,
|
|
11377
11380
|
getAllReconWorkflows,
|
|
11378
11381
|
runRecon
|
|
@@ -11473,7 +11476,7 @@ async function createOrUpdateForm({
|
|
|
11473
11476
|
throw { message, status: status2 };
|
|
11474
11477
|
}
|
|
11475
11478
|
}
|
|
11476
|
-
const index$
|
|
11479
|
+
const index$a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11477
11480
|
__proto__: null,
|
|
11478
11481
|
createOrUpdateForm,
|
|
11479
11482
|
getFormById,
|
|
@@ -11514,7 +11517,7 @@ async function createAuditLog(params) {
|
|
|
11514
11517
|
throw { message, status };
|
|
11515
11518
|
}
|
|
11516
11519
|
}
|
|
11517
|
-
const index$
|
|
11520
|
+
const index$9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11518
11521
|
__proto__: null,
|
|
11519
11522
|
createAuditLog,
|
|
11520
11523
|
getAuditLogs
|
|
@@ -11533,7 +11536,7 @@ async function getAllTemplatedPipelines() {
|
|
|
11533
11536
|
throw { message, status };
|
|
11534
11537
|
}
|
|
11535
11538
|
}
|
|
11536
|
-
const index$
|
|
11539
|
+
const index$8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11537
11540
|
__proto__: null,
|
|
11538
11541
|
getAllTemplatedPipelines
|
|
11539
11542
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -11658,7 +11661,7 @@ async function deleteProcessTrigger(id) {
|
|
|
11658
11661
|
throw { message, status };
|
|
11659
11662
|
}
|
|
11660
11663
|
}
|
|
11661
|
-
const index$
|
|
11664
|
+
const index$7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11662
11665
|
__proto__: null,
|
|
11663
11666
|
deleteProcessTrigger,
|
|
11664
11667
|
getTriggersBySheet,
|
|
@@ -11756,7 +11759,7 @@ async function createInboxItemPerUser(data) {
|
|
|
11756
11759
|
throw { message, status };
|
|
11757
11760
|
}
|
|
11758
11761
|
}
|
|
11759
|
-
const index$
|
|
11762
|
+
const index$6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11760
11763
|
__proto__: null,
|
|
11761
11764
|
createInboxItemPerUser,
|
|
11762
11765
|
getAllInboxItems,
|
|
@@ -11784,7 +11787,7 @@ async function getPermissions(params) {
|
|
|
11784
11787
|
throw { message, status };
|
|
11785
11788
|
}
|
|
11786
11789
|
}
|
|
11787
|
-
const index$
|
|
11790
|
+
const index$5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11788
11791
|
__proto__: null,
|
|
11789
11792
|
getPermissions
|
|
11790
11793
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -11802,7 +11805,7 @@ async function getClientIp() {
|
|
|
11802
11805
|
throw { message, status };
|
|
11803
11806
|
}
|
|
11804
11807
|
}
|
|
11805
|
-
const index$
|
|
11808
|
+
const index$4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11806
11809
|
__proto__: null,
|
|
11807
11810
|
getClientIp
|
|
11808
11811
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -11937,7 +11940,7 @@ async function getMessageBySenderId(params) {
|
|
|
11937
11940
|
throw { message, status };
|
|
11938
11941
|
}
|
|
11939
11942
|
}
|
|
11940
|
-
const index$
|
|
11943
|
+
const index$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11941
11944
|
__proto__: null,
|
|
11942
11945
|
createConversation,
|
|
11943
11946
|
getAllConversations,
|
|
@@ -12202,7 +12205,7 @@ async function agentGetCallFromHold(token, sessionSid, holdType = "SIMPLE") {
|
|
|
12202
12205
|
throw { message, status };
|
|
12203
12206
|
}
|
|
12204
12207
|
}
|
|
12205
|
-
const index$
|
|
12208
|
+
const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12206
12209
|
__proto__: null,
|
|
12207
12210
|
agentDisconnect,
|
|
12208
12211
|
agentGetCallFromHold,
|
|
@@ -12224,398 +12227,6 @@ const index$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
12224
12227
|
processManualDial,
|
|
12225
12228
|
refreshToken
|
|
12226
12229
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
12227
|
-
const BASE$4 = "/webcron/webhooks";
|
|
12228
|
-
async function listWebhooks() {
|
|
12229
|
-
var _a, _b, _c, _d;
|
|
12230
|
-
try {
|
|
12231
|
-
const response = await apiClient.get(BASE$4);
|
|
12232
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12233
|
-
} catch (error) {
|
|
12234
|
-
const e = error;
|
|
12235
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to list webhooks", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12236
|
-
}
|
|
12237
|
-
}
|
|
12238
|
-
async function createWebhook(data) {
|
|
12239
|
-
var _a, _b, _c, _d, _e, _f;
|
|
12240
|
-
if (!((_a = data.name) == null ? void 0 : _a.trim())) throw { message: "name is required", status: 400 };
|
|
12241
|
-
if (!((_b = data.url) == null ? void 0 : _b.trim())) throw { message: "url is required", status: 400 };
|
|
12242
|
-
try {
|
|
12243
|
-
const response = await apiClient.post(BASE$4, data);
|
|
12244
|
-
return ((_c = response.data) == null ? void 0 : _c.data) ?? response.data;
|
|
12245
|
-
} catch (error) {
|
|
12246
|
-
const e = error;
|
|
12247
|
-
throw { message: ((_e = (_d = e.response) == null ? void 0 : _d.data) == null ? void 0 : _e.message) || "Failed to create webhook", status: ((_f = e.response) == null ? void 0 : _f.status) || 500 };
|
|
12248
|
-
}
|
|
12249
|
-
}
|
|
12250
|
-
async function getWebhook(id) {
|
|
12251
|
-
var _a, _b, _c, _d;
|
|
12252
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12253
|
-
try {
|
|
12254
|
-
const response = await apiClient.get(`${BASE$4}/${id}`);
|
|
12255
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12256
|
-
} catch (error) {
|
|
12257
|
-
const e = error;
|
|
12258
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to get webhook", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12259
|
-
}
|
|
12260
|
-
}
|
|
12261
|
-
async function updateWebhook(id, data) {
|
|
12262
|
-
var _a, _b, _c, _d;
|
|
12263
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12264
|
-
try {
|
|
12265
|
-
const response = await apiClient.put(`${BASE$4}/${id}`, data);
|
|
12266
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12267
|
-
} catch (error) {
|
|
12268
|
-
const e = error;
|
|
12269
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to update webhook", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12270
|
-
}
|
|
12271
|
-
}
|
|
12272
|
-
async function deleteWebhook(id) {
|
|
12273
|
-
var _a, _b, _c;
|
|
12274
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12275
|
-
try {
|
|
12276
|
-
await apiClient.delete(`${BASE$4}/${id}`);
|
|
12277
|
-
} catch (error) {
|
|
12278
|
-
const e = error;
|
|
12279
|
-
throw { message: ((_b = (_a = e.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || "Failed to delete webhook", status: ((_c = e.response) == null ? void 0 : _c.status) || 500 };
|
|
12280
|
-
}
|
|
12281
|
-
}
|
|
12282
|
-
async function testWebhook(id) {
|
|
12283
|
-
var _a, _b, _c, _d;
|
|
12284
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12285
|
-
try {
|
|
12286
|
-
const response = await apiClient.post(`${BASE$4}/${id}/test`);
|
|
12287
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12288
|
-
} catch (error) {
|
|
12289
|
-
const e = error;
|
|
12290
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to test webhook", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12291
|
-
}
|
|
12292
|
-
}
|
|
12293
|
-
async function getWebhookExecutions(id, params) {
|
|
12294
|
-
var _a, _b, _c, _d;
|
|
12295
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12296
|
-
try {
|
|
12297
|
-
const response = await apiClient.get(`${BASE$4}/${id}/executions`, { params });
|
|
12298
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12299
|
-
} catch (error) {
|
|
12300
|
-
const e = error;
|
|
12301
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to get webhook executions", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12302
|
-
}
|
|
12303
|
-
}
|
|
12304
|
-
async function getWebhookSchedules(id) {
|
|
12305
|
-
var _a, _b, _c, _d;
|
|
12306
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12307
|
-
try {
|
|
12308
|
-
const response = await apiClient.get(`${BASE$4}/${id}/schedules`);
|
|
12309
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12310
|
-
} catch (error) {
|
|
12311
|
-
const e = error;
|
|
12312
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to get webhook schedules", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12313
|
-
}
|
|
12314
|
-
}
|
|
12315
|
-
async function createWebhookSchedule(webhookId, data) {
|
|
12316
|
-
var _a, _b, _c, _d;
|
|
12317
|
-
if (!(webhookId == null ? void 0 : webhookId.trim())) throw { message: "webhookId is required", status: 400 };
|
|
12318
|
-
try {
|
|
12319
|
-
const response = await apiClient.post(`${BASE$4}/${webhookId}/schedules`, data);
|
|
12320
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12321
|
-
} catch (error) {
|
|
12322
|
-
const e = error;
|
|
12323
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to create schedule", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12324
|
-
}
|
|
12325
|
-
}
|
|
12326
|
-
const BASE$3 = "/webcron/schedules";
|
|
12327
|
-
async function getSchedule(id) {
|
|
12328
|
-
var _a, _b, _c, _d;
|
|
12329
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12330
|
-
try {
|
|
12331
|
-
const response = await apiClient.get(`${BASE$3}/${id}`);
|
|
12332
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12333
|
-
} catch (error) {
|
|
12334
|
-
const e = error;
|
|
12335
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to get schedule", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12336
|
-
}
|
|
12337
|
-
}
|
|
12338
|
-
async function updateSchedule(id, data) {
|
|
12339
|
-
var _a, _b, _c, _d;
|
|
12340
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12341
|
-
try {
|
|
12342
|
-
const response = await apiClient.put(`${BASE$3}/${id}`, data);
|
|
12343
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12344
|
-
} catch (error) {
|
|
12345
|
-
const e = error;
|
|
12346
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to update schedule", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12347
|
-
}
|
|
12348
|
-
}
|
|
12349
|
-
async function deleteSchedule(id) {
|
|
12350
|
-
var _a, _b, _c;
|
|
12351
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12352
|
-
try {
|
|
12353
|
-
await apiClient.delete(`${BASE$3}/${id}`);
|
|
12354
|
-
} catch (error) {
|
|
12355
|
-
const e = error;
|
|
12356
|
-
throw { message: ((_b = (_a = e.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || "Failed to delete schedule", status: ((_c = e.response) == null ? void 0 : _c.status) || 500 };
|
|
12357
|
-
}
|
|
12358
|
-
}
|
|
12359
|
-
async function pauseSchedule(id) {
|
|
12360
|
-
var _a, _b, _c, _d;
|
|
12361
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12362
|
-
try {
|
|
12363
|
-
const response = await apiClient.post(`${BASE$3}/${id}/pause`);
|
|
12364
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12365
|
-
} catch (error) {
|
|
12366
|
-
const e = error;
|
|
12367
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to pause schedule", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12368
|
-
}
|
|
12369
|
-
}
|
|
12370
|
-
async function resumeSchedule(id) {
|
|
12371
|
-
var _a, _b, _c, _d;
|
|
12372
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12373
|
-
try {
|
|
12374
|
-
const response = await apiClient.post(`${BASE$3}/${id}/resume`);
|
|
12375
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12376
|
-
} catch (error) {
|
|
12377
|
-
const e = error;
|
|
12378
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to resume schedule", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12379
|
-
}
|
|
12380
|
-
}
|
|
12381
|
-
async function triggerSchedule(id) {
|
|
12382
|
-
var _a, _b, _c, _d;
|
|
12383
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12384
|
-
try {
|
|
12385
|
-
const response = await apiClient.post(`${BASE$3}/${id}/trigger`);
|
|
12386
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12387
|
-
} catch (error) {
|
|
12388
|
-
const e = error;
|
|
12389
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to trigger schedule", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12390
|
-
}
|
|
12391
|
-
}
|
|
12392
|
-
const BASE$2 = "/webcron/executions";
|
|
12393
|
-
async function listExecutions(params) {
|
|
12394
|
-
var _a, _b, _c, _d;
|
|
12395
|
-
try {
|
|
12396
|
-
const response = await apiClient.get(BASE$2, { params });
|
|
12397
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12398
|
-
} catch (error) {
|
|
12399
|
-
const e = error;
|
|
12400
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to list executions", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12401
|
-
}
|
|
12402
|
-
}
|
|
12403
|
-
async function getExecution(id) {
|
|
12404
|
-
var _a, _b, _c, _d;
|
|
12405
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12406
|
-
try {
|
|
12407
|
-
const response = await apiClient.get(`${BASE$2}/${id}`);
|
|
12408
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12409
|
-
} catch (error) {
|
|
12410
|
-
const e = error;
|
|
12411
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to get execution", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12412
|
-
}
|
|
12413
|
-
}
|
|
12414
|
-
async function retryExecution(id) {
|
|
12415
|
-
var _a, _b, _c, _d;
|
|
12416
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12417
|
-
try {
|
|
12418
|
-
const response = await apiClient.post(`${BASE$2}/${id}/retry`);
|
|
12419
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12420
|
-
} catch (error) {
|
|
12421
|
-
const e = error;
|
|
12422
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to retry execution", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12423
|
-
}
|
|
12424
|
-
}
|
|
12425
|
-
const BASE$1 = "/webcron/tasks";
|
|
12426
|
-
async function listTasks() {
|
|
12427
|
-
var _a, _b, _c, _d;
|
|
12428
|
-
try {
|
|
12429
|
-
const response = await apiClient.get(BASE$1);
|
|
12430
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12431
|
-
} catch (error) {
|
|
12432
|
-
const e = error;
|
|
12433
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to list tasks", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12434
|
-
}
|
|
12435
|
-
}
|
|
12436
|
-
async function createTask(data) {
|
|
12437
|
-
var _a, _b, _c, _d, _e;
|
|
12438
|
-
if (!((_a = data.webhookId) == null ? void 0 : _a.trim())) throw { message: "webhookId is required", status: 400 };
|
|
12439
|
-
try {
|
|
12440
|
-
const response = await apiClient.post(BASE$1, data);
|
|
12441
|
-
return ((_b = response.data) == null ? void 0 : _b.data) ?? response.data;
|
|
12442
|
-
} catch (error) {
|
|
12443
|
-
const e = error;
|
|
12444
|
-
throw { message: ((_d = (_c = e.response) == null ? void 0 : _c.data) == null ? void 0 : _d.message) || "Failed to create task", status: ((_e = e.response) == null ? void 0 : _e.status) || 500 };
|
|
12445
|
-
}
|
|
12446
|
-
}
|
|
12447
|
-
async function getTask(id) {
|
|
12448
|
-
var _a, _b, _c, _d;
|
|
12449
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12450
|
-
try {
|
|
12451
|
-
const response = await apiClient.get(`${BASE$1}/${id}`);
|
|
12452
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12453
|
-
} catch (error) {
|
|
12454
|
-
const e = error;
|
|
12455
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to get task", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12456
|
-
}
|
|
12457
|
-
}
|
|
12458
|
-
async function cancelTask(id) {
|
|
12459
|
-
var _a, _b, _c, _d;
|
|
12460
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12461
|
-
try {
|
|
12462
|
-
const response = await apiClient.post(`${BASE$1}/${id}/cancel`);
|
|
12463
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12464
|
-
} catch (error) {
|
|
12465
|
-
const e = error;
|
|
12466
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to cancel task", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12467
|
-
}
|
|
12468
|
-
}
|
|
12469
|
-
async function retryTask(id) {
|
|
12470
|
-
var _a, _b, _c, _d;
|
|
12471
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12472
|
-
try {
|
|
12473
|
-
const response = await apiClient.post(`${BASE$1}/${id}/retry`);
|
|
12474
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12475
|
-
} catch (error) {
|
|
12476
|
-
const e = error;
|
|
12477
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to retry task", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12478
|
-
}
|
|
12479
|
-
}
|
|
12480
|
-
async function progressTask(id, data) {
|
|
12481
|
-
var _a, _b, _c;
|
|
12482
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12483
|
-
try {
|
|
12484
|
-
await apiClient.post(`${BASE$1}/${id}/progress`, data);
|
|
12485
|
-
} catch (error) {
|
|
12486
|
-
const e = error;
|
|
12487
|
-
throw { message: ((_b = (_a = e.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || "Failed to log task progress", status: ((_c = e.response) == null ? void 0 : _c.status) || 500 };
|
|
12488
|
-
}
|
|
12489
|
-
}
|
|
12490
|
-
async function signalTask(id, data, branchId) {
|
|
12491
|
-
var _a, _b, _c, _d;
|
|
12492
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12493
|
-
try {
|
|
12494
|
-
const params = branchId ? { branchId } : void 0;
|
|
12495
|
-
const response = await apiClient.post(`${BASE$1}/${id}/signal`, data, { params });
|
|
12496
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12497
|
-
} catch (error) {
|
|
12498
|
-
const e = error;
|
|
12499
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to signal task", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12500
|
-
}
|
|
12501
|
-
}
|
|
12502
|
-
const BASE = "/webcron/inspection/bins";
|
|
12503
|
-
async function listBins() {
|
|
12504
|
-
var _a, _b, _c, _d;
|
|
12505
|
-
try {
|
|
12506
|
-
const response = await apiClient.get(BASE);
|
|
12507
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12508
|
-
} catch (error) {
|
|
12509
|
-
const e = error;
|
|
12510
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to list bins", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12511
|
-
}
|
|
12512
|
-
}
|
|
12513
|
-
async function createBin(data) {
|
|
12514
|
-
var _a, _b, _c, _d, _e;
|
|
12515
|
-
if (!((_a = data.name) == null ? void 0 : _a.trim())) throw { message: "name is required", status: 400 };
|
|
12516
|
-
try {
|
|
12517
|
-
const response = await apiClient.post(BASE, data);
|
|
12518
|
-
return ((_b = response.data) == null ? void 0 : _b.data) ?? response.data;
|
|
12519
|
-
} catch (error) {
|
|
12520
|
-
const e = error;
|
|
12521
|
-
throw { message: ((_d = (_c = e.response) == null ? void 0 : _c.data) == null ? void 0 : _d.message) || "Failed to create bin", status: ((_e = e.response) == null ? void 0 : _e.status) || 500 };
|
|
12522
|
-
}
|
|
12523
|
-
}
|
|
12524
|
-
async function getBin(id) {
|
|
12525
|
-
var _a, _b, _c, _d;
|
|
12526
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12527
|
-
try {
|
|
12528
|
-
const response = await apiClient.get(`${BASE}/${id}`);
|
|
12529
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12530
|
-
} catch (error) {
|
|
12531
|
-
const e = error;
|
|
12532
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to get bin", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12533
|
-
}
|
|
12534
|
-
}
|
|
12535
|
-
async function deleteBin(id) {
|
|
12536
|
-
var _a, _b, _c;
|
|
12537
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12538
|
-
try {
|
|
12539
|
-
await apiClient.delete(`${BASE}/${id}`);
|
|
12540
|
-
} catch (error) {
|
|
12541
|
-
const e = error;
|
|
12542
|
-
throw { message: ((_b = (_a = e.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || "Failed to delete bin", status: ((_c = e.response) == null ? void 0 : _c.status) || 500 };
|
|
12543
|
-
}
|
|
12544
|
-
}
|
|
12545
|
-
async function getBinRequests(id, params) {
|
|
12546
|
-
var _a, _b, _c, _d;
|
|
12547
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12548
|
-
try {
|
|
12549
|
-
const response = await apiClient.get(`${BASE}/${id}/requests`, { params });
|
|
12550
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12551
|
-
} catch (error) {
|
|
12552
|
-
const e = error;
|
|
12553
|
-
throw { message: ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || "Failed to get bin requests", status: ((_d = e.response) == null ? void 0 : _d.status) || 500 };
|
|
12554
|
-
}
|
|
12555
|
-
}
|
|
12556
|
-
async function clearBinRequests(id) {
|
|
12557
|
-
var _a, _b, _c;
|
|
12558
|
-
if (!(id == null ? void 0 : id.trim())) throw { message: "id is required", status: 400 };
|
|
12559
|
-
try {
|
|
12560
|
-
await apiClient.delete(`${BASE}/${id}/requests`);
|
|
12561
|
-
} catch (error) {
|
|
12562
|
-
const e = error;
|
|
12563
|
-
throw { message: ((_b = (_a = e.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || "Failed to clear bin requests", status: ((_c = e.response) == null ? void 0 : _c.status) || 500 };
|
|
12564
|
-
}
|
|
12565
|
-
}
|
|
12566
|
-
async function triggerWorkflowById(id, data) {
|
|
12567
|
-
var _a, _b, _c, _d;
|
|
12568
|
-
if (!(id == null ? void 0 : id.trim())) {
|
|
12569
|
-
throw { message: "id is required", status: 400 };
|
|
12570
|
-
}
|
|
12571
|
-
try {
|
|
12572
|
-
const response = await apiClient.post(
|
|
12573
|
-
`/workflow/trigger/${id.trim()}`,
|
|
12574
|
-
data ?? {}
|
|
12575
|
-
);
|
|
12576
|
-
return ((_a = response.data) == null ? void 0 : _a.data) ?? response.data;
|
|
12577
|
-
} catch (error) {
|
|
12578
|
-
const e = error;
|
|
12579
|
-
const message = ((_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || e.message || "Failed to trigger workflow";
|
|
12580
|
-
const status = ((_d = e.response) == null ? void 0 : _d.status) || 500;
|
|
12581
|
-
throw { message, status };
|
|
12582
|
-
}
|
|
12583
|
-
}
|
|
12584
|
-
const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12585
|
-
__proto__: null,
|
|
12586
|
-
cancelTask,
|
|
12587
|
-
clearBinRequests,
|
|
12588
|
-
createBin,
|
|
12589
|
-
createTask,
|
|
12590
|
-
createWebhook,
|
|
12591
|
-
createWebhookSchedule,
|
|
12592
|
-
deleteBin,
|
|
12593
|
-
deleteSchedule,
|
|
12594
|
-
deleteWebhook,
|
|
12595
|
-
getBin,
|
|
12596
|
-
getBinRequests,
|
|
12597
|
-
getExecution,
|
|
12598
|
-
getSchedule,
|
|
12599
|
-
getTask,
|
|
12600
|
-
getWebhook,
|
|
12601
|
-
getWebhookExecutions,
|
|
12602
|
-
getWebhookSchedules,
|
|
12603
|
-
listBins,
|
|
12604
|
-
listExecutions,
|
|
12605
|
-
listTasks,
|
|
12606
|
-
listWebhooks,
|
|
12607
|
-
pauseSchedule,
|
|
12608
|
-
progressTask,
|
|
12609
|
-
resumeSchedule,
|
|
12610
|
-
retryExecution,
|
|
12611
|
-
retryTask,
|
|
12612
|
-
signalTask,
|
|
12613
|
-
testWebhook,
|
|
12614
|
-
triggerSchedule,
|
|
12615
|
-
triggerWorkflowById,
|
|
12616
|
-
updateSchedule,
|
|
12617
|
-
updateWebhook
|
|
12618
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
12619
12230
|
const renderTemplate = async (body) => {
|
|
12620
12231
|
var _a, _b, _c;
|
|
12621
12232
|
try {
|
|
@@ -12646,30 +12257,29 @@ const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
12646
12257
|
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12647
12258
|
__proto__: null,
|
|
12648
12259
|
apiClient,
|
|
12649
|
-
audit: index$
|
|
12650
|
-
chat: index$
|
|
12651
|
-
clientIp: index$
|
|
12652
|
-
dataset: index$
|
|
12653
|
-
definition: index$
|
|
12654
|
-
emailEngine: index$
|
|
12655
|
-
files: index$
|
|
12656
|
-
form: index$
|
|
12657
|
-
inboxItems: index$
|
|
12658
|
-
inputTable: index$
|
|
12659
|
-
metric: index$
|
|
12660
|
-
permissions: index$
|
|
12661
|
-
process: index$
|
|
12662
|
-
recon: index$
|
|
12663
|
-
statement: index$
|
|
12664
|
-
task: index$
|
|
12665
|
-
tcn: index$
|
|
12666
|
-
templatedPipeline: index$
|
|
12260
|
+
audit: index$9,
|
|
12261
|
+
chat: index$h,
|
|
12262
|
+
clientIp: index$4,
|
|
12263
|
+
dataset: index$g,
|
|
12264
|
+
definition: index$l,
|
|
12265
|
+
emailEngine: index$3,
|
|
12266
|
+
files: index$m,
|
|
12267
|
+
form: index$a,
|
|
12268
|
+
inboxItems: index$6,
|
|
12269
|
+
inputTable: index$f,
|
|
12270
|
+
metric: index$i,
|
|
12271
|
+
permissions: index$5,
|
|
12272
|
+
process: index$7,
|
|
12273
|
+
recon: index$b,
|
|
12274
|
+
statement: index$d,
|
|
12275
|
+
task: index$c,
|
|
12276
|
+
tcn: index$2,
|
|
12277
|
+
templatedPipeline: index$8,
|
|
12667
12278
|
templates: index$1,
|
|
12668
|
-
user: index$
|
|
12669
|
-
|
|
12670
|
-
|
|
12671
|
-
|
|
12672
|
-
worksheet: index$l
|
|
12279
|
+
user: index$o,
|
|
12280
|
+
workbook: index$e,
|
|
12281
|
+
workflow: index$n,
|
|
12282
|
+
worksheet: index$k
|
|
12673
12283
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
12674
12284
|
var InputTableColumnType = /* @__PURE__ */ ((InputTableColumnType2) => {
|
|
12675
12285
|
InputTableColumnType2["UUID"] = "uuid";
|
|
@@ -14746,6 +14356,6 @@ export {
|
|
|
14746
14356
|
copaInputTableDb,
|
|
14747
14357
|
setConfig as copaSetConfig,
|
|
14748
14358
|
bluecopaTailwindConfig as copaTailwindConfig,
|
|
14749
|
-
index$
|
|
14359
|
+
index$j as copaUtils
|
|
14750
14360
|
};
|
|
14751
14361
|
//# sourceMappingURL=index.es.js.map
|