@konversi/konversi-client 1.2.3 → 1.2.4
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/dist/index.mjs +4 -0
- package/index.ts +2 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -156,6 +156,7 @@ declare function deleteObject(entity: any, id: string): Promise<any>;
|
|
|
156
156
|
declare const konversiAPI: {
|
|
157
157
|
setToken: (token: string) => void;
|
|
158
158
|
setCompanyId: (companyId: string) => void;
|
|
159
|
+
setBaseUrl: (baseUrl: string) => void;
|
|
159
160
|
getAllCustomObjects: typeof getAllCustomObjects;
|
|
160
161
|
getCustomObjectById: typeof getCustomObjectById;
|
|
161
162
|
updateCustomObject: typeof updateCustomObject;
|
package/dist/index.d.ts
CHANGED
|
@@ -156,6 +156,7 @@ declare function deleteObject(entity: any, id: string): Promise<any>;
|
|
|
156
156
|
declare const konversiAPI: {
|
|
157
157
|
setToken: (token: string) => void;
|
|
158
158
|
setCompanyId: (companyId: string) => void;
|
|
159
|
+
setBaseUrl: (baseUrl: string) => void;
|
|
159
160
|
getAllCustomObjects: typeof getAllCustomObjects;
|
|
160
161
|
getCustomObjectById: typeof getCustomObjectById;
|
|
161
162
|
updateCustomObject: typeof updateCustomObject;
|
package/dist/index.js
CHANGED
|
@@ -63,6 +63,9 @@ var instance = import_axios.default.create({
|
|
|
63
63
|
baseURL,
|
|
64
64
|
timeout
|
|
65
65
|
});
|
|
66
|
+
var setBaseUrl = (baseUrl) => {
|
|
67
|
+
instance.defaults.baseURL = baseUrl;
|
|
68
|
+
};
|
|
66
69
|
var setAuthToken = (token) => {
|
|
67
70
|
instance.defaults.headers.common.authorization = `Bearer ${token}`;
|
|
68
71
|
};
|
|
@@ -300,6 +303,7 @@ var _a;
|
|
|
300
303
|
var konversiAPI = {
|
|
301
304
|
setToken: setAuthToken,
|
|
302
305
|
setCompanyId,
|
|
306
|
+
setBaseUrl,
|
|
303
307
|
getAllCustomObjects,
|
|
304
308
|
getCustomObjectById,
|
|
305
309
|
updateCustomObject,
|
package/dist/index.mjs
CHANGED
|
@@ -32,6 +32,9 @@ var instance = axios.create({
|
|
|
32
32
|
baseURL,
|
|
33
33
|
timeout
|
|
34
34
|
});
|
|
35
|
+
var setBaseUrl = (baseUrl) => {
|
|
36
|
+
instance.defaults.baseURL = baseUrl;
|
|
37
|
+
};
|
|
35
38
|
var setAuthToken = (token) => {
|
|
36
39
|
instance.defaults.headers.common.authorization = `Bearer ${token}`;
|
|
37
40
|
};
|
|
@@ -269,6 +272,7 @@ var _a;
|
|
|
269
272
|
var konversiAPI = {
|
|
270
273
|
setToken: setAuthToken,
|
|
271
274
|
setCompanyId,
|
|
275
|
+
setBaseUrl,
|
|
272
276
|
getAllCustomObjects,
|
|
273
277
|
getCustomObjectById,
|
|
274
278
|
updateCustomObject,
|
package/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import axiosAPI, { setAuthToken, setCompanyId } from "./axiosAPI";
|
|
1
|
+
import axiosAPI, { setAuthToken, setBaseUrl, setCompanyId } from "./axiosAPI";
|
|
2
2
|
|
|
3
3
|
import * as crudEndpoints from "./crudEndpoints";
|
|
4
4
|
|
|
@@ -81,6 +81,7 @@ async function deleteObject(entity: any, id: string) {
|
|
|
81
81
|
const konversiAPI = {
|
|
82
82
|
setToken: setAuthToken,
|
|
83
83
|
setCompanyId,
|
|
84
|
+
setBaseUrl,
|
|
84
85
|
|
|
85
86
|
getAllCustomObjects,
|
|
86
87
|
getCustomObjectById,
|