@bluecopa/core 0.1.91 → 0.1.93
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/api/process/executeNow.d.ts +14 -0
- package/dist/api/process/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +20 -0
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ExecuteNowResponse {
|
|
2
|
+
runId?: string;
|
|
3
|
+
status?: string;
|
|
4
|
+
errorMessage?: string;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Triggers an immediate ("run now") execution of a process trigger.
|
|
9
|
+
* @param triggerId - Required: the process trigger id
|
|
10
|
+
* @param scheduleName - Optional: a specific schedule to run; omit to run the trigger
|
|
11
|
+
* @returns Promise<ExecuteNowResponse>
|
|
12
|
+
* @throws { message, status } on failure
|
|
13
|
+
*/
|
|
14
|
+
export declare function executeNow(triggerId: string, scheduleName?: string): Promise<ExecuteNowResponse>;
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export type { DeleteProcessTriggerResponse, } from './api/process/deleteProcessT
|
|
|
21
21
|
export type { PauseScheduleResponse, } from './api/process/pauseSchedule';
|
|
22
22
|
export type { ResumeScheduleResponse, } from './api/process/resumeSchedule';
|
|
23
23
|
export type { ScheduleStatusResponse, } from './api/process/getScheduleStatus';
|
|
24
|
+
export type { ExecuteNowResponse, } from './api/process/executeNow';
|
|
24
25
|
export type { FileUploadRequest, FileUploadResponse, } from './api/file/fileUpload';
|
|
25
26
|
export type { FileDownloadRequest } from './api/file/fileDownload';
|
|
26
27
|
export type { GetFileUrlRequest, GetFileUrlResponse, } from './api/file/getFileUrlByFileId';
|
package/dist/index.es.js
CHANGED
|
@@ -11726,9 +11726,29 @@ async function getScheduleStatus(triggerId, scheduleName) {
|
|
|
11726
11726
|
throw { message, status };
|
|
11727
11727
|
}
|
|
11728
11728
|
}
|
|
11729
|
+
async function executeNow(triggerId, scheduleName) {
|
|
11730
|
+
var _a, _b, _c, _d;
|
|
11731
|
+
if (!(triggerId == null ? void 0 : triggerId.trim())) {
|
|
11732
|
+
throw { message: "triggerId is required", status: 400 };
|
|
11733
|
+
}
|
|
11734
|
+
try {
|
|
11735
|
+
const response = await apiClient.post(
|
|
11736
|
+
`/process/trigger/execute-now/${triggerId.trim()}`,
|
|
11737
|
+
void 0,
|
|
11738
|
+
(scheduleName == null ? void 0 : scheduleName.trim()) ? { params: { scheduleName: scheduleName.trim() } } : void 0
|
|
11739
|
+
);
|
|
11740
|
+
const data = ((_a = response.data) == null ? void 0 : _a.data) ?? response.data ?? {};
|
|
11741
|
+
return data;
|
|
11742
|
+
} catch (error) {
|
|
11743
|
+
const message = ((_c = (_b = error.response) == null ? void 0 : _b.data) == null ? void 0 : _c.message) || error.message || "Failed to execute now";
|
|
11744
|
+
const status = ((_d = error.response) == null ? void 0 : _d.status) || 500;
|
|
11745
|
+
throw { message, status };
|
|
11746
|
+
}
|
|
11747
|
+
}
|
|
11729
11748
|
const index$7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11730
11749
|
__proto__: null,
|
|
11731
11750
|
deleteProcessTrigger,
|
|
11751
|
+
executeNow,
|
|
11732
11752
|
getScheduleStatus,
|
|
11733
11753
|
getTriggersBySheet,
|
|
11734
11754
|
markTaskDone,
|