@tagsamurai/fats-api-services 1.0.0-alpha.3 → 1.0.0-alpha.300

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