@konversi/konversi-client 1.4.7 → 1.4.8
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.js +11 -11
- package/dist/index.mjs +11 -11
- package/index.ts +11 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -268,7 +268,7 @@ function getAllCustomObjects(_0) {
|
|
|
268
268
|
});
|
|
269
269
|
return response.data;
|
|
270
270
|
} catch (e) {
|
|
271
|
-
throw new KonversiError(e.message +
|
|
271
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
272
272
|
}
|
|
273
273
|
});
|
|
274
274
|
}
|
|
@@ -282,7 +282,7 @@ function getCustomObjectById(schemaName, id) {
|
|
|
282
282
|
});
|
|
283
283
|
return response.data;
|
|
284
284
|
} catch (e) {
|
|
285
|
-
throw new KonversiError(e.message +
|
|
285
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
286
286
|
}
|
|
287
287
|
});
|
|
288
288
|
}
|
|
@@ -300,7 +300,7 @@ function updateCustomObject(schemaName, id, newData) {
|
|
|
300
300
|
});
|
|
301
301
|
return response.data;
|
|
302
302
|
} catch (e) {
|
|
303
|
-
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${(_b = e.response) == null ? void 0 : _b.data}`);
|
|
303
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
304
304
|
}
|
|
305
305
|
});
|
|
306
306
|
}
|
|
@@ -315,7 +315,7 @@ function createCustomObject(schemaName, data) {
|
|
|
315
315
|
});
|
|
316
316
|
return response.data;
|
|
317
317
|
} catch (e) {
|
|
318
|
-
throw new KonversiError(e.message +
|
|
318
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
319
319
|
}
|
|
320
320
|
});
|
|
321
321
|
}
|
|
@@ -330,7 +330,7 @@ function deleteCustomObject(schemaName, id) {
|
|
|
330
330
|
});
|
|
331
331
|
return response.data;
|
|
332
332
|
} catch (e) {
|
|
333
|
-
throw new KonversiError(e.message +
|
|
333
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
334
334
|
}
|
|
335
335
|
});
|
|
336
336
|
}
|
|
@@ -343,7 +343,7 @@ function getAllObjects(_0) {
|
|
|
343
343
|
});
|
|
344
344
|
return response.data;
|
|
345
345
|
} catch (e) {
|
|
346
|
-
throw new KonversiError(e.message +
|
|
346
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
347
347
|
}
|
|
348
348
|
});
|
|
349
349
|
}
|
|
@@ -354,7 +354,7 @@ function getObjectById(entity, id) {
|
|
|
354
354
|
const response = yield axiosAPI_default.get(`${entity}/${id}`);
|
|
355
355
|
return response.data;
|
|
356
356
|
} catch (e) {
|
|
357
|
-
throw new KonversiError(e.message +
|
|
357
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
358
358
|
}
|
|
359
359
|
});
|
|
360
360
|
}
|
|
@@ -365,7 +365,7 @@ function updateObject(entity, id, newData) {
|
|
|
365
365
|
const response = yield axiosAPI_default.put(`${entity}/${id}`, newData);
|
|
366
366
|
return response.data;
|
|
367
367
|
} catch (e) {
|
|
368
|
-
throw new KonversiError(e.message +
|
|
368
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
369
369
|
}
|
|
370
370
|
});
|
|
371
371
|
}
|
|
@@ -376,7 +376,7 @@ function createObject(entity, data) {
|
|
|
376
376
|
const response = yield axiosAPI_default.post(`${entity}`, data);
|
|
377
377
|
return response.data;
|
|
378
378
|
} catch (e) {
|
|
379
|
-
throw new KonversiError(e.message +
|
|
379
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
380
380
|
}
|
|
381
381
|
});
|
|
382
382
|
}
|
|
@@ -387,7 +387,7 @@ function deleteObject(entity, id) {
|
|
|
387
387
|
const response = yield axiosAPI_default.delete(`${entity}/${id}`);
|
|
388
388
|
return response.data;
|
|
389
389
|
} catch (e) {
|
|
390
|
-
throw new KonversiError(e.message +
|
|
390
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
391
391
|
}
|
|
392
392
|
});
|
|
393
393
|
}
|
|
@@ -402,7 +402,7 @@ function runScript(scriptNameOrId, input, sync = false) {
|
|
|
402
402
|
const response = yield axiosAPI_default.post(`/automation/script/${scriptNameOrId}/run`, { input });
|
|
403
403
|
return response.data;
|
|
404
404
|
} catch (e) {
|
|
405
|
-
throw new KonversiError(e.message +
|
|
405
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
406
406
|
}
|
|
407
407
|
});
|
|
408
408
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -236,7 +236,7 @@ function getAllCustomObjects(_0) {
|
|
|
236
236
|
});
|
|
237
237
|
return response.data;
|
|
238
238
|
} catch (e) {
|
|
239
|
-
throw new KonversiError(e.message +
|
|
239
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
240
240
|
}
|
|
241
241
|
});
|
|
242
242
|
}
|
|
@@ -250,7 +250,7 @@ function getCustomObjectById(schemaName, id) {
|
|
|
250
250
|
});
|
|
251
251
|
return response.data;
|
|
252
252
|
} catch (e) {
|
|
253
|
-
throw new KonversiError(e.message +
|
|
253
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
254
254
|
}
|
|
255
255
|
});
|
|
256
256
|
}
|
|
@@ -268,7 +268,7 @@ function updateCustomObject(schemaName, id, newData) {
|
|
|
268
268
|
});
|
|
269
269
|
return response.data;
|
|
270
270
|
} catch (e) {
|
|
271
|
-
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${(_b = e.response) == null ? void 0 : _b.data}`);
|
|
271
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
272
272
|
}
|
|
273
273
|
});
|
|
274
274
|
}
|
|
@@ -283,7 +283,7 @@ function createCustomObject(schemaName, data) {
|
|
|
283
283
|
});
|
|
284
284
|
return response.data;
|
|
285
285
|
} catch (e) {
|
|
286
|
-
throw new KonversiError(e.message +
|
|
286
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
287
287
|
}
|
|
288
288
|
});
|
|
289
289
|
}
|
|
@@ -298,7 +298,7 @@ function deleteCustomObject(schemaName, id) {
|
|
|
298
298
|
});
|
|
299
299
|
return response.data;
|
|
300
300
|
} catch (e) {
|
|
301
|
-
throw new KonversiError(e.message +
|
|
301
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
302
302
|
}
|
|
303
303
|
});
|
|
304
304
|
}
|
|
@@ -311,7 +311,7 @@ function getAllObjects(_0) {
|
|
|
311
311
|
});
|
|
312
312
|
return response.data;
|
|
313
313
|
} catch (e) {
|
|
314
|
-
throw new KonversiError(e.message +
|
|
314
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
315
315
|
}
|
|
316
316
|
});
|
|
317
317
|
}
|
|
@@ -322,7 +322,7 @@ function getObjectById(entity, id) {
|
|
|
322
322
|
const response = yield axiosAPI_default.get(`${entity}/${id}`);
|
|
323
323
|
return response.data;
|
|
324
324
|
} catch (e) {
|
|
325
|
-
throw new KonversiError(e.message +
|
|
325
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
326
326
|
}
|
|
327
327
|
});
|
|
328
328
|
}
|
|
@@ -333,7 +333,7 @@ function updateObject(entity, id, newData) {
|
|
|
333
333
|
const response = yield axiosAPI_default.put(`${entity}/${id}`, newData);
|
|
334
334
|
return response.data;
|
|
335
335
|
} catch (e) {
|
|
336
|
-
throw new KonversiError(e.message +
|
|
336
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
337
337
|
}
|
|
338
338
|
});
|
|
339
339
|
}
|
|
@@ -344,7 +344,7 @@ function createObject(entity, data) {
|
|
|
344
344
|
const response = yield axiosAPI_default.post(`${entity}`, data);
|
|
345
345
|
return response.data;
|
|
346
346
|
} catch (e) {
|
|
347
|
-
throw new KonversiError(e.message +
|
|
347
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
348
348
|
}
|
|
349
349
|
});
|
|
350
350
|
}
|
|
@@ -355,7 +355,7 @@ function deleteObject(entity, id) {
|
|
|
355
355
|
const response = yield axiosAPI_default.delete(`${entity}/${id}`);
|
|
356
356
|
return response.data;
|
|
357
357
|
} catch (e) {
|
|
358
|
-
throw new KonversiError(e.message +
|
|
358
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
359
359
|
}
|
|
360
360
|
});
|
|
361
361
|
}
|
|
@@ -370,7 +370,7 @@ function runScript(scriptNameOrId, input, sync = false) {
|
|
|
370
370
|
const response = yield axiosAPI_default.post(`/automation/script/${scriptNameOrId}/run`, { input });
|
|
371
371
|
return response.data;
|
|
372
372
|
} catch (e) {
|
|
373
|
-
throw new KonversiError(e.message +
|
|
373
|
+
throw new KonversiError(e.message + ` ${(_a2 = e.response) == null ? void 0 : _a2.status} ${JSON.stringify((_b = e.response) == null ? void 0 : _b.data)}`);
|
|
374
374
|
}
|
|
375
375
|
});
|
|
376
376
|
}
|
package/index.ts
CHANGED
|
@@ -17,7 +17,7 @@ async function getAllCustomObjects(schemaName: string, queryParams: any = {}) {
|
|
|
17
17
|
})
|
|
18
18
|
return response.data;
|
|
19
19
|
} catch (e: any) {
|
|
20
|
-
throw new KonversiError(e.message +
|
|
20
|
+
throw new KonversiError(e.message + ` ${e.response?.status} ${JSON.stringify(e.response?.data)}`);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -29,7 +29,7 @@ async function getCustomObjectById(schemaName: string, id: string) {
|
|
|
29
29
|
})
|
|
30
30
|
return response.data;
|
|
31
31
|
} catch (e: any) {
|
|
32
|
-
throw new KonversiError(e.message +
|
|
32
|
+
throw new KonversiError(e.message + ` ${e.response?.status} ${JSON.stringify(e.response?.data)}`);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -45,7 +45,7 @@ async function updateCustomObject(schemaName: string, id: string, newData: any)
|
|
|
45
45
|
})
|
|
46
46
|
return response.data;
|
|
47
47
|
} catch (e: any) {
|
|
48
|
-
throw new KonversiError(e.message + ` ${e.response?.status} ${e.response?.data}`);
|
|
48
|
+
throw new KonversiError(e.message + ` ${e.response?.status} ${JSON.stringify(e.response?.data)}`);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -59,7 +59,7 @@ async function createCustomObject(schemaName: string, data: any) {
|
|
|
59
59
|
|
|
60
60
|
return response.data;
|
|
61
61
|
} catch (e: any) {
|
|
62
|
-
throw new KonversiError(e.message +
|
|
62
|
+
throw new KonversiError(e.message + ` ${e.response?.status} ${JSON.stringify(e.response?.data)}`);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -72,7 +72,7 @@ async function deleteCustomObject(schemaName: string, id: string) {
|
|
|
72
72
|
})
|
|
73
73
|
return response.data;
|
|
74
74
|
} catch (e: any) {
|
|
75
|
-
throw new KonversiError(e.message +
|
|
75
|
+
throw new KonversiError(e.message + ` ${e.response?.status} ${JSON.stringify(e.response?.data)}`);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -85,7 +85,7 @@ async function getAllObjects(entity: any, queryParams: any = {}) {
|
|
|
85
85
|
})
|
|
86
86
|
return response.data;
|
|
87
87
|
} catch (e: any) {
|
|
88
|
-
throw new KonversiError(e.message +
|
|
88
|
+
throw new KonversiError(e.message + ` ${e.response?.status} ${JSON.stringify(e.response?.data)}`);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -94,7 +94,7 @@ async function getObjectById(entity: any, id: string) {
|
|
|
94
94
|
const response = await axiosAPI.get(`${entity}/${id}`)
|
|
95
95
|
return response.data;
|
|
96
96
|
} catch (e: any) {
|
|
97
|
-
throw new KonversiError(e.message +
|
|
97
|
+
throw new KonversiError(e.message + ` ${e.response?.status} ${JSON.stringify(e.response?.data)}`);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -103,7 +103,7 @@ async function updateObject(entity: any, id: string, newData: any) {
|
|
|
103
103
|
const response = await axiosAPI.put(`${entity}/${id}`, newData)
|
|
104
104
|
return response.data;
|
|
105
105
|
} catch (e: any) {
|
|
106
|
-
throw new KonversiError(e.message +
|
|
106
|
+
throw new KonversiError(e.message + ` ${e.response?.status} ${JSON.stringify(e.response?.data)}`);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
|
|
@@ -113,7 +113,7 @@ async function createObject(entity: any, data: any) {
|
|
|
113
113
|
|
|
114
114
|
return response.data;
|
|
115
115
|
} catch (e: any) {
|
|
116
|
-
throw new KonversiError(e.message +
|
|
116
|
+
throw new KonversiError(e.message + ` ${e.response?.status} ${JSON.stringify(e.response?.data)}`);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
@@ -123,7 +123,7 @@ async function deleteObject(entity: any, id: string) {
|
|
|
123
123
|
|
|
124
124
|
return response.data;
|
|
125
125
|
} catch (e: any) {
|
|
126
|
-
throw new KonversiError(e.message +
|
|
126
|
+
throw new KonversiError(e.message + ` ${e.response?.status} ${JSON.stringify(e.response?.data)}`);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
|
|
@@ -138,7 +138,7 @@ export async function runScript(scriptNameOrId: string, input: any, sync= false)
|
|
|
138
138
|
|
|
139
139
|
return response.data;
|
|
140
140
|
} catch (e: any) {
|
|
141
|
-
throw new KonversiError(e.message +
|
|
141
|
+
throw new KonversiError(e.message + ` ${e.response?.status} ${JSON.stringify(e.response?.data)}`);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
|