@tagsamurai/fats-api-services 1.0.0-alpha.19 → 1.0.0-alpha.190

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