@tagsamurai/fats-api-services 1.0.0-alpha.281 → 1.0.0-alpha.283
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 +10 -1
- package/api-services.system.js +10 -1
- package/package.json +1 -1
- package/src/dto/oldTrackingService.dto.d.ts +58 -0
- package/src/services/oldTracking.service.d.ts +4 -1
- package/src/services/settingsBrand.service.d.ts +2 -2
- package/src/types/settingsBrand.type.d.ts +5 -5
package/api-services.es.js
CHANGED
|
@@ -2199,7 +2199,7 @@ const API$5 = createAxiosInstance({
|
|
|
2199
2199
|
});
|
|
2200
2200
|
const API_APPROVAL = createAxiosInstance({
|
|
2201
2201
|
env: "APP_TAGSAMURAI_API",
|
|
2202
|
-
prefix: "/tracking/v2/tracking"
|
|
2202
|
+
prefix: "/tracking/v2/tracking-approval"
|
|
2203
2203
|
});
|
|
2204
2204
|
const TrackingServices = {
|
|
2205
2205
|
getTrackingDetail: (trackingId) => {
|
|
@@ -2235,6 +2235,15 @@ const TrackingServices = {
|
|
|
2235
2235
|
},
|
|
2236
2236
|
getApproverList: (id) => {
|
|
2237
2237
|
return API_APPROVAL.get(`/${id}/approval-history`);
|
|
2238
|
+
},
|
|
2239
|
+
getApprovalList: (params) => {
|
|
2240
|
+
return API_APPROVAL.get("", { params });
|
|
2241
|
+
},
|
|
2242
|
+
getApprovalFilterOptions: (params) => {
|
|
2243
|
+
return API_APPROVAL.get("/options", { params });
|
|
2244
|
+
},
|
|
2245
|
+
putApproval: (body) => {
|
|
2246
|
+
return API_APPROVAL.put("/approval", body);
|
|
2238
2247
|
}
|
|
2239
2248
|
};
|
|
2240
2249
|
const API$4 = createAxiosInstance({
|
package/api-services.system.js
CHANGED
|
@@ -2206,7 +2206,7 @@ System.register(["axios"], function(exports, module) {
|
|
|
2206
2206
|
});
|
|
2207
2207
|
const API_APPROVAL = createAxiosInstance({
|
|
2208
2208
|
env: "APP_TAGSAMURAI_API",
|
|
2209
|
-
prefix: "/tracking/v2/tracking"
|
|
2209
|
+
prefix: "/tracking/v2/tracking-approval"
|
|
2210
2210
|
});
|
|
2211
2211
|
const TrackingServices = exports("TrackingServices", {
|
|
2212
2212
|
getTrackingDetail: (trackingId) => {
|
|
@@ -2242,6 +2242,15 @@ System.register(["axios"], function(exports, module) {
|
|
|
2242
2242
|
},
|
|
2243
2243
|
getApproverList: (id) => {
|
|
2244
2244
|
return API_APPROVAL.get(`/${id}/approval-history`);
|
|
2245
|
+
},
|
|
2246
|
+
getApprovalList: (params) => {
|
|
2247
|
+
return API_APPROVAL.get("", { params });
|
|
2248
|
+
},
|
|
2249
|
+
getApprovalFilterOptions: (params) => {
|
|
2250
|
+
return API_APPROVAL.get("/options", { params });
|
|
2251
|
+
},
|
|
2252
|
+
putApproval: (body) => {
|
|
2253
|
+
return API_APPROVAL.put("/approval", body);
|
|
2245
2254
|
}
|
|
2246
2255
|
});
|
|
2247
2256
|
const API$4 = createAxiosInstance({
|
package/package.json
CHANGED
|
@@ -49,3 +49,61 @@ export interface UpdateTrackingBody {
|
|
|
49
49
|
reportSource?: string;
|
|
50
50
|
serialNumber?: string;
|
|
51
51
|
}
|
|
52
|
+
export type ApprovalView = 'Active' | 'History';
|
|
53
|
+
export interface ApprovalListQueryParams extends QueryParams {
|
|
54
|
+
type: ApprovalView;
|
|
55
|
+
assetName?: string;
|
|
56
|
+
group?: string;
|
|
57
|
+
reportedBy?: string;
|
|
58
|
+
lastUpdate?: string;
|
|
59
|
+
}
|
|
60
|
+
export type GetApprovalListResponse = {
|
|
61
|
+
data: {
|
|
62
|
+
data: ApprovalListItem[];
|
|
63
|
+
totalRecords: number;
|
|
64
|
+
};
|
|
65
|
+
message: string;
|
|
66
|
+
};
|
|
67
|
+
type AssetName = {
|
|
68
|
+
_id: string;
|
|
69
|
+
nameWithSequence: string;
|
|
70
|
+
name: string;
|
|
71
|
+
key: number;
|
|
72
|
+
aliasCode: string;
|
|
73
|
+
};
|
|
74
|
+
type AssetGroup = {
|
|
75
|
+
_id: string;
|
|
76
|
+
name: string;
|
|
77
|
+
key: number;
|
|
78
|
+
};
|
|
79
|
+
type ReportedBy = {
|
|
80
|
+
_id: string;
|
|
81
|
+
fullName: string;
|
|
82
|
+
key: number;
|
|
83
|
+
};
|
|
84
|
+
export type ApprovalListItem = {
|
|
85
|
+
_id: string;
|
|
86
|
+
tracking: string;
|
|
87
|
+
assetName: AssetName;
|
|
88
|
+
assetGroup: AssetGroup;
|
|
89
|
+
reportedBy: ReportedBy;
|
|
90
|
+
status: string;
|
|
91
|
+
updatedAt: string;
|
|
92
|
+
assetImageSmall: string | null;
|
|
93
|
+
assetImageMedium: string | null;
|
|
94
|
+
assetImageBig: string | null;
|
|
95
|
+
isApproved: boolean;
|
|
96
|
+
notes: string;
|
|
97
|
+
};
|
|
98
|
+
export interface FilterOptionsQueryParams {
|
|
99
|
+
type: ApprovalView;
|
|
100
|
+
assetNameOptions?: boolean;
|
|
101
|
+
userOptions?: boolean;
|
|
102
|
+
groupOptions?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface ApprovalBody {
|
|
105
|
+
id?: string;
|
|
106
|
+
isApproved?: boolean;
|
|
107
|
+
notes?: string;
|
|
108
|
+
}
|
|
109
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
|
-
import { MoveBackTrackingDto, ReportMissingBody, TrackingFilterOptionsQueryParams, TrackingQueryParams, UpdateTrackingBody } from '../dto/oldTrackingService.dto';
|
|
2
|
+
import { ApprovalBody, ApprovalListQueryParams, FilterOptionsQueryParams, GetApprovalListResponse, MoveBackTrackingDto, ReportMissingBody, TrackingFilterOptionsQueryParams, TrackingQueryParams, UpdateTrackingBody } from '../dto/oldTrackingService.dto';
|
|
3
3
|
declare const TrackingServices: {
|
|
4
4
|
getTrackingDetail: (trackingId: string) => Promise<AxiosResponse>;
|
|
5
5
|
putFoundAsset: (tag: string, groupId: string, serialNumber?: string, type?: string) => Promise<AxiosResponse>;
|
|
@@ -10,5 +10,8 @@ declare const TrackingServices: {
|
|
|
10
10
|
getTrackingDetailByScan: (tag: string) => Promise<AxiosResponse>;
|
|
11
11
|
getFilterOptions: (endPoint: "/history" | "", params: TrackingFilterOptionsQueryParams) => Promise<AxiosResponse>;
|
|
12
12
|
getApproverList: (id: string) => Promise<AxiosResponse>;
|
|
13
|
+
getApprovalList: (params: ApprovalListQueryParams) => Promise<AxiosResponse<GetApprovalListResponse>>;
|
|
14
|
+
getApprovalFilterOptions: (params: FilterOptionsQueryParams) => Promise<AxiosResponse>;
|
|
15
|
+
putApproval: (body: ApprovalBody) => Promise<AxiosResponse>;
|
|
13
16
|
};
|
|
14
17
|
export default TrackingServices;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
2
|
import { BrandAssignCategoryBody, BrandUnassignCategoryBody, CreateBrandBody, DeleteBrandBody, EditBrandBody, GetBrandDropdownQueryParameter, GetBrandListAssetOptionsQueryParameter, GetBrandListAssetQueryParameter, GetBrandListCategoryOptionsQueryParameter, GetBrandListCategoryQueryParameter, GetBrandListOptionsFAQueryParameter, GetBrandListQueryParameter } from '../dto/settingsBrand.dto';
|
|
3
3
|
import { FetchDetailResponse, FetchListResponse, FetchResponse, ShortFetchListResponse } from '../types/fetchResponse.type';
|
|
4
|
-
import { BrandDetail, BrandDropdown, BrandList, BrandListAsset, BrandListCategory, BrandListCategoryOptions, BrandListOptionsFA } from '../types/settingsBrand.type';
|
|
4
|
+
import { BrandDetail, BrandDropdown, BrandList, BrandListAsset, BrandListAssetOptions, BrandListCategory, BrandListCategoryOptions, BrandListOptionsFA } from '../types/settingsBrand.type';
|
|
5
5
|
declare const SettingBrandServiceGo: {
|
|
6
6
|
getBrandList: (params?: GetBrandListQueryParameter) => Promise<AxiosResponse<FetchListResponse<BrandList>>>;
|
|
7
7
|
getBrandListOptionsFA: (params?: GetBrandListOptionsFAQueryParameter) => Promise<AxiosResponse<FetchDetailResponse<BrandListOptionsFA>>>;
|
|
@@ -10,7 +10,7 @@ declare const SettingBrandServiceGo: {
|
|
|
10
10
|
getBrandListCategory: (id: string, params?: GetBrandListCategoryQueryParameter) => Promise<AxiosResponse<FetchListResponse<BrandListCategory>>>;
|
|
11
11
|
getBrandListCategoryOptions: (id: string, params?: GetBrandListCategoryOptionsQueryParameter) => Promise<FetchDetailResponse<BrandListCategoryOptions>>;
|
|
12
12
|
getBrandListAsset: (id: string, params?: GetBrandListAssetQueryParameter) => Promise<AxiosResponse<FetchListResponse<BrandListAsset>>>;
|
|
13
|
-
getBrandListAssetOptions: (id: string, params?: GetBrandListAssetOptionsQueryParameter) => Promise<AxiosResponse<FetchDetailResponse<
|
|
13
|
+
getBrandListAssetOptions: (id: string, params?: GetBrandListAssetOptionsQueryParameter) => Promise<AxiosResponse<FetchDetailResponse<BrandListAssetOptions>>>;
|
|
14
14
|
createBrand: (body: CreateBrandBody) => Promise<AxiosResponse<FetchResponse>>;
|
|
15
15
|
brandAssignCategory: (body: BrandAssignCategoryBody) => Promise<AxiosResponse<FetchResponse>>;
|
|
16
16
|
brandUnassignCategory: (body: BrandUnassignCategoryBody) => Promise<AxiosResponse<FetchResponse>>;
|
|
@@ -46,6 +46,11 @@ export interface BrandListCategory {
|
|
|
46
46
|
}[];
|
|
47
47
|
}
|
|
48
48
|
export type BrandListCategoryOptions = Omit<BrandListOptionsFA, 'modelOptions'>;
|
|
49
|
+
export interface BrandListAssetOptions {
|
|
50
|
+
categoryOptions: Option[];
|
|
51
|
+
modelOptions: Option[];
|
|
52
|
+
assetNameOptions: Option[];
|
|
53
|
+
}
|
|
49
54
|
export interface BrandListAsset {
|
|
50
55
|
name: string;
|
|
51
56
|
assets: {
|
|
@@ -74,9 +79,4 @@ export interface BrandListAsset {
|
|
|
74
79
|
};
|
|
75
80
|
sequence: number;
|
|
76
81
|
}
|
|
77
|
-
export interface BrandListAssetOptions {
|
|
78
|
-
categoryOptions: Option[];
|
|
79
|
-
modelOptions: Option[];
|
|
80
|
-
assetNameOptions: Option[];
|
|
81
|
-
}
|
|
82
82
|
export {};
|