@bluecopa/core 0.1.20 → 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 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("/api/v1/file/file-upload", {
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
- `/api/v1/file/file-download?fileId=${encodeURIComponent(fileId)}`
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 };
@@ -6228,7 +6228,7 @@ async function getWorkbookDetails({
6228
6228
  }
6229
6229
  console.log("workbookId", workbookId);
6230
6230
  const response = await apiClient.get(
6231
- `/api/v1/workbook/get-workbook-details?workbookId=${encodeURIComponent(workbookId)}`
6231
+ `/workbook/get-workbook-details?workbookId=${encodeURIComponent(workbookId)}`
6232
6232
  );
6233
6233
  if (!response.data) {
6234
6234
  throw { message: "Failed to fetch workbook details", status: 500 };
@@ -6249,7 +6249,7 @@ async function saveWorkbook({
6249
6249
  if (!workbook || !workbook.id) {
6250
6250
  throw { message: "Workbook with ID is required", status: 400 };
6251
6251
  }
6252
- const response = await apiClient.put("/api/v1/workbook/save-workbook", {
6252
+ const response = await apiClient.put("/workbook/save-workbook", {
6253
6253
  workbook,
6254
6254
  sheetInputs
6255
6255
  });
@@ -6271,7 +6271,7 @@ async function publishWorkbook({
6271
6271
  if (!workbookId) {
6272
6272
  throw { message: "Workbook ID is required", status: 400 };
6273
6273
  }
6274
- const response = await apiClient.post("/api/v1/workbook/publish-workbook", {
6274
+ const response = await apiClient.post("/workbook/publish-workbook", {
6275
6275
  workbookId
6276
6276
  });
6277
6277
  if (!response.data) {
@@ -6570,7 +6570,7 @@ async function getTaskDetails({
6570
6570
  throw { message: "Task ID is required", status: 400 };
6571
6571
  }
6572
6572
  const response = await apiClient.get(
6573
- `/api/v1/task/get-task-details?taskId=${encodeURIComponent(taskId)}`
6573
+ `/task/get-task-details?taskId=${encodeURIComponent(taskId)}`
6574
6574
  );
6575
6575
  if (!response.data) {
6576
6576
  throw { message: "Failed to fetch task details", status: 500 };
@@ -6596,7 +6596,7 @@ async function runRecon({
6596
6596
  if (!workflowId) {
6597
6597
  throw { message: "Workflow ID is required", status: 400 };
6598
6598
  }
6599
- const response = await apiClient.post("/api/v1/recon/run-recon", {
6599
+ const response = await apiClient.post("/recon/run-recon", {
6600
6600
  workflowId,
6601
6601
  runId,
6602
6602
  fullRefresh
@@ -6617,7 +6617,7 @@ async function runRecon({
6617
6617
  async function getAllReconWorkflows() {
6618
6618
  var _a, _b, _c;
6619
6619
  try {
6620
- const response = await apiClient.get("/api/v1/recon/get-all");
6620
+ const response = await apiClient.get("/recon/get-all");
6621
6621
  if (!response.data || !response.data.data) {
6622
6622
  throw { message: "Failed to fetch recon workflows", status: 500 };
6623
6623
  }
@@ -6643,7 +6643,7 @@ async function getFormSchema({
6643
6643
  throw { message: "Form instance ID and revision are required", status: 400 };
6644
6644
  }
6645
6645
  const response = await apiClient.get(
6646
- `/api/v1/form/get-form-schema?formInstanceId=${encodeURIComponent(formInstanceId)}&formRevision=${encodeURIComponent(formRevision)}`
6646
+ `/form/get-form-schema?formInstanceId=${encodeURIComponent(formInstanceId)}&formRevision=${encodeURIComponent(formRevision)}`
6647
6647
  );
6648
6648
  if (!response.data) {
6649
6649
  throw { message: "Failed to fetch form schema", status: 500 };
@@ -6664,7 +6664,7 @@ async function getFormData({
6664
6664
  throw { message: "Form ID is required", status: 400 };
6665
6665
  }
6666
6666
  const response = await apiClient.get(
6667
- `/api/v1/form/get-form-data?formId=${encodeURIComponent(formId)}`
6667
+ `/form/get-form-data?formId=${encodeURIComponent(formId)}`
6668
6668
  );
6669
6669
  if (!response.data) {
6670
6670
  throw { message: "Failed to fetch form data", status: 500 };
@@ -6685,7 +6685,7 @@ async function getFormById({
6685
6685
  throw { message: "Form ID is required", status: 400 };
6686
6686
  }
6687
6687
  const response = await apiClient.get(
6688
- `/api/v1/form/get-form-by-id?formId=${encodeURIComponent(formId)}`
6688
+ `/form/get-form-by-id?formId=${encodeURIComponent(formId)}`
6689
6689
  );
6690
6690
  if (!response.data || !response.data.data) {
6691
6691
  throw { message: "Failed to fetch form", status: 500 };
@@ -6705,7 +6705,7 @@ async function createOrUpdateForm({
6705
6705
  if (!data) {
6706
6706
  throw { message: "Form data is required", status: 400 };
6707
6707
  }
6708
- const response = await apiClient.post("/api/v1/form/create-or-update-form", {
6708
+ const response = await apiClient.post("/form/create-or-update-form", {
6709
6709
  data
6710
6710
  });
6711
6711
  if (!response.data || !response.data.data) {
@@ -6732,7 +6732,7 @@ async function getAuditLogs(params) {
6732
6732
  throw { message: "Limit is required", status: 400 };
6733
6733
  }
6734
6734
  const response = await apiClient.post(
6735
- "/api/v1/audit/get-audit-logs",
6735
+ "/audit/get-audit-logs",
6736
6736
  params
6737
6737
  );
6738
6738
  if (!response.data) {
@@ -6752,7 +6752,7 @@ async function createAuditLog(params) {
6752
6752
  throw { message: "Audit records array is required", status: 400 };
6753
6753
  }
6754
6754
  const response = await apiClient.post(
6755
- "/api/v1/audit/create-audit-log",
6755
+ "/audit/create-audit-log",
6756
6756
  params.auditRecords
6757
6757
  );
6758
6758
  return { success: response.data.success || true };
@@ -6770,7 +6770,7 @@ const index$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
6770
6770
  async function getAllTemplatedPipelines() {
6771
6771
  var _a, _b, _c;
6772
6772
  try {
6773
- const response = await apiClient.get("/api/v1/templated-pipeline/get-all");
6773
+ const response = await apiClient.get("/templated-pipeline/get-all");
6774
6774
  if (!response.data || !response.data.data) {
6775
6775
  throw { message: "Failed to fetch templated pipelines", status: 500 };
6776
6776
  }
@@ -6797,7 +6797,7 @@ async function markTaskDone({
6797
6797
  if (!data) {
6798
6798
  throw { message: "Task completion data is required", status: 400 };
6799
6799
  }
6800
- const response = await apiClient.post("/api/v1/process/mark-task-done", {
6800
+ const response = await apiClient.post("/process/mark-task-done", {
6801
6801
  taskId,
6802
6802
  data
6803
6803
  });
@@ -6827,7 +6827,7 @@ async function reassignTask({
6827
6827
  if (!assigneeType || !["USER", "TEAM"].includes(assigneeType)) {
6828
6828
  throw { message: "Assignee type must be USER or TEAM", status: 400 };
6829
6829
  }
6830
- const response = await apiClient.post("/api/v1/process/reassign-task", {
6830
+ const response = await apiClient.post("/process/reassign-task", {
6831
6831
  taskId,
6832
6832
  newAssignee,
6833
6833
  assigneeType