@stackone/transport 2.2.4 → 2.3.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/index.cjs +190 -0
- package/dist/{index.d.ts → index.d.cts} +14 -14
- package/dist/index.d.mts +14 -14
- package/dist/index.mjs +17 -23
- package/package.json +8 -11
- package/dist/index.js +0 -195
|
@@ -365,12 +365,12 @@ interface InterceptorDependencies {
|
|
|
365
365
|
axiosInstance?: AxiosInstance;
|
|
366
366
|
logger?: ILogger;
|
|
367
367
|
context?: RequestContext;
|
|
368
|
-
requestConfig?: RequestConfig
|
|
368
|
+
requestConfig?: RequestConfig;
|
|
369
369
|
concurrencyManager?: ConcurrencyManager;
|
|
370
370
|
rateLimitManager?: RateLimitManager;
|
|
371
371
|
[key: string]: unknown;
|
|
372
372
|
}
|
|
373
|
-
type RequestConfig
|
|
373
|
+
type RequestConfig = {
|
|
374
374
|
rateLimits?: RateLimitConfig;
|
|
375
375
|
concurrency?: ConcurrencyConfig;
|
|
376
376
|
};
|
|
@@ -425,7 +425,7 @@ interface IHttpClient {
|
|
|
425
425
|
payload?: P;
|
|
426
426
|
httpsAgent?: https.Agent;
|
|
427
427
|
httpAgent?: http.Agent;
|
|
428
|
-
requestConfig?: RequestConfig
|
|
428
|
+
requestConfig?: RequestConfig;
|
|
429
429
|
httpsAgentConfig?: https.AgentOptions;
|
|
430
430
|
}): Promise<HttpResponse<T>>;
|
|
431
431
|
get<T>({
|
|
@@ -443,7 +443,7 @@ interface IHttpClient {
|
|
|
443
443
|
maxRedirects?: number;
|
|
444
444
|
cacheTTL?: number;
|
|
445
445
|
context?: RequestContext;
|
|
446
|
-
requestConfig?: RequestConfig
|
|
446
|
+
requestConfig?: RequestConfig;
|
|
447
447
|
}): Promise<HttpResponse<T>>;
|
|
448
448
|
post<P, T>({
|
|
449
449
|
headers,
|
|
@@ -460,7 +460,7 @@ interface IHttpClient {
|
|
|
460
460
|
cacheTTL?: number;
|
|
461
461
|
context?: RequestContext;
|
|
462
462
|
payload?: P;
|
|
463
|
-
requestConfig?: RequestConfig
|
|
463
|
+
requestConfig?: RequestConfig;
|
|
464
464
|
}): Promise<HttpResponse<T>>;
|
|
465
465
|
}
|
|
466
466
|
interface OperationSetting {
|
|
@@ -506,7 +506,7 @@ type TransportFactory = ({
|
|
|
506
506
|
logger?: ILogger;
|
|
507
507
|
redisClientConfig?: RedisClientConfig;
|
|
508
508
|
context?: RequestContext;
|
|
509
|
-
requestConfig?: RequestConfig
|
|
509
|
+
requestConfig?: RequestConfig;
|
|
510
510
|
httpsAgentConfig?: https.AgentOptions;
|
|
511
511
|
}) => Promise<AxiosInstance>;
|
|
512
512
|
//#endregion
|
|
@@ -592,7 +592,7 @@ declare const getTransportInstance: ({
|
|
|
592
592
|
logger?: ILogger;
|
|
593
593
|
redisClientConfig?: RedisClientConfig;
|
|
594
594
|
context?: RequestContext;
|
|
595
|
-
requestConfig?: RequestConfig
|
|
595
|
+
requestConfig?: RequestConfig;
|
|
596
596
|
httpsAgentConfig?: https.AgentOptions;
|
|
597
597
|
}) => Promise<AxiosInstance>;
|
|
598
598
|
//#endregion
|
|
@@ -641,7 +641,7 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
641
641
|
payload?: P;
|
|
642
642
|
httpsAgent?: https.Agent;
|
|
643
643
|
httpAgent?: http.Agent;
|
|
644
|
-
requestConfig?: RequestConfig
|
|
644
|
+
requestConfig?: RequestConfig;
|
|
645
645
|
httpsAgentConfig?: https.AgentOptions;
|
|
646
646
|
}): Promise<HttpResponse<T>>;
|
|
647
647
|
get<T>({
|
|
@@ -661,7 +661,7 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
661
661
|
cacheTTL?: number;
|
|
662
662
|
context?: RequestContext;
|
|
663
663
|
traceId?: string;
|
|
664
|
-
requestConfig?: RequestConfig
|
|
664
|
+
requestConfig?: RequestConfig;
|
|
665
665
|
}): Promise<HttpResponse<T>>;
|
|
666
666
|
post<P, T>({
|
|
667
667
|
headers,
|
|
@@ -680,7 +680,7 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
680
680
|
context?: RequestContext;
|
|
681
681
|
traceId?: string;
|
|
682
682
|
payload?: P;
|
|
683
|
-
requestConfig?: RequestConfig
|
|
683
|
+
requestConfig?: RequestConfig;
|
|
684
684
|
}): Promise<HttpResponse<T>>;
|
|
685
685
|
}
|
|
686
686
|
//#endregion
|
|
@@ -723,7 +723,7 @@ type HttpTransportInstanceConfig = {
|
|
|
723
723
|
httpsAgentConfig?: AgentOptions;
|
|
724
724
|
logger?: ILogger;
|
|
725
725
|
context?: RequestContext;
|
|
726
|
-
requestConfig?: RequestConfig
|
|
726
|
+
requestConfig?: RequestConfig;
|
|
727
727
|
concurrencyManager?: ConcurrencyManager;
|
|
728
728
|
rateLimitManager?: RateLimitManager;
|
|
729
729
|
};
|
|
@@ -862,7 +862,7 @@ type RequestParameter = {
|
|
|
862
862
|
declare const parseRequestParameters: (parameters: RequestParameter[]) => HttpParameters;
|
|
863
863
|
//#endregion
|
|
864
864
|
//#region src/requestClient/types.d.ts
|
|
865
|
-
interface IRequestClient<RequestConfig = RequestConfig
|
|
865
|
+
interface IRequestClient<RequestConfig$1 = RequestConfig> {
|
|
866
866
|
performRequest: ({
|
|
867
867
|
httpClient,
|
|
868
868
|
url,
|
|
@@ -880,7 +880,7 @@ interface IRequestClient<RequestConfig = RequestConfig$1> {
|
|
|
880
880
|
queryParams?: HttpQueryParams;
|
|
881
881
|
body: unknown;
|
|
882
882
|
customErrorConfigs?: CustomErrorConfig[];
|
|
883
|
-
requestConfig?: RequestConfig;
|
|
883
|
+
requestConfig?: RequestConfig$1;
|
|
884
884
|
}) => Promise<HttpResponse>;
|
|
885
885
|
}
|
|
886
886
|
type RequestClientType = 'rest' | 'soap';
|
|
@@ -930,4 +930,4 @@ type LockEntry = {
|
|
|
930
930
|
unlock: Unlock;
|
|
931
931
|
};
|
|
932
932
|
//#endregion
|
|
933
|
-
export { CUSTOM_ERROR_CONFIG_SCHEMA, type ConcurrencyConfig, ConcurrencyManager, type CustomErrorConfig, type ErrorMappingFn, EventClient, HttpClient, HttpClientManager, HttpErrorMessages, type HttpHeaders, type HttpMethod, HttpMethods, type HttpParameters, type HttpQueryParams, type HttpResponse, HttpResponseError, HttpTransportFactory, type ICacheClient, type IHttpClient, type IRequestClient, type InitializedTransportManagers, InstanceManager, type Lock, type LockEntry, LockManager, MemoryStore, type MemoryStoreConfig, type PruneCount, type PubSubListener, QueueManager, type RateLimitConfig, RateLimitManager, RedisClient, type RedisClientConfig, type RedisClientType, RequestClientFactory, type RequestConfig
|
|
933
|
+
export { CUSTOM_ERROR_CONFIG_SCHEMA, type ConcurrencyConfig, ConcurrencyManager, type CustomErrorConfig, type ErrorMappingFn, EventClient, HttpClient, HttpClientManager, HttpErrorMessages, type HttpHeaders, type HttpMethod, HttpMethods, type HttpParameters, type HttpQueryParams, type HttpResponse, HttpResponseError, HttpTransportFactory, type ICacheClient, type IHttpClient, type IRequestClient, type InitializedTransportManagers, InstanceManager, type Lock, type LockEntry, LockManager, MemoryStore, type MemoryStoreConfig, type PruneCount, type PubSubListener, QueueManager, type RateLimitConfig, RateLimitManager, RedisClient, type RedisClientConfig, type RedisClientType, RequestClientFactory, type RequestConfig, type RequestContext, type RequestParameter, RequestParameterLocations, ScriptManager, SubscriptionManager, type TransportInitializationOptions, type Unlock, buildHttpClientInstance, createAuthorizationHeaders, getTransportInstance, getTransportManagers, initializeTransportSystem, isFailedStatusCode, isInfoStatusCode, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, serializeHttpResponseError, shutdownTransportSystem };
|
package/dist/index.d.mts
CHANGED
|
@@ -365,12 +365,12 @@ interface InterceptorDependencies {
|
|
|
365
365
|
axiosInstance?: AxiosInstance;
|
|
366
366
|
logger?: ILogger;
|
|
367
367
|
context?: RequestContext;
|
|
368
|
-
requestConfig?: RequestConfig
|
|
368
|
+
requestConfig?: RequestConfig;
|
|
369
369
|
concurrencyManager?: ConcurrencyManager;
|
|
370
370
|
rateLimitManager?: RateLimitManager;
|
|
371
371
|
[key: string]: unknown;
|
|
372
372
|
}
|
|
373
|
-
type RequestConfig
|
|
373
|
+
type RequestConfig = {
|
|
374
374
|
rateLimits?: RateLimitConfig;
|
|
375
375
|
concurrency?: ConcurrencyConfig;
|
|
376
376
|
};
|
|
@@ -425,7 +425,7 @@ interface IHttpClient {
|
|
|
425
425
|
payload?: P;
|
|
426
426
|
httpsAgent?: https.Agent;
|
|
427
427
|
httpAgent?: http.Agent;
|
|
428
|
-
requestConfig?: RequestConfig
|
|
428
|
+
requestConfig?: RequestConfig;
|
|
429
429
|
httpsAgentConfig?: https.AgentOptions;
|
|
430
430
|
}): Promise<HttpResponse<T>>;
|
|
431
431
|
get<T>({
|
|
@@ -443,7 +443,7 @@ interface IHttpClient {
|
|
|
443
443
|
maxRedirects?: number;
|
|
444
444
|
cacheTTL?: number;
|
|
445
445
|
context?: RequestContext;
|
|
446
|
-
requestConfig?: RequestConfig
|
|
446
|
+
requestConfig?: RequestConfig;
|
|
447
447
|
}): Promise<HttpResponse<T>>;
|
|
448
448
|
post<P, T>({
|
|
449
449
|
headers,
|
|
@@ -460,7 +460,7 @@ interface IHttpClient {
|
|
|
460
460
|
cacheTTL?: number;
|
|
461
461
|
context?: RequestContext;
|
|
462
462
|
payload?: P;
|
|
463
|
-
requestConfig?: RequestConfig
|
|
463
|
+
requestConfig?: RequestConfig;
|
|
464
464
|
}): Promise<HttpResponse<T>>;
|
|
465
465
|
}
|
|
466
466
|
interface OperationSetting {
|
|
@@ -506,7 +506,7 @@ type TransportFactory = ({
|
|
|
506
506
|
logger?: ILogger;
|
|
507
507
|
redisClientConfig?: RedisClientConfig;
|
|
508
508
|
context?: RequestContext;
|
|
509
|
-
requestConfig?: RequestConfig
|
|
509
|
+
requestConfig?: RequestConfig;
|
|
510
510
|
httpsAgentConfig?: https.AgentOptions;
|
|
511
511
|
}) => Promise<AxiosInstance>;
|
|
512
512
|
//#endregion
|
|
@@ -592,7 +592,7 @@ declare const getTransportInstance: ({
|
|
|
592
592
|
logger?: ILogger;
|
|
593
593
|
redisClientConfig?: RedisClientConfig;
|
|
594
594
|
context?: RequestContext;
|
|
595
|
-
requestConfig?: RequestConfig
|
|
595
|
+
requestConfig?: RequestConfig;
|
|
596
596
|
httpsAgentConfig?: https.AgentOptions;
|
|
597
597
|
}) => Promise<AxiosInstance>;
|
|
598
598
|
//#endregion
|
|
@@ -641,7 +641,7 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
641
641
|
payload?: P;
|
|
642
642
|
httpsAgent?: https.Agent;
|
|
643
643
|
httpAgent?: http.Agent;
|
|
644
|
-
requestConfig?: RequestConfig
|
|
644
|
+
requestConfig?: RequestConfig;
|
|
645
645
|
httpsAgentConfig?: https.AgentOptions;
|
|
646
646
|
}): Promise<HttpResponse<T>>;
|
|
647
647
|
get<T>({
|
|
@@ -661,7 +661,7 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
661
661
|
cacheTTL?: number;
|
|
662
662
|
context?: RequestContext;
|
|
663
663
|
traceId?: string;
|
|
664
|
-
requestConfig?: RequestConfig
|
|
664
|
+
requestConfig?: RequestConfig;
|
|
665
665
|
}): Promise<HttpResponse<T>>;
|
|
666
666
|
post<P, T>({
|
|
667
667
|
headers,
|
|
@@ -680,7 +680,7 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
680
680
|
context?: RequestContext;
|
|
681
681
|
traceId?: string;
|
|
682
682
|
payload?: P;
|
|
683
|
-
requestConfig?: RequestConfig
|
|
683
|
+
requestConfig?: RequestConfig;
|
|
684
684
|
}): Promise<HttpResponse<T>>;
|
|
685
685
|
}
|
|
686
686
|
//#endregion
|
|
@@ -723,7 +723,7 @@ type HttpTransportInstanceConfig = {
|
|
|
723
723
|
httpsAgentConfig?: AgentOptions;
|
|
724
724
|
logger?: ILogger;
|
|
725
725
|
context?: RequestContext;
|
|
726
|
-
requestConfig?: RequestConfig
|
|
726
|
+
requestConfig?: RequestConfig;
|
|
727
727
|
concurrencyManager?: ConcurrencyManager;
|
|
728
728
|
rateLimitManager?: RateLimitManager;
|
|
729
729
|
};
|
|
@@ -862,7 +862,7 @@ type RequestParameter = {
|
|
|
862
862
|
declare const parseRequestParameters: (parameters: RequestParameter[]) => HttpParameters;
|
|
863
863
|
//#endregion
|
|
864
864
|
//#region src/requestClient/types.d.ts
|
|
865
|
-
interface IRequestClient<RequestConfig = RequestConfig
|
|
865
|
+
interface IRequestClient<RequestConfig$1 = RequestConfig> {
|
|
866
866
|
performRequest: ({
|
|
867
867
|
httpClient,
|
|
868
868
|
url,
|
|
@@ -880,7 +880,7 @@ interface IRequestClient<RequestConfig = RequestConfig$1> {
|
|
|
880
880
|
queryParams?: HttpQueryParams;
|
|
881
881
|
body: unknown;
|
|
882
882
|
customErrorConfigs?: CustomErrorConfig[];
|
|
883
|
-
requestConfig?: RequestConfig;
|
|
883
|
+
requestConfig?: RequestConfig$1;
|
|
884
884
|
}) => Promise<HttpResponse>;
|
|
885
885
|
}
|
|
886
886
|
type RequestClientType = 'rest' | 'soap';
|
|
@@ -930,4 +930,4 @@ type LockEntry = {
|
|
|
930
930
|
unlock: Unlock;
|
|
931
931
|
};
|
|
932
932
|
//#endregion
|
|
933
|
-
export { CUSTOM_ERROR_CONFIG_SCHEMA, type ConcurrencyConfig, ConcurrencyManager, type CustomErrorConfig, type ErrorMappingFn, EventClient, HttpClient, HttpClientManager, HttpErrorMessages, type HttpHeaders, type HttpMethod, HttpMethods, type HttpParameters, type HttpQueryParams, type HttpResponse, HttpResponseError, HttpTransportFactory, type ICacheClient, type IHttpClient, type IRequestClient, type InitializedTransportManagers, InstanceManager, type Lock, type LockEntry, LockManager, MemoryStore, type MemoryStoreConfig, type PruneCount, type PubSubListener, QueueManager, type RateLimitConfig, RateLimitManager, RedisClient, type RedisClientConfig, type RedisClientType, RequestClientFactory, type RequestConfig
|
|
933
|
+
export { CUSTOM_ERROR_CONFIG_SCHEMA, type ConcurrencyConfig, ConcurrencyManager, type CustomErrorConfig, type ErrorMappingFn, EventClient, HttpClient, HttpClientManager, HttpErrorMessages, type HttpHeaders, type HttpMethod, HttpMethods, type HttpParameters, type HttpQueryParams, type HttpResponse, HttpResponseError, HttpTransportFactory, type ICacheClient, type IHttpClient, type IRequestClient, type InitializedTransportManagers, InstanceManager, type Lock, type LockEntry, LockManager, MemoryStore, type MemoryStoreConfig, type PruneCount, type PubSubListener, QueueManager, type RateLimitConfig, RateLimitManager, RedisClient, type RedisClientConfig, type RedisClientType, RequestClientFactory, type RequestConfig, type RequestContext, type RequestParameter, RequestParameterLocations, ScriptManager, SubscriptionManager, type TransportInitializationOptions, type Unlock, buildHttpClientInstance, createAuthorizationHeaders, getTransportInstance, getTransportManagers, initializeTransportSystem, isFailedStatusCode, isInfoStatusCode, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, serializeHttpResponseError, shutdownTransportSystem };
|