@gravity-ui/gateway 4.4.0 → 4.5.0
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/build/components/rest.js
CHANGED
|
@@ -34,9 +34,9 @@ function getConfigSerializerFunction(config) {
|
|
|
34
34
|
return undefined;
|
|
35
35
|
}
|
|
36
36
|
function createRestAction(endpoints, config, serviceKey, actionName, options, ErrorConstructor) {
|
|
37
|
-
var _a, _b, _c;
|
|
37
|
+
var _a, _b, _c, _d;
|
|
38
38
|
const timeout = (_c = (_a = config === null || config === void 0 ? void 0 : config.timeout) !== null && _a !== void 0 ? _a : (_b = options === null || options === void 0 ? void 0 : options.axiosConfig) === null || _b === void 0 ? void 0 : _b.timeout) !== null && _c !== void 0 ? _c : options === null || options === void 0 ? void 0 : options.timeout;
|
|
39
|
-
const defaultAxiosClient = (0, axios_1.getAxiosClient)(timeout, config === null || config === void 0 ? void 0 : config.retries, options === null || options === void 0 ? void 0 : options.axiosRetryCondition, options === null || options === void 0 ? void 0 : options.axiosConfig, options === null || options === void 0 ? void 0 : options.axiosInterceptors);
|
|
39
|
+
const defaultAxiosClient = (0, axios_1.getAxiosClient)(timeout, config === null || config === void 0 ? void 0 : config.retries, (_d = config === null || config === void 0 ? void 0 : config.axiosRetryCondition) !== null && _d !== void 0 ? _d : options === null || options === void 0 ? void 0 : options.axiosRetryCondition, options === null || options === void 0 ? void 0 : options.axiosConfig, options === null || options === void 0 ? void 0 : options.axiosInterceptors);
|
|
40
40
|
/* eslint-disable complexity */
|
|
41
41
|
return async function action(actionConfig) {
|
|
42
42
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
package/build/models/common.d.ts
CHANGED
|
@@ -139,6 +139,7 @@ export interface ApiServiceRestActionConfig<Context extends GatewayContext, TOut
|
|
|
139
139
|
responseType?: AxiosRequestConfig['responseType'];
|
|
140
140
|
expectedResponseContentType?: ResponseContentType | ResponseContentType[];
|
|
141
141
|
maxRedirects?: number;
|
|
142
|
+
axiosRetryCondition?: AxiosRetryCondition;
|
|
142
143
|
}
|
|
143
144
|
export interface ApiServiceBaseGrpcActionConfig<Context extends GatewayContext, TOutput, TParams = undefined, TTransformed = TOutput> extends ApiServiceBaseActionConfig<Context, TOutput, TParams, TTransformed> {
|
|
144
145
|
action: string;
|