@stackone/transport 2.37.3 → 2.39.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/dist/index.cjs +9 -9
- package/dist/index.d.cts +37 -1
- package/dist/index.d.mts +37 -1
- package/dist/index.mjs +9 -9
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -666,6 +666,15 @@ declare class HttpResponseError extends Error {
|
|
|
666
666
|
toString(): string;
|
|
667
667
|
}
|
|
668
668
|
//#endregion
|
|
669
|
+
//#region src/errors/requestAbortedError.d.ts
|
|
670
|
+
declare const REQUEST_ABORT_REASONS: readonly ["client_disconnect", "timeout"];
|
|
671
|
+
type RequestAbortReason = (typeof REQUEST_ABORT_REASONS)[number];
|
|
672
|
+
declare class RequestAbortedError extends Error {
|
|
673
|
+
readonly reason: RequestAbortReason;
|
|
674
|
+
constructor(reason: RequestAbortReason);
|
|
675
|
+
}
|
|
676
|
+
declare const isRequestAbortedError: (value: unknown) => value is RequestAbortedError;
|
|
677
|
+
//#endregion
|
|
669
678
|
//#region src/errors/serializeHttpResponseError.d.ts
|
|
670
679
|
declare const serializeHttpResponseError: (error: unknown) => Record<string, unknown>;
|
|
671
680
|
//#endregion
|
|
@@ -691,6 +700,7 @@ interface MemoryStoreConfig<T> {
|
|
|
691
700
|
staleDataThreshold?: number;
|
|
692
701
|
truncateThreshold?: number;
|
|
693
702
|
truncationPercentage?: number;
|
|
703
|
+
slidingExpiration?: boolean;
|
|
694
704
|
typeGuard?: (data: unknown) => data is T;
|
|
695
705
|
dispose?: (key: string, value: T) => Promise<void> | void;
|
|
696
706
|
}
|
|
@@ -749,6 +759,9 @@ declare const getTransportInstance: ({
|
|
|
749
759
|
httpsAgentConfig?: https.AgentOptions;
|
|
750
760
|
}) => Promise<AxiosInstance>;
|
|
751
761
|
//#endregion
|
|
762
|
+
//#region src/httpClient/cancelledCalls.d.ts
|
|
763
|
+
declare const getCancelledCallCount: (signal: AbortSignal) => number;
|
|
764
|
+
//#endregion
|
|
752
765
|
//#region src/httpClient/httpClient.d.ts
|
|
753
766
|
declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
754
767
|
#private;
|
|
@@ -1010,6 +1023,7 @@ declare class InstanceManager {
|
|
|
1010
1023
|
truncateThreshold?: number;
|
|
1011
1024
|
}): InstanceManager;
|
|
1012
1025
|
private initialize;
|
|
1026
|
+
setLogger(logger?: ILogger): void;
|
|
1013
1027
|
get<T>(key: string): Promise<T | null>;
|
|
1014
1028
|
set<T>(key: string, value: T, cacheTTL?: number): Promise<boolean>;
|
|
1015
1029
|
private ensureReady;
|
|
@@ -1017,6 +1031,24 @@ declare class InstanceManager {
|
|
|
1017
1031
|
close(): void;
|
|
1018
1032
|
}
|
|
1019
1033
|
//#endregion
|
|
1034
|
+
//#region src/instanceManager/persistentInstanceManager.d.ts
|
|
1035
|
+
declare class PersistentInstanceManager {
|
|
1036
|
+
private static instance;
|
|
1037
|
+
private dataStore;
|
|
1038
|
+
private logger?;
|
|
1039
|
+
private constructor();
|
|
1040
|
+
static getInstance(options?: {
|
|
1041
|
+
logger?: ILogger;
|
|
1042
|
+
}): PersistentInstanceManager;
|
|
1043
|
+
private initialize;
|
|
1044
|
+
setLogger(logger?: ILogger): void;
|
|
1045
|
+
private static liveStore;
|
|
1046
|
+
get<T>(key: string): Promise<T | null>;
|
|
1047
|
+
set<T>(key: string, value: T, cacheTTL?: number): Promise<boolean>;
|
|
1048
|
+
isReady(): boolean;
|
|
1049
|
+
close(): void;
|
|
1050
|
+
}
|
|
1051
|
+
//#endregion
|
|
1020
1052
|
//#region src/interceptors/retryError.interceptor.d.ts
|
|
1021
1053
|
declare const convertError: (response?: Partial<AxiosResponse>, _context?: RequestContext, requestConfig?: RequestConfig, _logger?: ILogger) => {
|
|
1022
1054
|
status: number | undefined;
|
|
@@ -1149,6 +1181,8 @@ declare class MemoryStore<T> implements ICacheClient {
|
|
|
1149
1181
|
private dataStore;
|
|
1150
1182
|
private lockManager;
|
|
1151
1183
|
private expiryMap;
|
|
1184
|
+
private ttlMap;
|
|
1185
|
+
private slidingExpiration;
|
|
1152
1186
|
private hashStore;
|
|
1153
1187
|
private hashExpiryMap;
|
|
1154
1188
|
private groupMap;
|
|
@@ -1163,8 +1197,10 @@ declare class MemoryStore<T> implements ICacheClient {
|
|
|
1163
1197
|
private evictionInterval?;
|
|
1164
1198
|
private lastAccessedAt;
|
|
1165
1199
|
constructor(config?: MemoryStoreConfig<T>);
|
|
1200
|
+
setLogger(logger?: ILogger): void;
|
|
1166
1201
|
private initialize;
|
|
1167
1202
|
getData<U = T>(key: string): Promise<U | null>;
|
|
1203
|
+
private slideExpiry;
|
|
1168
1204
|
getDataBatch<U = T>(keys: string[]): Promise<(U | null)[]>;
|
|
1169
1205
|
getDataKeysFromGroup(groupKey: string): Promise<string[]>;
|
|
1170
1206
|
deleteDataKeyFromGroup(groupKey: string, key: string): Promise<boolean>;
|
|
@@ -1317,4 +1353,4 @@ type LockEntry = {
|
|
|
1317
1353
|
unlock: Unlock;
|
|
1318
1354
|
};
|
|
1319
1355
|
//#endregion
|
|
1320
|
-
export { type AuthorizationChallenge, type AxiosErrorWithRequestMetadata, type AxiosErrorWithRetryCount, CUSTOM_ERROR_CONFIG_SCHEMA, type CertificatesInput, type ConcurrencyConfig, ConcurrencyManager, type CustomErrorConfig, type ErrorInterceptor, type ErrorMappingFn, EventClient, HttpClient, HttpClientManager, HttpErrorMessages, type HttpHeader, type HttpHeaders, type HttpMethod, HttpMethods, type HttpParameters, type HttpQueryParamValue, type HttpQueryParams, type HttpResponse, HttpResponseError, HttpTransportFactory, type HttpTransportInstanceConfig, type ICacheClient, type IHttpClient, type IMcpClient, type IRequestClient, type InitializedTransportManagers, InstanceManager, type Interceptor, type InterceptorConfigs, type InterceptorDependencies, type InterceptorDependencyInjector, type InterceptorManager, type Lock, type LockEntry, LockManager, type McpCallToolParams, type McpCallToolResult, McpClient, type McpClientConfig, type McpClientInfo, type McpListToolsParams, type McpListToolsResult, type McpSdkDependencies, type McpServerInfo, type McpServerProbe, type McpServerProber, type McpToolContentBlock, type McpToolDefinition, MemoryStore, type MemoryStoreConfig, type OnFulfilledInterceptors, type ProbeDependencies, type PruneCount, type PubSubListener, type QueryArrayFormat, QueryArrayFormats, QueueManager, type RateLimitConfig, RateLimitManager, RedisClient, type RedisClientConfig, type RedisClientType, RequestClientFactory, type RequestConfig, type RequestContext, type RequestInterceptor, type RequestInterceptorConfig, type RequestInterceptorTuple, type RequestParameter, RequestParameterLocations, type ResponseInterceptor, type ResponseInterceptorConfig, type ResponseInterceptorTuple, type ResponseType, ScriptManager, type SigningCredentials, type SigningOptions, type SigningRequest, type SigningStrategy, type StreamHttpResponse, SubscriptionManager, type TransportInitializationOptions, TransportManagersUnavailableError, type Unlock, buildHttpClientInstance, buildHttpsAgent, convertError, createAuthorizationHeaders, getRetryAfterWaitTime, getSigningStrategy, getTransportInstance, getTransportManagers, initializeTransportSystem, isFailedStatusCode, isInfoStatusCode, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, probeMcpServer, registerSigningStrategy, serializeHttpResponseError, shutdownTransportSystem, superNormalizeHeaders, translateCustomError };
|
|
1356
|
+
export { type AuthorizationChallenge, type AxiosErrorWithRequestMetadata, type AxiosErrorWithRetryCount, CUSTOM_ERROR_CONFIG_SCHEMA, type CertificatesInput, type ConcurrencyConfig, ConcurrencyManager, type CustomErrorConfig, type ErrorInterceptor, type ErrorMappingFn, EventClient, HttpClient, HttpClientManager, HttpErrorMessages, type HttpHeader, type HttpHeaders, type HttpMethod, HttpMethods, type HttpParameters, type HttpQueryParamValue, type HttpQueryParams, type HttpResponse, HttpResponseError, HttpTransportFactory, type HttpTransportInstanceConfig, type ICacheClient, type IHttpClient, type IMcpClient, type IRequestClient, type InitializedTransportManagers, InstanceManager, type Interceptor, type InterceptorConfigs, type InterceptorDependencies, type InterceptorDependencyInjector, type InterceptorManager, type Lock, type LockEntry, LockManager, type McpCallToolParams, type McpCallToolResult, McpClient, type McpClientConfig, type McpClientInfo, type McpListToolsParams, type McpListToolsResult, type McpSdkDependencies, type McpServerInfo, type McpServerProbe, type McpServerProber, type McpToolContentBlock, type McpToolDefinition, MemoryStore, type MemoryStoreConfig, type OnFulfilledInterceptors, PersistentInstanceManager, type ProbeDependencies, type PruneCount, type PubSubListener, type QueryArrayFormat, QueryArrayFormats, QueueManager, type RateLimitConfig, RateLimitManager, RedisClient, type RedisClientConfig, type RedisClientType, type RequestAbortReason, RequestAbortedError, RequestClientFactory, type RequestConfig, type RequestContext, type RequestInterceptor, type RequestInterceptorConfig, type RequestInterceptorTuple, type RequestParameter, RequestParameterLocations, type ResponseInterceptor, type ResponseInterceptorConfig, type ResponseInterceptorTuple, type ResponseType, ScriptManager, type SigningCredentials, type SigningOptions, type SigningRequest, type SigningStrategy, type StreamHttpResponse, SubscriptionManager, type TransportInitializationOptions, TransportManagersUnavailableError, type Unlock, buildHttpClientInstance, buildHttpsAgent, convertError, createAuthorizationHeaders, getCancelledCallCount, getRetryAfterWaitTime, getSigningStrategy, getTransportInstance, getTransportManagers, initializeTransportSystem, isFailedStatusCode, isInfoStatusCode, isRequestAbortedError, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, probeMcpServer, registerSigningStrategy, serializeHttpResponseError, shutdownTransportSystem, superNormalizeHeaders, translateCustomError };
|
package/dist/index.d.mts
CHANGED
|
@@ -665,6 +665,15 @@ declare class HttpResponseError extends Error {
|
|
|
665
665
|
toString(): string;
|
|
666
666
|
}
|
|
667
667
|
//#endregion
|
|
668
|
+
//#region src/errors/requestAbortedError.d.ts
|
|
669
|
+
declare const REQUEST_ABORT_REASONS: readonly ["client_disconnect", "timeout"];
|
|
670
|
+
type RequestAbortReason = (typeof REQUEST_ABORT_REASONS)[number];
|
|
671
|
+
declare class RequestAbortedError extends Error {
|
|
672
|
+
readonly reason: RequestAbortReason;
|
|
673
|
+
constructor(reason: RequestAbortReason);
|
|
674
|
+
}
|
|
675
|
+
declare const isRequestAbortedError: (value: unknown) => value is RequestAbortedError;
|
|
676
|
+
//#endregion
|
|
668
677
|
//#region src/errors/serializeHttpResponseError.d.ts
|
|
669
678
|
declare const serializeHttpResponseError: (error: unknown) => Record<string, unknown>;
|
|
670
679
|
//#endregion
|
|
@@ -690,6 +699,7 @@ interface MemoryStoreConfig<T> {
|
|
|
690
699
|
staleDataThreshold?: number;
|
|
691
700
|
truncateThreshold?: number;
|
|
692
701
|
truncationPercentage?: number;
|
|
702
|
+
slidingExpiration?: boolean;
|
|
693
703
|
typeGuard?: (data: unknown) => data is T;
|
|
694
704
|
dispose?: (key: string, value: T) => Promise<void> | void;
|
|
695
705
|
}
|
|
@@ -748,6 +758,9 @@ declare const getTransportInstance: ({
|
|
|
748
758
|
httpsAgentConfig?: https.AgentOptions;
|
|
749
759
|
}) => Promise<AxiosInstance>;
|
|
750
760
|
//#endregion
|
|
761
|
+
//#region src/httpClient/cancelledCalls.d.ts
|
|
762
|
+
declare const getCancelledCallCount: (signal: AbortSignal) => number;
|
|
763
|
+
//#endregion
|
|
751
764
|
//#region src/httpClient/httpClient.d.ts
|
|
752
765
|
declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
753
766
|
#private;
|
|
@@ -1009,6 +1022,7 @@ declare class InstanceManager {
|
|
|
1009
1022
|
truncateThreshold?: number;
|
|
1010
1023
|
}): InstanceManager;
|
|
1011
1024
|
private initialize;
|
|
1025
|
+
setLogger(logger?: ILogger): void;
|
|
1012
1026
|
get<T>(key: string): Promise<T | null>;
|
|
1013
1027
|
set<T>(key: string, value: T, cacheTTL?: number): Promise<boolean>;
|
|
1014
1028
|
private ensureReady;
|
|
@@ -1016,6 +1030,24 @@ declare class InstanceManager {
|
|
|
1016
1030
|
close(): void;
|
|
1017
1031
|
}
|
|
1018
1032
|
//#endregion
|
|
1033
|
+
//#region src/instanceManager/persistentInstanceManager.d.ts
|
|
1034
|
+
declare class PersistentInstanceManager {
|
|
1035
|
+
private static instance;
|
|
1036
|
+
private dataStore;
|
|
1037
|
+
private logger?;
|
|
1038
|
+
private constructor();
|
|
1039
|
+
static getInstance(options?: {
|
|
1040
|
+
logger?: ILogger;
|
|
1041
|
+
}): PersistentInstanceManager;
|
|
1042
|
+
private initialize;
|
|
1043
|
+
setLogger(logger?: ILogger): void;
|
|
1044
|
+
private static liveStore;
|
|
1045
|
+
get<T>(key: string): Promise<T | null>;
|
|
1046
|
+
set<T>(key: string, value: T, cacheTTL?: number): Promise<boolean>;
|
|
1047
|
+
isReady(): boolean;
|
|
1048
|
+
close(): void;
|
|
1049
|
+
}
|
|
1050
|
+
//#endregion
|
|
1019
1051
|
//#region src/interceptors/retryError.interceptor.d.ts
|
|
1020
1052
|
declare const convertError: (response?: Partial<AxiosResponse>, _context?: RequestContext, requestConfig?: RequestConfig, _logger?: ILogger) => {
|
|
1021
1053
|
status: number | undefined;
|
|
@@ -1148,6 +1180,8 @@ declare class MemoryStore<T> implements ICacheClient {
|
|
|
1148
1180
|
private dataStore;
|
|
1149
1181
|
private lockManager;
|
|
1150
1182
|
private expiryMap;
|
|
1183
|
+
private ttlMap;
|
|
1184
|
+
private slidingExpiration;
|
|
1151
1185
|
private hashStore;
|
|
1152
1186
|
private hashExpiryMap;
|
|
1153
1187
|
private groupMap;
|
|
@@ -1162,8 +1196,10 @@ declare class MemoryStore<T> implements ICacheClient {
|
|
|
1162
1196
|
private evictionInterval?;
|
|
1163
1197
|
private lastAccessedAt;
|
|
1164
1198
|
constructor(config?: MemoryStoreConfig<T>);
|
|
1199
|
+
setLogger(logger?: ILogger): void;
|
|
1165
1200
|
private initialize;
|
|
1166
1201
|
getData<U = T>(key: string): Promise<U | null>;
|
|
1202
|
+
private slideExpiry;
|
|
1167
1203
|
getDataBatch<U = T>(keys: string[]): Promise<(U | null)[]>;
|
|
1168
1204
|
getDataKeysFromGroup(groupKey: string): Promise<string[]>;
|
|
1169
1205
|
deleteDataKeyFromGroup(groupKey: string, key: string): Promise<boolean>;
|
|
@@ -1316,4 +1352,4 @@ type LockEntry = {
|
|
|
1316
1352
|
unlock: Unlock;
|
|
1317
1353
|
};
|
|
1318
1354
|
//#endregion
|
|
1319
|
-
export { type AuthorizationChallenge, type AxiosErrorWithRequestMetadata, type AxiosErrorWithRetryCount, CUSTOM_ERROR_CONFIG_SCHEMA, type CertificatesInput, type ConcurrencyConfig, ConcurrencyManager, type CustomErrorConfig, type ErrorInterceptor, type ErrorMappingFn, EventClient, HttpClient, HttpClientManager, HttpErrorMessages, type HttpHeader, type HttpHeaders, type HttpMethod, HttpMethods, type HttpParameters, type HttpQueryParamValue, type HttpQueryParams, type HttpResponse, HttpResponseError, HttpTransportFactory, type HttpTransportInstanceConfig, type ICacheClient, type IHttpClient, type IMcpClient, type IRequestClient, type InitializedTransportManagers, InstanceManager, type Interceptor, type InterceptorConfigs, type InterceptorDependencies, type InterceptorDependencyInjector, type InterceptorManager, type Lock, type LockEntry, LockManager, type McpCallToolParams, type McpCallToolResult, McpClient, type McpClientConfig, type McpClientInfo, type McpListToolsParams, type McpListToolsResult, type McpSdkDependencies, type McpServerInfo, type McpServerProbe, type McpServerProber, type McpToolContentBlock, type McpToolDefinition, MemoryStore, type MemoryStoreConfig, type OnFulfilledInterceptors, type ProbeDependencies, type PruneCount, type PubSubListener, type QueryArrayFormat, QueryArrayFormats, QueueManager, type RateLimitConfig, RateLimitManager, RedisClient, type RedisClientConfig, type RedisClientType, RequestClientFactory, type RequestConfig, type RequestContext, type RequestInterceptor, type RequestInterceptorConfig, type RequestInterceptorTuple, type RequestParameter, RequestParameterLocations, type ResponseInterceptor, type ResponseInterceptorConfig, type ResponseInterceptorTuple, type ResponseType, ScriptManager, type SigningCredentials, type SigningOptions, type SigningRequest, type SigningStrategy, type StreamHttpResponse, SubscriptionManager, type TransportInitializationOptions, TransportManagersUnavailableError, type Unlock, buildHttpClientInstance, buildHttpsAgent, convertError, createAuthorizationHeaders, getRetryAfterWaitTime, getSigningStrategy, getTransportInstance, getTransportManagers, initializeTransportSystem, isFailedStatusCode, isInfoStatusCode, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, probeMcpServer, registerSigningStrategy, serializeHttpResponseError, shutdownTransportSystem, superNormalizeHeaders, translateCustomError };
|
|
1355
|
+
export { type AuthorizationChallenge, type AxiosErrorWithRequestMetadata, type AxiosErrorWithRetryCount, CUSTOM_ERROR_CONFIG_SCHEMA, type CertificatesInput, type ConcurrencyConfig, ConcurrencyManager, type CustomErrorConfig, type ErrorInterceptor, type ErrorMappingFn, EventClient, HttpClient, HttpClientManager, HttpErrorMessages, type HttpHeader, type HttpHeaders, type HttpMethod, HttpMethods, type HttpParameters, type HttpQueryParamValue, type HttpQueryParams, type HttpResponse, HttpResponseError, HttpTransportFactory, type HttpTransportInstanceConfig, type ICacheClient, type IHttpClient, type IMcpClient, type IRequestClient, type InitializedTransportManagers, InstanceManager, type Interceptor, type InterceptorConfigs, type InterceptorDependencies, type InterceptorDependencyInjector, type InterceptorManager, type Lock, type LockEntry, LockManager, type McpCallToolParams, type McpCallToolResult, McpClient, type McpClientConfig, type McpClientInfo, type McpListToolsParams, type McpListToolsResult, type McpSdkDependencies, type McpServerInfo, type McpServerProbe, type McpServerProber, type McpToolContentBlock, type McpToolDefinition, MemoryStore, type MemoryStoreConfig, type OnFulfilledInterceptors, PersistentInstanceManager, type ProbeDependencies, type PruneCount, type PubSubListener, type QueryArrayFormat, QueryArrayFormats, QueueManager, type RateLimitConfig, RateLimitManager, RedisClient, type RedisClientConfig, type RedisClientType, type RequestAbortReason, RequestAbortedError, RequestClientFactory, type RequestConfig, type RequestContext, type RequestInterceptor, type RequestInterceptorConfig, type RequestInterceptorTuple, type RequestParameter, RequestParameterLocations, type ResponseInterceptor, type ResponseInterceptorConfig, type ResponseInterceptorTuple, type ResponseType, ScriptManager, type SigningCredentials, type SigningOptions, type SigningRequest, type SigningStrategy, type StreamHttpResponse, SubscriptionManager, type TransportInitializationOptions, TransportManagersUnavailableError, type Unlock, buildHttpClientInstance, buildHttpsAgent, convertError, createAuthorizationHeaders, getCancelledCallCount, getRetryAfterWaitTime, getSigningStrategy, getTransportInstance, getTransportManagers, initializeTransportSystem, isFailedStatusCode, isInfoStatusCode, isRequestAbortedError, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, probeMcpServer, registerSigningStrategy, serializeHttpResponseError, shutdownTransportSystem, superNormalizeHeaders, translateCustomError };
|