@tagsamurai/fats-api-services 1.0.0-alpha.52 → 1.0.0-alpha.53
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/api-services.es.js +183 -171
- package/api-services.system.js +1 -1
- package/main.d.ts +1 -1
- package/package.json +1 -1
package/api-services.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_APP_ADMIN_API: "https://dev-admin-api.tagsamurai.com", VITE_APP_API: "https://dev-api.tagsamurai.com", VITE_APP_ASSETS_URL: "https://assets.tagsamurai.com", VITE_APP_COUNTRY_STATE_API: "https://api.countrystatecity.in", VITE_APP_COUNTRY_STATE_API_KEY: "ZTc5TVc2STlwTkFFNFltYTRjc05sOHR3ODJEYzVMVTZ5UnBJaWU5SA==", VITE_APP_LOGS_NOTIFICATION_API: "https://dev-api-logs-notification.tagsamurai.com", VITE_APP_TAGSAMURAI_API: "https://dev-api.tagsamurai.com" },
|
|
3
|
-
const { env: r = "APP_API", prefix:
|
|
4
|
-
return
|
|
5
|
-
...
|
|
6
|
-
baseURL:
|
|
7
|
-
headers: e ?
|
|
1
|
+
import E from "axios";
|
|
2
|
+
const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_APP_ADMIN_API: "https://dev-admin-api.tagsamurai.com", VITE_APP_API: "https://dev-api.tagsamurai.com", VITE_APP_ASSETS_URL: "https://assets.tagsamurai.com", VITE_APP_COUNTRY_STATE_API: "https://api.countrystatecity.in", VITE_APP_COUNTRY_STATE_API_KEY: "ZTc5TVc2STlwTkFFNFltYTRjc05sOHR3ODJEYzVMVTZ5UnBJaWU5SA==", VITE_APP_LOGS_NOTIFICATION_API: "https://dev-api-logs-notification.tagsamurai.com", VITE_APP_TAGSAMURAI_API: "https://dev-api.tagsamurai.com" }, m = (t = "APP_API") => N["VITE_" + t], s = (t = {}, e = !1) => {
|
|
3
|
+
const { env: r = "APP_API", prefix: i = "", headers: $ = {}, ...S } = t, x = `${m(r)}${i}`, U = JSON.parse(localStorage.getItem("user") ?? "{}"), F = U.jwt ?? U.token ?? "";
|
|
4
|
+
return E.create({
|
|
5
|
+
...S,
|
|
6
|
+
baseURL: x,
|
|
7
|
+
headers: e ? $ : {
|
|
8
8
|
"Content-Type": "application/json",
|
|
9
9
|
Authorization: `Bearer ${F}`,
|
|
10
|
-
|
|
10
|
+
...$
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
}, j = (t) => {
|
|
@@ -21,21 +21,31 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
21
21
|
[r]: t[r]
|
|
22
22
|
});
|
|
23
23
|
}), e;
|
|
24
|
-
}, Y = (t) => {
|
|
24
|
+
}, Y = (t, e, r) => {
|
|
25
25
|
if (!t) return;
|
|
26
|
-
const
|
|
26
|
+
const i = m("APP_API"), $ = t.startsWith("http") ? t : `${i}/utility/v2/files/${t.replace(/^\/+/, "")}`;
|
|
27
|
+
if (e || r) {
|
|
28
|
+
const S = new URLSearchParams();
|
|
29
|
+
return e && (S.set("width", e.toString()), S.set("height", r ? r == null ? void 0 : r.toString() : e.toString())), `${$}?${S.toString()}`;
|
|
30
|
+
}
|
|
31
|
+
return $;
|
|
32
|
+
}, Q = (t) => {
|
|
33
|
+
if (!t) return;
|
|
34
|
+
const e = m("APP_TAGSAMURAI_API");
|
|
27
35
|
return t.startsWith("http") ? t : `${e}/file-manager/v2/files/${t}`;
|
|
28
|
-
},
|
|
36
|
+
}, J = async (t, e = "excel") => await fetch(
|
|
37
|
+
`${m("APP_ASSETS_URL")}/${e}/${t}`
|
|
38
|
+
), c = s({
|
|
29
39
|
prefix: "/settings-attribute/v2",
|
|
30
40
|
env: "APP_TAGSAMURAI_API"
|
|
31
|
-
}),
|
|
41
|
+
}), H = {
|
|
32
42
|
getGroupCategory: (t, e) => {
|
|
33
43
|
const r = t === "category" ? t : "groups";
|
|
34
44
|
return c.get(`/${r}/tree`, { params: e });
|
|
35
45
|
},
|
|
36
46
|
getGroupCategoryList: (t, e, r) => {
|
|
37
|
-
const
|
|
38
|
-
return c.get(`/${
|
|
47
|
+
const i = t === "category" ? t : "groups";
|
|
48
|
+
return c.get(`/${i}/${e}`, { params: r });
|
|
39
49
|
},
|
|
40
50
|
getNames: (t) => {
|
|
41
51
|
const e = t === "category" ? t : "groups";
|
|
@@ -50,18 +60,18 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
50
60
|
return c.post(`/${r}`, e);
|
|
51
61
|
},
|
|
52
62
|
putEditGroupCategory: (t, e, r) => {
|
|
53
|
-
const
|
|
54
|
-
return c.put(`/${
|
|
63
|
+
const i = t === "category" ? t : "groups";
|
|
64
|
+
return c.put(`/${i}/${r}`, e);
|
|
55
65
|
},
|
|
56
66
|
putMoveGroup: (t, e) => c.put(`/groups/${e}/move-group`, t),
|
|
57
67
|
putEditBulkGroups: async (t) => c.put("/groups/bulk", t),
|
|
58
68
|
deleteGroupCategory: (t, e, r) => {
|
|
59
|
-
const
|
|
60
|
-
return c.delete(`/${
|
|
69
|
+
const i = t === "category" ? t : "groups";
|
|
70
|
+
return c.delete(`/${i}/${r}`, { data: e });
|
|
61
71
|
}
|
|
62
72
|
}, l = s({
|
|
63
73
|
prefix: "/settings-attribute-go/v2"
|
|
64
|
-
}),
|
|
74
|
+
}), K = {
|
|
65
75
|
getGroupCategory: (t, e) => {
|
|
66
76
|
const r = t === "category" ? t : "groups";
|
|
67
77
|
return l.get(`/${r}/tree`, { params: e });
|
|
@@ -83,30 +93,30 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
83
93
|
return l.post(`/${r}`, e);
|
|
84
94
|
},
|
|
85
95
|
putEditGroupCategory: (t, e, r) => {
|
|
86
|
-
const
|
|
87
|
-
return l.put(`/${
|
|
96
|
+
const i = t === "category" ? t : "groups";
|
|
97
|
+
return l.put(`/${i}/${r}`, e);
|
|
88
98
|
},
|
|
89
99
|
deleteGroupCategory: (t, e, r) => {
|
|
90
|
-
const
|
|
91
|
-
return l.delete(`/${
|
|
100
|
+
const i = t === "category" ? t : "groups";
|
|
101
|
+
return l.delete(`/${i}/${r}`, { data: e });
|
|
92
102
|
}
|
|
93
103
|
}, M = s({
|
|
94
104
|
prefix: "/v2",
|
|
95
105
|
env: "APP_LOGS_NOTIFICATION_API"
|
|
96
|
-
}),
|
|
106
|
+
}), W = {
|
|
97
107
|
getTotalApprovals: () => M.get("/approval/count")
|
|
98
|
-
},
|
|
108
|
+
}, y = s({
|
|
99
109
|
prefix: "/v2",
|
|
100
110
|
env: "APP_LOGS_NOTIFICATION_API"
|
|
101
|
-
}),
|
|
102
|
-
getActionLog: (t) =>
|
|
103
|
-
getActionLogOption: (t) =>
|
|
104
|
-
getSessionLogList: (t) =>
|
|
105
|
-
getUserDetailSystemLogList: (t) =>
|
|
106
|
-
getUserDetailSystemLogOption: (t) =>
|
|
111
|
+
}), z = {
|
|
112
|
+
getActionLog: (t) => y.get("/change-log", { params: t }),
|
|
113
|
+
getActionLogOption: (t) => y.get("/change-log/options", { params: t }),
|
|
114
|
+
getSessionLogList: (t) => y.get("/session-log", { params: t }),
|
|
115
|
+
getUserDetailSystemLogList: (t) => y.get("/change-log", { params: t }),
|
|
116
|
+
getUserDetailSystemLogOption: (t) => y.get("/change-log/options", { params: t })
|
|
107
117
|
}, u = s({
|
|
108
118
|
prefix: "/assets/v2/assets"
|
|
109
|
-
}),
|
|
119
|
+
}), Z = {
|
|
110
120
|
getScanTag: (t) => u.get("/scan", { params: { tag: t } }),
|
|
111
121
|
getAllAssets: (t) => u.get("/", { params: t }),
|
|
112
122
|
getAvailableAssets: (t) => u.get("/available", { params: t }),
|
|
@@ -125,30 +135,30 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
125
135
|
}
|
|
126
136
|
}, k = s({
|
|
127
137
|
prefix: "/tracking/v2/missing"
|
|
128
|
-
}),
|
|
138
|
+
}), X = {
|
|
129
139
|
putFoundAsset: (t, e) => {
|
|
130
140
|
const r = { ids: [t], serialNumber: e };
|
|
131
141
|
return k.put("/found", r);
|
|
132
142
|
}
|
|
133
|
-
},
|
|
143
|
+
}, G = s({
|
|
134
144
|
prefix: "/v2/notification",
|
|
135
145
|
env: "APP_LOGS_NOTIFICATION_API"
|
|
136
|
-
}),
|
|
137
|
-
getNotifications: (t) => U.get("/", { params: t }),
|
|
138
|
-
readNotification: (t) => U.put(`/${t}`)
|
|
139
|
-
}, G = s({
|
|
140
|
-
prefix: "/utility/v2/notification"
|
|
141
|
-
}), X = {
|
|
146
|
+
}), tt = {
|
|
142
147
|
getNotifications: (t) => G.get("/", { params: t }),
|
|
143
148
|
readNotification: (t) => G.put(`/${t}`)
|
|
149
|
+
}, R = s({
|
|
150
|
+
prefix: "/utility/v2/notification"
|
|
151
|
+
}), et = {
|
|
152
|
+
getNotifications: (t) => R.get("/", { params: t }),
|
|
153
|
+
readNotification: (t) => R.put(`/${t}`)
|
|
144
154
|
}, w = s({
|
|
145
155
|
prefix: "/v2/session-log",
|
|
146
156
|
env: "APP_LOGS_NOTIFICATION_API"
|
|
147
|
-
}),
|
|
157
|
+
}), rt = {
|
|
148
158
|
postLogout: () => w.post("/logout")
|
|
149
159
|
}, n = s({
|
|
150
160
|
prefix: "/tag/v2"
|
|
151
|
-
}),
|
|
161
|
+
}), st = {
|
|
152
162
|
getScanQR: (t) => n.get("/qr", { params: { tag: t } }),
|
|
153
163
|
getScanRFID: (t) => n.get("/rfid", { params: { tag: t } }),
|
|
154
164
|
getRFIDQRTAG: (t) => n.get("/rfid-qr/scan", { params: t }),
|
|
@@ -180,19 +190,19 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
180
190
|
postLogAudit: (t) => n.post("/tag-transaction/log-audit", { body: t })
|
|
181
191
|
}, q = s({
|
|
182
192
|
prefix: "/tracking/v2/tracking"
|
|
183
|
-
}),
|
|
193
|
+
}), nt = {
|
|
184
194
|
putFoundAsset: (t, e, r) => {
|
|
185
|
-
const
|
|
195
|
+
const i = {
|
|
186
196
|
tag: t,
|
|
187
197
|
group: e,
|
|
188
198
|
serialNumber: r,
|
|
189
199
|
type: "Global"
|
|
190
200
|
};
|
|
191
|
-
return q.put("/found", { params:
|
|
201
|
+
return q.put("/found", { params: i });
|
|
192
202
|
}
|
|
193
203
|
}, o = s({
|
|
194
204
|
prefix: "/settings-user-role/v2"
|
|
195
|
-
}),
|
|
205
|
+
}), ot = {
|
|
196
206
|
reLogin: (t) => o.post("/auth/login", t),
|
|
197
207
|
changePassword: (t) => o.put("/users/change-password", t),
|
|
198
208
|
/**
|
|
@@ -234,23 +244,23 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
234
244
|
getUserDetailUserLogAssignmentOption: (t, e) => o.get(`/users-log/${t}/assignment/option`, { params: e }),
|
|
235
245
|
getUserDetailTransactionAdminLogList: (t, e) => o.get(`/users-log/${t}/transaction-log`, { params: e }),
|
|
236
246
|
getUserDetailTransactionAdminLogOption: (t, e) => o.get(`/users-log/${t}/transaction-log/option`, { params: e })
|
|
237
|
-
},
|
|
247
|
+
}, C = s({
|
|
238
248
|
env: "APP_ADMIN_API",
|
|
239
249
|
prefix: "/settings-attribute/languages"
|
|
240
|
-
}),
|
|
250
|
+
}), it = {
|
|
241
251
|
/**
|
|
242
252
|
* Fetch all translation messages for a specific locale.
|
|
243
253
|
* @param locale The locale code (e.g., 'en', 'id').
|
|
244
254
|
* @returns A promise resolving to a key-value record of messages.
|
|
245
255
|
*/
|
|
246
|
-
getMessages: (t) =>
|
|
256
|
+
getMessages: (t) => C.get(`/${t}/translations`),
|
|
247
257
|
/**
|
|
248
258
|
* Fetch all available lang options for LanguageDropdown and LanguageSwitcher
|
|
249
259
|
*
|
|
250
260
|
* @returns Promise Array of options
|
|
251
261
|
*/
|
|
252
262
|
getLanguageOptions: async () => {
|
|
253
|
-
const { data: t } = await
|
|
263
|
+
const { data: t } = await C.get(
|
|
254
264
|
"/dropdown"
|
|
255
265
|
);
|
|
256
266
|
return t.data;
|
|
@@ -262,7 +272,7 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
262
272
|
* @returns Promise LanguageMeta
|
|
263
273
|
*/
|
|
264
274
|
getLanguageOptionMeta: async (t) => {
|
|
265
|
-
const { data: e } = await
|
|
275
|
+
const { data: e } = await C.get(
|
|
266
276
|
"/dropdown/" + t
|
|
267
277
|
);
|
|
268
278
|
return e.data;
|
|
@@ -274,66 +284,66 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
274
284
|
* @param locale Target locale code.
|
|
275
285
|
*/
|
|
276
286
|
translateText: async (t, e) => {
|
|
277
|
-
const { data: r } = await
|
|
287
|
+
const { data: r } = await C.post("/translate", {
|
|
278
288
|
q: t,
|
|
279
289
|
target: e
|
|
280
290
|
});
|
|
281
291
|
return r.data.translations[t];
|
|
282
292
|
}
|
|
283
|
-
},
|
|
293
|
+
}, D = s({
|
|
284
294
|
prefix: "/dashboard/v2/dashboard"
|
|
285
|
-
}),
|
|
286
|
-
getLatestTask: (t) =>
|
|
287
|
-
getSummary: (t) =>
|
|
295
|
+
}), at = {
|
|
296
|
+
getLatestTask: (t) => D.get("/latest-task", { params: t }),
|
|
297
|
+
getSummary: (t) => D.get("/summary", { params: t })
|
|
288
298
|
}, T = s({
|
|
289
299
|
prefix: "/alias-code/api/alias-code"
|
|
290
|
-
}),
|
|
300
|
+
}), gt = {
|
|
291
301
|
getAliasCode: () => T.get("/"),
|
|
292
302
|
postAliasCode: (t) => T.post("/", t),
|
|
293
303
|
getAliasCodeList: (t) => T.get(`/${t.object}/code-list`, { params: t })
|
|
294
|
-
},
|
|
304
|
+
}, L = s({
|
|
295
305
|
prefix: "/settings-attribute-go/v2/alias-code"
|
|
296
|
-
}),
|
|
297
|
-
getAliasCode: () =>
|
|
298
|
-
postAliasCode: (t) =>
|
|
299
|
-
getAliasCodeList: (t) =>
|
|
300
|
-
},
|
|
306
|
+
}), ut = {
|
|
307
|
+
getAliasCode: () => L.get("/"),
|
|
308
|
+
postAliasCode: (t) => L.post("/", t),
|
|
309
|
+
getAliasCodeList: (t) => L.get(`/${t.object}/code-list`, { params: t })
|
|
310
|
+
}, h = s({
|
|
301
311
|
prefix: "/settings-attribute/v2/general-settings"
|
|
302
|
-
}),
|
|
303
|
-
getGeneralSettings: () =>
|
|
304
|
-
putUpdateGeneralSettings: (t) =>
|
|
305
|
-
},
|
|
312
|
+
}), ct = {
|
|
313
|
+
getGeneralSettings: () => h.get("/"),
|
|
314
|
+
putUpdateGeneralSettings: (t) => h.put("/", t)
|
|
315
|
+
}, b = s({
|
|
306
316
|
prefix: "/settings-attribute-go/v2/general-settings"
|
|
307
|
-
}),
|
|
308
|
-
getGeneralSettings: () =>
|
|
309
|
-
putUpdateGeneralSettings: (t) =>
|
|
310
|
-
},
|
|
317
|
+
}), pt = {
|
|
318
|
+
getGeneralSettings: () => b.get("/"),
|
|
319
|
+
putUpdateGeneralSettings: (t) => b.put("/", t)
|
|
320
|
+
}, v = s({
|
|
311
321
|
prefix: "/settings-attribute/v2/custom-field"
|
|
312
|
-
}),
|
|
313
|
-
getCustomField: async (t) =>
|
|
314
|
-
getOptions: async (t) =>
|
|
315
|
-
postCreateCustomField: async (t, e) =>
|
|
316
|
-
putEditCustomField: async (t, e, r) =>
|
|
317
|
-
putChangeStatus: async (t, e) =>
|
|
318
|
-
deleteCustomField: async (t) =>
|
|
319
|
-
},
|
|
320
|
-
const r =
|
|
321
|
-
return
|
|
322
|
+
}), lt = {
|
|
323
|
+
getCustomField: async (t) => v.get("/", { params: t }),
|
|
324
|
+
getOptions: async (t) => v.get("/options", { params: t }),
|
|
325
|
+
postCreateCustomField: async (t, e) => v.post("/", e, { params: t }),
|
|
326
|
+
putEditCustomField: async (t, e, r) => v.put(`/${r}`, e, { params: t }),
|
|
327
|
+
putChangeStatus: async (t, e) => v.put("/bulk", e, { params: t }),
|
|
328
|
+
deleteCustomField: async (t) => v.delete("/bulk", { data: t })
|
|
329
|
+
}, O = ({ headers: t = {}, params: e = {} } = {}) => {
|
|
330
|
+
const r = m("APP_COUNTRY_STATE_API"), i = m("APP_COUNTRY_STATE_API_KEY");
|
|
331
|
+
return E.create({
|
|
322
332
|
baseURL: `${r}/v1`,
|
|
323
333
|
headers: {
|
|
324
334
|
"Content-type": "application/json",
|
|
325
|
-
"X-CSCAPI-KEY":
|
|
335
|
+
"X-CSCAPI-KEY": i,
|
|
326
336
|
...t
|
|
327
337
|
},
|
|
328
338
|
params: e
|
|
329
339
|
});
|
|
330
|
-
},
|
|
331
|
-
getCountry: () =>
|
|
332
|
-
getState: (t) =>
|
|
333
|
-
getCity: (t, e) =>
|
|
340
|
+
}, dt = {
|
|
341
|
+
getCountry: () => O().get("/countries"),
|
|
342
|
+
getState: (t) => O().get(`/countries/${t}/states`),
|
|
343
|
+
getCity: (t, e) => O().get(`/countries/${t}/states/${e}/cities`)
|
|
334
344
|
}, g = s({
|
|
335
345
|
prefix: "/routine/v2"
|
|
336
|
-
}),
|
|
346
|
+
}), At = {
|
|
337
347
|
getList: (t) => g.get("/service-center", { params: t }),
|
|
338
348
|
postList: (t) => g.post("/service-center", t),
|
|
339
349
|
putList: (t, e) => g.put(`/service-center/${t}`, e),
|
|
@@ -348,17 +358,17 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
348
358
|
getActivityLog: (t) => g.get(`/service-activities/${t}/activity-log`)
|
|
349
359
|
}, B = s({
|
|
350
360
|
prefix: "/settings-attribute/v2/brands"
|
|
351
|
-
}),
|
|
361
|
+
}), $t = {
|
|
352
362
|
getDropdown: (t) => B.get("/dropdown", { params: t })
|
|
353
|
-
},
|
|
363
|
+
}, I = s({
|
|
354
364
|
prefix: "/file-manager/v2"
|
|
355
|
-
}),
|
|
365
|
+
}), vt = {
|
|
356
366
|
/**
|
|
357
367
|
* Get storage information.
|
|
358
368
|
*
|
|
359
369
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
360
370
|
*/
|
|
361
|
-
getStorageInformation: () =>
|
|
371
|
+
getStorageInformation: () => I.get("/files/storage"),
|
|
362
372
|
/**
|
|
363
373
|
* Get file manager data.
|
|
364
374
|
*
|
|
@@ -366,7 +376,7 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
366
376
|
* @param {FileManagerFilterParams} [params] - The parameters for filtering.
|
|
367
377
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
368
378
|
*/
|
|
369
|
-
getFileManager: (t, e) =>
|
|
379
|
+
getFileManager: (t, e) => I.get(`/${t}`, { params: e }),
|
|
370
380
|
/**
|
|
371
381
|
* Get file manager options.
|
|
372
382
|
*
|
|
@@ -374,7 +384,7 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
374
384
|
* @param {FileManagerOptionBoolean} [params] - The parameters for options.
|
|
375
385
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
376
386
|
*/
|
|
377
|
-
getFileManagerOption: (t, e) =>
|
|
387
|
+
getFileManagerOption: (t, e) => I.get(`/${t}/options`, { params: e }),
|
|
378
388
|
/**
|
|
379
389
|
* Recover files.
|
|
380
390
|
*
|
|
@@ -382,7 +392,7 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
382
392
|
* @param {object} body - The body of the request.
|
|
383
393
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
384
394
|
*/
|
|
385
|
-
recoverFiles: (t, e) =>
|
|
395
|
+
recoverFiles: (t, e) => I.put(`/${t}/recover`, e),
|
|
386
396
|
/**
|
|
387
397
|
* Delete files.
|
|
388
398
|
*
|
|
@@ -390,7 +400,7 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
390
400
|
* @param {DeleteFileManagerDto} params - The params of the request.
|
|
391
401
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
392
402
|
*/
|
|
393
|
-
deleteFiles: (t, e) =>
|
|
403
|
+
deleteFiles: (t, e) => I.delete(`/${t}`, { params: e }),
|
|
394
404
|
/**
|
|
395
405
|
* Delete files permanently.
|
|
396
406
|
*
|
|
@@ -398,16 +408,16 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
398
408
|
* @param {object} body - The body of the request.
|
|
399
409
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
400
410
|
*/
|
|
401
|
-
deletePermanently: (t, e) =>
|
|
402
|
-
},
|
|
411
|
+
deletePermanently: (t, e) => I.delete(`/${t}/delete-permanent`, { params: e })
|
|
412
|
+
}, P = s({
|
|
403
413
|
prefix: "/utility/v2"
|
|
404
|
-
}),
|
|
414
|
+
}), It = {
|
|
405
415
|
/**
|
|
406
416
|
* Get storage information.
|
|
407
417
|
*
|
|
408
418
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
409
419
|
*/
|
|
410
|
-
getStorageInformation: () =>
|
|
420
|
+
getStorageInformation: () => P.get("/files/storage"),
|
|
411
421
|
/**
|
|
412
422
|
* Get file manager data.
|
|
413
423
|
*
|
|
@@ -415,7 +425,7 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
415
425
|
* @param {FileManagerFilterParams} [params] - The parameters for filtering.
|
|
416
426
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
417
427
|
*/
|
|
418
|
-
getFileManager: (t, e) =>
|
|
428
|
+
getFileManager: (t, e) => P.get(`/${t}`, { params: e }),
|
|
419
429
|
/**
|
|
420
430
|
* Get file manager options.
|
|
421
431
|
*
|
|
@@ -423,7 +433,7 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
423
433
|
* @param {FileManagerOptionBoolean} [params] - The parameters for options.
|
|
424
434
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
425
435
|
*/
|
|
426
|
-
getFileManagerOption: (t, e) =>
|
|
436
|
+
getFileManagerOption: (t, e) => P.get(`/${t}/options`, { params: e }),
|
|
427
437
|
/**
|
|
428
438
|
* Recover files.
|
|
429
439
|
*
|
|
@@ -431,7 +441,7 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
431
441
|
* @param {object} body - The body of the request.
|
|
432
442
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
433
443
|
*/
|
|
434
|
-
recoverFiles: (t, e) =>
|
|
444
|
+
recoverFiles: (t, e) => P.put(`/${t}/recover`, e),
|
|
435
445
|
/**
|
|
436
446
|
* Delete files.
|
|
437
447
|
*
|
|
@@ -439,7 +449,7 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
439
449
|
* @param {DeleteFileManagerDto} params - The params of the request.
|
|
440
450
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
441
451
|
*/
|
|
442
|
-
deleteFiles: (t, e) =>
|
|
452
|
+
deleteFiles: (t, e) => P.delete(`/${t}`, { params: e }),
|
|
443
453
|
/**
|
|
444
454
|
* Delete files permanently.
|
|
445
455
|
*
|
|
@@ -447,10 +457,10 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
447
457
|
* @param {object} body - The body of the request.
|
|
448
458
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
449
459
|
*/
|
|
450
|
-
deletePermanently: (t, e) =>
|
|
460
|
+
deletePermanently: (t, e) => P.delete(`/${t}/delete-permanent`, { params: e })
|
|
451
461
|
}, p = s({
|
|
452
462
|
prefix: "/iot/v2/reader"
|
|
453
|
-
}),
|
|
463
|
+
}), Pt = {
|
|
454
464
|
getData: (t) => p.get("/", { params: t }),
|
|
455
465
|
getDataOptions: (t) => p.get("/options", { params: t }),
|
|
456
466
|
getActivityLogData: (t) => p.get("/activity-log", { params: t }),
|
|
@@ -459,16 +469,16 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
459
469
|
getChangeLog: (t) => p.get(`/${t.id}/change-log`, { params: t }),
|
|
460
470
|
getChangeLogOptions: (t) => p.get(`/${t.id}/change-log/options`, { params: t }),
|
|
461
471
|
putData: (t, e) => p.put(`/${t}`, e)
|
|
462
|
-
},
|
|
472
|
+
}, a = s({
|
|
463
473
|
prefix: "/settings-user-role/v2"
|
|
464
|
-
}),
|
|
474
|
+
}), mt = {
|
|
465
475
|
/**
|
|
466
476
|
* Retrieves the transaction role for the given group and transaction name.
|
|
467
477
|
* @param {string} groupId - The ID of the group to retrieve the transaction role for.
|
|
468
478
|
* @param {string} transactionName - The name of the transaction to retrieve the role for.
|
|
469
479
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
470
480
|
*/
|
|
471
|
-
getTransactionRole: (t, e) =>
|
|
481
|
+
getTransactionRole: (t, e) => a.get(`/transaction-roles/${t}/${e}`),
|
|
472
482
|
/**
|
|
473
483
|
* Updates the users assigned to the given transaction role.
|
|
474
484
|
* @param {string} groupId - The ID of the group the transaction role belongs to.
|
|
@@ -476,7 +486,7 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
476
486
|
* @param {UpdateUser} body - The request body containing the updated user information.
|
|
477
487
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
478
488
|
*/
|
|
479
|
-
putUpdateUsers: (t, e, r) =>
|
|
489
|
+
putUpdateUsers: (t, e, r) => a.put(
|
|
480
490
|
`/transaction-roles/${t}/${e}/update-user`,
|
|
481
491
|
r
|
|
482
492
|
),
|
|
@@ -487,7 +497,7 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
487
497
|
* @param {UserApprovalLevel} body - The request body containing the updated approval level.
|
|
488
498
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
489
499
|
*/
|
|
490
|
-
putUpdateLevel: (t, e, r) =>
|
|
500
|
+
putUpdateLevel: (t, e, r) => a.put(
|
|
491
501
|
`/transaction-roles/${t}/${e}/update-approval-level`,
|
|
492
502
|
r
|
|
493
503
|
),
|
|
@@ -498,78 +508,78 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
498
508
|
* @param {GroupManageByParent} body - The request body containing the updated management settings.
|
|
499
509
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
500
510
|
*/
|
|
501
|
-
putUpdateGroupManage: (t, e, r) =>
|
|
511
|
+
putUpdateGroupManage: (t, e, r) => a.put(
|
|
502
512
|
`/transaction-roles/${t}/${e}/update-manage-by-parent`,
|
|
503
513
|
r
|
|
504
514
|
),
|
|
505
|
-
getAssignedUserAmounts: () =>
|
|
515
|
+
getAssignedUserAmounts: () => a.get("/system-roles/amounts"),
|
|
506
516
|
getPermissionUser: (t, e) => {
|
|
507
517
|
if (["totalControl", "readOnly"].includes(t ?? "")) {
|
|
508
518
|
const r = t === "totalControl" ? "total-control" : "read-only";
|
|
509
|
-
return
|
|
519
|
+
return a.get(`/system-roles/total-control-read-only/${r}`, {
|
|
510
520
|
params: e
|
|
511
521
|
});
|
|
512
522
|
}
|
|
513
|
-
return
|
|
523
|
+
return a.get(`/system-roles/permission/${t}`, { params: e });
|
|
514
524
|
},
|
|
515
525
|
getPermissionUserOptions: (t, e) => {
|
|
516
526
|
if (["totalControl", "readOnly"].includes(t ?? "")) {
|
|
517
527
|
const r = t === "totalControl" ? "total-control" : "read-only";
|
|
518
|
-
return
|
|
528
|
+
return a.get(`/system-roles/total-control-read-only/${r}/options`, {
|
|
519
529
|
params: e
|
|
520
530
|
});
|
|
521
531
|
}
|
|
522
|
-
return
|
|
532
|
+
return a.get(`/system-roles/permission/${t}/options`, {
|
|
523
533
|
params: e
|
|
524
534
|
});
|
|
525
535
|
},
|
|
526
|
-
getUserGroups: (t, e) =>
|
|
536
|
+
getUserGroups: (t, e) => a.get(`/system-roles/permission/${e}/groups`, {
|
|
527
537
|
params: t
|
|
528
538
|
}),
|
|
529
539
|
postAssignUser: (t, e) => {
|
|
530
540
|
if (["totalControl", "readOnly"].includes(e ?? "")) {
|
|
531
541
|
const r = e === "totalControl" ? "total-control" : "read-only";
|
|
532
|
-
return
|
|
542
|
+
return a.post(`/system-roles/total-control-read-only/${r}`, t);
|
|
533
543
|
}
|
|
534
|
-
return
|
|
544
|
+
return a.post(`/system-roles/permission/${e}`, t);
|
|
535
545
|
},
|
|
536
|
-
putEditUser: (t, e) =>
|
|
546
|
+
putEditUser: (t, e) => a.put(`/system-roles/${e}`, t),
|
|
537
547
|
putSetActive: (t, e) => {
|
|
538
548
|
if (["totalControl", "readOnly"].includes(e ?? "")) {
|
|
539
549
|
const r = e === "totalControl" ? "total-control" : "read-only";
|
|
540
|
-
return
|
|
550
|
+
return a.put(`/system-roles/total-control-read-only/${r}`, t);
|
|
541
551
|
}
|
|
542
|
-
return
|
|
552
|
+
return a.put("/system-roles/set-active", t);
|
|
543
553
|
},
|
|
544
554
|
deleteRemoveUser: (t, e) => {
|
|
545
555
|
if (["totalControl", "readOnly"].includes(e ?? "")) {
|
|
546
556
|
const r = e === "totalControl" ? "total-control" : "read-only";
|
|
547
|
-
return
|
|
557
|
+
return a.delete(`/system-roles/total-control-read-only/${r}`, {
|
|
548
558
|
data: t
|
|
549
559
|
});
|
|
550
560
|
}
|
|
551
|
-
return
|
|
561
|
+
return a.delete("/system-roles", { data: t });
|
|
552
562
|
}
|
|
553
|
-
},
|
|
563
|
+
}, f = s({
|
|
554
564
|
prefix: "/settings-attribute/v2/open-api"
|
|
555
|
-
}),
|
|
556
|
-
getOpenAPIDocs: (t) =>
|
|
557
|
-
putGenerateToken: () =>
|
|
565
|
+
}), St = {
|
|
566
|
+
getOpenAPIDocs: (t) => f.get(`/${t.doc}`),
|
|
567
|
+
putGenerateToken: () => f.put("/generate"),
|
|
558
568
|
// This is if the dummy was not dummy
|
|
559
|
-
getToken: () =>
|
|
560
|
-
putRequestOpenAPI: () =>
|
|
561
|
-
putCancelRequestOpenAPI: () =>
|
|
562
|
-
},
|
|
569
|
+
getToken: () => f.get(""),
|
|
570
|
+
putRequestOpenAPI: () => f.put("/request"),
|
|
571
|
+
putCancelRequestOpenAPI: () => f.put("/cancel-request")
|
|
572
|
+
}, _ = s({
|
|
563
573
|
prefix: "/settings-attribute-go/v2/open-api"
|
|
564
|
-
}),
|
|
565
|
-
putGenerateToken: () =>
|
|
574
|
+
}), yt = {
|
|
575
|
+
putGenerateToken: () => _.put("/generate"),
|
|
566
576
|
// This is if the dummy was not dummy
|
|
567
|
-
getToken: () =>
|
|
568
|
-
putRequestOpenAPI: () =>
|
|
569
|
-
putCancelRequestOpenAPI: () =>
|
|
577
|
+
getToken: () => _.get(""),
|
|
578
|
+
putRequestOpenAPI: () => _.put("/request"),
|
|
579
|
+
putCancelRequestOpenAPI: () => _.put("/cancel-request")
|
|
570
580
|
}, d = s({
|
|
571
581
|
prefix: "/import/v2"
|
|
572
|
-
}),
|
|
582
|
+
}), ft = {
|
|
573
583
|
getImport: (t, e) => d.get(`/${t}`, { params: e }),
|
|
574
584
|
postImportTemporary: (t, e) => {
|
|
575
585
|
const r = { "Content-Type": "multipart/form-data" };
|
|
@@ -582,7 +592,7 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
582
592
|
putImportCancelProgress: (t) => d.put(`/${t}/cancel-progress`)
|
|
583
593
|
}, A = s({
|
|
584
594
|
prefix: "/import-go/v2"
|
|
585
|
-
}),
|
|
595
|
+
}), Ct = {
|
|
586
596
|
getImport: (t, e) => A.get(`/${t}`, { params: e }),
|
|
587
597
|
postImportTemporary: (t, e) => {
|
|
588
598
|
const r = { "Content-Type": "multipart/form-data" };
|
|
@@ -595,37 +605,39 @@ const N = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
595
605
|
putImportCancelProgress: (t) => A.put(`/${t}/cancel-progress`)
|
|
596
606
|
};
|
|
597
607
|
export {
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
608
|
+
gt as AliasCodeServices,
|
|
609
|
+
ut as AliasCodeServicesGo,
|
|
610
|
+
Z as AssetServices,
|
|
611
|
+
$t as BrandServices,
|
|
612
|
+
z as ChangelogServices,
|
|
613
|
+
dt as CountryStateServices,
|
|
614
|
+
lt as CustomFieldServices,
|
|
615
|
+
at as DashboardServices,
|
|
616
|
+
vt as FileManagerServices,
|
|
617
|
+
It as FileManagerServicesGo,
|
|
618
|
+
ct as GeneralSettingsServices,
|
|
619
|
+
pt as GeneralSettingsServicesGo,
|
|
620
|
+
H as GroupCategoryServices,
|
|
621
|
+
K as GroupCategoryServicesGo,
|
|
622
|
+
it as I18nService,
|
|
623
|
+
ft as ImportServices,
|
|
624
|
+
Ct as ImportServicesGo,
|
|
625
|
+
X as MissingServices,
|
|
626
|
+
W as NotificationApprovalServices,
|
|
627
|
+
tt as NotificationServices,
|
|
628
|
+
et as NotificationServicesGo,
|
|
629
|
+
St as OpenAPIServices,
|
|
630
|
+
yt as OpenAPIServicesGo,
|
|
631
|
+
Pt as ReaderServices,
|
|
632
|
+
mt as RoleServices,
|
|
633
|
+
At as ServiceCenterServices,
|
|
634
|
+
rt as SessionLogServices,
|
|
635
|
+
st as TAGServices,
|
|
636
|
+
nt as TrackingServices,
|
|
637
|
+
ot as UserServices,
|
|
638
|
+
J as getAssetsFile,
|
|
639
|
+
m as getBaseURL,
|
|
640
|
+
Q as getImageURL,
|
|
641
|
+
Y as getImageURLGo,
|
|
630
642
|
j as queryParamsStringfy
|
|
631
643
|
};
|
package/api-services.system.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["axios"],function(n,Y){"use strict";var T;return{setters:[L=>{T=L.default}],execute:function(){const L={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_ADMIN_API:"https://dev-admin-api.tagsamurai.com",VITE_APP_API:"https://dev-api.tagsamurai.com",VITE_APP_ASSETS_URL:"https://assets.tagsamurai.com",VITE_APP_COUNTRY_STATE_API:"https://api.countrystatecity.in",VITE_APP_COUNTRY_STATE_API_KEY:"ZTc5TVc2STlwTkFFNFltYTRjc05sOHR3ODJEYzVMVTZ5UnBJaWU5SA==",VITE_APP_LOGS_NOTIFICATION_API:"https://dev-api-logs-notification.tagsamurai.com",VITE_APP_TAGSAMURAI_API:"https://dev-api.tagsamurai.com"},y=n("getBaseURL",(t="APP_API")=>L["VITE_"+t]),s=(t={},e=!1)=>{const{env:r="APP_API",prefix:g="",headers:G={},...B}=t,V=`${y(r)}${g}`,E=JSON.parse(localStorage.getItem("user")??"{}"),j=E.jwt??E.token??"";return T.create({...B,baseURL:V,headers:e?G:{"Content-Type":"application/json",Authorization:`Bearer ${j}`,...G}})},Q=n("queryParamsStringfy",t=>{if(!t||typeof t=="string")return;const e={};return Object.keys(t).forEach(r=>{Array.isArray(t[r])?t[r].length>0&&Object.assign(e,{[r]:JSON.stringify(t[r])}):t[r]!==void 0&&Object.assign(e,{[r]:t[r]})}),e}),J=n("getImageURL",t=>{if(!t)return;const e=y("APP_TAGSAMURAI_API");return t.startsWith("http")?t:`${e}/file-manager/v2/files/${t}`}),l=s({prefix:"/settings-attribute/v2",env:"APP_TAGSAMURAI_API"}),H=n("GroupCategoryServices",{getGroupCategory:(t,e)=>{const r=t==="category"?t:"groups";return l.get(`/${r}/tree`,{params:e})},getGroupCategoryList:(t,e,r)=>{const g=t==="category"?t:"groups";return l.get(`/${g}/${e}`,{params:r})},getNames:t=>{const e=t==="category"?t:"groups";return l.get(`/${e}/names`)},getCodes:t=>{const e=t==="category"?t:"groups";return l.get(`/${e}/codes`)},postCreateGroupCategory:(t,e)=>{const r=t==="category"?t:"groups";return l.post(`/${r}`,e)},putEditGroupCategory:(t,e,r)=>{const g=t==="category"?t:"groups";return l.put(`/${g}/${r}`,e)},putMoveGroup:(t,e)=>l.put(`/groups/${e}/move-group`,t),putEditBulkGroups:async t=>l.put("/groups/bulk",t),deleteGroupCategory:(t,e,r)=>{const g=t==="category"?t:"groups";return l.delete(`/${g}/${r}`,{data:e})}}),d=s({prefix:"/settings-attribute-go/v2"}),K=n("GroupCategoryServicesGo",{getGroupCategory:(t,e)=>{const r=t==="category"?t:"groups";return d.get(`/${r}/tree`,{params:e})},getGroupCategoryList:(t,e)=>{const r=t==="category"?t:"groups";return d.get(`/${r}/${e}`)},getNames:t=>{const e=t==="category"?t:"groups";return d.get(`/${e}/names`)},getCodes:t=>{const e=t==="category"?t:"groups";return d.get(`/${e}/codes`)},postCreateGroupCategory:(t,e)=>{const r=t==="category"?t:"groups";return d.post(`/${r}`,e)},putEditGroupCategory:(t,e,r)=>{const g=t==="category"?t:"groups";return d.put(`/${g}/${r}`,e)},deleteGroupCategory:(t,e,r)=>{const g=t==="category"?t:"groups";return d.delete(`/${g}/${r}`,{data:e})}}),N=s({prefix:"/v2",env:"APP_LOGS_NOTIFICATION_API"}),x=n("NotificationApprovalServices",{getTotalApprovals:()=>N.get("/approval/count")}),P=s({prefix:"/v2",env:"APP_LOGS_NOTIFICATION_API"}),W=n("ChangelogServices",{getActionLog:t=>P.get("/change-log",{params:t}),getActionLogOption:t=>P.get("/change-log/options",{params:t}),getSessionLogList:t=>P.get("/session-log",{params:t}),getUserDetailSystemLogList:t=>P.get("/change-log",{params:t}),getUserDetailSystemLogOption:t=>P.get("/change-log/options",{params:t})}),c=s({prefix:"/assets/v2/assets"}),z=n("AssetServices",{getScanTag:t=>c.get("/scan",{params:{tag:t}}),getAllAssets:t=>c.get("/",{params:t}),getAvailableAssets:t=>c.get("/available",{params:t}),scanAsset:t=>c.get("",{params:{tag:t}}),getAssetsById:(t,e)=>c.get("/by-id",{params:{_id:t,...e}}),getOptions:(t,e)=>c.get(t?`/${t}/options`:"/options",{params:e}),getUnlinkedAssets:t=>c.get("/unlinked",{params:t}),getAssetDetail:(t,e)=>c.get(`/${t}`,{params:e}),getLinkedAssetFamily:t=>c.get("/family",{params:{id:t}}),matchAssetWithTag:(t,e)=>{const r={_id:JSON.stringify([t]),tag:e};return c.get("/by-id",{params:r})}}),M=s({prefix:"/tracking/v2/missing"}),Z=n("MissingServices",{putFoundAsset:(t,e)=>{const r={ids:[t],serialNumber:e};return M.put("/found",r)}}),h=s({prefix:"/v2/notification",env:"APP_LOGS_NOTIFICATION_API"}),X=n("NotificationServices",{getNotifications:t=>h.get("/",{params:t}),readNotification:t=>h.put(`/${t}`)}),R=s({prefix:"/utility/v2/notification"}),tt=n("NotificationServicesGo",{getNotifications:t=>R.get("/",{params:t}),readNotification:t=>R.put(`/${t}`)}),k=s({prefix:"/v2/session-log",env:"APP_LOGS_NOTIFICATION_API"}),et=n("SessionLogServices",{postLogout:()=>k.post("/logout")}),o=s({prefix:"/tag/v2"}),rt=n("TAGServices",{getScanQR:t=>o.get("/qr",{params:{tag:t}}),getScanRFID:t=>o.get("/rfid",{params:{tag:t}}),getRFIDQRTAG:t=>o.get("/rfid-qr/scan",{params:t}),getEventLog:t=>o.get("/tag-transaction/event-log",{params:t}),getRfidQrAll:(t,e)=>o.get(`/${t}`,{params:e}),getRfidQrPaired:(t,e,r)=>o.get(`/${t}/paired/${e}`,{params:r}),postAddTAGtoPrelist:(t,e)=>o.post(`/prelist/${e}/asset-name`,{body:t}),postAddTAGToPrelistUnpair:t=>o.post("/prelist/unpair-tag",{body:t}),postAddTAGtoPending:t=>o.post("/pending-changes",{body:t}),getRFIDQrAvailable:(t,e)=>o.get(`/${t}/available`,{params:e}),getRFIDQrDamaged:(t,e)=>o.get(`/${t}/damaged`,{params:e}),getRFIDandQRList:t=>o.get("/rfid-qr",{params:t}),deleteUnpairTAG:t=>o.delete("/rfid-qr",{data:{data:t}}),postPairTAG:t=>o.post("/rfid-qr",{body:{data:t}}),getToBeReturnedTAGList:t=>o.get("/rfid/to-be-returned",{params:t}),putHandoverTAG:t=>o.put("/rfid/handover",{body:{data:t}}),getFilterOptions:(t,e)=>o.get(`/${t}/options`,{params:e}),getHolderListOptions:t=>o.get("/rfid/holder-list/options",{params:t}),getHolderList:t=>o.get("/rfid/holder-list",{params:t}),putAuditTAG:(t,e)=>o.put(`/${e}/audit`,{body:t}),postLogAudit:t=>o.post("/tag-transaction/log-audit",{body:t})}),w=s({prefix:"/tracking/v2/tracking"}),nt=n("TrackingServices",{putFoundAsset:(t,e,r)=>{const g={tag:t,group:e,serialNumber:r,type:"Global"};return w.put("/found",{params:g})}}),i=s({prefix:"/settings-user-role/v2"}),st=n("UserServices",{reLogin:t=>i.post("/auth/login",t),changePassword:t=>i.put("/users/change-password",t),getUserDropdown:t=>i.get("/users/dropdown",{params:t}),getUserOptions:t=>i.get("/users/options",{params:t}),getUserList:t=>i.get("/users",{params:t}),getUserDetail:t=>i.get(`/users/${t}`),putEditUser:(t,e)=>{const r={"Content-Type":"multipart/form-data"};return i.put(`/users/${t}`,e,{headers:r})},putDeleteProfilePicture:t=>i.put(`/users/${t}/delete-profile-picture`),putCancelEmailChange:(t,e)=>i.put("/auth/confirm-email-change/cancel",{user:t,companyCode:e}),getUserDetailSystemRoles:(t,e,r)=>i.get(`/user-detail/${t}/system-roles`,{params:{...r,type:e}}),getUserDetailSystemRoleList:(t,e)=>i.get(`/user-detail/${t}/system-role-list`,{params:e}),getUserDetailSystemRoleOptions:(t,e)=>i.get(`/user-detail/${t}/system-role/option`,{params:e}),getUserDetailTransactionRoleList:(t,e)=>i.get(`/user-detail/${t}/transaction-role-list`,{params:e}),getUserDetailUserLogBorrowingList:(t,e)=>i.get(`/users-log/${t}/borrowing`,{params:e}),getUserDetailUserLogAssignmentList:(t,e)=>i.get(`/users-log/${t}/assignment`,{params:e}),getUserDetailUserLogBorrowingOption:(t,e)=>i.get(`/users-log/${t}/borrowing/option`,{params:e}),getUserDetailUserLogAssignmentOption:(t,e)=>i.get(`/users-log/${t}/assignment/option`,{params:e}),getUserDetailTransactionAdminLogList:(t,e)=>i.get(`/users-log/${t}/transaction-log`,{params:e}),getUserDetailTransactionAdminLogOption:(t,e)=>i.get(`/users-log/${t}/transaction-log/option`,{params:e})}),f=s({env:"APP_ADMIN_API",prefix:"/settings-attribute/languages"}),ot=n("I18nService",{getMessages:t=>f.get(`/${t}/translations`),getLanguageOptions:async()=>{const{data:t}=await f.get("/dropdown");return t.data},getLanguageOptionMeta:async t=>{const{data:e}=await f.get("/dropdown/"+t);return e.data},translateText:async(t,e)=>{const{data:r}=await f.post("/translate",{q:t,target:e});return r.data.translations[t]}}),D=s({prefix:"/dashboard/v2/dashboard"}),it=n("DashboardServices",{getLatestTask:t=>D.get("/latest-task",{params:t}),getSummary:t=>D.get("/summary",{params:t})}),O=s({prefix:"/alias-code/api/alias-code"}),at=n("AliasCodeServices",{getAliasCode:()=>O.get("/"),postAliasCode:t=>O.post("/",t),getAliasCodeList:t=>O.get(`/${t.object}/code-list`,{params:t})}),_=s({prefix:"/settings-attribute-go/v2/alias-code"}),gt=n("AliasCodeServicesGo",{getAliasCode:()=>_.get("/"),postAliasCode:t=>_.post("/",t),getAliasCodeList:t=>_.get(`/${t.object}/code-list`,{params:t})}),b=s({prefix:"/settings-attribute/v2/general-settings"}),ut=n("GeneralSettingsServices",{getGeneralSettings:()=>b.get("/"),putUpdateGeneralSettings:t=>b.put("/",t)}),F=s({prefix:"/settings-attribute-go/v2/general-settings"}),ct=n("GeneralSettingsServicesGo",{getGeneralSettings:()=>F.get("/"),putUpdateGeneralSettings:t=>F.put("/",t)}),$=s({prefix:"/settings-attribute/v2/custom-field"}),lt=n("CustomFieldServices",{getCustomField:async t=>$.get("/",{params:t}),getOptions:async t=>$.get("/options",{params:t}),postCreateCustomField:async(t,e)=>$.post("/",e,{params:t}),putEditCustomField:async(t,e,r)=>$.put(`/${r}`,e,{params:t}),putChangeStatus:async(t,e)=>$.put("/bulk",e,{params:t}),deleteCustomField:async t=>$.delete("/bulk",{data:t})}),U=({headers:t={},params:e={}}={})=>{const r=y("APP_COUNTRY_STATE_API"),g=y("APP_COUNTRY_STATE_API_KEY");return T.create({baseURL:`${r}/v1`,headers:{"Content-type":"application/json","X-CSCAPI-KEY":g,...t},params:e})},pt=n("CountryStateServices",{getCountry:()=>U().get("/countries"),getState:t=>U().get(`/countries/${t}/states`),getCity:(t,e)=>U().get(`/countries/${t}/states/${e}/cities`)}),u=s({prefix:"/routine/v2"}),dt=n("ServiceCenterServices",{getList:t=>u.get("/service-center",{params:t}),postList:t=>u.post("/service-center",t),putList:(t,e)=>u.put(`/service-center/${t}`,e),putActivate:t=>u.put("/service-center/bulk",t),getDetailList:t=>u.get(`/service-center/${t}`),getListOptions:t=>u.get("/service-center/options",{params:t}),deleteList:t=>u.delete("/service-center",{params:t}),getActivities:t=>u.get("/service-activities",{params:t}),getActivityOptions:t=>u.get("/service-activities/options",{params:t}),getActivityDetail:t=>u.get(`/service-activities/${t}`),getActivityLog:t=>u.get(`/service-activities/${t}/activity-log`)}),q=s({prefix:"/settings-attribute/v2/brands"}),At=n("BrandServices",{getDropdown:t=>q.get("/dropdown",{params:t})}),I=s({prefix:"/file-manager/v2"}),vt=n("FileManagerServices",{getStorageInformation:()=>I.get("/files/storage"),getFileManager:(t,e)=>I.get(`/${t}`,{params:e}),getFileManagerOption:(t,e)=>I.get(`/${t}/options`,{params:e}),recoverFiles:(t,e)=>I.put(`/${t}/recover`,e),deleteFiles:(t,e)=>I.delete(`/${t}`,{params:e}),deletePermanently:(t,e)=>I.delete(`/${t}/delete-permanent`,{params:e})}),S=s({prefix:"/utility/v2"}),$t=n("FileManagerServicesGo",{getStorageInformation:()=>S.get("/files/storage"),getFileManager:(t,e)=>S.get(`/${t}`,{params:e}),getFileManagerOption:(t,e)=>S.get(`/${t}/options`,{params:e}),recoverFiles:(t,e)=>S.put(`/${t}/recover`,e),deleteFiles:(t,e)=>S.delete(`/${t}`,{params:e}),deletePermanently:(t,e)=>S.delete(`/${t}/delete-permanent`,{params:e})}),p=s({prefix:"/iot/v2/reader"}),It=n("ReaderServices",{getData:t=>p.get("/",{params:t}),getDataOptions:t=>p.get("/options",{params:t}),getActivityLogData:t=>p.get("/activity-log",{params:t}),getActivityLogOptions:t=>p.get("/activity-log/options",{params:t}),getDataById:t=>p.get(`/${t}`),getChangeLog:t=>p.get(`/${t.id}/change-log`,{params:t}),getChangeLogOptions:t=>p.get(`/${t.id}/change-log/options`,{params:t}),putData:(t,e)=>p.put(`/${t}`,e)}),a=s({prefix:"/settings-user-role/v2"}),St=n("RoleServices",{getTransactionRole:(t,e)=>a.get(`/transaction-roles/${t}/${e}`),putUpdateUsers:(t,e,r)=>a.put(`/transaction-roles/${t}/${e}/update-user`,r),putUpdateLevel:(t,e,r)=>a.put(`/transaction-roles/${t}/${e}/update-approval-level`,r),putUpdateGroupManage:(t,e,r)=>a.put(`/transaction-roles/${t}/${e}/update-manage-by-parent`,r),getAssignedUserAmounts:()=>a.get("/system-roles/amounts"),getPermissionUser:(t,e)=>{if(["totalControl","readOnly"].includes(t??"")){const r=t==="totalControl"?"total-control":"read-only";return a.get(`/system-roles/total-control-read-only/${r}`,{params:e})}return a.get(`/system-roles/permission/${t}`,{params:e})},getPermissionUserOptions:(t,e)=>{if(["totalControl","readOnly"].includes(t??"")){const r=t==="totalControl"?"total-control":"read-only";return a.get(`/system-roles/total-control-read-only/${r}/options`,{params:e})}return a.get(`/system-roles/permission/${t}/options`,{params:e})},getUserGroups:(t,e)=>a.get(`/system-roles/permission/${e}/groups`,{params:t}),postAssignUser:(t,e)=>{if(["totalControl","readOnly"].includes(e??"")){const r=e==="totalControl"?"total-control":"read-only";return a.post(`/system-roles/total-control-read-only/${r}`,t)}return a.post(`/system-roles/permission/${e}`,t)},putEditUser:(t,e)=>a.put(`/system-roles/${e}`,t),putSetActive:(t,e)=>{if(["totalControl","readOnly"].includes(e??"")){const r=e==="totalControl"?"total-control":"read-only";return a.put(`/system-roles/total-control-read-only/${r}`,t)}return a.put("/system-roles/set-active",t)},deleteRemoveUser:(t,e)=>{if(["totalControl","readOnly"].includes(e??"")){const r=e==="totalControl"?"total-control":"read-only";return a.delete(`/system-roles/total-control-read-only/${r}`,{data:t})}return a.delete("/system-roles",{data:t})}}),m=s({prefix:"/settings-attribute/v2/open-api"}),Pt=n("OpenAPIServices",{getOpenAPIDocs:t=>m.get(`/${t.doc}`),putGenerateToken:()=>m.put("/generate"),getToken:()=>m.get(""),putRequestOpenAPI:()=>m.put("/request"),putCancelRequestOpenAPI:()=>m.put("/cancel-request")}),C=s({prefix:"/settings-attribute-go/v2/open-api"}),mt=n("OpenAPIServicesGo",{putGenerateToken:()=>C.put("/generate"),getToken:()=>C.get(""),putRequestOpenAPI:()=>C.put("/request"),putCancelRequestOpenAPI:()=>C.put("/cancel-request")}),A=s({prefix:"/import/v2"}),yt=n("ImportServices",{getImport:(t,e)=>A.get(`/${t}`,{params:e}),postImportTemporary:(t,e)=>{const r={"Content-Type":"multipart/form-data"};return A.post(`/${t}/temporary`,e,{headers:r})},deleteImportTemporary:(t,e)=>A.delete(`/${t}/temporary`,{data:e}),postDuplicateImport:(t,e)=>A.post(`/${t}/duplicate`,e),putEditImport:(t,e)=>A.put(`/${t}`,e),postImport:(t,e,r)=>A.post(t,r,{signal:e.signal}),putImportCancelProgress:t=>A.put(`/${t}/cancel-progress`)}),v=s({prefix:"/import-go/v2"}),ft=n("ImportServicesGo",{getImport:(t,e)=>v.get(`/${t}`,{params:e}),postImportTemporary:(t,e)=>{const r={"Content-Type":"multipart/form-data"};return v.post(`/${t}/temporary`,e,{headers:r})},deleteImportTemporary:(t,e)=>v.delete(`/${t}/temporary`,{params:e}),postDuplicateImport:(t,e)=>v.post(`/${t}/duplicate`,e),putEditImport:(t,e)=>v.put(`/${t}`,e),postImport:(t,e,r)=>v.post(t,r,{signal:e.signal}),putImportCancelProgress:t=>v.put(`/${t}/cancel-progress`)})}}});
|
|
1
|
+
System.register(["axios"],function(n,Y){"use strict";var _;return{setters:[O=>{_=O.default}],execute:function(){const O={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_ADMIN_API:"https://dev-admin-api.tagsamurai.com",VITE_APP_API:"https://dev-api.tagsamurai.com",VITE_APP_ASSETS_URL:"https://assets.tagsamurai.com",VITE_APP_COUNTRY_STATE_API:"https://api.countrystatecity.in",VITE_APP_COUNTRY_STATE_API_KEY:"ZTc5TVc2STlwTkFFNFltYTRjc05sOHR3ODJEYzVMVTZ5UnBJaWU5SA==",VITE_APP_LOGS_NOTIFICATION_API:"https://dev-api-logs-notification.tagsamurai.com",VITE_APP_TAGSAMURAI_API:"https://dev-api.tagsamurai.com"},$=n("getBaseURL",(t="APP_API")=>O["VITE_"+t]),s=(t={},e=!1)=>{const{env:r="APP_API",prefix:g="",headers:m={},...C}=t,V=`${$(r)}${g}`,N=JSON.parse(localStorage.getItem("user")??"{}"),j=N.jwt??N.token??"";return _.create({...C,baseURL:V,headers:e?m:{"Content-Type":"application/json",Authorization:`Bearer ${j}`,...m}})},Q=n("queryParamsStringfy",t=>{if(!t||typeof t=="string")return;const e={};return Object.keys(t).forEach(r=>{Array.isArray(t[r])?t[r].length>0&&Object.assign(e,{[r]:JSON.stringify(t[r])}):t[r]!==void 0&&Object.assign(e,{[r]:t[r]})}),e}),J=n("getImageURLGo",(t,e,r)=>{if(!t)return;const g=$("APP_API"),m=t.startsWith("http")?t:`${g}/utility/v2/files/${t.replace(/^\/+/,"")}`;if(e||r){const C=new URLSearchParams;return e&&(C.set("width",e.toString()),C.set("height",r?r==null?void 0:r.toString():e.toString())),`${m}?${C.toString()}`}return m}),H=n("getImageURL",t=>{if(!t)return;const e=$("APP_TAGSAMURAI_API");return t.startsWith("http")?t:`${e}/file-manager/v2/files/${t}`}),K=n("getAssetsFile",async(t,e="excel")=>await fetch(`${$("APP_ASSETS_URL")}/${e}/${t}`)),l=s({prefix:"/settings-attribute/v2",env:"APP_TAGSAMURAI_API"}),W=n("GroupCategoryServices",{getGroupCategory:(t,e)=>{const r=t==="category"?t:"groups";return l.get(`/${r}/tree`,{params:e})},getGroupCategoryList:(t,e,r)=>{const g=t==="category"?t:"groups";return l.get(`/${g}/${e}`,{params:r})},getNames:t=>{const e=t==="category"?t:"groups";return l.get(`/${e}/names`)},getCodes:t=>{const e=t==="category"?t:"groups";return l.get(`/${e}/codes`)},postCreateGroupCategory:(t,e)=>{const r=t==="category"?t:"groups";return l.post(`/${r}`,e)},putEditGroupCategory:(t,e,r)=>{const g=t==="category"?t:"groups";return l.put(`/${g}/${r}`,e)},putMoveGroup:(t,e)=>l.put(`/groups/${e}/move-group`,t),putEditBulkGroups:async t=>l.put("/groups/bulk",t),deleteGroupCategory:(t,e,r)=>{const g=t==="category"?t:"groups";return l.delete(`/${g}/${r}`,{data:e})}}),d=s({prefix:"/settings-attribute-go/v2"}),x=n("GroupCategoryServicesGo",{getGroupCategory:(t,e)=>{const r=t==="category"?t:"groups";return d.get(`/${r}/tree`,{params:e})},getGroupCategoryList:(t,e)=>{const r=t==="category"?t:"groups";return d.get(`/${r}/${e}`)},getNames:t=>{const e=t==="category"?t:"groups";return d.get(`/${e}/names`)},getCodes:t=>{const e=t==="category"?t:"groups";return d.get(`/${e}/codes`)},postCreateGroupCategory:(t,e)=>{const r=t==="category"?t:"groups";return d.post(`/${r}`,e)},putEditGroupCategory:(t,e,r)=>{const g=t==="category"?t:"groups";return d.put(`/${g}/${r}`,e)},deleteGroupCategory:(t,e,r)=>{const g=t==="category"?t:"groups";return d.delete(`/${g}/${r}`,{data:e})}}),M=s({prefix:"/v2",env:"APP_LOGS_NOTIFICATION_API"}),z=n("NotificationApprovalServices",{getTotalApprovals:()=>M.get("/approval/count")}),y=s({prefix:"/v2",env:"APP_LOGS_NOTIFICATION_API"}),Z=n("ChangelogServices",{getActionLog:t=>y.get("/change-log",{params:t}),getActionLogOption:t=>y.get("/change-log/options",{params:t}),getSessionLogList:t=>y.get("/session-log",{params:t}),getUserDetailSystemLogList:t=>y.get("/change-log",{params:t}),getUserDetailSystemLogOption:t=>y.get("/change-log/options",{params:t})}),c=s({prefix:"/assets/v2/assets"}),X=n("AssetServices",{getScanTag:t=>c.get("/scan",{params:{tag:t}}),getAllAssets:t=>c.get("/",{params:t}),getAvailableAssets:t=>c.get("/available",{params:t}),scanAsset:t=>c.get("",{params:{tag:t}}),getAssetsById:(t,e)=>c.get("/by-id",{params:{_id:t,...e}}),getOptions:(t,e)=>c.get(t?`/${t}/options`:"/options",{params:e}),getUnlinkedAssets:t=>c.get("/unlinked",{params:t}),getAssetDetail:(t,e)=>c.get(`/${t}`,{params:e}),getLinkedAssetFamily:t=>c.get("/family",{params:{id:t}}),matchAssetWithTag:(t,e)=>{const r={_id:JSON.stringify([t]),tag:e};return c.get("/by-id",{params:r})}}),k=s({prefix:"/tracking/v2/missing"}),tt=n("MissingServices",{putFoundAsset:(t,e)=>{const r={ids:[t],serialNumber:e};return k.put("/found",r)}}),D=s({prefix:"/v2/notification",env:"APP_LOGS_NOTIFICATION_API"}),et=n("NotificationServices",{getNotifications:t=>D.get("/",{params:t}),readNotification:t=>D.put(`/${t}`)}),h=s({prefix:"/utility/v2/notification"}),rt=n("NotificationServicesGo",{getNotifications:t=>h.get("/",{params:t}),readNotification:t=>h.put(`/${t}`)}),w=s({prefix:"/v2/session-log",env:"APP_LOGS_NOTIFICATION_API"}),nt=n("SessionLogServices",{postLogout:()=>w.post("/logout")}),o=s({prefix:"/tag/v2"}),st=n("TAGServices",{getScanQR:t=>o.get("/qr",{params:{tag:t}}),getScanRFID:t=>o.get("/rfid",{params:{tag:t}}),getRFIDQRTAG:t=>o.get("/rfid-qr/scan",{params:t}),getEventLog:t=>o.get("/tag-transaction/event-log",{params:t}),getRfidQrAll:(t,e)=>o.get(`/${t}`,{params:e}),getRfidQrPaired:(t,e,r)=>o.get(`/${t}/paired/${e}`,{params:r}),postAddTAGtoPrelist:(t,e)=>o.post(`/prelist/${e}/asset-name`,{body:t}),postAddTAGToPrelistUnpair:t=>o.post("/prelist/unpair-tag",{body:t}),postAddTAGtoPending:t=>o.post("/pending-changes",{body:t}),getRFIDQrAvailable:(t,e)=>o.get(`/${t}/available`,{params:e}),getRFIDQrDamaged:(t,e)=>o.get(`/${t}/damaged`,{params:e}),getRFIDandQRList:t=>o.get("/rfid-qr",{params:t}),deleteUnpairTAG:t=>o.delete("/rfid-qr",{data:{data:t}}),postPairTAG:t=>o.post("/rfid-qr",{body:{data:t}}),getToBeReturnedTAGList:t=>o.get("/rfid/to-be-returned",{params:t}),putHandoverTAG:t=>o.put("/rfid/handover",{body:{data:t}}),getFilterOptions:(t,e)=>o.get(`/${t}/options`,{params:e}),getHolderListOptions:t=>o.get("/rfid/holder-list/options",{params:t}),getHolderList:t=>o.get("/rfid/holder-list",{params:t}),putAuditTAG:(t,e)=>o.put(`/${e}/audit`,{body:t}),postLogAudit:t=>o.post("/tag-transaction/log-audit",{body:t})}),q=s({prefix:"/tracking/v2/tracking"}),ot=n("TrackingServices",{putFoundAsset:(t,e,r)=>{const g={tag:t,group:e,serialNumber:r,type:"Global"};return q.put("/found",{params:g})}}),i=s({prefix:"/settings-user-role/v2"}),it=n("UserServices",{reLogin:t=>i.post("/auth/login",t),changePassword:t=>i.put("/users/change-password",t),getUserDropdown:t=>i.get("/users/dropdown",{params:t}),getUserOptions:t=>i.get("/users/options",{params:t}),getUserList:t=>i.get("/users",{params:t}),getUserDetail:t=>i.get(`/users/${t}`),putEditUser:(t,e)=>{const r={"Content-Type":"multipart/form-data"};return i.put(`/users/${t}`,e,{headers:r})},putDeleteProfilePicture:t=>i.put(`/users/${t}/delete-profile-picture`),putCancelEmailChange:(t,e)=>i.put("/auth/confirm-email-change/cancel",{user:t,companyCode:e}),getUserDetailSystemRoles:(t,e,r)=>i.get(`/user-detail/${t}/system-roles`,{params:{...r,type:e}}),getUserDetailSystemRoleList:(t,e)=>i.get(`/user-detail/${t}/system-role-list`,{params:e}),getUserDetailSystemRoleOptions:(t,e)=>i.get(`/user-detail/${t}/system-role/option`,{params:e}),getUserDetailTransactionRoleList:(t,e)=>i.get(`/user-detail/${t}/transaction-role-list`,{params:e}),getUserDetailUserLogBorrowingList:(t,e)=>i.get(`/users-log/${t}/borrowing`,{params:e}),getUserDetailUserLogAssignmentList:(t,e)=>i.get(`/users-log/${t}/assignment`,{params:e}),getUserDetailUserLogBorrowingOption:(t,e)=>i.get(`/users-log/${t}/borrowing/option`,{params:e}),getUserDetailUserLogAssignmentOption:(t,e)=>i.get(`/users-log/${t}/assignment/option`,{params:e}),getUserDetailTransactionAdminLogList:(t,e)=>i.get(`/users-log/${t}/transaction-log`,{params:e}),getUserDetailTransactionAdminLogOption:(t,e)=>i.get(`/users-log/${t}/transaction-log/option`,{params:e})}),L=s({env:"APP_ADMIN_API",prefix:"/settings-attribute/languages"}),at=n("I18nService",{getMessages:t=>L.get(`/${t}/translations`),getLanguageOptions:async()=>{const{data:t}=await L.get("/dropdown");return t.data},getLanguageOptionMeta:async t=>{const{data:e}=await L.get("/dropdown/"+t);return e.data},translateText:async(t,e)=>{const{data:r}=await L.post("/translate",{q:t,target:e});return r.data.translations[t]}}),b=s({prefix:"/dashboard/v2/dashboard"}),gt=n("DashboardServices",{getLatestTask:t=>b.get("/latest-task",{params:t}),getSummary:t=>b.get("/summary",{params:t})}),U=s({prefix:"/alias-code/api/alias-code"}),ut=n("AliasCodeServices",{getAliasCode:()=>U.get("/"),postAliasCode:t=>U.post("/",t),getAliasCodeList:t=>U.get(`/${t.object}/code-list`,{params:t})}),G=s({prefix:"/settings-attribute-go/v2/alias-code"}),ct=n("AliasCodeServicesGo",{getAliasCode:()=>G.get("/"),postAliasCode:t=>G.post("/",t),getAliasCodeList:t=>G.get(`/${t.object}/code-list`,{params:t})}),F=s({prefix:"/settings-attribute/v2/general-settings"}),lt=n("GeneralSettingsServices",{getGeneralSettings:()=>F.get("/"),putUpdateGeneralSettings:t=>F.put("/",t)}),E=s({prefix:"/settings-attribute-go/v2/general-settings"}),pt=n("GeneralSettingsServicesGo",{getGeneralSettings:()=>E.get("/"),putUpdateGeneralSettings:t=>E.put("/",t)}),S=s({prefix:"/settings-attribute/v2/custom-field"}),dt=n("CustomFieldServices",{getCustomField:async t=>S.get("/",{params:t}),getOptions:async t=>S.get("/options",{params:t}),postCreateCustomField:async(t,e)=>S.post("/",e,{params:t}),putEditCustomField:async(t,e,r)=>S.put(`/${r}`,e,{params:t}),putChangeStatus:async(t,e)=>S.put("/bulk",e,{params:t}),deleteCustomField:async t=>S.delete("/bulk",{data:t})}),R=({headers:t={},params:e={}}={})=>{const r=$("APP_COUNTRY_STATE_API"),g=$("APP_COUNTRY_STATE_API_KEY");return _.create({baseURL:`${r}/v1`,headers:{"Content-type":"application/json","X-CSCAPI-KEY":g,...t},params:e})},At=n("CountryStateServices",{getCountry:()=>R().get("/countries"),getState:t=>R().get(`/countries/${t}/states`),getCity:(t,e)=>R().get(`/countries/${t}/states/${e}/cities`)}),u=s({prefix:"/routine/v2"}),vt=n("ServiceCenterServices",{getList:t=>u.get("/service-center",{params:t}),postList:t=>u.post("/service-center",t),putList:(t,e)=>u.put(`/service-center/${t}`,e),putActivate:t=>u.put("/service-center/bulk",t),getDetailList:t=>u.get(`/service-center/${t}`),getListOptions:t=>u.get("/service-center/options",{params:t}),deleteList:t=>u.delete("/service-center",{params:t}),getActivities:t=>u.get("/service-activities",{params:t}),getActivityOptions:t=>u.get("/service-activities/options",{params:t}),getActivityDetail:t=>u.get(`/service-activities/${t}`),getActivityLog:t=>u.get(`/service-activities/${t}/activity-log`)}),B=s({prefix:"/settings-attribute/v2/brands"}),$t=n("BrandServices",{getDropdown:t=>B.get("/dropdown",{params:t})}),I=s({prefix:"/file-manager/v2"}),St=n("FileManagerServices",{getStorageInformation:()=>I.get("/files/storage"),getFileManager:(t,e)=>I.get(`/${t}`,{params:e}),getFileManagerOption:(t,e)=>I.get(`/${t}/options`,{params:e}),recoverFiles:(t,e)=>I.put(`/${t}/recover`,e),deleteFiles:(t,e)=>I.delete(`/${t}`,{params:e}),deletePermanently:(t,e)=>I.delete(`/${t}/delete-permanent`,{params:e})}),P=s({prefix:"/utility/v2"}),It=n("FileManagerServicesGo",{getStorageInformation:()=>P.get("/files/storage"),getFileManager:(t,e)=>P.get(`/${t}`,{params:e}),getFileManagerOption:(t,e)=>P.get(`/${t}/options`,{params:e}),recoverFiles:(t,e)=>P.put(`/${t}/recover`,e),deleteFiles:(t,e)=>P.delete(`/${t}`,{params:e}),deletePermanently:(t,e)=>P.delete(`/${t}/delete-permanent`,{params:e})}),p=s({prefix:"/iot/v2/reader"}),Pt=n("ReaderServices",{getData:t=>p.get("/",{params:t}),getDataOptions:t=>p.get("/options",{params:t}),getActivityLogData:t=>p.get("/activity-log",{params:t}),getActivityLogOptions:t=>p.get("/activity-log/options",{params:t}),getDataById:t=>p.get(`/${t}`),getChangeLog:t=>p.get(`/${t.id}/change-log`,{params:t}),getChangeLogOptions:t=>p.get(`/${t.id}/change-log/options`,{params:t}),putData:(t,e)=>p.put(`/${t}`,e)}),a=s({prefix:"/settings-user-role/v2"}),mt=n("RoleServices",{getTransactionRole:(t,e)=>a.get(`/transaction-roles/${t}/${e}`),putUpdateUsers:(t,e,r)=>a.put(`/transaction-roles/${t}/${e}/update-user`,r),putUpdateLevel:(t,e,r)=>a.put(`/transaction-roles/${t}/${e}/update-approval-level`,r),putUpdateGroupManage:(t,e,r)=>a.put(`/transaction-roles/${t}/${e}/update-manage-by-parent`,r),getAssignedUserAmounts:()=>a.get("/system-roles/amounts"),getPermissionUser:(t,e)=>{if(["totalControl","readOnly"].includes(t??"")){const r=t==="totalControl"?"total-control":"read-only";return a.get(`/system-roles/total-control-read-only/${r}`,{params:e})}return a.get(`/system-roles/permission/${t}`,{params:e})},getPermissionUserOptions:(t,e)=>{if(["totalControl","readOnly"].includes(t??"")){const r=t==="totalControl"?"total-control":"read-only";return a.get(`/system-roles/total-control-read-only/${r}/options`,{params:e})}return a.get(`/system-roles/permission/${t}/options`,{params:e})},getUserGroups:(t,e)=>a.get(`/system-roles/permission/${e}/groups`,{params:t}),postAssignUser:(t,e)=>{if(["totalControl","readOnly"].includes(e??"")){const r=e==="totalControl"?"total-control":"read-only";return a.post(`/system-roles/total-control-read-only/${r}`,t)}return a.post(`/system-roles/permission/${e}`,t)},putEditUser:(t,e)=>a.put(`/system-roles/${e}`,t),putSetActive:(t,e)=>{if(["totalControl","readOnly"].includes(e??"")){const r=e==="totalControl"?"total-control":"read-only";return a.put(`/system-roles/total-control-read-only/${r}`,t)}return a.put("/system-roles/set-active",t)},deleteRemoveUser:(t,e)=>{if(["totalControl","readOnly"].includes(e??"")){const r=e==="totalControl"?"total-control":"read-only";return a.delete(`/system-roles/total-control-read-only/${r}`,{data:t})}return a.delete("/system-roles",{data:t})}}),f=s({prefix:"/settings-attribute/v2/open-api"}),yt=n("OpenAPIServices",{getOpenAPIDocs:t=>f.get(`/${t.doc}`),putGenerateToken:()=>f.put("/generate"),getToken:()=>f.get(""),putRequestOpenAPI:()=>f.put("/request"),putCancelRequestOpenAPI:()=>f.put("/cancel-request")}),T=s({prefix:"/settings-attribute-go/v2/open-api"}),ft=n("OpenAPIServicesGo",{putGenerateToken:()=>T.put("/generate"),getToken:()=>T.get(""),putRequestOpenAPI:()=>T.put("/request"),putCancelRequestOpenAPI:()=>T.put("/cancel-request")}),A=s({prefix:"/import/v2"}),Ct=n("ImportServices",{getImport:(t,e)=>A.get(`/${t}`,{params:e}),postImportTemporary:(t,e)=>{const r={"Content-Type":"multipart/form-data"};return A.post(`/${t}/temporary`,e,{headers:r})},deleteImportTemporary:(t,e)=>A.delete(`/${t}/temporary`,{data:e}),postDuplicateImport:(t,e)=>A.post(`/${t}/duplicate`,e),putEditImport:(t,e)=>A.put(`/${t}`,e),postImport:(t,e,r)=>A.post(t,r,{signal:e.signal}),putImportCancelProgress:t=>A.put(`/${t}/cancel-progress`)}),v=s({prefix:"/import-go/v2"}),Lt=n("ImportServicesGo",{getImport:(t,e)=>v.get(`/${t}`,{params:e}),postImportTemporary:(t,e)=>{const r={"Content-Type":"multipart/form-data"};return v.post(`/${t}/temporary`,e,{headers:r})},deleteImportTemporary:(t,e)=>v.delete(`/${t}/temporary`,{params:e}),postDuplicateImport:(t,e)=>v.post(`/${t}/duplicate`,e),putEditImport:(t,e)=>v.put(`/${t}`,e),postImport:(t,e,r)=>v.post(t,r,{signal:e.signal}),putImportCancelProgress:t=>v.put(`/${t}/cancel-progress`)})}}});
|
package/main.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { oldGetImageURL as getImageURL, getBaseURL, queryParamsStringfy, } from './src/utils';
|
|
1
|
+
export { oldGetImageURL as getImageURL, getImageURL as getImageURLGo, getBaseURL, getAssetsFile, queryParamsStringfy, } from './src/utils';
|
|
2
2
|
export { default as GroupCategoryServices } from './src/services/oldGroupCategory.service';
|
|
3
3
|
export { default as GroupCategoryServicesGo } from './src/services/groupCategory.service';
|
|
4
4
|
export { default as NotificationApprovalServices } from './src/services/oldNotificationApproval.service';
|
package/package.json
CHANGED