@bluecopa/core 0.1.20 → 0.1.22

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.
@@ -4,6 +4,9 @@ export interface CreateOrUpdateFormRequest {
4
4
  }
5
5
  export interface CreateOrUpdateFormResponse {
6
6
  data: Form;
7
+ processSheetId: string;
8
+ isDummy: boolean;
9
+ formInstanceId: string;
7
10
  }
8
11
  /**
9
12
  * Creates or updates a form
@@ -12,4 +15,4 @@ export interface CreateOrUpdateFormResponse {
12
15
  * @returns Promise<Form> The created or updated form
13
16
  * @throws Error if the request fails
14
17
  */
15
- export declare function createOrUpdateForm({ data, }: CreateOrUpdateFormRequest): Promise<Form>;
18
+ export declare function createOrUpdateForm(payload: CreateOrUpdateFormRequest): Promise<Form>;
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 };
@@ -6697,17 +6697,13 @@ async function getFormById({
6697
6697
  throw { message, status };
6698
6698
  }
6699
6699
  }
6700
- async function createOrUpdateForm({
6701
- data
6702
- }) {
6700
+ async function createOrUpdateForm(payload) {
6703
6701
  var _a, _b, _c;
6704
6702
  try {
6705
- if (!data) {
6703
+ if (!payload.data) {
6706
6704
  throw { message: "Form data is required", status: 400 };
6707
6705
  }
6708
- const response = await apiClient.post("/api/v1/form/create-or-update-form", {
6709
- data
6710
- });
6706
+ const response = await apiClient.post("/form/create-or-update-form", payload);
6711
6707
  if (!response.data || !response.data.data) {
6712
6708
  throw { message: "Failed to create or update form", status: 500 };
6713
6709
  }
@@ -6732,7 +6728,7 @@ async function getAuditLogs(params) {
6732
6728
  throw { message: "Limit is required", status: 400 };
6733
6729
  }
6734
6730
  const response = await apiClient.post(
6735
- "/api/v1/audit/get-audit-logs",
6731
+ "/audit/get-audit-logs",
6736
6732
  params
6737
6733
  );
6738
6734
  if (!response.data) {
@@ -6752,7 +6748,7 @@ async function createAuditLog(params) {
6752
6748
  throw { message: "Audit records array is required", status: 400 };
6753
6749
  }
6754
6750
  const response = await apiClient.post(
6755
- "/api/v1/audit/create-audit-log",
6751
+ "/audit/create-audit-log",
6756
6752
  params.auditRecords
6757
6753
  );
6758
6754
  return { success: response.data.success || true };
@@ -6770,7 +6766,7 @@ const index$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
6770
6766
  async function getAllTemplatedPipelines() {
6771
6767
  var _a, _b, _c;
6772
6768
  try {
6773
- const response = await apiClient.get("/api/v1/templated-pipeline/get-all");
6769
+ const response = await apiClient.get("/templated-pipeline/get-all");
6774
6770
  if (!response.data || !response.data.data) {
6775
6771
  throw { message: "Failed to fetch templated pipelines", status: 500 };
6776
6772
  }
@@ -6797,7 +6793,7 @@ async function markTaskDone({
6797
6793
  if (!data) {
6798
6794
  throw { message: "Task completion data is required", status: 400 };
6799
6795
  }
6800
- const response = await apiClient.post("/api/v1/process/mark-task-done", {
6796
+ const response = await apiClient.post("/process/mark-task-done", {
6801
6797
  taskId,
6802
6798
  data
6803
6799
  });
@@ -6827,7 +6823,7 @@ async function reassignTask({
6827
6823
  if (!assigneeType || !["USER", "TEAM"].includes(assigneeType)) {
6828
6824
  throw { message: "Assignee type must be USER or TEAM", status: 400 };
6829
6825
  }
6830
- const response = await apiClient.post("/api/v1/process/reassign-task", {
6826
+ const response = await apiClient.post("/process/reassign-task", {
6831
6827
  taskId,
6832
6828
  newAssignee,
6833
6829
  assigneeType