@tagsamurai/fats-api-services 1.0.0-alpha.28 → 1.0.0-alpha.280

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 (155) hide show
  1. package/api-services.es.js +2414 -279
  2. package/api-services.system.js +2418 -1
  3. package/main.d.ts +44 -17
  4. package/package.json +6 -3
  5. package/src/dto/accountCode.dto.d.ts +4 -0
  6. package/src/dto/assetDetail.dto.d.ts +91 -0
  7. package/src/dto/assetName.dto.d.ts +8 -0
  8. package/src/dto/assetPolicyService.dto.d.ts +19 -0
  9. package/src/dto/assetService.dto.d.ts +136 -0
  10. package/src/dto/assignment.dto.d.ts +81 -0
  11. package/src/dto/audit.dto.d.ts +19 -0
  12. package/src/dto/borrow.dto.d.ts +35 -0
  13. package/src/dto/customField.dto.d.ts +9 -0
  14. package/src/dto/damageService.dto.d.ts +23 -0
  15. package/src/dto/depreciationData.dto.d.ts +16 -0
  16. package/src/dto/disposal.dto.d.ts +66 -0
  17. package/src/dto/fileManager.dto.d.ts +25 -0
  18. package/src/dto/globalAuth.dto.d.ts +18 -0
  19. package/src/dto/groupCategoryService.dto.d.ts +28 -1
  20. package/src/dto/importData.dto.d.ts +7 -0
  21. package/src/dto/importTemporaryData.dto.d.ts +6 -0
  22. package/src/dto/license.dto.d.ts +76 -0
  23. package/src/dto/log.dto.d.ts +16 -11
  24. package/src/dto/maintenanceRoutine.dto.d.ts +61 -0
  25. package/src/dto/missing.dto.d.ts +12 -0
  26. package/src/dto/myAsset.dro.d.ts +12 -0
  27. package/src/dto/notification.dto.d.ts +3 -1
  28. package/src/dto/oldBorrowService.dto.d.ts +102 -0
  29. package/src/dto/oldDamageService.dto.d.ts +7 -0
  30. package/src/dto/oldIOTService.dto.d.ts +17 -0
  31. package/src/dto/oldRepairService.dto.d.ts +29 -0
  32. package/src/dto/oldReportService.dto.d.ts +80 -0
  33. package/src/dto/oldTagService.dto.d.ts +59 -0
  34. package/src/dto/oldTrackingService.dto.d.ts +51 -0
  35. package/src/dto/oldTransferService.dto.d.ts +221 -0
  36. package/src/dto/openApi.dto.d.ts +3 -0
  37. package/src/dto/report.dto.d.ts +42 -0
  38. package/src/dto/role.dto.d.ts +50 -0
  39. package/src/dto/settingsAssetName.dto.d.ts +85 -0
  40. package/src/dto/settingsBrand.dto.d.ts +51 -0
  41. package/src/dto/settingsMeasurement.dto.d.ts +17 -0
  42. package/src/dto/subUser.dto.d.ts +46 -0
  43. package/src/dto/transactionLog.dto.d.ts +17 -0
  44. package/src/dto/transfer.dto.d.ts +29 -0
  45. package/src/dto/user.dto.d.ts +126 -33
  46. package/src/services/accounting.service.d.ts +24 -0
  47. package/src/services/asset.service.d.ts +44 -0
  48. package/src/services/assetPolicy.service.d.ts +10 -0
  49. package/src/services/assignment.service.d.ts +85 -0
  50. package/src/services/borrow.service.d.ts +84 -0
  51. package/src/services/{oldCustomField.service.d.ts → customField.service.d.ts} +8 -2
  52. package/src/services/damage.service.d.ts +13 -0
  53. package/src/services/damageService.type.d.ts +104 -0
  54. package/src/services/disposal.service.d.ts +18 -0
  55. package/src/services/fileManager.service.d.ts +53 -0
  56. package/src/services/globalAuth.service.d.ts +27 -0
  57. package/src/services/groupCategory.service.d.ts +7 -3
  58. package/src/services/importData.service.d.ts +24 -0
  59. package/src/services/license.service.d.ts +23 -0
  60. package/src/services/log.service.d.ts +31 -0
  61. package/src/services/missing.service.d.ts +12 -0
  62. package/src/services/moduleAuth.service.d.ts +19 -0
  63. package/src/services/myAsset.service.d.ts +13 -0
  64. package/src/services/notification.service.d.ts +3 -1
  65. package/src/services/oldAsset.service.d.ts +38 -5
  66. package/src/services/oldAssetName.service.d.ts +14 -0
  67. package/src/services/oldAssignment.service.d.ts +84 -0
  68. package/src/services/oldAudit.service.d.ts +61 -0
  69. package/src/services/oldBorrow.service.d.ts +77 -0
  70. package/src/services/oldBrand.service.d.ts +1 -1
  71. package/src/services/oldDamage.service.d.ts +17 -0
  72. package/src/services/oldDisposal.service.d.ts +44 -0
  73. package/src/services/oldFileManager.service.d.ts +53 -0
  74. package/src/services/oldIOT.service.d.ts +9 -0
  75. package/src/services/oldImportData.service.d.ts +22 -0
  76. package/src/services/oldLicense.service.d.ts +39 -0
  77. package/src/services/oldLog.service.d.ts +17 -0
  78. package/src/services/oldMaintenanceRoutine.service.d.ts +49 -0
  79. package/src/services/oldMissing.service.d.ts +12 -1
  80. package/src/services/oldModelType.service.d.ts +7 -0
  81. package/src/services/oldMyAsset.service.d.ts +7 -0
  82. package/src/services/oldOpenApi.service.d.ts +10 -0
  83. package/src/services/oldReader.service.d.ts +13 -0
  84. package/src/services/oldRepair.service.d.ts +10 -0
  85. package/src/services/oldReport.service.d.ts +31 -0
  86. package/src/services/oldRole.service.d.ts +56 -0
  87. package/src/services/oldSubUser.service.d.ts +15 -0
  88. package/src/services/oldTag.service.d.ts +25 -1
  89. package/src/services/oldTracking.service.d.ts +12 -3
  90. package/src/services/oldTransactionSetting.service.d.ts +29 -0
  91. package/src/services/oldTransfer.service.d.ts +30 -0
  92. package/src/services/oldUser.service.d.ts +28 -15
  93. package/src/services/openApi.service.d.ts +10 -0
  94. package/src/services/report.service.d.ts +32 -0
  95. package/src/services/role.service.d.ts +58 -0
  96. package/src/services/settingsAssetName.service.d.ts +22 -0
  97. package/src/services/settingsBrand.service.d.ts +20 -0
  98. package/src/services/settingsMeasurement.service.d.ts +12 -0
  99. package/src/services/subUser.service.d.ts +17 -0
  100. package/src/services/transfer.service.d.ts +36 -0
  101. package/src/services/user.service.d.ts +42 -0
  102. package/src/types/accountCode.type.d.ts +25 -0
  103. package/src/types/approval.type.d.ts +17 -0
  104. package/src/types/asset.type.d.ts +229 -0
  105. package/src/types/assetDetail.type.d.ts +120 -0
  106. package/src/types/assetPolicyService.type.d.ts +18 -0
  107. package/src/types/assignedAsset.type.d.ts +60 -0
  108. package/src/types/assignment.type.d.ts +318 -0
  109. package/src/types/audit.type.d.ts +26 -0
  110. package/src/types/borrow.type.d.ts +86 -0
  111. package/src/types/dataTable.type.d.ts +7 -0
  112. package/src/types/depreciationData.type.d.ts +15 -0
  113. package/src/types/disposal/history.type.d.ts +51 -0
  114. package/src/types/disposal/prelist.type.d.ts +18 -0
  115. package/src/types/disposal/reported.type.d.ts +54 -0
  116. package/src/types/disposal/requestDisposal.type.d.ts +80 -0
  117. package/src/types/disposal/transaction.type.d.ts +62 -0
  118. package/src/types/disposal/user.type.d.ts +5 -0
  119. package/src/types/disposal.type.d.ts +1 -0
  120. package/src/types/fetchResponse.type.d.ts +4 -2
  121. package/src/types/fileManager.type.d.ts +24 -0
  122. package/src/types/groupCategoryData.type.d.ts +2 -7
  123. package/src/types/importData.type.d.ts +92 -0
  124. package/src/types/license.type.d.ts +43 -0
  125. package/src/types/licenseAddon.type.d.ts +35 -0
  126. package/src/types/licenseAllocation.type.d.ts +64 -0
  127. package/src/types/licenseAsset.type.d.ts +77 -0
  128. package/src/types/licenseConcurrent.type.d.ts +11 -0
  129. package/src/types/licensePurchased.type.d.ts +16 -0
  130. package/src/types/maintenanceRoutine.type.d.ts +434 -0
  131. package/src/types/myAsset.type.d.ts +65 -0
  132. package/src/types/notification.type.d.ts +17 -0
  133. package/src/types/oldAuditService.type.d.ts +154 -0
  134. package/src/types/oldBorrowingService.type.d.ts +549 -0
  135. package/src/types/oldTagService.type.d.ts +109 -0
  136. package/src/types/options.type.d.ts +6 -10
  137. package/src/types/reader.d.ts +55 -0
  138. package/src/types/role.type.d.ts +111 -6
  139. package/src/types/settingMeasurement.type.d.ts +5 -0
  140. package/src/types/settingsAssetName.type.d.ts +221 -0
  141. package/src/types/settingsBrand.type.d.ts +82 -0
  142. package/src/types/subUser.type.d.ts +28 -0
  143. package/src/types/transfer.type.d.ts +64 -0
  144. package/src/types/user.type.d.ts +43 -1
  145. package/src/types/userGlobalRole.type.d.ts +1 -1
  146. package/src/types/userGroupRole.type.d.ts +3 -2
  147. package/src/types/userTransactionRole.type.d.ts +3 -1
  148. package/src/utils/createInstance.util.d.ts +17 -0
  149. package/src/utils/getAssetsFile.util.d.ts +1 -0
  150. package/src/utils/index.d.ts +1 -0
  151. package/src/dto/oldAssetService.dto.d.ts +0 -26
  152. package/src/services/oldGroupCategory.service.d.ts +0 -14
  153. package/src/types/userSystemRole.type.d.ts +0 -14
  154. /package/src/services/{oldAliasCode.service.d.ts → aliasCode.service.d.ts} +0 -0
  155. /package/src/services/{oldGeneralSettings.service.d.ts → generalSettings.service.d.ts} +0 -0
