@tagsamurai/fats-api-services 1.0.0-alpha.24 → 1.0.0-alpha.240

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 (144) hide show
  1. package/api-services.es.js +2022 -201
  2. package/api-services.system.js +2028 -1
  3. package/main.d.ts +39 -11
  4. package/package.json +6 -3
  5. package/src/dto/assetDetail.dto.d.ts +91 -0
  6. package/src/dto/assetName.dto.d.ts +8 -0
  7. package/src/dto/assetPolicyService.dto.d.ts +19 -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 +25 -0
  13. package/src/dto/damageService.dto.d.ts +23 -0
  14. package/src/dto/disposal.dto.d.ts +66 -0
  15. package/src/dto/fileManager.dto.d.ts +25 -0
  16. package/src/dto/globalAuth.dto.d.ts +18 -0
  17. package/src/dto/groupCategoryService.dto.d.ts +1 -1
  18. package/src/dto/importData.dto.d.ts +7 -0
  19. package/src/dto/importTemporaryData.dto.d.ts +6 -0
  20. package/src/dto/license.dto.d.ts +76 -0
  21. package/src/dto/log.dto.d.ts +11 -11
  22. package/src/dto/maintenanceRoutine.dto.d.ts +12 -0
  23. package/src/dto/missing.dto.d.ts +12 -0
  24. package/src/dto/myAsset.dro.d.ts +12 -0
  25. package/src/dto/notification.dto.d.ts +3 -1
  26. package/src/dto/oldBorrowService.dto.d.ts +102 -0
  27. package/src/dto/oldDamageService.dto.d.ts +7 -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 +59 -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/report.dto.d.ts +42 -0
  35. package/src/dto/role.dto.d.ts +50 -0
  36. package/src/dto/serviceCenter.dto.d.ts +22 -0
  37. package/src/dto/subUser.dto.d.ts +46 -0
  38. package/src/dto/transactionLog.dto.d.ts +17 -0
  39. package/src/dto/transfer.dto.d.ts +29 -0
  40. package/src/dto/user.dto.d.ts +126 -33
  41. package/src/services/asset.service.d.ts +44 -0
  42. package/src/services/assetPolicy.service.d.ts +10 -0
  43. package/src/services/assignment.service.d.ts +85 -0
  44. package/src/services/borrow.service.d.ts +84 -0
  45. package/src/services/countryState.service.d.ts +7 -0
  46. package/src/services/customField.service.d.ts +22 -0
  47. package/src/services/damage.service.d.ts +13 -0
  48. package/src/services/damageService.type.d.ts +104 -0
  49. package/src/services/disposal.service.d.ts +18 -0
  50. package/src/services/fileManager.service.d.ts +53 -0
  51. package/src/services/globalAuth.service.d.ts +27 -0
  52. package/src/services/groupCategory.service.d.ts +6 -3
  53. package/src/services/importData.service.d.ts +24 -0
  54. package/src/services/license.service.d.ts +23 -0
  55. package/src/services/log.service.d.ts +29 -0
  56. package/src/services/missing.service.d.ts +12 -0
  57. package/src/services/moduleAuth.service.d.ts +19 -0
  58. package/src/services/myAsset.service.d.ts +13 -0
  59. package/src/services/notification.service.d.ts +9 -0
  60. package/src/services/oldAsset.service.d.ts +38 -5
  61. package/src/services/oldAssetName.service.d.ts +14 -0
  62. package/src/services/oldAssignment.service.d.ts +84 -0
  63. package/src/services/oldAudit.service.d.ts +56 -0
  64. package/src/services/oldBorrow.service.d.ts +77 -0
  65. package/src/services/oldBrand.service.d.ts +7 -0
  66. package/src/services/oldDamage.service.d.ts +17 -0
  67. package/src/services/oldDisposal.service.d.ts +44 -0
  68. package/src/services/oldFileManager.service.d.ts +53 -0
  69. package/src/services/oldImportData.service.d.ts +22 -0
  70. package/src/services/oldLicense.service.d.ts +39 -0
  71. package/src/services/oldLog.service.d.ts +17 -0
  72. package/src/services/oldMaintenanceRoutine.service.d.ts +11 -0
  73. package/src/services/oldMissing.service.d.ts +12 -1
  74. package/src/services/oldModelType.service.d.ts +7 -0
  75. package/src/services/oldMyAsset.service.d.ts +7 -0
  76. package/src/services/oldOpenApi.service.d.ts +10 -0
  77. package/src/services/oldReader.service.d.ts +13 -0
  78. package/src/services/oldRepair.service.d.ts +10 -0
  79. package/src/services/oldReport.service.d.ts +31 -0
  80. package/src/services/oldRole.service.d.ts +56 -0
  81. package/src/services/oldServiceCenter.service.d.ts +19 -0
  82. package/src/services/oldSubUser.service.d.ts +15 -0
  83. package/src/services/oldTag.service.d.ts +25 -1
  84. package/src/services/oldTracking.service.d.ts +4 -0
  85. package/src/services/oldTransactionSetting.service.d.ts +21 -0
  86. package/src/services/oldTransfer.service.d.ts +30 -0
  87. package/src/services/oldUser.service.d.ts +28 -15
  88. package/src/services/openApi.service.d.ts +10 -0
  89. package/src/services/report.service.d.ts +32 -0
  90. package/src/services/role.service.d.ts +58 -0
  91. package/src/services/subUser.service.d.ts +17 -0
  92. package/src/services/transfer.service.d.ts +36 -0
  93. package/src/services/user.service.d.ts +42 -0
  94. package/src/types/approval.type.d.ts +17 -0
  95. package/src/types/asset.type.d.ts +229 -0
  96. package/src/types/assetDetail.type.d.ts +120 -0
  97. package/src/types/assetPolicyService.type.d.ts +18 -0
  98. package/src/types/assignedAsset.type.d.ts +60 -0
  99. package/src/types/assignment.type.d.ts +318 -0
  100. package/src/types/audit.type.d.ts +26 -0
  101. package/src/types/borrow.type.d.ts +86 -0
  102. package/src/types/customField.type.d.ts +43 -0
  103. package/src/types/dataTable.type.d.ts +7 -0
  104. package/src/types/disposal/history.type.d.ts +51 -0
  105. package/src/types/disposal/prelist.type.d.ts +18 -0
  106. package/src/types/disposal/reported.type.d.ts +54 -0
  107. package/src/types/disposal/requestDisposal.type.d.ts +80 -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 +2 -7
  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/myAsset.type.d.ts +65 -0
  123. package/src/types/notification.type.d.ts +17 -0
  124. package/src/types/oldAuditService.type.d.ts +154 -0
  125. package/src/types/oldBorrowingService.type.d.ts +549 -0
  126. package/src/types/oldTagService.type.d.ts +109 -0
  127. package/src/types/options.type.d.ts +6 -10
  128. package/src/types/reader.d.ts +55 -0
  129. package/src/types/role.type.d.ts +111 -6
  130. package/src/types/serviceCenter.type.d.ts +29 -0
  131. package/src/types/subUser.type.d.ts +28 -0
  132. package/src/types/transfer.type.d.ts +64 -0
  133. package/src/types/user.type.d.ts +43 -1
  134. package/src/types/userGlobalRole.type.d.ts +1 -1
  135. package/src/types/userGroupRole.type.d.ts +3 -2
  136. package/src/types/userTransactionRole.type.d.ts +3 -1
  137. package/src/utils/createInstance.util.d.ts +17 -0
  138. package/src/utils/getAssetsFile.util.d.ts +1 -0
  139. package/src/utils/index.d.ts +1 -0
  140. package/src/dto/oldAssetService.dto.d.ts +0 -26
  141. package/src/services/oldGroupCategory.service.d.ts +0 -14
  142. package/src/types/userSystemRole.type.d.ts +0 -14
  143. /package/src/services/{oldAliasCode.service.d.ts → aliasCode.service.d.ts} +0 -0
  144. /package/src/services/{oldGeneralSettings.service.d.ts → generalSettings.service.d.ts} +0 -0
