@aurigma/axios-backoffice-api-client 2.63.14 → 2.65.1
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/dist/cjs/backoffice-api-client.d.ts +261 -2
- package/dist/cjs/backoffice-api-client.js +797 -1
- package/dist/cjs/backoffice-api-client.js.map +1 -1
- package/dist/esm/backoffice-api-client.d.ts +261 -2
- package/dist/esm/backoffice-api-client.js +797 -1
- package/dist/esm/backoffice-api-client.js.map +1 -1
- package/package.json +1 -1
|
@@ -2845,6 +2845,793 @@ var BackOfficeApiClient;
|
|
|
2845
2845
|
}
|
|
2846
2846
|
}
|
|
2847
2847
|
BackOfficeApiClient.ProductsManagementApiClient = ProductsManagementApiClient;
|
|
2848
|
+
class ProjectStatusesManagementApiClient extends ApiClientBase {
|
|
2849
|
+
instance;
|
|
2850
|
+
baseUrl;
|
|
2851
|
+
jsonParseReviver = undefined;
|
|
2852
|
+
constructor(configuration, baseUrl, instance) {
|
|
2853
|
+
super(configuration);
|
|
2854
|
+
this.instance = instance ? instance : axios_1.create();
|
|
2855
|
+
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
2856
|
+
}
|
|
2857
|
+
/**
|
|
2858
|
+
* Returns a list of all existing project statuses.
|
|
2859
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2860
|
+
* @return Success
|
|
2861
|
+
*/
|
|
2862
|
+
getAll(tenantId, cancelToken) {
|
|
2863
|
+
let url_ = this.baseUrl + "/api/backoffice/v1/projects-statuses?";
|
|
2864
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2865
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2866
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2867
|
+
let options_ = {
|
|
2868
|
+
method: "GET",
|
|
2869
|
+
url: url_,
|
|
2870
|
+
headers: {
|
|
2871
|
+
"Accept": "application/json"
|
|
2872
|
+
},
|
|
2873
|
+
cancelToken
|
|
2874
|
+
};
|
|
2875
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2876
|
+
return this.instance.request(transformedOptions_);
|
|
2877
|
+
}).catch((_error) => {
|
|
2878
|
+
if (isAxiosError(_error) && _error.response) {
|
|
2879
|
+
return _error.response;
|
|
2880
|
+
}
|
|
2881
|
+
else {
|
|
2882
|
+
throw _error;
|
|
2883
|
+
}
|
|
2884
|
+
}).then((_response) => {
|
|
2885
|
+
return this.transformResult(url_, _response, (_response) => this.processGetAll(_response));
|
|
2886
|
+
});
|
|
2887
|
+
}
|
|
2888
|
+
processGetAll(response) {
|
|
2889
|
+
const status = response.status;
|
|
2890
|
+
let _headers = {};
|
|
2891
|
+
if (response.headers && typeof response.headers === "object") {
|
|
2892
|
+
for (let k in response.headers) {
|
|
2893
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
2894
|
+
_headers[k] = response.headers[k];
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
}
|
|
2898
|
+
if (status === 200) {
|
|
2899
|
+
const _responseText = response.data;
|
|
2900
|
+
let result200 = null;
|
|
2901
|
+
let resultData200 = _responseText;
|
|
2902
|
+
result200 = JSON.parse(resultData200);
|
|
2903
|
+
return Promise.resolve(result200);
|
|
2904
|
+
}
|
|
2905
|
+
else if (status === 401) {
|
|
2906
|
+
const _responseText = response.data;
|
|
2907
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2908
|
+
}
|
|
2909
|
+
else if (status === 403) {
|
|
2910
|
+
const _responseText = response.data;
|
|
2911
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2912
|
+
}
|
|
2913
|
+
else if (status !== 200 && status !== 204) {
|
|
2914
|
+
const _responseText = response.data;
|
|
2915
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2916
|
+
}
|
|
2917
|
+
return Promise.resolve(null);
|
|
2918
|
+
}
|
|
2919
|
+
/**
|
|
2920
|
+
* Creates a new project status and returns its description.
|
|
2921
|
+
* @param tenantId (optional) Tenant identifier.
|
|
2922
|
+
* @param body (optional) Status creation parameters.
|
|
2923
|
+
* @return Success
|
|
2924
|
+
*/
|
|
2925
|
+
create(tenantId, body, cancelToken) {
|
|
2926
|
+
let url_ = this.baseUrl + "/api/backoffice/v1/projects-statuses?";
|
|
2927
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
2928
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2929
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
2930
|
+
const content_ = JSON.stringify(body);
|
|
2931
|
+
let options_ = {
|
|
2932
|
+
data: content_,
|
|
2933
|
+
method: "POST",
|
|
2934
|
+
url: url_,
|
|
2935
|
+
headers: {
|
|
2936
|
+
"Content-Type": "application/json",
|
|
2937
|
+
"Accept": "application/json"
|
|
2938
|
+
},
|
|
2939
|
+
cancelToken
|
|
2940
|
+
};
|
|
2941
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
2942
|
+
return this.instance.request(transformedOptions_);
|
|
2943
|
+
}).catch((_error) => {
|
|
2944
|
+
if (isAxiosError(_error) && _error.response) {
|
|
2945
|
+
return _error.response;
|
|
2946
|
+
}
|
|
2947
|
+
else {
|
|
2948
|
+
throw _error;
|
|
2949
|
+
}
|
|
2950
|
+
}).then((_response) => {
|
|
2951
|
+
return this.transformResult(url_, _response, (_response) => this.processCreate(_response));
|
|
2952
|
+
});
|
|
2953
|
+
}
|
|
2954
|
+
processCreate(response) {
|
|
2955
|
+
const status = response.status;
|
|
2956
|
+
let _headers = {};
|
|
2957
|
+
if (response.headers && typeof response.headers === "object") {
|
|
2958
|
+
for (let k in response.headers) {
|
|
2959
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
2960
|
+
_headers[k] = response.headers[k];
|
|
2961
|
+
}
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
if (status === 201) {
|
|
2965
|
+
const _responseText = response.data;
|
|
2966
|
+
let result201 = null;
|
|
2967
|
+
let resultData201 = _responseText;
|
|
2968
|
+
result201 = JSON.parse(resultData201);
|
|
2969
|
+
return Promise.resolve(result201);
|
|
2970
|
+
}
|
|
2971
|
+
else if (status === 400) {
|
|
2972
|
+
const _responseText = response.data;
|
|
2973
|
+
let result400 = null;
|
|
2974
|
+
let resultData400 = _responseText;
|
|
2975
|
+
result400 = JSON.parse(resultData400);
|
|
2976
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
2977
|
+
}
|
|
2978
|
+
else if (status === 409) {
|
|
2979
|
+
const _responseText = response.data;
|
|
2980
|
+
let result409 = null;
|
|
2981
|
+
let resultData409 = _responseText;
|
|
2982
|
+
result409 = JSON.parse(resultData409);
|
|
2983
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
2984
|
+
}
|
|
2985
|
+
else if (status === 401) {
|
|
2986
|
+
const _responseText = response.data;
|
|
2987
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
2988
|
+
}
|
|
2989
|
+
else if (status === 403) {
|
|
2990
|
+
const _responseText = response.data;
|
|
2991
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
2992
|
+
}
|
|
2993
|
+
else if (status !== 200 && status !== 204) {
|
|
2994
|
+
const _responseText = response.data;
|
|
2995
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
2996
|
+
}
|
|
2997
|
+
return Promise.resolve(null);
|
|
2998
|
+
}
|
|
2999
|
+
/**
|
|
3000
|
+
* Returns a project status by its identifier.
|
|
3001
|
+
* @param id Status identifier.
|
|
3002
|
+
* @param tenantId (optional) Tenant identifier.
|
|
3003
|
+
* @return Success
|
|
3004
|
+
*/
|
|
3005
|
+
get(id, tenantId, cancelToken) {
|
|
3006
|
+
let url_ = this.baseUrl + "/api/backoffice/v1/projects-statuses/{id}?";
|
|
3007
|
+
if (id === undefined || id === null)
|
|
3008
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3009
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3010
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
3011
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3012
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3013
|
+
let options_ = {
|
|
3014
|
+
method: "GET",
|
|
3015
|
+
url: url_,
|
|
3016
|
+
headers: {
|
|
3017
|
+
"Accept": "application/json"
|
|
3018
|
+
},
|
|
3019
|
+
cancelToken
|
|
3020
|
+
};
|
|
3021
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3022
|
+
return this.instance.request(transformedOptions_);
|
|
3023
|
+
}).catch((_error) => {
|
|
3024
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3025
|
+
return _error.response;
|
|
3026
|
+
}
|
|
3027
|
+
else {
|
|
3028
|
+
throw _error;
|
|
3029
|
+
}
|
|
3030
|
+
}).then((_response) => {
|
|
3031
|
+
return this.transformResult(url_, _response, (_response) => this.processGet(_response));
|
|
3032
|
+
});
|
|
3033
|
+
}
|
|
3034
|
+
processGet(response) {
|
|
3035
|
+
const status = response.status;
|
|
3036
|
+
let _headers = {};
|
|
3037
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3038
|
+
for (let k in response.headers) {
|
|
3039
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3040
|
+
_headers[k] = response.headers[k];
|
|
3041
|
+
}
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
if (status === 200) {
|
|
3045
|
+
const _responseText = response.data;
|
|
3046
|
+
let result200 = null;
|
|
3047
|
+
let resultData200 = _responseText;
|
|
3048
|
+
result200 = JSON.parse(resultData200);
|
|
3049
|
+
return Promise.resolve(result200);
|
|
3050
|
+
}
|
|
3051
|
+
else if (status === 404) {
|
|
3052
|
+
const _responseText = response.data;
|
|
3053
|
+
let result404 = null;
|
|
3054
|
+
let resultData404 = _responseText;
|
|
3055
|
+
result404 = JSON.parse(resultData404);
|
|
3056
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3057
|
+
}
|
|
3058
|
+
else if (status === 401) {
|
|
3059
|
+
const _responseText = response.data;
|
|
3060
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3061
|
+
}
|
|
3062
|
+
else if (status === 403) {
|
|
3063
|
+
const _responseText = response.data;
|
|
3064
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3065
|
+
}
|
|
3066
|
+
else if (status !== 200 && status !== 204) {
|
|
3067
|
+
const _responseText = response.data;
|
|
3068
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3069
|
+
}
|
|
3070
|
+
return Promise.resolve(null);
|
|
3071
|
+
}
|
|
3072
|
+
/**
|
|
3073
|
+
* Updates an existing project status and returns its description.
|
|
3074
|
+
* @param id Status identifier.
|
|
3075
|
+
* @param tenantId (optional) Tenant identifier.
|
|
3076
|
+
* @param body (optional) Status update parameters.
|
|
3077
|
+
* @return Success
|
|
3078
|
+
*/
|
|
3079
|
+
update(id, tenantId, body, cancelToken) {
|
|
3080
|
+
let url_ = this.baseUrl + "/api/backoffice/v1/projects-statuses/{id}?";
|
|
3081
|
+
if (id === undefined || id === null)
|
|
3082
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3083
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3084
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
3085
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3086
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3087
|
+
const content_ = JSON.stringify(body);
|
|
3088
|
+
let options_ = {
|
|
3089
|
+
data: content_,
|
|
3090
|
+
method: "PUT",
|
|
3091
|
+
url: url_,
|
|
3092
|
+
headers: {
|
|
3093
|
+
"Content-Type": "application/json",
|
|
3094
|
+
"Accept": "application/json"
|
|
3095
|
+
},
|
|
3096
|
+
cancelToken
|
|
3097
|
+
};
|
|
3098
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3099
|
+
return this.instance.request(transformedOptions_);
|
|
3100
|
+
}).catch((_error) => {
|
|
3101
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3102
|
+
return _error.response;
|
|
3103
|
+
}
|
|
3104
|
+
else {
|
|
3105
|
+
throw _error;
|
|
3106
|
+
}
|
|
3107
|
+
}).then((_response) => {
|
|
3108
|
+
return this.transformResult(url_, _response, (_response) => this.processUpdate(_response));
|
|
3109
|
+
});
|
|
3110
|
+
}
|
|
3111
|
+
processUpdate(response) {
|
|
3112
|
+
const status = response.status;
|
|
3113
|
+
let _headers = {};
|
|
3114
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3115
|
+
for (let k in response.headers) {
|
|
3116
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3117
|
+
_headers[k] = response.headers[k];
|
|
3118
|
+
}
|
|
3119
|
+
}
|
|
3120
|
+
}
|
|
3121
|
+
if (status === 200) {
|
|
3122
|
+
const _responseText = response.data;
|
|
3123
|
+
let result200 = null;
|
|
3124
|
+
let resultData200 = _responseText;
|
|
3125
|
+
result200 = JSON.parse(resultData200);
|
|
3126
|
+
return Promise.resolve(result200);
|
|
3127
|
+
}
|
|
3128
|
+
else if (status === 400) {
|
|
3129
|
+
const _responseText = response.data;
|
|
3130
|
+
let result400 = null;
|
|
3131
|
+
let resultData400 = _responseText;
|
|
3132
|
+
result400 = JSON.parse(resultData400);
|
|
3133
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
3134
|
+
}
|
|
3135
|
+
else if (status === 404) {
|
|
3136
|
+
const _responseText = response.data;
|
|
3137
|
+
let result404 = null;
|
|
3138
|
+
let resultData404 = _responseText;
|
|
3139
|
+
result404 = JSON.parse(resultData404);
|
|
3140
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3141
|
+
}
|
|
3142
|
+
else if (status === 409) {
|
|
3143
|
+
const _responseText = response.data;
|
|
3144
|
+
let result409 = null;
|
|
3145
|
+
let resultData409 = _responseText;
|
|
3146
|
+
result409 = JSON.parse(resultData409);
|
|
3147
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3148
|
+
}
|
|
3149
|
+
else if (status === 401) {
|
|
3150
|
+
const _responseText = response.data;
|
|
3151
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3152
|
+
}
|
|
3153
|
+
else if (status === 403) {
|
|
3154
|
+
const _responseText = response.data;
|
|
3155
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3156
|
+
}
|
|
3157
|
+
else if (status !== 200 && status !== 204) {
|
|
3158
|
+
const _responseText = response.data;
|
|
3159
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3160
|
+
}
|
|
3161
|
+
return Promise.resolve(null);
|
|
3162
|
+
}
|
|
3163
|
+
/**
|
|
3164
|
+
* Deletes an existing project status and returns its description.
|
|
3165
|
+
* @param id Status identifier.
|
|
3166
|
+
* @param tenantId (optional) Tenant identifier.
|
|
3167
|
+
* @return Success
|
|
3168
|
+
*/
|
|
3169
|
+
delete(id, tenantId, cancelToken) {
|
|
3170
|
+
let url_ = this.baseUrl + "/api/backoffice/v1/projects-statuses/{id}?";
|
|
3171
|
+
if (id === undefined || id === null)
|
|
3172
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3173
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3174
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
3175
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3176
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3177
|
+
let options_ = {
|
|
3178
|
+
method: "DELETE",
|
|
3179
|
+
url: url_,
|
|
3180
|
+
headers: {
|
|
3181
|
+
"Accept": "application/json"
|
|
3182
|
+
},
|
|
3183
|
+
cancelToken
|
|
3184
|
+
};
|
|
3185
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3186
|
+
return this.instance.request(transformedOptions_);
|
|
3187
|
+
}).catch((_error) => {
|
|
3188
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3189
|
+
return _error.response;
|
|
3190
|
+
}
|
|
3191
|
+
else {
|
|
3192
|
+
throw _error;
|
|
3193
|
+
}
|
|
3194
|
+
}).then((_response) => {
|
|
3195
|
+
return this.transformResult(url_, _response, (_response) => this.processDelete(_response));
|
|
3196
|
+
});
|
|
3197
|
+
}
|
|
3198
|
+
processDelete(response) {
|
|
3199
|
+
const status = response.status;
|
|
3200
|
+
let _headers = {};
|
|
3201
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3202
|
+
for (let k in response.headers) {
|
|
3203
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3204
|
+
_headers[k] = response.headers[k];
|
|
3205
|
+
}
|
|
3206
|
+
}
|
|
3207
|
+
}
|
|
3208
|
+
if (status === 200) {
|
|
3209
|
+
const _responseText = response.data;
|
|
3210
|
+
let result200 = null;
|
|
3211
|
+
let resultData200 = _responseText;
|
|
3212
|
+
result200 = JSON.parse(resultData200);
|
|
3213
|
+
return Promise.resolve(result200);
|
|
3214
|
+
}
|
|
3215
|
+
else if (status === 404) {
|
|
3216
|
+
const _responseText = response.data;
|
|
3217
|
+
let result404 = null;
|
|
3218
|
+
let resultData404 = _responseText;
|
|
3219
|
+
result404 = JSON.parse(resultData404);
|
|
3220
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3221
|
+
}
|
|
3222
|
+
else if (status === 409) {
|
|
3223
|
+
const _responseText = response.data;
|
|
3224
|
+
let result409 = null;
|
|
3225
|
+
let resultData409 = _responseText;
|
|
3226
|
+
result409 = JSON.parse(resultData409);
|
|
3227
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3228
|
+
}
|
|
3229
|
+
else if (status === 401) {
|
|
3230
|
+
const _responseText = response.data;
|
|
3231
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3232
|
+
}
|
|
3233
|
+
else if (status === 403) {
|
|
3234
|
+
const _responseText = response.data;
|
|
3235
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3236
|
+
}
|
|
3237
|
+
else if (status !== 200 && status !== 204) {
|
|
3238
|
+
const _responseText = response.data;
|
|
3239
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3240
|
+
}
|
|
3241
|
+
return Promise.resolve(null);
|
|
3242
|
+
}
|
|
3243
|
+
}
|
|
3244
|
+
BackOfficeApiClient.ProjectStatusesManagementApiClient = ProjectStatusesManagementApiClient;
|
|
3245
|
+
class ProjectStatusTransitionsManagementApiClient extends ApiClientBase {
|
|
3246
|
+
instance;
|
|
3247
|
+
baseUrl;
|
|
3248
|
+
jsonParseReviver = undefined;
|
|
3249
|
+
constructor(configuration, baseUrl, instance) {
|
|
3250
|
+
super(configuration);
|
|
3251
|
+
this.instance = instance ? instance : axios_1.create();
|
|
3252
|
+
this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
|
|
3253
|
+
}
|
|
3254
|
+
/**
|
|
3255
|
+
* Returns a list of all existing project status transitions.
|
|
3256
|
+
* @param tenantId (optional) Tenant identifier.
|
|
3257
|
+
* @return Success
|
|
3258
|
+
*/
|
|
3259
|
+
getAll(tenantId, cancelToken) {
|
|
3260
|
+
let url_ = this.baseUrl + "/api/backoffice/v1/projects-transitions?";
|
|
3261
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
3262
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3263
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3264
|
+
let options_ = {
|
|
3265
|
+
method: "GET",
|
|
3266
|
+
url: url_,
|
|
3267
|
+
headers: {
|
|
3268
|
+
"Accept": "application/json"
|
|
3269
|
+
},
|
|
3270
|
+
cancelToken
|
|
3271
|
+
};
|
|
3272
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3273
|
+
return this.instance.request(transformedOptions_);
|
|
3274
|
+
}).catch((_error) => {
|
|
3275
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3276
|
+
return _error.response;
|
|
3277
|
+
}
|
|
3278
|
+
else {
|
|
3279
|
+
throw _error;
|
|
3280
|
+
}
|
|
3281
|
+
}).then((_response) => {
|
|
3282
|
+
return this.transformResult(url_, _response, (_response) => this.processGetAll(_response));
|
|
3283
|
+
});
|
|
3284
|
+
}
|
|
3285
|
+
processGetAll(response) {
|
|
3286
|
+
const status = response.status;
|
|
3287
|
+
let _headers = {};
|
|
3288
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3289
|
+
for (let k in response.headers) {
|
|
3290
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3291
|
+
_headers[k] = response.headers[k];
|
|
3292
|
+
}
|
|
3293
|
+
}
|
|
3294
|
+
}
|
|
3295
|
+
if (status === 200) {
|
|
3296
|
+
const _responseText = response.data;
|
|
3297
|
+
let result200 = null;
|
|
3298
|
+
let resultData200 = _responseText;
|
|
3299
|
+
result200 = JSON.parse(resultData200);
|
|
3300
|
+
return Promise.resolve(result200);
|
|
3301
|
+
}
|
|
3302
|
+
else if (status === 401) {
|
|
3303
|
+
const _responseText = response.data;
|
|
3304
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3305
|
+
}
|
|
3306
|
+
else if (status === 403) {
|
|
3307
|
+
const _responseText = response.data;
|
|
3308
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3309
|
+
}
|
|
3310
|
+
else if (status !== 200 && status !== 204) {
|
|
3311
|
+
const _responseText = response.data;
|
|
3312
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3313
|
+
}
|
|
3314
|
+
return Promise.resolve(null);
|
|
3315
|
+
}
|
|
3316
|
+
/**
|
|
3317
|
+
* Returns a project status transition by its identifier.
|
|
3318
|
+
* @param id Status transition identifier.
|
|
3319
|
+
* @param tenantId (optional) Tenant identifier.
|
|
3320
|
+
* @return Success
|
|
3321
|
+
*/
|
|
3322
|
+
get(id, tenantId, cancelToken) {
|
|
3323
|
+
let url_ = this.baseUrl + "/api/backoffice/v1/projects-transitions/{id}?";
|
|
3324
|
+
if (id === undefined || id === null)
|
|
3325
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3326
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3327
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
3328
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3329
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3330
|
+
let options_ = {
|
|
3331
|
+
method: "GET",
|
|
3332
|
+
url: url_,
|
|
3333
|
+
headers: {
|
|
3334
|
+
"Accept": "application/json"
|
|
3335
|
+
},
|
|
3336
|
+
cancelToken
|
|
3337
|
+
};
|
|
3338
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3339
|
+
return this.instance.request(transformedOptions_);
|
|
3340
|
+
}).catch((_error) => {
|
|
3341
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3342
|
+
return _error.response;
|
|
3343
|
+
}
|
|
3344
|
+
else {
|
|
3345
|
+
throw _error;
|
|
3346
|
+
}
|
|
3347
|
+
}).then((_response) => {
|
|
3348
|
+
return this.transformResult(url_, _response, (_response) => this.processGet(_response));
|
|
3349
|
+
});
|
|
3350
|
+
}
|
|
3351
|
+
processGet(response) {
|
|
3352
|
+
const status = response.status;
|
|
3353
|
+
let _headers = {};
|
|
3354
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3355
|
+
for (let k in response.headers) {
|
|
3356
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3357
|
+
_headers[k] = response.headers[k];
|
|
3358
|
+
}
|
|
3359
|
+
}
|
|
3360
|
+
}
|
|
3361
|
+
if (status === 200) {
|
|
3362
|
+
const _responseText = response.data;
|
|
3363
|
+
let result200 = null;
|
|
3364
|
+
let resultData200 = _responseText;
|
|
3365
|
+
result200 = JSON.parse(resultData200);
|
|
3366
|
+
return Promise.resolve(result200);
|
|
3367
|
+
}
|
|
3368
|
+
else if (status === 404) {
|
|
3369
|
+
const _responseText = response.data;
|
|
3370
|
+
let result404 = null;
|
|
3371
|
+
let resultData404 = _responseText;
|
|
3372
|
+
result404 = JSON.parse(resultData404);
|
|
3373
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3374
|
+
}
|
|
3375
|
+
else if (status === 401) {
|
|
3376
|
+
const _responseText = response.data;
|
|
3377
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3378
|
+
}
|
|
3379
|
+
else if (status === 403) {
|
|
3380
|
+
const _responseText = response.data;
|
|
3381
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3382
|
+
}
|
|
3383
|
+
else if (status !== 200 && status !== 204) {
|
|
3384
|
+
const _responseText = response.data;
|
|
3385
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3386
|
+
}
|
|
3387
|
+
return Promise.resolve(null);
|
|
3388
|
+
}
|
|
3389
|
+
/**
|
|
3390
|
+
* Updates an existing project status transition and returns its description.
|
|
3391
|
+
* @param id Status transition identifier.
|
|
3392
|
+
* @param tenantId (optional) Tenant identifier.
|
|
3393
|
+
* @param body (optional) Status transition update parameters.
|
|
3394
|
+
* @return Success
|
|
3395
|
+
*/
|
|
3396
|
+
update(id, tenantId, body, cancelToken) {
|
|
3397
|
+
let url_ = this.baseUrl + "/api/backoffice/v1/projects-transitions/{id}?";
|
|
3398
|
+
if (id === undefined || id === null)
|
|
3399
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3400
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3401
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
3402
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3403
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3404
|
+
const content_ = JSON.stringify(body);
|
|
3405
|
+
let options_ = {
|
|
3406
|
+
data: content_,
|
|
3407
|
+
method: "PUT",
|
|
3408
|
+
url: url_,
|
|
3409
|
+
headers: {
|
|
3410
|
+
"Content-Type": "application/json",
|
|
3411
|
+
"Accept": "application/json"
|
|
3412
|
+
},
|
|
3413
|
+
cancelToken
|
|
3414
|
+
};
|
|
3415
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3416
|
+
return this.instance.request(transformedOptions_);
|
|
3417
|
+
}).catch((_error) => {
|
|
3418
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3419
|
+
return _error.response;
|
|
3420
|
+
}
|
|
3421
|
+
else {
|
|
3422
|
+
throw _error;
|
|
3423
|
+
}
|
|
3424
|
+
}).then((_response) => {
|
|
3425
|
+
return this.transformResult(url_, _response, (_response) => this.processUpdate(_response));
|
|
3426
|
+
});
|
|
3427
|
+
}
|
|
3428
|
+
processUpdate(response) {
|
|
3429
|
+
const status = response.status;
|
|
3430
|
+
let _headers = {};
|
|
3431
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3432
|
+
for (let k in response.headers) {
|
|
3433
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3434
|
+
_headers[k] = response.headers[k];
|
|
3435
|
+
}
|
|
3436
|
+
}
|
|
3437
|
+
}
|
|
3438
|
+
if (status === 200) {
|
|
3439
|
+
const _responseText = response.data;
|
|
3440
|
+
let result200 = null;
|
|
3441
|
+
let resultData200 = _responseText;
|
|
3442
|
+
result200 = JSON.parse(resultData200);
|
|
3443
|
+
return Promise.resolve(result200);
|
|
3444
|
+
}
|
|
3445
|
+
else if (status === 400) {
|
|
3446
|
+
const _responseText = response.data;
|
|
3447
|
+
let result400 = null;
|
|
3448
|
+
let resultData400 = _responseText;
|
|
3449
|
+
result400 = JSON.parse(resultData400);
|
|
3450
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
3451
|
+
}
|
|
3452
|
+
else if (status === 404) {
|
|
3453
|
+
const _responseText = response.data;
|
|
3454
|
+
let result404 = null;
|
|
3455
|
+
let resultData404 = _responseText;
|
|
3456
|
+
result404 = JSON.parse(resultData404);
|
|
3457
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3458
|
+
}
|
|
3459
|
+
else if (status === 409) {
|
|
3460
|
+
const _responseText = response.data;
|
|
3461
|
+
let result409 = null;
|
|
3462
|
+
let resultData409 = _responseText;
|
|
3463
|
+
result409 = JSON.parse(resultData409);
|
|
3464
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3465
|
+
}
|
|
3466
|
+
else if (status === 401) {
|
|
3467
|
+
const _responseText = response.data;
|
|
3468
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3469
|
+
}
|
|
3470
|
+
else if (status === 403) {
|
|
3471
|
+
const _responseText = response.data;
|
|
3472
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3473
|
+
}
|
|
3474
|
+
else if (status !== 200 && status !== 204) {
|
|
3475
|
+
const _responseText = response.data;
|
|
3476
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3477
|
+
}
|
|
3478
|
+
return Promise.resolve(null);
|
|
3479
|
+
}
|
|
3480
|
+
/**
|
|
3481
|
+
* Deletes an existing project status transition and returns its description.
|
|
3482
|
+
* @param id Status transition identifier.
|
|
3483
|
+
* @param tenantId (optional) Tenant identifier.
|
|
3484
|
+
* @return Success
|
|
3485
|
+
*/
|
|
3486
|
+
delete(id, tenantId, cancelToken) {
|
|
3487
|
+
let url_ = this.baseUrl + "/api/backoffice/v1/projects-transitions/{id}?";
|
|
3488
|
+
if (id === undefined || id === null)
|
|
3489
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
3490
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
3491
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
3492
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3493
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3494
|
+
let options_ = {
|
|
3495
|
+
method: "DELETE",
|
|
3496
|
+
url: url_,
|
|
3497
|
+
headers: {
|
|
3498
|
+
"Accept": "application/json"
|
|
3499
|
+
},
|
|
3500
|
+
cancelToken
|
|
3501
|
+
};
|
|
3502
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3503
|
+
return this.instance.request(transformedOptions_);
|
|
3504
|
+
}).catch((_error) => {
|
|
3505
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3506
|
+
return _error.response;
|
|
3507
|
+
}
|
|
3508
|
+
else {
|
|
3509
|
+
throw _error;
|
|
3510
|
+
}
|
|
3511
|
+
}).then((_response) => {
|
|
3512
|
+
return this.transformResult(url_, _response, (_response) => this.processDelete(_response));
|
|
3513
|
+
});
|
|
3514
|
+
}
|
|
3515
|
+
processDelete(response) {
|
|
3516
|
+
const status = response.status;
|
|
3517
|
+
let _headers = {};
|
|
3518
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3519
|
+
for (let k in response.headers) {
|
|
3520
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3521
|
+
_headers[k] = response.headers[k];
|
|
3522
|
+
}
|
|
3523
|
+
}
|
|
3524
|
+
}
|
|
3525
|
+
if (status === 200) {
|
|
3526
|
+
const _responseText = response.data;
|
|
3527
|
+
let result200 = null;
|
|
3528
|
+
let resultData200 = _responseText;
|
|
3529
|
+
result200 = JSON.parse(resultData200);
|
|
3530
|
+
return Promise.resolve(result200);
|
|
3531
|
+
}
|
|
3532
|
+
else if (status === 404) {
|
|
3533
|
+
const _responseText = response.data;
|
|
3534
|
+
let result404 = null;
|
|
3535
|
+
let resultData404 = _responseText;
|
|
3536
|
+
result404 = JSON.parse(resultData404);
|
|
3537
|
+
return throwException("Not Found", status, _responseText, _headers, result404);
|
|
3538
|
+
}
|
|
3539
|
+
else if (status === 401) {
|
|
3540
|
+
const _responseText = response.data;
|
|
3541
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3542
|
+
}
|
|
3543
|
+
else if (status === 403) {
|
|
3544
|
+
const _responseText = response.data;
|
|
3545
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3546
|
+
}
|
|
3547
|
+
else if (status !== 200 && status !== 204) {
|
|
3548
|
+
const _responseText = response.data;
|
|
3549
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3550
|
+
}
|
|
3551
|
+
return Promise.resolve(null);
|
|
3552
|
+
}
|
|
3553
|
+
/**
|
|
3554
|
+
* Creates a new project status transition and returns its description.
|
|
3555
|
+
* @param tenantId (optional) Tenant identifier.
|
|
3556
|
+
* @param body (optional) Status transition creation parameters.
|
|
3557
|
+
* @return Success
|
|
3558
|
+
*/
|
|
3559
|
+
create(tenantId, body, cancelToken) {
|
|
3560
|
+
let url_ = this.baseUrl + "/api/backoffice/v1/projects-transitions/transitions?";
|
|
3561
|
+
if (tenantId !== undefined && tenantId !== null)
|
|
3562
|
+
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
3563
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3564
|
+
const content_ = JSON.stringify(body);
|
|
3565
|
+
let options_ = {
|
|
3566
|
+
data: content_,
|
|
3567
|
+
method: "POST",
|
|
3568
|
+
url: url_,
|
|
3569
|
+
headers: {
|
|
3570
|
+
"Content-Type": "application/json",
|
|
3571
|
+
"Accept": "application/json"
|
|
3572
|
+
},
|
|
3573
|
+
cancelToken
|
|
3574
|
+
};
|
|
3575
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3576
|
+
return this.instance.request(transformedOptions_);
|
|
3577
|
+
}).catch((_error) => {
|
|
3578
|
+
if (isAxiosError(_error) && _error.response) {
|
|
3579
|
+
return _error.response;
|
|
3580
|
+
}
|
|
3581
|
+
else {
|
|
3582
|
+
throw _error;
|
|
3583
|
+
}
|
|
3584
|
+
}).then((_response) => {
|
|
3585
|
+
return this.transformResult(url_, _response, (_response) => this.processCreate(_response));
|
|
3586
|
+
});
|
|
3587
|
+
}
|
|
3588
|
+
processCreate(response) {
|
|
3589
|
+
const status = response.status;
|
|
3590
|
+
let _headers = {};
|
|
3591
|
+
if (response.headers && typeof response.headers === "object") {
|
|
3592
|
+
for (let k in response.headers) {
|
|
3593
|
+
if (response.headers.hasOwnProperty(k)) {
|
|
3594
|
+
_headers[k] = response.headers[k];
|
|
3595
|
+
}
|
|
3596
|
+
}
|
|
3597
|
+
}
|
|
3598
|
+
if (status === 201) {
|
|
3599
|
+
const _responseText = response.data;
|
|
3600
|
+
let result201 = null;
|
|
3601
|
+
let resultData201 = _responseText;
|
|
3602
|
+
result201 = JSON.parse(resultData201);
|
|
3603
|
+
return Promise.resolve(result201);
|
|
3604
|
+
}
|
|
3605
|
+
else if (status === 400) {
|
|
3606
|
+
const _responseText = response.data;
|
|
3607
|
+
let result400 = null;
|
|
3608
|
+
let resultData400 = _responseText;
|
|
3609
|
+
result400 = JSON.parse(resultData400);
|
|
3610
|
+
return throwException("Bad Request", status, _responseText, _headers, result400);
|
|
3611
|
+
}
|
|
3612
|
+
else if (status === 409) {
|
|
3613
|
+
const _responseText = response.data;
|
|
3614
|
+
let result409 = null;
|
|
3615
|
+
let resultData409 = _responseText;
|
|
3616
|
+
result409 = JSON.parse(resultData409);
|
|
3617
|
+
return throwException("Conflict", status, _responseText, _headers, result409);
|
|
3618
|
+
}
|
|
3619
|
+
else if (status === 401) {
|
|
3620
|
+
const _responseText = response.data;
|
|
3621
|
+
return throwException("Unauthorized", status, _responseText, _headers);
|
|
3622
|
+
}
|
|
3623
|
+
else if (status === 403) {
|
|
3624
|
+
const _responseText = response.data;
|
|
3625
|
+
return throwException("Forbidden", status, _responseText, _headers);
|
|
3626
|
+
}
|
|
3627
|
+
else if (status !== 200 && status !== 204) {
|
|
3628
|
+
const _responseText = response.data;
|
|
3629
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3630
|
+
}
|
|
3631
|
+
return Promise.resolve(null);
|
|
3632
|
+
}
|
|
3633
|
+
}
|
|
3634
|
+
BackOfficeApiClient.ProjectStatusTransitionsManagementApiClient = ProjectStatusTransitionsManagementApiClient;
|
|
2848
3635
|
class StorefrontsManagementApiClient extends ApiClientBase {
|
|
2849
3636
|
instance;
|
|
2850
3637
|
baseUrl;
|
|
@@ -2861,10 +3648,11 @@ var BackOfficeApiClient;
|
|
|
2861
3648
|
* @param take (optional) Defines page length (how many consequent items of sorted result list should be taken).
|
|
2862
3649
|
* @param sorting (optional) Defines sorting order of result list e.g.: "Title ASC, LastModified DESC".
|
|
2863
3650
|
* @param search (optional) Search string for partial match.
|
|
3651
|
+
* @param status (optional) Storefront status.
|
|
2864
3652
|
* @param tenantId (optional) Tenant identifier.
|
|
2865
3653
|
* @return Success
|
|
2866
3654
|
*/
|
|
2867
|
-
getAll(types, skip, take, sorting, search, tenantId, cancelToken) {
|
|
3655
|
+
getAll(types, skip, take, sorting, search, status, tenantId, cancelToken) {
|
|
2868
3656
|
let url_ = this.baseUrl + "/api/backoffice/v1/storefronts?";
|
|
2869
3657
|
if (types !== undefined && types !== null)
|
|
2870
3658
|
types && types.forEach(item => { url_ += "types=" + encodeURIComponent("" + item) + "&"; });
|
|
@@ -2876,6 +3664,8 @@ var BackOfficeApiClient;
|
|
|
2876
3664
|
url_ += "sorting=" + encodeURIComponent("" + sorting) + "&";
|
|
2877
3665
|
if (search !== undefined && search !== null)
|
|
2878
3666
|
url_ += "search=" + encodeURIComponent("" + search) + "&";
|
|
3667
|
+
if (status !== undefined && status !== null)
|
|
3668
|
+
url_ += "status=" + encodeURIComponent("" + status) + "&";
|
|
2879
3669
|
if (tenantId !== undefined && tenantId !== null)
|
|
2880
3670
|
url_ += "tenantId=" + encodeURIComponent("" + tenantId) + "&";
|
|
2881
3671
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -4282,6 +5072,12 @@ var BackOfficeApiClient;
|
|
|
4282
5072
|
StorefrontType["Shopify"] = "Shopify";
|
|
4283
5073
|
StorefrontType["ShopifyCustom"] = "ShopifyCustom";
|
|
4284
5074
|
})(StorefrontType = BackOfficeApiClient.StorefrontType || (BackOfficeApiClient.StorefrontType = {}));
|
|
5075
|
+
/** Storefront status. */
|
|
5076
|
+
let StorefrontStatus;
|
|
5077
|
+
(function (StorefrontStatus) {
|
|
5078
|
+
StorefrontStatus["Dev"] = "Dev";
|
|
5079
|
+
StorefrontStatus["Prod"] = "Prod";
|
|
5080
|
+
})(StorefrontStatus = BackOfficeApiClient.StorefrontStatus || (BackOfficeApiClient.StorefrontStatus = {}));
|
|
4285
5081
|
class ApiException extends Error {
|
|
4286
5082
|
message;
|
|
4287
5083
|
status;
|