@@ -1,218 +1,1822 @@
1
- import m from "axios";
2
- const O = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_APP_ADMIN_API: "https://dev-admin-api.tagsamurai.com", VITE_APP_API: "https://dev-api.tagsamurai.com", VITE_APP_COUNTRY_STATE_API: "https://api.countrystatecity.in", VITE_APP_COUNTRY_STATE_API_KEY: "ZTc5TVc2STlwTkFFNFltYTRjc05sOHR3ODJEYzVMVTZ5UnBJaWU5SA==", VITE_APP_LOGS_NOTIFICATION_API: "https://dev-api-logs-notification.tagsamurai.com", VITE_APP_TAGSAMURAI_API: "https://dev-api.tagsamurai.com" }, A = (t = "APP_API") => O["VITE_" + t], s = (t = {}, e = !1) => {
3
- const { env: r = "APP_API", prefix: o = "", headers: d = {}, ...T } = t, C = `${A(r)}${o}`, I = JSON.parse(localStorage.getItem("user") ?? "{}"), L = I.jwt ?? I.token ?? "";
4
- return m.create({
5
- ...T,
6
- baseURL: C,
7
- headers: e ? d : {
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 ${L}`,
10
- ...d
14
+ ...headers
11
15
  }
12
16
  });
13
- }, E = (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
- }, R = (t) => {
25
- if (!t) return;
26
- const e = A("APP_TAGSAMURAI_API");
27
- return t.startsWith("http") ? t : `${e}/file-manager/v2/files/${t}`;
28
- }, g = s({
29
- prefix: "/settings-attribute/v2",
30
- env: "APP_TAGSAMURAI_API"
31
- }), x = {
32
- getGroupCategory: (t, e) => {
33
- const r = t === "category" ? t : "groups";
34
- return g.get(`/${r}/tree`, { params: e });
35
- },
36
- getGroupCategoryList: (t, e, r) => {
37
- const o = t === "category" ? t : "groups";
38
- return g.get(`/${o}/${e}`, { params: r });
39
- },
40
- getNames: (t) => {
41
- const e = t === "category" ? t : "groups";
42
- return g.get(`/${e}/names`);
43
- },
44
- postCreateGroupCategory: (t, e) => {
45
- const r = t === "category" ? t : "groups";
46
- return g.post(`/${r}`, e);
47
- },
48
- putEditGroupCategory: (t, e, r) => {
49
- const o = t === "category" ? t : "groups";
50
- return g.put(`/${o}/${r}`, e);
51
- },
52
- putMoveGroup: (t, e) => g.put(`/groups/${e}/move-group`, t),
53
- putEditBulkGroups: async (t) => g.put("/groups/bulk", t),
54
- deleteGroupCategory: (t, e, r) => {
55
- const o = t === "category" ? t : "groups";
56
- return g.delete(`/${o}/${r}`, { data: e });
57
- }
58
- }, c = s({
59
- prefix: "/settings-attribute-go/v2"
60
- }), F = {
61
- getGroupCategory: (t, e) => {
62
- const r = t === "category" ? t : "groups";
63
- return c.get(`/${r}/tree`, { params: e });
64
- },
65
- getGroupCategoryList: (t, e) => {
66
- const r = t === "category" ? t : "groups";
67
- return c.get(`/${r}/${e}`);
68
- },
69
- getNames: (t) => {
70
- const e = t === "category" ? t : "groups";
71
- return c.get(`/${e}/names`);
72
- },
73
- postCreateGroupCategory: (t, e) => {
74
- const r = t === "category" ? t : "groups";
75
- return c.post(`/${r}`, e);
76
- },
77
- putEditGroupCategory: (t, e, r) => {
78
- const o = t === "category" ? t : "groups";
79
- return c.put(`/${o}/${r}`, e);
80
- },
81
- deleteGroupCategory: (t, e, r) => {
82
- const o = t === "category" ? t : "groups";
83
- return c.delete(`/${o}/${r}`, { data: e });
84
- }
85
- }, U = s({
86
- prefix: "/v2",
87
- env: "APP_LOGS_NOTIFICATION_API"
88
- }), k = {
89
- getTotalApprovals: () => U.get("/approval/count")
90
- }, p = s({
91
- prefix: "/v2",
92
- env: "APP_LOGS_NOTIFICATION_API"
93
- }), w = {
94
- getActionLog: (t) => p.get("/change-log", { params: t }),
95
- getActionLogOption: (t) => p.get("/change-log/options", { params: t }),
96
- getSessionLogList: (t) => p.get("/session-log", { params: t }),
97
- getUserDetailSystemLogList: (t) => p.get("/change-log", { params: t }),
98
- getUserDetailSystemLogOption: (t) => p.get("/change-log/options", { params: t })
99
- }, a = s({
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({
100
111
  prefix: "/assets/v2/assets"
101
- }), M = {
102
- getScanTag: (t) => a.get("/scan", { params: { tag: t } }),
103
- getAllAssets: (t) => a.get("/", { params: t }),
104
- getAvailableAssets: (t) => a.get("/available", { params: t }),
105
- scanAsset: (t) => a.get("", { params: { tag: t } }),
106
- getAssetsById: (t, e) => a.get("/by-id", { params: { _id: t, ...e } }),
107
- getOptions: (t, e) => a.get(t ? `/${t}/options` : "/options", { params: e }),
108
- getUnlinkedAssets: (t) => a.get("/unlinked", { params: t }),
109
- getAssetDetail: (t, e) => a.get(`/${t}`, { params: e }),
110
- getLinkedAssetFamily: (t) => a.get("/family", { params: { id: t } }),
111
- matchAssetWithTag: (t, e) => {
112
- const r = {
113
- _id: JSON.stringify([t]),
114
- tag: e
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 = 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.get("/", { params: formattedParams });
925
+ },
926
+ getApprovalOptions: (status, field) => {
927
+ const params = {
928
+ status: JSON.stringify([status])
115
929
  };
116
- return a.get("/by-id", { params: r });
930
+ params[field] = true;
931
+ return ApprovalAPI.get("/options", { params });
932
+ },
933
+ getApprovalDetail: (id, approvalType) => {
934
+ const params = {
935
+ groupType: approvalType
936
+ };
937
+ return ApprovalAPI.get(`/transaction/${id}`, { params });
938
+ },
939
+ getApprovalDetailOptions: (id, field, approvalType) => {
940
+ const params = {};
941
+ params[field] = true;
942
+ params.groupType = approvalType;
943
+ return ApprovalAPI.get(`/transaction/${id}/options`, { params });
944
+ },
945
+ putUpdateApproval: (body) => {
946
+ return ApprovalAPI.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 = {
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
+ // Doesn't exist in company plan other than "Basic"
1278
+ getGroupCategoryList: (type, groupId, params) => {
1279
+ return API$r.get(`/${getEndpoint(type)}/${groupId}`, { params });
1280
+ },
1281
+ getNames: (type) => {
1282
+ return API$r.get(`/${getEndpoint(type)}/names`);
1283
+ },
1284
+ getCodes: (type) => {
1285
+ return API$r.get(`/${getEndpoint(type)}/codes`);
1286
+ },
1287
+ postCreateGroupCategory: (type, body) => {
1288
+ return API$r.post(`/${getEndpoint(type)}`, body);
1289
+ },
1290
+ putEditGroupCategory: (type, body, objectId) => {
1291
+ return API$r.put(`/${getEndpoint(type)}/${objectId}`, body);
1292
+ },
1293
+ // Doesn't exist in company plan other than "Enterprise"
1294
+ putMoveGroup: (body, objectId) => {
1295
+ return API$r.put(`/groups/${objectId}/move-group`, body);
1296
+ },
1297
+ // Doesn't exist in company plan other than "Enterprise"
1298
+ putEditBulkGroups: async (body) => {
1299
+ return API$r.put("/groups/bulk", body);
1300
+ },
1301
+ deleteGroupCategory: (type, body, objectId) => {
1302
+ return API$r.delete(`/${getEndpoint(type)}/${objectId}`, { data: body });
1303
+ }
1304
+ };
1305
+ const API$q = createAxiosInstance({
1306
+ prefix: "/settings-attribute/v2/alias-code"
1307
+ });
1308
+ const AliasCodeServices = {
1309
+ getAliasCode: () => {
1310
+ return API$q.get("/");
1311
+ },
1312
+ postAliasCode: (data) => {
1313
+ return API$q.post("/", data);
1314
+ },
1315
+ getAliasCodeList: (params) => {
1316
+ return API$q.get(`/${params.object}/code-list`, { params });
1317
+ }
1318
+ };
1319
+ const API$p = createAxiosInstance({
1320
+ prefix: "/settings-attribute/v2/general-settings"
1321
+ });
1322
+ const GeneralSettingsServices = {
1323
+ getGeneralSettings: () => {
1324
+ return API$p.get("/");
1325
+ },
1326
+ putUpdateGeneralSettings: (data) => {
1327
+ return API$p.put("/", data);
1328
+ }
1329
+ };
1330
+ const API$o = createAxiosInstance({
1331
+ prefix: "/settings-attribute/v2/custom-field"
1332
+ });
1333
+ const CustomFieldServices = {
1334
+ getCustomField: async (params) => {
1335
+ return API$o.get("/", { params });
1336
+ },
1337
+ getCustomFieldsByCategory: (category, params) => {
1338
+ return API$o.get(`/${category}`, { params });
1339
+ },
1340
+ getOptions: async (params) => {
1341
+ return API$o.get("/options", { params });
1342
+ },
1343
+ postCreateCustomField: async (params, data) => {
1344
+ return API$o.post("/", data, { params });
1345
+ },
1346
+ putEditCustomField: async (params, data, id) => {
1347
+ return API$o.put(`/${id}`, data, { params });
1348
+ },
1349
+ putChangeStatus: async (params, data) => {
1350
+ return API$o.put("/bulk", data, { params });
1351
+ },
1352
+ deleteCustomField: async (params) => {
1353
+ return API$o.delete("/bulk", { params });
1354
+ },
1355
+ getUsedCustomFields: async () => {
1356
+ return API$o.get("/used-by-assets");
1357
+ }
1358
+ };
1359
+ const API$n = createAxiosInstance({
1360
+ prefix: "/settings-attribute/v2/asset-name-policy"
1361
+ });
1362
+ const AssetPolicyServices = {
1363
+ getList: (params) => {
1364
+ return API$n.get("/", { params });
1365
+ },
1366
+ getListFilterOptions: (params) => {
1367
+ return API$n.get("/options");
1368
+ },
1369
+ putUpdatePolicy: (body) => {
1370
+ return API$n.put("/", body);
1371
+ }
1372
+ };
1373
+ const API$m = createAxiosInstance({
1374
+ prefix: "/settings-user-role/v2/auth"
1375
+ });
1376
+ const onRejected$1 = (error) => {
1377
+ var _a, _b, _c, _d;
1378
+ 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") {
1379
+ window.onblur = void 0;
1380
+ window.onfocus = void 0;
1381
+ window.sessionExpired = true;
1382
+ return window.dispatchEvent(new CustomEvent("user:expired"));
1383
+ }
1384
+ return Promise.reject(error);
1385
+ };
1386
+ const AuthServices$1 = {
1387
+ reLogin: (body) => {
1388
+ API$m.interceptors.response.use((response) => {
1389
+ return response;
1390
+ }, onRejected$1);
1391
+ return API$m.post("/login", body);
1392
+ }
1393
+ };
1394
+ const DepreciationMethodAPI = createAxiosInstance({
1395
+ prefix: "/settings-attribute/v2/depreciation-method"
1396
+ });
1397
+ const DepreciationGroupAPI = createAxiosInstance({
1398
+ prefix: "/settings-attribute/v2/depreciation-group"
1399
+ });
1400
+ const AccountCodeAPI = createAxiosInstance({
1401
+ prefix: "/settings-attribute/v2/account-code"
1402
+ });
1403
+ const AccountingServices = {
1404
+ getDepreciationGroupDropdown: () => {
1405
+ return DepreciationGroupAPI.get("/dropdown");
1406
+ },
1407
+ //https://dev-api.tagsamurai.com/settings-attribute-go/v2/account-code/dropdown
1408
+ getAccountDropdown: () => {
1409
+ return AccountCodeAPI.get("/dropdown");
1410
+ },
1411
+ // Depreciation Method API Services
1412
+ getDepreciationMethod: () => {
1413
+ return DepreciationMethodAPI.get("");
1414
+ },
1415
+ changeDepreciationMethod: (body) => {
1416
+ return DepreciationMethodAPI.put("", {
1417
+ depreciationMethod: body
1418
+ });
1419
+ },
1420
+ cancelChangeDepreciationMethod: () => {
1421
+ return DepreciationMethodAPI.put("/cancel");
1422
+ },
1423
+ // Depreciation Group API Services
1424
+ getDepreciationGroupList: (params) => {
1425
+ return DepreciationGroupAPI.get("", { params });
1426
+ },
1427
+ deleteDepreciationGroup: (id) => {
1428
+ return DepreciationGroupAPI.delete("", {
1429
+ data: { id }
1430
+ });
1431
+ },
1432
+ createNewDepreciationGroup: (body) => {
1433
+ return DepreciationGroupAPI.post("", body);
1434
+ },
1435
+ editDepreciationGroup: (body, id) => {
1436
+ return DepreciationGroupAPI.put(`/${id}`, body);
1437
+ },
1438
+ getFilterOptions: (params) => {
1439
+ return DepreciationGroupAPI.get("/options", { params });
1440
+ },
1441
+ // Account Code API Services
1442
+ getAccountCodeList: (params) => {
1443
+ return AccountCodeAPI.get("/account-code", { params });
1444
+ },
1445
+ deleteAccountCode: (id) => {
1446
+ return AccountCodeAPI.delete("/account-code", {
1447
+ data: { id }
1448
+ });
1449
+ },
1450
+ createNewAccountCode: (body) => {
1451
+ return AccountCodeAPI.post("/account-code", body);
1452
+ },
1453
+ editAccountCode: (body, id) => {
1454
+ return AccountCodeAPI.put("/account-code/" + id, body);
1455
+ }
1456
+ };
1457
+ const API$l = createAxiosInstance({
1458
+ env: "APP_TAGSAMURAI_API",
1459
+ prefix: "/settings-attribute/v2/asset-name"
1460
+ });
1461
+ const AssetNameServices = {
1462
+ getDropdown: (params) => {
1463
+ return API$l.get("/dropdown", { params });
1464
+ },
1465
+ getAssetNameDetail: (id) => {
1466
+ return API$l.get(`/${id}`);
1467
+ },
1468
+ getAssetsByAssetName: (id, params) => {
1469
+ return API$l.get(`/${id}/list-asset`, { params });
1470
+ },
1471
+ getAssetNameList: (params) => {
1472
+ return API$l.get("/", { params });
1473
+ },
1474
+ getUnpairedAssetName: (params) => {
1475
+ return API$l.get("/unpaired", { params });
1476
+ },
1477
+ getOptions: (params) => {
1478
+ return API$l.get("/options", { params });
1479
+ }
1480
+ };
1481
+ const API$k = createAxiosInstance({
1482
+ env: "APP_TAGSAMURAI_API",
1483
+ prefix: "/audit/v2"
1484
+ });
1485
+ const API_IOT = createAxiosInstance({
1486
+ env: "APP_TAGSAMURAI_API",
1487
+ prefix: "/iot/v2"
1488
+ });
1489
+ const TaskServices = {
1490
+ getTaskList: (params) => {
1491
+ return API$k.get("/audit/task", { params });
1492
+ },
1493
+ getTaskHistory: (params) => {
1494
+ return API$k.get("/audit/task/history", { params });
1495
+ },
1496
+ extendAuditDuration: (body, id) => {
1497
+ return API$k.put(`/audit/task/${id}/extend`, body);
1498
+ },
1499
+ stopAudit: (id, body) => {
1500
+ return API$k.put(`/audit/task/${id}/stop`, body);
1501
+ },
1502
+ cancelAuditTask: (id) => {
1503
+ return API$k.put(`/audit/task/${id}/cancel`);
1504
+ },
1505
+ getTaskDetail: (id) => {
1506
+ return API$k.get(`/audit/task/${id}`);
1507
+ },
1508
+ getInAuditTask: (params) => {
1509
+ return API$k.get("/audit/scheduled-asset/in-audit", { params });
1510
+ },
1511
+ getTaskDetailAssets: (params, taskId) => {
1512
+ return API$k.get(`/audit/task/${taskId}/view-asset-detail`, { params });
1513
+ },
1514
+ getAuditedTask: (params) => {
1515
+ return API$k.get("/audit/scheduled-asset/audited", { params });
1516
+ },
1517
+ getAuditLog: (id) => {
1518
+ return API$k.get(`/audit/scheduled-asset/${id}/log`);
1519
+ },
1520
+ getTaskEventLog: (params) => {
1521
+ return API$k.get("/audit/task/task-event-log", { params });
1522
+ },
1523
+ getTaskTimelineEventLog: (idTask) => {
1524
+ return API$k.get(`/audit/task/${idTask}/event-log`);
1525
+ },
1526
+ scanAssetTAG: (body, idTask) => {
1527
+ return API$k.put(`/audit/task/${idTask}/scan`, body);
1528
+ },
1529
+ submitAssetCondition: (body, idAsset) => {
1530
+ const headers = body.picture ? { "Content-Type": "multipart/form-data" } : { "Content-Type": "application/json" };
1531
+ return API$k.put(`/audit/scheduled-asset/${idAsset}/update/condition`, body, {
1532
+ headers
1533
+ });
1534
+ },
1535
+ submitAuditedAsset: (idTask) => {
1536
+ return API$k.put(`/audit/task/${idTask}/submit`);
1537
+ },
1538
+ reportTAGMissing: (note, idAsset) => {
1539
+ return API$k.put(`/audit/scheduled-asset/${idAsset}/report-missing`, {
1540
+ note
1541
+ });
1542
+ },
1543
+ reportTAG: (id, body) => {
1544
+ return API$k.put(`/audit/scheduled-asset/${id}/tag-reported`, body);
1545
+ },
1546
+ getTaskInitialState: (idTask) => {
1547
+ return API$k.get(`/audit/scheduled-asset/${idTask}`);
1548
+ },
1549
+ cancelTaskReport: (scheduledAssetId) => {
1550
+ return API$k.put(`/audit/scheduled-asset/${scheduledAssetId}/cancel-report`);
1551
+ }
1552
+ };
1553
+ const ScheduleServices = {
1554
+ getScheduleList: (params) => {
1555
+ return API$k.get("/audit/schedule", { params });
1556
+ },
1557
+ getScheduleDetail: (id) => {
1558
+ return API$k.get("/audit/schedule/" + id);
1559
+ },
1560
+ deleteSchedule: (scheduleId) => {
1561
+ return API$k.put("/audit/schedule/bulk-delete", {
1562
+ id: scheduleId
1563
+ });
1564
+ },
1565
+ inactivateSchedule: (id) => {
1566
+ return API$k.put("/audit/schedule/bulk-inactive", { id });
1567
+ },
1568
+ activateSchedule: (id) => {
1569
+ return API$k.put("/audit/schedule/bulk-active", { id });
1570
+ },
1571
+ createNewSchedule: (body) => {
1572
+ return API$k.post("/audit/schedule", body);
1573
+ },
1574
+ editSchedule: (body, id) => {
1575
+ return API$k.put("/audit/schedule/" + id, body);
1576
+ },
1577
+ getActiveAsset: (id, params) => {
1578
+ return API$k.get(`/audit/asset/schedule/${id}`, { params });
1579
+ },
1580
+ setAssetActivation: (body) => {
1581
+ return API$k.put("/audit/asset/activation", body);
1582
+ },
1583
+ getAuditableAssetAmount: (params) => {
1584
+ return API$k.get("/audit/asset/auditable/total-asset", { params });
1585
+ }
1586
+ };
1587
+ const IOTAuditServices = {
1588
+ getReaderList: (params) => {
1589
+ return API_IOT.get("/iot/antenna/available", { params });
1590
+ },
1591
+ putSetReaderParams: (body) => {
1592
+ return API_IOT.put("/iot/reader/set-scan-params", body);
1593
+ },
1594
+ putAuditUsingIOT: (auditId, body) => {
1595
+ return API_IOT.put(`/iot/audit/${auditId}`, body);
1596
+ },
1597
+ getReaderTotalAsset: (taskId, params) => {
1598
+ return API$k.get(`/audit/task/${taskId}/reader/total-assets`, {
1599
+ params
1600
+ });
1601
+ },
1602
+ getAssetList: (params) => {
1603
+ return API$k.get("/audit/scheduled-asset", { params });
117
1604
  }
118
- }, h = s({
119
- prefix: "/tracking/v2/missing"
120
- }), B = {
121
- putFoundAsset: (t, e) => {
122
- const r = { ids: [t], serialNumber: e };
123
- return h.put("/found", r);
1605
+ };
1606
+ const FilterServices = {
1607
+ getFilterOptions: (path, params) => {
1608
+ return API$k.get(`/${path}/options`, { params });
1609
+ },
1610
+ getIOTFilterOptions: (path, params) => {
1611
+ return API_IOT.get(`/${path}/options`, { params });
124
1612
  }
125
- }, S = s({
126
- prefix: "/v2/notification",
127
- env: "APP_LOGS_NOTIFICATION_API"
128
- }), V = {
129
- getNotifications: (t) => S.get("/", { params: t }),
130
- readNotification: (t) => S.put(`/${t}`)
131
- }, f = s({
132
- prefix: "/utility/v2/notification"
133
- }), j = {
134
- getNotifications: (t) => f.get("/", { params: t }),
135
- readNotification: (t) => f.put(`/${t}`)
136
- }, G = s({
137
- prefix: "/v2/session-log",
138
- env: "APP_LOGS_NOTIFICATION_API"
139
- }), Y = {
140
- postLogout: () => G.post("/logout")
141
- }, v = s({
142
- prefix: "/tag/v2"
143
- }), J = {
144
- getScanQR: (t) => v.get("/qr", { params: { tag: t } }),
145
- getScanRFID: (t) => v.get("/rfid", { params: { tag: t } }),
146
- getRFIDQRTAG: (t) => v.get("/rfid-qr/scan", { params: t })
147
- }, N = s({
148
- prefix: "/tracking/v2/tracking"
149
- }), q = {
150
- putFoundAsset: (t, e, r) => {
151
- const o = {
152
- tag: t,
153
- group: e,
154
- serialNumber: r,
155
- type: "Global"
156
- };
157
- return N.put("/found", { params: o });
1613
+ };
1614
+ const AuditableAssetServices = {
1615
+ getAudiableAssetList: (params) => {
1616
+ return API$k.get("/audit/asset/auditable", { params });
1617
+ },
1618
+ getAuditableAssetDetail: (id) => {
1619
+ return API$k.get("/audit/asset/auditable/" + id);
158
1620
  }
159
- }, n = s({
160
- prefix: "/settings-user-role/v2"
161
- }), K = {
162
- reLogin: (t) => n.post("/auth/login", t),
163
- changePassword: (t) => n.put("/users/change-password", t),
164
- getUserDetail: (t) => n.get(`/users/${t}`),
165
- putEditUser: (t, e) => {
166
- const r = { "Content-Type": "multipart/form-data" };
167
- return n.put(`/users/${t}`, e, { headers: r });
168
- },
169
- putDeleteProfilePicture: (t) => n.put(`/users/${t}/delete-profile-picture`),
170
- putCancelEmailChange: (t, e) => n.put("/auth/confirm-email-change/cancel", {
171
- user: t,
172
- companyCode: e
173
- }),
1621
+ };
1622
+ const ApprovalServices = {
1623
+ getApprovalList: (idTask, approvalRound) => {
1624
+ return API$k.get(`/audit/approval/task/${idTask}/transaction`, {
1625
+ params: {
1626
+ approvalRound
1627
+ }
1628
+ });
1629
+ },
1630
+ getActiveApprovalList: (params) => {
1631
+ return API$k.get("/audit/approval/active", { params });
1632
+ },
1633
+ getHisotryApprovalList: (params) => {
1634
+ return API$k.get("/audit/approval/history", { params });
1635
+ },
1636
+ getTaskDetail: (id) => {
1637
+ return API$k.get(`/audit/task/${id}`);
1638
+ },
1639
+ getApprovalHistoryDetail: (idApproval) => {
1640
+ return API$k.get(`/audit/approval/${idApproval}`);
1641
+ },
1642
+ getApprovalAssetList: (params) => {
1643
+ return API$k.get("/audit/scheduled-asset/audited", { params });
1644
+ },
1645
+ submitApprovalAction: (body) => {
1646
+ return API$k.put("/audit/approval/approve", body);
1647
+ }
1648
+ };
1649
+ const AuditServices = {
1650
+ getAudit: (assetId, params) => {
1651
+ return API$k.get(`/audit/schedule/asset-detail/${assetId}`, { params });
1652
+ },
1653
+ getAuditOption: (assetId, params) => {
1654
+ return API$k.get(`/audit/schedule/asset-detail/${assetId}/options`, {
1655
+ params
1656
+ });
1657
+ },
1658
+ putSetActive: (body) => {
1659
+ return API$k.put("/audit/asset/activation", body);
1660
+ },
1661
+ ...TaskServices,
1662
+ ...ScheduleServices,
1663
+ ...IOTAuditServices,
1664
+ ...FilterServices,
1665
+ ...AuditableAssetServices,
1666
+ ...ApprovalServices
1667
+ };
1668
+ const API$j = createAxiosInstance({
1669
+ env: "APP_TAGSAMURAI_API",
1670
+ prefix: "/settings-attribute/v2/brands"
1671
+ });
1672
+ const BrandServices = {
1673
+ getDropdown: (params) => {
1674
+ return API$j.get("/dropdown", { params });
1675
+ }
1676
+ };
1677
+ const API$i = createAxiosInstance({
1678
+ prefix: "/v2",
1679
+ env: "APP_LOGS_NOTIFICATION_API"
1680
+ });
1681
+ const ChangelogServices = {
1682
+ getActionLog: (params) => {
1683
+ return API$i.get("/change-log", { params });
1684
+ },
1685
+ getActionLogOption: (params) => {
1686
+ return API$i.get("/change-log/options", { params });
1687
+ },
1688
+ getSessionLogList: (params) => {
1689
+ return API$i.get("/session-log", { params });
1690
+ },
1691
+ getUserDetailSystemLogList: (params) => {
1692
+ return API$i.get("/change-log", { params });
1693
+ },
1694
+ getUserDetailSystemLogOption: (params) => {
1695
+ return API$i.get("/change-log/options", { params });
1696
+ },
174
1697
  /**
175
- *
176
- * @param id {string} User's _id
177
- * @param type {"Global" | "Group"} Whether the system role's type is global or group
178
- * @param params {Record<string, unknown>}
1698
+ * Retrieves the transaction log.
1699
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
179
1700
  */
180
- getUserDetailSystemRoles: (t, e, r) => n.get(`/user-detail/${t}/system-roles`, {
181
- params: {
182
- ...r,
183
- type: e
184
- }
185
- }),
186
- // User Detail
187
- getUserDetailSystemRoleList: (t, e) => n.get(`/user-detail/${t}/system-role-list`, { params: e }),
188
- getUserDetailSystemRoleOptions: (t, e) => n.get(`/user-detail/${t}/system-role/option`, { params: e }),
189
- getUserDetailTransactionRoleList: (t, e) => n.get(`/user-detail/${t}/transaction-role-list`, { params: e }),
190
- getUserDetailUserLogBorrowingList: (t, e) => n.get(`/users-log/${t}/borrowing`, { params: e }),
191
- getUserDetailUserLogAssignmentList: (t, e) => n.get(`/users-log/${t}/assignment`, { params: e }),
192
- getUserDetailUserLogBorrowingOption: (t, e) => n.get(`/users-log/${t}/borrowing/option`, { params: e }),
193
- getUserDetailUserLogAssignmentOption: (t, e) => n.get(`/users-log/${t}/assignment/option`, { params: e }),
194
- getUserDetailTransactionAdminLogList: (t, e) => n.get(`/users-log/${t}/transaction-log`, { params: e }),
195
- getUserDetailTransactionAdminLogOption: (t, e) => n.get(`/users-log/${t}/transaction-log/option`, { params: e })
196
- }, l = s({
1701
+ getTransactionLog: (params) => {
1702
+ return API$i.get("/transaction-log", { params });
1703
+ },
1704
+ /**
1705
+ * Retrieves the transaction log options.
1706
+ * @returns {Promise<AxiosResponse>} - A promise that resolves to the response from the API.
1707
+ */
1708
+ getTransactionLogOption: (params) => {
1709
+ return API$i.get("/transaction-log/options", { params });
1710
+ },
1711
+ postScanLog: (body) => {
1712
+ return API$i.post("/transaction-log/scan-log", body);
1713
+ }
1714
+ };
1715
+ const API$h = ({ headers = {}, params = {} } = {}) => {
1716
+ const BASE_URL = getBaseURL("APP_COUNTRY_STATE_API");
1717
+ const API_KEY = getBaseURL("APP_COUNTRY_STATE_API_KEY");
1718
+ const instance = axios.create({
1719
+ baseURL: `${BASE_URL}/v1`,
1720
+ headers: {
1721
+ "Content-type": "application/json",
1722
+ "X-CSCAPI-KEY": API_KEY,
1723
+ ...headers
1724
+ },
1725
+ params
1726
+ });
1727
+ return instance;
1728
+ };
1729
+ const CountryStateServices = {
1730
+ getCountry: () => {
1731
+ return API$h().get("/countries");
1732
+ },
1733
+ getState: (country) => {
1734
+ return API$h().get(`/countries/${country}/states`);
1735
+ },
1736
+ getCity: (country, state) => {
1737
+ return API$h().get(`/countries/${country}/states/${state}/cities`);
1738
+ }
1739
+ };
1740
+ const API$g = createAxiosInstance({
1741
+ env: "APP_TAGSAMURAI_API",
1742
+ prefix: "/dashboard/v2/dashboard"
1743
+ });
1744
+ const DashboardServices = {
1745
+ getLatestTask: (params) => {
1746
+ return API$g.get("/latest-task", { params });
1747
+ },
1748
+ getSummary: (params) => {
1749
+ return API$g.get("/summary", { params });
1750
+ }
1751
+ };
1752
+ const API$f = createAxiosInstance({
1753
+ env: "APP_GLOBAL_SETTINGS_API",
1754
+ prefix: "/v1/global-settings/auth"
1755
+ });
1756
+ const onRejected = (error) => {
1757
+ var _a, _b, _c, _d;
1758
+ 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") {
1759
+ window.onblur = void 0;
1760
+ window.onfocus = void 0;
1761
+ window.sessionExpired = true;
1762
+ return window.dispatchEvent(new CustomEvent("user:expired"));
1763
+ }
1764
+ return Promise.reject(error);
1765
+ };
1766
+ const AuthServices = {
1767
+ login: (form) => {
1768
+ const body = { ...form, isMobile: false };
1769
+ return API$f.post("/login", body);
1770
+ },
1771
+ reLogin: (body) => {
1772
+ API$f.interceptors.response.use((response) => {
1773
+ return response;
1774
+ }, onRejected);
1775
+ return API$f.post("/login", body);
1776
+ },
1777
+ requestOTP: (email) => {
1778
+ const body = { email };
1779
+ return API$f.post("/request-otp", body);
1780
+ },
1781
+ requestResetPassLink: (email) => {
1782
+ const body = { email };
1783
+ return API$f.post("/request-reset-link", body);
1784
+ },
1785
+ setPassword: (body) => {
1786
+ return API$f.post("/set-password", body);
1787
+ },
1788
+ verifyToken: (token) => {
1789
+ return API$f.get(`/verify-token/${token}`);
1790
+ },
1791
+ confirmEmailChange: (token) => {
1792
+ const body = { token };
1793
+ return API$f.put("/confirm-email-change/confirm", body);
1794
+ },
1795
+ postLogout: () => {
1796
+ return API$f.post("/logout");
1797
+ }
1798
+ };
1799
+ const API$e = createAxiosInstance({
197
1800
  env: "APP_ADMIN_API",
198
1801
  prefix: "/settings-attribute/languages"
199
- }), W = {
1802
+ });
1803
+ const I18nService = {
200
1804
  /**
201
1805
  * Fetch all translation messages for a specific locale.
202
1806
  * @param locale The locale code (e.g., 'en', 'id').
203
1807
  * @returns A promise resolving to a key-value record of messages.
204
1808
  */
205
- getMessages: (t) => l.get(`/${t}/translations`),
1809
+ getMessages: (isoCode) => {
1810
+ return API$e.get(`/${isoCode}/translations`);
1811
+ },
206
1812
  /**
207
1813
  * Fetch all available lang options for LanguageDropdown and LanguageSwitcher
208
1814
  *
209
1815
  * @returns Promise Array of options
210
1816
  */
211
1817
  getLanguageOptions: async () => {
212
- const { data: t } = await l.get(
213
- "/dropdown"
214
- );
215
- return t.data;
1818
+ const { data } = await API$e.get("/dropdown");
1819
+ return data.data;
216
1820
  },
217
1821
  /**
218
1822
  * Fetch single lang option meta data
@@ -220,11 +1824,11 @@ const O = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
220
1824
  * @param isoCode The locale code (e.g., 'en', 'id').
221
1825
  * @returns Promise LanguageMeta
222
1826
  */
223
- getLanguageOptionMeta: async (t) => {
224
- const { data: e } = await l.get(
225
- "/dropdown/" + t
1827
+ getLanguageOptionMeta: async (isoCode) => {
1828
+ const { data } = await API$e.get(
1829
+ "/dropdown/" + isoCode
226
1830
  );
227
- return e.data;
1831
+ return data.data;
228
1832
  },
229
1833
  /**
230
1834
  * Translate a specific text to the target locale.
@@ -232,95 +1836,626 @@ const O = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_
232
1836
  * @param key Unique translation key.
233
1837
  * @param locale Target locale code.
234
1838
  */
235
- translateText: async (t, e) => {
236
- const { data: r } = await l.post("/translate", {
237
- q: t,
238
- target: e
1839
+ translateText: async (key, locale) => {
1840
+ const { data } = await API$e.post("/translate", {
1841
+ q: key,
1842
+ target: locale
239
1843
  });
240
- return r.data.translations[t];
1844
+ return data.data.translations[key];
241
1845
  }
242
- }, y = s({
243
- prefix: "/dashboard/v2/dashboard"
244
- }), z = {
245
- getLatestTask: (t) => y.get("/latest-task", { params: t }),
246
- getSummary: (t) => y.get("/summary", { params: t })
247
- }, P = s({
248
- prefix: "/alias-code/api/alias-code"
249
- }), Q = {
250
- getAliasCode: () => P.get("/"),
251
- postAliasCode: (t) => P.post("/", t),
252
- getAliasCodeList: (t) => P.get(`/${t.object}/code-list`, { params: t })
253
- }, _ = s({
254
- prefix: "/settings-attribute/v2/general-settings"
255
- }), Z = {
256
- getGeneralSettings: () => _.get("/"),
257
- putUpdateGeneralSettings: (t) => _.put("/", t)
258
- }, u = s({
259
- prefix: "/settings-attribute/v2/custom-field"
260
- }), H = {
261
- getCustomField: async (t) => u.get("/", { params: t }),
262
- getOptions: async (t) => u.get("/options", { params: t }),
263
- postCreateCustomField: async (t, e) => u.post("/", e, { params: t }),
264
- putEditCustomField: async (t, e, r) => u.put(`/${r}`, e, { params: t }),
265
- putChangeStatus: async (t, e) => u.put("/bulk", e, { params: t }),
266
- deleteCustomField: async (t) => u.delete("/bulk", { data: t })
267
- }, $ = ({ headers: t = {}, params: e = {} } = {}) => {
268
- const r = A("APP_COUNTRY_STATE_API"), o = A("APP_COUNTRY_STATE_API_KEY");
269
- return m.create({
270
- baseURL: `${r}/v1`,
271
- headers: {
272
- "Content-type": "application/json",
273
- "X-CSCAPI-KEY": o,
274
- ...t
275
- },
276
- params: e
277
- });
278
- }, X = {
279
- getCountry: () => $().get("/countries"),
280
- getState: (t) => $().get(`/countries/${t}/states`),
281
- getCity: (t, e) => $().get(`/countries/${t}/states/${e}/cities`)
282
- }, i = s({
1846
+ };
1847
+ const API$d = createAxiosInstance({
1848
+ env: "APP_TAGSAMURAI_API",
1849
+ prefix: "/settings-attribute/v2/models"
1850
+ });
1851
+ const ModelTypeServices = {
1852
+ getDropdown: (params) => {
1853
+ return API$d.get("/dropdown", { params });
1854
+ }
1855
+ };
1856
+ const API$c = createAxiosInstance({
1857
+ prefix: "/v2",
1858
+ env: "APP_LOGS_NOTIFICATION_API"
1859
+ });
1860
+ const NotificationApprovalServices = {
1861
+ getTotalApprovals: () => {
1862
+ return API$c.get("/approval/count");
1863
+ }
1864
+ };
1865
+ const API$b = createAxiosInstance({
1866
+ env: "APP_TAGSAMURAI_API",
1867
+ prefix: "/iot/v2/reader"
1868
+ });
1869
+ const ReaderServices = {
1870
+ getData: (params) => {
1871
+ return API$b.get("/", { params });
1872
+ },
1873
+ getDataOptions: (params) => {
1874
+ return API$b.get("/options", { params });
1875
+ },
1876
+ getActivityLogData: (params) => {
1877
+ return API$b.get("/activity-log", { params });
1878
+ },
1879
+ getActivityLogOptions: (params) => {
1880
+ return API$b.get("/activity-log/options", { params });
1881
+ },
1882
+ getDataById: (id) => {
1883
+ return API$b.get(`/${id}`);
1884
+ },
1885
+ getChangeLog: (params) => {
1886
+ return API$b.get(`/${params.id}/change-log`, { params });
1887
+ },
1888
+ getChangeLogOptions: (params) => {
1889
+ return API$b.get(`/${params.id}/change-log/options`, { params });
1890
+ },
1891
+ putData: (id, body) => {
1892
+ return API$b.put(`/${id}`, body);
1893
+ }
1894
+ };
1895
+ const API$a = createAxiosInstance({
1896
+ env: "APP_TAGSAMURAI_API",
1897
+ prefix: "/repair/v2"
1898
+ });
1899
+ const RepairServices = {
1900
+ getRepairList: (params) => {
1901
+ return API$a.get("/my-asset/repair", { params });
1902
+ },
1903
+ getFilterOptions: (params) => {
1904
+ return API$a.get("/my-asset/repair/options", { params });
1905
+ },
1906
+ getAssetRepairTicketing: (assetId, params) => {
1907
+ return API$a.get(`/repair/${assetId}/asset-repair-detail`, { params });
1908
+ },
1909
+ putConfirmRepair: (repairId) => {
1910
+ return API$a.put(`/repair/${repairId}/confirm-repair`);
1911
+ }
1912
+ };
1913
+ const API$9 = createAxiosInstance({
1914
+ env: "APP_TAGSAMURAI_API",
1915
+ prefix: "/routine/v2"
1916
+ });
1917
+ const RoutineServices = {
1918
+ getMaintenance: (assetId, params) => {
1919
+ return API$9.get(`/routine-task/${assetId}`, { params });
1920
+ },
1921
+ getMaintenanceOption: (assetId, params) => {
1922
+ return API$9.get(`/routine-task/${assetId}/options`, { params });
1923
+ },
1924
+ putSetActive: (body) => {
1925
+ return API$9.put("/maintenable-asset/set-active", body);
1926
+ },
1927
+ getRoutineTask: (params) => {
1928
+ return API$9.get("/routine-task", { params });
1929
+ },
1930
+ getRoutineTaskOptions: (params) => {
1931
+ return API$9.get("/routine-task/options", { params });
1932
+ },
1933
+ getRoutineSchedule: (params) => {
1934
+ return API$9.get("/routine-schedule", { params });
1935
+ },
1936
+ getRoutineScheduleOptions: (params) => {
1937
+ return API$9.get("/routine-schedule/options", { params });
1938
+ },
1939
+ getRoutineTaskEventLog: (params) => {
1940
+ return API$9.get("/routine-task/event-log", { params });
1941
+ },
1942
+ getRoutineTaskEventLogOptions: (params) => {
1943
+ return API$9.get("/routine-task/event-log/options", { params });
1944
+ },
1945
+ getAssetName: (params) => {
1946
+ return API$9.get("/asset-name", { params });
1947
+ },
1948
+ getAssetNameOptions: (params) => {
1949
+ return API$9.get("/asset-name/options", { params });
1950
+ },
1951
+ postCreateRoutineSchedule: (data) => {
1952
+ return API$9.post("/routine-schedule", data);
1953
+ },
1954
+ postDuplicateRoutineSchedule: (id, data) => {
1955
+ return API$9.post(`/routine-schedule/duplicate/${id}`, data);
1956
+ },
1957
+ putEditRoutineSchedule: (id, data) => {
1958
+ return API$9.put(`/routine-schedule/${id}`, data);
1959
+ },
1960
+ getUserStaff: (params) => {
1961
+ return API$9.get("/user-transaction-role/maintenance-role/staff", { params });
1962
+ },
1963
+ getUserStaffOptions: (params) => {
1964
+ return API$9.get("/user-transaction-role/maintenance-role/staff/options", {
1965
+ params
1966
+ });
1967
+ },
1968
+ getRoutineScheduleDetail: (id) => {
1969
+ return API$9.get(`/routine-schedule/${id}`);
1970
+ },
1971
+ deleteRoutineSchedule: (id) => {
1972
+ return API$9.delete("/routine-schedule/bulk-delete", {
1973
+ params: {
1974
+ id: JSON.stringify(id)
1975
+ }
1976
+ });
1977
+ },
1978
+ putRoutineTaskCancel: (id) => {
1979
+ return API$9.put("/routine-task/cancel", { id });
1980
+ },
1981
+ getMaintainableAsset: (params) => {
1982
+ return API$9.get("/maintenable-asset", { params });
1983
+ },
1984
+ getMaintainableAssetOptions: (params) => {
1985
+ return API$9.get("/maintenable-asset/options", { params });
1986
+ },
1987
+ getMaintenanceHistory: (params) => {
1988
+ return API$9.get("/routine-task/history", { params });
1989
+ },
1990
+ getMaintenanceHistoryOptions: (params) => {
1991
+ return API$9.get("/routine-task/history/options", { params });
1992
+ },
1993
+ getActiveAsset: (id) => {
1994
+ return API$9.get(`/routine-schedule/${id}/assets`);
1995
+ },
1996
+ getActiveAssetOptions: (id, params) => {
1997
+ return API$9.get(`/routine-schedule/${id}/assets/options`, { params });
1998
+ },
1999
+ getRoutineTaskDetail: (id) => {
2000
+ return API$9.get(`/routine-task/${id}/detail`);
2001
+ },
2002
+ getApproverList: (id, approvalRound) => {
2003
+ return API$9.get(`/routine-task/${id}/approval-history`, {
2004
+ params: {
2005
+ approvalRound
2006
+ }
2007
+ });
2008
+ },
2009
+ getReviewerList: (id) => {
2010
+ return API$9.get(`/routine-task/${id}/review-history`);
2011
+ },
2012
+ getMaintainableAssetDetail: (id) => {
2013
+ return API$9.get(`/maintenable-asset/${id}`);
2014
+ },
2015
+ putSetActiveTasks: (id, isActive) => {
2016
+ return API$9.put(`/maintenable-asset/${id}/set-tasks-active`, {
2017
+ isActive
2018
+ });
2019
+ },
2020
+ putAssignStaff: (routineId, staffId) => {
2021
+ return API$9.put(`/routine-task/${routineId}/assign-staff`, {
2022
+ id: staffId
2023
+ });
2024
+ },
2025
+ getServiceCenter: () => {
2026
+ return API$9.get("/service-center/dropdown");
2027
+ },
2028
+ putCompleteRoutineTask: (id, data) => {
2029
+ const headers = { "Content-Type": "multipart/form-data" };
2030
+ return API$9.put(`/routine-task/${id}/completion`, data, { headers });
2031
+ },
2032
+ getApprovalDetail: (id) => {
2033
+ return API$9.get(`/approval/${id}`);
2034
+ },
2035
+ putApprovalApprove: (id, data) => {
2036
+ return API$9.put(`/approval/${id}/approve`, data);
2037
+ },
2038
+ putReviewRoutine: (id, data) => {
2039
+ return API$9.put(`/routine-task/${id}/review`, data);
2040
+ },
2041
+ putUpdateRoutineTask: (id, data) => {
2042
+ return API$9.put(`/routine-task/${id}/handle-overdue`, data);
2043
+ },
2044
+ getApproval: (params) => {
2045
+ return API$9.get("/approval", { params });
2046
+ },
2047
+ getApprovalOptions: (params) => {
2048
+ return API$9.get("/approval/options", { params });
2049
+ }
2050
+ };
2051
+ const API$8 = createAxiosInstance({
2052
+ env: "APP_TAGSAMURAI_API",
283
2053
  prefix: "/routine/v2"
284
- }), tt = {
285
- getList: (t) => i.get("/service-center", { params: t }),
286
- postList: (t) => i.post("/service-center", t),
287
- putList: (t, e) => i.put(`/service-center/${t}`, e),
288
- putActivate: (t) => i.put("/service-center/bulk", t),
289
- getDetailList: (t) => i.get(`/service-center/${t}`),
290
- getListOptions: (t) => i.get("/service-center/options", { params: t }),
291
- deleteList: (t) => i.delete("/service-center", { params: t }),
2054
+ });
2055
+ const ServiceCenterServices = {
2056
+ getList: (params) => {
2057
+ return API$8.get("/service-center", { params });
2058
+ },
2059
+ postList: (body) => {
2060
+ return API$8.post("/service-center", body);
2061
+ },
2062
+ putList: (id, body) => {
2063
+ return API$8.put(`/service-center/${id}`, body);
2064
+ },
2065
+ putActivate: (body) => {
2066
+ return API$8.put("/service-center/bulk", body);
2067
+ },
2068
+ getDetailList: (id) => {
2069
+ return API$8.get(`/service-center/${id}`);
2070
+ },
2071
+ getListOptions: (params) => {
2072
+ return API$8.get("/service-center/options", { params });
2073
+ },
2074
+ deleteList: (params) => {
2075
+ return API$8.delete("/service-center", { params });
2076
+ },
292
2077
  // Activities
293
- getActivities: (t) => i.get("/service-activities", { params: t }),
294
- getActivityOptions: (t) => i.get("/service-activities/options", { params: t }),
295
- getActivityDetail: (t) => i.get(`/service-activities/${t}`),
296
- getActivityLog: (t) => i.get(`/service-activities/${t}/activity-log`)
297
- }, b = s({
2078
+ getActivities: (params) => {
2079
+ return API$8.get("/service-activities", { params });
2080
+ },
2081
+ getActivityOptions: (params) => {
2082
+ return API$8.get("/service-activities/options", { params });
2083
+ },
2084
+ getActivityDetail: (id) => {
2085
+ return API$8.get(`/service-activities/${id}`);
2086
+ },
2087
+ getActivityLog: (id) => {
2088
+ return API$8.get(`/service-activities/${id}/activity-log`);
2089
+ }
2090
+ };
2091
+ const API$7 = createAxiosInstance({
2092
+ prefix: "/v2/session-log",
2093
+ env: "APP_LOGS_NOTIFICATION_API"
2094
+ });
2095
+ const SessionLogServices = {
2096
+ postLogout: () => {
2097
+ return API$7.post("/logout");
2098
+ }
2099
+ };
2100
+ const API$6 = createAxiosInstance({
2101
+ env: "APP_TAGSAMURAI_API",
2102
+ prefix: "/tag/v2"
2103
+ });
2104
+ const TAGServices = {
2105
+ getScanQR: (tag) => {
2106
+ return API$6.get("/qr", { params: { tag } });
2107
+ },
2108
+ getScanRFID: (tag) => {
2109
+ return API$6.get("/rfid", { params: { tag } });
2110
+ },
2111
+ getRFIDQRTAG: (params) => {
2112
+ return API$6.get("/rfid-qr/scan", { params });
2113
+ },
2114
+ getEventLog: (params) => {
2115
+ return API$6.get("/tag-transaction/event-log", { params });
2116
+ },
2117
+ // Tab All
2118
+ getRfidQrAll: (path, params) => {
2119
+ return API$6.get(`/${path}`, { params });
2120
+ },
2121
+ // Tab Paired
2122
+ getRfidQrPaired: (tagType, viewBy, params) => {
2123
+ return API$6.get(`/${tagType}/paired/${viewBy}`, { params });
2124
+ },
2125
+ postAddTAGtoPrelist: (body, destination) => {
2126
+ return API$6.post(`/prelist/${destination}/asset-name`, body);
2127
+ },
2128
+ postAddTAGtoReplacePrelist: (body) => {
2129
+ return API$6.post("/prelist/replace-tag", body);
2130
+ },
2131
+ postAddTAGToPrelistUnpair: (body) => {
2132
+ return API$6.post("/prelist/unpair-tag", body);
2133
+ },
2134
+ postAddTAGtoPending: (body) => {
2135
+ return API$6.post("/pending-changes", body);
2136
+ },
2137
+ // Available Tab
2138
+ getRFIDQrAvailable: (tagType, params) => {
2139
+ return API$6.get(`/${tagType}/available`, { params });
2140
+ },
2141
+ // Damaged TAB
2142
+ getRFIDQrDamaged: (tagType, params) => {
2143
+ return API$6.get(`/${tagType}/damaged`, { params });
2144
+ },
2145
+ // RFID and QR Module
2146
+ getRFIDandQRList: (params) => {
2147
+ return API$6.get("/rfid-qr", { params });
2148
+ },
2149
+ deleteUnpairTAG: (body) => {
2150
+ return API$6.delete("/rfid-qr", { data: { data: body } });
2151
+ },
2152
+ postPairTAG: (body) => {
2153
+ return API$6.post("/rfid-qr", { body: { data: body } });
2154
+ },
2155
+ // RFID To Be Returned
2156
+ getToBeReturnedTAGList: (params) => {
2157
+ return API$6.get("/rfid/to-be-returned", { params });
2158
+ },
2159
+ // Handover TAG
2160
+ putHandoverTAG: (body) => {
2161
+ return API$6.put("/rfid/handover", { body: { data: body } });
2162
+ },
2163
+ // Table Filter
2164
+ getFilterOptions: (path, params) => {
2165
+ return API$6.get(`/${path}/options`, { params });
2166
+ },
2167
+ getHolderListOptions: (params) => {
2168
+ return API$6.get("/rfid/holder-list/options", { params });
2169
+ },
2170
+ getHolderList: (params) => {
2171
+ return API$6.get("/rfid/holder-list", { params });
2172
+ },
2173
+ putAuditTAG: (body, tagType) => {
2174
+ return API$6.put(`/${tagType}/audit`, body);
2175
+ },
2176
+ postLogAudit: (body) => {
2177
+ return API$6.post("/tag-transaction/log-audit", body);
2178
+ },
2179
+ postCreateQr: (amount) => {
2180
+ const body = { amount };
2181
+ return API$6.post("/qr", body);
2182
+ },
2183
+ putReportTAG: (id, body) => {
2184
+ return API$6.put(`/tag-transaction/report/${id}`, body);
2185
+ },
2186
+ putReportTAGBulk: (body) => {
2187
+ return API$6.put("/tag-transaction/report/bulk", body);
2188
+ },
2189
+ putDeclineReport: (body, tagType) => {
2190
+ return API$6.put(`/report/decline-report/${tagType}`, body);
2191
+ }
2192
+ };
2193
+ const API$5 = createAxiosInstance({
2194
+ env: "APP_TAGSAMURAI_API",
2195
+ prefix: "/tracking/v2/tracking"
2196
+ });
2197
+ const API_APPROVAL = createAxiosInstance({
2198
+ env: "APP_TAGSAMURAI_API",
2199
+ prefix: "/tracking/v2/tracking"
2200
+ });
2201
+ const TrackingServices = {
2202
+ getTrackingDetail: (trackingId) => {
2203
+ return API$5.get(`/${trackingId}`);
2204
+ },
2205
+ putFoundAsset: (tag, groupId, serialNumber, type) => {
2206
+ const params = {
2207
+ tag,
2208
+ group: groupId,
2209
+ serialNumber,
2210
+ type: type ?? "Global"
2211
+ };
2212
+ return API$5.put("/scan", void 0, { params });
2213
+ },
2214
+ putReportPermanentlyMissing: (trackingId, body) => {
2215
+ return API$5.put(`/report-permanently-missing/${trackingId}`, body);
2216
+ },
2217
+ putUpdateTrackingAsset: (id, body) => {
2218
+ const headers = { "Content-type": "multipart/form-data" };
2219
+ return API$5.put(`/update/${id}`, body, { headers });
2220
+ },
2221
+ putMoveBack: (body) => {
2222
+ return API$5.put("/tracking/move-back", body);
2223
+ },
2224
+ getTrackingList: (endpoint, params) => {
2225
+ return API$5.get(endpoint, { params });
2226
+ },
2227
+ getTrackingDetailByScan: (tag) => {
2228
+ return API$5.get("/scan", { params: { tag } });
2229
+ },
2230
+ getFilterOptions: (endPoint, params) => {
2231
+ return API$5.get(endPoint + "/options", { params });
2232
+ },
2233
+ getApproverList: (id) => {
2234
+ return API_APPROVAL.get(`/${id}/approval-history`);
2235
+ }
2236
+ };
2237
+ const API$4 = createAxiosInstance({
2238
+ env: "APP_TAGSAMURAI_API",
2239
+ prefix: "/settings-attribute/v2/transaction-settings"
2240
+ });
2241
+ const TransactionSettingServices = {
2242
+ getData: () => {
2243
+ return API$4.get("/");
2244
+ },
2245
+ putData: (data) => {
2246
+ return API$4.put("/", data);
2247
+ }
2248
+ };
2249
+ const API$3 = createAxiosInstance({
2250
+ prefix: "/settings-attribute/v2/asset-name"
2251
+ });
2252
+ const SettingAssetNameServiceGo = {
2253
+ getAssetNameList: (params) => API$3.get("", { params }),
2254
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/options
2255
+ getAssetNameListOptions: (params) => {
2256
+ return API$3.get("/options", { params });
2257
+ },
2258
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/dropdown
2259
+ getAssetNameDropdown: (params) => {
2260
+ return API$3.get("/dropdown", { params });
2261
+ },
2262
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/unpaired
2263
+ getAssetUnpairedNameList: (params) => {
2264
+ return API$3.get("/unpaired", { params });
2265
+ },
2266
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/unpaired/options
2267
+ getAssetUnpairedNameListOptions: (params) => {
2268
+ return API$3.get("/unpaired/options", { params });
2269
+ },
2270
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/:id
2271
+ getAssetNameDetail: (id) => {
2272
+ return API$3.get(`/${id}`);
2273
+ },
2274
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/:id/list-brand
2275
+ getAssetNameBrands: (id, params) => {
2276
+ return API$3.get(`/${id}/list-brand`, { params });
2277
+ },
2278
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/:id/list-asset
2279
+ getAssetNameAssets: (id, params) => {
2280
+ return API$3.get(`/${id}/list-asset`, { params });
2281
+ },
2282
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/:id/list-asset/options
2283
+ getAssetNameAssetsOptions: (params) => {
2284
+ return API$3.get("/list-asset/options", { params });
2285
+ },
2286
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/:id/list-brand/options
2287
+ getAssetNameBrandsOptions: (params) => {
2288
+ return API$3.get("/list-brand/options", { params });
2289
+ },
2290
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name
2291
+ createAssetName: (body) => {
2292
+ return API$3.post("", body);
2293
+ },
2294
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/depreciation-setting
2295
+ updateDepreciationSetting: (body) => {
2296
+ return API$3.put("/depreciation-setting", body);
2297
+ },
2298
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/set-tagtype
2299
+ setTagType: (body) => {
2300
+ return API$3.put("/set-tagtype", body);
2301
+ },
2302
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name/:id
2303
+ updateAssetName: (body, id) => {
2304
+ return API$3.put(`/${id}`, body);
2305
+ },
2306
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/asset-name
2307
+ deleteAssetName: (body) => {
2308
+ return API$3.delete("", {
2309
+ data: body
2310
+ });
2311
+ }
2312
+ };
2313
+ const API$2 = createAxiosInstance({
298
2314
  prefix: "/settings-attribute/v2/brands"
299
- }), et = {
300
- getDropdown: (t) => b.get("/dropdown", { params: t })
2315
+ });
2316
+ const SettingBrandServiceGo = {
2317
+ getBrandList: (params) => {
2318
+ return API$2.get("", { params });
2319
+ },
2320
+ getBrandListOptionsFA: (params) => {
2321
+ return API$2.get("/options", { params });
2322
+ },
2323
+ getBrandDropdown: (params) => {
2324
+ return API$2.get("/dropdown", { params });
2325
+ },
2326
+ getBrandDetail: (id) => {
2327
+ return API$2.get(`/${id}`);
2328
+ },
2329
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/brands/:id/list-category
2330
+ getBrandListCategory: (id, params) => {
2331
+ return API$2.get(`/${id}/list-category`, { params });
2332
+ },
2333
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/brands/:id/list-category/options
2334
+ getBrandListCategoryOptions: (id, params) => {
2335
+ return API$2.get(`/${id}/list-category/options`, { params });
2336
+ },
2337
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/brands/:id/list-asset
2338
+ getBrandListAsset: (id, params) => {
2339
+ return API$2.get(`/${id}/list-asset`, { params });
2340
+ },
2341
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/brands/:id/list-asset/options
2342
+ getBrandListAssetOptions: (id, params) => {
2343
+ return API$2.get(`/${id}/list-asset/options`, { params });
2344
+ },
2345
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/brands
2346
+ createBrand: (body) => {
2347
+ return API$2.post("", body);
2348
+ },
2349
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/brands/assign-category
2350
+ brandAssignCategory: (body) => {
2351
+ return API$2.put("/assign-category", body);
2352
+ },
2353
+ brandUnassignCategory: (body) => {
2354
+ return API$2.put("/unassign-category", body);
2355
+ },
2356
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/brands/:id
2357
+ updateBrand: (body, id) => {
2358
+ return API$2.put(`/${id}`, body);
2359
+ },
2360
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/brands
2361
+ deleteBrand: (body) => {
2362
+ return API$2.delete("", {
2363
+ data: body
2364
+ });
2365
+ }
2366
+ };
2367
+ const API$1 = createAxiosInstance({
2368
+ prefix: "/settings-attribute/v2/measurement"
2369
+ });
2370
+ const SettingMeasurementServiceGo = {
2371
+ getMeasurementList: (params) => {
2372
+ return API$1.get("/", { params });
2373
+ },
2374
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/measurement/dropdown
2375
+ getMeasurementDropdown: () => {
2376
+ return API$1.get("/dropdown");
2377
+ },
2378
+ createMeasurement: (body) => {
2379
+ return API$1.post("/", body);
2380
+ },
2381
+ updateMeasurement: (body, id) => {
2382
+ return API$1.put(`/${id}`, body);
2383
+ },
2384
+ //https://dev-api.supply.tagsamurai.com/settings-attribute-go/v2/measurement
2385
+ deleteMeasurement: (body) => {
2386
+ return API$1.delete("/", {
2387
+ data: body
2388
+ });
2389
+ }
2390
+ };
2391
+ const API = createAxiosInstance({
2392
+ env: "APP_TAGSAMURAI_API",
2393
+ prefix: "/iot/v2/iot"
2394
+ });
2395
+ const IOTServices = {
2396
+ getReaderList: () => {
2397
+ return API.get("/antenna/available");
2398
+ },
2399
+ getReaderOptions: (params) => {
2400
+ return API.get("/reader/options", { params });
2401
+ },
2402
+ putSetScanParams: (body) => {
2403
+ return API.put("/reader/set-scan-params", body);
2404
+ },
2405
+ putIOTTracking: (body) => {
2406
+ return API.put("/tracking", body);
2407
+ }
301
2408
  };
302
2409
  export {
303
- Q as AliasCodeServices,
304
- M as AssetServices,
305
- et as BrandServices,
306
- w as ChangelogServices,
307
- X as CountryStateServices,
308
- H as CustomFieldServices,
309
- z as DashboardServices,
310
- Z as GeneralSettingsServices,
311
- x as GroupCategoryServices,
312
- F as GroupCategoryServicesGo,
313
- W as I18nService,
314
- B as MissingServices,
315
- k as NotificationApprovalServices,
316
- V as NotificationServices,
317
- j as NotificationServicesGo,
318
- tt as ServiceCenterServices,
319
- Y as SessionLogServices,
320
- J as TAGServices,
321
- q as TrackingServices,
322
- K as UserServices,
323
- A as getBaseURL,
324
- R as getImageURL,
325
- E as queryParamsStringfy
2410
+ AccountingServices,
2411
+ AliasCodeServices,
2412
+ AssetNameServices,
2413
+ AssetPolicyServices,
2414
+ AssetServices,
2415
+ AssignmentServices,
2416
+ AuditServices,
2417
+ AuthServices$1 as AuthServices,
2418
+ BorrowServicesGo as BorrowServices,
2419
+ BrandServices,
2420
+ ChangelogServices,
2421
+ CountryStateServices,
2422
+ CustomFieldServices,
2423
+ DamageServices,
2424
+ DashboardServices,
2425
+ DisposalServices,
2426
+ FileManagerServices,
2427
+ GeneralSettingsServices,
2428
+ AuthServices as GlobalAuthServices,
2429
+ GroupCategoryServices,
2430
+ I18nService,
2431
+ IOTServices,
2432
+ ImportServices,
2433
+ LicenseServices,
2434
+ ChangelogServices$1 as LogServices,
2435
+ MissingServices,
2436
+ ModelTypeServices,
2437
+ MyAssetServices,
2438
+ NotificationApprovalServices,
2439
+ NotificationServices,
2440
+ OpenAPIServices,
2441
+ ReaderServices,
2442
+ RepairServices,
2443
+ ReportServices,
2444
+ RoleServices,
2445
+ RoutineServices,
2446
+ ServiceCenterServices,
2447
+ SessionLogServices,
2448
+ SettingAssetNameServiceGo as SettingAssetNameService,
2449
+ SettingBrandServiceGo as SettingBrandService,
2450
+ SettingMeasurementServiceGo as SettingMeasurementService,
2451
+ SubUserServices,
2452
+ TAGServices,
2453
+ TrackingServices,
2454
+ TransactionSettingServices,
2455
+ TransferServicesGo as TransferServices,
2456
+ UserServices,
2457
+ getAssetsFile,
2458
+ getBaseURL,
2459
+ getImageURL,
2460
+ queryParamsStringfy
326
2461
  };