@tagsamurai/fats-api-services 1.0.3-alpha.71 → 1.0.3-alpha.73
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 +8 -8
- package/api-services.system.js +7 -7
- package/main.d.ts +1 -1
- package/package.json +1 -1
- package/src/dto/{AMPManagement.dto.d.ts → ampManagement.dto.d.ts} +10 -10
- package/src/services/{AMPManagement.service.d.ts → ampManagement.service.d.ts} +13 -13
- package/src/types/{AMPManagement.type.d.ts → ampManagement.type.d.ts} +8 -8
package/api-services.es.js
CHANGED
|
@@ -2859,9 +2859,9 @@ const ContinuousImprovementServices = {
|
|
|
2859
2859
|
return API$1.put(`/review-audit-finding/${id}`, payload);
|
|
2860
2860
|
}
|
|
2861
2861
|
};
|
|
2862
|
-
const API = createAxiosInstance({ prefix: "/
|
|
2863
|
-
const
|
|
2864
|
-
|
|
2862
|
+
const API = createAxiosInstance({ prefix: "/v2/amp" });
|
|
2863
|
+
const AmpManagementServices = {
|
|
2864
|
+
getAmp(params) {
|
|
2865
2865
|
return API.get(`/`, { params });
|
|
2866
2866
|
},
|
|
2867
2867
|
getDemand(ampId, params) {
|
|
@@ -2876,10 +2876,10 @@ const AMPManagementService = {
|
|
|
2876
2876
|
getAmpOptions(params) {
|
|
2877
2877
|
return API.get(`/options`, { params });
|
|
2878
2878
|
},
|
|
2879
|
-
|
|
2879
|
+
getAmpFilterOptions(params) {
|
|
2880
2880
|
return API.get(`/filter-options`, { params });
|
|
2881
2881
|
},
|
|
2882
|
-
|
|
2882
|
+
createAmp(payload) {
|
|
2883
2883
|
return API.post(`/`, payload);
|
|
2884
2884
|
},
|
|
2885
2885
|
createDemand(payload) {
|
|
@@ -2891,7 +2891,7 @@ const AMPManagementService = {
|
|
|
2891
2891
|
createResource(payload) {
|
|
2892
2892
|
return API.post(`/resource`, payload);
|
|
2893
2893
|
},
|
|
2894
|
-
|
|
2894
|
+
editAmp(ampId, payload) {
|
|
2895
2895
|
return API.put(`/${ampId}`, payload);
|
|
2896
2896
|
},
|
|
2897
2897
|
editDemand(demandId, payload) {
|
|
@@ -2903,7 +2903,7 @@ const AMPManagementService = {
|
|
|
2903
2903
|
editResource(resourceId, payload) {
|
|
2904
2904
|
return API.put(`resource/${resourceId}`, payload);
|
|
2905
2905
|
},
|
|
2906
|
-
|
|
2906
|
+
deleteAmp(ampId) {
|
|
2907
2907
|
return API.delete(`/${ampId}`);
|
|
2908
2908
|
},
|
|
2909
2909
|
deleteDemand(demandId) {
|
|
@@ -2917,9 +2917,9 @@ const AMPManagementService = {
|
|
|
2917
2917
|
}
|
|
2918
2918
|
};
|
|
2919
2919
|
export {
|
|
2920
|
-
AMPManagementService,
|
|
2921
2920
|
AccountingServices,
|
|
2922
2921
|
AliasCodeServices,
|
|
2922
|
+
AmpManagementServices,
|
|
2923
2923
|
AssetNameServices,
|
|
2924
2924
|
AssetPolicyServices,
|
|
2925
2925
|
AssetServices,
|
package/api-services.system.js
CHANGED
|
@@ -2867,9 +2867,9 @@ System.register(["axios"], function(exports, module) {
|
|
|
2867
2867
|
return API$1.put(`/review-audit-finding/${id}`, payload);
|
|
2868
2868
|
}
|
|
2869
2869
|
});
|
|
2870
|
-
const API = createAxiosInstance({ prefix: "/
|
|
2871
|
-
const
|
|
2872
|
-
|
|
2870
|
+
const API = createAxiosInstance({ prefix: "/v2/amp" });
|
|
2871
|
+
const AmpManagementServices = exports("AmpManagementServices", {
|
|
2872
|
+
getAmp(params) {
|
|
2873
2873
|
return API.get(`/`, { params });
|
|
2874
2874
|
},
|
|
2875
2875
|
getDemand(ampId, params) {
|
|
@@ -2884,10 +2884,10 @@ System.register(["axios"], function(exports, module) {
|
|
|
2884
2884
|
getAmpOptions(params) {
|
|
2885
2885
|
return API.get(`/options`, { params });
|
|
2886
2886
|
},
|
|
2887
|
-
|
|
2887
|
+
getAmpFilterOptions(params) {
|
|
2888
2888
|
return API.get(`/filter-options`, { params });
|
|
2889
2889
|
},
|
|
2890
|
-
|
|
2890
|
+
createAmp(payload) {
|
|
2891
2891
|
return API.post(`/`, payload);
|
|
2892
2892
|
},
|
|
2893
2893
|
createDemand(payload) {
|
|
@@ -2899,7 +2899,7 @@ System.register(["axios"], function(exports, module) {
|
|
|
2899
2899
|
createResource(payload) {
|
|
2900
2900
|
return API.post(`/resource`, payload);
|
|
2901
2901
|
},
|
|
2902
|
-
|
|
2902
|
+
editAmp(ampId, payload) {
|
|
2903
2903
|
return API.put(`/${ampId}`, payload);
|
|
2904
2904
|
},
|
|
2905
2905
|
editDemand(demandId, payload) {
|
|
@@ -2911,7 +2911,7 @@ System.register(["axios"], function(exports, module) {
|
|
|
2911
2911
|
editResource(resourceId, payload) {
|
|
2912
2912
|
return API.put(`resource/${resourceId}`, payload);
|
|
2913
2913
|
},
|
|
2914
|
-
|
|
2914
|
+
deleteAmp(ampId) {
|
|
2915
2915
|
return API.delete(`/${ampId}`);
|
|
2916
2916
|
},
|
|
2917
2917
|
deleteDemand(demandId) {
|
package/main.d.ts
CHANGED
|
@@ -54,4 +54,4 @@ export { default as RiskRegisterServices } from './src/services/riskRegister.ser
|
|
|
54
54
|
export { default as DocumentServices } from './src/services/document.service';
|
|
55
55
|
export { default as OpportunityRegisterServices } from './src/services/opportunityRegister.service';
|
|
56
56
|
export { default as ContinuousImprovementServices } from './src/services/continuousImprovement.service';
|
|
57
|
-
export { default as
|
|
57
|
+
export { default as AmpManagementServices } from './src/services/ampManagement.service';
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QueryParams } from '../types/fetchResponse.type';
|
|
2
|
-
import {
|
|
2
|
+
import { ActionAmp, AmpDemand, AmpLifecycle, AmpResource, AmpType, LifecycleStage } from '../types/ampManagement.type';
|
|
3
3
|
interface BaseParams extends QueryParams {
|
|
4
4
|
page?: string;
|
|
5
5
|
limit?: string;
|
|
@@ -7,10 +7,10 @@ interface BaseParams extends QueryParams {
|
|
|
7
7
|
sortOrder?: string;
|
|
8
8
|
search?: string;
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
11
|
-
type?:
|
|
10
|
+
export interface GetAmpParams extends BaseParams {
|
|
11
|
+
type?: AmpType;
|
|
12
12
|
date?: number[];
|
|
13
|
-
action
|
|
13
|
+
action?: ActionAmp[];
|
|
14
14
|
ampId?: string[];
|
|
15
15
|
version?: string[];
|
|
16
16
|
modifiedBy?: string[];
|
|
@@ -21,21 +21,21 @@ export interface GetLifecycleParams extends BaseParams {
|
|
|
21
21
|
}
|
|
22
22
|
export interface GetResourceParams extends BaseParams {
|
|
23
23
|
}
|
|
24
|
-
export interface
|
|
24
|
+
export interface GetAmpOptionsParams {
|
|
25
25
|
linkedSAMPOptions?: boolean;
|
|
26
26
|
}
|
|
27
|
-
export interface
|
|
27
|
+
export interface GetAmpFilterOptionsParams {
|
|
28
28
|
ampIdOptions?: boolean;
|
|
29
29
|
groupOptions?: boolean;
|
|
30
30
|
}
|
|
31
|
-
export interface
|
|
31
|
+
export interface AmpPayload {
|
|
32
32
|
submitType: 'Save as Draft' | 'Submit';
|
|
33
33
|
name: string;
|
|
34
34
|
linkedSAMP?: string;
|
|
35
35
|
group?: string;
|
|
36
|
-
demands?:
|
|
37
|
-
lifecycles?:
|
|
38
|
-
resources?:
|
|
36
|
+
demands?: AmpDemand[];
|
|
37
|
+
lifecycles?: AmpLifecycle[];
|
|
38
|
+
resources?: AmpResource[];
|
|
39
39
|
change?: 'Minor Change' | 'Major Change';
|
|
40
40
|
}
|
|
41
41
|
export interface DemandPayload {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
2
|
import { FetchListResponse, FetchOptionResponse } from '../types/fetchResponse.type';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export declare const
|
|
6
|
-
|
|
7
|
-
getDemand(ampId: string, params: GetDemandParams): Promise<AxiosResponse<FetchListResponse<
|
|
8
|
-
getLifecycle(ampId: string, params: GetLifecycleParams): Promise<AxiosResponse<FetchListResponse<
|
|
9
|
-
getResource(ampId: string, params: GetResourceParams): Promise<AxiosResponse<FetchListResponse<
|
|
10
|
-
getAmpOptions(params:
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
import { GetAmpParams, GetDemandParams, GetResourceParams, GetLifecycleParams, GetAmpFilterOptionsParams, GetAmpOptionsParams, AmpPayload, DemandPayload, LifecyclePayload, ResourcePayload } from '../dto/ampManagement.dto';
|
|
4
|
+
import { Amp, AmpDemand, AmpLifecycle, AmpResource } from '../types/ampManagement.type';
|
|
5
|
+
export declare const AmpManagementServices: {
|
|
6
|
+
getAmp(params: GetAmpParams): Promise<AxiosResponse<FetchListResponse<Amp>>>;
|
|
7
|
+
getDemand(ampId: string, params: GetDemandParams): Promise<AxiosResponse<FetchListResponse<AmpDemand>>>;
|
|
8
|
+
getLifecycle(ampId: string, params: GetLifecycleParams): Promise<AxiosResponse<FetchListResponse<AmpLifecycle>>>;
|
|
9
|
+
getResource(ampId: string, params: GetResourceParams): Promise<AxiosResponse<FetchListResponse<AmpResource>>>;
|
|
10
|
+
getAmpOptions(params: GetAmpOptionsParams): Promise<AxiosResponse<FetchOptionResponse>>;
|
|
11
|
+
getAmpFilterOptions(params: GetAmpFilterOptionsParams): Promise<AxiosResponse<FetchOptionResponse>>;
|
|
12
|
+
createAmp(payload: AmpPayload): Promise<AxiosResponse>;
|
|
13
13
|
createDemand(payload: DemandPayload): Promise<AxiosResponse>;
|
|
14
14
|
createLifecycle(payload: LifecyclePayload): Promise<AxiosResponse>;
|
|
15
15
|
createResource(payload: ResourcePayload): Promise<AxiosResponse>;
|
|
16
|
-
|
|
16
|
+
editAmp(ampId: string, payload: AmpPayload): Promise<AxiosResponse>;
|
|
17
17
|
editDemand(demandId: string, payload: DemandPayload): Promise<AxiosResponse>;
|
|
18
18
|
editLifecycle(lifecycleId: string, payload: LifecyclePayload): Promise<AxiosResponse>;
|
|
19
19
|
editResource(resourceId: string, payload: ResourcePayload): Promise<AxiosResponse>;
|
|
20
|
-
|
|
20
|
+
deleteAmp(ampId: string): Promise<AxiosResponse>;
|
|
21
21
|
deleteDemand(demandId: string): Promise<AxiosResponse>;
|
|
22
22
|
deleteLifecycle(lifecycleId: string): Promise<AxiosResponse>;
|
|
23
23
|
deleteResource(resourceId: string): Promise<AxiosResponse>;
|
|
24
24
|
};
|
|
25
|
-
export default
|
|
25
|
+
export default AmpManagementServices;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
1
|
+
export type ActionAmp = 'Create' | 'Edit' | 'Delete' | 'Activate';
|
|
2
|
+
export type AmpType = 'Active' | 'Previous Version';
|
|
3
|
+
export type AmpStatus = 'Active' | 'Draft' | 'Draft (Revision)';
|
|
4
4
|
export type LifecycleStage = 'Planning' | 'Acquisition' | 'Register Asset' | 'Assignment' | 'Borrowing' | 'Transfer' | 'Disposal' | 'Audit' | 'Tracking' | 'Maintenance Routine' | 'Repair Ticketing' | 'Depreciation';
|
|
5
|
-
export interface
|
|
5
|
+
export interface Amp {
|
|
6
6
|
ampId: string;
|
|
7
7
|
name: string;
|
|
8
8
|
version: string;
|
|
9
9
|
linkedSAMPId: string;
|
|
10
10
|
group: string;
|
|
11
|
-
status:
|
|
11
|
+
status: AmpStatus;
|
|
12
12
|
lastModified: number;
|
|
13
13
|
}
|
|
14
|
-
export interface
|
|
14
|
+
export interface AmpDemand {
|
|
15
15
|
demandId: string;
|
|
16
16
|
description: string;
|
|
17
17
|
performanceTarget: string;
|
|
18
18
|
measurementMethod: string;
|
|
19
19
|
notes: string;
|
|
20
20
|
}
|
|
21
|
-
export interface
|
|
21
|
+
export interface AmpLifecycle {
|
|
22
22
|
lifecycleId: string;
|
|
23
23
|
stage: LifecycleStage;
|
|
24
24
|
activity: string;
|
|
@@ -26,7 +26,7 @@ export interface AMPLifecycle {
|
|
|
26
26
|
pic: string;
|
|
27
27
|
note: string;
|
|
28
28
|
}
|
|
29
|
-
export interface
|
|
29
|
+
export interface AmpResource {
|
|
30
30
|
resourceId: string;
|
|
31
31
|
resource: string;
|
|
32
32
|
quantity: string;
|