@tagsamurai/fats-api-services 1.0.3-alpha.93 → 1.0.3-alpha.95
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 +91 -75
- package/api-services.system.js +91 -75
- package/package.json +1 -1
- package/src/dto/samp.dto.d.ts +31 -22
- package/src/services/samp.service.d.ts +50 -64
- package/src/types/samp.type.d.ts +1 -1
package/api-services.es.js
CHANGED
|
@@ -2961,123 +2961,139 @@ const SAMPServices = {
|
|
|
2961
2961
|
getActiveSAMP: (params) => {
|
|
2962
2962
|
return API.get("/active/list", { params });
|
|
2963
2963
|
},
|
|
2964
|
+
getActiveSAMPOptions: (params) => {
|
|
2965
|
+
return API.get("/active/options", { params });
|
|
2966
|
+
},
|
|
2964
2967
|
getPreviousVersionSAMP: (params) => {
|
|
2965
2968
|
return API.get("/previous-version/list", { params });
|
|
2966
2969
|
},
|
|
2967
|
-
|
|
2968
|
-
return API.
|
|
2970
|
+
getPreviousSAMPOptions: (params) => {
|
|
2971
|
+
return API.get("/previous-version/options", { params });
|
|
2972
|
+
},
|
|
2973
|
+
initSAMP: () => {
|
|
2974
|
+
return API.post("/init");
|
|
2975
|
+
},
|
|
2976
|
+
saveSubmitSAMP: (data, sampId) => {
|
|
2977
|
+
return API.patch(`/${sampId}`, data);
|
|
2978
|
+
},
|
|
2979
|
+
getDetailSAMP: (sampId) => {
|
|
2980
|
+
return API.get(`/${sampId}`);
|
|
2969
2981
|
},
|
|
2970
2982
|
deleteSAMP: (params) => {
|
|
2971
2983
|
return API.delete("", { params });
|
|
2972
2984
|
},
|
|
2973
|
-
|
|
2974
|
-
return API.
|
|
2985
|
+
cancelSAMPCreate: (sampId) => {
|
|
2986
|
+
return API.delete(`/${sampId}/cancel`);
|
|
2975
2987
|
},
|
|
2976
|
-
|
|
2977
|
-
return API.get(
|
|
2988
|
+
getInternalContextData: (params, sampId) => {
|
|
2989
|
+
return API.get(`${sampId}/internal-context`, { params });
|
|
2978
2990
|
},
|
|
2979
|
-
|
|
2980
|
-
return API.
|
|
2991
|
+
postInternalContext: (data, sampId) => {
|
|
2992
|
+
return API.post(`${sampId}/internal-context`, data);
|
|
2981
2993
|
},
|
|
2982
|
-
|
|
2983
|
-
return API.
|
|
2994
|
+
editInternalContext: (contextId, data, sampId) => {
|
|
2995
|
+
return API.patch(`${sampId}/internal-context/${contextId}`, data);
|
|
2984
2996
|
},
|
|
2985
|
-
|
|
2986
|
-
return API.
|
|
2997
|
+
deleteInternalContext: (params, sampId) => {
|
|
2998
|
+
return API.delete(`${sampId}/internal-context`, { params });
|
|
2987
2999
|
},
|
|
2988
|
-
|
|
2989
|
-
return API.
|
|
3000
|
+
getExternalContextData: (params, sampId) => {
|
|
3001
|
+
return API.get(`${sampId}/external-context`, { params });
|
|
2990
3002
|
},
|
|
2991
|
-
|
|
2992
|
-
return API.
|
|
3003
|
+
postExternalContext: (data, sampId) => {
|
|
3004
|
+
return API.post(`${sampId}/external-context`, data);
|
|
2993
3005
|
},
|
|
2994
|
-
|
|
2995
|
-
return API.
|
|
3006
|
+
editExternalContext: (contextId, data, sampId) => {
|
|
3007
|
+
return API.patch(`${sampId}/external-context/${contextId}`, data);
|
|
2996
3008
|
},
|
|
2997
|
-
|
|
2998
|
-
return API.
|
|
3009
|
+
deleteExternalContext: (params, sampId) => {
|
|
3010
|
+
return API.delete(`${sampId}/external-context`, { params });
|
|
2999
3011
|
},
|
|
3000
|
-
|
|
3001
|
-
return API.
|
|
3012
|
+
getStakeholders: (params, sampId) => {
|
|
3013
|
+
return API.get(`${sampId}/stakeholders`, { params });
|
|
3002
3014
|
},
|
|
3003
|
-
|
|
3004
|
-
return API.
|
|
3015
|
+
postStakeholders: (data, sampId) => {
|
|
3016
|
+
return API.post(`${sampId}/stakeholders`, data);
|
|
3005
3017
|
},
|
|
3006
|
-
|
|
3007
|
-
return API.
|
|
3018
|
+
editStakeholders: (stakeholderId, data, sampId) => {
|
|
3019
|
+
return API.patch(`${sampId}/stakeholders/${stakeholderId}`, data);
|
|
3008
3020
|
},
|
|
3009
|
-
|
|
3010
|
-
return API.
|
|
3021
|
+
deleteStakeholders: (params, sampId) => {
|
|
3022
|
+
return API.delete(`${sampId}/stakeholders`, { params });
|
|
3011
3023
|
},
|
|
3012
|
-
|
|
3013
|
-
return API.
|
|
3024
|
+
getRolesResponsibility: (params, sampId) => {
|
|
3025
|
+
return API.get(`${sampId}/roles-and-responsibility`, { params });
|
|
3014
3026
|
},
|
|
3015
|
-
|
|
3016
|
-
return API.
|
|
3027
|
+
postRolesResponsibility: (data, sampId) => {
|
|
3028
|
+
return API.post(`${sampId}/roles-and-responsibility`, data);
|
|
3017
3029
|
},
|
|
3018
|
-
|
|
3019
|
-
return API.
|
|
3030
|
+
editRolesResponsibility: (rolesResId, data, sampId) => {
|
|
3031
|
+
return API.patch(`${sampId}/roles-and-responsibility/${rolesResId}`, data);
|
|
3020
3032
|
},
|
|
3021
|
-
|
|
3022
|
-
return API.
|
|
3033
|
+
deleteRolesResponsibility: (params, sampId) => {
|
|
3034
|
+
return API.delete(`${sampId}/roles-and-responsibility`, { params });
|
|
3023
3035
|
},
|
|
3024
|
-
|
|
3025
|
-
return API.
|
|
3036
|
+
getSupportingSystemTools: (params, sampId) => {
|
|
3037
|
+
return API.get(`${sampId}/supporting-system-tools`, { params });
|
|
3026
3038
|
},
|
|
3027
|
-
|
|
3028
|
-
return API.
|
|
3039
|
+
postSupportingSystemTools: (data, sampId) => {
|
|
3040
|
+
return API.post(`${sampId}/supporting-system-tools`, data);
|
|
3029
3041
|
},
|
|
3030
|
-
|
|
3031
|
-
return API.
|
|
3042
|
+
editSupportingSystemTools: (toolsId, data, sampId) => {
|
|
3043
|
+
return API.patch(`${sampId}/supporting-system-tools/${toolsId}`, data);
|
|
3032
3044
|
},
|
|
3033
|
-
|
|
3034
|
-
return API.
|
|
3045
|
+
deleteSupportingSystemTools: (params, sampId) => {
|
|
3046
|
+
return API.delete(`${sampId}/supporting-system-tools`, { params });
|
|
3035
3047
|
},
|
|
3036
|
-
|
|
3037
|
-
return API.
|
|
3048
|
+
getAMObjectives: (params, sampId) => {
|
|
3049
|
+
return API.get(`${sampId}/am-objective/list`, { params });
|
|
3038
3050
|
},
|
|
3039
|
-
|
|
3040
|
-
return API.
|
|
3051
|
+
getAMObjectivesOptions: (params, sampId) => {
|
|
3052
|
+
return API.get(`${sampId}/am-objective/options`, { params });
|
|
3041
3053
|
},
|
|
3042
|
-
|
|
3043
|
-
return API.
|
|
3054
|
+
postAMObjectives: (data, sampId) => {
|
|
3055
|
+
return API.post(`${sampId}/am-objective`, data);
|
|
3044
3056
|
},
|
|
3045
|
-
|
|
3046
|
-
return API.
|
|
3057
|
+
editAMObjectives: (objectiveId, data, sampId) => {
|
|
3058
|
+
return API.put(`${sampId}/am-objective/${objectiveId}`, data);
|
|
3047
3059
|
},
|
|
3048
|
-
|
|
3049
|
-
return API.
|
|
3060
|
+
deleteAMObjectives: (params, sampId) => {
|
|
3061
|
+
return API.delete(`${sampId}/am-objective`, { params });
|
|
3050
3062
|
},
|
|
3051
|
-
|
|
3052
|
-
return API.
|
|
3063
|
+
getRisk: (params, sampId) => {
|
|
3064
|
+
return API.get(`${sampId}/strategic-risk-register/list`, { params });
|
|
3053
3065
|
},
|
|
3054
|
-
|
|
3055
|
-
return API.
|
|
3066
|
+
getRiskOptions: (params, sampId) => {
|
|
3067
|
+
return API.get(`${sampId}/strategic-risk-register/options`, { params });
|
|
3056
3068
|
},
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
return API.get("/strategic-risk", { params });
|
|
3069
|
+
postRisk: (data, sampId) => {
|
|
3070
|
+
return API.post(`${sampId}/strategic-risk-register`, data);
|
|
3060
3071
|
},
|
|
3061
|
-
|
|
3062
|
-
return API.
|
|
3072
|
+
editRisk: (riskId, data, sampId) => {
|
|
3073
|
+
return API.put(`${sampId}/strategic-risk-register/${riskId}`, data);
|
|
3063
3074
|
},
|
|
3064
|
-
|
|
3065
|
-
return API.
|
|
3075
|
+
deleteRisk: (params, sampId) => {
|
|
3076
|
+
return API.delete(`${sampId}/strategic-risk-register`, { params });
|
|
3066
3077
|
},
|
|
3067
|
-
|
|
3068
|
-
return API.
|
|
3078
|
+
getOpportunity: (params, sampId) => {
|
|
3079
|
+
return API.get(`${sampId}/strategic-opportunity-register/list`, { params });
|
|
3069
3080
|
},
|
|
3070
|
-
|
|
3071
|
-
return API.get(
|
|
3081
|
+
getOpportunityOptions: (params, sampId) => {
|
|
3082
|
+
return API.get(`${sampId}/strategic-opportunity-register/options`, {
|
|
3083
|
+
params
|
|
3084
|
+
});
|
|
3072
3085
|
},
|
|
3073
|
-
postOpportunity: (data) => {
|
|
3074
|
-
return API.post(
|
|
3086
|
+
postOpportunity: (data, sampId) => {
|
|
3087
|
+
return API.post(`${sampId}/strategic-opportunity-register`, data);
|
|
3075
3088
|
},
|
|
3076
|
-
editOpportunity: (
|
|
3077
|
-
return API.put(
|
|
3089
|
+
editOpportunity: (opportunityId, data, sampId) => {
|
|
3090
|
+
return API.put(
|
|
3091
|
+
`${sampId}/strategic-opportunity-register/${opportunityId}`,
|
|
3092
|
+
data
|
|
3093
|
+
);
|
|
3078
3094
|
},
|
|
3079
|
-
deleteOpportunity: (params) => {
|
|
3080
|
-
return API.delete(
|
|
3095
|
+
deleteOpportunity: (params, sampId) => {
|
|
3096
|
+
return API.delete(`${sampId}/strategic-opportunity-register`, { params });
|
|
3081
3097
|
}
|
|
3082
3098
|
};
|
|
3083
3099
|
export {
|
package/api-services.system.js
CHANGED
|
@@ -2969,123 +2969,139 @@ System.register(["axios"], function(exports, module) {
|
|
|
2969
2969
|
getActiveSAMP: (params) => {
|
|
2970
2970
|
return API.get("/active/list", { params });
|
|
2971
2971
|
},
|
|
2972
|
+
getActiveSAMPOptions: (params) => {
|
|
2973
|
+
return API.get("/active/options", { params });
|
|
2974
|
+
},
|
|
2972
2975
|
getPreviousVersionSAMP: (params) => {
|
|
2973
2976
|
return API.get("/previous-version/list", { params });
|
|
2974
2977
|
},
|
|
2975
|
-
|
|
2976
|
-
return API.
|
|
2978
|
+
getPreviousSAMPOptions: (params) => {
|
|
2979
|
+
return API.get("/previous-version/options", { params });
|
|
2980
|
+
},
|
|
2981
|
+
initSAMP: () => {
|
|
2982
|
+
return API.post("/init");
|
|
2983
|
+
},
|
|
2984
|
+
saveSubmitSAMP: (data, sampId) => {
|
|
2985
|
+
return API.patch(`/${sampId}`, data);
|
|
2986
|
+
},
|
|
2987
|
+
getDetailSAMP: (sampId) => {
|
|
2988
|
+
return API.get(`/${sampId}`);
|
|
2977
2989
|
},
|
|
2978
2990
|
deleteSAMP: (params) => {
|
|
2979
2991
|
return API.delete("", { params });
|
|
2980
2992
|
},
|
|
2981
|
-
|
|
2982
|
-
return API.
|
|
2993
|
+
cancelSAMPCreate: (sampId) => {
|
|
2994
|
+
return API.delete(`/${sampId}/cancel`);
|
|
2983
2995
|
},
|
|
2984
|
-
|
|
2985
|
-
return API.get(
|
|
2996
|
+
getInternalContextData: (params, sampId) => {
|
|
2997
|
+
return API.get(`${sampId}/internal-context`, { params });
|
|
2986
2998
|
},
|
|
2987
|
-
|
|
2988
|
-
return API.
|
|
2999
|
+
postInternalContext: (data, sampId) => {
|
|
3000
|
+
return API.post(`${sampId}/internal-context`, data);
|
|
2989
3001
|
},
|
|
2990
|
-
|
|
2991
|
-
return API.
|
|
3002
|
+
editInternalContext: (contextId, data, sampId) => {
|
|
3003
|
+
return API.patch(`${sampId}/internal-context/${contextId}`, data);
|
|
2992
3004
|
},
|
|
2993
|
-
|
|
2994
|
-
return API.
|
|
3005
|
+
deleteInternalContext: (params, sampId) => {
|
|
3006
|
+
return API.delete(`${sampId}/internal-context`, { params });
|
|
2995
3007
|
},
|
|
2996
|
-
|
|
2997
|
-
return API.
|
|
3008
|
+
getExternalContextData: (params, sampId) => {
|
|
3009
|
+
return API.get(`${sampId}/external-context`, { params });
|
|
2998
3010
|
},
|
|
2999
|
-
|
|
3000
|
-
return API.
|
|
3011
|
+
postExternalContext: (data, sampId) => {
|
|
3012
|
+
return API.post(`${sampId}/external-context`, data);
|
|
3001
3013
|
},
|
|
3002
|
-
|
|
3003
|
-
return API.
|
|
3014
|
+
editExternalContext: (contextId, data, sampId) => {
|
|
3015
|
+
return API.patch(`${sampId}/external-context/${contextId}`, data);
|
|
3004
3016
|
},
|
|
3005
|
-
|
|
3006
|
-
return API.
|
|
3017
|
+
deleteExternalContext: (params, sampId) => {
|
|
3018
|
+
return API.delete(`${sampId}/external-context`, { params });
|
|
3007
3019
|
},
|
|
3008
|
-
|
|
3009
|
-
return API.
|
|
3020
|
+
getStakeholders: (params, sampId) => {
|
|
3021
|
+
return API.get(`${sampId}/stakeholders`, { params });
|
|
3010
3022
|
},
|
|
3011
|
-
|
|
3012
|
-
return API.
|
|
3023
|
+
postStakeholders: (data, sampId) => {
|
|
3024
|
+
return API.post(`${sampId}/stakeholders`, data);
|
|
3013
3025
|
},
|
|
3014
|
-
|
|
3015
|
-
return API.
|
|
3026
|
+
editStakeholders: (stakeholderId, data, sampId) => {
|
|
3027
|
+
return API.patch(`${sampId}/stakeholders/${stakeholderId}`, data);
|
|
3016
3028
|
},
|
|
3017
|
-
|
|
3018
|
-
return API.
|
|
3029
|
+
deleteStakeholders: (params, sampId) => {
|
|
3030
|
+
return API.delete(`${sampId}/stakeholders`, { params });
|
|
3019
3031
|
},
|
|
3020
|
-
|
|
3021
|
-
return API.
|
|
3032
|
+
getRolesResponsibility: (params, sampId) => {
|
|
3033
|
+
return API.get(`${sampId}/roles-and-responsibility`, { params });
|
|
3022
3034
|
},
|
|
3023
|
-
|
|
3024
|
-
return API.
|
|
3035
|
+
postRolesResponsibility: (data, sampId) => {
|
|
3036
|
+
return API.post(`${sampId}/roles-and-responsibility`, data);
|
|
3025
3037
|
},
|
|
3026
|
-
|
|
3027
|
-
return API.
|
|
3038
|
+
editRolesResponsibility: (rolesResId, data, sampId) => {
|
|
3039
|
+
return API.patch(`${sampId}/roles-and-responsibility/${rolesResId}`, data);
|
|
3028
3040
|
},
|
|
3029
|
-
|
|
3030
|
-
return API.
|
|
3041
|
+
deleteRolesResponsibility: (params, sampId) => {
|
|
3042
|
+
return API.delete(`${sampId}/roles-and-responsibility`, { params });
|
|
3031
3043
|
},
|
|
3032
|
-
|
|
3033
|
-
return API.
|
|
3044
|
+
getSupportingSystemTools: (params, sampId) => {
|
|
3045
|
+
return API.get(`${sampId}/supporting-system-tools`, { params });
|
|
3034
3046
|
},
|
|
3035
|
-
|
|
3036
|
-
return API.
|
|
3047
|
+
postSupportingSystemTools: (data, sampId) => {
|
|
3048
|
+
return API.post(`${sampId}/supporting-system-tools`, data);
|
|
3037
3049
|
},
|
|
3038
|
-
|
|
3039
|
-
return API.
|
|
3050
|
+
editSupportingSystemTools: (toolsId, data, sampId) => {
|
|
3051
|
+
return API.patch(`${sampId}/supporting-system-tools/${toolsId}`, data);
|
|
3040
3052
|
},
|
|
3041
|
-
|
|
3042
|
-
return API.
|
|
3053
|
+
deleteSupportingSystemTools: (params, sampId) => {
|
|
3054
|
+
return API.delete(`${sampId}/supporting-system-tools`, { params });
|
|
3043
3055
|
},
|
|
3044
|
-
|
|
3045
|
-
return API.
|
|
3056
|
+
getAMObjectives: (params, sampId) => {
|
|
3057
|
+
return API.get(`${sampId}/am-objective/list`, { params });
|
|
3046
3058
|
},
|
|
3047
|
-
|
|
3048
|
-
return API.
|
|
3059
|
+
getAMObjectivesOptions: (params, sampId) => {
|
|
3060
|
+
return API.get(`${sampId}/am-objective/options`, { params });
|
|
3049
3061
|
},
|
|
3050
|
-
|
|
3051
|
-
return API.
|
|
3062
|
+
postAMObjectives: (data, sampId) => {
|
|
3063
|
+
return API.post(`${sampId}/am-objective`, data);
|
|
3052
3064
|
},
|
|
3053
|
-
|
|
3054
|
-
return API.
|
|
3065
|
+
editAMObjectives: (objectiveId, data, sampId) => {
|
|
3066
|
+
return API.put(`${sampId}/am-objective/${objectiveId}`, data);
|
|
3055
3067
|
},
|
|
3056
|
-
|
|
3057
|
-
return API.
|
|
3068
|
+
deleteAMObjectives: (params, sampId) => {
|
|
3069
|
+
return API.delete(`${sampId}/am-objective`, { params });
|
|
3058
3070
|
},
|
|
3059
|
-
|
|
3060
|
-
return API.
|
|
3071
|
+
getRisk: (params, sampId) => {
|
|
3072
|
+
return API.get(`${sampId}/strategic-risk-register/list`, { params });
|
|
3061
3073
|
},
|
|
3062
|
-
|
|
3063
|
-
return API.
|
|
3074
|
+
getRiskOptions: (params, sampId) => {
|
|
3075
|
+
return API.get(`${sampId}/strategic-risk-register/options`, { params });
|
|
3064
3076
|
},
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
return API.get("/strategic-risk", { params });
|
|
3077
|
+
postRisk: (data, sampId) => {
|
|
3078
|
+
return API.post(`${sampId}/strategic-risk-register`, data);
|
|
3068
3079
|
},
|
|
3069
|
-
|
|
3070
|
-
return API.
|
|
3080
|
+
editRisk: (riskId, data, sampId) => {
|
|
3081
|
+
return API.put(`${sampId}/strategic-risk-register/${riskId}`, data);
|
|
3071
3082
|
},
|
|
3072
|
-
|
|
3073
|
-
return API.
|
|
3083
|
+
deleteRisk: (params, sampId) => {
|
|
3084
|
+
return API.delete(`${sampId}/strategic-risk-register`, { params });
|
|
3074
3085
|
},
|
|
3075
|
-
|
|
3076
|
-
return API.
|
|
3086
|
+
getOpportunity: (params, sampId) => {
|
|
3087
|
+
return API.get(`${sampId}/strategic-opportunity-register/list`, { params });
|
|
3077
3088
|
},
|
|
3078
|
-
|
|
3079
|
-
return API.get(
|
|
3089
|
+
getOpportunityOptions: (params, sampId) => {
|
|
3090
|
+
return API.get(`${sampId}/strategic-opportunity-register/options`, {
|
|
3091
|
+
params
|
|
3092
|
+
});
|
|
3080
3093
|
},
|
|
3081
|
-
postOpportunity: (data) => {
|
|
3082
|
-
return API.post(
|
|
3094
|
+
postOpportunity: (data, sampId) => {
|
|
3095
|
+
return API.post(`${sampId}/strategic-opportunity-register`, data);
|
|
3083
3096
|
},
|
|
3084
|
-
editOpportunity: (
|
|
3085
|
-
return API.put(
|
|
3097
|
+
editOpportunity: (opportunityId, data, sampId) => {
|
|
3098
|
+
return API.put(
|
|
3099
|
+
`${sampId}/strategic-opportunity-register/${opportunityId}`,
|
|
3100
|
+
data
|
|
3101
|
+
);
|
|
3086
3102
|
},
|
|
3087
|
-
deleteOpportunity: (params) => {
|
|
3088
|
-
return API.delete(
|
|
3103
|
+
deleteOpportunity: (params, sampId) => {
|
|
3104
|
+
return API.delete(`${sampId}/strategic-opportunity-register`, { params });
|
|
3089
3105
|
}
|
|
3090
3106
|
});
|
|
3091
3107
|
}
|
package/package.json
CHANGED
package/src/dto/samp.dto.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface GetActiveSAMPQuery extends QueryParams {
|
|
|
7
7
|
search?: string;
|
|
8
8
|
group?: string[];
|
|
9
9
|
status?: string[];
|
|
10
|
+
columns?: string[];
|
|
10
11
|
}
|
|
11
12
|
export interface GetPreviousSAMPQuery extends QueryParams {
|
|
12
13
|
page?: number;
|
|
@@ -17,6 +18,7 @@ export interface GetPreviousSAMPQuery extends QueryParams {
|
|
|
17
18
|
sampId?: string[];
|
|
18
19
|
group?: string[];
|
|
19
20
|
updatedAt?: number[];
|
|
21
|
+
columns?: string[];
|
|
20
22
|
}
|
|
21
23
|
export interface GetActiveSAMPOptionsQuery extends QueryParams {
|
|
22
24
|
statusOptions?: boolean;
|
|
@@ -62,34 +64,41 @@ export interface GetAMObjectivesQuery extends QueryParams {
|
|
|
62
64
|
sortOrder?: number;
|
|
63
65
|
search?: string;
|
|
64
66
|
timeline?: string[];
|
|
65
|
-
pic?: string;
|
|
67
|
+
pic?: string[];
|
|
66
68
|
}
|
|
67
69
|
export interface GetRiskQuery extends QueryParams {
|
|
68
|
-
page?:
|
|
69
|
-
limit?:
|
|
70
|
-
sortBy?: string;
|
|
71
|
-
sortOrder?: string;
|
|
70
|
+
page?: number;
|
|
71
|
+
limit?: number;
|
|
72
72
|
search?: string;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
sortBy?: string;
|
|
74
|
+
sortOrder?: number;
|
|
75
|
+
column?: string[];
|
|
76
|
+
category?: string[];
|
|
77
|
+
riskLevel?: string[];
|
|
78
|
+
timeline?: string[];
|
|
79
|
+
pic?: string[];
|
|
79
80
|
}
|
|
80
81
|
export interface GetOpportunityQuery extends QueryParams {
|
|
81
|
-
page
|
|
82
|
-
limit
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
isRequired?: string;
|
|
90
|
-
category?: string;
|
|
91
|
-
_id?: string;
|
|
82
|
+
page: number;
|
|
83
|
+
limit: number;
|
|
84
|
+
search: string;
|
|
85
|
+
sortBy: string;
|
|
86
|
+
sortOrder: number;
|
|
87
|
+
column: string[];
|
|
88
|
+
timeline: string[];
|
|
89
|
+
pic: string[];
|
|
92
90
|
}
|
|
93
91
|
export interface BaseDeleteQuery extends QueryParams {
|
|
94
92
|
ids: string;
|
|
95
93
|
}
|
|
94
|
+
export interface GetAMObjectivesOptionsQuery extends QueryParams {
|
|
95
|
+
picOptions?: boolean;
|
|
96
|
+
}
|
|
97
|
+
export interface GetRiskOptionsQuery extends QueryParams {
|
|
98
|
+
categoryOptions: boolean;
|
|
99
|
+
riskLevelOptions: boolean;
|
|
100
|
+
picOptions: boolean;
|
|
101
|
+
}
|
|
102
|
+
export interface GetOpportunityOptionsQuery extends QueryParams {
|
|
103
|
+
picOptions?: boolean;
|
|
104
|
+
}
|
|
@@ -1,129 +1,115 @@
|
|
|
1
|
-
import { BaseDeleteQuery, GetActiveSAMPOptionsQuery, GetActiveSAMPQuery, GetAMObjectivesQuery, GetContextQuery, GetOpportunityQuery, GetPreviousSAMPOptionsQuery, GetPreviousSAMPQuery, GetRiskQuery, GetRolesResponsibilityQuery, GetStakeholdersQuery, GetSupportingSystemToolsQuery } from '../dto/samp.dto';
|
|
1
|
+
import { BaseDeleteQuery, GetActiveSAMPOptionsQuery, GetActiveSAMPQuery, GetAMObjectivesOptionsQuery, GetAMObjectivesQuery, GetContextQuery, GetOpportunityOptionsQuery, GetOpportunityQuery, GetPreviousSAMPOptionsQuery, GetPreviousSAMPQuery, GetRiskQuery, GetRolesResponsibilityQuery, GetStakeholdersQuery, GetSupportingSystemToolsQuery } from '../dto/samp.dto';
|
|
2
2
|
import { ActiveSAMPType, AMObjectivesType, ContextType, CreateAMObjectivesType, OpportunityType, PreviousVersionSAMPType, RiskType, RolesResponsibilityType, SAMPDetail, StakeholdersType, SupportingSystemToolsType } from '../types/samp.type';
|
|
3
3
|
import { AxiosResponse } from 'axios';
|
|
4
4
|
import { FetchDetailResponse, FetchListResponse } from '../types/fetchResponse.type';
|
|
5
5
|
import { Option } from '../types/options.type';
|
|
6
|
+
import { GetRiskOptionsQuery } from '../dto/riskRegister.dto';
|
|
6
7
|
declare const SAMPServices: {
|
|
7
8
|
getActiveSAMP: (params: GetActiveSAMPQuery) => Promise<AxiosResponse<FetchListResponse<ActiveSAMPType>>>;
|
|
9
|
+
getActiveSAMPOptions: (params: GetActiveSAMPOptionsQuery) => Promise<AxiosResponse<FetchDetailResponse<Option[]>>>;
|
|
8
10
|
getPreviousVersionSAMP: (params: GetPreviousSAMPQuery) => Promise<AxiosResponse<FetchListResponse<PreviousVersionSAMPType>>>;
|
|
9
|
-
|
|
11
|
+
getPreviousSAMPOptions: (params: GetPreviousSAMPOptionsQuery) => Promise<AxiosResponse<FetchDetailResponse<Option[]>>>;
|
|
12
|
+
initSAMP: () => Promise<AxiosResponse<{
|
|
13
|
+
message: string;
|
|
14
|
+
data: {
|
|
15
|
+
_id: string;
|
|
16
|
+
};
|
|
17
|
+
}>>;
|
|
18
|
+
saveSubmitSAMP: (data: FormData, sampId: string) => Promise<AxiosResponse<{
|
|
10
19
|
message: string;
|
|
11
|
-
status: number;
|
|
12
20
|
}>>;
|
|
21
|
+
getDetailSAMP: (sampId: string) => Promise<AxiosResponse<FetchDetailResponse<SAMPDetail>>>;
|
|
13
22
|
deleteSAMP: (params: BaseDeleteQuery) => Promise<AxiosResponse<{
|
|
14
23
|
message: string;
|
|
15
|
-
status: number;
|
|
16
24
|
}>>;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
postInternalContext: (data: Omit<ContextType, "_id">) => Promise<AxiosResponse<{
|
|
25
|
+
cancelSAMPCreate: (sampId: string) => Promise<AxiosResponse<{
|
|
26
|
+
message: string;
|
|
27
|
+
}>>;
|
|
28
|
+
getInternalContextData: (params: GetContextQuery, sampId: string) => Promise<AxiosResponse<FetchListResponse<ContextType>>>;
|
|
29
|
+
postInternalContext: (data: Omit<ContextType, "_id">, sampId: string) => Promise<AxiosResponse<{
|
|
23
30
|
message: string;
|
|
24
|
-
status: number;
|
|
25
31
|
}>>;
|
|
26
|
-
editInternalContext: (
|
|
32
|
+
editInternalContext: (contextId: string, data: Omit<ContextType, "_id">, sampId: string) => Promise<AxiosResponse<{
|
|
27
33
|
message: string;
|
|
28
|
-
status: number;
|
|
29
34
|
}>>;
|
|
30
|
-
deleteInternalContext: (params: BaseDeleteQuery) => Promise<AxiosResponse<{
|
|
35
|
+
deleteInternalContext: (params: BaseDeleteQuery, sampId: string) => Promise<AxiosResponse<{
|
|
31
36
|
message: string;
|
|
32
|
-
status: number;
|
|
33
37
|
}>>;
|
|
34
|
-
getExternalContextData: (params: GetContextQuery) => Promise<AxiosResponse<FetchListResponse<ContextType>>>;
|
|
35
|
-
postExternalContext: (data: Omit<ContextType, "_id"
|
|
38
|
+
getExternalContextData: (params: GetContextQuery, sampId: string) => Promise<AxiosResponse<FetchListResponse<ContextType>>>;
|
|
39
|
+
postExternalContext: (data: Omit<ContextType, "_id">, sampId: string) => Promise<AxiosResponse<{
|
|
36
40
|
message: string;
|
|
37
|
-
status: number;
|
|
38
41
|
}>>;
|
|
39
|
-
editExternalContext: (
|
|
42
|
+
editExternalContext: (contextId: string, data: Omit<ContextType, "_id">, sampId: string) => Promise<AxiosResponse<{
|
|
40
43
|
message: string;
|
|
41
|
-
status: number;
|
|
42
44
|
}>>;
|
|
43
|
-
deleteExternalContext: (params: BaseDeleteQuery) => Promise<AxiosResponse<{
|
|
45
|
+
deleteExternalContext: (params: BaseDeleteQuery, sampId: string) => Promise<AxiosResponse<{
|
|
44
46
|
message: string;
|
|
45
|
-
status: number;
|
|
46
47
|
}>>;
|
|
47
|
-
getStakeholders: (params: GetStakeholdersQuery) => Promise<AxiosResponse<FetchListResponse<StakeholdersType>>>;
|
|
48
|
-
postStakeholders: (data: Omit<StakeholdersType, "_id"
|
|
48
|
+
getStakeholders: (params: GetStakeholdersQuery, sampId: string) => Promise<AxiosResponse<FetchListResponse<StakeholdersType>>>;
|
|
49
|
+
postStakeholders: (data: Omit<StakeholdersType, "_id">, sampId: string) => Promise<AxiosResponse<{
|
|
49
50
|
message: string;
|
|
50
|
-
status: number;
|
|
51
51
|
}>>;
|
|
52
|
-
editStakeholders: (
|
|
52
|
+
editStakeholders: (stakeholderId: string, data: Omit<StakeholdersType, "_id">, sampId: string) => Promise<AxiosResponse<{
|
|
53
53
|
message: string;
|
|
54
|
-
status: number;
|
|
55
54
|
}>>;
|
|
56
|
-
deleteStakeholders: (params: BaseDeleteQuery) => Promise<AxiosResponse<{
|
|
55
|
+
deleteStakeholders: (params: BaseDeleteQuery, sampId: string) => Promise<AxiosResponse<{
|
|
57
56
|
message: string;
|
|
58
|
-
status: number;
|
|
59
57
|
}>>;
|
|
60
|
-
getRolesResponsibility: (params: GetRolesResponsibilityQuery) => Promise<AxiosResponse<FetchListResponse<RolesResponsibilityType>>>;
|
|
58
|
+
getRolesResponsibility: (params: GetRolesResponsibilityQuery, sampId: string) => Promise<AxiosResponse<FetchListResponse<RolesResponsibilityType>>>;
|
|
61
59
|
postRolesResponsibility: (data: {
|
|
62
60
|
userId: string;
|
|
63
61
|
responsibility: string;
|
|
64
|
-
}) => Promise<AxiosResponse<{
|
|
62
|
+
}, sampId: string) => Promise<AxiosResponse<{
|
|
65
63
|
message: string;
|
|
66
|
-
status: number;
|
|
67
64
|
}>>;
|
|
68
|
-
editRolesResponsibility: (
|
|
65
|
+
editRolesResponsibility: (rolesResId: string, data: Omit<RolesResponsibilityType, "_id">, sampId: string) => Promise<AxiosResponse<{
|
|
69
66
|
message: string;
|
|
70
|
-
status: number;
|
|
71
67
|
}>>;
|
|
72
|
-
deleteRolesResponsibility: (params: BaseDeleteQuery) => Promise<AxiosResponse<{
|
|
68
|
+
deleteRolesResponsibility: (params: BaseDeleteQuery, sampId: string) => Promise<AxiosResponse<{
|
|
73
69
|
message: string;
|
|
74
|
-
status: number;
|
|
75
70
|
}>>;
|
|
76
|
-
getSupportingSystemTools: (params: GetSupportingSystemToolsQuery) => Promise<AxiosResponse<FetchListResponse<SupportingSystemToolsType>>>;
|
|
77
|
-
postSupportingSystemTools: (data: Omit<SupportingSystemToolsType, "_id"
|
|
71
|
+
getSupportingSystemTools: (params: GetSupportingSystemToolsQuery, sampId: string) => Promise<AxiosResponse<FetchListResponse<SupportingSystemToolsType>>>;
|
|
72
|
+
postSupportingSystemTools: (data: Omit<SupportingSystemToolsType, "_id">, sampId: string) => Promise<AxiosResponse<{
|
|
78
73
|
message: string;
|
|
79
|
-
status: number;
|
|
80
74
|
}>>;
|
|
81
|
-
editSupportingSystemTools: (
|
|
75
|
+
editSupportingSystemTools: (toolsId: string, data: Omit<SupportingSystemToolsType, "_id">, sampId: string) => Promise<AxiosResponse<{
|
|
82
76
|
message: string;
|
|
83
|
-
status: number;
|
|
84
77
|
}>>;
|
|
85
|
-
deleteSupportingSystemTools: (params: BaseDeleteQuery) => Promise<AxiosResponse<{
|
|
78
|
+
deleteSupportingSystemTools: (params: BaseDeleteQuery, sampId: string) => Promise<AxiosResponse<{
|
|
86
79
|
message: string;
|
|
87
|
-
status: number;
|
|
88
80
|
}>>;
|
|
89
|
-
getAMObjectives: (params: GetAMObjectivesQuery) => Promise<AxiosResponse<FetchListResponse<AMObjectivesType>>>;
|
|
90
|
-
|
|
81
|
+
getAMObjectives: (params: GetAMObjectivesQuery, sampId: string) => Promise<AxiosResponse<FetchListResponse<AMObjectivesType>>>;
|
|
82
|
+
getAMObjectivesOptions: (params: GetAMObjectivesOptionsQuery, sampId: string) => Promise<AxiosResponse<Option[]>>;
|
|
83
|
+
postAMObjectives: (data: Omit<CreateAMObjectivesType, "_id">, sampId: string) => Promise<AxiosResponse<{
|
|
91
84
|
message: string;
|
|
92
|
-
status: number;
|
|
93
85
|
}>>;
|
|
94
|
-
editAMObjectives: (
|
|
86
|
+
editAMObjectives: (objectiveId: string, data: Omit<CreateAMObjectivesType, "_id">, sampId: string) => Promise<AxiosResponse<{
|
|
95
87
|
message: string;
|
|
96
|
-
status: number;
|
|
97
88
|
}>>;
|
|
98
|
-
deleteAMObjectives: (params: BaseDeleteQuery) => Promise<AxiosResponse<{
|
|
89
|
+
deleteAMObjectives: (params: BaseDeleteQuery, sampId: string) => Promise<AxiosResponse<{
|
|
99
90
|
message: string;
|
|
100
|
-
status: number;
|
|
101
91
|
}>>;
|
|
102
|
-
getRisk: (params: GetRiskQuery) => Promise<AxiosResponse<FetchListResponse<RiskType>>>;
|
|
103
|
-
|
|
92
|
+
getRisk: (params: GetRiskQuery, sampId: string) => Promise<AxiosResponse<FetchListResponse<RiskType>>>;
|
|
93
|
+
getRiskOptions: (params: GetRiskOptionsQuery, sampId: string) => Promise<AxiosResponse<Option[]>>;
|
|
94
|
+
postRisk: (data: Omit<RiskType, "_id">, sampId: string) => Promise<AxiosResponse<{
|
|
104
95
|
message: string;
|
|
105
|
-
status: number;
|
|
106
96
|
}>>;
|
|
107
|
-
editRisk: (
|
|
97
|
+
editRisk: (riskId: string, data: Omit<RiskType, "_id">, sampId: string) => Promise<AxiosResponse<{
|
|
108
98
|
message: string;
|
|
109
|
-
status: number;
|
|
110
99
|
}>>;
|
|
111
|
-
deleteRisk: (params: BaseDeleteQuery) => Promise<AxiosResponse<{
|
|
100
|
+
deleteRisk: (params: BaseDeleteQuery, sampId: string) => Promise<AxiosResponse<{
|
|
112
101
|
message: string;
|
|
113
|
-
status: number;
|
|
114
102
|
}>>;
|
|
115
|
-
getOpportunity: (params: GetOpportunityQuery) => Promise<AxiosResponse<FetchListResponse<OpportunityType>>>;
|
|
116
|
-
|
|
103
|
+
getOpportunity: (params: GetOpportunityQuery, sampId: string) => Promise<AxiosResponse<FetchListResponse<OpportunityType>>>;
|
|
104
|
+
getOpportunityOptions: (params: GetOpportunityOptionsQuery, sampId: string) => Promise<AxiosResponse<Option[]>>;
|
|
105
|
+
postOpportunity: (data: Omit<OpportunityType, "_id">, sampId: string) => Promise<AxiosResponse<{
|
|
117
106
|
message: string;
|
|
118
|
-
status: number;
|
|
119
107
|
}>>;
|
|
120
|
-
editOpportunity: (
|
|
108
|
+
editOpportunity: (opportunityId: string, data: Omit<OpportunityType, "_id">, sampId: string) => Promise<AxiosResponse<{
|
|
121
109
|
message: string;
|
|
122
|
-
status: number;
|
|
123
110
|
}>>;
|
|
124
|
-
deleteOpportunity: (params: BaseDeleteQuery) => Promise<AxiosResponse<{
|
|
111
|
+
deleteOpportunity: (params: BaseDeleteQuery, sampId: string) => Promise<AxiosResponse<{
|
|
125
112
|
message: string;
|
|
126
|
-
status: number;
|
|
127
113
|
}>>;
|
|
128
114
|
};
|
|
129
115
|
export default SAMPServices;
|
package/src/types/samp.type.d.ts
CHANGED