@bluecopa/core 0.1.25 → 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.
|
@@ -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 };
|
|
@@ -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
|
}
|