@@ -1,186 +1,1735 @@
1
- import $ from "axios";
2
- const m = { 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" }, _ = (t = "APP_API") => m["VITE_" + t], n = (t = {}, e = !1) => {
3
- const { env: r = "APP_API", prefix: a = "", headers: l = {}, ...S } = t, v = `${_(r)}${a}`, A = JSON.parse(localStorage.getItem("user") ?? "{}"), f = A.jwt ?? A.token ?? "";
4
- return $.create({
5
- ...S,
6
- baseURL: v,
7
- headers: e ? l : {
1
+ import axios from "axios";
2
+ const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_APP_ADMIN_API": "https://dev-admin-api.tagsamurai.com", "VITE_APP_API": "https://dev-api.tagsamurai.com/fam", "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" };
3
+ const getBaseURL = (env = "APP_API") => {
4
+ return __vite_import_meta_env__["VITE_" + env];
5
+ };
6
+ const createAxiosInstance = (config = {}, useDifferentHeaders = false) => {
7
+ const { env = "APP_API", prefix = "", headers = {}, ...restConfig } = config;
8
+ const baseURL = `${getBaseURL(env)}${prefix}`;
9
+ const instance = axios.create({
10
+ ...restConfig,
11
+ baseURL,
12
+ headers: useDifferentHeaders ? headers : {
8
13
  "Content-Type": "application/json",
9
- Authorization: `Bearer ${f}`,
10
- ...l
14
+ ...headers
11
15
  }
12
16
  });
13
- }, h = (t) => {
14
- if (!t || typeof t == "string")
17
+ instance.interceptors.request.use((request) => {
18
+ const user = JSON.parse(localStorage.getItem("user") ?? "{}");
19
+ const jwt = user.jwt ?? user.token ?? "";
20
+ request.headers["Authorization"] = `Bearer ${jwt}`;
21
+ return request;
22
+ });
23
+ return instance;
24
+ };
25
+ const queryParamsStringfy = (data) => {
26
+ if (!data || typeof data === "string") {
15
27
  return;
16
- const e = {};
17
- return Object.keys(t).forEach((r) => {
18
- Array.isArray(t[r]) ? t[r].length > 0 && Object.assign(e, {
19
- [r]: JSON.stringify(t[r])
20
- }) : t[r] !== void 0 && Object.assign(e, {
21
- [r]: t[r]
22
- });
23
- }), e;
24
- }, D = (t) => {
25
- if (!t) return;
26
- const e = _("APP_TAGSAMURAI_API");
27
- return t.startsWith("http") ? t : `${e}/file-manager/v2/files/${t}`;
28
- }, i = n({
29
- prefix: "/settings-attribute/v2",
30
- env: "APP_TAGSAMURAI_API"
31
- }), C = {
32
- getGroupCategory: (t, e) => {
33
- const r = t === "category" ? t : "groups";
34
- return i.get(`/${r}/tree`, { params: e });
35
- },
36
- getGroupCategoryList: (t, e, r) => {
37
- const a = t === "category" ? t : "groups";
38
- return i.get(`/${a}/${e}`, { params: r });
39
- },
40
- getNames: (t) => {
41
- const e = t === "category" ? t : "groups";
42
- return i.get(`/${e}/names`);
43
- },
44
- postCreateGroupCategory: (t, e) => {
45
- const r = t === "category" ? t : "groups";
46
- return i.post(`/${r}`, e);
47
- },
48
- putEditGroupCategory: (t, e, r) => {
49
- const a = t === "category" ? t : "groups";
50
- return i.put(`/${a}/${r}`, e);
51
- },
52
- putMoveGroup: (t, e) => i.put(`/groups/${e}/move-group`, t),
53
- putEditBulkGroups: async (t) => i.put("/groups/bulk", t),
54
- deleteGroupCategory: (t, e, r) => {
55
- const a = t === "category" ? t : "groups";
56
- return i.delete(`/${a}/${r}`, { data: e });
57
- }
58
- }, T = n({
59
- prefix: "/v2",
60
- env: "APP_LOGS_NOTIFICATION_API"
61
- }), N = {
62
- getTotalApprovals: () => T.get("/approval/count")
63
- }, g = n({
64
- prefix: "/v2",
65
- env: "APP_LOGS_NOTIFICATION_API"
66
- }), G = {
67
- getActionLog: (t) => g.get("/change-log", { params: t }),
68
- getActionLogOption: (t) => g.get("/change-log/options", { params: t }),
69
- getSessionLogList: (t) => g.get("/session-log", { params: t }),
70
- getUserDetailSystemLogList: (t) => g.get("/change-log", { params: t }),
71
- getUserDetailSystemLogOption: (t) => g.get("/change-log/options", { params: t })
72
- }, o = n({
28
+ }
29
+ const assignedData = {};
30
+ Object.keys(data).forEach((item) => {
31
+ if (Array.isArray(data[item])) {
32
+ if (data[item].length > 0) {
33
+ Object.assign(assignedData, {
34
+ [item]: JSON.stringify(data[item])
35
+ });
36
+ }
37
+ } else if (data[item] !== void 0) {
38
+ Object.assign(assignedData, {
39
+ [item]: data[item]
40
+ });
41
+ }
42
+ });
43
+ return assignedData;
44
+ };
45
+ const getImageURL = (name, width, height) => {
46
+ if (!name) return;
47
+ const BASE_URL = getBaseURL("APP_API");
48
+ const filePath = name.startsWith("http") ? name : `${BASE_URL}/utility/v2/files/${name.replace(/^\/+/, "")}`;
49
+ if (width || height) {
50
+ const params = new URLSearchParams();
51
+ if (width) {
52
+ params.set("width", width.toString());
53
+ params.set("height", height ? height == null ? void 0 : height.toString() : width.toString());
54
+ }
55
+ return `${filePath}?${params.toString()}`;
56
+ }
57
+ return filePath;
58
+ };
59
+ const getAssetsFile = async (file, type = "excel") => {
60
+ const response = await fetch(
61
+ `${getBaseURL("APP_ASSETS_URL")}/${type}/${file}`
62
+ );
63
+ return response;
64
+ };
65
+ const API$G = createAxiosInstance({
66
+ prefix: "/utility/v2"
67
+ });
68
+ const ChangelogServices$1 = {
69
+ getActionLog: (params) => {
70
+ return API$G.get("/change-log", { params });
71
+ },
72
+ getActionLogOption: (params) => {
73
+ return API$G.get("/change-log/options", { params });
74
+ },
75
+ getSessionLogList: (params) => {
76
+ return API$G.get("/session-log", { params });
77
+ },
78
+ getTransactionLog: (params) => {
79
+ return API$G.get("/transaction-log", { params });
80
+ },
81
+ /**
82
+ * Retrieves the transaction log options.
83
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
84
+ */
85
+ getTransactionLogOption: (params) => {
86
+ return API$G.get("/transaction-log/options", { params });
87
+ },
88
+ getUserDetailSystemLogList: (params) => {
89
+ return API$G.get("/change-log", { params });
90
+ },
91
+ getUserDetailSystemLogOption: (params) => {
92
+ return API$G.get("/change-log/options", { params });
93
+ },
94
+ getUserDetailUserLogBorrowingList: (userId, params) => {
95
+ return API$G.get(`/borrowing-log/${userId}`, { params });
96
+ },
97
+ getUserDetailUserLogAssignmentList: (userId, params) => {
98
+ return API$G.get(`/assignment-log/${userId}`, { params });
99
+ },
100
+ getUserDetailUserLogBorrowingOption: (userId, params) => {
101
+ return API$G.get(`/borrowing-log/${userId}/options`, { params });
102
+ },
103
+ getUserDetailUserLogAssignmentOption: (userId, params) => {
104
+ return API$G.get(`/assignment-log/${userId}/options`, { params });
105
+ }
106
+ };
107
+ const AssetsAPIs = createAxiosInstance({
73
108
  prefix: "/assets/v2/assets"
74
- }), R = {
75
- getScanTag: (t) => o.get("/scan", { params: { tag: t } }),
76
- getAllAssets: (t) => o.get("/", { params: t }),
77
- getAvailableAssets: (t) => o.get("/available", { params: t }),
78
- scanAsset: (t) => o.get("", { params: { tag: t } }),
79
- getAssetsById: (t, e) => o.get("/by-id", { params: { _id: t, ...e } }),
80
- getOptions: (t, e) => o.get(t ? `/${t}/options` : "/options", { params: e }),
81
- getUnlinkedAssets: (t) => o.get("/unlinked", { params: t }),
82
- getAssetDetail: (t, e) => o.get(`/${t}`, { params: e }),
83
- getLinkedAssetFamily: (t) => o.get("/family", { params: { id: t } }),
84
- matchAssetWithTag: (t, e) => {
85
- const r = {
86
- _id: JSON.stringify([t]),
87
- tag: e
109
+ });
110
+ const AssetServices = {
111
+ getAllAssets: (params) => {
112
+ return AssetsAPIs.get("/", { params });
113
+ },
114
+ getAllAssetsOptions: (params) => {
115
+ return AssetsAPIs.get("/options", { params });
116
+ },
117
+ getOptions: (endpoint, params) => {
118
+ return AssetsAPIs.get(endpoint ? `/${endpoint}/options` : "/options", {
119
+ params
120
+ });
121
+ },
122
+ getUnlinkedAssets: (params) => {
123
+ return AssetsAPIs.get("/unlinked", { params });
124
+ },
125
+ getAssetDetail: (id, params) => {
126
+ return AssetsAPIs.get(`/${id}`, { params });
127
+ },
128
+ getAssetNameTotal: () => {
129
+ return AssetsAPIs.get("/name-amount");
130
+ },
131
+ postRegisterAsset: (body) => {
132
+ const headers = { "Content-Type": "multipart/form-data" };
133
+ return AssetsAPIs.post("", body, { headers });
134
+ },
135
+ putEditAsset: (id, body) => {
136
+ const headers = { "Content-Type": "multipart/form-data" };
137
+ return AssetsAPIs.put(`/${id}`, body, { headers });
138
+ },
139
+ putEditDetailCustomField: (id, body) => {
140
+ const headers = { "Content-Type": "multipart/form-data" };
141
+ return AssetsAPIs.put(`/${id}`, body, { headers });
142
+ },
143
+ getLinkedAsset: (assetId, params) => {
144
+ return AssetsAPIs.get(`/${assetId}/linked-assets`, { params });
145
+ },
146
+ getPurchase: (assetId) => {
147
+ return AssetsAPIs.get(`/${assetId}/purchase`);
148
+ },
149
+ putPurchase: (body, assetId) => {
150
+ return AssetsAPIs.put(`/${assetId}/purchase`, body);
151
+ },
152
+ getAccounting: (assetId, params) => {
153
+ return AssetsAPIs.get(`/${assetId}/accounting`, { params });
154
+ },
155
+ getLinkedAssetOption: (parentId, params) => {
156
+ return AssetsAPIs.get(`/${parentId}/linked-assets/options`, { params });
157
+ },
158
+ putLinkAsset: (body, parentId) => {
159
+ return AssetsAPIs.put(`/${parentId}/linked-assets`, body);
160
+ },
161
+ putUnlinkAsset: (body, parentId) => {
162
+ return AssetsAPIs.put(`/${parentId}/unlink-assets`, body);
163
+ },
164
+ putEditUsefulLife: (body) => {
165
+ return AssetsAPIs.put("/useful-life", body);
166
+ },
167
+ getAttachment: (assetId, params) => {
168
+ return AssetsAPIs.get(`/attachment/${assetId}`, { params });
169
+ },
170
+ postAttachment: (body, assetId) => {
171
+ const headers = { "Content-Type": "multipart/form-data" };
172
+ return AssetsAPIs.post(`/attachment/${assetId}`, body, { headers });
173
+ },
174
+ putAttachment: (body, id) => {
175
+ const headers = { "Content-Type": "multipart/form-data" };
176
+ return AssetsAPIs.put(`/attachment/${id}`, body, { headers });
177
+ },
178
+ /**
179
+ * Deletes the attachment with the given IDs.
180
+ * @param {object} params - The request params containing the IDs of the attachments to delete.
181
+ * @returns {Promise<AxiosResponse>}
182
+ */
183
+ deleteAttachment: (params) => {
184
+ return AssetsAPIs.delete("/attachment/bulk", { params });
185
+ }
186
+ };
187
+ const API$F = createAxiosInstance({
188
+ prefix: "/missing-tracking/v2"
189
+ });
190
+ const MissingServices$1 = {
191
+ putFoundAsset: (body) => {
192
+ return API$F.put("/found", body);
193
+ },
194
+ putReportMissing: (id, body) => {
195
+ return API$F.put(`/${id}/report-missing`, body);
196
+ },
197
+ getData: (params) => {
198
+ return API$F.get("/", { params });
199
+ },
200
+ getDataOptions: (params) => {
201
+ return API$F.get("/options", { params });
202
+ },
203
+ getDetail: (id) => {
204
+ return API$F.get(`/${id}`);
205
+ }
206
+ };
207
+ const API$E = createAxiosInstance({
208
+ prefix: "/utility/v2/notification"
209
+ });
210
+ const NotificationServices = {
211
+ getNotifications: (params) => {
212
+ return API$E.get("/", { params });
213
+ },
214
+ readNotification: (id) => {
215
+ return API$E.put(`/${id}`);
216
+ }
217
+ };
218
+ const API$D = createAxiosInstance({
219
+ prefix: "/settings-user-role/v2"
220
+ });
221
+ const UserServices = {
222
+ /**
223
+ * Retrieves the user list as dropdown options.
224
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
225
+ */
226
+ getUserDropdown: (params) => {
227
+ return API$D.get("/users/dropdown", { params });
228
+ },
229
+ getUserOptions: (params) => {
230
+ return API$D.get("/users/options", { params });
231
+ },
232
+ getUserList: (params) => {
233
+ return API$D.get("/users", { params });
234
+ },
235
+ getUserDetail: (id) => {
236
+ return API$D.get(`/users/${id}`);
237
+ },
238
+ putSetActiveBulk: (data) => {
239
+ return API$D.put("/users/set-active-bulk", data);
240
+ },
241
+ // User Detail
242
+ /**
243
+ *
244
+ * @param id {string} User's _id
245
+ * @param type {"Global" | "Group"} Whether the system role's type is global or group
246
+ * @param params {Record<string, unknown>}
247
+ */
248
+ getUserDetailSystemRoles: (id, params, permissionType) => {
249
+ const additionalPath = permissionType ? `/${permissionType}/groups` : "";
250
+ return API$D.get(`/users/${id}/system-roles${additionalPath}`, {
251
+ params
252
+ });
253
+ },
254
+ getUserDetailTransactionRoleList: (id, params) => {
255
+ return API$D.get(`/users/${id}/transaction-roles`, { params });
256
+ },
257
+ postUserDetailAddTransactionRole: (userId, data) => {
258
+ return API$D.post(`/users/${userId}/add-transaction-role`, data);
259
+ },
260
+ deleteUserDetailTransactionRole: (userId, body) => {
261
+ return API$D.put(`/users/${userId}/delete-transaction-role`, body);
262
+ },
263
+ putUserDetailEditTransactionRole: (userId, data) => {
264
+ return API$D.put(`/users/${userId}/edit-transaction-role`, data);
265
+ },
266
+ putAssignGroup: (data, permissionType, id) => {
267
+ return API$D.put(`/users/${id}/system-roles/${permissionType}/groups`, data);
268
+ },
269
+ putRoleSetActive: (body, userId) => {
270
+ return API$D.put(`/users/${userId}/system-roles/set-active-bulk`, body);
271
+ },
272
+ getUserDetailTransactionAdminLogList: (userId, params) => {
273
+ return API$D.get(`/users/${userId}/transaction-log`, { params });
274
+ },
275
+ getUserDetailTransactionAdminLogOption: (userId, params) => {
276
+ return API$D.get(`/users/${userId}/transaction-log/option`, { params });
277
+ },
278
+ getUserDetailUserAssetBorrowedList: (userId, params) => {
279
+ return API$D.get(`/users/${userId}/borrowed-asset`, { params });
280
+ },
281
+ getUserDetailUserAssetAssignedList: (userId, params) => {
282
+ return API$D.get(`/users/${userId}/assigned-asset`, { params });
283
+ },
284
+ getUserDetailUserAssetBorrowedOption: (userId, params) => {
285
+ return API$D.get(`/users/${userId}/borrowed-asset/option`, { params });
286
+ },
287
+ getUserDetailUserAssetAssignedOption: (userId, params) => {
288
+ return API$D.get(`/users/${userId}/assigned-asset/option`, { params });
289
+ }
290
+ };
291
+ const API$C = createAxiosInstance({
292
+ prefix: "/settings-user-role/v2/users"
293
+ });
294
+ const SubUserServices = {
295
+ // Sub User
296
+ getSubUserList: (userId, params) => {
297
+ return API$C.get(`/${userId}/sub-users`, { params });
298
+ },
299
+ getSubUserOptions: (userId, params) => {
300
+ return API$C.get(`/${userId}/sub-users/option`, { params });
301
+ },
302
+ postCreateSubUser: (userId, data) => {
303
+ const headers = { "Content-Type": "multipart/form-data" };
304
+ return API$C.post(`/${userId}/sub-users`, data, { headers });
305
+ },
306
+ putSubUserSetActiveBulk: (userId, data) => {
307
+ return API$C.put(`/${userId}/sub-users/set-active-bulk`, data);
308
+ },
309
+ deleteSubUser: (userId, subUserIds) => {
310
+ return API$C.put(`/${userId}/sub-users/bulk`, { subUserIds });
311
+ },
312
+ putEditSubUser: (userId, subUserId, data) => {
313
+ const headers = { "Content-Type": "multipart/form-data" };
314
+ return API$C.put(`/${userId}/sub-users/${subUserId}`, data, {
315
+ headers
316
+ });
317
+ },
318
+ getBorrowedAsset: (userId, subUserId, params) => {
319
+ return API$C.get(`/${userId}/sub-users/${subUserId}/borrowed-asset`, {
320
+ params
321
+ });
322
+ },
323
+ getBorrowedAssetOptions: (userId, subUserId, params) => {
324
+ return API$C.get(`/${userId}/sub-users/${subUserId}/borrowed-asset/options`, {
325
+ params
326
+ });
327
+ },
328
+ getAssignedAsset: (userId, subUserId, params) => {
329
+ return API$C.get(`/${userId}/sub-users/${subUserId}/assigned-asset`, {
330
+ params
331
+ });
332
+ },
333
+ getAssignedAssetOptions: (userId, subUserId, params) => {
334
+ return API$C.get(`/${userId}/sub-users/${subUserId}/assigned-asset/options`, {
335
+ params
336
+ });
337
+ }
338
+ };
339
+ const API$B = createAxiosInstance({
340
+ prefix: "/utility/v2"
341
+ });
342
+ const FileManagerServices = {
343
+ /**
344
+ * Get storage information.
345
+ *
346
+ * @returns {Promise<AxiosResponse>} The Axios Response.
347
+ */
348
+ getStorageInformation: () => {
349
+ return API$B.get("/files/storage");
350
+ },
351
+ /**
352
+ * Get file manager data.
353
+ *
354
+ * @param {FileType} type - The type of the file.
355
+ * @param {FileManagerFilterParams} [params] - The parameters for filtering.
356
+ * @returns {Promise<AxiosResponse>} The Axios Response.
357
+ */
358
+ getFileManager: (type, params) => {
359
+ return API$B.get(`/${type}`, { params });
360
+ },
361
+ /**
362
+ * Get file manager options.
363
+ *
364
+ * @param {FileType} type - The type of the file.
365
+ * @param {FileManagerOptionBoolean} [params] - The parameters for options.
366
+ * @returns {Promise<AxiosResponse>} The Axios Response.
367
+ */
368
+ getFileManagerOption: (type, params) => {
369
+ return API$B.get(`/${type}/options`, { params });
370
+ },
371
+ /**
372
+ * Recover files.
373
+ *
374
+ * @param {FileType} type - The type of the file.
375
+ * @param {object} body - The body of the request.
376
+ * @returns {Promise<AxiosResponse>} The Axios Response.
377
+ */
378
+ recoverFiles: (type, body) => {
379
+ return API$B.put(`/${type}/recover`, body);
380
+ },
381
+ /**
382
+ * Delete files.
383
+ *
384
+ * @param {FileType} type - The type of the file.
385
+ * @param {DeleteFileManagerDto} params - The params of the request.
386
+ * @returns {Promise<AxiosResponse>} The Axios Response.
387
+ */
388
+ deleteFiles: (type, params) => {
389
+ return API$B.delete(`/${type}`, { params });
390
+ },
391
+ /**
392
+ * Delete files permanently.
393
+ *
394
+ * @param {FileType} type - The type of the file.
395
+ * @param {object} body - The body of the request.
396
+ * @returns {Promise<AxiosResponse>} The Axios Response.
397
+ */
398
+ deletePermanently: (type, params) => {
399
+ return API$B.delete(`/${type}/delete-permanent`, { params });
400
+ }
401
+ };
402
+ const API$A = createAxiosInstance({
403
+ prefix: "/settings-user-role/v2"
404
+ });
405
+ const RoleServices = {
406
+ /**
407
+ * Retrieves the transaction role for the given group and transaction name.
408
+ * @param {string} groupId - The ID of the group to retrieve the transaction role for.
409
+ * @param {string} transactionName - The name of the transaction to retrieve the role for.
410
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
411
+ */
412
+ getTransactionRole: (groupId, transactionName) => {
413
+ return API$A.get(`/transaction-roles/${groupId}/${transactionName}`);
414
+ },
415
+ getTransactionRoleTypes: (groupKeys, transactionName) => {
416
+ return API$A.get(`/transaction-roles/${transactionName}/types`, {
417
+ params: { groupKeys }
418
+ });
419
+ },
420
+ /**
421
+ * Updates the users assigned to the given transaction role.
422
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
423
+ * @param {string} transactionName - The name of the transaction to update.
424
+ * @param {UpdateUser} body - The request body containing the updated user information.
425
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
426
+ */
427
+ putUpdateUsers: (groupId, transactionName, body) => {
428
+ return API$A.put(
429
+ `/transaction-roles/${groupId}/${transactionName}/update-user`,
430
+ body
431
+ );
432
+ },
433
+ /**
434
+ * Updates the approval level for the given transaction role.
435
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
436
+ * @param {string} transactionName - The name of the transaction to update.
437
+ * @param {UserApprovalLevel} body - The request body containing the updated approval level.
438
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
439
+ */
440
+ putUpdateLevel: (groupId, transactionName, body) => {
441
+ return API$A.put(
442
+ `/transaction-roles/${groupId}/${transactionName}/update-approval-level`,
443
+ body
444
+ );
445
+ },
446
+ /**
447
+ * Updates the group management settings for the given transaction role.
448
+ * @param {string} groupId - The ID of the group the transaction role belongs to.
449
+ * @param {string} transactionName - The name of the transaction to update.
450
+ * @param {GroupManageByParent} body - The request body containing the updated management settings.
451
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
452
+ */
453
+ putUpdateGroupManage: (groupId, transactionName, body) => {
454
+ return API$A.put(
455
+ `/transaction-roles/${groupId}/${transactionName}/update-manage-by-parent`,
456
+ body
457
+ );
458
+ },
459
+ getUserAssignedSystemRole: (userId) => {
460
+ return API$A.get(`/system-roles/user/${userId}`);
461
+ },
462
+ getAssignedUserAmounts: () => {
463
+ return API$A.get("/system-roles/amounts");
464
+ },
465
+ getPermissionUser: (permissionType, params) => {
466
+ if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
467
+ const type = permissionType === "totalControl" ? "total-control" : "read-only";
468
+ return API$A.get(`/system-roles/total-control-read-only/${type}`, {
469
+ params
470
+ });
471
+ }
472
+ return API$A.get(`/system-roles/permission/${permissionType}`, { params });
473
+ },
474
+ getPermissionUserOptions: (permissionType, params) => {
475
+ if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
476
+ const type = permissionType === "totalControl" ? "total-control" : "read-only";
477
+ return API$A.get(`/system-roles/total-control-read-only/${type}/options`, {
478
+ params
479
+ });
480
+ }
481
+ return API$A.get(`/system-roles/permission/${permissionType}/options`, {
482
+ params
483
+ });
484
+ },
485
+ getUserGroups: (params, permissionType) => {
486
+ return API$A.get(`/system-roles/permission/${permissionType}/groups`, {
487
+ params
488
+ });
489
+ },
490
+ postAssignUser: (body, permissionType) => {
491
+ if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
492
+ const type = permissionType === "totalControl" ? "total-control" : "read-only";
493
+ return API$A.post(`/system-roles/total-control-read-only/${type}`, body);
494
+ }
495
+ return API$A.post(`/system-roles/permission/${permissionType}`, body);
496
+ },
497
+ putEditUser: (body, roleId) => {
498
+ return API$A.put(`/system-roles/${roleId}`, body);
499
+ },
500
+ deleteRemoveUser: (body, permissionType) => {
501
+ if (["totalControl", "readOnly"].includes(permissionType ?? "")) {
502
+ const type = permissionType === "totalControl" ? "total-control" : "read-only";
503
+ return API$A.put(`/system-roles/total-control-read-only/${type}`, body);
504
+ }
505
+ return API$A.put("/system-roles", body);
506
+ }
507
+ };
508
+ const API$z = createAxiosInstance({
509
+ prefix: "/settings-attribute/v2/open-api"
510
+ });
511
+ const OpenAPIServices = {
512
+ getOpenAPIDocs: (params) => {
513
+ return API$z.get(`/${params.doc}`);
514
+ },
515
+ putGenerateToken: () => {
516
+ return API$z.put("/generate");
517
+ },
518
+ // This is if the dummy was not dummy
519
+ getToken: () => {
520
+ return API$z.get("");
521
+ },
522
+ putRequestOpenAPI: () => {
523
+ return API$z.put("/request");
524
+ },
525
+ putCancelRequestOpenAPI: () => {
526
+ return API$z.put("/cancel-request");
527
+ }
528
+ };
529
+ const API$y = createAxiosInstance({
530
+ prefix: "/import/v2"
531
+ });
532
+ const ImportServices = {
533
+ getImport: (importUrl, params) => {
534
+ return API$y.get(`/${importUrl}`, { params });
535
+ },
536
+ postImportTemporary: (importUrl, data) => {
537
+ const headers = { "Content-Type": "multipart/form-data" };
538
+ return API$y.post(`/${importUrl}/temporary`, data, { headers });
539
+ },
540
+ deleteImportTemporary: (importUrl, params) => {
541
+ return API$y.delete(`/${importUrl}/temporary`, { params });
542
+ },
543
+ postDuplicateImport: (importUrl, body) => {
544
+ return API$y.post(`/${importUrl}/duplicate`, body);
545
+ },
546
+ putEditImport: (importUrl, body) => {
547
+ return API$y.put(`/${importUrl}`, body);
548
+ },
549
+ postImport: (importUrl, controller, body) => {
550
+ return API$y.post(importUrl, body, { signal: controller.signal });
551
+ },
552
+ putImportCancelProgress: (importUrl) => {
553
+ return API$y.put(`/${importUrl}/cancel-progress`);
554
+ }
555
+ };
556
+ const API$x = createAxiosInstance({
557
+ env: "APP_TAGSAMURAI_API",
558
+ prefix: "/assignment/v2"
559
+ });
560
+ const AssignmentServices$1 = {
561
+ getPreListData: (params) => {
562
+ return API$x.get("/prelist", { params });
563
+ },
564
+ getPreListOptions: (params) => {
565
+ return API$x.get("/prelist/options", { params });
566
+ },
567
+ getRequestData: (params) => {
568
+ return API$x.get("/prelist/request", { params });
569
+ },
570
+ postAddPrelistData: (body) => {
571
+ return API$x.post("/prelist", body);
572
+ },
573
+ getDetailRequestData: (id, params) => {
574
+ return API$x.get(`/transaction/${id}/request`, { params });
575
+ },
576
+ getDetailRequestOption: (params, id) => {
577
+ return API$x.get(`/transaction/${id}/request/options`, { params });
578
+ },
579
+ getTransactionData: (params) => {
580
+ return API$x.get("/transaction", { params });
581
+ },
582
+ getTransactionOptions: (params) => {
583
+ return API$x.get("/transaction/options", { params });
584
+ },
585
+ getDetailTransactionData: (id) => {
586
+ return API$x.get(`/transaction/${id}`);
587
+ },
588
+ getTransactionApproval: (params) => {
589
+ return API$x.get("/approval", { params });
590
+ },
591
+ getApprovalData: (transactionId, params) => {
592
+ return API$x.get(`/approval/transaction/${transactionId}`, { params });
593
+ },
594
+ getTransactionApprovalOptions: (params) => {
595
+ return API$x.get("/approval/options", { params });
596
+ },
597
+ getApprovalOptions: (transactionId, params) => {
598
+ return API$x.get(`/approval/transaction/${transactionId}/options`, {
599
+ params
600
+ });
601
+ },
602
+ getTransactionApprovers: (id) => {
603
+ return API$x.get(`/approval/transaction/${id}/transaction`);
604
+ },
605
+ putApproveApproval: (body) => {
606
+ return API$x.put("/approval/approve", body);
607
+ },
608
+ getDetailTransactionLog: (id) => {
609
+ return API$x.get(`/transaction/request/${id}/transaction-log`);
610
+ },
611
+ getVerifyAsset: (params, id) => {
612
+ return API$x.get(`/transaction/${id}/request/scan`, { params });
613
+ },
614
+ putEditAssignedUser: (id, body) => {
615
+ return API$x.put(`/transaction/${id}/user`, body);
616
+ },
617
+ putEditEmailConfirmation: (id, body) => {
618
+ return API$x.put(`/transaction/${id}/update-email-or-assigned-user`, body);
619
+ },
620
+ postSendConfirmationEmail: (id) => {
621
+ return API$x.post(`/transaction/${id}/send-confirmation-email`);
622
+ },
623
+ postTransaction: (body) => {
624
+ return API$x.post("/transaction", body);
625
+ },
626
+ putTransactionRequest: (id, body) => {
627
+ return API$x.put(`/transaction/${id}/request`, body);
628
+ },
629
+ putCancelTransaction: (body) => {
630
+ return API$x.put("/transaction/cancel", body);
631
+ },
632
+ putCancelAssignmentRequest: (body) => {
633
+ return API$x.put("/transaction/request/cancel", body);
634
+ },
635
+ putVerifyRequest: (body, id) => {
636
+ return API$x.put(`/transaction/${id}/verify-requests`, body);
637
+ },
638
+ putVerifyToken: (body) => {
639
+ return API$x.put("/transaction/verify-token", body);
640
+ },
641
+ putHandoverConfirm: (body) => {
642
+ return API$x.put("/transaction/handover-confirmation", body);
643
+ },
644
+ putAssignHandover: (transaction) => {
645
+ return API$x.put(`/transaction/${transaction}/handover`);
646
+ },
647
+ deletePrelistData: (params) => {
648
+ return API$x.delete("/prelist", { params });
649
+ },
650
+ deleteRequestPrelistData: (body) => {
651
+ return API$x.delete("/prelist/request", { data: body });
652
+ },
653
+ getAssignedByAsset: (params) => {
654
+ return API$x.get("/transaction/request/assigned/by-asset", { params });
655
+ },
656
+ getAssignedByAssetOptions: (params) => {
657
+ return API$x.get("/transaction/request/assigned/by-asset/options", {
658
+ params
659
+ });
660
+ },
661
+ getAssignedByUser: (params) => {
662
+ return API$x.get("/transaction/request/assigned/by-user", { params });
663
+ },
664
+ getAssignedByUserOptions: (params) => {
665
+ return API$x.get("/transaction/request/assigned/by-user/options", { params });
666
+ },
667
+ postUnassignPrelistAsset: (body) => {
668
+ return API$x.post("/prelist", body);
669
+ },
670
+ postUnassignPrelistUser: (body) => {
671
+ return API$x.post("/prelist/unassign/by-user", body);
672
+ },
673
+ putUnassignRequest: (body) => {
674
+ return API$x.put("/transaction/request/unassign", body);
675
+ },
676
+ putReportDone: (id, body) => {
677
+ return API$x.put(`/transaction/${id}/confirm-report-done`, body);
678
+ },
679
+ getHistory: (type, params) => {
680
+ const urlType = type.split(" ").join("-").toLowerCase();
681
+ return API$x.get(`/transaction/history/${urlType}`, { params });
682
+ },
683
+ getHistoryOptions: (params) => {
684
+ return API$x.get("/transaction/history/options", { params });
685
+ },
686
+ getHistoryByTransactionOptions: (params) => {
687
+ return API$x.get("/transaction/history/by-transaction/options", { params });
688
+ },
689
+ putCancelReport: (body) => {
690
+ return API$x.put("/transaction/request/cancel-report", body);
691
+ },
692
+ getTaskAssignment: async (params) => {
693
+ return API$x.get("/transaction/my-asset/task", { params });
694
+ },
695
+ getTaskAssignmentOptions: async (params) => {
696
+ return API$x.get("/transaction/my-asset/task/options", { params });
697
+ },
698
+ getAssignedAsset: async (params) => {
699
+ return API$x.get("/transaction/my-asset/assigned-asset", { params });
700
+ },
701
+ getAssignedAssetOptions: async (params) => {
702
+ return API$x.get("/transaction/my-asset/assigned-asset/options", { params });
703
+ },
704
+ putCancelAssignment: async (body) => {
705
+ return API$x.put("/transaction/cancel", { id: body.id });
706
+ },
707
+ putCancelReportById: async (body) => {
708
+ return API$x.put(`/transaction/request/${body.id}/cancel-report`);
709
+ }
710
+ };
711
+ const API$w = createAxiosInstance({
712
+ prefix: "/assignment/v2"
713
+ });
714
+ const AssignmentServices = {
715
+ ...AssignmentServices$1,
716
+ // Temporary inclusion of methods from OldAssignmentServices. Move individual methods here once they are refactored and ready.
717
+ getTransactionData: (params) => {
718
+ return API$w.get("/transaction", { params });
719
+ },
720
+ getTransactionOptions: (params) => {
721
+ return API$w.get("/transaction/options", { params });
722
+ },
723
+ getDetailTransactionLog: (id) => {
724
+ return API$w.get(`/transaction/request/${id}/transaction-log`);
725
+ },
726
+ postTransaction: (body) => {
727
+ return API$w.post("/transaction", body);
728
+ },
729
+ putTransaction: (body) => {
730
+ return API$w.put("/transaction", body);
731
+ },
732
+ putUnassignTransaction: (body) => {
733
+ return API$w.put("/transaction/unassign", body);
734
+ },
735
+ putCancelReport: (body) => {
736
+ return API$w.put("/transaction/request/cancel-report", body);
737
+ }
738
+ };
739
+ const API$v = createAxiosInstance({
740
+ prefix: "/license/v2"
741
+ });
742
+ const TotalLicenseServices = {
743
+ getTotalLicense: () => {
744
+ return API$v.get("/total-license");
745
+ },
746
+ getPurchasedData: (params) => {
747
+ return API$v.get("/purchase", { params });
748
+ }
749
+ };
750
+ const LicenseConcurrentServices = {
751
+ getConcurrentUserData: () => {
752
+ return API$v.get("/concurrent-user-data");
753
+ },
754
+ getConcurrentUserList: (params) => {
755
+ return API$v.get("/concurrent-user", { params });
756
+ },
757
+ putLogoutUsers: (body) => {
758
+ return API$v.put("/concurrent-user", body);
759
+ }
760
+ };
761
+ const LicenseAssetServices = {
762
+ getFixedAssetPerGroup: (groupId, params) => {
763
+ return API$v.get(`/${groupId}/assets`, { params });
764
+ },
765
+ deleteAssetData: (body) => {
766
+ return API$v.delete("/assets", { data: body });
767
+ }
768
+ };
769
+ const LicenseServices = {
770
+ getFilterOptions: (path, params) => {
771
+ return API$v.get(`/${path}`, { params });
772
+ },
773
+ ...TotalLicenseServices,
774
+ ...LicenseConcurrentServices,
775
+ ...LicenseAssetServices
776
+ };
777
+ const API$u = createAxiosInstance({
778
+ prefix: "/damage-repair-ticketing/v2"
779
+ });
780
+ const DamageServices = {
781
+ getDamageReportList: (params) => {
782
+ return API$u.get("/", { params });
783
+ },
784
+ getDamageReportListFilterOptions: (params) => {
785
+ return API$u.get("/options", { params });
786
+ },
787
+ getDamageReportDetail: (reportId) => {
788
+ return API$u.get(`/${reportId}`);
789
+ },
790
+ putReportDamage: (id, body) => {
791
+ const headers = { "Content-Type": "multipart/form-data" };
792
+ return API$u.put(`/${id}/report-damage`, body, { headers });
793
+ },
794
+ putMarkAsRepaired: (body) => {
795
+ return API$u.put("/repair", body);
796
+ }
797
+ };
798
+ const API$t = createAxiosInstance({
799
+ prefix: "/assets/v2/my-assets"
800
+ });
801
+ const MyAssetServices = {
802
+ getAssigned: async (params) => {
803
+ return API$t.get("/assigned", { params });
804
+ },
805
+ getAssignedOptions: async (params) => {
806
+ return API$t.get("/assigned/options", { params });
807
+ },
808
+ getBorrowed: async (params) => {
809
+ return API$t.get("/borrowed", { params });
810
+ },
811
+ getBorrowedOptions: async (params) => {
812
+ return API$t.get("/borrowed/options", { params });
813
+ },
814
+ getHistory: async (params) => {
815
+ return API$t.get("/history", { params });
816
+ },
817
+ getHistoryOptions: async (params) => {
818
+ return API$t.get("/history/options", { params });
819
+ }
820
+ };
821
+ const PREFIX = "/transfer/v2";
822
+ const PrelistAPI = createAxiosInstance({
823
+ env: "APP_TAGSAMURAI_API",
824
+ prefix: `${PREFIX}/prelist`
825
+ });
826
+ const TransactionAPI = createAxiosInstance({
827
+ env: "APP_TAGSAMURAI_API",
828
+ prefix: `${PREFIX}/transaction`
829
+ });
830
+ const ApprovalAPI = createAxiosInstance({
831
+ env: "APP_TAGSAMURAI_API",
832
+ prefix: `${PREFIX}/approval`
833
+ });
834
+ const TransferServices = {
835
+ // ------ TRANSACTION ------
836
+ getTransactions: (params) => {
837
+ return TransactionAPI.get("/", { params });
838
+ },
839
+ getTransactionDetail: (id) => {
840
+ return TransactionAPI.get(`/${id}`);
841
+ },
842
+ getTransactionDetailAssets: (id, params) => {
843
+ return TransactionAPI.get(`/${id}/request`, { params });
844
+ },
845
+ getRequestFilterOptions: (id, field) => {
846
+ const params = {};
847
+ if (field) {
848
+ params[field] = true;
849
+ } else {
850
+ params.nameOptions = true;
851
+ params.brandOptions = true;
852
+ params.modelOptions = true;
853
+ }
854
+ return TransactionAPI.get(`/${id}/request/options`, { params });
855
+ },
856
+ getOldTransactionLog: (id) => {
857
+ return TransactionAPI.get(`/request/${id}/transaction-log`);
858
+ },
859
+ getOldTransactionOptions: (field) => {
860
+ const params = {};
861
+ params[field] = true;
862
+ return TransactionAPI.get("/options", { params });
863
+ },
864
+ postOldCreateTransaction: (body) => {
865
+ return TransactionAPI.post("/", body);
866
+ },
867
+ putCancelTransactions: (ids) => {
868
+ const body = { id: ids };
869
+ return TransactionAPI.put("/cancel", body);
870
+ },
871
+ putUpdateTransaction: (id, body) => {
872
+ return TransactionAPI.put(`/${id}`, body);
873
+ },
874
+ putCancelRequests: (ids) => {
875
+ const body = { id: ids };
876
+ return TransactionAPI.put("/request/cancel", body);
877
+ },
878
+ getHistoryByTransaction: (params) => {
879
+ return TransactionAPI.get("/history", { params });
880
+ },
881
+ getHistoryByTransactionOptions: (field) => {
882
+ const params = {};
883
+ params[field] = true;
884
+ return TransactionAPI.get("/history/options", { params });
885
+ },
886
+ getHistoryByAsset: (params) => {
887
+ return TransactionAPI.get("/history/by-asset", { params });
888
+ },
889
+ getHistoryByAssetOptions: (field) => {
890
+ const params = {};
891
+ params[field] = true;
892
+ return TransactionAPI.get("/history/by-asset/options", { params });
893
+ },
894
+ getApproverList: (tranasctionId) => {
895
+ return TransactionAPI.get(`/${tranasctionId}/approval-history`);
896
+ },
897
+ putHandoverTransaction: (id, body) => {
898
+ return TransactionAPI.put(`/${id}/handover`, body);
899
+ },
900
+ // ------ PRELIST ------
901
+ getPrelist: (params) => {
902
+ return PrelistAPI.get("/", { params });
903
+ },
904
+ postAddPrelistData: (body) => {
905
+ return PrelistAPI.post("/", body);
906
+ },
907
+ deletePrelist: (ids) => {
908
+ return PrelistAPI.delete("/", {
909
+ params: {
910
+ id: JSON.stringify(ids)
911
+ }
912
+ });
913
+ },
914
+ getPrelistAssets: (id) => {
915
+ const params = { id };
916
+ return PrelistAPI.get("/request", { params });
917
+ },
918
+ // APPROVAL
919
+ getApprovals: (status, params) => {
920
+ const formattedParams = { ...params, status: JSON.stringify([status]) };
921
+ return ApprovalAPI.get("/", { params: formattedParams });
922
+ },
923
+ getApprovalOptions: (status, field) => {
924
+ const params = {
925
+ status: JSON.stringify([status])
926
+ };
927
+ params[field] = true;
928
+ return ApprovalAPI.get("/options", { params });
929
+ },
930
+ getApprovalDetail: (id, approvalType) => {
931
+ const params = {
932
+ groupType: approvalType
88
933
  };
89
- return o.get("/by-id", { params: r });
934
+ return ApprovalAPI.get(`/transaction/${id}`, { params });
935
+ },
936
+ getApprovalDetailOptions: (id, field, approvalType) => {
937
+ const params = {};
938
+ params[field] = true;
939
+ params.groupType = approvalType;
940
+ return ApprovalAPI.get(`/transaction/${id}/options`, { params });
941
+ },
942
+ putUpdateApproval: (body) => {
943
+ return ApprovalAPI.put("/approve", body);
944
+ }
945
+ };
946
+ const API$s = createAxiosInstance({
947
+ prefix: "/transfer/v2"
948
+ });
949
+ const TransferServicesGo = {
950
+ ...TransferServices,
951
+ getTransactionData: (params) => {
952
+ return API$s.get("/transaction", { params });
953
+ },
954
+ getTransactionOptions: (params) => {
955
+ return API$s.get("/transaction/options", { params });
956
+ },
957
+ getTransactionLog: (id) => {
958
+ return API$s.get(`/transaction/request/${id}/transaction-log`);
959
+ },
960
+ postCreateTransaction: (body) => {
961
+ return API$s.post("/transaction", body);
962
+ }
963
+ };
964
+ const API$r = createAxiosInstance({
965
+ env: "APP_TAGSAMURAI_API",
966
+ prefix: "/borrowing/v2"
967
+ });
968
+ const BorrowServices = {
969
+ getTaskBorrowing: async (params) => {
970
+ return API$r.get("/transaction/my-asset/task", { params });
971
+ },
972
+ getTaskBorrowingOptions: async (params) => {
973
+ return API$r.get("/transaction/my-asset/task/options", { params });
974
+ },
975
+ getBorrowedAsset: async (params) => {
976
+ return API$r.get("/transaction/my-asset/borrowed-asset", { params });
977
+ },
978
+ getBorrowedOptions: async (params) => {
979
+ return API$r.get("/transaction/my-asset/borrowed-asset/options", { params });
980
+ },
981
+ getHistory: async (params) => {
982
+ return API$r.get("/transaction/my-asset/history", { params });
983
+ },
984
+ getHistoryOptions: async (params) => {
985
+ return API$r.get("/transaction/my-asset/history/options", { params });
986
+ },
987
+ postAddPrelistData: (body) => {
988
+ return API$r.post("/prelist", body);
989
+ },
990
+ putCancelBorrowing: async (body) => {
991
+ return API$r.put("/transaction/cancel", { id: body.id });
992
+ },
993
+ putCancelExtensionRequest: async (body) => {
994
+ return API$r.put(`/transaction/${body.id}/cancel-extension`);
995
+ },
996
+ putCancelRequestReport: async (body) => {
997
+ return API$r.put(`/transaction/request/${body.id}/cancel-report`);
998
+ },
999
+ putDeclineExtensionRequest: async (body) => {
1000
+ return API$r.put("transaction/request/decline", body);
1001
+ },
1002
+ putUpdateRequestExtension: async (body) => {
1003
+ return API$r.put("transaction/request/duration", body);
1004
+ },
1005
+ // ------------------------------------------------------------------------------------------------------------ //
1006
+ getBorrowingPrelist: (params) => {
1007
+ return API$r.get("/prelist", { params });
1008
+ },
1009
+ getBorrowingPrelistOptions: (params) => {
1010
+ return API$r.get("/prelist/options", { params });
1011
+ },
1012
+ deleteBorrowingPrelist: (id) => {
1013
+ return API$r.delete("/prelist", { data: { id } });
1014
+ },
1015
+ getBorrowingRequest: (params) => {
1016
+ return API$r.get("/prelist/request", { params });
1017
+ },
1018
+ getBorrowingRequestOptions: (params) => {
1019
+ return API$r.get("/prelist/request/options", { params });
1020
+ },
1021
+ postBorrowingRequest: (data) => {
1022
+ return API$r.post("/prelist/request", data);
1023
+ },
1024
+ putBorrowingRequest: (data) => {
1025
+ return API$r.put("/prelist/request", data);
1026
+ },
1027
+ deleteBorrowingRequest: (id) => {
1028
+ return API$r.delete("/prelist/request", { data: { id } });
1029
+ },
1030
+ postBorrowingTransaction: (data) => {
1031
+ return API$r.post("/transaction", data, { params: { sourceWeb: true } });
1032
+ },
1033
+ getBorrowingTransaction: (params) => {
1034
+ return API$r.get("/transaction", { params });
1035
+ },
1036
+ getBorrowingTransactionOptions: (params) => {
1037
+ return API$r.get("/transaction/options", { params });
1038
+ },
1039
+ putCancelBorrowingTransaction: (id) => {
1040
+ return API$r.put("/transaction/cancel", { id });
1041
+ },
1042
+ putCancelBorrowingRequest: (id) => {
1043
+ return API$r.put("/transaction/request/cancel", { id });
1044
+ },
1045
+ putCancelExtendBorrowingRequest: (id) => {
1046
+ return API$r.put("/transaction/request/extend/cancel", { id });
1047
+ },
1048
+ getBorrowingTransactionDetail: (id) => {
1049
+ return API$r.get(`/transaction/${id}`);
1050
+ },
1051
+ getBorrowingTransactionRequestList: (params) => {
1052
+ return API$r.get("/transaction/request", { params });
1053
+ },
1054
+ getBorrowingTransactionRequest: (id, params) => {
1055
+ return API$r.get(`/transaction/${id}/request`, { params });
1056
+ },
1057
+ getBorrowingTransactionRequestOptions: (id, params) => {
1058
+ return API$r.get(`/transaction/${id}/request/options`, { params });
1059
+ },
1060
+ putBorrowingTransactionRequest: (id, data) => {
1061
+ return API$r.put(`/transaction/${id}/request`, data);
1062
+ },
1063
+ getApprovalList: (id) => {
1064
+ return API$r.get(`/approval/transaction/${id}/transaction`);
1065
+ },
1066
+ putUpdateEmailorBorrower: (id, data) => {
1067
+ return API$r.put(`/transaction/${id}/update-email-or-borrower`, data);
1068
+ },
1069
+ getTransactionRequestScan: (id, tag) => {
1070
+ return API$r.get(`/transaction/${id}/request/scan`, { params: { tag } });
1071
+ },
1072
+ putUpdateBorrower: (id, userId) => {
1073
+ return API$r.put(`/transaction/${id}/user`, { user: userId });
1074
+ },
1075
+ postSendConfirmationEmail: (id) => {
1076
+ return API$r.post(`/transaction/${id}/send-confirmation-email`);
1077
+ },
1078
+ putVerifyRequests: (id, data) => {
1079
+ return API$r.put(`/transaction/${id}/verify-requests`, data);
1080
+ },
1081
+ getBorrowingTransactionHistoryByTransaction: (params) => {
1082
+ return API$r.get("/transaction/history/by-transaction", { params });
1083
+ },
1084
+ getBorrowingTransactionHistoryByAsset: (params) => {
1085
+ return API$r.get("/transaction/history/by-asset", { params });
1086
+ },
1087
+ getBorrowingTransactionHistoryOptions: (params) => {
1088
+ return API$r.get("/transaction/history/options", { params });
1089
+ },
1090
+ putBorrowingVerifyToken: (token) => {
1091
+ return API$r.put("/transaction/verify-token", { token });
1092
+ },
1093
+ putBorrowingHandoverConfirmation: (data) => {
1094
+ return API$r.put("/transaction/handover-confirmation", data);
1095
+ },
1096
+ putBorrowingHandover: (id) => {
1097
+ return API$r.put(`/transaction/${id}/handover`);
1098
+ },
1099
+ putBorrowingExtendRequest: (data) => {
1100
+ return API$r.put("/transaction/request/extend", data);
1101
+ },
1102
+ putBorrowingExtendApproval: (data) => {
1103
+ return API$r.put("/approval/approve/request-extension", data, {
1104
+ params: { sourceWeb: true }
1105
+ });
1106
+ },
1107
+ putBorrowingDeclineExtendRequest: (id) => {
1108
+ return API$r.put("/transaction/request/decline", { id });
1109
+ },
1110
+ getBorrowingBorrowedAsset: (params) => {
1111
+ return API$r.get("/transaction/request/borrowed/by-asset", { params });
1112
+ },
1113
+ getBorrowingBorrowedAssetOptions: (params) => {
1114
+ return API$r.get("/transaction/request/borrowed/by-asset/options", {
1115
+ params
1116
+ });
1117
+ },
1118
+ getBorrowingBorrowedBorrower: (params) => {
1119
+ return API$r.get("/transaction/request/borrowed/by-user", { params });
1120
+ },
1121
+ putBorrowingReportDamaged: (id, data) => {
1122
+ return API$r.put(`/transaction/request/${id}/damaged`, data);
1123
+ },
1124
+ putBorrowingReportMissing: (id, data) => {
1125
+ return API$r.put(`/transaction/request/${id}/missing`, data);
1126
+ },
1127
+ putBorrowingReturn: (id) => {
1128
+ return API$r.put("/transaction/request/return", { id });
1129
+ },
1130
+ getBorrowingLog: (id) => {
1131
+ return API$r.get(`/transaction/request/${id}/transaction-log`);
1132
+ },
1133
+ putConfirmReportDone: (id, data) => {
1134
+ return API$r.put(`/transaction/request/${id}/confirm-report-done`, data);
1135
+ },
1136
+ putCancelReportBulk: (id) => {
1137
+ return API$r.put("/transaction/request/cancel-report", {
1138
+ id
1139
+ });
1140
+ },
1141
+ putBorrowingEditExtension: (data) => {
1142
+ return API$r.put("/transaction/request/duration", data);
1143
+ },
1144
+ getApproval: (params) => {
1145
+ return API$r.get("/approval", { params });
1146
+ },
1147
+ getApprovalOptions: (params) => {
1148
+ return API$r.get("/approval/options", { params });
1149
+ },
1150
+ getApprovalTransactionRequest: (id, params) => {
1151
+ return API$r.get(`/approval/transaction/${id}`, { params });
1152
+ },
1153
+ getApprovalTransactionRequestOptions: (id, params) => {
1154
+ return API$r.get(`/approval/transaction/${id}/options`, { params });
1155
+ },
1156
+ putApprovalApprove: (data) => {
1157
+ return API$r.put("/approval/approve", data, {
1158
+ params: { sourceWeb: true }
1159
+ });
1160
+ }
1161
+ };
1162
+ const API$q = createAxiosInstance({
1163
+ prefix: "/borrowing/v2"
1164
+ });
1165
+ const BorrowServicesGo = {
1166
+ ...BorrowServices,
1167
+ // Temporary inclusion of methods from OldBorrowServices. Move individual methods here once they are refactored and ready.
1168
+ getTransactions: async (params) => {
1169
+ return API$q.get("/transaction", { params });
1170
+ },
1171
+ getTransactionOptions: async (params) => {
1172
+ return API$q.get("/transaction/options", { params });
1173
+ },
1174
+ getTransactionLog: async (id) => {
1175
+ return API$q.get(`/transaction/request/${id}/transaction-log`);
1176
+ },
1177
+ postTransaction: async (body) => {
1178
+ return API$q.post("/transaction", body);
1179
+ },
1180
+ putTransaction: async (body) => {
1181
+ return API$q.put("/transaction", body);
1182
+ },
1183
+ putTransactionReturn: async (requestIds) => {
1184
+ const body = { id: requestIds };
1185
+ return API$q.put("/transaction/return", body);
1186
+ },
1187
+ putCancelReport: async (requestIds) => {
1188
+ const body = { id: requestIds };
1189
+ return API$q.put("/transaction/request/cancel-report", body);
90
1190
  }
91
- }, y = n({
92
- prefix: "/tracking/v2/missing"
93
- }), b = {
94
- putFoundAsset: (t, e) => {
95
- const r = { ids: [t], serialNumber: e };
96
- return y.put("/found", r);
1191
+ };
1192
+ const API$p = createAxiosInstance({
1193
+ prefix: "/disposal/v2/"
1194
+ });
1195
+ const DisposalServices = {
1196
+ getReportedDisposal: (params) => {
1197
+ return API$p.get("/report", { params });
1198
+ },
1199
+ getReportedDisposalOptions: (params) => {
1200
+ return API$p.get("/report/options", { params });
1201
+ },
1202
+ postReportDisposal: (body) => {
1203
+ return API$p.post("/report", body);
1204
+ },
1205
+ deleteCancelReport: (params) => {
1206
+ params.isFromDisposal = "false";
1207
+ return API$p.delete("/report/cancel-report", { params });
1208
+ },
1209
+ deleteDeclineReport: (params) => {
1210
+ params.isFromDisposal = "true";
1211
+ return API$p.delete("/report/cancel-report", { params });
1212
+ },
1213
+ getDisposalHistory: (params) => {
1214
+ return API$p.get("/transaction", { params });
1215
+ },
1216
+ getHistoryByAssetOptions: (params) => {
1217
+ return API$p.get("/transaction/options", { params });
1218
+ },
1219
+ getDisposalTransactionLog: (requestId) => {
1220
+ return API$p.get(`/transaction/request/${requestId}/transaction-log`);
1221
+ },
1222
+ postCreateTransaction: (body) => {
1223
+ return API$p.post("/transaction", body);
97
1224
  }
98
- }, P = n({
99
- prefix: "/v2/notification",
100
- env: "APP_LOGS_NOTIFICATION_API"
101
- }), E = {
102
- getNotifications: (t) => P.get("/", { params: t }),
103
- readNotification: (t) => P.put(`/${t}`)
104
- }, L = n({
105
- prefix: "/v2/session-log",
106
- env: "APP_LOGS_NOTIFICATION_API"
107
- }), x = {
108
- postLogout: () => L.post("/logout")
109
- }, c = n({
110
- prefix: "/tag/v2"
111
- }), w = {
112
- getScanQR: (t) => c.get("/qr", { params: { tag: t } }),
113
- getScanRFID: (t) => c.get("/rfid", { params: { tag: t } }),
114
- getRFIDQRTAG: (t) => c.get("/rfid-qr/scan", { params: t })
115
- }, O = n({
116
- prefix: "/tracking/v2/tracking"
117
- }), k = {
118
- putFoundAsset: (t, e, r) => {
119
- const a = {
120
- tag: t,
121
- group: e,
122
- serialNumber: r,
123
- type: "Global"
124
- };
125
- return O.put("/found", { params: a });
1225
+ };
1226
+ const API$o = createAxiosInstance({
1227
+ prefix: "/report/v2/reports"
1228
+ });
1229
+ const ReportServices = {
1230
+ getReportList: (params) => {
1231
+ return API$o.get("/schedules", { params });
1232
+ },
1233
+ getReportSchedule: (scheduleId) => {
1234
+ return API$o.get("/schedules/" + scheduleId);
1235
+ },
1236
+ getUniqueScheduleName: (name) => {
1237
+ return API$o.get("/schedules/unique-name", { params: { name } });
1238
+ },
1239
+ getFilterOptions: (params) => {
1240
+ return API$o.get("/schedules/options", { params });
1241
+ },
1242
+ putSetActive: (body) => {
1243
+ return API$o.put("/schedules/set-active", body);
1244
+ },
1245
+ putEditSchedule: (id, body) => {
1246
+ return API$o.put(`/schedules/${id}`, body);
1247
+ },
1248
+ deleteReports: (id) => {
1249
+ return API$o.delete("/schedules", { params: { id } });
1250
+ },
1251
+ postCreateSchedule: (data) => {
1252
+ return API$o.post("/schedules", data);
1253
+ },
1254
+ postDownloadReport: (data) => {
1255
+ return API$o.post("/download", data, { responseType: "arraybuffer" });
1256
+ },
1257
+ postGenerateReport: (data) => {
1258
+ return API$o.post("/generate", data);
126
1259
  }
127
- }, s = n({
128
- prefix: "/settings-user-role/v2"
129
- }), F = {
130
- reLogin: (t) => s.post("/auth/login", t),
131
- changePassword: (t) => s.put("/users/change-password", t),
132
- getUserDetail: (t) => s.get(`/users/${t}`),
133
- putEditUser: (t, e) => {
134
- const r = { "Content-Type": "multipart/form-data" };
135
- return s.put(`/users/${t}`, e, { headers: r });
136
- },
137
- putDeleteProfilePicture: (t) => s.put(`/users/${t}/delete-profile-picture`),
138
- putCancelEmailChange: (t, e) => s.put("/auth/confirm-email-change/cancel", {
139
- user: t,
140
- companyCode: e
141
- }),
1260
+ };
1261
+ const API$n = createAxiosInstance({
1262
+ prefix: "/settings-attribute/v2"
1263
+ });
1264
+ const getEndpoint = (type) => {
1265
+ return type === "category" ? "category" : "groups";
1266
+ };
1267
+ const GroupCategoryServices = {
1268
+ getGroupCategory: (type, params) => {
1269
+ return API$n.get(`/${getEndpoint(type)}/tree`, { params });
1270
+ },
1271
+ // Doesn't exist in company plan other than "Basic"
1272
+ getGroupCategoryList: (type, groupId, params) => {
1273
+ return API$n.get(`/${getEndpoint(type)}/${groupId}`, { params });
1274
+ },
1275
+ getNames: (type) => {
1276
+ return API$n.get(`/${getEndpoint(type)}/names`);
1277
+ },
1278
+ getCodes: (type) => {
1279
+ return API$n.get(`/${getEndpoint(type)}/codes`);
1280
+ },
1281
+ postCreateGroupCategory: (type, body) => {
1282
+ return API$n.post(`/${getEndpoint(type)}`, body);
1283
+ },
1284
+ putEditGroupCategory: (type, body, objectId) => {
1285
+ return API$n.put(`/${getEndpoint(type)}/${objectId}`, body);
1286
+ },
1287
+ // Doesn't exist in company plan other than "Enterprise"
1288
+ putMoveGroup: (body, objectId) => {
1289
+ return API$n.put(`/groups/${objectId}/move-group`, body);
1290
+ },
1291
+ // Doesn't exist in company plan other than "Enterprise"
1292
+ putEditBulkGroups: async (body) => {
1293
+ return API$n.put("/groups/bulk", body);
1294
+ },
1295
+ deleteGroupCategory: (type, body, objectId) => {
1296
+ return API$n.delete(`/${getEndpoint(type)}/${objectId}`, { data: body });
1297
+ }
1298
+ };
1299
+ const API$m = createAxiosInstance({
1300
+ prefix: "/settings-attribute/v2/alias-code"
1301
+ });
1302
+ const AliasCodeServices = {
1303
+ getAliasCode: () => {
1304
+ return API$m.get("/");
1305
+ },
1306
+ postAliasCode: (data) => {
1307
+ return API$m.post("/", data);
1308
+ },
1309
+ getAliasCodeList: (params) => {
1310
+ return API$m.get(`/${params.object}/code-list`, { params });
1311
+ }
1312
+ };
1313
+ const API$l = createAxiosInstance({
1314
+ prefix: "/settings-attribute/v2/general-settings"
1315
+ });
1316
+ const GeneralSettingsServices = {
1317
+ getGeneralSettings: () => {
1318
+ return API$l.get("/");
1319
+ },
1320
+ putUpdateGeneralSettings: (data) => {
1321
+ return API$l.put("/", data);
1322
+ }
1323
+ };
1324
+ const API$k = createAxiosInstance({
1325
+ prefix: "/settings-attribute/v2/custom-field"
1326
+ });
1327
+ const CustomFieldServices = {
1328
+ getCustomField: async (params) => {
1329
+ return API$k.get("/", { params });
1330
+ },
1331
+ getCustomFieldsByCategory: (category, params) => {
1332
+ return API$k.get(`/${category}`, { params });
1333
+ },
1334
+ getOptions: async (params) => {
1335
+ return API$k.get("/options", { params });
1336
+ },
1337
+ postCreateCustomField: async (params, data) => {
1338
+ return API$k.post("/", data, { params });
1339
+ },
1340
+ putEditCustomField: async (params, data, id) => {
1341
+ return API$k.put(`/${id}`, data, { params });
1342
+ },
1343
+ putChangeStatus: async (params, data) => {
1344
+ return API$k.put("/bulk", data, { params });
1345
+ },
1346
+ deleteCustomField: async (params) => {
1347
+ return API$k.delete("/bulk", { params });
1348
+ },
1349
+ getUsedCustomFields: async () => {
1350
+ return API$k.get("/used-by-assets");
1351
+ }
1352
+ };
1353
+ const API$j = createAxiosInstance({
1354
+ prefix: "/settings-attribute/v2/asset-name-policy"
1355
+ });
1356
+ const AssetPolicyServices = {
1357
+ getList: (params) => {
1358
+ return API$j.get("/", { params });
1359
+ },
1360
+ getListFilterOptions: (params) => {
1361
+ return API$j.get("/options");
1362
+ },
1363
+ putUpdatePolicy: (body) => {
1364
+ return API$j.put("/", body);
1365
+ }
1366
+ };
1367
+ const API$i = createAxiosInstance({
1368
+ prefix: "/settings-user-role/v2/auth"
1369
+ });
1370
+ const onRejected$1 = (error) => {
1371
+ var _a, _b, _c, _d;
1372
+ if (((_a = error.response) == null ? void 0 : _a.status) === 401 || ((_b = error.response) == null ? void 0 : _b.status) === 500 || ((_d = (_c = error.response) == null ? void 0 : _c.data) == null ? void 0 : _d.message) === "jwt malformed") {
1373
+ window.onblur = void 0;
1374
+ window.onfocus = void 0;
1375
+ window.sessionExpired = true;
1376
+ return window.dispatchEvent(new CustomEvent("user:expired"));
1377
+ }
1378
+ return Promise.reject(error);
1379
+ };
1380
+ const AuthServices$1 = {
1381
+ reLogin: (body) => {
1382
+ API$i.interceptors.response.use((response) => {
1383
+ return response;
1384
+ }, onRejected$1);
1385
+ return API$i.post("/login", body);
1386
+ }
1387
+ };
1388
+ const API$h = createAxiosInstance({
1389
+ env: "APP_TAGSAMURAI_API",
1390
+ prefix: "/settings-attribute/v2/asset-name"
1391
+ });
1392
+ const AssetNameServices = {
1393
+ getDropdown: (params) => {
1394
+ return API$h.get("/dropdown", { params });
1395
+ },
1396
+ getAssetNameDetail: (id) => {
1397
+ return API$h.get(`/${id}`);
1398
+ },
1399
+ getAssetsByAssetName: (id, params) => {
1400
+ return API$h.get(`/${id}/list-asset`, { params });
1401
+ },
1402
+ getAssetNameList: (params) => {
1403
+ return API$h.get("/", { params });
1404
+ },
1405
+ getUnpairedAssetName: (params) => {
1406
+ return API$h.get("/unpaired", { params });
1407
+ },
1408
+ getOptions: (params) => {
1409
+ return API$h.get("/options", { params });
1410
+ }
1411
+ };
1412
+ const API$g = createAxiosInstance({
1413
+ env: "APP_TAGSAMURAI_API",
1414
+ prefix: "/audit/v2"
1415
+ });
1416
+ const API_IOT = createAxiosInstance({
1417
+ env: "APP_TAGSAMURAI_API",
1418
+ prefix: "/iot/v2"
1419
+ });
1420
+ const TaskServices = {
1421
+ getTaskList: (params) => {
1422
+ return API$g.get("/audit/task", { params });
1423
+ },
1424
+ getTaskHistory: (params) => {
1425
+ return API$g.get("/audit/task/history", { params });
1426
+ },
1427
+ extendAuditDuration: (body, id) => {
1428
+ return API$g.put(`/audit/task/${id}/extend`, body);
1429
+ },
1430
+ stopAudit: (id, body) => {
1431
+ return API$g.put(`/audit/task/${id}/stop`, body);
1432
+ },
1433
+ cancelAuditTask: (id) => {
1434
+ return API$g.put(`/audit/task/${id}/cancel`);
1435
+ },
1436
+ getTaskDetail: (id) => {
1437
+ return API$g.get(`/audit/task/${id}`);
1438
+ },
1439
+ getInAuditTask: (params) => {
1440
+ return API$g.get("/audit/scheduled-asset/in-audit", { params });
1441
+ },
1442
+ getTaskDetailAssets: (params, taskId) => {
1443
+ return API$g.get(`/audit/task/${taskId}/view-asset-detail`, { params });
1444
+ },
1445
+ getAuditedTask: (params) => {
1446
+ return API$g.get("/audit/scheduled-asset/audited", { params });
1447
+ },
1448
+ getAuditLog: (id) => {
1449
+ return API$g.get(`/audit/scheduled-asset/${id}/log`);
1450
+ },
1451
+ getTaskEventLog: (params) => {
1452
+ return API$g.get("/audit/task/task-event-log", { params });
1453
+ },
1454
+ getTaskTimelineEventLog: (idTask) => {
1455
+ return API$g.get(`/audit/task/${idTask}/event-log`);
1456
+ },
1457
+ scanAssetTAG: (body, idTask) => {
1458
+ return API$g.put(`/audit/task/${idTask}/scan`, body);
1459
+ },
1460
+ submitAssetCondition: (body, idAsset) => {
1461
+ const headers = body.picture ? { "Content-Type": "multipart/form-data" } : { "Content-Type": "application/json" };
1462
+ return API$g.put(`/audit/scheduled-asset/${idAsset}/update/condition`, body, {
1463
+ headers
1464
+ });
1465
+ },
1466
+ submitAuditedAsset: (idTask) => {
1467
+ return API$g.put(`/audit/task/${idTask}/submit`);
1468
+ },
1469
+ reportTAGMissing: (note, idAsset) => {
1470
+ return API$g.put(`/audit/scheduled-asset/${idAsset}/report-missing`, {
1471
+ note
1472
+ });
1473
+ },
1474
+ reportTAG: (id, body) => {
1475
+ return API$g.put(`/audit/scheduled-asset/${id}/tag-reported`, body);
1476
+ },
1477
+ getTaskInitialState: (idTask) => {
1478
+ return API$g.get(`/audit/scheduled-asset/${idTask}`);
1479
+ },
1480
+ cancelTaskReport: (scheduledAssetId) => {
1481
+ return API$g.put(`/audit/scheduled-asset/${scheduledAssetId}/cancel-report`);
1482
+ }
1483
+ };
1484
+ const ScheduleServices = {
1485
+ getScheduleList: (params) => {
1486
+ return API$g.get("/audit/schedule", { params });
1487
+ },
1488
+ getScheduleDetail: (id) => {
1489
+ return API$g.get("/audit/schedule/" + id);
1490
+ },
1491
+ deleteSchedule: (scheduleId) => {
1492
+ return API$g.put("/audit/schedule/bulk-delete", {
1493
+ id: scheduleId
1494
+ });
1495
+ },
1496
+ inactivateSchedule: (id) => {
1497
+ return API$g.put("/audit/schedule/bulk-inactive", { id });
1498
+ },
1499
+ activateSchedule: (id) => {
1500
+ return API$g.put("/audit/schedule/bulk-active", { id });
1501
+ },
1502
+ createNewSchedule: (body) => {
1503
+ return API$g.post("/audit/schedule", body);
1504
+ },
1505
+ editSchedule: (body, id) => {
1506
+ return API$g.put("/audit/schedule/" + id, body);
1507
+ },
1508
+ getActiveAsset: (id, params) => {
1509
+ return API$g.get(`/audit/asset/schedule/${id}`, { params });
1510
+ },
1511
+ setAssetActivation: (body) => {
1512
+ return API$g.put("/audit/asset/activation", body);
1513
+ },
1514
+ getAuditableAssetAmount: (params) => {
1515
+ return API$g.get("/audit/asset/auditable/total-asset", { params });
1516
+ }
1517
+ };
1518
+ const IOTAuditServices = {
1519
+ getReaderList: (params) => {
1520
+ return API_IOT.get("/iot/antenna/available", { params });
1521
+ },
1522
+ putSetReaderParams: (body) => {
1523
+ return API_IOT.put("/iot/reader/set-scan-params", body);
1524
+ },
1525
+ putAuditUsingIOT: (auditId, body) => {
1526
+ return API_IOT.put(`/iot/audit/${auditId}`, body);
1527
+ },
1528
+ getReaderTotalAsset: (taskId, params) => {
1529
+ return API$g.get(`/audit/task/${taskId}/reader/total-assets`, {
1530
+ params
1531
+ });
1532
+ },
1533
+ getAssetList: (params) => {
1534
+ return API$g.get("/audit/scheduled-asset", { params });
1535
+ }
1536
+ };
1537
+ const FilterServices = {
1538
+ getFilterOptions: (path, params) => {
1539
+ return API$g.get(`/${path}/options`, { params });
1540
+ },
1541
+ getIOTFilterOptions: (path, params) => {
1542
+ return API_IOT.get(`/${path}/options`, { params });
1543
+ }
1544
+ };
1545
+ const AuditableAssetServices = {
1546
+ getAudiableAssetList: (params) => {
1547
+ return API$g.get("/audit/asset/auditable", { params });
1548
+ },
1549
+ getAuditableAssetDetail: (id) => {
1550
+ return API$g.get("/audit/asset/auditable/" + id);
1551
+ }
1552
+ };
1553
+ const ApprovalServices = {
1554
+ getApprovalList: (idTask, approvalRound) => {
1555
+ return API$g.get(`/audit/approval/task/${idTask}/transaction`, {
1556
+ params: {
1557
+ approvalRound
1558
+ }
1559
+ });
1560
+ }
1561
+ };
1562
+ const AuditServices = {
1563
+ getAudit: (assetId, params) => {
1564
+ return API$g.get(`/audit/schedule/asset-detail/${assetId}`, { params });
1565
+ },
1566
+ getAuditOption: (assetId, params) => {
1567
+ return API$g.get(`/audit/schedule/asset-detail/${assetId}/options`, {
1568
+ params
1569
+ });
1570
+ },
1571
+ putSetActive: (body) => {
1572
+ return API$g.put("/audit/asset/activation", body);
1573
+ },
1574
+ ...TaskServices,
1575
+ ...ScheduleServices,
1576
+ ...IOTAuditServices,
1577
+ ...FilterServices,
1578
+ ...AuditableAssetServices,
1579
+ ...ApprovalServices
1580
+ };
1581
+ const API$f = createAxiosInstance({
1582
+ env: "APP_TAGSAMURAI_API",
1583
+ prefix: "/settings-attribute/v2/brands"
1584
+ });
1585
+ const BrandServices = {
1586
+ getDropdown: (params) => {
1587
+ return API$f.get("/dropdown", { params });
1588
+ }
1589
+ };
1590
+ const API$e = createAxiosInstance({
1591
+ prefix: "/v2",
1592
+ env: "APP_LOGS_NOTIFICATION_API"
1593
+ });
1594
+ const ChangelogServices = {
1595
+ getActionLog: (params) => {
1596
+ return API$e.get("/change-log", { params });
1597
+ },
1598
+ getActionLogOption: (params) => {
1599
+ return API$e.get("/change-log/options", { params });
1600
+ },
1601
+ getSessionLogList: (params) => {
1602
+ return API$e.get("/session-log", { params });
1603
+ },
1604
+ getUserDetailSystemLogList: (params) => {
1605
+ return API$e.get("/change-log", { params });
1606
+ },
1607
+ getUserDetailSystemLogOption: (params) => {
1608
+ return API$e.get("/change-log/options", { params });
1609
+ },
142
1610
  /**
143
- *
144
- * @param id {string} User's _id
145
- * @param type {"Global" | "Group"} Whether the system role's type is global or group
146
- * @param params {Record<string, unknown>}
1611
+ * Retrieves the transaction log.
1612
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
147
1613
  */
148
- getUserDetailSystemRoles: (t, e, r) => s.get(`/user-detail/${t}/system-roles`, {
149
- params: {
150
- ...r,
151
- type: e
152
- }
153
- }),
154
- // User Detail
155
- getUserDetailSystemRoleList: (t, e) => s.get(`/user-detail/${t}/system-role-list`, { params: e }),
156
- getUserDetailSystemRoleOptions: (t, e) => s.get(`/user-detail/${t}/system-role/option`, { params: e }),
157
- getUserDetailTransactionRoleList: (t, e) => s.get(`/user-detail/${t}/transaction-role-list`, { params: e }),
158
- getUserDetailUserLogBorrowingList: (t, e) => s.get(`/users-log/${t}/borrowing`, { params: e }),
159
- getUserDetailUserLogAssignmentList: (t, e) => s.get(`/users-log/${t}/assignment`, { params: e }),
160
- getUserDetailUserLogBorrowingOption: (t, e) => s.get(`/users-log/${t}/borrowing/option`, { params: e }),
161
- getUserDetailUserLogAssignmentOption: (t, e) => s.get(`/users-log/${t}/assignment/option`, { params: e }),
162
- getUserDetailTransactionAdminLogList: (t, e) => s.get(`/users-log/${t}/transaction-log`, { params: e }),
163
- getUserDetailTransactionAdminLogOption: (t, e) => s.get(`/users-log/${t}/transaction-log/option`, { params: e })
164
- }, u = n({
1614
+ getTransactionLog: (params) => {
1615
+ return API$e.get("/transaction-log", { params });
1616
+ },
1617
+ /**
1618
+ * Retrieves the transaction log options.
1619
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
1620
+ */
1621
+ getTransactionLogOption: (params) => {
1622
+ return API$e.get("/transaction-log/options", { params });
1623
+ },
1624
+ postScanLog: (body) => {
1625
+ return API$e.post("/transaction-log/scan-log", body);
1626
+ }
1627
+ };
1628
+ const API$d = ({ headers = {}, params = {} } = {}) => {
1629
+ const BASE_URL = getBaseURL("APP_COUNTRY_STATE_API");
1630
+ const API_KEY = getBaseURL("APP_COUNTRY_STATE_API_KEY");
1631
+ const instance = axios.create({
1632
+ baseURL: `${BASE_URL}/v1`,
1633
+ headers: {
1634
+ "Content-type": "application/json",
1635
+ "X-CSCAPI-KEY": API_KEY,
1636
+ ...headers
1637
+ },
1638
+ params
1639
+ });
1640
+ return instance;
1641
+ };
1642
+ const CountryStateServices = {
1643
+ getCountry: () => {
1644
+ return API$d().get("/countries");
1645
+ },
1646
+ getState: (country) => {
1647
+ return API$d().get(`/countries/${country}/states`);
1648
+ },
1649
+ getCity: (country, state) => {
1650
+ return API$d().get(`/countries/${country}/states/${state}/cities`);
1651
+ }
1652
+ };
1653
+ const API$c = createAxiosInstance({
1654
+ env: "APP_TAGSAMURAI_API",
1655
+ prefix: "/dashboard/v2/dashboard"
1656
+ });
1657
+ const DashboardServices = {
1658
+ getLatestTask: (params) => {
1659
+ return API$c.get("/latest-task", { params });
1660
+ },
1661
+ getSummary: (params) => {
1662
+ return API$c.get("/summary", { params });
1663
+ }
1664
+ };
1665
+ const API$b = createAxiosInstance({
1666
+ env: "APP_GLOBAL_SETTINGS_API",
1667
+ prefix: "/v1/global-settings/auth"
1668
+ });
1669
+ const onRejected = (error) => {
1670
+ var _a, _b, _c, _d;
1671
+ if (((_a = error.response) == null ? void 0 : _a.status) === 401 || ((_b = error.response) == null ? void 0 : _b.status) === 500 || ((_d = (_c = error.response) == null ? void 0 : _c.data) == null ? void 0 : _d.message) === "jwt malformed") {
1672
+ window.onblur = void 0;
1673
+ window.onfocus = void 0;
1674
+ window.sessionExpired = true;
1675
+ return window.dispatchEvent(new CustomEvent("user:expired"));
1676
+ }
1677
+ return Promise.reject(error);
1678
+ };
1679
+ const AuthServices = {
1680
+ login: (form) => {
1681
+ const body = { ...form, isMobile: false };
1682
+ return API$b.post("/login", body);
1683
+ },
1684
+ reLogin: (body) => {
1685
+ API$b.interceptors.response.use((response) => {
1686
+ return response;
1687
+ }, onRejected);
1688
+ return API$b.post("/login", body);
1689
+ },
1690
+ requestOTP: (email) => {
1691
+ const body = { email };
1692
+ return API$b.post("/request-otp", body);
1693
+ },
1694
+ requestResetPassLink: (email) => {
1695
+ const body = { email };
1696
+ return API$b.post("/request-reset-link", body);
1697
+ },
1698
+ setPassword: (body) => {
1699
+ return API$b.post("/set-password", body);
1700
+ },
1701
+ verifyToken: (token) => {
1702
+ return API$b.get(`/verify-token/${token}`);
1703
+ },
1704
+ confirmEmailChange: (token) => {
1705
+ const body = { token };
1706
+ return API$b.put("/confirm-email-change/confirm", body);
1707
+ },
1708
+ postLogout: () => {
1709
+ return API$b.post("/logout");
1710
+ }
1711
+ };
1712
+ const API$a = createAxiosInstance({
165
1713
  env: "APP_ADMIN_API",
166
1714
  prefix: "/settings-attribute/languages"
167
- }), M = {
1715
+ });
1716
+ const I18nService = {
168
1717
  /**
169
1718
  * Fetch all translation messages for a specific locale.
170
1719
  * @param locale The locale code (e.g., 'en', 'id').
171
1720
  * @returns A promise resolving to a key-value record of messages.
172
1721
  */
173
- getMessages: (t) => u.get(`/${t}/translations`),
1722
+ getMessages: (isoCode) => {
1723
+ return API$a.get(`/${isoCode}/translations`);
1724
+ },
174
1725
  /**
175
1726
  * Fetch all available lang options for LanguageDropdown and LanguageSwitcher
176
1727
  *
177
1728
  * @returns Promise Array of options
178
1729
  */
179
1730
  getLanguageOptions: async () => {
180
- const { data: t } = await u.get(
181
- "/dropdown"
182
- );
183
- return t.data;
1731
+ const { data } = await API$a.get("/dropdown");
1732
+ return data.data;
184
1733
  },
185
1734
  /**
186
1735
  * Fetch single lang option meta data
@@ -188,11 +1737,11 @@ const m = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
188
1737
  * @param isoCode The locale code (e.g., 'en', 'id').
189
1738
  * @returns Promise LanguageMeta
190
1739
  */
191
- getLanguageOptionMeta: async (t) => {
192
- const { data: e } = await u.get(
193
- "/dropdown/" + t
1740
+ getLanguageOptionMeta: async (isoCode) => {
1741
+ const { data } = await API$a.get(
1742
+ "/dropdown/" + isoCode
194
1743
  );
195
- return e.data;
1744
+ return data.data;
196
1745
  },
197
1746
  /**
198
1747
  * Translate a specific text to the target locale.
@@ -200,46 +1749,318 @@ const m = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
200
1749
  * @param key Unique translation key.
201
1750
  * @param locale Target locale code.
202
1751
  */
203
- translateText: async (t, e) => {
204
- const { data: r } = await u.post("/translate", {
205
- q: t,
206
- target: e
1752
+ translateText: async (key, locale) => {
1753
+ const { data } = await API$a.post("/translate", {
1754
+ q: key,
1755
+ target: locale
207
1756
  });
208
- return r.data.translations[t];
1757
+ return data.data.translations[key];
1758
+ }
1759
+ };
1760
+ const API$9 = createAxiosInstance({
1761
+ env: "APP_TAGSAMURAI_API",
1762
+ prefix: "/settings-attribute/v2/models"
1763
+ });
1764
+ const ModelTypeServices = {
1765
+ getDropdown: (params) => {
1766
+ return API$9.get("/dropdown", { params });
1767
+ }
1768
+ };
1769
+ const API$8 = createAxiosInstance({
1770
+ prefix: "/v2",
1771
+ env: "APP_LOGS_NOTIFICATION_API"
1772
+ });
1773
+ const NotificationApprovalServices = {
1774
+ getTotalApprovals: () => {
1775
+ return API$8.get("/approval/count");
1776
+ }
1777
+ };
1778
+ const API$7 = createAxiosInstance({
1779
+ env: "APP_TAGSAMURAI_API",
1780
+ prefix: "/iot/v2/reader"
1781
+ });
1782
+ const ReaderServices = {
1783
+ getData: (params) => {
1784
+ return API$7.get("/", { params });
1785
+ },
1786
+ getDataOptions: (params) => {
1787
+ return API$7.get("/options", { params });
1788
+ },
1789
+ getActivityLogData: (params) => {
1790
+ return API$7.get("/activity-log", { params });
1791
+ },
1792
+ getActivityLogOptions: (params) => {
1793
+ return API$7.get("/activity-log/options", { params });
1794
+ },
1795
+ getDataById: (id) => {
1796
+ return API$7.get(`/${id}`);
1797
+ },
1798
+ getChangeLog: (params) => {
1799
+ return API$7.get(`/${params.id}/change-log`, { params });
1800
+ },
1801
+ getChangeLogOptions: (params) => {
1802
+ return API$7.get(`/${params.id}/change-log/options`, { params });
1803
+ },
1804
+ putData: (id, body) => {
1805
+ return API$7.put(`/${id}`, body);
1806
+ }
1807
+ };
1808
+ const API$6 = createAxiosInstance({
1809
+ env: "APP_TAGSAMURAI_API",
1810
+ prefix: "/repair/v2"
1811
+ });
1812
+ const RepairServices = {
1813
+ getRepairList: (params) => {
1814
+ return API$6.get("/my-asset/repair", { params });
1815
+ },
1816
+ getFilterOptions: (params) => {
1817
+ return API$6.get("/my-asset/repair/options", { params });
1818
+ },
1819
+ getAssetRepairTicketing: (assetId, params) => {
1820
+ return API$6.get(`/repair/${assetId}/asset-repair-detail`, { params });
1821
+ },
1822
+ putConfirmRepair: (repairId) => {
1823
+ return API$6.put(`/repair/${repairId}/confirm-repair`);
1824
+ }
1825
+ };
1826
+ const API$5 = createAxiosInstance({
1827
+ env: "APP_TAGSAMURAI_API",
1828
+ prefix: "/routine/v2"
1829
+ });
1830
+ const RoutineServices = {
1831
+ getMaintenance: (assetId, params) => {
1832
+ return API$5.get(`/routine-task/${assetId}`, { params });
1833
+ },
1834
+ getMaintenanceOption: (assetId, params) => {
1835
+ return API$5.get(`/routine-task/${assetId}/options`, { params });
1836
+ },
1837
+ putSetActive: (body) => {
1838
+ return API$5.put("/maintenable-asset/set-active", body);
1839
+ }
1840
+ };
1841
+ const API$4 = createAxiosInstance({
1842
+ env: "APP_TAGSAMURAI_API",
1843
+ prefix: "/routine/v2"
1844
+ });
1845
+ const ServiceCenterServices = {
1846
+ getList: (params) => {
1847
+ return API$4.get("/service-center", { params });
1848
+ },
1849
+ postList: (body) => {
1850
+ return API$4.post("/service-center", body);
1851
+ },
1852
+ putList: (id, body) => {
1853
+ return API$4.put(`/service-center/${id}`, body);
1854
+ },
1855
+ putActivate: (body) => {
1856
+ return API$4.put("/service-center/bulk", body);
1857
+ },
1858
+ getDetailList: (id) => {
1859
+ return API$4.get(`/service-center/${id}`);
1860
+ },
1861
+ getListOptions: (params) => {
1862
+ return API$4.get("/service-center/options", { params });
1863
+ },
1864
+ deleteList: (params) => {
1865
+ return API$4.delete("/service-center", { params });
1866
+ },
1867
+ // Activities
1868
+ getActivities: (params) => {
1869
+ return API$4.get("/service-activities", { params });
1870
+ },
1871
+ getActivityOptions: (params) => {
1872
+ return API$4.get("/service-activities/options", { params });
1873
+ },
1874
+ getActivityDetail: (id) => {
1875
+ return API$4.get(`/service-activities/${id}`);
1876
+ },
1877
+ getActivityLog: (id) => {
1878
+ return API$4.get(`/service-activities/${id}/activity-log`);
1879
+ }
1880
+ };
1881
+ const API$3 = createAxiosInstance({
1882
+ prefix: "/v2/session-log",
1883
+ env: "APP_LOGS_NOTIFICATION_API"
1884
+ });
1885
+ const SessionLogServices = {
1886
+ postLogout: () => {
1887
+ return API$3.post("/logout");
1888
+ }
1889
+ };
1890
+ const API$2 = createAxiosInstance({
1891
+ env: "APP_TAGSAMURAI_API",
1892
+ prefix: "/tag/v2"
1893
+ });
1894
+ const TAGServices = {
1895
+ getScanQR: (tag) => {
1896
+ return API$2.get("/qr", { params: { tag } });
1897
+ },
1898
+ getScanRFID: (tag) => {
1899
+ return API$2.get("/rfid", { params: { tag } });
1900
+ },
1901
+ getRFIDQRTAG: (params) => {
1902
+ return API$2.get("/rfid-qr/scan", { params });
1903
+ },
1904
+ getEventLog: (params) => {
1905
+ return API$2.get("/tag-transaction/event-log", { params });
1906
+ },
1907
+ // Tab All
1908
+ getRfidQrAll: (path, params) => {
1909
+ return API$2.get(`/${path}`, { params });
1910
+ },
1911
+ // Tab Paired
1912
+ getRfidQrPaired: (tagType, viewBy, params) => {
1913
+ return API$2.get(`/${tagType}/paired/${viewBy}`, { params });
1914
+ },
1915
+ postAddTAGtoPrelist: (body, destination) => {
1916
+ return API$2.post(`/prelist/${destination}/asset-name`, body);
1917
+ },
1918
+ postAddTAGtoReplacePrelist: (body) => {
1919
+ return API$2.post("/prelist/replace-tag", body);
1920
+ },
1921
+ postAddTAGToPrelistUnpair: (body) => {
1922
+ return API$2.post("/prelist/unpair-tag", body);
1923
+ },
1924
+ postAddTAGtoPending: (body) => {
1925
+ return API$2.post("/pending-changes", body);
1926
+ },
1927
+ // Available Tab
1928
+ getRFIDQrAvailable: (tagType, params) => {
1929
+ return API$2.get(`/${tagType}/available`, { params });
1930
+ },
1931
+ // Damaged TAB
1932
+ getRFIDQrDamaged: (tagType, params) => {
1933
+ return API$2.get(`/${tagType}/damaged`, { params });
1934
+ },
1935
+ // RFID and QR Module
1936
+ getRFIDandQRList: (params) => {
1937
+ return API$2.get("/rfid-qr", { params });
1938
+ },
1939
+ deleteUnpairTAG: (body) => {
1940
+ return API$2.delete("/rfid-qr", { data: { data: body } });
1941
+ },
1942
+ postPairTAG: (body) => {
1943
+ return API$2.post("/rfid-qr", { body: { data: body } });
1944
+ },
1945
+ // RFID To Be Returned
1946
+ getToBeReturnedTAGList: (params) => {
1947
+ return API$2.get("/rfid/to-be-returned", { params });
1948
+ },
1949
+ // Handover TAG
1950
+ putHandoverTAG: (body) => {
1951
+ return API$2.put("/rfid/handover", { body: { data: body } });
1952
+ },
1953
+ // Table Filter
1954
+ getFilterOptions: (path, params) => {
1955
+ return API$2.get(`/${path}/options`, { params });
1956
+ },
1957
+ getHolderListOptions: (params) => {
1958
+ return API$2.get("/rfid/holder-list/options", { params });
1959
+ },
1960
+ getHolderList: (params) => {
1961
+ return API$2.get("/rfid/holder-list", { params });
1962
+ },
1963
+ putAuditTAG: (body, tagType) => {
1964
+ return API$2.put(`/${tagType}/audit`, body);
1965
+ },
1966
+ postLogAudit: (body) => {
1967
+ return API$2.post("/tag-transaction/log-audit", body);
1968
+ },
1969
+ postCreateQr: (amount) => {
1970
+ const body = { amount };
1971
+ return API$2.post("/qr", body);
1972
+ },
1973
+ putReportTAG: (id, body) => {
1974
+ return API$2.put(`/tag-transaction/report/${id}`, body);
1975
+ },
1976
+ putReportTAGBulk: (body) => {
1977
+ return API$2.put("/tag-transaction/report/bulk", body);
1978
+ },
1979
+ putDeclineReport: (body, tagType) => {
1980
+ return API$2.put(`/report/decline-report/${tagType}`, body);
1981
+ }
1982
+ };
1983
+ const API$1 = createAxiosInstance({
1984
+ env: "APP_TAGSAMURAI_API",
1985
+ prefix: "/tracking/v2/tracking"
1986
+ });
1987
+ const MissingServices = {
1988
+ getTrackingDetail: (trackingId) => {
1989
+ return API$1.get(`/${trackingId}`);
1990
+ },
1991
+ putFoundAsset: (tag, groupId, serialNumber) => {
1992
+ const params = {
1993
+ tag,
1994
+ group: groupId,
1995
+ serialNumber,
1996
+ type: "Global"
1997
+ };
1998
+ return API$1.put("/scan", void 0, { params });
1999
+ },
2000
+ putReportPermanentlyMissing: (trackingId, body) => {
2001
+ return API$1.put(`/report-permanently-missing/${trackingId}`, body);
2002
+ },
2003
+ putMoveBack: (body) => {
2004
+ return API$1.put("/tracking/move-back", body);
2005
+ }
2006
+ };
2007
+ const API = createAxiosInstance({
2008
+ env: "APP_TAGSAMURAI_API",
2009
+ prefix: "/settings-attribute/v2/transaction-settings"
2010
+ });
2011
+ const TransactionSettingServices = {
2012
+ getData: () => {
2013
+ return API.get("/");
2014
+ },
2015
+ putData: (data) => {
2016
+ return API.put("/", data);
209
2017
  }
210
- }, d = n({
211
- prefix: "/dashboard/v2/dashboard"
212
- }), V = {
213
- getLatestTask: (t) => d.get("/latest-task", { params: t }),
214
- getSummary: (t) => d.get("/summary", { params: t })
215
- }, p = n({
216
- prefix: "/alias-code/api/alias-code"
217
- }), B = {
218
- getAliasCode: () => p.get("/"),
219
- postAliasCode: (t) => p.post("/", t),
220
- getAliasCodeList: (t) => p.get(`/${t.object}/code-list`, { params: t })
221
- }, I = n({
222
- prefix: "/settings-attribute/v2/general-settings"
223
- }), j = {
224
- getGeneralSettings: () => I.get("/"),
225
- putUpdateGeneralSettings: (t) => I.put("/", t)
226
2018
  };
227
2019
  export {
228
- B as AliasCodeServices,
229
- R as AssetServices,
230
- G as ChangelogServices,
231
- V as DashboardServices,
232
- j as GeneralSettingsServices,
233
- C as GroupCategoryServices,
234
- M as I18nService,
235
- b as MissingServices,
236
- N as NotificationApprovalServices,
237
- E as NotificationServices,
238
- x as SessionLogServices,
239
- w as TAGServices,
240
- k as TrackingServices,
241
- F as UserServices,
242
- _ as getBaseURL,
243
- D as getImageURL,
244
- h as queryParamsStringfy
2020
+ AliasCodeServices,
2021
+ AssetNameServices,
2022
+ AssetPolicyServices,
2023
+ AssetServices,
2024
+ AssignmentServices,
2025
+ AuditServices,
2026
+ AuthServices$1 as AuthServices,
2027
+ BorrowServicesGo as BorrowServices,
2028
+ BrandServices,
2029
+ ChangelogServices,
2030
+ CountryStateServices,
2031
+ CustomFieldServices,
2032
+ DamageServices,
2033
+ DashboardServices,
2034
+ DisposalServices,
2035
+ FileManagerServices,
2036
+ GeneralSettingsServices,
2037
+ AuthServices as GlobalAuthServices,
2038
+ GroupCategoryServices,
2039
+ I18nService,
2040
+ ImportServices,
2041
+ LicenseServices,
2042
+ ChangelogServices$1 as LogServices,
2043
+ MissingServices$1 as MissingServices,
2044
+ ModelTypeServices,
2045
+ MyAssetServices,
2046
+ NotificationApprovalServices,
2047
+ NotificationServices,
2048
+ OpenAPIServices,
2049
+ ReaderServices,
2050
+ RepairServices,
2051
+ ReportServices,
2052
+ RoleServices,
2053
+ RoutineServices,
2054
+ ServiceCenterServices,
2055
+ SessionLogServices,
2056
+ SubUserServices,
2057
+ TAGServices,
2058
+ MissingServices as TrackingServices,
2059
+ TransactionSettingServices,
2060
+ TransferServicesGo as TransferServices,
2061
+ UserServices,
2062
+ getAssetsFile,
2063
+ getBaseURL,
2064
+ getImageURL,
2065
+ queryParamsStringfy
245
2066
  };