@bluecopa/core 0.1.24 → 0.1.26
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/form/createOrUpdateForm.d.ts +1 -4
- package/dist/index.es.js +15 -7
- package/dist/index.es.js.map +1 -1
- package/dist/utils/inputTable/inputTableDefinition.d.ts +1 -1
- package/dist/utils/metric/analysisMethods.d.ts +8 -35
- package/dist/utils/metric/filterUtils.d.ts +1 -1
- package/dist/utils/metric/getMetricDefinition.d.ts +1 -1
- package/package.json +1 -1
|
@@ -4,9 +4,6 @@ export interface CreateOrUpdateFormRequest {
|
|
|
4
4
|
}
|
|
5
5
|
export interface CreateOrUpdateFormResponse {
|
|
6
6
|
data: Form;
|
|
7
|
-
processSheetId: string;
|
|
8
|
-
isDummy: boolean;
|
|
9
|
-
formInstanceId: string;
|
|
10
7
|
}
|
|
11
8
|
/**
|
|
12
9
|
* Creates or updates a form
|
|
@@ -15,4 +12,4 @@ export interface CreateOrUpdateFormResponse {
|
|
|
15
12
|
* @returns Promise<Form> The created or updated form
|
|
16
13
|
* @throws Error if the request fails
|
|
17
14
|
*/
|
|
18
|
-
export declare function createOrUpdateForm(
|
|
15
|
+
export declare function createOrUpdateForm({ data, }: CreateOrUpdateFormRequest): Promise<Form>;
|
package/dist/index.es.js
CHANGED
|
@@ -232,6 +232,10 @@ async function fileUpload({
|
|
|
232
232
|
method,
|
|
233
233
|
data,
|
|
234
234
|
uploadType
|
|
235
|
+
}, {
|
|
236
|
+
headers: {
|
|
237
|
+
"Content-Type": contentType
|
|
238
|
+
}
|
|
235
239
|
});
|
|
236
240
|
if (!response.data || !response.data.data) {
|
|
237
241
|
throw { message: "Failed to upload file", status: 500 };
|
|
@@ -6241,7 +6245,7 @@ const getRows = async (tableId, options) => {
|
|
|
6241
6245
|
});
|
|
6242
6246
|
}
|
|
6243
6247
|
const response = await apiClient.get(
|
|
6244
|
-
`/
|
|
6248
|
+
`/input-table/${tableId}/rows`,
|
|
6245
6249
|
{ params }
|
|
6246
6250
|
);
|
|
6247
6251
|
if (!response.data) {
|
|
@@ -6264,7 +6268,7 @@ const insertRow = async (tableId, rowData) => {
|
|
|
6264
6268
|
throw { message: "Row data must be an object", status: 400 };
|
|
6265
6269
|
}
|
|
6266
6270
|
const response = await apiClient.post(
|
|
6267
|
-
`/
|
|
6271
|
+
`/input-table/${tableId}/rows`,
|
|
6268
6272
|
rowData
|
|
6269
6273
|
);
|
|
6270
6274
|
if (!response.data) {
|
|
@@ -6303,7 +6307,7 @@ const updateRow = async (tableId, updateData, rowId) => {
|
|
|
6303
6307
|
};
|
|
6304
6308
|
}
|
|
6305
6309
|
const response = await apiClient.patch(
|
|
6306
|
-
`/
|
|
6310
|
+
`/input-table/${tableId}/rows`,
|
|
6307
6311
|
body,
|
|
6308
6312
|
{ params }
|
|
6309
6313
|
);
|
|
@@ -6338,7 +6342,7 @@ const deleteRow = async (tableId, rowId, idField = "_copa_id") => {
|
|
|
6338
6342
|
params[idField] = rowId;
|
|
6339
6343
|
}
|
|
6340
6344
|
const config = {
|
|
6341
|
-
url: `/
|
|
6345
|
+
url: `/input-table/${tableId}/rows`,
|
|
6342
6346
|
method: "delete"
|
|
6343
6347
|
};
|
|
6344
6348
|
if (Object.keys(params).length > 0) {
|
|
@@ -6863,13 +6867,17 @@ async function getFormById({
|
|
|
6863
6867
|
throw { message, status };
|
|
6864
6868
|
}
|
|
6865
6869
|
}
|
|
6866
|
-
async function createOrUpdateForm(
|
|
6870
|
+
async function createOrUpdateForm({
|
|
6871
|
+
data
|
|
6872
|
+
}) {
|
|
6867
6873
|
var _a, _b, _c;
|
|
6868
6874
|
try {
|
|
6869
|
-
if (!
|
|
6875
|
+
if (!data) {
|
|
6870
6876
|
throw { message: "Form data is required", status: 400 };
|
|
6871
6877
|
}
|
|
6872
|
-
const response = await apiClient.post("/form/create-or-update-form",
|
|
6878
|
+
const response = await apiClient.post("/form/create-or-update-form", {
|
|
6879
|
+
data
|
|
6880
|
+
});
|
|
6873
6881
|
if (!response.data || !response.data.data) {
|
|
6874
6882
|
throw { message: "Failed to create or update form", status: 500 };
|
|
6875
6883
|
}
|