@tagsamurai/fats-api-services 1.0.0-alpha.21 → 1.0.0-alpha.211
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 +1369 -115
- package/api-services.system.js +1 -1
- package/main.d.ts +50 -1
- package/package.json +6 -3
- package/src/dto/aliasCode.dto.d.ts +4 -0
- package/src/dto/assetDetail.dto.d.ts +91 -0
- package/src/dto/assetName.dto.d.ts +8 -0
- package/src/dto/assetService.dto.d.ts +136 -0
- package/src/dto/assignment.dto.d.ts +81 -0
- package/src/dto/audit.dto.d.ts +14 -0
- package/src/dto/borrow.dto.d.ts +35 -0
- package/src/dto/customField.dto.d.ts +16 -0
- package/src/dto/damageService.dto.d.ts +23 -0
- package/src/dto/disposal.dto.d.ts +66 -0
- package/src/dto/fileManager.dto.d.ts +25 -0
- package/src/dto/importData.dto.d.ts +7 -0
- package/src/dto/importTemporaryData.dto.d.ts +6 -0
- package/src/dto/license.dto.d.ts +76 -0
- package/src/dto/log.dto.d.ts +11 -11
- package/src/dto/maintenanceRoutine.dto.d.ts +12 -0
- package/src/dto/missing.dto.d.ts +12 -0
- package/src/dto/myAsset.dro.d.ts +12 -0
- package/src/dto/notification.dto.d.ts +3 -1
- package/src/dto/oldAuth.dto.d.ts +12 -0
- package/src/dto/oldBorrowService.dto.d.ts +102 -0
- package/src/dto/oldDamageService.dto.d.ts +7 -0
- package/src/dto/oldRepairService.dto.d.ts +29 -0
- package/src/dto/oldReportService.dto.d.ts +80 -0
- package/src/dto/oldTagService.dto.d.ts +59 -0
- package/src/dto/oldTrackingService.dto.d.ts +6 -0
- package/src/dto/oldTransferService.dto.d.ts +221 -0
- package/src/dto/openApi.dto.d.ts +3 -0
- package/src/dto/report.dto.d.ts +42 -0
- package/src/dto/role.dto.d.ts +50 -0
- package/src/dto/serviceCenter.dto.d.ts +22 -0
- package/src/dto/subUser.dto.d.ts +46 -0
- package/src/dto/transactionLog.dto.d.ts +17 -0
- package/src/dto/transfer.dto.d.ts +29 -0
- package/src/dto/user.dto.d.ts +126 -33
- package/src/services/aliasCode.service.d.ts +10 -0
- package/src/services/asset.service.d.ts +44 -0
- package/src/services/assignment.service.d.ts +15 -0
- package/src/services/borrow.service.d.ts +14 -0
- package/src/services/countryState.service.d.ts +7 -0
- package/src/services/customField.service.d.ts +19 -0
- package/src/services/damage.service.d.ts +13 -0
- package/src/services/damageService.type.d.ts +104 -0
- package/src/services/disposal.service.d.ts +18 -0
- package/src/services/fileManager.service.d.ts +53 -0
- package/src/services/generalSettings.service.d.ts +6 -0
- package/src/services/groupCategory.service.d.ts +1 -0
- package/src/services/importData.service.d.ts +24 -0
- package/src/services/license.service.d.ts +23 -0
- package/src/services/log.service.d.ts +29 -0
- package/src/services/missing.service.d.ts +12 -0
- package/src/services/myAsset.service.d.ts +13 -0
- package/src/services/notification.service.d.ts +9 -0
- package/src/services/oldAliasCode.service.d.ts +10 -0
- package/src/services/oldAsset.service.d.ts +48 -0
- package/src/services/oldAssetName.service.d.ts +14 -0
- package/src/services/oldAssignment.service.d.ts +84 -0
- package/src/services/oldAudit.service.d.ts +11 -0
- package/src/services/oldAuth.service.d.ts +29 -0
- package/src/services/oldBorrow.service.d.ts +77 -0
- package/src/services/oldBrand.service.d.ts +7 -0
- package/src/services/oldCustomField.service.d.ts +29 -0
- package/src/services/oldDamage.service.d.ts +17 -0
- package/src/services/oldDisposal.service.d.ts +44 -0
- package/src/services/oldFileManager.service.d.ts +53 -0
- package/src/services/oldGeneralSettings.service.d.ts +6 -0
- package/src/services/oldGroupCategory.service.d.ts +1 -0
- package/src/services/oldImportData.service.d.ts +22 -0
- package/src/services/oldLicense.service.d.ts +39 -0
- package/src/services/oldLog.service.d.ts +17 -0
- package/src/services/oldMaintenanceRoutine.service.d.ts +11 -0
- package/src/services/oldMissing.service.d.ts +12 -1
- package/src/services/oldModelType.service.d.ts +7 -0
- package/src/services/oldMyAsset.service.d.ts +7 -0
- package/src/services/oldOpenApi.service.d.ts +10 -0
- package/src/services/oldReader.service.d.ts +13 -0
- package/src/services/oldRepair.service.d.ts +10 -0
- package/src/services/oldReport.service.d.ts +31 -0
- package/src/services/oldRole.service.d.ts +56 -0
- package/src/services/oldServiceCenter.service.d.ts +19 -0
- package/src/services/oldSubUser.service.d.ts +15 -0
- package/src/services/oldTag.service.d.ts +25 -1
- package/src/services/oldTracking.service.d.ts +4 -0
- package/src/services/oldTransactionSetting.service.d.ts +21 -0
- package/src/services/oldTransfer.service.d.ts +30 -0
- package/src/services/oldUser.service.d.ts +28 -15
- package/src/services/openApi.service.d.ts +8 -0
- package/src/services/report.service.d.ts +32 -0
- package/src/services/role.service.d.ts +58 -0
- package/src/services/subUser.service.d.ts +17 -0
- package/src/services/transfer.service.d.ts +11 -0
- package/src/services/user.service.d.ts +42 -0
- package/src/types/aliasCode.type.d.ts +16 -0
- package/src/types/approval.type.d.ts +17 -0
- package/src/types/asset.type.d.ts +225 -0
- package/src/types/assetDetail.type.d.ts +120 -0
- package/src/types/assignedAsset.type.d.ts +60 -0
- package/src/types/assignment.type.d.ts +318 -0
- package/src/types/audit.type.d.ts +13 -0
- package/src/types/borrow.type.d.ts +86 -0
- package/src/types/customField.type.d.ts +43 -0
- package/src/types/dataTable.type.d.ts +7 -0
- package/src/types/disposal/history.type.d.ts +52 -0
- package/src/types/disposal/prelist.type.d.ts +18 -0
- package/src/types/disposal/reported.type.d.ts +55 -0
- package/src/types/disposal/requestDisposal.type.d.ts +81 -0
- package/src/types/disposal/transaction.type.d.ts +62 -0
- package/src/types/disposal/user.type.d.ts +5 -0
- package/src/types/disposal.type.d.ts +1 -0
- package/src/types/fetchResponse.type.d.ts +4 -2
- package/src/types/fileManager.type.d.ts +24 -0
- package/src/types/groupCategoryData.type.d.ts +2 -7
- package/src/types/importData.type.d.ts +92 -0
- package/src/types/license.type.d.ts +43 -0
- package/src/types/licenseAddon.type.d.ts +35 -0
- package/src/types/licenseAllocation.type.d.ts +64 -0
- package/src/types/licenseAsset.type.d.ts +77 -0
- package/src/types/licenseConcurrent.type.d.ts +11 -0
- package/src/types/licensePurchased.type.d.ts +16 -0
- package/src/types/maintenanceRoutine.type.d.ts +10 -0
- package/src/types/myAsset.type.d.ts +65 -0
- package/src/types/notification.type.d.ts +17 -0
- package/src/types/oldAssetService.type.d.ts +98 -0
- package/src/types/oldBorrowingService.type.d.ts +549 -0
- package/src/types/oldTagService.type.d.ts +109 -0
- package/src/types/options.type.d.ts +6 -10
- package/src/types/reader.d.ts +55 -0
- package/src/types/role.type.d.ts +111 -6
- package/src/types/serviceCenter.type.d.ts +29 -0
- package/src/types/subUser.type.d.ts +28 -0
- package/src/types/transfer.type.d.ts +64 -0
- package/src/types/user.type.d.ts +43 -1
- package/src/types/userGlobalRole.type.d.ts +1 -1
- package/src/types/userGroupRole.type.d.ts +1 -1
- package/src/types/userTransactionRole.type.d.ts +2 -0
- package/src/utils/getAssetsFile.util.d.ts +1 -0
- package/src/utils/index.d.ts +1 -0
- package/src/types/userSystemRole.type.d.ts +0 -14
package/api-services.es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
const { env: r = "APP_API", prefix:
|
|
4
|
-
return
|
|
5
|
-
...
|
|
6
|
-
baseURL:
|
|
7
|
-
headers: e ?
|
|
1
|
+
import St from "axios";
|
|
2
|
+
const Tt = { 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_GLOBAL_SETTINGS_API: "https://dev-api.global-settings.tagsamurai.com", VITE_APP_LOGS_NOTIFICATION_API: "https://dev-api-logs-notification.tagsamurai.com", VITE_APP_TAGSAMURAI_API: "https://dev-api.tagsamurai.com" }, N = (t = "APP_API") => Tt["VITE_" + t], s = (t = {}, e = !1) => {
|
|
3
|
+
const { env: r = "APP_API", prefix: a = "", headers: T = {}, ...M } = t, ft = `${N(r)}${a}`, gt = JSON.parse(localStorage.getItem("user") ?? "{}"), Pt = gt.jwt ?? gt.token ?? "";
|
|
4
|
+
return St.create({
|
|
5
|
+
...M,
|
|
6
|
+
baseURL: ft,
|
|
7
|
+
headers: e ? T : {
|
|
8
8
|
"Content-Type": "application/json",
|
|
9
|
-
Authorization: `Bearer ${
|
|
10
|
-
...
|
|
9
|
+
Authorization: `Bearer ${Pt}`,
|
|
10
|
+
...T
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
-
},
|
|
13
|
+
}, xt = (t) => {
|
|
14
14
|
if (!t || typeof t == "string")
|
|
15
15
|
return;
|
|
16
16
|
const e = {};
|
|
@@ -21,150 +21,480 @@ const v = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
21
21
|
[r]: t[r]
|
|
22
22
|
});
|
|
23
23
|
}), e;
|
|
24
|
-
},
|
|
24
|
+
}, kt = (t, e, r) => {
|
|
25
25
|
if (!t) return;
|
|
26
|
-
const
|
|
26
|
+
const a = N("APP_API"), T = t.startsWith("http") ? t : `${a}/utility/v2/files/${t.replace(/^\/+/, "")}`;
|
|
27
|
+
if (e || r) {
|
|
28
|
+
const M = new URLSearchParams();
|
|
29
|
+
return e && (M.set("width", e.toString()), M.set("height", r ? r == null ? void 0 : r.toString() : e.toString())), `${T}?${M.toString()}`;
|
|
30
|
+
}
|
|
31
|
+
return T;
|
|
32
|
+
}, _t = (t) => {
|
|
33
|
+
if (!t) return;
|
|
34
|
+
const e = N("APP_TAGSAMURAI_API");
|
|
27
35
|
return t.startsWith("http") ? t : `${e}/file-manager/v2/files/${t}`;
|
|
28
|
-
},
|
|
36
|
+
}, Et = async (t, e = "excel") => await fetch(
|
|
37
|
+
`${N("APP_ASSETS_URL")}/${e}/${t}`
|
|
38
|
+
), I = s({
|
|
29
39
|
prefix: "/settings-attribute/v2",
|
|
30
40
|
env: "APP_TAGSAMURAI_API"
|
|
31
|
-
}),
|
|
41
|
+
}), Ft = {
|
|
32
42
|
getGroupCategory: (t, e) => {
|
|
33
43
|
const r = t === "category" ? t : "groups";
|
|
34
|
-
return
|
|
44
|
+
return I.get(`/${r}/tree`, { params: e });
|
|
35
45
|
},
|
|
36
46
|
getGroupCategoryList: (t, e, r) => {
|
|
37
|
-
const
|
|
38
|
-
return
|
|
47
|
+
const a = t === "category" ? t : "groups";
|
|
48
|
+
return I.get(`/${a}/${e}`, { params: r });
|
|
49
|
+
},
|
|
50
|
+
getNames: (t) => {
|
|
51
|
+
const e = t === "category" ? t : "groups";
|
|
52
|
+
return I.get(`/${e}/names`);
|
|
53
|
+
},
|
|
54
|
+
getCodes: (t) => {
|
|
55
|
+
const e = t === "category" ? t : "groups";
|
|
56
|
+
return I.get(`/${e}/codes`);
|
|
57
|
+
},
|
|
58
|
+
postCreateGroupCategory: (t, e) => {
|
|
59
|
+
const r = t === "category" ? t : "groups";
|
|
60
|
+
return I.post(`/${r}`, e);
|
|
61
|
+
},
|
|
62
|
+
putEditGroupCategory: (t, e, r) => {
|
|
63
|
+
const a = t === "category" ? t : "groups";
|
|
64
|
+
return I.put(`/${a}/${r}`, e);
|
|
65
|
+
},
|
|
66
|
+
putMoveGroup: (t, e) => I.put(`/groups/${e}/move-group`, t),
|
|
67
|
+
putEditBulkGroups: async (t) => I.put("/groups/bulk", t),
|
|
68
|
+
deleteGroupCategory: (t, e, r) => {
|
|
69
|
+
const a = t === "category" ? t : "groups";
|
|
70
|
+
return I.delete(`/${a}/${r}`, { data: e });
|
|
71
|
+
}
|
|
72
|
+
}, b = s({
|
|
73
|
+
prefix: "/settings-attribute-go/v2"
|
|
74
|
+
}), Nt = {
|
|
75
|
+
getGroupCategory: (t, e) => {
|
|
76
|
+
const r = t === "category" ? t : "groups";
|
|
77
|
+
return b.get(`/${r}/tree`, { params: e });
|
|
78
|
+
},
|
|
79
|
+
getGroupCategoryList: (t, e) => {
|
|
80
|
+
const r = t === "category" ? t : "groups";
|
|
81
|
+
return b.get(`/${r}/${e}`);
|
|
39
82
|
},
|
|
40
83
|
getNames: (t) => {
|
|
41
84
|
const e = t === "category" ? t : "groups";
|
|
42
|
-
return
|
|
85
|
+
return b.get(`/${e}/names`);
|
|
86
|
+
},
|
|
87
|
+
getCodes: (t) => {
|
|
88
|
+
const e = t === "category" ? t : "groups";
|
|
89
|
+
return b.get(`/${e}/codes`);
|
|
43
90
|
},
|
|
44
91
|
postCreateGroupCategory: (t, e) => {
|
|
45
92
|
const r = t === "category" ? t : "groups";
|
|
46
|
-
return
|
|
93
|
+
return b.post(`/${r}`, e);
|
|
47
94
|
},
|
|
48
95
|
putEditGroupCategory: (t, e, r) => {
|
|
49
|
-
const
|
|
50
|
-
return
|
|
96
|
+
const a = t === "category" ? t : "groups";
|
|
97
|
+
return b.put(`/${a}/${r}`, e);
|
|
51
98
|
},
|
|
52
|
-
putMoveGroup: (t, e) => a.put(`/groups/${e}/move-group`, t),
|
|
53
|
-
putEditBulkGroups: async (t) => a.put("/groups/bulk", t),
|
|
54
99
|
deleteGroupCategory: (t, e, r) => {
|
|
55
|
-
const
|
|
56
|
-
return
|
|
100
|
+
const a = t === "category" ? t : "groups";
|
|
101
|
+
return b.delete(`/${a}/${r}`, { data: e });
|
|
57
102
|
}
|
|
58
|
-
},
|
|
103
|
+
}, It = s({
|
|
59
104
|
prefix: "/v2",
|
|
60
105
|
env: "APP_LOGS_NOTIFICATION_API"
|
|
61
|
-
}),
|
|
62
|
-
getTotalApprovals: () =>
|
|
63
|
-
},
|
|
106
|
+
}), Mt = {
|
|
107
|
+
getTotalApprovals: () => It.get("/approval/count")
|
|
108
|
+
}, U = s({
|
|
64
109
|
prefix: "/v2",
|
|
65
110
|
env: "APP_LOGS_NOTIFICATION_API"
|
|
66
|
-
}),
|
|
67
|
-
getActionLog: (t) =>
|
|
68
|
-
getActionLogOption: (t) =>
|
|
69
|
-
getSessionLogList: (t) =>
|
|
70
|
-
getUserDetailSystemLogList: (t) =>
|
|
71
|
-
getUserDetailSystemLogOption: (t) =>
|
|
72
|
-
|
|
111
|
+
}), Ht = {
|
|
112
|
+
getActionLog: (t) => U.get("/change-log", { params: t }),
|
|
113
|
+
getActionLogOption: (t) => U.get("/change-log/options", { params: t }),
|
|
114
|
+
getSessionLogList: (t) => U.get("/session-log", { params: t }),
|
|
115
|
+
getUserDetailSystemLogList: (t) => U.get("/change-log", { params: t }),
|
|
116
|
+
getUserDetailSystemLogOption: (t) => U.get("/change-log/options", { params: t }),
|
|
117
|
+
/**
|
|
118
|
+
* Retrieves the transaction log.
|
|
119
|
+
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
120
|
+
*/
|
|
121
|
+
getTransactionLog: (t) => U.get("/transaction-log", { params: t }),
|
|
122
|
+
/**
|
|
123
|
+
* Retrieves the transaction log options.
|
|
124
|
+
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
125
|
+
*/
|
|
126
|
+
getTransactionLogOption: (t) => U.get("/transaction-log/options", { params: t }),
|
|
127
|
+
postScanLog: (t) => U.post("/transaction-log/scan-log", t)
|
|
128
|
+
}, m = s({
|
|
129
|
+
prefix: "/utility/v2"
|
|
130
|
+
}), Vt = {
|
|
131
|
+
getActionLog: (t) => m.get("/change-log", { params: t }),
|
|
132
|
+
getActionLogOption: (t) => m.get("/change-log/options", { params: t }),
|
|
133
|
+
getSessionLogList: (t) => m.get("/session-log", { params: t }),
|
|
134
|
+
getTransactionLog: (t) => m.get("/transaction-log", { params: t }),
|
|
135
|
+
/**
|
|
136
|
+
* Retrieves the transaction log options.
|
|
137
|
+
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
138
|
+
*/
|
|
139
|
+
getTransactionLogOption: (t) => m.get("/transaction-log/options", { params: t }),
|
|
140
|
+
getUserDetailSystemLogList: (t) => m.get("/change-log", { params: t }),
|
|
141
|
+
getUserDetailSystemLogOption: (t) => m.get("/change-log/options", { params: t }),
|
|
142
|
+
getUserDetailUserLogBorrowingList: (t, e) => m.get(`/borrowing-log/${t}`, { params: e }),
|
|
143
|
+
getUserDetailUserLogAssignmentList: (t, e) => m.get(`/assignment-log/${t}`, { params: e }),
|
|
144
|
+
getUserDetailUserLogBorrowingOption: (t, e) => m.get(`/borrowing-log/${t}/options`, { params: e }),
|
|
145
|
+
getUserDetailUserLogAssignmentOption: (t, e) => m.get(`/assignment-log/${t}/options`, { params: e })
|
|
146
|
+
}, p = s({
|
|
73
147
|
prefix: "/assets/v2/assets"
|
|
74
|
-
}),
|
|
75
|
-
|
|
76
|
-
},
|
|
148
|
+
}), K = s({
|
|
149
|
+
prefix: "/assets/v2/attachment"
|
|
150
|
+
}), jt = {
|
|
151
|
+
getScanTag: (t) => p.get("/scan", { params: { tag: t } }),
|
|
152
|
+
getAllAssets: (t) => p.get("/", { params: t }),
|
|
153
|
+
getAllAssetsOptions: (t) => p.get("/options", { params: t }),
|
|
154
|
+
getAvailableAssets: (t) => p.get("/available", { params: t }),
|
|
155
|
+
getAvailableAssetOptions: (t) => p.get("/available/options", { params: t }),
|
|
156
|
+
scanAsset: (t) => p.get("", { params: { tag: t } }),
|
|
157
|
+
getAssetsById: (t, e) => p.get("/by-id", { params: { _id: t, ...e } }),
|
|
158
|
+
getOptions: (t, e) => p.get(t ? `/${t}/options` : "/options", {
|
|
159
|
+
params: e
|
|
160
|
+
}),
|
|
161
|
+
getUnlinkedAssets: (t) => p.get("/unlinked", { params: t }),
|
|
162
|
+
getAssetDetail: (t, e) => p.get(`/${t}`, { params: e }),
|
|
163
|
+
getAssetNameTotal: (t) => p.get(`/name-amount/${t}`),
|
|
164
|
+
getLinkedAssetFamily: (t) => p.get("/family", { params: { id: t } }),
|
|
165
|
+
matchAssetWithTag: (t, e) => {
|
|
166
|
+
const r = {
|
|
167
|
+
_id: JSON.stringify([t]),
|
|
168
|
+
tag: e
|
|
169
|
+
};
|
|
170
|
+
return p.get("/by-id", { params: r });
|
|
171
|
+
},
|
|
172
|
+
postRegisterAsset: (t) => {
|
|
173
|
+
const e = { "Content-Type": "multipart/form-data" };
|
|
174
|
+
return p.post("/bulk", t, { headers: e });
|
|
175
|
+
},
|
|
176
|
+
putEditAsset: (t, e) => {
|
|
177
|
+
const r = { "Content-Type": "multipart/form-data" };
|
|
178
|
+
return p.put(`/${t}`, e, { headers: r });
|
|
179
|
+
},
|
|
180
|
+
putEditDetailCustomField: (t, e) => {
|
|
181
|
+
const r = { "Content-Type": "multipart/form-data" };
|
|
182
|
+
return p.put(`/${t}`, e, { headers: r });
|
|
183
|
+
},
|
|
184
|
+
getLinkedAsset: (t, e) => p.get(`/${t}/linked`, { params: e }),
|
|
185
|
+
getPurchase: (t) => p.get(`/${t}/purchase`),
|
|
186
|
+
putPurchase: (t, e) => p.put(`/${e}/purchase`, t),
|
|
187
|
+
getAccounting: (t, e) => p.get(`/${t}/accounting`, { params: e }),
|
|
188
|
+
getAssetFamily: (t) => p.get(`/${t}/family`),
|
|
189
|
+
getLinkedAssetOption: (t, e) => p.get(`/${t}/linked/options`, { params: e }),
|
|
190
|
+
putLinkAsset: (t, e) => p.put(`/${e}/link-assets`, t),
|
|
191
|
+
putUnlinkAsset: (t, e) => p.put(`/${e}/remove-link-assets`, t),
|
|
192
|
+
// Asset Services prefixed by "attachment"
|
|
193
|
+
getAttachment: (t) => K.get("", { params: t }),
|
|
194
|
+
postAttachment: (t) => {
|
|
195
|
+
const e = { "Content-Type": "multipart/form-data" };
|
|
196
|
+
return K.post("", t, { headers: e });
|
|
197
|
+
},
|
|
198
|
+
putAttachment: (t, e) => {
|
|
199
|
+
const r = { "Content-Type": "multipart/form-data" };
|
|
200
|
+
return K.put(`/${e}`, t, { headers: r });
|
|
201
|
+
},
|
|
202
|
+
/**
|
|
203
|
+
* Deletes the attachment with the given IDs.
|
|
204
|
+
* @param {object} params - The request params containing the IDs of the attachments to delete.
|
|
205
|
+
* @returns {Promise<AxiosResponse>}
|
|
206
|
+
*/
|
|
207
|
+
deleteAttachment: (t) => K.delete("/bulk", { params: t })
|
|
208
|
+
}, g = s({
|
|
209
|
+
prefix: "/assets-go/v2/assets"
|
|
210
|
+
}), Qt = {
|
|
211
|
+
getAllAssets: (t) => g.get("/", { params: t }),
|
|
212
|
+
getAllAssetsOptions: (t) => g.get("/options", { params: t }),
|
|
213
|
+
getOptions: (t, e) => g.get(t ? `/${t}/options` : "/options", {
|
|
214
|
+
params: e
|
|
215
|
+
}),
|
|
216
|
+
getUnlinkedAssets: (t) => g.get("/unlinked", { params: t }),
|
|
217
|
+
getAssetDetail: (t, e) => g.get(`/${t}`, { params: e }),
|
|
218
|
+
getAssetNameTotal: () => g.get("/name-amount"),
|
|
219
|
+
postRegisterAsset: (t) => {
|
|
220
|
+
const e = { "Content-Type": "multipart/form-data" };
|
|
221
|
+
return g.post("", t, { headers: e });
|
|
222
|
+
},
|
|
223
|
+
putEditAsset: (t, e) => {
|
|
224
|
+
const r = { "Content-Type": "multipart/form-data" };
|
|
225
|
+
return g.put(`/${t}`, e, { headers: r });
|
|
226
|
+
},
|
|
227
|
+
putEditDetailCustomField: (t, e) => {
|
|
228
|
+
const r = { "Content-Type": "multipart/form-data" };
|
|
229
|
+
return g.put(`/${t}`, e, { headers: r });
|
|
230
|
+
},
|
|
231
|
+
getLinkedAsset: (t, e) => g.get(`/${t}/linked-assets`, { params: e }),
|
|
232
|
+
getPurchase: (t) => g.get(`/${t}/purchase`),
|
|
233
|
+
putPurchase: (t, e) => g.put(`/${e}/purchase`, t),
|
|
234
|
+
getAccounting: (t, e) => g.get(`/${t}/accounting`, { params: e }),
|
|
235
|
+
getLinkedAssetOption: (t, e) => g.get(`/${t}/linked-assets/options`, { params: e }),
|
|
236
|
+
putLinkAsset: (t, e) => g.put(`/${e}/linked-assets`, t),
|
|
237
|
+
putUnlinkAsset: (t, e) => g.put(`/${e}/unlink-assets`, t),
|
|
238
|
+
putEditUsefulLife: (t) => g.put("/useful-life", t),
|
|
239
|
+
getAttachment: (t, e) => g.get(`/attachment/${t}`, { params: e }),
|
|
240
|
+
postAttachment: (t, e) => {
|
|
241
|
+
const r = { "Content-Type": "multipart/form-data" };
|
|
242
|
+
return g.post(`/attachment/${e}`, t, { headers: r });
|
|
243
|
+
},
|
|
244
|
+
putAttachment: (t, e) => {
|
|
245
|
+
const r = { "Content-Type": "multipart/form-data" };
|
|
246
|
+
return g.put(`/attachment/${e}`, t, { headers: r });
|
|
247
|
+
},
|
|
248
|
+
/**
|
|
249
|
+
* Deletes the attachment with the given IDs.
|
|
250
|
+
* @param {object} params - The request params containing the IDs of the attachments to delete.
|
|
251
|
+
* @returns {Promise<AxiosResponse>}
|
|
252
|
+
*/
|
|
253
|
+
deleteAttachment: (t) => g.delete("/attachment/bulk", { params: t })
|
|
254
|
+
}, H = s({
|
|
77
255
|
prefix: "/tracking/v2/missing"
|
|
78
|
-
}),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
256
|
+
}), Yt = {
|
|
257
|
+
/**
|
|
258
|
+
* To mark as found.
|
|
259
|
+
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
260
|
+
*/
|
|
261
|
+
putMarkAsFound: (t) => H.put("/found", t),
|
|
262
|
+
putReportMissing: (t, e) => H.put(`/report-missing/${t}`, e),
|
|
263
|
+
getData: (t) => H.get("/", { params: t }),
|
|
264
|
+
getDetail: (t) => H.get(`/${t}`),
|
|
265
|
+
getOptions: (t) => H.get("/options", { params: t })
|
|
266
|
+
}, V = s({
|
|
267
|
+
prefix: "/missing-tracking/v2"
|
|
268
|
+
}), Jt = {
|
|
269
|
+
putFoundAsset: (t) => V.put("/found", t),
|
|
270
|
+
putReportMissing: (t, e) => V.put(`/${t}/report-missing`, e),
|
|
271
|
+
getData: (t) => V.get("/", { params: t }),
|
|
272
|
+
getDataOptions: (t) => V.get("/options", { params: t }),
|
|
273
|
+
getDetail: (t) => V.get(`/${t}`)
|
|
274
|
+
}, ct = s({
|
|
84
275
|
prefix: "/v2/notification",
|
|
85
276
|
env: "APP_LOGS_NOTIFICATION_API"
|
|
86
|
-
}),
|
|
87
|
-
getNotifications: (t) =>
|
|
88
|
-
readNotification: (t) =>
|
|
89
|
-
},
|
|
277
|
+
}), Wt = {
|
|
278
|
+
getNotifications: (t) => ct.get("/", { params: t }),
|
|
279
|
+
readNotification: (t) => ct.put(`/${t}`)
|
|
280
|
+
}, lt = s({
|
|
281
|
+
prefix: "/utility/v2/notification"
|
|
282
|
+
}), Kt = {
|
|
283
|
+
getNotifications: (t) => lt.get("/", { params: t }),
|
|
284
|
+
readNotification: (t) => lt.put(`/${t}`)
|
|
285
|
+
}, Rt = s({
|
|
90
286
|
prefix: "/v2/session-log",
|
|
91
287
|
env: "APP_LOGS_NOTIFICATION_API"
|
|
92
|
-
}),
|
|
93
|
-
postLogout: () =>
|
|
94
|
-
},
|
|
288
|
+
}), zt = {
|
|
289
|
+
postLogout: () => Rt.post("/logout")
|
|
290
|
+
}, i = s({
|
|
95
291
|
prefix: "/tag/v2"
|
|
96
|
-
}),
|
|
97
|
-
getScanQR: (t) =>
|
|
98
|
-
getScanRFID: (t) =>
|
|
99
|
-
getRFIDQRTAG: (t) =>
|
|
100
|
-
|
|
292
|
+
}), Zt = {
|
|
293
|
+
getScanQR: (t) => i.get("/qr", { params: { tag: t } }),
|
|
294
|
+
getScanRFID: (t) => i.get("/rfid", { params: { tag: t } }),
|
|
295
|
+
getRFIDQRTAG: (t) => i.get("/rfid-qr/scan", { params: t }),
|
|
296
|
+
getEventLog: (t) => i.get("/tag-transaction/event-log", { params: t }),
|
|
297
|
+
// Tab All
|
|
298
|
+
getRfidQrAll: (t, e) => i.get(`/${t}`, { params: e }),
|
|
299
|
+
// Tab Paired
|
|
300
|
+
getRfidQrPaired: (t, e, r) => i.get(`/${t}/paired/${e}`, { params: r }),
|
|
301
|
+
postAddTAGtoPrelist: (t, e) => i.post(`/prelist/${e}/asset-name`, t),
|
|
302
|
+
postAddTAGtoReplacePrelist: (t) => i.post("/prelist/replace-tag", t),
|
|
303
|
+
postAddTAGToPrelistUnpair: (t) => i.post("/prelist/unpair-tag", t),
|
|
304
|
+
postAddTAGtoPending: (t) => i.post("/pending-changes", t),
|
|
305
|
+
// Available Tab
|
|
306
|
+
getRFIDQrAvailable: (t, e) => i.get(`/${t}/available`, { params: e }),
|
|
307
|
+
// Damaged TAB
|
|
308
|
+
getRFIDQrDamaged: (t, e) => i.get(`/${t}/damaged`, { params: e }),
|
|
309
|
+
// RFID and QR Module
|
|
310
|
+
getRFIDandQRList: (t) => i.get("/rfid-qr", { params: t }),
|
|
311
|
+
deleteUnpairTAG: (t) => i.delete("/rfid-qr", { data: { data: t } }),
|
|
312
|
+
postPairTAG: (t) => i.post("/rfid-qr", { body: { data: t } }),
|
|
313
|
+
// RFID To Be Returned
|
|
314
|
+
getToBeReturnedTAGList: (t) => i.get("/rfid/to-be-returned", { params: t }),
|
|
315
|
+
// Handover TAG
|
|
316
|
+
putHandoverTAG: (t) => i.put("/rfid/handover", { body: { data: t } }),
|
|
317
|
+
// Table Filter
|
|
318
|
+
getFilterOptions: (t, e) => i.get(`/${t}/options`, { params: e }),
|
|
319
|
+
getHolderListOptions: (t) => i.get("/rfid/holder-list/options", { params: t }),
|
|
320
|
+
getHolderList: (t) => i.get("/rfid/holder-list", { params: t }),
|
|
321
|
+
putAuditTAG: (t, e) => i.put(`/${e}/audit`, t),
|
|
322
|
+
postLogAudit: (t) => i.post("/tag-transaction/log-audit", t),
|
|
323
|
+
postCreateQr: (t) => {
|
|
324
|
+
const e = { amount: t };
|
|
325
|
+
return i.post("/qr", e);
|
|
326
|
+
},
|
|
327
|
+
putReportTAG: (t, e) => i.put(`/tag-transaction/report/${t}`, e),
|
|
328
|
+
putReportTAGBulk: (t) => i.put("/tag-transaction/report/bulk", t),
|
|
329
|
+
putDeclineReport: (t, e) => i.put(`/report/decline-report/${e}`, t)
|
|
330
|
+
}, z = s({
|
|
101
331
|
prefix: "/tracking/v2/tracking"
|
|
102
|
-
}),
|
|
332
|
+
}), Xt = {
|
|
333
|
+
getTrackingDetail: (t) => z.get(`/${t}`),
|
|
103
334
|
putFoundAsset: (t, e, r) => {
|
|
104
|
-
const
|
|
335
|
+
const a = {
|
|
105
336
|
tag: t,
|
|
106
337
|
group: e,
|
|
107
338
|
serialNumber: r,
|
|
108
339
|
type: "Global"
|
|
109
340
|
};
|
|
110
|
-
return
|
|
111
|
-
}
|
|
112
|
-
}, s = n({
|
|
113
|
-
prefix: "/settings-user-role/v2"
|
|
114
|
-
}), w = {
|
|
115
|
-
reLogin: (t) => s.post("/auth/login", t),
|
|
116
|
-
changePassword: (t) => s.put("/users/change-password", t),
|
|
117
|
-
getUserDetail: (t) => s.get(`/users/${t}`),
|
|
118
|
-
putEditUser: (t, e) => {
|
|
119
|
-
const r = { "Content-Type": "multipart/form-data" };
|
|
120
|
-
return s.put(`/users/${t}`, e, { headers: r });
|
|
341
|
+
return z.put("/found", { params: a });
|
|
121
342
|
},
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
343
|
+
putReportPermanentlyMissing: (t, e) => z.put(`/report-permanently-missing/${t}`, e),
|
|
344
|
+
putMoveBack: (t) => z.put("/tracking/move-back", t)
|
|
345
|
+
}, u = s({
|
|
346
|
+
prefix: "/settings-user-role/v2"
|
|
347
|
+
}), te = {
|
|
348
|
+
reLogin: (t) => u.post("/auth/login", t),
|
|
349
|
+
changePassword: (t) => u.put("/users/change-password", t),
|
|
350
|
+
/**
|
|
351
|
+
* Retrieves the user list as dropdown options.
|
|
352
|
+
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
353
|
+
*/
|
|
354
|
+
getUserDropdown: (t) => u.get("/users/dropdown", { params: t }),
|
|
355
|
+
getUserOptions: (t) => u.get("/users/options", { params: t }),
|
|
356
|
+
getUserList: (t) => u.get("/users", { params: t }),
|
|
357
|
+
getUserDetail: (t) => u.get(`/users/${t}`),
|
|
358
|
+
putSetActiveBulk: (t) => u.put("/users/set-active-bulk", t),
|
|
359
|
+
// User Detail
|
|
127
360
|
/**
|
|
128
361
|
*
|
|
129
362
|
* @param id {string} User's _id
|
|
130
363
|
* @param type {"Global" | "Group"} Whether the system role's type is global or group
|
|
131
364
|
* @param params {Record<string, unknown>}
|
|
132
365
|
*/
|
|
133
|
-
getUserDetailSystemRoles: (t, e, r) =>
|
|
366
|
+
getUserDetailSystemRoles: (t, e, r) => {
|
|
367
|
+
const a = r ? `/${r}` : "";
|
|
368
|
+
return u.get(`/user-detail/${t}/system-roles${a}`, {
|
|
369
|
+
params: e
|
|
370
|
+
});
|
|
371
|
+
},
|
|
372
|
+
getUserDetailTransactionRoleList: (t, e) => u.get(`/user-detail/${t}/transaction-role-list`, { params: e }),
|
|
373
|
+
postUserDetailAddTransactionRole: (t, e) => u.post(`/user-detail/${t}/add-transaction-role`, e),
|
|
374
|
+
deleteUserDetailTransactionRole: (t, e) => u.delete(`/user-detail/${t}/delete-transaction-role`, {
|
|
375
|
+
data: e
|
|
376
|
+
}),
|
|
377
|
+
putUserDetailEditTransactionRole: (t, e) => u.put(`/user-detail/${t}/edit-transaction-role`, e),
|
|
378
|
+
putAssignGroup: (t, e, r) => u.put(`/user-detail/${r}/system-roles/${e}`, t),
|
|
379
|
+
getUserDetailUserLogBorrowingList: (t, e) => u.get(`/users-log/${t}/borrowing`, { params: e }),
|
|
380
|
+
getUserDetailUserLogAssignmentList: (t, e) => u.get(`/users-log/${t}/assignment`, { params: e }),
|
|
381
|
+
getUserDetailUserLogBorrowingOption: (t, e) => u.get(`/users-log/${t}/borrowing/option`, { params: e }),
|
|
382
|
+
getUserDetailUserLogAssignmentOption: (t, e) => u.get(`/users-log/${t}/assignment/option`, { params: e }),
|
|
383
|
+
getUserDetailTransactionAdminLogList: (t, e) => u.get(`/users-log/${t}/transaction-log`, { params: e }),
|
|
384
|
+
getUserDetailTransactionAdminLogOption: (t, e) => u.get(`/users-log/${t}/transaction-log/option`, { params: e }),
|
|
385
|
+
getUserDetailUserAssetBorrowedList: (t, e) => u.get(`/user-detail/${t}/assets/borrowed`, { params: e }),
|
|
386
|
+
getUserDetailUserAssetAssignedList: (t, e) => u.get(`/user-detail/${t}/assets/assigned`, { params: e }),
|
|
387
|
+
getUserDetailUserAssetBorrowedOption: (t, e) => u.get(`/user-detail/${t}/assets/borrowed/option`, { params: e }),
|
|
388
|
+
getUserDetailUserAssetAssignedOption: (t, e) => u.get(`/user-detail/${t}/assets/assigned/option`, { params: e }),
|
|
389
|
+
getUserAndSubUser: (t) => u.get("/users/user-and-sub-user", { params: t }),
|
|
390
|
+
getUserAndSubUserOptions: () => u.get("/users/user-and-sub-user/options", {
|
|
134
391
|
params: {
|
|
135
|
-
|
|
136
|
-
|
|
392
|
+
divisionOptions: "true",
|
|
393
|
+
positionOptions: "true"
|
|
137
394
|
}
|
|
138
|
-
})
|
|
395
|
+
})
|
|
396
|
+
}, l = s({
|
|
397
|
+
prefix: "/settings-user-role-go/v2"
|
|
398
|
+
}), ee = {
|
|
399
|
+
/**
|
|
400
|
+
* Retrieves the user list as dropdown options.
|
|
401
|
+
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
402
|
+
*/
|
|
403
|
+
getUserDropdown: (t) => l.get("/users/dropdown", { params: t }),
|
|
404
|
+
getUserOptions: (t) => l.get("/users/options", { params: t }),
|
|
405
|
+
getUserList: (t) => l.get("/users", { params: t }),
|
|
406
|
+
getUserDetail: (t) => l.get(`/users/${t}`),
|
|
407
|
+
putSetActiveBulk: (t) => l.put("/users/set-active-bulk", t),
|
|
139
408
|
// User Detail
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
409
|
+
/**
|
|
410
|
+
*
|
|
411
|
+
* @param id {string} User's _id
|
|
412
|
+
* @param type {"Global" | "Group"} Whether the system role's type is global or group
|
|
413
|
+
* @param params {Record<string, unknown>}
|
|
414
|
+
*/
|
|
415
|
+
getUserDetailSystemRoles: (t, e, r) => {
|
|
416
|
+
const a = r ? `/${r}/groups` : "";
|
|
417
|
+
return l.get(`/users/${t}/system-roles${a}`, {
|
|
418
|
+
params: e
|
|
419
|
+
});
|
|
420
|
+
},
|
|
421
|
+
getUserDetailTransactionRoleList: (t, e) => l.get(`/users/${t}/transaction-roles`, { params: e }),
|
|
422
|
+
postUserDetailAddTransactionRole: (t, e) => l.post(`/users/${t}/add-transaction-role`, e),
|
|
423
|
+
deleteUserDetailTransactionRole: (t, e) => l.put(`/users/${t}/delete-transaction-role`, e),
|
|
424
|
+
putUserDetailEditTransactionRole: (t, e) => l.put(`/users/${t}/edit-transaction-role`, e),
|
|
425
|
+
putAssignGroup: (t, e, r) => l.put(`/users/${r}/system-roles/${e}/groups`, t),
|
|
426
|
+
putRoleSetActive: (t, e) => l.put(`/users/${e}/system-roles/set-active-bulk`, t),
|
|
427
|
+
getUserDetailTransactionAdminLogList: (t, e) => l.get(`/users/${t}/transaction-log`, { params: e }),
|
|
428
|
+
getUserDetailTransactionAdminLogOption: (t, e) => l.get(`/users/${t}/transaction-log/option`, { params: e }),
|
|
429
|
+
getUserDetailUserAssetBorrowedList: (t, e) => l.get(`/users/${t}/borrowed-asset`, { params: e }),
|
|
430
|
+
getUserDetailUserAssetAssignedList: (t, e) => l.get(`/users/${t}/assigned-asset`, { params: e }),
|
|
431
|
+
getUserDetailUserAssetBorrowedOption: (t, e) => l.get(`/users/${t}/borrowed-asset/option`, { params: e }),
|
|
432
|
+
getUserDetailUserAssetAssignedOption: (t, e) => l.get(`/users/${t}/assigned-asset/option`, { params: e })
|
|
433
|
+
}, C = s({
|
|
434
|
+
prefix: "/settings-user-role/v2/sub-users"
|
|
435
|
+
}), re = {
|
|
436
|
+
// Sub User
|
|
437
|
+
getSubUserList: (t, e) => C.get(`/${t}`, { params: e }),
|
|
438
|
+
getSubUserOptions: (t, e) => C.get(`/${t}/option`, { params: e }),
|
|
439
|
+
postCreateSubUser: (t, e) => {
|
|
440
|
+
const r = { "Content-Type": "multipart/form-data" };
|
|
441
|
+
return C.post(`/${t}`, e, { headers: r });
|
|
442
|
+
},
|
|
443
|
+
putSubUserSetActiveBulk: (t) => C.put("/set-active-bulk", t),
|
|
444
|
+
deleteSubUser: (t) => C.delete("/bulk", { data: { subUserIds: t } }),
|
|
445
|
+
putEditSubUser: (t, e) => {
|
|
446
|
+
const r = { "Content-Type": "multipart/form-data" };
|
|
447
|
+
return C.put(`/${t}`, e, { headers: r });
|
|
448
|
+
},
|
|
449
|
+
getBorrowedAsset: (t, e) => C.get(`/${t}/borrowed-asset`, { params: e }),
|
|
450
|
+
getBorrowedAssetOptions: (t, e) => C.get(`/${t}/borrowed-asset/options`, { params: e })
|
|
451
|
+
}, S = s({
|
|
452
|
+
prefix: "/settings-user-role-go/v2/users"
|
|
453
|
+
}), se = {
|
|
454
|
+
// Sub User
|
|
455
|
+
getSubUserList: (t, e) => S.get(`/${t}/sub-users`, { params: e }),
|
|
456
|
+
getSubUserOptions: (t, e) => S.get(`/${t}/sub-users/option`, { params: e }),
|
|
457
|
+
postCreateSubUser: (t, e) => {
|
|
458
|
+
const r = { "Content-Type": "multipart/form-data" };
|
|
459
|
+
return S.post(`/${t}/sub-users`, e, { headers: r });
|
|
460
|
+
},
|
|
461
|
+
putSubUserSetActiveBulk: (t, e) => S.put(`/${t}/sub-users/set-active-bulk`, e),
|
|
462
|
+
deleteSubUser: (t, e) => S.put(`/${t}/sub-users/bulk`, { subUserIds: e }),
|
|
463
|
+
putEditSubUser: (t, e, r) => {
|
|
464
|
+
const a = { "Content-Type": "multipart/form-data" };
|
|
465
|
+
return S.put(`/${t}/sub-users/${e}`, r, {
|
|
466
|
+
headers: a
|
|
467
|
+
});
|
|
468
|
+
},
|
|
469
|
+
getBorrowedAsset: (t, e, r) => S.get(`/${t}/sub-users/${e}/borrowed-asset`, {
|
|
470
|
+
params: r
|
|
471
|
+
}),
|
|
472
|
+
getBorrowedAssetOptions: (t, e, r) => S.get(`/${t}/sub-users/${e}/borrowed-asset/options`, {
|
|
473
|
+
params: r
|
|
474
|
+
}),
|
|
475
|
+
getAssignedAsset: (t, e, r) => S.get(`/${t}/sub-users/${e}/assigned-asset`, {
|
|
476
|
+
params: r
|
|
477
|
+
}),
|
|
478
|
+
getAssignedAssetOptions: (t, e, r) => S.get(`/${t}/sub-users/${e}/assigned-asset/options`, {
|
|
479
|
+
params: r
|
|
480
|
+
})
|
|
481
|
+
}, Z = s({
|
|
150
482
|
env: "APP_ADMIN_API",
|
|
151
483
|
prefix: "/settings-attribute/languages"
|
|
152
|
-
}),
|
|
484
|
+
}), ne = {
|
|
153
485
|
/**
|
|
154
486
|
* Fetch all translation messages for a specific locale.
|
|
155
487
|
* @param locale The locale code (e.g., 'en', 'id').
|
|
156
488
|
* @returns A promise resolving to a key-value record of messages.
|
|
157
489
|
*/
|
|
158
|
-
getMessages: (t) =>
|
|
490
|
+
getMessages: (t) => Z.get(`/${t}/translations`),
|
|
159
491
|
/**
|
|
160
492
|
* Fetch all available lang options for LanguageDropdown and LanguageSwitcher
|
|
161
493
|
*
|
|
162
494
|
* @returns Promise Array of options
|
|
163
495
|
*/
|
|
164
496
|
getLanguageOptions: async () => {
|
|
165
|
-
const { data: t } = await
|
|
166
|
-
"/dropdown"
|
|
167
|
-
);
|
|
497
|
+
const { data: t } = await Z.get("/dropdown");
|
|
168
498
|
return t.data;
|
|
169
499
|
},
|
|
170
500
|
/**
|
|
@@ -174,7 +504,7 @@ const v = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
174
504
|
* @returns Promise LanguageMeta
|
|
175
505
|
*/
|
|
176
506
|
getLanguageOptionMeta: async (t) => {
|
|
177
|
-
const { data: e } = await
|
|
507
|
+
const { data: e } = await Z.get(
|
|
178
508
|
"/dropdown/" + t
|
|
179
509
|
);
|
|
180
510
|
return e.data;
|
|
@@ -186,32 +516,956 @@ const v = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
|
|
|
186
516
|
* @param locale Target locale code.
|
|
187
517
|
*/
|
|
188
518
|
translateText: async (t, e) => {
|
|
189
|
-
const { data: r } = await
|
|
519
|
+
const { data: r } = await Z.post("/translate", {
|
|
190
520
|
q: t,
|
|
191
521
|
target: e
|
|
192
522
|
});
|
|
193
523
|
return r.data.translations[t];
|
|
194
524
|
}
|
|
195
|
-
},
|
|
525
|
+
}, dt = s({
|
|
196
526
|
prefix: "/dashboard/v2/dashboard"
|
|
197
|
-
}),
|
|
198
|
-
getLatestTask: (t) =>
|
|
199
|
-
getSummary: (t) =>
|
|
527
|
+
}), oe = {
|
|
528
|
+
getLatestTask: (t) => dt.get("/latest-task", { params: t }),
|
|
529
|
+
getSummary: (t) => dt.get("/summary", { params: t })
|
|
530
|
+
}, st = s({
|
|
531
|
+
prefix: "/alias-code/api/alias-code"
|
|
532
|
+
}), ae = {
|
|
533
|
+
getAliasCode: () => st.get("/"),
|
|
534
|
+
postAliasCode: (t) => st.post("/", t),
|
|
535
|
+
getAliasCodeList: (t) => st.get(`/${t.object}/code-list`, { params: t })
|
|
536
|
+
}, nt = s({
|
|
537
|
+
prefix: "/settings-attribute-go/v2/alias-code"
|
|
538
|
+
}), ie = {
|
|
539
|
+
getAliasCode: () => nt.get("/"),
|
|
540
|
+
postAliasCode: (t) => nt.post("/", t),
|
|
541
|
+
getAliasCodeList: (t) => nt.get(`/${t.object}/code-list`, { params: t })
|
|
542
|
+
}, At = s({
|
|
543
|
+
prefix: "/settings-attribute/v2/general-settings"
|
|
544
|
+
}), ue = {
|
|
545
|
+
getGeneralSettings: () => At.get("/"),
|
|
546
|
+
putUpdateGeneralSettings: (t) => At.put("/", t)
|
|
547
|
+
}, $t = s({
|
|
548
|
+
prefix: "/settings-attribute-go/v2/general-settings"
|
|
549
|
+
}), pe = {
|
|
550
|
+
getGeneralSettings: () => $t.get("/"),
|
|
551
|
+
putUpdateGeneralSettings: (t) => $t.put("/", t)
|
|
552
|
+
}, D = s({
|
|
553
|
+
prefix: "/settings-attribute/v2/custom-field"
|
|
554
|
+
}), ge = {
|
|
555
|
+
getCustomField: async (t) => D.get("/", { params: t }),
|
|
556
|
+
getCustomFieldsByCategory: (t, e) => D.get(`/${t}`, { params: e }),
|
|
557
|
+
getOptions: async (t) => D.get("/options", { params: t }),
|
|
558
|
+
postCreateCustomField: async (t, e) => D.post("/", e, { params: t }),
|
|
559
|
+
putEditCustomField: async (t, e, r) => D.put(`/${r}`, e, { params: t }),
|
|
560
|
+
putChangeStatus: async (t, e) => D.put("/bulk", e, { params: t }),
|
|
561
|
+
deleteCustomField: async (t) => D.delete("/bulk", { data: t }),
|
|
562
|
+
getUsedCustomFields: async () => D.get("/used-by-assets")
|
|
563
|
+
}, h = s({
|
|
564
|
+
prefix: "/settings-attribute-go/v2/custom-field"
|
|
565
|
+
}), ce = {
|
|
566
|
+
getCustomField: async (t) => h.get("/", { params: t }),
|
|
567
|
+
getOptions: async (t) => h.get("/options", { params: t }),
|
|
568
|
+
postCreateCustomField: async (t, e) => h.post("/", e, { params: t }),
|
|
569
|
+
putEditCustomField: async (t, e, r) => h.put(`/${r}`, e, { params: t }),
|
|
570
|
+
putChangeStatus: async (t, e) => h.put("/bulk", e, { params: t }),
|
|
571
|
+
deleteCustomField: async (t) => h.delete("/bulk", { params: t }),
|
|
572
|
+
getUsedCustomFields: async () => h.get("/used-by-assets")
|
|
573
|
+
}, ot = ({ headers: t = {}, params: e = {} } = {}) => {
|
|
574
|
+
const r = N("APP_COUNTRY_STATE_API"), a = N("APP_COUNTRY_STATE_API_KEY");
|
|
575
|
+
return St.create({
|
|
576
|
+
baseURL: `${r}/v1`,
|
|
577
|
+
headers: {
|
|
578
|
+
"Content-type": "application/json",
|
|
579
|
+
"X-CSCAPI-KEY": a,
|
|
580
|
+
...t
|
|
581
|
+
},
|
|
582
|
+
params: e
|
|
583
|
+
});
|
|
584
|
+
}, le = {
|
|
585
|
+
getCountry: () => ot().get("/countries"),
|
|
586
|
+
getState: (t) => ot().get(`/countries/${t}/states`),
|
|
587
|
+
getCity: (t, e) => ot().get(`/countries/${t}/states/${e}/cities`)
|
|
588
|
+
}, y = s({
|
|
589
|
+
prefix: "/routine/v2"
|
|
590
|
+
}), de = {
|
|
591
|
+
getList: (t) => y.get("/service-center", { params: t }),
|
|
592
|
+
postList: (t) => y.post("/service-center", t),
|
|
593
|
+
putList: (t, e) => y.put(`/service-center/${t}`, e),
|
|
594
|
+
putActivate: (t) => y.put("/service-center/bulk", t),
|
|
595
|
+
getDetailList: (t) => y.get(`/service-center/${t}`),
|
|
596
|
+
getListOptions: (t) => y.get("/service-center/options", { params: t }),
|
|
597
|
+
deleteList: (t) => y.delete("/service-center", { params: t }),
|
|
598
|
+
// Activities
|
|
599
|
+
getActivities: (t) => y.get("/service-activities", { params: t }),
|
|
600
|
+
getActivityOptions: (t) => y.get("/service-activities/options", { params: t }),
|
|
601
|
+
getActivityDetail: (t) => y.get(`/service-activities/${t}`),
|
|
602
|
+
getActivityLog: (t) => y.get(`/service-activities/${t}/activity-log`)
|
|
603
|
+
}, Ut = s({
|
|
604
|
+
prefix: "/settings-attribute/v2/brands"
|
|
605
|
+
}), Ae = {
|
|
606
|
+
getDropdown: (t) => Ut.get("/dropdown", { params: t })
|
|
607
|
+
}, k = s({
|
|
608
|
+
prefix: "/file-manager/v2"
|
|
609
|
+
}), $e = {
|
|
610
|
+
/**
|
|
611
|
+
* Get storage information.
|
|
612
|
+
*
|
|
613
|
+
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
614
|
+
*/
|
|
615
|
+
getStorageInformation: () => k.get("/files/storage"),
|
|
616
|
+
/**
|
|
617
|
+
* Get file manager data.
|
|
618
|
+
*
|
|
619
|
+
* @param {FileType} type - The type of the file.
|
|
620
|
+
* @param {FileManagerFilterParams} [params] - The parameters for filtering.
|
|
621
|
+
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
622
|
+
*/
|
|
623
|
+
getFileManager: (t, e) => k.get(`/${t}`, { params: e }),
|
|
624
|
+
/**
|
|
625
|
+
* Get file manager options.
|
|
626
|
+
*
|
|
627
|
+
* @param {FileType} type - The type of the file.
|
|
628
|
+
* @param {FileManagerOptionBoolean} [params] - The parameters for options.
|
|
629
|
+
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
630
|
+
*/
|
|
631
|
+
getFileManagerOption: (t, e) => k.get(`/${t}/options`, { params: e }),
|
|
632
|
+
/**
|
|
633
|
+
* Recover files.
|
|
634
|
+
*
|
|
635
|
+
* @param {FileType} type - The type of the file.
|
|
636
|
+
* @param {object} body - The body of the request.
|
|
637
|
+
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
638
|
+
*/
|
|
639
|
+
recoverFiles: (t, e) => k.put(`/${t}/recover`, e),
|
|
640
|
+
/**
|
|
641
|
+
* Delete files.
|
|
642
|
+
*
|
|
643
|
+
* @param {FileType} type - The type of the file.
|
|
644
|
+
* @param {DeleteFileManagerDto} params - The params of the request.
|
|
645
|
+
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
646
|
+
*/
|
|
647
|
+
deleteFiles: (t, e) => k.delete(`/${t}`, { params: e }),
|
|
648
|
+
/**
|
|
649
|
+
* Delete files permanently.
|
|
650
|
+
*
|
|
651
|
+
* @param {FileType} type - The type of the file.
|
|
652
|
+
* @param {object} body - The body of the request.
|
|
653
|
+
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
654
|
+
*/
|
|
655
|
+
deletePermanently: (t, e) => k.delete(`/${t}/delete-permanent`, { params: e })
|
|
656
|
+
}, _ = s({
|
|
657
|
+
prefix: "/utility/v2"
|
|
658
|
+
}), ve = {
|
|
659
|
+
/**
|
|
660
|
+
* Get storage information.
|
|
661
|
+
*
|
|
662
|
+
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
663
|
+
*/
|
|
664
|
+
getStorageInformation: () => _.get("/files/storage"),
|
|
665
|
+
/**
|
|
666
|
+
* Get file manager data.
|
|
667
|
+
*
|
|
668
|
+
* @param {FileType} type - The type of the file.
|
|
669
|
+
* @param {FileManagerFilterParams} [params] - The parameters for filtering.
|
|
670
|
+
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
671
|
+
*/
|
|
672
|
+
getFileManager: (t, e) => _.get(`/${t}`, { params: e }),
|
|
673
|
+
/**
|
|
674
|
+
* Get file manager options.
|
|
675
|
+
*
|
|
676
|
+
* @param {FileType} type - The type of the file.
|
|
677
|
+
* @param {FileManagerOptionBoolean} [params] - The parameters for options.
|
|
678
|
+
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
679
|
+
*/
|
|
680
|
+
getFileManagerOption: (t, e) => _.get(`/${t}/options`, { params: e }),
|
|
681
|
+
/**
|
|
682
|
+
* Recover files.
|
|
683
|
+
*
|
|
684
|
+
* @param {FileType} type - The type of the file.
|
|
685
|
+
* @param {object} body - The body of the request.
|
|
686
|
+
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
687
|
+
*/
|
|
688
|
+
recoverFiles: (t, e) => _.put(`/${t}/recover`, e),
|
|
689
|
+
/**
|
|
690
|
+
* Delete files.
|
|
691
|
+
*
|
|
692
|
+
* @param {FileType} type - The type of the file.
|
|
693
|
+
* @param {DeleteFileManagerDto} params - The params of the request.
|
|
694
|
+
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
695
|
+
*/
|
|
696
|
+
deleteFiles: (t, e) => _.delete(`/${t}`, { params: e }),
|
|
697
|
+
/**
|
|
698
|
+
* Delete files permanently.
|
|
699
|
+
*
|
|
700
|
+
* @param {FileType} type - The type of the file.
|
|
701
|
+
* @param {object} body - The body of the request.
|
|
702
|
+
* @returns {Promise<AxiosResponse>} The Axios Response.
|
|
703
|
+
*/
|
|
704
|
+
deletePermanently: (t, e) => _.delete(`/${t}/delete-permanent`, { params: e })
|
|
705
|
+
}, O = s({
|
|
706
|
+
prefix: "/iot/v2/reader"
|
|
707
|
+
}), me = {
|
|
708
|
+
getData: (t) => O.get("/", { params: t }),
|
|
709
|
+
getDataOptions: (t) => O.get("/options", { params: t }),
|
|
710
|
+
getActivityLogData: (t) => O.get("/activity-log", { params: t }),
|
|
711
|
+
getActivityLogOptions: (t) => O.get("/activity-log/options", { params: t }),
|
|
712
|
+
getDataById: (t) => O.get(`/${t}`),
|
|
713
|
+
getChangeLog: (t) => O.get(`/${t.id}/change-log`, { params: t }),
|
|
714
|
+
getChangeLogOptions: (t) => O.get(`/${t.id}/change-log/options`, { params: t }),
|
|
715
|
+
putData: (t, e) => O.put(`/${t}`, e)
|
|
716
|
+
}, d = s({
|
|
717
|
+
prefix: "/settings-user-role/v2"
|
|
718
|
+
}), ye = {
|
|
719
|
+
/**
|
|
720
|
+
* Retrieves the transaction role for the given group and transaction name.
|
|
721
|
+
* @param {string} groupId - The ID of the group to retrieve the transaction role for.
|
|
722
|
+
* @param {string} transactionName - The name of the transaction to retrieve the role for.
|
|
723
|
+
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
724
|
+
*/
|
|
725
|
+
getTransactionRole: (t, e) => d.get(`/transaction-roles/${t}/${e}`),
|
|
726
|
+
/**
|
|
727
|
+
* Updates the users assigned to the given transaction role.
|
|
728
|
+
* @param {string} groupId - The ID of the group the transaction role belongs to.
|
|
729
|
+
* @param {string} transactionName - The name of the transaction to update.
|
|
730
|
+
* @param {UpdateUser} body - The request body containing the updated user information.
|
|
731
|
+
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
732
|
+
*/
|
|
733
|
+
putUpdateUsers: (t, e, r) => d.put(
|
|
734
|
+
`/transaction-roles/${t}/${e}/update-user`,
|
|
735
|
+
r
|
|
736
|
+
),
|
|
737
|
+
/**
|
|
738
|
+
* Updates the approval level for the given transaction role.
|
|
739
|
+
* @param {string} groupId - The ID of the group the transaction role belongs to.
|
|
740
|
+
* @param {string} transactionName - The name of the transaction to update.
|
|
741
|
+
* @param {UserApprovalLevel} body - The request body containing the updated approval level.
|
|
742
|
+
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
743
|
+
*/
|
|
744
|
+
putUpdateLevel: (t, e, r) => d.put(
|
|
745
|
+
`/transaction-roles/${t}/${e}/update-approval-level`,
|
|
746
|
+
r
|
|
747
|
+
),
|
|
748
|
+
/**
|
|
749
|
+
* Updates the group management settings for the given transaction role.
|
|
750
|
+
* @param {string} groupId - The ID of the group the transaction role belongs to.
|
|
751
|
+
* @param {string} transactionName - The name of the transaction to update.
|
|
752
|
+
* @param {GroupManageByParent} body - The request body containing the updated management settings.
|
|
753
|
+
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
754
|
+
*/
|
|
755
|
+
putUpdateGroupManage: (t, e, r) => d.put(
|
|
756
|
+
`/transaction-roles/${t}/${e}/update-manage-by-parent`,
|
|
757
|
+
r
|
|
758
|
+
),
|
|
759
|
+
getUserAssignedSystemRole: (t) => d.get(`/system-roles/user/${t}`),
|
|
760
|
+
getAssignedUserAmounts: () => d.get("/system-roles/amounts"),
|
|
761
|
+
getPermissionUser: (t, e) => {
|
|
762
|
+
if (["totalControl", "readOnly"].includes(t ?? "")) {
|
|
763
|
+
const r = t === "totalControl" ? "total-control" : "read-only";
|
|
764
|
+
return d.get(`/system-roles/total-control-read-only/${r}`, {
|
|
765
|
+
params: e
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
return d.get(`/system-roles/permission/${t}`, { params: e });
|
|
769
|
+
},
|
|
770
|
+
getPermissionUserOptions: (t, e) => {
|
|
771
|
+
if (["totalControl", "readOnly"].includes(t ?? "")) {
|
|
772
|
+
const r = t === "totalControl" ? "total-control" : "read-only";
|
|
773
|
+
return d.get(`/system-roles/total-control-read-only/${r}/options`, {
|
|
774
|
+
params: e
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
return d.get(`/system-roles/permission/${t}/options`, {
|
|
778
|
+
params: e
|
|
779
|
+
});
|
|
780
|
+
},
|
|
781
|
+
getUserGroups: (t, e) => d.get(`/system-roles/permission/${e}/groups`, {
|
|
782
|
+
params: t
|
|
783
|
+
}),
|
|
784
|
+
postAssignUser: (t, e) => {
|
|
785
|
+
if (["totalControl", "readOnly"].includes(e ?? "")) {
|
|
786
|
+
const r = e === "totalControl" ? "total-control" : "read-only";
|
|
787
|
+
return d.post(`/system-roles/total-control-read-only/${r}`, t);
|
|
788
|
+
}
|
|
789
|
+
return d.post(`/system-roles/permission/${e}`, t);
|
|
790
|
+
},
|
|
791
|
+
putEditUser: (t, e) => d.put(`/system-roles/${e}`, t),
|
|
792
|
+
putRoleSetActive: (t) => d.put("/system-roles/set-active", t),
|
|
793
|
+
deleteRemoveUser: (t, e) => {
|
|
794
|
+
if (["totalControl", "readOnly"].includes(e ?? "")) {
|
|
795
|
+
const r = e === "totalControl" ? "total-control" : "read-only";
|
|
796
|
+
return d.delete(`/system-roles/total-control-read-only/${r}`, {
|
|
797
|
+
data: t
|
|
798
|
+
});
|
|
799
|
+
}
|
|
800
|
+
return d.delete("/system-roles", { data: t });
|
|
801
|
+
}
|
|
802
|
+
}, A = s({
|
|
803
|
+
prefix: "/settings-user-role-go/v2"
|
|
804
|
+
}), Se = {
|
|
805
|
+
/**
|
|
806
|
+
* Retrieves the transaction role for the given group and transaction name.
|
|
807
|
+
* @param {string} groupId - The ID of the group to retrieve the transaction role for.
|
|
808
|
+
* @param {string} transactionName - The name of the transaction to retrieve the role for.
|
|
809
|
+
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
810
|
+
*/
|
|
811
|
+
getTransactionRole: (t, e) => A.get(`/transaction-roles/${t}/${e}`),
|
|
812
|
+
getTransactionRoleTypes: (t, e) => A.get(`/transaction-roles/${e}/types`, {
|
|
813
|
+
params: { groupKeys: t }
|
|
814
|
+
}),
|
|
815
|
+
/**
|
|
816
|
+
* Updates the users assigned to the given transaction role.
|
|
817
|
+
* @param {string} groupId - The ID of the group the transaction role belongs to.
|
|
818
|
+
* @param {string} transactionName - The name of the transaction to update.
|
|
819
|
+
* @param {UpdateUser} body - The request body containing the updated user information.
|
|
820
|
+
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
821
|
+
*/
|
|
822
|
+
putUpdateUsers: (t, e, r) => A.put(
|
|
823
|
+
`/transaction-roles/${t}/${e}/update-user`,
|
|
824
|
+
r
|
|
825
|
+
),
|
|
826
|
+
/**
|
|
827
|
+
* Updates the approval level for the given transaction role.
|
|
828
|
+
* @param {string} groupId - The ID of the group the transaction role belongs to.
|
|
829
|
+
* @param {string} transactionName - The name of the transaction to update.
|
|
830
|
+
* @param {UserApprovalLevel} body - The request body containing the updated approval level.
|
|
831
|
+
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
832
|
+
*/
|
|
833
|
+
putUpdateLevel: (t, e, r) => A.put(
|
|
834
|
+
`/transaction-roles/${t}/${e}/update-approval-level`,
|
|
835
|
+
r
|
|
836
|
+
),
|
|
837
|
+
/**
|
|
838
|
+
* Updates the group management settings for the given transaction role.
|
|
839
|
+
* @param {string} groupId - The ID of the group the transaction role belongs to.
|
|
840
|
+
* @param {string} transactionName - The name of the transaction to update.
|
|
841
|
+
* @param {GroupManageByParent} body - The request body containing the updated management settings.
|
|
842
|
+
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
843
|
+
*/
|
|
844
|
+
putUpdateGroupManage: (t, e, r) => A.put(
|
|
845
|
+
`/transaction-roles/${t}/${e}/update-manage-by-parent`,
|
|
846
|
+
r
|
|
847
|
+
),
|
|
848
|
+
getUserAssignedSystemRole: (t) => A.get(`/system-roles/user/${t}`),
|
|
849
|
+
getAssignedUserAmounts: () => A.get("/system-roles/amounts"),
|
|
850
|
+
getPermissionUser: (t, e) => {
|
|
851
|
+
if (["totalControl", "readOnly"].includes(t ?? "")) {
|
|
852
|
+
const r = t === "totalControl" ? "total-control" : "read-only";
|
|
853
|
+
return A.get(`/system-roles/total-control-read-only/${r}`, {
|
|
854
|
+
params: e
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
return A.get(`/system-roles/permission/${t}`, { params: e });
|
|
858
|
+
},
|
|
859
|
+
getPermissionUserOptions: (t, e) => {
|
|
860
|
+
if (["totalControl", "readOnly"].includes(t ?? "")) {
|
|
861
|
+
const r = t === "totalControl" ? "total-control" : "read-only";
|
|
862
|
+
return A.get(`/system-roles/total-control-read-only/${r}/options`, {
|
|
863
|
+
params: e
|
|
864
|
+
});
|
|
865
|
+
}
|
|
866
|
+
return A.get(`/system-roles/permission/${t}/options`, {
|
|
867
|
+
params: e
|
|
868
|
+
});
|
|
869
|
+
},
|
|
870
|
+
getUserGroups: (t, e) => A.get(`/system-roles/permission/${e}/groups`, {
|
|
871
|
+
params: t
|
|
872
|
+
}),
|
|
873
|
+
postAssignUser: (t, e) => {
|
|
874
|
+
if (["totalControl", "readOnly"].includes(e ?? "")) {
|
|
875
|
+
const r = e === "totalControl" ? "total-control" : "read-only";
|
|
876
|
+
return A.post(`/system-roles/total-control-read-only/${r}`, t);
|
|
877
|
+
}
|
|
878
|
+
return A.post(`/system-roles/permission/${e}`, t);
|
|
879
|
+
},
|
|
880
|
+
putEditUser: (t, e) => A.put(`/system-roles/${e}`, t),
|
|
881
|
+
deleteRemoveUser: (t, e) => {
|
|
882
|
+
if (["totalControl", "readOnly"].includes(e ?? "")) {
|
|
883
|
+
const r = e === "totalControl" ? "total-control" : "read-only";
|
|
884
|
+
return A.put(`/system-roles/total-control-read-only/${r}`, t);
|
|
885
|
+
}
|
|
886
|
+
return A.put("/system-roles", t);
|
|
887
|
+
}
|
|
888
|
+
}, j = s({
|
|
889
|
+
prefix: "/settings-attribute/v2/open-api"
|
|
890
|
+
}), fe = {
|
|
891
|
+
getOpenAPIDocs: (t) => j.get(`/${t.doc}`),
|
|
892
|
+
putGenerateToken: () => j.put("/generate"),
|
|
893
|
+
// This is if the dummy was not dummy
|
|
894
|
+
getToken: () => j.get(""),
|
|
895
|
+
putRequestOpenAPI: () => j.put("/request"),
|
|
896
|
+
putCancelRequestOpenAPI: () => j.put("/cancel-request")
|
|
897
|
+
}, X = s({
|
|
898
|
+
prefix: "/settings-attribute-go/v2/open-api"
|
|
899
|
+
}), Pe = {
|
|
900
|
+
putGenerateToken: () => X.put("/generate"),
|
|
901
|
+
// This is if the dummy was not dummy
|
|
902
|
+
getToken: () => X.get(""),
|
|
903
|
+
putRequestOpenAPI: () => X.put("/request"),
|
|
904
|
+
putCancelRequestOpenAPI: () => X.put("/cancel-request")
|
|
905
|
+
}, w = s({
|
|
906
|
+
prefix: "/import/v2"
|
|
907
|
+
}), Te = {
|
|
908
|
+
getImport: (t, e) => w.get(`/${t}`, { params: e }),
|
|
909
|
+
postImportTemporary: (t, e) => {
|
|
910
|
+
const r = { "Content-Type": "multipart/form-data" };
|
|
911
|
+
return w.post(`/${t}/temporary`, e, { headers: r });
|
|
912
|
+
},
|
|
913
|
+
deleteImportTemporary: (t, e) => w.delete(`/${t}/temporary`, { data: e }),
|
|
914
|
+
postDuplicateImport: (t, e) => w.post(`/${t}/duplicate`, e),
|
|
915
|
+
putEditImport: (t, e) => w.put(`/${t}`, e),
|
|
916
|
+
postImport: (t, e, r) => w.post(t, r, { signal: e.signal }),
|
|
917
|
+
putImportCancelProgress: (t) => w.put(`/${t}/cancel-progress`)
|
|
918
|
+
}, q = s({
|
|
919
|
+
prefix: "/import-go/v2"
|
|
920
|
+
}), Ie = {
|
|
921
|
+
getImport: (t, e) => q.get(`/${t}`, { params: e }),
|
|
922
|
+
postImportTemporary: (t, e) => {
|
|
923
|
+
const r = { "Content-Type": "multipart/form-data" };
|
|
924
|
+
return q.post(`/${t}/temporary`, e, { headers: r });
|
|
925
|
+
},
|
|
926
|
+
deleteImportTemporary: (t, e) => q.delete(`/${t}/temporary`, { params: e }),
|
|
927
|
+
postDuplicateImport: (t, e) => q.post(`/${t}/duplicate`, e),
|
|
928
|
+
putEditImport: (t, e) => q.put(`/${t}`, e),
|
|
929
|
+
postImport: (t, e, r) => q.post(t, r, { signal: e.signal }),
|
|
930
|
+
putImportCancelProgress: (t) => q.put(`/${t}/cancel-progress`)
|
|
931
|
+
}, E = s({
|
|
932
|
+
prefix: "/settings-attribute/v2/asset-name"
|
|
933
|
+
}), Re = {
|
|
934
|
+
getDropdown: (t) => E.get("/dropdown", { params: t }),
|
|
935
|
+
getAssetNameDetail: (t) => E.get(`/${t}`),
|
|
936
|
+
getAssetsByAssetName: (t, e) => E.get(`/${t}/list-asset`, { params: e }),
|
|
937
|
+
getAssetNameList: (t) => E.get("/", { params: t }),
|
|
938
|
+
getUnpairedAssetName: (t) => E.get("/unpaired", { params: t }),
|
|
939
|
+
getOptions: (t) => E.get("/options", { params: t })
|
|
940
|
+
}, o = s({
|
|
941
|
+
prefix: "/assignment/v2"
|
|
942
|
+
}), Ue = {
|
|
943
|
+
getPreListData: (t) => o.get("/prelist", { params: t }),
|
|
944
|
+
getPreListOptions: (t) => o.get("/prelist/options", { params: t }),
|
|
945
|
+
getRequestData: (t) => o.get("/prelist/request", { params: t }),
|
|
946
|
+
postAddPrelistData: (t) => o.post("/prelist", t),
|
|
947
|
+
getDetailRequestData: (t, e) => o.get(`/transaction/${t}/request`, { params: e }),
|
|
948
|
+
getDetailRequestOption: (t, e) => o.get(`/transaction/${e}/request/options`, { params: t }),
|
|
949
|
+
getTransactionData: (t) => o.get("/transaction", { params: t }),
|
|
950
|
+
getTransactionOptions: (t) => o.get("/transaction/options", { params: t }),
|
|
951
|
+
getDetailTransactionData: (t) => o.get(`/transaction/${t}`),
|
|
952
|
+
getTransactionApproval: (t) => o.get("/approval", { params: t }),
|
|
953
|
+
getApprovalData: (t, e) => o.get(`/approval/transaction/${t}`, { params: e }),
|
|
954
|
+
getTransactionApprovalOptions: (t) => o.get("/approval/options", { params: t }),
|
|
955
|
+
getApprovalOptions: (t, e) => o.get(`/approval/transaction/${t}/options`, {
|
|
956
|
+
params: e
|
|
957
|
+
}),
|
|
958
|
+
getTransactionApprovers: (t) => o.get(`/approval/transaction/${t}/transaction`),
|
|
959
|
+
putApproveApproval: (t) => o.put("/approval/approve", t),
|
|
960
|
+
getDetailTransactionLog: (t) => o.get(`/transaction/request/${t}/transaction-log`),
|
|
961
|
+
getVerifyAsset: (t, e) => o.get(`/transaction/${e}/request/scan`, { params: t }),
|
|
962
|
+
putEditAssignedUser: (t, e) => o.put(`/transaction/${t}/user`, e),
|
|
963
|
+
putEditEmailConfirmation: (t, e) => o.put(`/transaction/${t}/update-email-or-assigned-user`, e),
|
|
964
|
+
postSendConfirmationEmail: (t) => o.post(`/transaction/${t}/send-confirmation-email`),
|
|
965
|
+
postTransaction: (t) => o.post("/transaction", t),
|
|
966
|
+
putTransaction: (t, e) => o.put(`/transaction/${t}/request`, e),
|
|
967
|
+
putCancelTransaction: (t) => o.put("/transaction/cancel", t),
|
|
968
|
+
putCancelAssignmentRequest: (t) => o.put("/transaction/request/cancel", t),
|
|
969
|
+
putVerifyRequest: (t, e) => o.put(`/transaction/${e}/verify-requests`, t),
|
|
970
|
+
putVerifyToken: (t) => o.put("/transaction/verify-token", t),
|
|
971
|
+
putHandoverConfirm: (t) => o.put("/transaction/handover-confirmation", t),
|
|
972
|
+
putAssignHandover: (t) => o.put(`/transaction/${t}/handover`),
|
|
973
|
+
deletePrelistData: (t) => o.delete("/prelist", { params: t }),
|
|
974
|
+
deleteRequestPrelistData: (t) => o.delete("/prelist/request", { data: t }),
|
|
975
|
+
getAssignedByAsset: (t) => o.get("/transaction/request/assigned/by-asset", { params: t }),
|
|
976
|
+
getAssignedByAssetOptions: (t) => o.get("/transaction/request/assigned/by-asset/options", {
|
|
977
|
+
params: t
|
|
978
|
+
}),
|
|
979
|
+
getAssignedByUser: (t) => o.get("/transaction/request/assigned/by-user", { params: t }),
|
|
980
|
+
getAssignedByUserOptions: (t) => o.get("/transaction/request/assigned/by-user/options", { params: t }),
|
|
981
|
+
postUnassignPrelistAsset: (t) => o.post("/prelist", t),
|
|
982
|
+
postUnassignPrelistUser: (t) => o.post("/prelist/unassign/by-user", t),
|
|
983
|
+
putUnassignRequest: (t) => o.put("/transaction/request/unassign", t),
|
|
984
|
+
putReportDone: (t, e) => o.put(`/transaction/${t}/confirm-report-done`, e),
|
|
985
|
+
getHistory: (t, e) => {
|
|
986
|
+
const r = t.split(" ").join("-").toLowerCase();
|
|
987
|
+
return o.get(`/transaction/history/${r}`, { params: e });
|
|
988
|
+
},
|
|
989
|
+
getHistoryOptions: (t) => o.get("/transaction/history/options", { params: t }),
|
|
990
|
+
getHistoryByTransactionOptions: (t) => o.get("/transaction/history/by-transaction/options", { params: t }),
|
|
991
|
+
putCancelReport: (t) => o.put("/transaction/request/cancel-report", t),
|
|
992
|
+
getTaskAssignment: async (t) => o.get("/transaction/my-asset/task", { params: t }),
|
|
993
|
+
getTaskAssignmentOptions: async (t) => o.get("/transaction/my-asset/task/options", { params: t }),
|
|
994
|
+
getAssignedAsset: async (t) => o.get("/transaction/my-asset/assigned-asset", { params: t }),
|
|
995
|
+
getAssignedAssetOptions: async (t) => o.get("/transaction/my-asset/assigned-asset/options", { params: t }),
|
|
996
|
+
putCancelAssignment: async (t) => o.put("/transaction/cancel", { id: t.id }),
|
|
997
|
+
putCancelReportById: async (t) => o.put(`/transaction/request/${t.id}/cancel-report`)
|
|
998
|
+
}, B = s({
|
|
999
|
+
prefix: "/assignment-go/v2"
|
|
1000
|
+
}), Ce = {
|
|
1001
|
+
getTransactionData: (t) => B.get("/transaction", { params: t }),
|
|
1002
|
+
getTransactionOptions: (t) => B.get("/transaction/options", { params: t }),
|
|
1003
|
+
getDetailTransactionLog: (t) => B.get(`/transaction/request/${t}/transaction-log`),
|
|
1004
|
+
postTransaction: (t) => B.post("/transaction", t),
|
|
1005
|
+
putTransaction: (t) => B.put("/transaction", t),
|
|
1006
|
+
putUnassignTransaction: (t) => B.put("/transaction/unassign", t),
|
|
1007
|
+
putCancelReport: (t) => B.put("/transaction/request/cancel-report", t)
|
|
1008
|
+
}, $ = s({
|
|
1009
|
+
prefix: "/license/v2"
|
|
1010
|
+
}), Ct = {
|
|
1011
|
+
getTotalLicense: () => $.get("/total-license"),
|
|
1012
|
+
getPurchasedData: (t) => $.get("/purchase", { params: t }),
|
|
1013
|
+
getCompanyData: () => $.get("/company")
|
|
1014
|
+
}, Dt = {
|
|
1015
|
+
getFixedAssetPerGroup: (t, e) => $.get(`/${t}/fixed-asset-list`, { params: e }),
|
|
1016
|
+
getAssetNameList: (t, e, r) => $.get(`${e}/asset-list/${t}`, { params: r }),
|
|
1017
|
+
// Get list of assets those already have licenses
|
|
1018
|
+
getLicenseAddonAssetList: (t, e, r) => $.get(`/${t}/fixed-asset-list/${e}`, { params: r }),
|
|
1019
|
+
removeAddOnLicense: (t, e) => $.put(`/remove-license/${e}`, t),
|
|
1020
|
+
addNewLicenses: (t, e) => $.put(`/add-license/${e}`, t),
|
|
1021
|
+
deleteAssetData: (t) => $.delete("/assets", { data: t }),
|
|
1022
|
+
putManageLicense: (t, e) => $.put(
|
|
1023
|
+
`/manage/${t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()}`,
|
|
1024
|
+
e
|
|
1025
|
+
)
|
|
1026
|
+
}, Ot = {
|
|
1027
|
+
getGroupQuota: (t) => $.get(`/${t}/allocation-quota`),
|
|
1028
|
+
getSubGroupQuota: (t, e) => $.get(`/${t}/subgroup-quota`, { params: e }),
|
|
1029
|
+
editSubGroupQuota: (t, e) => $.put(`/${t}/set-group-quota`, e)
|
|
1030
|
+
}, Lt = {
|
|
1031
|
+
getConcurrentUserData: () => $.get("/concurrent-user-data"),
|
|
1032
|
+
getConcurrentUserList: (t) => $.get("/concurrent-user", { params: t }),
|
|
1033
|
+
putLogoutUsers: (t) => $.put("/concurrent-user", t)
|
|
1034
|
+
}, De = {
|
|
1035
|
+
getFilterOptions: (t, e) => $.get(`/${t}`, { params: e }),
|
|
1036
|
+
...Ct,
|
|
1037
|
+
...Lt,
|
|
1038
|
+
...Ot,
|
|
1039
|
+
...Dt
|
|
1040
|
+
}, L = s({
|
|
1041
|
+
prefix: "/license-go/v2"
|
|
1042
|
+
}), bt = {
|
|
1043
|
+
getTotalLicense: () => L.get("/total-license"),
|
|
1044
|
+
getPurchasedData: (t) => L.get("/purchase", { params: t })
|
|
1045
|
+
}, ht = {
|
|
1046
|
+
getConcurrentUserData: () => L.get("/concurrent-user-data"),
|
|
1047
|
+
getConcurrentUserList: (t) => L.get("/concurrent-user", { params: t }),
|
|
1048
|
+
putLogoutUsers: (t) => L.put("/concurrent-user", t)
|
|
1049
|
+
}, wt = {
|
|
1050
|
+
getFixedAssetPerGroup: (t, e) => L.get(`/${t}/assets`, { params: e }),
|
|
1051
|
+
deleteAssetData: (t) => L.delete("/assets", { data: t })
|
|
1052
|
+
}, Oe = {
|
|
1053
|
+
getFilterOptions: (t, e) => L.get(`/${t}`, { params: e }),
|
|
1054
|
+
...bt,
|
|
1055
|
+
...ht,
|
|
1056
|
+
...wt
|
|
1057
|
+
}, Q = s({
|
|
1058
|
+
prefix: "/repair/v2/damage"
|
|
1059
|
+
}), Le = {
|
|
1060
|
+
getDamageReportList: (t) => Q.get("/", { params: t }),
|
|
1061
|
+
getDamageReportListFilterOptions: (t) => Q.get("/options", { params: t }),
|
|
1062
|
+
getDamageReportDetail: (t) => Q.get(`/${t}`),
|
|
1063
|
+
putReportDamage: (t, e) => {
|
|
1064
|
+
const r = { "Content-Type": "multipart/form-data" };
|
|
1065
|
+
return Q.put(`/report-damage/${t}`, e, { headers: r });
|
|
1066
|
+
},
|
|
1067
|
+
/**
|
|
1068
|
+
* To mark as repaired.
|
|
1069
|
+
* @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
|
|
1070
|
+
*/
|
|
1071
|
+
putMarkAsRepaired: (t) => Q.put("/repair", t)
|
|
1072
|
+
}, Y = s({
|
|
1073
|
+
prefix: "/damage-repair-ticketing/v2"
|
|
1074
|
+
}), be = {
|
|
1075
|
+
getDamageReportList: (t) => Y.get("/", { params: t }),
|
|
1076
|
+
getDamageReportListFilterOptions: (t) => Y.get("/options", { params: t }),
|
|
1077
|
+
getDamageReportDetail: (t) => Y.get(`/${t}`),
|
|
1078
|
+
putReportDamage: (t, e) => {
|
|
1079
|
+
const r = { "Content-Type": "multipart/form-data" };
|
|
1080
|
+
return Y.put(`/${t}/report-damage`, e, { headers: r });
|
|
1081
|
+
},
|
|
1082
|
+
putMarkAsRepaired: (t) => Y.put("/repair", t)
|
|
1083
|
+
}, n = s({
|
|
1084
|
+
prefix: "/borrowing/v2"
|
|
1085
|
+
}), he = {
|
|
1086
|
+
getTaskBorrowing: async (t) => n.get("/transaction/my-asset/task", { params: t }),
|
|
1087
|
+
getTaskBorrowingOptions: async (t) => n.get("/transaction/my-asset/task/options", { params: t }),
|
|
1088
|
+
getBorrowedAsset: async (t) => n.get("/transaction/my-asset/borrowed-asset", { params: t }),
|
|
1089
|
+
getBorrowedOptions: async (t) => n.get("/transaction/my-asset/borrowed-asset/options", { params: t }),
|
|
1090
|
+
getHistory: async (t) => n.get("/transaction/my-asset/history", { params: t }),
|
|
1091
|
+
getHistoryOptions: async (t) => n.get("/transaction/my-asset/history/options", { params: t }),
|
|
1092
|
+
postAddPrelistData: (t) => n.post("/prelist", t),
|
|
1093
|
+
putCancelBorrowing: async (t) => n.put("/transaction/cancel", { id: t.id }),
|
|
1094
|
+
putCancelExtensionRequest: async (t) => n.put(`/transaction/${t.id}/cancel-extension`),
|
|
1095
|
+
putCancelRequestReport: async (t) => n.put(`/transaction/request/${t.id}/cancel-report`),
|
|
1096
|
+
putDeclineExtensionRequest: async (t) => n.put("transaction/request/decline", t),
|
|
1097
|
+
putUpdateRequestExtension: async (t) => n.put("transaction/request/duration", t),
|
|
1098
|
+
// ------------------------------------------------------------------------------------------------------------ //
|
|
1099
|
+
getBorrowingPrelist: (t) => n.get("/prelist", { params: t }),
|
|
1100
|
+
getBorrowingPrelistOptions: (t) => n.get("/prelist/options", { params: t }),
|
|
1101
|
+
deleteBorrowingPrelist: (t) => n.delete("/prelist", { data: { id: t } }),
|
|
1102
|
+
getBorrowingRequest: (t) => n.get("/prelist/request", { params: t }),
|
|
1103
|
+
getBorrowingRequestOptions: (t) => n.get("/prelist/request/options", { params: t }),
|
|
1104
|
+
postBorrowingRequest: (t) => n.post("/prelist/request", t),
|
|
1105
|
+
putBorrowingRequest: (t) => n.put("/prelist/request", t),
|
|
1106
|
+
deleteBorrowingRequest: (t) => n.delete("/prelist/request", { data: { id: t } }),
|
|
1107
|
+
postBorrowingTransaction: (t) => n.post("/transaction", t, { params: { sourceWeb: !0 } }),
|
|
1108
|
+
getBorrowingTransaction: (t) => n.get("/transaction", { params: t }),
|
|
1109
|
+
getBorrowingTransactionOptions: (t) => n.get("/transaction/options", { params: t }),
|
|
1110
|
+
putCancelBorrowingTransaction: (t) => n.put("/transaction/cancel", { id: t }),
|
|
1111
|
+
putCancelBorrowingRequest: (t) => n.put("/transaction/request/cancel", { id: t }),
|
|
1112
|
+
putCancelExtendBorrowingRequest: (t) => n.put("/transaction/request/extend/cancel", { id: t }),
|
|
1113
|
+
getBorrowingTransactionDetail: (t) => n.get(`/transaction/${t}`),
|
|
1114
|
+
getBorrowingTransactionRequestList: (t) => n.get("/transaction/request", { params: t }),
|
|
1115
|
+
getBorrowingTransactionRequest: (t, e) => n.get(`/transaction/${t}/request`, { params: e }),
|
|
1116
|
+
getBorrowingTransactionRequestOptions: (t, e) => n.get(`/transaction/${t}/request/options`, { params: e }),
|
|
1117
|
+
putBorrowingTransactionRequest: (t, e) => n.put(`/transaction/${t}/request`, e),
|
|
1118
|
+
getApprovalList: (t) => n.get(`/approval/transaction/${t}/transaction`),
|
|
1119
|
+
putUpdateEmailorBorrower: (t, e) => n.put(`/transaction/${t}/update-email-or-borrower`, e),
|
|
1120
|
+
getTransactionRequestScan: (t, e) => n.get(`/transaction/${t}/request/scan`, { params: { tag: e } }),
|
|
1121
|
+
putUpdateBorrower: (t, e) => n.put(`/transaction/${t}/user`, { user: e }),
|
|
1122
|
+
postSendConfirmationEmail: (t) => n.post(`/transaction/${t}/send-confirmation-email`),
|
|
1123
|
+
putVerifyRequests: (t, e) => n.put(`/transaction/${t}/verify-requests`, e),
|
|
1124
|
+
getBorrowingTransactionHistoryByTransaction: (t) => n.get("/transaction/history/by-transaction", { params: t }),
|
|
1125
|
+
getBorrowingTransactionHistoryByAsset: (t) => n.get("/transaction/history/by-asset", { params: t }),
|
|
1126
|
+
getBorrowingTransactionHistoryOptions: (t) => n.get("/transaction/history/options", { params: t }),
|
|
1127
|
+
putBorrowingVerifyToken: (t) => n.put("/transaction/verify-token", { token: t }),
|
|
1128
|
+
putBorrowingHandoverConfirmation: (t) => n.put("/transaction/handover-confirmation", t),
|
|
1129
|
+
putBorrowingHandover: (t) => n.put(`/transaction/${t}/handover`),
|
|
1130
|
+
putBorrowingExtendRequest: (t) => n.put("/transaction/request/extend", t),
|
|
1131
|
+
putBorrowingExtendApproval: (t) => n.put("/approval/approve/request-extension", t, {
|
|
1132
|
+
params: { sourceWeb: !0 }
|
|
1133
|
+
}),
|
|
1134
|
+
putBorrowingDeclineExtendRequest: (t) => n.put("/transaction/request/decline", { id: t }),
|
|
1135
|
+
getBorrowingBorrowedAsset: (t) => n.get("/transaction/request/borrowed/by-asset", { params: t }),
|
|
1136
|
+
getBorrowingBorrowedAssetOptions: (t) => n.get("/transaction/request/borrowed/by-asset/options", {
|
|
1137
|
+
params: t
|
|
1138
|
+
}),
|
|
1139
|
+
getBorrowingBorrowedBorrower: (t) => n.get("/transaction/request/borrowed/by-user", { params: t }),
|
|
1140
|
+
putBorrowingReportDamaged: (t, e) => n.put(`/transaction/request/${t}/damaged`, e),
|
|
1141
|
+
putBorrowingReportMissing: (t, e) => n.put(`/transaction/request/${t}/missing`, e),
|
|
1142
|
+
putBorrowingReturn: (t) => n.put("/transaction/request/return", { id: t }),
|
|
1143
|
+
getBorrowingLog: (t) => n.get(`/transaction/request/${t}/transaction-log`),
|
|
1144
|
+
putConfirmReportDone: (t, e) => n.put(`/transaction/request/${t}/confirm-report-done`, e),
|
|
1145
|
+
putCancelReportBulk: (t) => n.put("/transaction/request/cancel-report", {
|
|
1146
|
+
id: t
|
|
1147
|
+
}),
|
|
1148
|
+
putBorrowingEditExtension: (t) => n.put("/transaction/request/duration", t),
|
|
1149
|
+
getApproval: (t) => n.get("/approval", { params: t }),
|
|
1150
|
+
getApprovalOptions: (t) => n.get("/approval/options", { params: t }),
|
|
1151
|
+
getApprovalTransactionRequest: (t, e) => n.get(`/approval/transaction/${t}`, { params: e }),
|
|
1152
|
+
getApprovalTransactionRequestOptions: (t, e) => n.get(`/approval/transaction/${t}/options`, { params: e }),
|
|
1153
|
+
putApprovalApprove: (t) => n.put("/approval/approve", t, {
|
|
1154
|
+
params: { sourceWeb: !0 }
|
|
1155
|
+
})
|
|
1156
|
+
}, vt = s({
|
|
1157
|
+
prefix: "/assets/v2"
|
|
1158
|
+
}), we = {
|
|
1159
|
+
getHistory: async (t) => vt.get("/my-asset", { params: t }),
|
|
1160
|
+
getHistoryOptions: async (t) => vt.get("/my-asset/options", { params: t })
|
|
1161
|
+
}, F = s({
|
|
1162
|
+
prefix: "/assets-go/v2/my-assets"
|
|
1163
|
+
}), qe = {
|
|
1164
|
+
getAssigned: async (t) => F.get("/assigned", { params: t }),
|
|
1165
|
+
getAssignedOptions: async (t) => F.get("/assigned/options", { params: t }),
|
|
1166
|
+
getBorrowed: async (t) => F.get("/borrowed", { params: t }),
|
|
1167
|
+
getBorrowedOptions: async (t) => F.get("/borrowed/options", { params: t }),
|
|
1168
|
+
getHistory: async (t) => F.get("/history", { params: t }),
|
|
1169
|
+
getHistoryOptions: async (t) => F.get("/history/options", { params: t })
|
|
1170
|
+
}, tt = s({
|
|
1171
|
+
prefix: "/repair/v2"
|
|
1172
|
+
}), Be = {
|
|
1173
|
+
getRepairList: (t) => tt.get("/my-asset/repair", { params: t }),
|
|
1174
|
+
getFilterOptions: (t) => tt.get("/my-asset/repair/options", { params: t }),
|
|
1175
|
+
getAssetRepairTicketing: (t, e) => tt.get(`/repair/${t}/asset-repair-detail`, { params: e }),
|
|
1176
|
+
putConfirmRepair: (t) => tt.put(`/repair/${t}/confirm-repair`)
|
|
1177
|
+
}, at = s({
|
|
1178
|
+
env: "APP_GLOBAL_SETTINGS_API",
|
|
1179
|
+
prefix: "/v1/global-settings/auth"
|
|
1180
|
+
}), G = s({
|
|
1181
|
+
env: "APP_TAGSAMURAI_API",
|
|
1182
|
+
prefix: "/settings-user-role/v2/auth"
|
|
1183
|
+
}), mt = (t) => {
|
|
1184
|
+
var e, r, a, T;
|
|
1185
|
+
return ((e = t.response) == null ? void 0 : e.status) === 401 || ((r = t.response) == null ? void 0 : r.status) === 500 || ((T = (a = t.response) == null ? void 0 : a.data) == null ? void 0 : T.message) === "jwt malformed" ? (window.onblur = void 0, window.onfocus = void 0, window.sessionExpired = !0, window.dispatchEvent(new CustomEvent("user:expired"))) : Promise.reject(t);
|
|
1186
|
+
}, Ge = {
|
|
1187
|
+
login: (t) => {
|
|
1188
|
+
const e = { ...t, isMobile: !1 };
|
|
1189
|
+
return at.post("/login", e);
|
|
1190
|
+
},
|
|
1191
|
+
reLoginGlobal: (t) => (at.interceptors.response.use((e) => e, mt), at.post("/login", t)),
|
|
1192
|
+
reLogin: (t) => (G.interceptors.response.use((e) => e, mt), G.post("/login", t)),
|
|
1193
|
+
requestOTP: (t) => {
|
|
1194
|
+
const e = { email: t };
|
|
1195
|
+
return G.post("/request-otp", e);
|
|
1196
|
+
},
|
|
1197
|
+
requestResetPassLink: (t) => {
|
|
1198
|
+
const e = { email: t };
|
|
1199
|
+
return G.post("/request-reset-link", e);
|
|
1200
|
+
},
|
|
1201
|
+
setPassword: (t) => G.post("/set-password", t),
|
|
1202
|
+
verifyToken: (t) => G.get(`/verify-token/${t}`),
|
|
1203
|
+
confirmEmailChange: (t) => {
|
|
1204
|
+
const e = { token: t };
|
|
1205
|
+
return G.put("/confirm-email-change/confirm", e);
|
|
1206
|
+
}
|
|
1207
|
+
}, pt = "/transfer/v2", et = s({
|
|
1208
|
+
prefix: `${pt}/prelist`
|
|
1209
|
+
}), v = s({
|
|
1210
|
+
prefix: `${pt}/transaction`
|
|
1211
|
+
}), J = s({
|
|
1212
|
+
prefix: `${pt}/approval`
|
|
1213
|
+
}), xe = {
|
|
1214
|
+
// ------ TRANSACTION ------
|
|
1215
|
+
getTransactions: (t) => v.get("/", { params: t }),
|
|
1216
|
+
getTransactionDetail: (t) => v.get(`/${t}`),
|
|
1217
|
+
getTransactionDetailAssets: (t, e) => v.get(`/${t}/request`, { params: e }),
|
|
1218
|
+
getRequestFilterOptions: (t, e) => {
|
|
1219
|
+
const r = {};
|
|
1220
|
+
return e ? r[e] = !0 : (r.nameOptions = !0, r.brandOptions = !0, r.modelOptions = !0), v.get(`/${t}/request/options`, { params: r });
|
|
1221
|
+
},
|
|
1222
|
+
getTransactionLog: (t) => v.get(`/request/${t}/transaction-log`),
|
|
1223
|
+
getTransactionOptions: (t) => {
|
|
1224
|
+
const e = {};
|
|
1225
|
+
return e[t] = !0, v.get("/options", { params: e });
|
|
1226
|
+
},
|
|
1227
|
+
postCreateTransaction: (t) => v.post("/", t),
|
|
1228
|
+
putCancelTransactions: (t) => {
|
|
1229
|
+
const e = { id: t };
|
|
1230
|
+
return v.put("/cancel", e);
|
|
1231
|
+
},
|
|
1232
|
+
putUpdateTransaction: (t, e) => v.put(`/${t}`, e),
|
|
1233
|
+
putCancelRequests: (t) => {
|
|
1234
|
+
const e = { id: t };
|
|
1235
|
+
return v.put("/request/cancel", e);
|
|
1236
|
+
},
|
|
1237
|
+
getHistoryByTransaction: (t) => v.get("/history", { params: t }),
|
|
1238
|
+
getHistoryByTransactionOptions: (t) => {
|
|
1239
|
+
const e = {};
|
|
1240
|
+
return e[t] = !0, v.get("/history/options", { params: e });
|
|
1241
|
+
},
|
|
1242
|
+
getHistoryByAsset: (t) => v.get("/history/by-asset", { params: t }),
|
|
1243
|
+
getHistoryByAssetOptions: (t) => {
|
|
1244
|
+
const e = {};
|
|
1245
|
+
return e[t] = !0, v.get("/history/by-asset/options", { params: e });
|
|
1246
|
+
},
|
|
1247
|
+
getApproverList: (t) => v.get(`/${t}/approval-history`),
|
|
1248
|
+
putHandoverTransaction: (t, e) => v.put(`/${t}/handover`, e),
|
|
1249
|
+
// ------ PRELIST ------
|
|
1250
|
+
getPrelist: (t) => et.get("/", { params: t }),
|
|
1251
|
+
postAddPrelistData: (t) => et.post("/", t),
|
|
1252
|
+
deletePrelist: (t) => et.delete("/", {
|
|
1253
|
+
params: {
|
|
1254
|
+
id: JSON.stringify(t)
|
|
1255
|
+
}
|
|
1256
|
+
}),
|
|
1257
|
+
getPrelistAssets: (t) => {
|
|
1258
|
+
const e = { id: t };
|
|
1259
|
+
return et.get("/request", { params: e });
|
|
1260
|
+
},
|
|
1261
|
+
// APPROVAL
|
|
1262
|
+
getApprovals: (t, e) => {
|
|
1263
|
+
const r = { ...e, status: JSON.stringify([t]) };
|
|
1264
|
+
return J.get("/", { params: r });
|
|
1265
|
+
},
|
|
1266
|
+
getApprovalOptions: (t, e) => {
|
|
1267
|
+
const r = {
|
|
1268
|
+
status: JSON.stringify([t])
|
|
1269
|
+
};
|
|
1270
|
+
return r[e] = !0, J.get("/options", { params: r });
|
|
1271
|
+
},
|
|
1272
|
+
getApprovalDetail: (t, e) => {
|
|
1273
|
+
const r = {
|
|
1274
|
+
groupType: e
|
|
1275
|
+
};
|
|
1276
|
+
return J.get(`/transaction/${t}`, { params: r });
|
|
1277
|
+
},
|
|
1278
|
+
getApprovalDetailOptions: (t, e, r) => {
|
|
1279
|
+
const a = {};
|
|
1280
|
+
return a[e] = !0, a.groupType = r, J.get(`/transaction/${t}/options`, { params: a });
|
|
1281
|
+
},
|
|
1282
|
+
putUpdateApproval: (t) => J.put("/approve", t)
|
|
1283
|
+
}, W = s({
|
|
1284
|
+
prefix: "/disposal/v2/report"
|
|
1285
|
+
}), c = s({
|
|
1286
|
+
prefix: "/disposal/v2/disposal"
|
|
1287
|
+
}), qt = s({
|
|
1288
|
+
prefix: "/disposal/v2/approval"
|
|
1289
|
+
}), ke = {
|
|
1290
|
+
getReportedDisposal: (t) => W.get("", { params: t }),
|
|
1291
|
+
getReportedDisposalOptions: (t) => W.get("/options", { params: t }),
|
|
1292
|
+
postReportDisposal: (t) => W.post("", t),
|
|
1293
|
+
deleteCancelReport: (t) => (t.isFromDisposal = "false", W.delete("/cancel-report", { params: t })),
|
|
1294
|
+
deleteDeclineReport: (t) => (t.isFromDisposal = "true", W.delete("/cancel-report", { params: t })),
|
|
1295
|
+
getPrelistDisposal: (t) => c.get("/prelist", { params: t }),
|
|
1296
|
+
getPrelistDisposalRequest: (t) => c.get("/prelist/request", { params: t }),
|
|
1297
|
+
postCreatePrelist: (t) => c.post("/prelist", t),
|
|
1298
|
+
deletePrelistData: (t) => c.delete("/prelist", { params: t }),
|
|
1299
|
+
postCreateTransaction: (t) => c.post("/transaction", t),
|
|
1300
|
+
putTransaction: (t, e) => c.put(`/disposal/${t}`, e),
|
|
1301
|
+
getTransactionData: (t) => c.get("/transaction", { params: t }),
|
|
1302
|
+
getTransactionDetail: (t) => c.get(`/transaction/${t}`),
|
|
1303
|
+
getDisposalTransactionLog: (t) => c.get(`/request/${t}/disposal-log`),
|
|
1304
|
+
getTransactionApprovalHistory: (t) => qt.get(`/transaction/${t}/approval-history`),
|
|
1305
|
+
getTransactionOptions: (t) => c.get("/transaction/options", { params: t }),
|
|
1306
|
+
putCancelTransaction: (t) => c.put("/cancel", { params: t }),
|
|
1307
|
+
putCancelRequest: (t) => c.put("/request/cancel", t),
|
|
1308
|
+
putDisposalVerification: (t, e) => c.put(`/${e}/verification`, t),
|
|
1309
|
+
putDisposalCompletion: (t, e) => {
|
|
1310
|
+
const r = { "Content-Type": "multipart/form-data" };
|
|
1311
|
+
return c.put(`/${e}/completion`, t, { headers: r });
|
|
1312
|
+
},
|
|
1313
|
+
getDisposalRequest: (t) => c.get("/request", { params: t }),
|
|
1314
|
+
getDisposalRequestOptions: (t) => c.get("/request/options", { params: t }),
|
|
1315
|
+
getVerifyAsset: (t) => c.get("/request/scan", { params: t }),
|
|
1316
|
+
getDisposalHistory: (t, e) => c.get(`/history${t}`, { params: e }),
|
|
1317
|
+
getHistoryByTransactionOptions: (t) => c.get("/history/options", { params: t }),
|
|
1318
|
+
getHistoryByAssetOptions: (t) => c.get("/history/by-asset/options", { params: t })
|
|
1319
|
+
}, rt = s({
|
|
1320
|
+
prefix: "/transfer-go/v2"
|
|
1321
|
+
}), _e = {
|
|
1322
|
+
getTransactionData: (t) => rt.get("/transaction", { params: t }),
|
|
1323
|
+
getTransactionOptions: (t) => rt.get("/transaction/options", { params: t }),
|
|
1324
|
+
getTransactionLog: (t) => rt.get(`/transaction/request/${t}/transaction-log`),
|
|
1325
|
+
postCreateTransaction: (t) => rt.post("/transaction", t)
|
|
1326
|
+
}, it = s({
|
|
1327
|
+
prefix: "/audit/v2"
|
|
1328
|
+
}), Ee = {
|
|
1329
|
+
getAudit: (t, e) => it.get(`/audit/schedule/asset-detail/${t}`, { params: e }),
|
|
1330
|
+
getAuditOption: (t, e) => it.get(`/audit/schedule/asset-detail/${t}/options`, {
|
|
1331
|
+
params: e
|
|
1332
|
+
}),
|
|
1333
|
+
putSetActive: (t) => it.put("/audit/asset/activation", t)
|
|
1334
|
+
}, ut = s({
|
|
1335
|
+
prefix: "/routine/v2"
|
|
1336
|
+
}), Fe = {
|
|
1337
|
+
getMaintenance: (t, e) => ut.get(`/routine-task/${t}`, { params: e }),
|
|
1338
|
+
getMaintenanceOption: (t, e) => ut.get(`/routine-task/${t}/options`, { params: e }),
|
|
1339
|
+
putSetActive: (t) => ut.put("/maintenable-asset/set-active", t)
|
|
1340
|
+
}, Bt = s({
|
|
1341
|
+
prefix: "/settings-attribute/v2/models"
|
|
1342
|
+
}), Ne = {
|
|
1343
|
+
getDropdown: (t) => Bt.get("/dropdown", { params: t })
|
|
1344
|
+
}, yt = s({
|
|
1345
|
+
prefix: "/settings-attribute/v2/transaction-settings"
|
|
1346
|
+
}), Me = {
|
|
1347
|
+
getData: () => yt.get("/"),
|
|
1348
|
+
putData: (t) => yt.put("/", t)
|
|
1349
|
+
}, x = s({
|
|
1350
|
+
prefix: "/borrowing-go/v2"
|
|
1351
|
+
}), He = {
|
|
1352
|
+
getTransactions: async (t) => x.get("/transaction", { params: t }),
|
|
1353
|
+
getTransactionOptions: async (t) => x.get("/transaction/options", { params: t }),
|
|
1354
|
+
getTransactionLog: async (t) => x.get(`/transaction/request/${t}/transaction-log`),
|
|
1355
|
+
postTransaction: async (t) => x.post("/transaction", t),
|
|
1356
|
+
putTransaction: async (t) => x.put("/transaction", t),
|
|
1357
|
+
putTransactionReturn: async (t) => {
|
|
1358
|
+
const e = { id: t };
|
|
1359
|
+
return x.put("/transaction/return", e);
|
|
1360
|
+
},
|
|
1361
|
+
putCancelReport: async (t) => {
|
|
1362
|
+
const e = { id: t };
|
|
1363
|
+
return x.put("/transaction/request/cancel-report", e);
|
|
1364
|
+
}
|
|
1365
|
+
}, R = s({
|
|
1366
|
+
prefix: "/disposal-go/v2/"
|
|
1367
|
+
}), Ve = {
|
|
1368
|
+
getReportedDisposal: (t) => R.get("/report", { params: t }),
|
|
1369
|
+
getReportedDisposalOptions: (t) => R.get("/report/options", { params: t }),
|
|
1370
|
+
postReportDisposal: (t) => R.post("/report", t),
|
|
1371
|
+
deleteCancelReport: (t) => (t.isFromDisposal = "false", R.delete("/report/cancel-report", { params: t })),
|
|
1372
|
+
deleteDeclineReport: (t) => (t.isFromDisposal = "true", R.delete("/report/cancel-report", { params: t })),
|
|
1373
|
+
getDisposalHistory: (t) => R.get("/transaction", { params: t }),
|
|
1374
|
+
getHistoryByAssetOptions: (t) => R.get("/transaction/options", { params: t }),
|
|
1375
|
+
getDisposalTransactionLog: (t) => R.get(`/transaction/request/${t}/transaction-log`),
|
|
1376
|
+
postCreateTransaction: (t) => R.post("/transaction", t)
|
|
1377
|
+
}, f = s({
|
|
1378
|
+
prefix: "/report/v2/reports"
|
|
1379
|
+
}), je = {
|
|
1380
|
+
getReportList: (t) => f.get("/schedules", { params: t }),
|
|
1381
|
+
getReportSchedule: (t) => f.get("/schedules/" + t),
|
|
1382
|
+
getUniqueScheduleName: (t) => f.get("/schedules/unique-name", { params: { name: t } }),
|
|
1383
|
+
getFilterOptions: (t) => f.get("/schedules/options", { params: t }),
|
|
1384
|
+
putSetActive: (t) => f.put("/schedules/activation", t),
|
|
1385
|
+
putEditSchedule: (t) => f.put("/schedules/" + t._id, t),
|
|
1386
|
+
deleteReports: (t) => f.delete("/schedules", { params: { reportIds: t } }),
|
|
1387
|
+
postCreateSchedule: (t) => f.post("/schedules/create", t),
|
|
1388
|
+
postDownloadReport: (t) => f.post("/download", t, { responseType: "arraybuffer" }),
|
|
1389
|
+
postGenerateReport: (t) => f.post("/generate", t)
|
|
1390
|
+
}, P = s({
|
|
1391
|
+
prefix: "/report-go/v2/reports"
|
|
1392
|
+
}), Qe = {
|
|
1393
|
+
getReportList: (t) => P.get("/schedules", { params: t }),
|
|
1394
|
+
getReportSchedule: (t) => P.get("/schedules/" + t),
|
|
1395
|
+
getUniqueScheduleName: (t) => P.get("/schedules/unique-name", { params: { name: t } }),
|
|
1396
|
+
getFilterOptions: (t) => P.get("/schedules/options", { params: t }),
|
|
1397
|
+
putSetActive: (t) => P.put("/schedules/set-active", t),
|
|
1398
|
+
putEditSchedule: (t, e) => P.put(`/schedules/${t}`, e),
|
|
1399
|
+
deleteReports: (t) => P.delete("/schedules", { params: { id: t } }),
|
|
1400
|
+
postCreateSchedule: (t) => P.post("/schedules", t),
|
|
1401
|
+
postDownloadReport: (t) => P.post("/download", t, { responseType: "arraybuffer" }),
|
|
1402
|
+
postGenerateReport: (t) => P.post("/generate", t)
|
|
200
1403
|
};
|
|
201
1404
|
export {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
1405
|
+
ae as AliasCodeServices,
|
|
1406
|
+
ie as AliasCodeServicesGo,
|
|
1407
|
+
Re as AssetNameServices,
|
|
1408
|
+
jt as AssetServices,
|
|
1409
|
+
Qt as AssetServicesGo,
|
|
1410
|
+
Ue as AssignmentServices,
|
|
1411
|
+
Ce as AssignmentServicesGo,
|
|
1412
|
+
Ee as AuditServices,
|
|
1413
|
+
Ge as AuthServices,
|
|
1414
|
+
he as BorrowServices,
|
|
1415
|
+
He as BorrowServicesGo,
|
|
1416
|
+
Ae as BrandServices,
|
|
1417
|
+
Ht as ChangelogServices,
|
|
1418
|
+
le as CountryStateServices,
|
|
1419
|
+
ge as CustomFieldServices,
|
|
1420
|
+
ce as CustomFieldServicesGo,
|
|
1421
|
+
Le as DamageServices,
|
|
1422
|
+
be as DamageServicesGo,
|
|
1423
|
+
oe as DashboardServices,
|
|
1424
|
+
ke as DisposalServices,
|
|
1425
|
+
Ve as DisposalServicesGo,
|
|
1426
|
+
$e as FileManagerServices,
|
|
1427
|
+
ve as FileManagerServicesGo,
|
|
1428
|
+
ue as GeneralSettingsServices,
|
|
1429
|
+
pe as GeneralSettingsServicesGo,
|
|
1430
|
+
Ft as GroupCategoryServices,
|
|
1431
|
+
Nt as GroupCategoryServicesGo,
|
|
1432
|
+
ne as I18nService,
|
|
1433
|
+
Te as ImportServices,
|
|
1434
|
+
Ie as ImportServicesGo,
|
|
1435
|
+
De as LicenseServices,
|
|
1436
|
+
Oe as LicenseServicesGo,
|
|
1437
|
+
Vt as LogServicesGo,
|
|
1438
|
+
Yt as MissingServices,
|
|
1439
|
+
Jt as MissingServicesGo,
|
|
1440
|
+
Ne as ModelTypeServices,
|
|
1441
|
+
we as MyAssetServices,
|
|
1442
|
+
qe as MyAssetServicesGo,
|
|
1443
|
+
Mt as NotificationApprovalServices,
|
|
1444
|
+
Wt as NotificationServices,
|
|
1445
|
+
Kt as NotificationServicesGo,
|
|
1446
|
+
fe as OpenAPIServices,
|
|
1447
|
+
Pe as OpenAPIServicesGo,
|
|
1448
|
+
me as ReaderServices,
|
|
1449
|
+
Be as RepairServices,
|
|
1450
|
+
je as ReportServices,
|
|
1451
|
+
Qe as ReportServicesGo,
|
|
1452
|
+
ye as RoleServices,
|
|
1453
|
+
Se as RoleServicesGo,
|
|
1454
|
+
Fe as RoutineServices,
|
|
1455
|
+
de as ServiceCenterServices,
|
|
1456
|
+
zt as SessionLogServices,
|
|
1457
|
+
re as SubUserServices,
|
|
1458
|
+
se as SubUserServicesGo,
|
|
1459
|
+
Zt as TAGServices,
|
|
1460
|
+
Xt as TrackingServices,
|
|
1461
|
+
Me as TransactionSettingServices,
|
|
1462
|
+
xe as TransferServices,
|
|
1463
|
+
_e as TransferServicesGo,
|
|
1464
|
+
te as UserServices,
|
|
1465
|
+
ee as UserServicesGo,
|
|
1466
|
+
Et as getAssetsFile,
|
|
1467
|
+
N as getBaseURL,
|
|
1468
|
+
_t as getImageURL,
|
|
1469
|
+
kt as getImageURLGo,
|
|
1470
|
+
xt as queryParamsStringfy
|
|
217
1471
|
};
|