@bluecopa/core 0.1.19 → 0.1.21
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.es.js +20 -19
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -196,7 +196,7 @@ async function fileUpload({
|
|
|
196
196
|
if (!data) {
|
|
197
197
|
throw { message: "Data is required", status: 400 };
|
|
198
198
|
}
|
|
199
|
-
const response = await apiClient.post("/
|
|
199
|
+
const response = await apiClient.post("/file/file-upload", {
|
|
200
200
|
path,
|
|
201
201
|
contentType,
|
|
202
202
|
method,
|
|
@@ -222,7 +222,7 @@ async function fileDownload({
|
|
|
222
222
|
throw { message: "File ID is required", status: 400 };
|
|
223
223
|
}
|
|
224
224
|
const response = await apiClient.get(
|
|
225
|
-
`/
|
|
225
|
+
`/file/file-download?fileId=${encodeURIComponent(fileId)}`
|
|
226
226
|
);
|
|
227
227
|
if (!response.data || !response.data.data) {
|
|
228
228
|
throw { message: "Failed to download file", status: 500 };
|
|
@@ -5957,10 +5957,11 @@ const getData$2 = async (datasetId, options) => {
|
|
|
5957
5957
|
variable: datasetId,
|
|
5958
5958
|
limit: (options == null ? void 0 : options.limit) || 1e3
|
|
5959
5959
|
});
|
|
5960
|
-
if (!
|
|
5960
|
+
if (!response) {
|
|
5961
5961
|
throw new Error("No data returned from API");
|
|
5962
5962
|
}
|
|
5963
|
-
|
|
5963
|
+
console.log("Data returned from API", response);
|
|
5964
|
+
return { data: response };
|
|
5964
5965
|
} catch (error) {
|
|
5965
5966
|
const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "An unexpected error occurred while fetching data for the dataset";
|
|
5966
5967
|
const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
|
|
@@ -6227,7 +6228,7 @@ async function getWorkbookDetails({
|
|
|
6227
6228
|
}
|
|
6228
6229
|
console.log("workbookId", workbookId);
|
|
6229
6230
|
const response = await apiClient.get(
|
|
6230
|
-
`/
|
|
6231
|
+
`/workbook/get-workbook-details?workbookId=${encodeURIComponent(workbookId)}`
|
|
6231
6232
|
);
|
|
6232
6233
|
if (!response.data) {
|
|
6233
6234
|
throw { message: "Failed to fetch workbook details", status: 500 };
|
|
@@ -6248,7 +6249,7 @@ async function saveWorkbook({
|
|
|
6248
6249
|
if (!workbook || !workbook.id) {
|
|
6249
6250
|
throw { message: "Workbook with ID is required", status: 400 };
|
|
6250
6251
|
}
|
|
6251
|
-
const response = await apiClient.put("/
|
|
6252
|
+
const response = await apiClient.put("/workbook/save-workbook", {
|
|
6252
6253
|
workbook,
|
|
6253
6254
|
sheetInputs
|
|
6254
6255
|
});
|
|
@@ -6270,7 +6271,7 @@ async function publishWorkbook({
|
|
|
6270
6271
|
if (!workbookId) {
|
|
6271
6272
|
throw { message: "Workbook ID is required", status: 400 };
|
|
6272
6273
|
}
|
|
6273
|
-
const response = await apiClient.post("/
|
|
6274
|
+
const response = await apiClient.post("/workbook/publish-workbook", {
|
|
6274
6275
|
workbookId
|
|
6275
6276
|
});
|
|
6276
6277
|
if (!response.data) {
|
|
@@ -6569,7 +6570,7 @@ async function getTaskDetails({
|
|
|
6569
6570
|
throw { message: "Task ID is required", status: 400 };
|
|
6570
6571
|
}
|
|
6571
6572
|
const response = await apiClient.get(
|
|
6572
|
-
`/
|
|
6573
|
+
`/task/get-task-details?taskId=${encodeURIComponent(taskId)}`
|
|
6573
6574
|
);
|
|
6574
6575
|
if (!response.data) {
|
|
6575
6576
|
throw { message: "Failed to fetch task details", status: 500 };
|
|
@@ -6595,7 +6596,7 @@ async function runRecon({
|
|
|
6595
6596
|
if (!workflowId) {
|
|
6596
6597
|
throw { message: "Workflow ID is required", status: 400 };
|
|
6597
6598
|
}
|
|
6598
|
-
const response = await apiClient.post("/
|
|
6599
|
+
const response = await apiClient.post("/recon/run-recon", {
|
|
6599
6600
|
workflowId,
|
|
6600
6601
|
runId,
|
|
6601
6602
|
fullRefresh
|
|
@@ -6616,7 +6617,7 @@ async function runRecon({
|
|
|
6616
6617
|
async function getAllReconWorkflows() {
|
|
6617
6618
|
var _a, _b, _c;
|
|
6618
6619
|
try {
|
|
6619
|
-
const response = await apiClient.get("/
|
|
6620
|
+
const response = await apiClient.get("/recon/get-all");
|
|
6620
6621
|
if (!response.data || !response.data.data) {
|
|
6621
6622
|
throw { message: "Failed to fetch recon workflows", status: 500 };
|
|
6622
6623
|
}
|
|
@@ -6642,7 +6643,7 @@ async function getFormSchema({
|
|
|
6642
6643
|
throw { message: "Form instance ID and revision are required", status: 400 };
|
|
6643
6644
|
}
|
|
6644
6645
|
const response = await apiClient.get(
|
|
6645
|
-
`/
|
|
6646
|
+
`/form/get-form-schema?formInstanceId=${encodeURIComponent(formInstanceId)}&formRevision=${encodeURIComponent(formRevision)}`
|
|
6646
6647
|
);
|
|
6647
6648
|
if (!response.data) {
|
|
6648
6649
|
throw { message: "Failed to fetch form schema", status: 500 };
|
|
@@ -6663,7 +6664,7 @@ async function getFormData({
|
|
|
6663
6664
|
throw { message: "Form ID is required", status: 400 };
|
|
6664
6665
|
}
|
|
6665
6666
|
const response = await apiClient.get(
|
|
6666
|
-
`/
|
|
6667
|
+
`/form/get-form-data?formId=${encodeURIComponent(formId)}`
|
|
6667
6668
|
);
|
|
6668
6669
|
if (!response.data) {
|
|
6669
6670
|
throw { message: "Failed to fetch form data", status: 500 };
|
|
@@ -6684,7 +6685,7 @@ async function getFormById({
|
|
|
6684
6685
|
throw { message: "Form ID is required", status: 400 };
|
|
6685
6686
|
}
|
|
6686
6687
|
const response = await apiClient.get(
|
|
6687
|
-
`/
|
|
6688
|
+
`/form/get-form-by-id?formId=${encodeURIComponent(formId)}`
|
|
6688
6689
|
);
|
|
6689
6690
|
if (!response.data || !response.data.data) {
|
|
6690
6691
|
throw { message: "Failed to fetch form", status: 500 };
|
|
@@ -6704,7 +6705,7 @@ async function createOrUpdateForm({
|
|
|
6704
6705
|
if (!data) {
|
|
6705
6706
|
throw { message: "Form data is required", status: 400 };
|
|
6706
6707
|
}
|
|
6707
|
-
const response = await apiClient.post("/
|
|
6708
|
+
const response = await apiClient.post("/form/create-or-update-form", {
|
|
6708
6709
|
data
|
|
6709
6710
|
});
|
|
6710
6711
|
if (!response.data || !response.data.data) {
|
|
@@ -6731,7 +6732,7 @@ async function getAuditLogs(params) {
|
|
|
6731
6732
|
throw { message: "Limit is required", status: 400 };
|
|
6732
6733
|
}
|
|
6733
6734
|
const response = await apiClient.post(
|
|
6734
|
-
"/
|
|
6735
|
+
"/audit/get-audit-logs",
|
|
6735
6736
|
params
|
|
6736
6737
|
);
|
|
6737
6738
|
if (!response.data) {
|
|
@@ -6751,7 +6752,7 @@ async function createAuditLog(params) {
|
|
|
6751
6752
|
throw { message: "Audit records array is required", status: 400 };
|
|
6752
6753
|
}
|
|
6753
6754
|
const response = await apiClient.post(
|
|
6754
|
-
"/
|
|
6755
|
+
"/audit/create-audit-log",
|
|
6755
6756
|
params.auditRecords
|
|
6756
6757
|
);
|
|
6757
6758
|
return { success: response.data.success || true };
|
|
@@ -6769,7 +6770,7 @@ const index$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
6769
6770
|
async function getAllTemplatedPipelines() {
|
|
6770
6771
|
var _a, _b, _c;
|
|
6771
6772
|
try {
|
|
6772
|
-
const response = await apiClient.get("/
|
|
6773
|
+
const response = await apiClient.get("/templated-pipeline/get-all");
|
|
6773
6774
|
if (!response.data || !response.data.data) {
|
|
6774
6775
|
throw { message: "Failed to fetch templated pipelines", status: 500 };
|
|
6775
6776
|
}
|
|
@@ -6796,7 +6797,7 @@ async function markTaskDone({
|
|
|
6796
6797
|
if (!data) {
|
|
6797
6798
|
throw { message: "Task completion data is required", status: 400 };
|
|
6798
6799
|
}
|
|
6799
|
-
const response = await apiClient.post("/
|
|
6800
|
+
const response = await apiClient.post("/process/mark-task-done", {
|
|
6800
6801
|
taskId,
|
|
6801
6802
|
data
|
|
6802
6803
|
});
|
|
@@ -6826,7 +6827,7 @@ async function reassignTask({
|
|
|
6826
6827
|
if (!assigneeType || !["USER", "TEAM"].includes(assigneeType)) {
|
|
6827
6828
|
throw { message: "Assignee type must be USER or TEAM", status: 400 };
|
|
6828
6829
|
}
|
|
6829
|
-
const response = await apiClient.post("/
|
|
6830
|
+
const response = await apiClient.post("/process/reassign-task", {
|
|
6830
6831
|
taskId,
|
|
6831
6832
|
newAssignee,
|
|
6832
6833
|
assigneeType
|