tsv2-library 1.1.0-dev-alpha.15 → 1.1.0-dev-alpha.16

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tsv2-library",
3
3
  "author": "fixedassetv2-fe",
4
- "version": "1.1.0-dev-alpha.15",
4
+ "version": "1.1.0-dev-alpha.16",
5
5
  "license": "ISC",
6
6
  "homepage": "https://github.com/fixedassetv2-fe/tsv2-library#readme",
7
7
  "repository": {
@@ -1,6 +1,6 @@
1
1
  import axios, { AxiosInstance, AxiosResponse } from 'axios';
2
2
  import {
3
- GetAllAssetsQueryParams,
3
+ GetAssetsQueryParams,
4
4
  GetAssetDetailParams,
5
5
  GetAssetMapParams,
6
6
  GetAssetMapResponse,
@@ -39,22 +39,20 @@ export const API = ({
39
39
  };
40
40
 
41
41
  const postAssetList = (
42
- params?: GetAllAssetsQueryParams,
42
+ params?: GetAssetsQueryParams,
43
43
  ): Promise<AxiosResponse> => {
44
44
  const body = buildBodyParams(params);
45
45
  return API().post('/list', body);
46
46
  };
47
47
 
48
48
  const postAssetOption = (
49
- params?: GetAllAssetsQueryParams,
49
+ params?: GetAssetsQueryParams,
50
50
  ): Promise<AxiosResponse> => {
51
51
  const body = buildBodyParams(params);
52
52
  return API().post('/list/options', body);
53
53
  };
54
54
 
55
- const getAllAssets = (
56
- params: GetAllAssetsQueryParams,
57
- ): Promise<AxiosResponse> => {
55
+ const getAllAssets = (params: GetAssetsQueryParams): Promise<AxiosResponse> => {
58
56
  return API({ params }).get('/');
59
57
  };
60
58
 
@@ -68,7 +66,7 @@ const getAvailableAssets = (
68
66
  };
69
67
 
70
68
  const postAssetAvailableList = (
71
- params?: GetAllAssetsQueryParams | GetAvailableAssetsQueryParams,
69
+ params?: GetAssetsQueryParams | GetAvailableAssetsQueryParams,
72
70
  ): Promise<AxiosResponse> => {
73
71
  const body = buildBodyParams(params);
74
72
  return API().post('/available/list', body);
@@ -79,7 +77,7 @@ const scanAsset = (tag: string): Promise<AxiosResponse> => {
79
77
  };
80
78
 
81
79
  /**
82
- * @deprecated - Replaced with getAvailableAssets
80
+ * @deprecated - Replaced with postAssetsList
83
81
  */
84
82
  const getAssetsById = (
85
83
  _id: string,
@@ -125,6 +123,9 @@ const getLinkedAssetFamily = (
125
123
  return API({ params: { id } }).get('/family');
126
124
  };
127
125
 
126
+ /**
127
+ * @deprecated - Replaced with postAssetsList
128
+ */
128
129
  const matchAssetWithTag = (
129
130
  id: string,
130
131
  tag?: string,