@tagsamurai/fats-api-services 1.0.3-alpha.3 → 1.0.3-alpha.30
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 +544 -438
- package/api-services.system.js +543 -438
- package/main.d.ts +3 -1
- package/package.json +1 -1
- package/src/dto/assetService.dto.d.ts +4 -16
- package/src/dto/iot.dto.d.ts +95 -0
- package/src/dto/log.dto.d.ts +9 -10
- package/src/dto/oldIOTService.dto.d.ts +17 -0
- package/src/dto/oldTrackingService.dto.d.ts +1 -3
- package/src/dto/oldTransferService.dto.d.ts +1 -3
- package/src/dto/reader.dto.d.ts +23 -0
- package/src/services/damageService.type.d.ts +5 -9
- package/src/services/iot.service.d.ts +30 -0
- package/src/services/log.service.d.ts +5 -5
- package/src/services/oldIOT.service.d.ts +5 -1
- package/src/services/oldReader.service.d.ts +13 -11
- package/src/types/asset.type.d.ts +2 -8
- package/src/types/assetDetail.type.d.ts +1 -2
- package/src/types/assignment.type.d.ts +6 -18
- package/src/types/borrow.type.d.ts +2 -6
- package/src/types/disposal/reported.type.d.ts +1 -3
- package/src/types/disposal/requestDisposal.type.d.ts +1 -3
- package/src/types/fileManager.type.d.ts +1 -3
- package/src/types/iot.type.d.ts +177 -0
- package/src/types/licenseAsset.type.d.ts +1 -3
- package/src/types/log.type.d.ts +13 -5
- package/src/types/maintenanceRoutine.type.d.ts +6 -18
- package/src/types/myAsset.type.d.ts +3 -9
- package/src/types/oldAssetService.type.d.ts +4 -12
- package/src/types/oldAuditService.type.d.ts +1 -2
- package/src/types/oldBorrowingService.type.d.ts +5 -15
- package/src/types/oldIOTService.type.d.ts +27 -0
- package/src/types/reader.type.d.ts +34 -22
- package/src/types/settingsAssetName.type.d.ts +1 -3
- package/src/types/settingsBrand.type.d.ts +1 -3
- package/src/types/transfer.type.d.ts +2 -6
package/api-services.es.js
CHANGED
|
@@ -91,49 +91,51 @@ const getAssetsFile = async (file, type = "excel") => {
|
|
|
91
91
|
);
|
|
92
92
|
return response;
|
|
93
93
|
};
|
|
94
|
-
const API$
|
|
94
|
+
const API$I = createAxiosInstance({
|
|
95
95
|
prefix: "/utility/v2"
|
|
96
96
|
});
|
|
97
|
-
const ChangelogServices
|
|
98
|
-
|
|
99
|
-
return API$
|
|
97
|
+
const ChangelogServices = {
|
|
98
|
+
getChangelogList: (params) => {
|
|
99
|
+
return API$I.get("/change-log", { params });
|
|
100
100
|
},
|
|
101
|
-
|
|
102
|
-
return API$
|
|
101
|
+
getChangelogListOptions: () => {
|
|
102
|
+
return API$I.get("/change-log/options");
|
|
103
103
|
},
|
|
104
104
|
getSessionLogList: (params) => {
|
|
105
|
-
return API$
|
|
105
|
+
return API$I.get("/session-log", { params });
|
|
106
106
|
},
|
|
107
107
|
getSessionLogListOptions: (params) => {
|
|
108
|
-
return API$
|
|
108
|
+
return API$I.get("/session-log/options", {
|
|
109
|
+
params
|
|
110
|
+
});
|
|
109
111
|
},
|
|
110
112
|
getTransactionLog: (params) => {
|
|
111
|
-
return API$
|
|
113
|
+
return API$I.get("/transaction-log", { params });
|
|
112
114
|
},
|
|
113
115
|
/**
|
|
114
116
|
* Retrieves the transaction log options.
|
|
115
117
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
116
118
|
*/
|
|
117
119
|
getTransactionLogOption: (params) => {
|
|
118
|
-
return API$
|
|
120
|
+
return API$I.get("/transaction-log/options", { params });
|
|
119
121
|
},
|
|
120
122
|
getUserDetailSystemLogList: (params) => {
|
|
121
|
-
return API$
|
|
123
|
+
return API$I.get("/change-log", { params });
|
|
122
124
|
},
|
|
123
125
|
getUserDetailSystemLogOption: (params) => {
|
|
124
|
-
return API$
|
|
126
|
+
return API$I.get("/change-log/options", { params });
|
|
125
127
|
},
|
|
126
128
|
getUserDetailUserLogBorrowingList: (userId, params) => {
|
|
127
|
-
return API$
|
|
129
|
+
return API$I.get(`/borrowing-log/${userId}`, { params });
|
|
128
130
|
},
|
|
129
131
|
getUserDetailUserLogAssignmentList: (userId, params) => {
|
|
130
|
-
return API$
|
|
132
|
+
return API$I.get(`/assignment-log/${userId}`, { params });
|
|
131
133
|
},
|
|
132
134
|
getUserDetailUserLogBorrowingOption: (userId, params) => {
|
|
133
|
-
return API$
|
|
135
|
+
return API$I.get(`/borrowing-log/${userId}/options`, { params });
|
|
134
136
|
},
|
|
135
137
|
getUserDetailUserLogAssignmentOption: (userId, params) => {
|
|
136
|
-
return API$
|
|
138
|
+
return API$I.get(`/assignment-log/${userId}/options`, { params });
|
|
137
139
|
}
|
|
138
140
|
};
|
|
139
141
|
const AssetsAPIs = createAxiosInstance({
|
|
@@ -216,38 +218,38 @@ const AssetServices = {
|
|
|
216
218
|
return AssetsAPIs.delete("/attachment/bulk", { params });
|
|
217
219
|
}
|
|
218
220
|
};
|
|
219
|
-
const API$
|
|
221
|
+
const API$H = createAxiosInstance({
|
|
220
222
|
prefix: "/missing-tracking/v2"
|
|
221
223
|
});
|
|
222
224
|
const MissingServices = {
|
|
223
225
|
putFoundAsset: (body) => {
|
|
224
|
-
return API$
|
|
226
|
+
return API$H.put("/found", body);
|
|
225
227
|
},
|
|
226
228
|
putReportMissing: (id, body) => {
|
|
227
|
-
return API$
|
|
229
|
+
return API$H.put(`/${id}/report-missing`, body);
|
|
228
230
|
},
|
|
229
231
|
getData: (params) => {
|
|
230
|
-
return API$
|
|
232
|
+
return API$H.get("/", { params });
|
|
231
233
|
},
|
|
232
234
|
getDataOptions: (params) => {
|
|
233
|
-
return API$
|
|
235
|
+
return API$H.get("/options", { params });
|
|
234
236
|
},
|
|
235
237
|
getDetail: (id) => {
|
|
236
|
-
return API$
|
|
238
|
+
return API$H.get(`/${id}`);
|
|
237
239
|
}
|
|
238
240
|
};
|
|
239
|
-
const API$
|
|
241
|
+
const API$G = createAxiosInstance({
|
|
240
242
|
prefix: "/utility/v2/notification"
|
|
241
243
|
});
|
|
242
244
|
const NotificationServices = {
|
|
243
245
|
getNotifications: (params) => {
|
|
244
|
-
return API$
|
|
246
|
+
return API$G.get("/", { params });
|
|
245
247
|
},
|
|
246
248
|
readNotification: (id) => {
|
|
247
|
-
return API$
|
|
249
|
+
return API$G.put(`/${id}`);
|
|
248
250
|
}
|
|
249
251
|
};
|
|
250
|
-
const API$
|
|
252
|
+
const API$F = createAxiosInstance({
|
|
251
253
|
prefix: "/settings-user-role/v2"
|
|
252
254
|
});
|
|
253
255
|
const UserServices = {
|
|
@@ -256,19 +258,19 @@ const UserServices = {
|
|
|
256
258
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
257
259
|
*/
|
|
258
260
|
getUserDropdown: (params) => {
|
|
259
|
-
return API$
|
|
261
|
+
return API$F.get("/users/dropdown", { params });
|
|
260
262
|
},
|
|
261
263
|
getUserOptions: (params) => {
|
|
262
|
-
return API$
|
|
264
|
+
return API$F.get("/users/options", { params });
|
|
263
265
|
},
|
|
264
266
|
getUserList: (params) => {
|
|
265
|
-
return API$
|
|
267
|
+
return API$F.get("/users", { params });
|
|
266
268
|
},
|
|
267
269
|
getUserDetail: (id) => {
|
|
268
|
-
return API$
|
|
270
|
+
return API$F.get(`/users/${id}`);
|
|
269
271
|
},
|
|
270
272
|
putSetActiveBulk: (data) => {
|
|
271
|
-
return API$
|
|
273
|
+
return API$F.put("/users/set-active-bulk", data);
|
|
272
274
|
},
|
|
273
275
|
// User Detail
|
|
274
276
|
/**
|
|
@@ -279,96 +281,96 @@ const UserServices = {
|
|
|
279
281
|
*/
|
|
280
282
|
getUserDetailSystemRoles: (id, params, permissionType) => {
|
|
281
283
|
const additionalPath = permissionType ? `/${permissionType}/groups` : "";
|
|
282
|
-
return API$
|
|
284
|
+
return API$F.get(`/users/${id}/system-roles${additionalPath}`, {
|
|
283
285
|
params
|
|
284
286
|
});
|
|
285
287
|
},
|
|
286
288
|
getUserDetailTransactionRoleList: (id, params) => {
|
|
287
|
-
return API$
|
|
289
|
+
return API$F.get(`/users/${id}/transaction-roles`, { params });
|
|
288
290
|
},
|
|
289
291
|
postUserDetailAddTransactionRole: (userId, data) => {
|
|
290
|
-
return API$
|
|
292
|
+
return API$F.post(`/users/${userId}/add-transaction-role`, data);
|
|
291
293
|
},
|
|
292
294
|
deleteUserDetailTransactionRole: (userId, body) => {
|
|
293
|
-
return API$
|
|
295
|
+
return API$F.put(`/users/${userId}/delete-transaction-role`, body);
|
|
294
296
|
},
|
|
295
297
|
putUserDetailEditTransactionRole: (userId, data) => {
|
|
296
|
-
return API$
|
|
298
|
+
return API$F.put(`/users/${userId}/edit-transaction-role`, data);
|
|
297
299
|
},
|
|
298
300
|
putAssignGroup: (data, permissionType, id) => {
|
|
299
|
-
return API$
|
|
301
|
+
return API$F.put(`/users/${id}/system-roles/${permissionType}/groups`, data);
|
|
300
302
|
},
|
|
301
303
|
putRoleSetActive: (body, userId) => {
|
|
302
|
-
return API$
|
|
304
|
+
return API$F.put(`/users/${userId}/system-roles/set-active-bulk`, body);
|
|
303
305
|
},
|
|
304
306
|
getUserDetailTransactionAdminLogList: (userId, params) => {
|
|
305
|
-
return API$
|
|
307
|
+
return API$F.get(`/users/${userId}/transaction-log`, { params });
|
|
306
308
|
},
|
|
307
309
|
getUserDetailTransactionAdminLogOption: (userId, params) => {
|
|
308
|
-
return API$
|
|
310
|
+
return API$F.get(`/users/${userId}/transaction-log/option`, { params });
|
|
309
311
|
},
|
|
310
312
|
getUserDetailUserAssetBorrowedList: (userId, params) => {
|
|
311
|
-
return API$
|
|
313
|
+
return API$F.get(`/users/${userId}/borrowed-asset`, { params });
|
|
312
314
|
},
|
|
313
315
|
getUserDetailUserAssetAssignedList: (userId, params) => {
|
|
314
|
-
return API$
|
|
316
|
+
return API$F.get(`/users/${userId}/assigned-asset`, { params });
|
|
315
317
|
},
|
|
316
318
|
getUserDetailUserAssetBorrowedOption: (userId, params) => {
|
|
317
|
-
return API$
|
|
319
|
+
return API$F.get(`/users/${userId}/borrowed-asset/option`, { params });
|
|
318
320
|
},
|
|
319
321
|
getUserDetailUserAssetAssignedOption: (userId, params) => {
|
|
320
|
-
return API$
|
|
322
|
+
return API$F.get(`/users/${userId}/assigned-asset/option`, { params });
|
|
321
323
|
}
|
|
322
324
|
};
|
|
323
|
-
const API$
|
|
325
|
+
const API$E = createAxiosInstance({
|
|
324
326
|
prefix: "/settings-user-role/v2/users"
|
|
325
327
|
});
|
|
326
328
|
const SubUserServices = {
|
|
327
329
|
// Sub User
|
|
328
330
|
getSubUserList: (userId, params) => {
|
|
329
|
-
return API$
|
|
331
|
+
return API$E.get(`/${userId}/sub-users`, { params });
|
|
330
332
|
},
|
|
331
333
|
getSubUserOptions: (userId, params) => {
|
|
332
|
-
return API$
|
|
334
|
+
return API$E.get(`/${userId}/sub-users/option`, { params });
|
|
333
335
|
},
|
|
334
336
|
postCreateSubUser: (userId, data) => {
|
|
335
337
|
const headers = { "Content-Type": "multipart/form-data" };
|
|
336
|
-
return API$
|
|
338
|
+
return API$E.post(`/${userId}/sub-users`, data, { headers });
|
|
337
339
|
},
|
|
338
340
|
putSubUserSetActiveBulk: (userId, data) => {
|
|
339
|
-
return API$
|
|
341
|
+
return API$E.put(`/${userId}/sub-users/set-active-bulk`, data);
|
|
340
342
|
},
|
|
341
343
|
deleteSubUser: (userId, subUserIds) => {
|
|
342
|
-
return API$
|
|
344
|
+
return API$E.put(`/${userId}/sub-users/bulk`, { subUserIds });
|
|
343
345
|
},
|
|
344
346
|
putEditSubUser: (userId, subUserId, data) => {
|
|
345
347
|
const headers = { "Content-Type": "multipart/form-data" };
|
|
346
|
-
return API$
|
|
348
|
+
return API$E.put(`/${userId}/sub-users/${subUserId}`, data, {
|
|
347
349
|
headers
|
|
348
350
|
});
|
|
349
351
|
},
|
|
350
352
|
getBorrowedAsset: (userId, subUserId, params) => {
|
|
351
|
-
return API$
|
|
353
|
+
return API$E.get(`/${userId}/sub-users/${subUserId}/borrowed-asset`, {
|
|
352
354
|
params
|
|
353
355
|
});
|
|
354
356
|
},
|
|
355
357
|
getBorrowedAssetOptions: (userId, subUserId, params) => {
|
|
356
|
-
return API$
|
|
358
|
+
return API$E.get(`/${userId}/sub-users/${subUserId}/borrowed-asset/options`, {
|
|
357
359
|
params
|
|
358
360
|
});
|
|
359
361
|
},
|
|
360
362
|
getAssignedAsset: (userId, subUserId, params) => {
|
|
361
|
-
return API$
|
|
363
|
+
return API$E.get(`/${userId}/sub-users/${subUserId}/assigned-asset`, {
|
|
362
364
|
params
|
|
363
365
|
});
|
|
364
366
|
},
|
|
365
367
|
getAssignedAssetOptions: (userId, subUserId, params) => {
|
|
366
|
-
return API$
|
|
368
|
+
return API$E.get(`/${userId}/sub-users/${subUserId}/assigned-asset/options`, {
|
|
367
369
|
params
|
|
368
370
|
});
|
|
369
371
|
}
|
|
370
372
|
};
|
|
371
|
-
const API$
|
|
373
|
+
const API$D = createAxiosInstance({
|
|
372
374
|
prefix: "/utility/v2"
|
|
373
375
|
});
|
|
374
376
|
const FileManagerServices = {
|
|
@@ -378,7 +380,7 @@ const FileManagerServices = {
|
|
|
378
380
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
379
381
|
*/
|
|
380
382
|
getStorageInformation: () => {
|
|
381
|
-
return API$
|
|
383
|
+
return API$D.get("/files/storage");
|
|
382
384
|
},
|
|
383
385
|
/**
|
|
384
386
|
* Get file manager data.
|
|
@@ -388,7 +390,7 @@ const FileManagerServices = {
|
|
|
388
390
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
389
391
|
*/
|
|
390
392
|
getFileManager: (type, params) => {
|
|
391
|
-
return API$
|
|
393
|
+
return API$D.get(`/${type}`, { params });
|
|
392
394
|
},
|
|
393
395
|
/**
|
|
394
396
|
* Get file manager options.
|
|
@@ -398,7 +400,7 @@ const FileManagerServices = {
|
|
|
398
400
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
399
401
|
*/
|
|
400
402
|
getFileManagerOption: (type, params) => {
|
|
401
|
-
return API$
|
|
403
|
+
return API$D.get(`/${type}/options`, { params });
|
|
402
404
|
},
|
|
403
405
|
/**
|
|
404
406
|
* Recover files.
|
|
@@ -408,7 +410,7 @@ const FileManagerServices = {
|
|
|
408
410
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
409
411
|
*/
|
|
410
412
|
recoverFiles: (type, body) => {
|
|
411
|
-
return API$
|
|
413
|
+
return API$D.put(`/${type}/recover`, body);
|
|
412
414
|
},
|
|
413
415
|
/**
|
|
414
416
|
* Delete files.
|
|
@@ -418,7 +420,7 @@ const FileManagerServices = {
|
|
|
418
420
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
419
421
|
*/
|
|
420
422
|
deleteFiles: (type, params) => {
|
|
421
|
-
return API$
|
|
423
|
+
return API$D.delete(`/${type}`, { params });
|
|
422
424
|
},
|
|
423
425
|
/**
|
|
424
426
|
* Delete files permanently.
|
|
@@ -428,10 +430,10 @@ const FileManagerServices = {
|
|
|
428
430
|
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
429
431
|
*/
|
|
430
432
|
deletePermanently: (type, params) => {
|
|
431
|
-
return API$
|
|
433
|
+
return API$D.delete(`/${type}/delete-permanent`, { params });
|
|
432
434
|
}
|
|
433
435
|
};
|
|
434
|
-
const API$
|
|
436
|
+
const API$C = createAxiosInstance({
|
|
435
437
|
prefix: "/settings-user-role/v2"
|
|
436
438
|
});
|
|
437
439
|
const RoleServices = {
|
|
@@ -442,10 +444,10 @@ const RoleServices = {
|
|
|
442
444
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
443
445
|
*/
|
|
444
446
|
getTransactionRole: (groupId, transactionName) => {
|
|
445
|
-
return API$
|
|
447
|
+
return API$C.get(`/transaction-roles/${groupId}/${transactionName}`);
|
|
446
448
|
},
|
|
447
449
|
getTransactionRoleTypes: (groupKeys, transactionName) => {
|
|
448
|
-
return API$
|
|
450
|
+
return API$C.get(`/transaction-roles/${transactionName}/types`, {
|
|
449
451
|
params: { groupKeys }
|
|
450
452
|
});
|
|
451
453
|
},
|
|
@@ -457,7 +459,7 @@ const RoleServices = {
|
|
|
457
459
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
458
460
|
*/
|
|
459
461
|
putUpdateUsers: (groupId, transactionName, body) => {
|
|
460
|
-
return API$
|
|
462
|
+
return API$C.put(
|
|
461
463
|
`/transaction-roles/${groupId}/${transactionName}/update-user`,
|
|
462
464
|
body
|
|
463
465
|
);
|
|
@@ -470,7 +472,7 @@ const RoleServices = {
|
|
|
470
472
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
471
473
|
*/
|
|
472
474
|
putUpdateLevel: (groupId, transactionName, body) => {
|
|
473
|
-
return API$
|
|
475
|
+
return API$C.put(
|
|
474
476
|
`/transaction-roles/${groupId}/${transactionName}/update-approval-level`,
|
|
475
477
|
body
|
|
476
478
|
);
|
|
@@ -483,371 +485,371 @@ const RoleServices = {
|
|
|
483
485
|
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
484
486
|
*/
|
|
485
487
|
putUpdateGroupManage: (groupId, transactionName, body) => {
|
|
486
|
-
return API$
|
|
488
|
+
return API$C.put(
|
|
487
489
|
`/transaction-roles/${groupId}/${transactionName}/update-manage-by-parent`,
|
|
488
490
|
body
|
|
489
491
|
);
|
|
490
492
|
},
|
|
491
493
|
getUserAssignedSystemRole: (userId) => {
|
|
492
|
-
return API$
|
|
494
|
+
return API$C.get(`/system-roles/user/${userId}`);
|
|
493
495
|
},
|
|
494
496
|
getAssignedUserAmounts: () => {
|
|
495
|
-
return API$
|
|
497
|
+
return API$C.get("/system-roles/amounts");
|
|
496
498
|
},
|
|
497
499
|
getPermissionUser: (permissionType, params) => {
|
|
498
500
|
if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
|
|
499
501
|
const type = permissionType === "totalControl" ? "total-control" : "read-only";
|
|
500
|
-
return API$
|
|
502
|
+
return API$C.get(`/system-roles/total-control-read-only/${type}`, {
|
|
501
503
|
params
|
|
502
504
|
});
|
|
503
505
|
}
|
|
504
|
-
return API$
|
|
506
|
+
return API$C.get(`/system-roles/permission/${permissionType}`, { params });
|
|
505
507
|
},
|
|
506
508
|
getPermissionUserOptions: (permissionType, params) => {
|
|
507
509
|
if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
|
|
508
510
|
const type = permissionType === "totalControl" ? "total-control" : "read-only";
|
|
509
|
-
return API$
|
|
511
|
+
return API$C.get(`/system-roles/total-control-read-only/${type}/options`, {
|
|
510
512
|
params
|
|
511
513
|
});
|
|
512
514
|
}
|
|
513
|
-
return API$
|
|
515
|
+
return API$C.get(`/system-roles/permission/${permissionType}/options`, {
|
|
514
516
|
params
|
|
515
517
|
});
|
|
516
518
|
},
|
|
517
519
|
getUserGroups: (params, permissionType) => {
|
|
518
|
-
return API$
|
|
520
|
+
return API$C.get(`/system-roles/permission/${permissionType}/groups`, {
|
|
519
521
|
params
|
|
520
522
|
});
|
|
521
523
|
},
|
|
522
524
|
postAssignUser: (body, permissionType) => {
|
|
523
525
|
if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
|
|
524
526
|
const type = permissionType === "totalControl" ? "total-control" : "read-only";
|
|
525
|
-
return API$
|
|
527
|
+
return API$C.post(`/system-roles/total-control-read-only/${type}`, body);
|
|
526
528
|
}
|
|
527
|
-
return API$
|
|
529
|
+
return API$C.post(`/system-roles/permission/${permissionType}`, body);
|
|
528
530
|
},
|
|
529
531
|
putEditUser: (body, roleId) => {
|
|
530
|
-
return API$
|
|
532
|
+
return API$C.put(`/system-roles/${roleId}`, body);
|
|
531
533
|
},
|
|
532
534
|
deleteRemoveUser: (body, permissionType) => {
|
|
533
535
|
if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
|
|
534
536
|
const type = permissionType === "totalControl" ? "total-control" : "read-only";
|
|
535
|
-
return API$
|
|
537
|
+
return API$C.put(`/system-roles/total-control-read-only/${type}`, body);
|
|
536
538
|
}
|
|
537
|
-
return API$
|
|
539
|
+
return API$C.put("/system-roles", body);
|
|
538
540
|
}
|
|
539
541
|
};
|
|
540
|
-
const API$
|
|
542
|
+
const API$B = createAxiosInstance({
|
|
541
543
|
prefix: "/settings-attribute/v2/open-api"
|
|
542
544
|
});
|
|
543
545
|
const OpenAPIServices = {
|
|
544
546
|
getOpenAPIDocs: (params) => {
|
|
545
|
-
return API$
|
|
547
|
+
return API$B.get(`/${params.doc}`);
|
|
546
548
|
},
|
|
547
549
|
putGenerateToken: () => {
|
|
548
|
-
return API$
|
|
550
|
+
return API$B.put("/generate");
|
|
549
551
|
},
|
|
550
552
|
// This is if the dummy was not dummy
|
|
551
553
|
getToken: () => {
|
|
552
|
-
return API$
|
|
554
|
+
return API$B.get("");
|
|
553
555
|
},
|
|
554
556
|
putRequestOpenAPI: () => {
|
|
555
|
-
return API$
|
|
557
|
+
return API$B.put("/request");
|
|
556
558
|
},
|
|
557
559
|
putCancelRequestOpenAPI: () => {
|
|
558
|
-
return API$
|
|
560
|
+
return API$B.put("/cancel-request");
|
|
559
561
|
}
|
|
560
562
|
};
|
|
561
|
-
const API$
|
|
563
|
+
const API$A = createAxiosInstance({
|
|
562
564
|
prefix: "/import/v2"
|
|
563
565
|
});
|
|
564
566
|
const ImportServices = {
|
|
565
567
|
getImport: (importUrl, params) => {
|
|
566
|
-
return API$
|
|
568
|
+
return API$A.get(`/${importUrl}`, { params });
|
|
567
569
|
},
|
|
568
570
|
postImportTemporary: (importUrl, data) => {
|
|
569
571
|
const headers = { "Content-Type": "multipart/form-data" };
|
|
570
|
-
return API$
|
|
572
|
+
return API$A.post(`/${importUrl}/temporary`, data, { headers });
|
|
571
573
|
},
|
|
572
574
|
deleteImportTemporary: (importUrl, params) => {
|
|
573
|
-
return API$
|
|
575
|
+
return API$A.delete(`/${importUrl}/temporary`, { params });
|
|
574
576
|
},
|
|
575
577
|
postDuplicateImport: (importUrl, body) => {
|
|
576
|
-
return API$
|
|
578
|
+
return API$A.post(`/${importUrl}/duplicate`, body);
|
|
577
579
|
},
|
|
578
580
|
putEditImport: (importUrl, body) => {
|
|
579
|
-
return API$
|
|
581
|
+
return API$A.put(`/${importUrl}`, body);
|
|
580
582
|
},
|
|
581
583
|
postImport: (importUrl, controller, body) => {
|
|
582
|
-
return API$
|
|
584
|
+
return API$A.post(importUrl, body, { signal: controller.signal });
|
|
583
585
|
},
|
|
584
586
|
putImportCancelProgress: (importUrl) => {
|
|
585
|
-
return API$
|
|
587
|
+
return API$A.put(`/${importUrl}/cancel-progress`);
|
|
586
588
|
}
|
|
587
589
|
};
|
|
588
|
-
const API$
|
|
590
|
+
const API$z = createAxiosInstance({
|
|
589
591
|
env: "APP_TAGSAMURAI_API",
|
|
590
592
|
prefix: "/assignment/v2"
|
|
591
593
|
});
|
|
592
594
|
const AssignmentServices$1 = {
|
|
593
595
|
getPreListData: (params) => {
|
|
594
|
-
return API$
|
|
596
|
+
return API$z.get("/prelist", { params });
|
|
595
597
|
},
|
|
596
598
|
getPreListOptions: (params) => {
|
|
597
|
-
return API$
|
|
599
|
+
return API$z.get("/prelist/options", { params });
|
|
598
600
|
},
|
|
599
601
|
getRequestData: (params) => {
|
|
600
|
-
return API$
|
|
602
|
+
return API$z.get("/prelist/request", { params });
|
|
601
603
|
},
|
|
602
604
|
postAddPrelistData: (body) => {
|
|
603
|
-
return API$
|
|
605
|
+
return API$z.post("/prelist", body);
|
|
604
606
|
},
|
|
605
607
|
getDetailRequestData: (id, params) => {
|
|
606
|
-
return API$
|
|
608
|
+
return API$z.get(`/transaction/${id}/request`, { params });
|
|
607
609
|
},
|
|
608
610
|
getDetailRequestOption: (params, id) => {
|
|
609
|
-
return API$
|
|
611
|
+
return API$z.get(`/transaction/${id}/request/options`, { params });
|
|
610
612
|
},
|
|
611
613
|
getTransactionData: (params) => {
|
|
612
|
-
return API$
|
|
614
|
+
return API$z.get("/transaction", { params });
|
|
613
615
|
},
|
|
614
616
|
getTransactionOptions: (params) => {
|
|
615
|
-
return API$
|
|
617
|
+
return API$z.get("/transaction/options", { params });
|
|
616
618
|
},
|
|
617
619
|
getDetailTransactionData: (id) => {
|
|
618
|
-
return API$
|
|
620
|
+
return API$z.get(`/transaction/${id}`);
|
|
619
621
|
},
|
|
620
622
|
getTransactionApproval: (params) => {
|
|
621
|
-
return API$
|
|
623
|
+
return API$z.get("/approval", { params });
|
|
622
624
|
},
|
|
623
625
|
getApprovalData: (transactionId, params) => {
|
|
624
|
-
return API$
|
|
626
|
+
return API$z.get(`/approval/transaction/${transactionId}`, { params });
|
|
625
627
|
},
|
|
626
628
|
getTransactionApprovalOptions: (params) => {
|
|
627
|
-
return API$
|
|
629
|
+
return API$z.get("/approval/options", { params });
|
|
628
630
|
},
|
|
629
631
|
getApprovalOptions: (transactionId, params) => {
|
|
630
|
-
return API$
|
|
632
|
+
return API$z.get(`/approval/transaction/${transactionId}/options`, {
|
|
631
633
|
params
|
|
632
634
|
});
|
|
633
635
|
},
|
|
634
636
|
getTransactionApprovers: (id) => {
|
|
635
|
-
return API$
|
|
637
|
+
return API$z.get(`/approval/transaction/${id}/transaction`);
|
|
636
638
|
},
|
|
637
639
|
putApproveApproval: (body) => {
|
|
638
|
-
return API$
|
|
640
|
+
return API$z.put("/approval/approve", body);
|
|
639
641
|
},
|
|
640
642
|
getDetailTransactionLog: (id) => {
|
|
641
|
-
return API$
|
|
643
|
+
return API$z.get(`/transaction/request/${id}/transaction-log`);
|
|
642
644
|
},
|
|
643
645
|
getVerifyAsset: (params, id) => {
|
|
644
|
-
return API$
|
|
646
|
+
return API$z.get(`/transaction/${id}/request/scan`, { params });
|
|
645
647
|
},
|
|
646
648
|
putEditAssignedUser: (id, body) => {
|
|
647
|
-
return API$
|
|
649
|
+
return API$z.put(`/transaction/${id}/user`, body);
|
|
648
650
|
},
|
|
649
651
|
putEditEmailConfirmation: (id, body) => {
|
|
650
|
-
return API$
|
|
652
|
+
return API$z.put(`/transaction/${id}/update-email-or-assigned-user`, body);
|
|
651
653
|
},
|
|
652
654
|
postSendConfirmationEmail: (id) => {
|
|
653
|
-
return API$
|
|
655
|
+
return API$z.post(`/transaction/${id}/send-confirmation-email`);
|
|
654
656
|
},
|
|
655
657
|
postTransaction: (body) => {
|
|
656
|
-
return API$
|
|
658
|
+
return API$z.post("/transaction", body);
|
|
657
659
|
},
|
|
658
660
|
putTransactionRequest: (id, body) => {
|
|
659
|
-
return API$
|
|
661
|
+
return API$z.put(`/transaction/${id}/request`, body);
|
|
660
662
|
},
|
|
661
663
|
putCancelTransaction: (body) => {
|
|
662
|
-
return API$
|
|
664
|
+
return API$z.put("/transaction/cancel", body);
|
|
663
665
|
},
|
|
664
666
|
putCancelAssignmentRequest: (body) => {
|
|
665
|
-
return API$
|
|
667
|
+
return API$z.put("/transaction/request/cancel", body);
|
|
666
668
|
},
|
|
667
669
|
putVerifyRequest: (body, id) => {
|
|
668
|
-
return API$
|
|
670
|
+
return API$z.put(`/transaction/${id}/verify-requests`, body);
|
|
669
671
|
},
|
|
670
672
|
putVerifyToken: (body) => {
|
|
671
|
-
return API$
|
|
673
|
+
return API$z.put("/transaction/verify-token", body);
|
|
672
674
|
},
|
|
673
675
|
putHandoverConfirm: (body) => {
|
|
674
|
-
return API$
|
|
676
|
+
return API$z.put("/transaction/handover-confirmation", body);
|
|
675
677
|
},
|
|
676
678
|
putAssignHandover: (transaction) => {
|
|
677
|
-
return API$
|
|
679
|
+
return API$z.put(`/transaction/${transaction}/handover`);
|
|
678
680
|
},
|
|
679
681
|
deletePrelistData: (params) => {
|
|
680
|
-
return API$
|
|
682
|
+
return API$z.delete("/prelist", { params });
|
|
681
683
|
},
|
|
682
684
|
deleteRequestPrelistData: (body) => {
|
|
683
|
-
return API$
|
|
685
|
+
return API$z.delete("/prelist/request", { data: body });
|
|
684
686
|
},
|
|
685
687
|
getAssignedByAsset: (params) => {
|
|
686
|
-
return API$
|
|
688
|
+
return API$z.get("/transaction/request/assigned/by-asset", { params });
|
|
687
689
|
},
|
|
688
690
|
getAssignedByAssetOptions: (params) => {
|
|
689
|
-
return API$
|
|
691
|
+
return API$z.get("/transaction/request/assigned/by-asset/options", {
|
|
690
692
|
params
|
|
691
693
|
});
|
|
692
694
|
},
|
|
693
695
|
getAssignedByUser: (params) => {
|
|
694
|
-
return API$
|
|
696
|
+
return API$z.get("/transaction/request/assigned/by-user", { params });
|
|
695
697
|
},
|
|
696
698
|
getAssignedByUserOptions: (params) => {
|
|
697
|
-
return API$
|
|
699
|
+
return API$z.get("/transaction/request/assigned/by-user/options", { params });
|
|
698
700
|
},
|
|
699
701
|
postUnassignPrelistAsset: (body) => {
|
|
700
|
-
return API$
|
|
702
|
+
return API$z.post("/prelist", body);
|
|
701
703
|
},
|
|
702
704
|
postUnassignPrelistUser: (body) => {
|
|
703
|
-
return API$
|
|
705
|
+
return API$z.post("/prelist/unassign/by-user", body);
|
|
704
706
|
},
|
|
705
707
|
putUnassignRequest: (body) => {
|
|
706
|
-
return API$
|
|
708
|
+
return API$z.put("/transaction/request/unassign", body);
|
|
707
709
|
},
|
|
708
710
|
putReportDone: (id, body) => {
|
|
709
|
-
return API$
|
|
711
|
+
return API$z.put(`/transaction/${id}/confirm-report-done`, body);
|
|
710
712
|
},
|
|
711
713
|
getHistory: (type, params) => {
|
|
712
714
|
const urlType = type.split(" ").join("-").toLowerCase();
|
|
713
|
-
return API$
|
|
715
|
+
return API$z.get(`/transaction/history/${urlType}`, { params });
|
|
714
716
|
},
|
|
715
717
|
getHistoryOptions: (params) => {
|
|
716
|
-
return API$
|
|
718
|
+
return API$z.get("/transaction/history/options", { params });
|
|
717
719
|
},
|
|
718
720
|
getHistoryByTransactionOptions: (params) => {
|
|
719
|
-
return API$
|
|
721
|
+
return API$z.get("/transaction/history/by-transaction/options", { params });
|
|
720
722
|
},
|
|
721
723
|
putCancelReport: (body) => {
|
|
722
|
-
return API$
|
|
724
|
+
return API$z.put("/transaction/request/cancel-report", body);
|
|
723
725
|
},
|
|
724
726
|
getTaskAssignment: async (params) => {
|
|
725
|
-
return API$
|
|
727
|
+
return API$z.get("/transaction/my-asset/task", { params });
|
|
726
728
|
},
|
|
727
729
|
getTaskAssignmentOptions: async (params) => {
|
|
728
|
-
return API$
|
|
730
|
+
return API$z.get("/transaction/my-asset/task/options", { params });
|
|
729
731
|
},
|
|
730
732
|
getAssignedAsset: async (params) => {
|
|
731
|
-
return API$
|
|
733
|
+
return API$z.get("/transaction/my-asset/assigned-asset", { params });
|
|
732
734
|
},
|
|
733
735
|
getAssignedAssetOptions: async (params) => {
|
|
734
|
-
return API$
|
|
736
|
+
return API$z.get("/transaction/my-asset/assigned-asset/options", { params });
|
|
735
737
|
},
|
|
736
738
|
putCancelAssignment: async (body) => {
|
|
737
|
-
return API$
|
|
739
|
+
return API$z.put("/transaction/cancel", { id: body.id });
|
|
738
740
|
},
|
|
739
741
|
putCancelReportById: async (body) => {
|
|
740
|
-
return API$
|
|
742
|
+
return API$z.put(`/transaction/request/${body.id}/cancel-report`);
|
|
741
743
|
}
|
|
742
744
|
};
|
|
743
|
-
const API$
|
|
745
|
+
const API$y = createAxiosInstance({
|
|
744
746
|
prefix: "/assignment/v2"
|
|
745
747
|
});
|
|
746
748
|
const AssignmentServices = {
|
|
747
749
|
...AssignmentServices$1,
|
|
748
750
|
// Temporary inclusion of methods from OldAssignmentServices. Move individual methods here once they are refactored and ready.
|
|
749
751
|
getTransactionData: (params) => {
|
|
750
|
-
return API$
|
|
752
|
+
return API$y.get("/transaction", { params });
|
|
751
753
|
},
|
|
752
754
|
getTransactionOptions: (params) => {
|
|
753
|
-
return API$
|
|
755
|
+
return API$y.get("/transaction/options", { params });
|
|
754
756
|
},
|
|
755
757
|
getDetailTransactionLog: (id) => {
|
|
756
|
-
return API$
|
|
758
|
+
return API$y.get(`/transaction/request/${id}/transaction-log`);
|
|
757
759
|
},
|
|
758
760
|
postTransaction: (body) => {
|
|
759
|
-
return API$
|
|
761
|
+
return API$y.post("/transaction", body);
|
|
760
762
|
},
|
|
761
763
|
putTransaction: (body) => {
|
|
762
|
-
return API$
|
|
764
|
+
return API$y.put("/transaction", body);
|
|
763
765
|
},
|
|
764
766
|
putUnassignTransaction: (body) => {
|
|
765
|
-
return API$
|
|
767
|
+
return API$y.put("/transaction/unassign", body);
|
|
766
768
|
},
|
|
767
769
|
putCancelReport: (body) => {
|
|
768
|
-
return API$
|
|
770
|
+
return API$y.put("/transaction/request/cancel-report", body);
|
|
769
771
|
}
|
|
770
772
|
};
|
|
771
|
-
const API$
|
|
773
|
+
const API$x = createAxiosInstance({
|
|
772
774
|
prefix: "/license/v2"
|
|
773
775
|
});
|
|
774
776
|
const TotalLicenseServices = {
|
|
775
777
|
getTotalLicense: () => {
|
|
776
|
-
return API$
|
|
778
|
+
return API$x.get("/total-license");
|
|
777
779
|
},
|
|
778
780
|
getPurchasedData: (params) => {
|
|
779
|
-
return API$
|
|
781
|
+
return API$x.get("/purchase", { params });
|
|
780
782
|
}
|
|
781
783
|
};
|
|
782
784
|
const LicenseConcurrentServices = {
|
|
783
785
|
getConcurrentUserData: () => {
|
|
784
|
-
return API$
|
|
786
|
+
return API$x.get("/concurrent-user-data");
|
|
785
787
|
},
|
|
786
788
|
getConcurrentUserList: (params) => {
|
|
787
|
-
return API$
|
|
789
|
+
return API$x.get("/concurrent-user", { params });
|
|
788
790
|
},
|
|
789
791
|
putLogoutUsers: (body) => {
|
|
790
|
-
return API$
|
|
792
|
+
return API$x.put("/concurrent-user", body);
|
|
791
793
|
}
|
|
792
794
|
};
|
|
793
795
|
const LicenseAssetServices = {
|
|
794
796
|
getFixedAssetPerGroup: (groupId, params) => {
|
|
795
|
-
return API$
|
|
797
|
+
return API$x.get(`/${groupId}/assets`, { params });
|
|
796
798
|
},
|
|
797
799
|
deleteAssetData: (params) => {
|
|
798
|
-
return API$
|
|
800
|
+
return API$x.delete("/assets", { params });
|
|
799
801
|
}
|
|
800
802
|
};
|
|
801
803
|
const LicenseServices = {
|
|
802
804
|
getFilterOptions: (path, params) => {
|
|
803
|
-
return API$
|
|
805
|
+
return API$x.get(`/${path}`, { params });
|
|
804
806
|
},
|
|
805
807
|
...TotalLicenseServices,
|
|
806
808
|
...LicenseConcurrentServices,
|
|
807
809
|
...LicenseAssetServices
|
|
808
810
|
};
|
|
809
|
-
const API$
|
|
811
|
+
const API$w = createAxiosInstance({
|
|
810
812
|
prefix: "/damage-repair-ticketing/v2"
|
|
811
813
|
});
|
|
812
814
|
const DamageServices = {
|
|
813
815
|
getDamageReportList: (params) => {
|
|
814
|
-
return API$
|
|
816
|
+
return API$w.get("/", { params });
|
|
815
817
|
},
|
|
816
818
|
getDamageReportListFilterOptions: (params) => {
|
|
817
|
-
return API$
|
|
819
|
+
return API$w.get("/options", { params });
|
|
818
820
|
},
|
|
819
821
|
getDamageReportDetail: (reportId) => {
|
|
820
|
-
return API$
|
|
822
|
+
return API$w.get(`/${reportId}`);
|
|
821
823
|
},
|
|
822
824
|
putReportDamage: (id, body) => {
|
|
823
825
|
const headers = { "Content-Type": "multipart/form-data" };
|
|
824
|
-
return API$
|
|
826
|
+
return API$w.put(`/${id}/report-damage`, body, { headers });
|
|
825
827
|
},
|
|
826
828
|
putMarkAsRepaired: (body) => {
|
|
827
|
-
return API$
|
|
829
|
+
return API$w.put("/repair", body);
|
|
828
830
|
}
|
|
829
831
|
};
|
|
830
|
-
const API$
|
|
832
|
+
const API$v = createAxiosInstance({
|
|
831
833
|
prefix: "/assets/v2/my-assets"
|
|
832
834
|
});
|
|
833
835
|
const MyAssetServices = {
|
|
834
836
|
getAssigned: async (params) => {
|
|
835
|
-
return API$
|
|
837
|
+
return API$v.get("/assigned", { params });
|
|
836
838
|
},
|
|
837
839
|
getAssignedOptions: async (params) => {
|
|
838
|
-
return API$
|
|
840
|
+
return API$v.get("/assigned/options", { params });
|
|
839
841
|
},
|
|
840
842
|
getBorrowed: async (params) => {
|
|
841
|
-
return API$
|
|
843
|
+
return API$v.get("/borrowed", { params });
|
|
842
844
|
},
|
|
843
845
|
getBorrowedOptions: async (params) => {
|
|
844
|
-
return API$
|
|
846
|
+
return API$v.get("/borrowed/options", { params });
|
|
845
847
|
},
|
|
846
848
|
getHistory: async (params) => {
|
|
847
|
-
return API$
|
|
849
|
+
return API$v.get("/history", { params });
|
|
848
850
|
},
|
|
849
851
|
getHistoryOptions: async (params) => {
|
|
850
|
-
return API$
|
|
852
|
+
return API$v.get("/history/options", { params });
|
|
851
853
|
}
|
|
852
854
|
};
|
|
853
855
|
const PREFIX = "/transfer/v2";
|
|
@@ -975,322 +977,322 @@ const TransferServices = {
|
|
|
975
977
|
return ApprovalAPI$1.put("/approve", body);
|
|
976
978
|
}
|
|
977
979
|
};
|
|
978
|
-
const API$
|
|
980
|
+
const API$u = createAxiosInstance({
|
|
979
981
|
prefix: "/transfer/v2"
|
|
980
982
|
});
|
|
981
983
|
const TransferServicesGo = {
|
|
982
984
|
...TransferServices,
|
|
983
985
|
getTransactionData: (params) => {
|
|
984
|
-
return API$
|
|
986
|
+
return API$u.get("/transaction", { params });
|
|
985
987
|
},
|
|
986
988
|
getTransactionOptions: (params) => {
|
|
987
|
-
return API$
|
|
989
|
+
return API$u.get("/transaction/options", { params });
|
|
988
990
|
},
|
|
989
991
|
getTransactionLog: (id) => {
|
|
990
|
-
return API$
|
|
992
|
+
return API$u.get(`/transaction/request/${id}/transaction-log`);
|
|
991
993
|
},
|
|
992
994
|
postCreateTransaction: (body) => {
|
|
993
|
-
return API$
|
|
995
|
+
return API$u.post("/transaction", body);
|
|
994
996
|
}
|
|
995
997
|
};
|
|
996
|
-
const API$
|
|
998
|
+
const API$t = createAxiosInstance({
|
|
997
999
|
env: "APP_TAGSAMURAI_API",
|
|
998
1000
|
prefix: "/borrowing/v2"
|
|
999
1001
|
});
|
|
1000
1002
|
const BorrowServices = {
|
|
1001
1003
|
getTaskBorrowing: async (params) => {
|
|
1002
|
-
return API$
|
|
1004
|
+
return API$t.get("/transaction/my-asset/task", { params });
|
|
1003
1005
|
},
|
|
1004
1006
|
getTaskBorrowingOptions: async (params) => {
|
|
1005
|
-
return API$
|
|
1007
|
+
return API$t.get("/transaction/my-asset/task/options", { params });
|
|
1006
1008
|
},
|
|
1007
1009
|
getBorrowedAsset: async (params) => {
|
|
1008
|
-
return API$
|
|
1010
|
+
return API$t.get("/transaction/my-asset/borrowed-asset", { params });
|
|
1009
1011
|
},
|
|
1010
1012
|
getBorrowedOptions: async (params) => {
|
|
1011
|
-
return API$
|
|
1013
|
+
return API$t.get("/transaction/my-asset/borrowed-asset/options", { params });
|
|
1012
1014
|
},
|
|
1013
1015
|
getHistory: async (params) => {
|
|
1014
|
-
return API$
|
|
1016
|
+
return API$t.get("/transaction/my-asset/history", { params });
|
|
1015
1017
|
},
|
|
1016
1018
|
getHistoryOptions: async (params) => {
|
|
1017
|
-
return API$
|
|
1019
|
+
return API$t.get("/transaction/my-asset/history/options", { params });
|
|
1018
1020
|
},
|
|
1019
1021
|
postAddPrelistData: (body) => {
|
|
1020
|
-
return API$
|
|
1022
|
+
return API$t.post("/prelist", body);
|
|
1021
1023
|
},
|
|
1022
1024
|
putCancelBorrowing: async (body) => {
|
|
1023
|
-
return API$
|
|
1025
|
+
return API$t.put("/transaction/cancel", { id: body.id });
|
|
1024
1026
|
},
|
|
1025
1027
|
putCancelExtensionRequest: async (body) => {
|
|
1026
|
-
return API$
|
|
1028
|
+
return API$t.put(`/transaction/${body.id}/cancel-extension`);
|
|
1027
1029
|
},
|
|
1028
1030
|
putCancelRequestReport: async (body) => {
|
|
1029
|
-
return API$
|
|
1031
|
+
return API$t.put(`/transaction/request/${body.id}/cancel-report`);
|
|
1030
1032
|
},
|
|
1031
1033
|
putDeclineExtensionRequest: async (body) => {
|
|
1032
|
-
return API$
|
|
1034
|
+
return API$t.put("transaction/request/decline", body);
|
|
1033
1035
|
},
|
|
1034
1036
|
putUpdateRequestExtension: async (body) => {
|
|
1035
|
-
return API$
|
|
1037
|
+
return API$t.put("transaction/request/duration", body);
|
|
1036
1038
|
},
|
|
1037
1039
|
// ------------------------------------------------------------------------------------------------------------ //
|
|
1038
1040
|
getBorrowingPrelist: (params) => {
|
|
1039
|
-
return API$
|
|
1041
|
+
return API$t.get("/prelist", { params });
|
|
1040
1042
|
},
|
|
1041
1043
|
getBorrowingPrelistOptions: (params) => {
|
|
1042
|
-
return API$
|
|
1044
|
+
return API$t.get("/prelist/options", { params });
|
|
1043
1045
|
},
|
|
1044
1046
|
deleteBorrowingPrelist: (id) => {
|
|
1045
|
-
return API$
|
|
1047
|
+
return API$t.delete("/prelist", { data: { id } });
|
|
1046
1048
|
},
|
|
1047
1049
|
getBorrowingRequest: (params) => {
|
|
1048
|
-
return API$
|
|
1050
|
+
return API$t.get("/prelist/request", { params });
|
|
1049
1051
|
},
|
|
1050
1052
|
getBorrowingRequestOptions: (params) => {
|
|
1051
|
-
return API$
|
|
1053
|
+
return API$t.get("/prelist/request/options", { params });
|
|
1052
1054
|
},
|
|
1053
1055
|
postBorrowingRequest: (data) => {
|
|
1054
|
-
return API$
|
|
1056
|
+
return API$t.post("/prelist/request", data);
|
|
1055
1057
|
},
|
|
1056
1058
|
putBorrowingRequest: (data) => {
|
|
1057
|
-
return API$
|
|
1059
|
+
return API$t.put("/prelist/request", data);
|
|
1058
1060
|
},
|
|
1059
1061
|
deleteBorrowingRequest: (id) => {
|
|
1060
|
-
return API$
|
|
1062
|
+
return API$t.delete("/prelist/request", { data: { id } });
|
|
1061
1063
|
},
|
|
1062
1064
|
postBorrowingTransaction: (data) => {
|
|
1063
|
-
return API$
|
|
1065
|
+
return API$t.post("/transaction", data, { params: { sourceWeb: true } });
|
|
1064
1066
|
},
|
|
1065
1067
|
getBorrowingTransaction: (params) => {
|
|
1066
|
-
return API$
|
|
1068
|
+
return API$t.get("/transaction", { params });
|
|
1067
1069
|
},
|
|
1068
1070
|
getBorrowingTransactionOptions: (params) => {
|
|
1069
|
-
return API$
|
|
1071
|
+
return API$t.get("/transaction/options", { params });
|
|
1070
1072
|
},
|
|
1071
1073
|
putCancelBorrowingTransaction: (id) => {
|
|
1072
|
-
return API$
|
|
1074
|
+
return API$t.put("/transaction/cancel", { id });
|
|
1073
1075
|
},
|
|
1074
1076
|
putCancelBorrowingRequest: (id) => {
|
|
1075
|
-
return API$
|
|
1077
|
+
return API$t.put("/transaction/request/cancel", { id });
|
|
1076
1078
|
},
|
|
1077
1079
|
putCancelExtendBorrowingRequest: (id) => {
|
|
1078
|
-
return API$
|
|
1080
|
+
return API$t.put("/transaction/request/extend/cancel", { id });
|
|
1079
1081
|
},
|
|
1080
1082
|
getBorrowingTransactionDetail: (id) => {
|
|
1081
|
-
return API$
|
|
1083
|
+
return API$t.get(`/transaction/${id}`);
|
|
1082
1084
|
},
|
|
1083
1085
|
getBorrowingTransactionRequestList: (params) => {
|
|
1084
|
-
return API$
|
|
1086
|
+
return API$t.get("/transaction/request", { params });
|
|
1085
1087
|
},
|
|
1086
1088
|
getBorrowingTransactionRequest: (id, params) => {
|
|
1087
|
-
return API$
|
|
1089
|
+
return API$t.get(`/transaction/${id}/request`, { params });
|
|
1088
1090
|
},
|
|
1089
1091
|
getBorrowingTransactionRequestOptions: (id, params) => {
|
|
1090
|
-
return API$
|
|
1092
|
+
return API$t.get(`/transaction/${id}/request/options`, { params });
|
|
1091
1093
|
},
|
|
1092
1094
|
putBorrowingTransactionRequest: (id, data) => {
|
|
1093
|
-
return API$
|
|
1095
|
+
return API$t.put(`/transaction/${id}/request`, data);
|
|
1094
1096
|
},
|
|
1095
1097
|
getApprovalList: (id) => {
|
|
1096
|
-
return API$
|
|
1098
|
+
return API$t.get(`/approval/transaction/${id}/transaction`);
|
|
1097
1099
|
},
|
|
1098
1100
|
putUpdateEmailorBorrower: (id, data) => {
|
|
1099
|
-
return API$
|
|
1101
|
+
return API$t.put(`/transaction/${id}/update-email-or-borrower`, data);
|
|
1100
1102
|
},
|
|
1101
1103
|
getTransactionRequestScan: (id, tag) => {
|
|
1102
|
-
return API$
|
|
1104
|
+
return API$t.get(`/transaction/${id}/request/scan`, { params: { tag } });
|
|
1103
1105
|
},
|
|
1104
1106
|
putUpdateBorrower: (id, userId) => {
|
|
1105
|
-
return API$
|
|
1107
|
+
return API$t.put(`/transaction/${id}/user`, { user: userId });
|
|
1106
1108
|
},
|
|
1107
1109
|
postSendConfirmationEmail: (id) => {
|
|
1108
|
-
return API$
|
|
1110
|
+
return API$t.post(`/transaction/${id}/send-confirmation-email`);
|
|
1109
1111
|
},
|
|
1110
1112
|
putVerifyRequests: (id, data) => {
|
|
1111
|
-
return API$
|
|
1113
|
+
return API$t.put(`/transaction/${id}/verify-requests`, data);
|
|
1112
1114
|
},
|
|
1113
1115
|
getBorrowingTransactionHistoryByTransaction: (params) => {
|
|
1114
|
-
return API$
|
|
1116
|
+
return API$t.get("/transaction/history/by-transaction", { params });
|
|
1115
1117
|
},
|
|
1116
1118
|
getBorrowingTransactionHistoryByAsset: (params) => {
|
|
1117
|
-
return API$
|
|
1119
|
+
return API$t.get("/transaction/history/by-asset", { params });
|
|
1118
1120
|
},
|
|
1119
1121
|
getBorrowingTransactionHistoryOptions: (params) => {
|
|
1120
|
-
return API$
|
|
1122
|
+
return API$t.get("/transaction/history/options", { params });
|
|
1121
1123
|
},
|
|
1122
1124
|
putBorrowingVerifyToken: (token) => {
|
|
1123
|
-
return API$
|
|
1125
|
+
return API$t.put("/transaction/verify-token", { token });
|
|
1124
1126
|
},
|
|
1125
1127
|
putBorrowingHandoverConfirmation: (data) => {
|
|
1126
|
-
return API$
|
|
1128
|
+
return API$t.put("/transaction/handover-confirmation", data);
|
|
1127
1129
|
},
|
|
1128
1130
|
putBorrowingHandover: (id) => {
|
|
1129
|
-
return API$
|
|
1131
|
+
return API$t.put(`/transaction/${id}/handover`);
|
|
1130
1132
|
},
|
|
1131
1133
|
putBorrowingExtendRequest: (data) => {
|
|
1132
|
-
return API$
|
|
1134
|
+
return API$t.put("/transaction/request/extend", data);
|
|
1133
1135
|
},
|
|
1134
1136
|
putBorrowingExtendApproval: (data) => {
|
|
1135
|
-
return API$
|
|
1137
|
+
return API$t.put("/approval/approve/request-extension", data, {
|
|
1136
1138
|
params: { sourceWeb: true }
|
|
1137
1139
|
});
|
|
1138
1140
|
},
|
|
1139
1141
|
putBorrowingDeclineExtendRequest: (id) => {
|
|
1140
|
-
return API$
|
|
1142
|
+
return API$t.put("/transaction/request/decline", { id });
|
|
1141
1143
|
},
|
|
1142
1144
|
getBorrowingBorrowedAsset: (params) => {
|
|
1143
|
-
return API$
|
|
1145
|
+
return API$t.get("/transaction/request/borrowed/by-asset", { params });
|
|
1144
1146
|
},
|
|
1145
1147
|
getBorrowingBorrowedAssetOptions: (params) => {
|
|
1146
|
-
return API$
|
|
1148
|
+
return API$t.get("/transaction/request/borrowed/by-asset/options", {
|
|
1147
1149
|
params
|
|
1148
1150
|
});
|
|
1149
1151
|
},
|
|
1150
1152
|
getBorrowingBorrowedBorrower: (params) => {
|
|
1151
|
-
return API$
|
|
1153
|
+
return API$t.get("/transaction/request/borrowed/by-user", { params });
|
|
1152
1154
|
},
|
|
1153
1155
|
putBorrowingReportDamaged: (id, data) => {
|
|
1154
|
-
return API$
|
|
1156
|
+
return API$t.put(`/transaction/request/${id}/damaged`, data);
|
|
1155
1157
|
},
|
|
1156
1158
|
putBorrowingReportMissing: (id, data) => {
|
|
1157
|
-
return API$
|
|
1159
|
+
return API$t.put(`/transaction/request/${id}/missing`, data);
|
|
1158
1160
|
},
|
|
1159
1161
|
putBorrowingReturn: (id) => {
|
|
1160
|
-
return API$
|
|
1162
|
+
return API$t.put("/transaction/request/return", { id });
|
|
1161
1163
|
},
|
|
1162
1164
|
getBorrowingLog: (id) => {
|
|
1163
|
-
return API$
|
|
1165
|
+
return API$t.get(`/transaction/request/${id}/transaction-log`);
|
|
1164
1166
|
},
|
|
1165
1167
|
putConfirmReportDone: (id, data) => {
|
|
1166
|
-
return API$
|
|
1168
|
+
return API$t.put(`/transaction/request/${id}/confirm-report-done`, data);
|
|
1167
1169
|
},
|
|
1168
1170
|
putCancelReportBulk: (id) => {
|
|
1169
|
-
return API$
|
|
1171
|
+
return API$t.put("/transaction/request/cancel-report", {
|
|
1170
1172
|
id
|
|
1171
1173
|
});
|
|
1172
1174
|
},
|
|
1173
1175
|
putBorrowingEditExtension: (data) => {
|
|
1174
|
-
return API$
|
|
1176
|
+
return API$t.put("/transaction/request/duration", data);
|
|
1175
1177
|
},
|
|
1176
1178
|
getApproval: (params) => {
|
|
1177
|
-
return API$
|
|
1179
|
+
return API$t.get("/approval", { params });
|
|
1178
1180
|
},
|
|
1179
1181
|
getApprovalOptions: (params) => {
|
|
1180
|
-
return API$
|
|
1182
|
+
return API$t.get("/approval/options", { params });
|
|
1181
1183
|
},
|
|
1182
1184
|
getApprovalTransactionRequest: (id, params) => {
|
|
1183
|
-
return API$
|
|
1185
|
+
return API$t.get(`/approval/transaction/${id}`, { params });
|
|
1184
1186
|
},
|
|
1185
1187
|
getApprovalTransactionRequestOptions: (id, params) => {
|
|
1186
|
-
return API$
|
|
1188
|
+
return API$t.get(`/approval/transaction/${id}/options`, { params });
|
|
1187
1189
|
},
|
|
1188
1190
|
putApprovalApprove: (data) => {
|
|
1189
|
-
return API$
|
|
1191
|
+
return API$t.put("/approval/approve", data, {
|
|
1190
1192
|
params: { sourceWeb: true }
|
|
1191
1193
|
});
|
|
1192
1194
|
}
|
|
1193
1195
|
};
|
|
1194
|
-
const API$
|
|
1196
|
+
const API$s = createAxiosInstance({
|
|
1195
1197
|
prefix: "/borrowing/v2"
|
|
1196
1198
|
});
|
|
1197
1199
|
const BorrowServicesGo = {
|
|
1198
1200
|
...BorrowServices,
|
|
1199
1201
|
// Temporary inclusion of methods from OldBorrowServices. Move individual methods here once they are refactored and ready.
|
|
1200
1202
|
getTransactions: async (params) => {
|
|
1201
|
-
return API$
|
|
1203
|
+
return API$s.get("/transaction", { params });
|
|
1202
1204
|
},
|
|
1203
1205
|
getTransactionOptions: async (params) => {
|
|
1204
|
-
return API$
|
|
1206
|
+
return API$s.get("/transaction/options", { params });
|
|
1205
1207
|
},
|
|
1206
1208
|
getTransactionLog: async (id) => {
|
|
1207
|
-
return API$
|
|
1209
|
+
return API$s.get(`/transaction/request/${id}/transaction-log`);
|
|
1208
1210
|
},
|
|
1209
1211
|
postTransaction: async (body) => {
|
|
1210
|
-
return API$
|
|
1212
|
+
return API$s.post("/transaction", body);
|
|
1211
1213
|
},
|
|
1212
1214
|
putTransaction: async (body) => {
|
|
1213
|
-
return API$
|
|
1215
|
+
return API$s.put("/transaction", body);
|
|
1214
1216
|
},
|
|
1215
1217
|
putTransactionReturn: async (requestIds) => {
|
|
1216
1218
|
const body = { id: requestIds };
|
|
1217
|
-
return API$
|
|
1219
|
+
return API$s.put("/transaction/return", body);
|
|
1218
1220
|
},
|
|
1219
1221
|
putCancelReport: async (requestIds) => {
|
|
1220
1222
|
const body = { id: requestIds };
|
|
1221
|
-
return API$
|
|
1223
|
+
return API$s.put("/transaction/request/cancel-report", body);
|
|
1222
1224
|
}
|
|
1223
1225
|
};
|
|
1224
|
-
const API$
|
|
1226
|
+
const API$r = createAxiosInstance({
|
|
1225
1227
|
prefix: "/disposal/v2/"
|
|
1226
1228
|
});
|
|
1227
1229
|
const DisposalServices$1 = {
|
|
1228
1230
|
getReportedDisposal: (params) => {
|
|
1229
|
-
return API$
|
|
1231
|
+
return API$r.get("/report", { params });
|
|
1230
1232
|
},
|
|
1231
1233
|
getReportedDisposalOptions: (params) => {
|
|
1232
|
-
return API$
|
|
1234
|
+
return API$r.get("/report/options", { params });
|
|
1233
1235
|
},
|
|
1234
1236
|
postReportDisposal: (body) => {
|
|
1235
|
-
return API$
|
|
1237
|
+
return API$r.post("/report", body);
|
|
1236
1238
|
},
|
|
1237
1239
|
deleteCancelReport: (params) => {
|
|
1238
1240
|
params.isFromDisposal = "false";
|
|
1239
|
-
return API$
|
|
1241
|
+
return API$r.delete("/report/cancel-report", { params });
|
|
1240
1242
|
},
|
|
1241
1243
|
deleteDeclineReport: (params) => {
|
|
1242
1244
|
params.isFromDisposal = "true";
|
|
1243
|
-
return API$
|
|
1245
|
+
return API$r.delete("/report/cancel-report", { params });
|
|
1244
1246
|
},
|
|
1245
1247
|
getDisposalHistory: (params) => {
|
|
1246
|
-
return API$
|
|
1248
|
+
return API$r.get("/transaction", { params });
|
|
1247
1249
|
},
|
|
1248
1250
|
getHistoryByAssetOptions: (params) => {
|
|
1249
|
-
return API$
|
|
1251
|
+
return API$r.get("/transaction/options", { params });
|
|
1250
1252
|
},
|
|
1251
1253
|
getDisposalTransactionLog: (requestId) => {
|
|
1252
|
-
return API$
|
|
1254
|
+
return API$r.get(`/transaction/request/${requestId}/transaction-log`);
|
|
1253
1255
|
},
|
|
1254
1256
|
postCreateTransaction: (body) => {
|
|
1255
|
-
return API$
|
|
1257
|
+
return API$r.post("/transaction", body);
|
|
1256
1258
|
}
|
|
1257
1259
|
};
|
|
1258
|
-
const API$
|
|
1260
|
+
const API$q = createAxiosInstance({
|
|
1259
1261
|
prefix: "/report/v2/reports"
|
|
1260
1262
|
});
|
|
1261
1263
|
const ReportServices = {
|
|
1262
1264
|
getReportList: (params) => {
|
|
1263
|
-
return API$
|
|
1265
|
+
return API$q.get("/schedules", { params });
|
|
1264
1266
|
},
|
|
1265
1267
|
getReportSchedule: (scheduleId) => {
|
|
1266
|
-
return API$
|
|
1268
|
+
return API$q.get("/schedules/" + scheduleId);
|
|
1267
1269
|
},
|
|
1268
1270
|
getUniqueScheduleName: (name) => {
|
|
1269
|
-
return API$
|
|
1271
|
+
return API$q.get("/schedules/unique-name", { params: { name } });
|
|
1270
1272
|
},
|
|
1271
1273
|
getFilterOptions: (params) => {
|
|
1272
|
-
return API$
|
|
1274
|
+
return API$q.get("/schedules/options", { params });
|
|
1273
1275
|
},
|
|
1274
1276
|
putSetActive: (body) => {
|
|
1275
|
-
return API$
|
|
1277
|
+
return API$q.put("/schedules/set-active", body);
|
|
1276
1278
|
},
|
|
1277
1279
|
putEditSchedule: (id, body) => {
|
|
1278
|
-
return API$
|
|
1280
|
+
return API$q.put(`/schedules/${id}`, body);
|
|
1279
1281
|
},
|
|
1280
1282
|
deleteReports: (id) => {
|
|
1281
|
-
return API$
|
|
1283
|
+
return API$q.delete("/schedules", { params: { id } });
|
|
1282
1284
|
},
|
|
1283
1285
|
postCreateSchedule: (data) => {
|
|
1284
|
-
return API$
|
|
1286
|
+
return API$q.post("/schedules", data);
|
|
1285
1287
|
},
|
|
1286
1288
|
postDownloadReport: (data) => {
|
|
1287
|
-
return API$
|
|
1289
|
+
return API$q.post("/download", data, { responseType: "arraybuffer" });
|
|
1288
1290
|
},
|
|
1289
1291
|
postGenerateReport: (data) => {
|
|
1290
|
-
return API$
|
|
1292
|
+
return API$q.post("/generate", data);
|
|
1291
1293
|
}
|
|
1292
1294
|
};
|
|
1293
|
-
const API$
|
|
1295
|
+
const API$p = createAxiosInstance({
|
|
1294
1296
|
prefix: "/settings-attribute/v2"
|
|
1295
1297
|
});
|
|
1296
1298
|
const getEndpoint = (type) => {
|
|
@@ -1298,111 +1300,111 @@ const getEndpoint = (type) => {
|
|
|
1298
1300
|
};
|
|
1299
1301
|
const GroupCategoryServices = {
|
|
1300
1302
|
getGroupCategory: (type, params) => {
|
|
1301
|
-
return API$
|
|
1303
|
+
return API$p.get(`/${getEndpoint(type)}/tree`, { params });
|
|
1302
1304
|
},
|
|
1303
1305
|
getCategoryTree: () => {
|
|
1304
|
-
return API$
|
|
1306
|
+
return API$p.get("/category/tree");
|
|
1305
1307
|
},
|
|
1306
1308
|
getGroupTree: (params) => {
|
|
1307
|
-
return API$
|
|
1309
|
+
return API$p.get("/groups/tree", { params });
|
|
1308
1310
|
},
|
|
1309
1311
|
// Doesn't exist in company plan other than "Basic"
|
|
1310
1312
|
getGroupCategoryList: (type, groupId, params) => {
|
|
1311
|
-
return API$
|
|
1313
|
+
return API$p.get(`/${getEndpoint(type)}/${groupId}`, { params });
|
|
1312
1314
|
},
|
|
1313
1315
|
getNames: (type) => {
|
|
1314
|
-
return API$
|
|
1316
|
+
return API$p.get(`/${getEndpoint(type)}/names`);
|
|
1315
1317
|
},
|
|
1316
1318
|
getCodes: (type) => {
|
|
1317
|
-
return API$
|
|
1319
|
+
return API$p.get(`/${getEndpoint(type)}/codes`);
|
|
1318
1320
|
},
|
|
1319
1321
|
postCreateGroupCategory: (type, body) => {
|
|
1320
|
-
return API$
|
|
1322
|
+
return API$p.post(`/${getEndpoint(type)}`, body);
|
|
1321
1323
|
},
|
|
1322
1324
|
putEditGroupCategory: (type, body, objectId) => {
|
|
1323
|
-
return API$
|
|
1325
|
+
return API$p.put(`/${getEndpoint(type)}/${objectId}`, body);
|
|
1324
1326
|
},
|
|
1325
1327
|
// Doesn't exist in company plan other than "Enterprise"
|
|
1326
1328
|
putMoveGroup: (body, objectId) => {
|
|
1327
|
-
return API$
|
|
1329
|
+
return API$p.put(`/groups/${objectId}/move-group`, body);
|
|
1328
1330
|
},
|
|
1329
1331
|
// Doesn't exist in company plan other than "Enterprise"
|
|
1330
1332
|
putEditBulkGroups: async (body) => {
|
|
1331
|
-
return API$
|
|
1333
|
+
return API$p.put("/groups/bulk", body);
|
|
1332
1334
|
},
|
|
1333
1335
|
deleteGroupCategory: (type, body, objectId) => {
|
|
1334
|
-
return API$
|
|
1336
|
+
return API$p.delete(`/${getEndpoint(type)}/${objectId}`, { data: body });
|
|
1335
1337
|
}
|
|
1336
1338
|
};
|
|
1337
|
-
const API$
|
|
1339
|
+
const API$o = createAxiosInstance({
|
|
1338
1340
|
prefix: "/settings-attribute/v2/alias-code"
|
|
1339
1341
|
});
|
|
1340
1342
|
const AliasCodeServices = {
|
|
1341
1343
|
getAliasCode: () => {
|
|
1342
|
-
return API$
|
|
1344
|
+
return API$o.get("/");
|
|
1343
1345
|
},
|
|
1344
1346
|
postAliasCode: (data) => {
|
|
1345
|
-
return API$
|
|
1347
|
+
return API$o.post("/", data);
|
|
1346
1348
|
},
|
|
1347
1349
|
getAliasCodeList: (params) => {
|
|
1348
|
-
return API$
|
|
1350
|
+
return API$o.get(`/${params.object}/code-list`, { params });
|
|
1349
1351
|
}
|
|
1350
1352
|
};
|
|
1351
|
-
const API$
|
|
1353
|
+
const API$n = createAxiosInstance({
|
|
1352
1354
|
prefix: "/settings-attribute/v2/general-settings"
|
|
1353
1355
|
});
|
|
1354
1356
|
const GeneralSettingsServices = {
|
|
1355
1357
|
getGeneralSettings: () => {
|
|
1356
|
-
return API$
|
|
1358
|
+
return API$n.get("/");
|
|
1357
1359
|
},
|
|
1358
1360
|
putUpdateGeneralSettings: (data) => {
|
|
1359
|
-
return API$
|
|
1361
|
+
return API$n.put("/", data);
|
|
1360
1362
|
}
|
|
1361
1363
|
};
|
|
1362
|
-
const API$
|
|
1364
|
+
const API$m = createAxiosInstance({
|
|
1363
1365
|
prefix: "/settings-attribute/v2/custom-field"
|
|
1364
1366
|
});
|
|
1365
1367
|
const CustomFieldServices = {
|
|
1366
1368
|
getCustomField: async (params) => {
|
|
1367
|
-
return API$
|
|
1369
|
+
return API$m.get("/", { params });
|
|
1368
1370
|
},
|
|
1369
1371
|
getCustomFieldsByCategory: (category, params) => {
|
|
1370
|
-
return API$
|
|
1372
|
+
return API$m.get(`/${category}`, { params });
|
|
1371
1373
|
},
|
|
1372
1374
|
getOptions: async (params) => {
|
|
1373
|
-
return API$
|
|
1375
|
+
return API$m.get("/options", { params });
|
|
1374
1376
|
},
|
|
1375
1377
|
postCreateCustomField: async (params, data) => {
|
|
1376
|
-
return API$
|
|
1378
|
+
return API$m.post("/", data, { params });
|
|
1377
1379
|
},
|
|
1378
1380
|
putEditCustomField: async (params, data, id) => {
|
|
1379
|
-
return API$
|
|
1381
|
+
return API$m.put(`/${id}`, data, { params });
|
|
1380
1382
|
},
|
|
1381
1383
|
putChangeStatus: async (params, data) => {
|
|
1382
|
-
return API$
|
|
1384
|
+
return API$m.put("/bulk", data, { params });
|
|
1383
1385
|
},
|
|
1384
1386
|
deleteCustomField: async (params) => {
|
|
1385
|
-
return API$
|
|
1387
|
+
return API$m.delete("/bulk", { params });
|
|
1386
1388
|
},
|
|
1387
1389
|
getUsedCustomFields: async () => {
|
|
1388
|
-
return API$
|
|
1390
|
+
return API$m.get("/used-by-assets");
|
|
1389
1391
|
}
|
|
1390
1392
|
};
|
|
1391
|
-
const API$
|
|
1393
|
+
const API$l = createAxiosInstance({
|
|
1392
1394
|
prefix: "/settings-attribute/v2/asset-name-policy"
|
|
1393
1395
|
});
|
|
1394
1396
|
const AssetPolicyServices = {
|
|
1395
1397
|
getList: (params) => {
|
|
1396
|
-
return API$
|
|
1398
|
+
return API$l.get("/", { params });
|
|
1397
1399
|
},
|
|
1398
1400
|
getListFilterOptions: (params) => {
|
|
1399
|
-
return API$
|
|
1401
|
+
return API$l.get("/options");
|
|
1400
1402
|
},
|
|
1401
1403
|
putUpdatePolicy: (body) => {
|
|
1402
|
-
return API$
|
|
1404
|
+
return API$l.put("/", body);
|
|
1403
1405
|
}
|
|
1404
1406
|
};
|
|
1405
|
-
const API$
|
|
1407
|
+
const API$k = createAxiosInstance({
|
|
1406
1408
|
prefix: "/settings-user-role/v2/auth"
|
|
1407
1409
|
});
|
|
1408
1410
|
const onRejected$1 = (error) => {
|
|
@@ -1417,10 +1419,10 @@ const onRejected$1 = (error) => {
|
|
|
1417
1419
|
};
|
|
1418
1420
|
const AuthServices$1 = {
|
|
1419
1421
|
reLogin: (body) => {
|
|
1420
|
-
API$
|
|
1422
|
+
API$k.interceptors.response.use((response) => {
|
|
1421
1423
|
return response;
|
|
1422
1424
|
}, onRejected$1);
|
|
1423
|
-
return API$
|
|
1425
|
+
return API$k.post("/login", body);
|
|
1424
1426
|
}
|
|
1425
1427
|
};
|
|
1426
1428
|
const DepreciationMethodAPI = createAxiosInstance({
|
|
@@ -1486,31 +1488,31 @@ const AccountingServices = {
|
|
|
1486
1488
|
return AccountCodeAPI.put("/account-code/" + id, body);
|
|
1487
1489
|
}
|
|
1488
1490
|
};
|
|
1489
|
-
const API$
|
|
1491
|
+
const API$j = createAxiosInstance({
|
|
1490
1492
|
env: "APP_TAGSAMURAI_API",
|
|
1491
1493
|
prefix: "/settings-attribute/v2/asset-name"
|
|
1492
1494
|
});
|
|
1493
1495
|
const AssetNameServices = {
|
|
1494
1496
|
getDropdown: (params) => {
|
|
1495
|
-
return API$
|
|
1497
|
+
return API$j.get("/dropdown", { params });
|
|
1496
1498
|
},
|
|
1497
1499
|
getAssetNameDetail: (id) => {
|
|
1498
|
-
return API$
|
|
1500
|
+
return API$j.get(`/${id}`);
|
|
1499
1501
|
},
|
|
1500
1502
|
getAssetsByAssetName: (id, params) => {
|
|
1501
|
-
return API$
|
|
1503
|
+
return API$j.get(`/${id}/list-asset`, { params });
|
|
1502
1504
|
},
|
|
1503
1505
|
getAssetNameList: (params) => {
|
|
1504
|
-
return API$
|
|
1506
|
+
return API$j.get("/", { params });
|
|
1505
1507
|
},
|
|
1506
1508
|
getUnpairedAssetName: (params) => {
|
|
1507
|
-
return API$
|
|
1509
|
+
return API$j.get("/unpaired", { params });
|
|
1508
1510
|
},
|
|
1509
1511
|
getOptions: (params) => {
|
|
1510
|
-
return API$
|
|
1512
|
+
return API$j.get("/options", { params });
|
|
1511
1513
|
}
|
|
1512
1514
|
};
|
|
1513
|
-
const API$
|
|
1515
|
+
const API$i = createAxiosInstance({
|
|
1514
1516
|
env: "APP_TAGSAMURAI_API",
|
|
1515
1517
|
prefix: "/audit/v2"
|
|
1516
1518
|
});
|
|
@@ -1520,100 +1522,100 @@ const API_IOT = createAxiosInstance({
|
|
|
1520
1522
|
});
|
|
1521
1523
|
const TaskServices = {
|
|
1522
1524
|
getTaskList: (params) => {
|
|
1523
|
-
return API$
|
|
1525
|
+
return API$i.get("/audit/task", { params });
|
|
1524
1526
|
},
|
|
1525
1527
|
getTaskHistory: (params) => {
|
|
1526
|
-
return API$
|
|
1528
|
+
return API$i.get("/audit/task/history", { params });
|
|
1527
1529
|
},
|
|
1528
1530
|
extendAuditDuration: (body, id) => {
|
|
1529
|
-
return API$
|
|
1531
|
+
return API$i.put(`/audit/task/${id}/extend`, body);
|
|
1530
1532
|
},
|
|
1531
1533
|
stopAudit: (id, body) => {
|
|
1532
|
-
return API$
|
|
1534
|
+
return API$i.put(`/audit/task/${id}/stop`, body);
|
|
1533
1535
|
},
|
|
1534
1536
|
cancelAuditTask: (id) => {
|
|
1535
|
-
return API$
|
|
1537
|
+
return API$i.put(`/audit/task/${id}/cancel`);
|
|
1536
1538
|
},
|
|
1537
1539
|
getTaskDetail: (id) => {
|
|
1538
|
-
return API$
|
|
1540
|
+
return API$i.get(`/audit/task/${id}`);
|
|
1539
1541
|
},
|
|
1540
1542
|
getInAuditTask: (params) => {
|
|
1541
|
-
return API$
|
|
1543
|
+
return API$i.get("/audit/scheduled-asset/in-audit", { params });
|
|
1542
1544
|
},
|
|
1543
1545
|
getTaskDetailAssets: (params, taskId) => {
|
|
1544
|
-
return API$
|
|
1546
|
+
return API$i.get(`/audit/task/${taskId}/view-asset-detail`, { params });
|
|
1545
1547
|
},
|
|
1546
1548
|
getAuditedTask: (params) => {
|
|
1547
|
-
return API$
|
|
1549
|
+
return API$i.get("/audit/scheduled-asset/audited", { params });
|
|
1548
1550
|
},
|
|
1549
1551
|
getAuditLog: (id) => {
|
|
1550
|
-
return API$
|
|
1552
|
+
return API$i.get(`/audit/scheduled-asset/${id}/log`);
|
|
1551
1553
|
},
|
|
1552
1554
|
getTaskEventLog: (params) => {
|
|
1553
|
-
return API$
|
|
1555
|
+
return API$i.get("/audit/task/task-event-log", { params });
|
|
1554
1556
|
},
|
|
1555
1557
|
getTaskTimelineEventLog: (idTask) => {
|
|
1556
|
-
return API$
|
|
1558
|
+
return API$i.get(`/audit/task/${idTask}/event-log`);
|
|
1557
1559
|
},
|
|
1558
1560
|
scanAssetTAG: (body, idTask) => {
|
|
1559
|
-
return API$
|
|
1561
|
+
return API$i.put(`/audit/task/${idTask}/scan`, body);
|
|
1560
1562
|
},
|
|
1561
1563
|
submitAssetCondition: (body, idAsset) => {
|
|
1562
1564
|
const headers = body.picture ? { "Content-Type": "multipart/form-data" } : { "Content-Type": "application/json" };
|
|
1563
|
-
return API$
|
|
1565
|
+
return API$i.put(`/audit/scheduled-asset/${idAsset}/update/condition`, body, {
|
|
1564
1566
|
headers
|
|
1565
1567
|
});
|
|
1566
1568
|
},
|
|
1567
1569
|
submitAuditedAsset: (idTask) => {
|
|
1568
|
-
return API$
|
|
1570
|
+
return API$i.put(`/audit/task/${idTask}/submit`);
|
|
1569
1571
|
},
|
|
1570
1572
|
reportTAGMissing: (note, idAsset) => {
|
|
1571
|
-
return API$
|
|
1573
|
+
return API$i.put(`/audit/scheduled-asset/${idAsset}/report-missing`, {
|
|
1572
1574
|
note
|
|
1573
1575
|
});
|
|
1574
1576
|
},
|
|
1575
1577
|
reportTAG: (id, body) => {
|
|
1576
|
-
return API$
|
|
1578
|
+
return API$i.put(`/audit/scheduled-asset/${id}/tag-reported`, body);
|
|
1577
1579
|
},
|
|
1578
1580
|
getTaskInitialState: (idTask) => {
|
|
1579
|
-
return API$
|
|
1581
|
+
return API$i.get(`/audit/scheduled-asset/${idTask}`);
|
|
1580
1582
|
},
|
|
1581
1583
|
cancelTaskReport: (scheduledAssetId) => {
|
|
1582
|
-
return API$
|
|
1584
|
+
return API$i.put(`/audit/scheduled-asset/${scheduledAssetId}/cancel-report`);
|
|
1583
1585
|
}
|
|
1584
1586
|
};
|
|
1585
1587
|
const ScheduleServices = {
|
|
1586
1588
|
getScheduleList: (params) => {
|
|
1587
|
-
return API$
|
|
1589
|
+
return API$i.get("/audit/schedule", { params });
|
|
1588
1590
|
},
|
|
1589
1591
|
getScheduleDetail: (id) => {
|
|
1590
|
-
return API$
|
|
1592
|
+
return API$i.get("/audit/schedule/" + id);
|
|
1591
1593
|
},
|
|
1592
1594
|
deleteSchedule: (scheduleId) => {
|
|
1593
|
-
return API$
|
|
1595
|
+
return API$i.put("/audit/schedule/bulk-delete", {
|
|
1594
1596
|
id: scheduleId
|
|
1595
1597
|
});
|
|
1596
1598
|
},
|
|
1597
1599
|
inactivateSchedule: (id) => {
|
|
1598
|
-
return API$
|
|
1600
|
+
return API$i.put("/audit/schedule/bulk-inactive", { id });
|
|
1599
1601
|
},
|
|
1600
1602
|
activateSchedule: (id) => {
|
|
1601
|
-
return API$
|
|
1603
|
+
return API$i.put("/audit/schedule/bulk-active", { id });
|
|
1602
1604
|
},
|
|
1603
1605
|
createNewSchedule: (body) => {
|
|
1604
|
-
return API$
|
|
1606
|
+
return API$i.post("/audit/schedule", body);
|
|
1605
1607
|
},
|
|
1606
1608
|
editSchedule: (body, id) => {
|
|
1607
|
-
return API$
|
|
1609
|
+
return API$i.put("/audit/schedule/" + id, body);
|
|
1608
1610
|
},
|
|
1609
1611
|
getActiveAsset: (id, params) => {
|
|
1610
|
-
return API$
|
|
1612
|
+
return API$i.get(`/audit/asset/schedule/${id}`, { params });
|
|
1611
1613
|
},
|
|
1612
1614
|
setAssetActivation: (body) => {
|
|
1613
|
-
return API$
|
|
1615
|
+
return API$i.put("/audit/asset/activation", body);
|
|
1614
1616
|
},
|
|
1615
1617
|
getAuditableAssetAmount: (params) => {
|
|
1616
|
-
return API$
|
|
1618
|
+
return API$i.get("/audit/asset/auditable/total-asset", { params });
|
|
1617
1619
|
}
|
|
1618
1620
|
};
|
|
1619
1621
|
const IOTAuditServices = {
|
|
@@ -1627,17 +1629,17 @@ const IOTAuditServices = {
|
|
|
1627
1629
|
return API_IOT.put(`/iot/audit/${auditId}`, body);
|
|
1628
1630
|
},
|
|
1629
1631
|
getReaderTotalAsset: (taskId, params) => {
|
|
1630
|
-
return API$
|
|
1632
|
+
return API$i.get(`/audit/task/${taskId}/reader/total-assets`, {
|
|
1631
1633
|
params
|
|
1632
1634
|
});
|
|
1633
1635
|
},
|
|
1634
1636
|
getAssetList: (params) => {
|
|
1635
|
-
return API$
|
|
1637
|
+
return API$i.get("/audit/scheduled-asset", { params });
|
|
1636
1638
|
}
|
|
1637
1639
|
};
|
|
1638
1640
|
const FilterServices = {
|
|
1639
1641
|
getFilterOptions: (path, params) => {
|
|
1640
|
-
return API$
|
|
1642
|
+
return API$i.get(`/${path}/options`, { params });
|
|
1641
1643
|
},
|
|
1642
1644
|
getIOTFilterOptions: (path, params) => {
|
|
1643
1645
|
return API_IOT.get(`/${path}/options`, { params });
|
|
@@ -1645,50 +1647,50 @@ const FilterServices = {
|
|
|
1645
1647
|
};
|
|
1646
1648
|
const AuditableAssetServices = {
|
|
1647
1649
|
getAudiableAssetList: (params) => {
|
|
1648
|
-
return API$
|
|
1650
|
+
return API$i.get("/audit/asset/auditable", { params });
|
|
1649
1651
|
},
|
|
1650
1652
|
getAuditableAssetDetail: (id) => {
|
|
1651
|
-
return API$
|
|
1653
|
+
return API$i.get("/audit/asset/auditable/" + id);
|
|
1652
1654
|
}
|
|
1653
1655
|
};
|
|
1654
1656
|
const ApprovalServices = {
|
|
1655
1657
|
getApprovalList: (idTask, approvalRound) => {
|
|
1656
|
-
return API$
|
|
1658
|
+
return API$i.get(`/audit/approval/task/${idTask}/transaction`, {
|
|
1657
1659
|
params: {
|
|
1658
1660
|
approvalRound
|
|
1659
1661
|
}
|
|
1660
1662
|
});
|
|
1661
1663
|
},
|
|
1662
1664
|
getActiveApprovalList: (params) => {
|
|
1663
|
-
return API$
|
|
1665
|
+
return API$i.get("/audit/approval/active", { params });
|
|
1664
1666
|
},
|
|
1665
1667
|
getHisotryApprovalList: (params) => {
|
|
1666
|
-
return API$
|
|
1668
|
+
return API$i.get("/audit/approval/history", { params });
|
|
1667
1669
|
},
|
|
1668
1670
|
getTaskDetail: (id) => {
|
|
1669
|
-
return API$
|
|
1671
|
+
return API$i.get(`/audit/task/${id}`);
|
|
1670
1672
|
},
|
|
1671
1673
|
getApprovalHistoryDetail: (idApproval) => {
|
|
1672
|
-
return API$
|
|
1674
|
+
return API$i.get(`/audit/approval/${idApproval}`);
|
|
1673
1675
|
},
|
|
1674
1676
|
getApprovalAssetList: (params) => {
|
|
1675
|
-
return API$
|
|
1677
|
+
return API$i.get("/audit/scheduled-asset/audited", { params });
|
|
1676
1678
|
},
|
|
1677
1679
|
submitApprovalAction: (body) => {
|
|
1678
|
-
return API$
|
|
1680
|
+
return API$i.put("/audit/approval/approve", body);
|
|
1679
1681
|
}
|
|
1680
1682
|
};
|
|
1681
1683
|
const AuditServices = {
|
|
1682
1684
|
getAudit: (assetId, params) => {
|
|
1683
|
-
return API$
|
|
1685
|
+
return API$i.get(`/audit/schedule/asset-detail/${assetId}`, { params });
|
|
1684
1686
|
},
|
|
1685
1687
|
getAuditOption: (assetId, params) => {
|
|
1686
|
-
return API$
|
|
1688
|
+
return API$i.get(`/audit/schedule/asset-detail/${assetId}/options`, {
|
|
1687
1689
|
params
|
|
1688
1690
|
});
|
|
1689
1691
|
},
|
|
1690
1692
|
putSetActive: (body) => {
|
|
1691
|
-
return API$
|
|
1693
|
+
return API$i.put("/audit/asset/activation", body);
|
|
1692
1694
|
},
|
|
1693
1695
|
...TaskServices,
|
|
1694
1696
|
...ScheduleServices,
|
|
@@ -1697,54 +1699,16 @@ const AuditServices = {
|
|
|
1697
1699
|
...AuditableAssetServices,
|
|
1698
1700
|
...ApprovalServices
|
|
1699
1701
|
};
|
|
1700
|
-
const API$
|
|
1702
|
+
const API$h = createAxiosInstance({
|
|
1701
1703
|
env: "APP_TAGSAMURAI_API",
|
|
1702
1704
|
prefix: "/settings-attribute/v2/brands"
|
|
1703
1705
|
});
|
|
1704
1706
|
const BrandServices = {
|
|
1705
1707
|
getDropdown: (params) => {
|
|
1706
|
-
return API$
|
|
1707
|
-
}
|
|
1708
|
-
};
|
|
1709
|
-
const API$i = createAxiosInstance({
|
|
1710
|
-
prefix: "/v2",
|
|
1711
|
-
env: "APP_LOGS_NOTIFICATION_API"
|
|
1712
|
-
});
|
|
1713
|
-
const ChangelogServices = {
|
|
1714
|
-
getActionLog: (params) => {
|
|
1715
|
-
return API$i.get("/change-log", { params });
|
|
1716
|
-
},
|
|
1717
|
-
getActionLogOption: (params) => {
|
|
1718
|
-
return API$i.get("/change-log/options", { params });
|
|
1719
|
-
},
|
|
1720
|
-
getSessionLogList: (params) => {
|
|
1721
|
-
return API$i.get("/session-log", { params });
|
|
1722
|
-
},
|
|
1723
|
-
getUserDetailSystemLogList: (params) => {
|
|
1724
|
-
return API$i.get("/change-log", { params });
|
|
1725
|
-
},
|
|
1726
|
-
getUserDetailSystemLogOption: (params) => {
|
|
1727
|
-
return API$i.get("/change-log/options", { params });
|
|
1728
|
-
},
|
|
1729
|
-
/**
|
|
1730
|
-
* Retrieves the transaction log.
|
|
1731
|
-
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
1732
|
-
*/
|
|
1733
|
-
getTransactionLog: (params) => {
|
|
1734
|
-
return API$i.get("/transaction-log", { params });
|
|
1735
|
-
},
|
|
1736
|
-
/**
|
|
1737
|
-
* Retrieves the transaction log options.
|
|
1738
|
-
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
1739
|
-
*/
|
|
1740
|
-
getTransactionLogOption: (params) => {
|
|
1741
|
-
return API$i.get("/transaction-log/options", { params });
|
|
1742
|
-
},
|
|
1743
|
-
postScanLog: (body) => {
|
|
1744
|
-
return API$i.post("/transaction-log/scan-log", body);
|
|
1708
|
+
return API$h.get("/dropdown", { params });
|
|
1745
1709
|
}
|
|
1746
1710
|
};
|
|
1747
|
-
const API$
|
|
1711
|
+
const API$g = ({ headers = {}, params = {} } = {}) => {
|
|
1748
1712
|
const BASE_URL = getBaseURL("APP_COUNTRY_STATE_API");
|
|
1749
1713
|
const API_KEY = getBaseURL("APP_COUNTRY_STATE_API_KEY");
|
|
1750
1714
|
const instance = axios.create({
|
|
@@ -1760,28 +1724,28 @@ const API$h = ({ headers = {}, params = {} } = {}) => {
|
|
|
1760
1724
|
};
|
|
1761
1725
|
const CountryStateServices = {
|
|
1762
1726
|
getCountry: () => {
|
|
1763
|
-
return API$
|
|
1727
|
+
return API$g().get("/countries");
|
|
1764
1728
|
},
|
|
1765
1729
|
getState: (country) => {
|
|
1766
|
-
return API$
|
|
1730
|
+
return API$g().get(`/countries/${country}/states`);
|
|
1767
1731
|
},
|
|
1768
1732
|
getCity: (country, state) => {
|
|
1769
|
-
return API$
|
|
1733
|
+
return API$g().get(`/countries/${country}/states/${state}/cities`);
|
|
1770
1734
|
}
|
|
1771
1735
|
};
|
|
1772
|
-
const API$
|
|
1736
|
+
const API$f = createAxiosInstance({
|
|
1773
1737
|
env: "APP_TAGSAMURAI_API",
|
|
1774
1738
|
prefix: "/dashboard/v2/dashboard"
|
|
1775
1739
|
});
|
|
1776
1740
|
const DashboardServices = {
|
|
1777
1741
|
getLatestTask: (params) => {
|
|
1778
|
-
return API$
|
|
1742
|
+
return API$f.get("/latest-task", { params });
|
|
1779
1743
|
},
|
|
1780
1744
|
getSummary: (params) => {
|
|
1781
|
-
return API$
|
|
1745
|
+
return API$f.get("/summary", { params });
|
|
1782
1746
|
}
|
|
1783
1747
|
};
|
|
1784
|
-
const API$
|
|
1748
|
+
const API$e = createAxiosInstance({
|
|
1785
1749
|
env: "APP_GLOBAL_SETTINGS_API",
|
|
1786
1750
|
prefix: "/v1/global-settings/auth"
|
|
1787
1751
|
});
|
|
@@ -1798,37 +1762,37 @@ const onRejected = (error) => {
|
|
|
1798
1762
|
const AuthServices = {
|
|
1799
1763
|
login: (form) => {
|
|
1800
1764
|
const body = { ...form, isMobile: false };
|
|
1801
|
-
return API$
|
|
1765
|
+
return API$e.post("/login", body);
|
|
1802
1766
|
},
|
|
1803
1767
|
reLogin: (body) => {
|
|
1804
|
-
API$
|
|
1768
|
+
API$e.interceptors.response.use((response) => {
|
|
1805
1769
|
return response;
|
|
1806
1770
|
}, onRejected);
|
|
1807
|
-
return API$
|
|
1771
|
+
return API$e.post("/login", body);
|
|
1808
1772
|
},
|
|
1809
1773
|
requestOTP: (email) => {
|
|
1810
1774
|
const body = { email };
|
|
1811
|
-
return API$
|
|
1775
|
+
return API$e.post("/request-otp", body);
|
|
1812
1776
|
},
|
|
1813
1777
|
requestResetPassLink: (email) => {
|
|
1814
1778
|
const body = { email };
|
|
1815
|
-
return API$
|
|
1779
|
+
return API$e.post("/request-reset-link", body);
|
|
1816
1780
|
},
|
|
1817
1781
|
setPassword: (body) => {
|
|
1818
|
-
return API$
|
|
1782
|
+
return API$e.post("/set-password", body);
|
|
1819
1783
|
},
|
|
1820
1784
|
verifyToken: (token) => {
|
|
1821
|
-
return API$
|
|
1785
|
+
return API$e.get(`/verify-token/${token}`);
|
|
1822
1786
|
},
|
|
1823
1787
|
confirmEmailChange: (token) => {
|
|
1824
1788
|
const body = { token };
|
|
1825
|
-
return API$
|
|
1789
|
+
return API$e.put("/confirm-email-change/confirm", body);
|
|
1826
1790
|
},
|
|
1827
1791
|
postLogout: () => {
|
|
1828
|
-
return API$
|
|
1792
|
+
return API$e.post("/logout");
|
|
1829
1793
|
}
|
|
1830
1794
|
};
|
|
1831
|
-
const API$
|
|
1795
|
+
const API$d = createAxiosInstance({
|
|
1832
1796
|
env: "APP_ADMIN_API",
|
|
1833
1797
|
prefix: "/settings-attribute/languages"
|
|
1834
1798
|
});
|
|
@@ -1839,7 +1803,7 @@ const I18nService = {
|
|
|
1839
1803
|
* @returns A promise resolving to a key-value record of messages.
|
|
1840
1804
|
*/
|
|
1841
1805
|
getMessages: (isoCode) => {
|
|
1842
|
-
return API$
|
|
1806
|
+
return API$d.get(`/${isoCode}/translations`);
|
|
1843
1807
|
},
|
|
1844
1808
|
/**
|
|
1845
1809
|
* Fetch all available lang options for LanguageDropdown and LanguageSwitcher
|
|
@@ -1847,7 +1811,7 @@ const I18nService = {
|
|
|
1847
1811
|
* @returns Promise Array of options
|
|
1848
1812
|
*/
|
|
1849
1813
|
getLanguageOptions: async () => {
|
|
1850
|
-
const { data } = await API$
|
|
1814
|
+
const { data } = await API$d.get("/dropdown");
|
|
1851
1815
|
return data.data;
|
|
1852
1816
|
},
|
|
1853
1817
|
/**
|
|
@@ -1857,7 +1821,7 @@ const I18nService = {
|
|
|
1857
1821
|
* @returns Promise LanguageMeta
|
|
1858
1822
|
*/
|
|
1859
1823
|
getLanguageOptionMeta: async (isoCode) => {
|
|
1860
|
-
const { data } = await API$
|
|
1824
|
+
const { data } = await API$d.get(
|
|
1861
1825
|
"/dropdown/" + isoCode
|
|
1862
1826
|
);
|
|
1863
1827
|
return data.data;
|
|
@@ -1869,72 +1833,106 @@ const I18nService = {
|
|
|
1869
1833
|
* @param locale Target locale code.
|
|
1870
1834
|
*/
|
|
1871
1835
|
translateText: async (key, locale) => {
|
|
1872
|
-
const { data } = await API$
|
|
1836
|
+
const { data } = await API$d.post("/translate", {
|
|
1873
1837
|
q: key,
|
|
1874
1838
|
target: locale
|
|
1875
1839
|
});
|
|
1876
1840
|
return data.data.translations[key];
|
|
1877
1841
|
}
|
|
1878
1842
|
};
|
|
1879
|
-
const API$
|
|
1843
|
+
const API$c = createAxiosInstance({
|
|
1880
1844
|
env: "APP_TAGSAMURAI_API",
|
|
1881
1845
|
prefix: "/settings-attribute/v2/models"
|
|
1882
1846
|
});
|
|
1883
1847
|
const ModelTypeServices = {
|
|
1884
1848
|
getDropdown: (params) => {
|
|
1885
|
-
return API$
|
|
1849
|
+
return API$c.get("/dropdown", { params });
|
|
1886
1850
|
}
|
|
1887
1851
|
};
|
|
1888
|
-
const API$
|
|
1852
|
+
const API$b = createAxiosInstance({
|
|
1889
1853
|
prefix: "/v2",
|
|
1890
1854
|
env: "APP_LOGS_NOTIFICATION_API"
|
|
1891
1855
|
});
|
|
1892
1856
|
const NotificationApprovalServices = {
|
|
1893
1857
|
getTotalApprovals: () => {
|
|
1894
|
-
return API$
|
|
1858
|
+
return API$b.get("/approval/count");
|
|
1895
1859
|
}
|
|
1896
1860
|
};
|
|
1897
|
-
const
|
|
1861
|
+
const ReaderAPI$1 = createAxiosInstance({
|
|
1898
1862
|
prefix: "/iot/v2/reader"
|
|
1899
1863
|
});
|
|
1864
|
+
const IOTAntennaAPI$1 = createAxiosInstance({
|
|
1865
|
+
prefix: "/iot/v2/iot/antenna"
|
|
1866
|
+
});
|
|
1867
|
+
const IOTReaderAPI$1 = createAxiosInstance({
|
|
1868
|
+
prefix: "/iot/v2/iot/reader"
|
|
1869
|
+
});
|
|
1900
1870
|
const ReaderServices = {
|
|
1871
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader
|
|
1901
1872
|
getIOTReaderList: (params) => {
|
|
1902
|
-
return
|
|
1873
|
+
return IOTReaderAPI$1.get("", { params: queryParamsStringfy(params) });
|
|
1903
1874
|
},
|
|
1875
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/options
|
|
1904
1876
|
getIOTReaderListOptions: (params) => {
|
|
1905
|
-
return
|
|
1877
|
+
return IOTReaderAPI$1.get("/options", { params });
|
|
1906
1878
|
},
|
|
1879
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/set-alias-name
|
|
1907
1880
|
setIOTAliasName: (body) => {
|
|
1908
|
-
return
|
|
1881
|
+
return IOTReaderAPI$1.put("/set-alias-name", body);
|
|
1909
1882
|
},
|
|
1883
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id/ping
|
|
1910
1884
|
pingIOTSingle: (id) => {
|
|
1911
|
-
return
|
|
1885
|
+
return IOTReaderAPI$1.put(`/${id}/ping`);
|
|
1886
|
+
},
|
|
1887
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/ping/bulk
|
|
1888
|
+
pingIOTBulk: (body) => {
|
|
1889
|
+
return IOTReaderAPI$1.put("/ping/bulk", body);
|
|
1912
1890
|
},
|
|
1913
1891
|
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id/set-antenna-power
|
|
1914
1892
|
setIOTAntennaPowerBulk: (id, body) => {
|
|
1915
|
-
return
|
|
1893
|
+
return IOTReaderAPI$1.put(`/${id}/set-antenna-power`, body);
|
|
1916
1894
|
},
|
|
1917
1895
|
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id/ports
|
|
1918
1896
|
getIOTPortList: (id, params) => {
|
|
1919
|
-
return
|
|
1897
|
+
return IOTReaderAPI$1.get(`/${id}/ports`, { params });
|
|
1920
1898
|
},
|
|
1921
|
-
|
|
1922
|
-
|
|
1899
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id
|
|
1900
|
+
getIOTDetail: (id) => {
|
|
1901
|
+
return IOTReaderAPI$1.get(`/${id}`);
|
|
1923
1902
|
},
|
|
1924
|
-
|
|
1925
|
-
|
|
1903
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/check-manager
|
|
1904
|
+
getIOTCheckManager: () => {
|
|
1905
|
+
return IOTReaderAPI$1.get("/check-manager");
|
|
1906
|
+
},
|
|
1907
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/reader/:id
|
|
1908
|
+
updateReader: (id, body) => {
|
|
1909
|
+
return ReaderAPI$1.put(`/${id}`, body);
|
|
1910
|
+
},
|
|
1911
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/set-status
|
|
1912
|
+
updateReaderStatus: (body) => {
|
|
1913
|
+
return IOTReaderAPI$1.put("/set-status", body);
|
|
1914
|
+
},
|
|
1915
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/antenna/set-status
|
|
1916
|
+
updateAntennaStatus: (body) => {
|
|
1917
|
+
return IOTAntennaAPI$1.put("/set-status", body);
|
|
1918
|
+
},
|
|
1919
|
+
setIOTPortGroup: (id, body) => {
|
|
1920
|
+
return IOTReaderAPI$1.put(`/${id}/set-port-group`, body);
|
|
1921
|
+
},
|
|
1922
|
+
setGroupIOT: (body) => {
|
|
1923
|
+
return IOTReaderAPI$1.put("/set-group", body);
|
|
1926
1924
|
},
|
|
1927
1925
|
getDataById: (id) => {
|
|
1928
|
-
return
|
|
1926
|
+
return IOTReaderAPI$1.get(`/${id}`);
|
|
1929
1927
|
},
|
|
1930
1928
|
getChangeLog: (params) => {
|
|
1931
|
-
return
|
|
1929
|
+
return IOTReaderAPI$1.get(`/${params.id}/change-log`, { params });
|
|
1932
1930
|
},
|
|
1933
1931
|
getChangeLogOptions: (params) => {
|
|
1934
|
-
return
|
|
1932
|
+
return IOTReaderAPI$1.get(`/${params.id}/change-log/options`, { params });
|
|
1935
1933
|
},
|
|
1936
1934
|
putData: (id, body) => {
|
|
1937
|
-
return
|
|
1935
|
+
return IOTReaderAPI$1.put(`/${id}`, body);
|
|
1938
1936
|
}
|
|
1939
1937
|
};
|
|
1940
1938
|
const API$a = createAxiosInstance({
|
|
@@ -2458,6 +2456,112 @@ const IOTServices = {
|
|
|
2458
2456
|
},
|
|
2459
2457
|
putIOTTracking: (body) => {
|
|
2460
2458
|
return API.put("/tracking", body);
|
|
2459
|
+
},
|
|
2460
|
+
getActivityLogData: (params) => {
|
|
2461
|
+
return API.get("/activity-log", { params });
|
|
2462
|
+
},
|
|
2463
|
+
getActivityLogOptions: (params) => {
|
|
2464
|
+
return API.get("/activity-log/options", { params });
|
|
2465
|
+
}
|
|
2466
|
+
};
|
|
2467
|
+
const ReaderAPI = createAxiosInstance({
|
|
2468
|
+
prefix: "/iot/v2/reader"
|
|
2469
|
+
});
|
|
2470
|
+
const IOTAntennaAPI = createAxiosInstance({
|
|
2471
|
+
prefix: "/iot/v2/iot/antenna"
|
|
2472
|
+
});
|
|
2473
|
+
const IOTReaderAPI = createAxiosInstance({
|
|
2474
|
+
prefix: "/iot/v2/iot/reader"
|
|
2475
|
+
});
|
|
2476
|
+
const IOTActivityLogAPI = createAxiosInstance({
|
|
2477
|
+
prefix: "/iot/v2/iot/activity-log"
|
|
2478
|
+
});
|
|
2479
|
+
const IOTService = {
|
|
2480
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/antenna
|
|
2481
|
+
getIOTAntennaList: (params) => {
|
|
2482
|
+
return IOTAntennaAPI.get("", { params: queryParamsStringfy(params) });
|
|
2483
|
+
},
|
|
2484
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/antenna/options
|
|
2485
|
+
getIOTAntennaListOptions: (params) => {
|
|
2486
|
+
return IOTAntennaAPI.get("/options", { params });
|
|
2487
|
+
},
|
|
2488
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/options
|
|
2489
|
+
getIOTReaderListOptions: (params) => {
|
|
2490
|
+
return IOTReaderAPI.get("/options", { params });
|
|
2491
|
+
},
|
|
2492
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader
|
|
2493
|
+
getIOTReaderList: (params) => {
|
|
2494
|
+
return IOTReaderAPI.get("", { params: queryParamsStringfy(params) });
|
|
2495
|
+
},
|
|
2496
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/activity-log
|
|
2497
|
+
getActivityLog: (params) => {
|
|
2498
|
+
return IOTActivityLogAPI.get("", { params });
|
|
2499
|
+
},
|
|
2500
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/activity-log/options
|
|
2501
|
+
getActivityLogOptions: (params) => {
|
|
2502
|
+
return IOTActivityLogAPI.get("/options", { params });
|
|
2503
|
+
},
|
|
2504
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/set-alias-name
|
|
2505
|
+
setIOTAliasName: (body) => {
|
|
2506
|
+
return IOTReaderAPI.put("/set-alias-name", body);
|
|
2507
|
+
},
|
|
2508
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id/ping
|
|
2509
|
+
pingIOTSingle: (id) => {
|
|
2510
|
+
return IOTReaderAPI.put(`/${id}/ping`);
|
|
2511
|
+
},
|
|
2512
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/ping/bulk
|
|
2513
|
+
pingIOTBulk: (body) => {
|
|
2514
|
+
return IOTReaderAPI.put("/ping/bulk", body);
|
|
2515
|
+
},
|
|
2516
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id/set-antenna-power
|
|
2517
|
+
setIOTAntennaPowerBulk: (id, body) => {
|
|
2518
|
+
return IOTReaderAPI.put(`/${id}/set-antenna-power`, body);
|
|
2519
|
+
},
|
|
2520
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id/ports
|
|
2521
|
+
getIOTPortList: (id, params) => {
|
|
2522
|
+
return IOTReaderAPI.get(`/${id}/ports`, { params });
|
|
2523
|
+
},
|
|
2524
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id
|
|
2525
|
+
getIOTDetail: (id) => {
|
|
2526
|
+
return IOTReaderAPI.get(`/${id}`);
|
|
2527
|
+
},
|
|
2528
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/check-manager
|
|
2529
|
+
getIOTCheckManager: () => {
|
|
2530
|
+
return IOTReaderAPI.get("/check-manager");
|
|
2531
|
+
},
|
|
2532
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/reader/:id
|
|
2533
|
+
updateReader: (id, body) => {
|
|
2534
|
+
return ReaderAPI.put(`/${id}`, body);
|
|
2535
|
+
},
|
|
2536
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/set-status
|
|
2537
|
+
updateReaderStatus: (body) => {
|
|
2538
|
+
return IOTReaderAPI.put("/set-status", body);
|
|
2539
|
+
},
|
|
2540
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/antenna/set-status
|
|
2541
|
+
updateAntennaStatus: (body) => {
|
|
2542
|
+
return IOTAntennaAPI.put("/set-status", body);
|
|
2543
|
+
},
|
|
2544
|
+
setIOTPortGroup: (id, body) => {
|
|
2545
|
+
return IOTReaderAPI.put(`/${id}/set-port-group`, body);
|
|
2546
|
+
},
|
|
2547
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/:id/set-port-status
|
|
2548
|
+
setIOTPortStatus: (id, body) => {
|
|
2549
|
+
return IOTReaderAPI.put(`/${id}/set-port-status`, body);
|
|
2550
|
+
},
|
|
2551
|
+
setGroupIOT: (body) => {
|
|
2552
|
+
return IOTReaderAPI.put("/set-group", body);
|
|
2553
|
+
},
|
|
2554
|
+
getDataById: (id) => {
|
|
2555
|
+
return IOTReaderAPI.get(`/${id}`);
|
|
2556
|
+
},
|
|
2557
|
+
getChangeLog: (params) => {
|
|
2558
|
+
return IOTReaderAPI.get(`/${params.id}/change-log`, { params });
|
|
2559
|
+
},
|
|
2560
|
+
getChangeLogOptions: (params) => {
|
|
2561
|
+
return IOTReaderAPI.get(`/${params.id}/change-log/options`, { params });
|
|
2562
|
+
},
|
|
2563
|
+
putData: (id, body) => {
|
|
2564
|
+
return IOTReaderAPI.put(`/${id}`, body);
|
|
2461
2565
|
}
|
|
2462
2566
|
};
|
|
2463
2567
|
const ReportAPI = createAxiosInstance({
|
|
@@ -2600,10 +2704,12 @@ export {
|
|
|
2600
2704
|
IOTServices,
|
|
2601
2705
|
ImportServices,
|
|
2602
2706
|
LicenseServices,
|
|
2603
|
-
ChangelogServices
|
|
2707
|
+
ChangelogServices as LogServices,
|
|
2604
2708
|
MissingServices,
|
|
2605
2709
|
ModelTypeServices,
|
|
2606
2710
|
MyAssetServices,
|
|
2711
|
+
ChangelogServices as NewChangelogServices,
|
|
2712
|
+
IOTService as NewIOTServices,
|
|
2607
2713
|
NotificationApprovalServices,
|
|
2608
2714
|
NotificationServices,
|
|
2609
2715
|
DisposalServices as OldDisposalServices,
|