@tagsamurai/fats-api-services 1.1.0-dev-alpha.17 → 1.1.0-dev-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api-services.es.js
CHANGED
|
@@ -266,6 +266,21 @@ const AssetServices = {
|
|
|
266
266
|
*/
|
|
267
267
|
deleteAttachment: (params) => {
|
|
268
268
|
return AssetsAPIs.delete("/attachment/bulk", { params });
|
|
269
|
+
},
|
|
270
|
+
postAssetAvailableList: (params) => {
|
|
271
|
+
const body = buildBodyParams(params);
|
|
272
|
+
return AssetsAPIs.post("/available/list", body);
|
|
273
|
+
},
|
|
274
|
+
postAssetList: (params) => {
|
|
275
|
+
const body = buildBodyParams(params);
|
|
276
|
+
return AssetsAPIs.post("/list", body);
|
|
277
|
+
},
|
|
278
|
+
postAssetOption: (params) => {
|
|
279
|
+
const body = buildBodyParams(params);
|
|
280
|
+
return AssetsAPIs.post("/list/options", body);
|
|
281
|
+
},
|
|
282
|
+
getLinkedAssetFamily: (id) => {
|
|
283
|
+
return AssetsAPIs.get("/family", { params: { id } });
|
|
269
284
|
}
|
|
270
285
|
};
|
|
271
286
|
const API$N = createAxiosInstance({
|
|
@@ -2597,6 +2612,14 @@ const IOTService = {
|
|
|
2597
2612
|
updateReader: (id, body) => {
|
|
2598
2613
|
return ReaderAPI.put(`/${id}`, body);
|
|
2599
2614
|
},
|
|
2615
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/reader/validate-serial-number
|
|
2616
|
+
validateSerialNumber: (serialNumber) => {
|
|
2617
|
+
return ReaderAPI.get("/validate-serial-number", {
|
|
2618
|
+
params: {
|
|
2619
|
+
serialNumber: JSON.stringify(serialNumber)
|
|
2620
|
+
}
|
|
2621
|
+
});
|
|
2622
|
+
},
|
|
2600
2623
|
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/set-status
|
|
2601
2624
|
updateReaderStatus: (body) => {
|
|
2602
2625
|
return IOTReaderAPI.put("/set-status", body);
|
package/api-services.system.js
CHANGED
|
@@ -274,6 +274,21 @@ System.register(["axios"], function(exports, module) {
|
|
|
274
274
|
*/
|
|
275
275
|
deleteAttachment: (params) => {
|
|
276
276
|
return AssetsAPIs.delete("/attachment/bulk", { params });
|
|
277
|
+
},
|
|
278
|
+
postAssetAvailableList: (params) => {
|
|
279
|
+
const body = buildBodyParams(params);
|
|
280
|
+
return AssetsAPIs.post("/available/list", body);
|
|
281
|
+
},
|
|
282
|
+
postAssetList: (params) => {
|
|
283
|
+
const body = buildBodyParams(params);
|
|
284
|
+
return AssetsAPIs.post("/list", body);
|
|
285
|
+
},
|
|
286
|
+
postAssetOption: (params) => {
|
|
287
|
+
const body = buildBodyParams(params);
|
|
288
|
+
return AssetsAPIs.post("/list/options", body);
|
|
289
|
+
},
|
|
290
|
+
getLinkedAssetFamily: (id) => {
|
|
291
|
+
return AssetsAPIs.get("/family", { params: { id } });
|
|
277
292
|
}
|
|
278
293
|
});
|
|
279
294
|
const API$N = createAxiosInstance({
|
|
@@ -2605,6 +2620,14 @@ System.register(["axios"], function(exports, module) {
|
|
|
2605
2620
|
updateReader: (id, body) => {
|
|
2606
2621
|
return ReaderAPI.put(`/${id}`, body);
|
|
2607
2622
|
},
|
|
2623
|
+
//https://dev-api.tagsamurai.com/fam/iot/v2/reader/validate-serial-number
|
|
2624
|
+
validateSerialNumber: (serialNumber) => {
|
|
2625
|
+
return ReaderAPI.get("/validate-serial-number", {
|
|
2626
|
+
params: {
|
|
2627
|
+
serialNumber: JSON.stringify(serialNumber)
|
|
2628
|
+
}
|
|
2629
|
+
});
|
|
2630
|
+
},
|
|
2608
2631
|
//https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/set-status
|
|
2609
2632
|
updateReaderStatus: (body) => {
|
|
2610
2633
|
return IOTReaderAPI.put("/set-status", body);
|
package/package.json
CHANGED
|
@@ -40,5 +40,9 @@ declare const AssetServices: {
|
|
|
40
40
|
deleteAttachment: (params: {
|
|
41
41
|
attachmentsIds: string;
|
|
42
42
|
}) => Promise<AxiosResponse>;
|
|
43
|
+
postAssetAvailableList: (params?: GetAllAssetsQueryParams | GetAvailableAssetsQueryParams) => Promise<AxiosResponse>;
|
|
44
|
+
postAssetList: (params?: GetAllAssetsQueryParams) => Promise<AxiosResponse>;
|
|
45
|
+
postAssetOption: (params?: GetAllAssetsQueryParams) => Promise<AxiosResponse>;
|
|
46
|
+
getLinkedAssetFamily: (id?: string) => Promise<AxiosResponse>;
|
|
43
47
|
};
|
|
44
48
|
export default AssetServices;
|
|
@@ -17,6 +17,7 @@ declare const IOTService: {
|
|
|
17
17
|
getIOTDetail: (id: string) => Promise<AxiosResponse<FetchDetailResponse<IOTDetail>>>;
|
|
18
18
|
getIOTCheckManager: () => Promise<AxiosResponse<FetchDetailResponse<IOTCheckManager>>>;
|
|
19
19
|
updateReader: (id: string, body: UpdateReaderBody) => Promise<AxiosResponse<FetchDetailResponse<UpdateReader>>>;
|
|
20
|
+
validateSerialNumber: (serialNumber: string[]) => Promise<AxiosResponse>;
|
|
20
21
|
updateReaderStatus: (body: UpdateReaderStatusBody) => Promise<AxiosResponse<FetchResponse>>;
|
|
21
22
|
updateAntennaStatus: (body: UpdateAntennaStatusBody) => Promise<AxiosResponse<FetchResponse>>;
|
|
22
23
|
setIOTPortGroup: (id: string, body: SetIOTPortGroupBody) => Promise<AxiosResponse<FetchResponse>>;
|
|
@@ -34,7 +34,7 @@ export type TransferLogRequest = {
|
|
|
34
34
|
asset: string;
|
|
35
35
|
assetId: string;
|
|
36
36
|
assetImage?: string;
|
|
37
|
-
status:
|
|
37
|
+
status: TransactionStatus;
|
|
38
38
|
assetName: AssetName;
|
|
39
39
|
assetCategory: AssetFieldObject;
|
|
40
40
|
assetGroup: AssetFieldObject;
|
|
@@ -58,3 +58,5 @@ export type TransferLogItem = {
|
|
|
58
58
|
createdAt: string;
|
|
59
59
|
updatedAt: string;
|
|
60
60
|
};
|
|
61
|
+
type TransactionStatus = 'Waiting for Approval' | 'Waiting for Handover' | 'Completed' | 'Cancelled' | 'Rejected' | 'Reported Missing';
|
|
62
|
+
export {};
|