@tagsamurai/fats-api-services 1.1.0-staging-local.2 → 1.1.0-staging-local.4

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.
@@ -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({
@@ -2289,6 +2304,9 @@ const TAGServices = {
2289
2304
  },
2290
2305
  putDeclineReport: (body, tagType) => {
2291
2306
  return API$c.put(`/report/decline-report/${tagType}`, body);
2307
+ },
2308
+ postScanLog: (body) => {
2309
+ return API$c.post("/scan-log", body);
2292
2310
  }
2293
2311
  };
2294
2312
  const API$b = createAxiosInstance({
@@ -2597,6 +2615,14 @@ const IOTService = {
2597
2615
  updateReader: (id, body) => {
2598
2616
  return ReaderAPI.put(`/${id}`, body);
2599
2617
  },
2618
+ //https://dev-api.tagsamurai.com/fam/iot/v2/reader/validate-serial-number
2619
+ validateSerialNumber: (serialNumber) => {
2620
+ return ReaderAPI.get("/validate-serial-number", {
2621
+ params: {
2622
+ serialNumber: JSON.stringify(serialNumber)
2623
+ }
2624
+ });
2625
+ },
2600
2626
  //https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/set-status
2601
2627
  updateReaderStatus: (body) => {
2602
2628
  return IOTReaderAPI.put("/set-status", body);
@@ -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({
@@ -2297,6 +2312,9 @@ System.register(["axios"], function(exports, module) {
2297
2312
  },
2298
2313
  putDeclineReport: (body, tagType) => {
2299
2314
  return API$c.put(`/report/decline-report/${tagType}`, body);
2315
+ },
2316
+ postScanLog: (body) => {
2317
+ return API$c.post("/scan-log", body);
2300
2318
  }
2301
2319
  });
2302
2320
  const API$b = createAxiosInstance({
@@ -2605,6 +2623,14 @@ System.register(["axios"], function(exports, module) {
2605
2623
  updateReader: (id, body) => {
2606
2624
  return ReaderAPI.put(`/${id}`, body);
2607
2625
  },
2626
+ //https://dev-api.tagsamurai.com/fam/iot/v2/reader/validate-serial-number
2627
+ validateSerialNumber: (serialNumber) => {
2628
+ return ReaderAPI.get("/validate-serial-number", {
2629
+ params: {
2630
+ serialNumber: JSON.stringify(serialNumber)
2631
+ }
2632
+ });
2633
+ },
2608
2634
  //https://dev-api.tagsamurai.com/fam/iot/v2/iot/reader/set-status
2609
2635
  updateReaderStatus: (body) => {
2610
2636
  return IOTReaderAPI.put("/set-status", body);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagsamurai/fats-api-services",
3
- "version": "1.1.0-staging-local.2",
3
+ "version": "1.1.0-staging-local.4",
4
4
  "author": "developer.tagsamurai",
5
5
  "description": "Fixed Asset Tag Samurai Services Library",
6
6
  "module": "./api-services.es.js",
@@ -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>>;
@@ -30,5 +30,9 @@ declare const TAGServices: {
30
30
  putReportTAG: (id: string, body: ReportTagBody) => Promise<AxiosResponse>;
31
31
  putReportTAGBulk: (body?: ReportTagBulkBody) => Promise<AxiosResponse>;
32
32
  putDeclineReport: (body: DeclineReportDto, tagType?: string) => Promise<AxiosResponse>;
33
+ postScanLog: (body: {
34
+ tag: string;
35
+ serialNumber: string;
36
+ }) => Promise<AxiosResponse>;
33
37
  };
34
38
  export default TAGServices;
@@ -34,7 +34,7 @@ export type TransferLogRequest = {
34
34
  asset: string;
35
35
  assetId: string;
36
36
  assetImage?: string;
37
- status: string;
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 {};