@stackone/transport 2.41.2 → 2.42.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 +9 -9
- package/dist/index.d.cts +64 -8
- package/dist/index.d.mts +66 -10
- package/dist/index.mjs +9 -9
- package/package.json +3 -2
package/dist/index.d.cts
CHANGED
|
@@ -36,6 +36,8 @@ interface ICacheClient<ClientType = unknown> {
|
|
|
36
36
|
getData<T>(key: string): Promise<T | null>;
|
|
37
37
|
getDataBatch<T>(keys: string[]): Promise<(T | null)[]>;
|
|
38
38
|
getDataKeysFromGroup(groupKey: string): Promise<string[] | null>;
|
|
39
|
+
getGroupSize?(groupKey: string): Promise<number | null>;
|
|
40
|
+
listGroupKeys?(prefix: string): Promise<string[] | null>;
|
|
39
41
|
listData<T>({
|
|
40
42
|
partialKey,
|
|
41
43
|
limit,
|
|
@@ -132,6 +134,8 @@ declare class RedisClient implements ICacheClient<RedisClientType> {
|
|
|
132
134
|
getData<T>(key: string): Promise<T | null>;
|
|
133
135
|
getDataBatch<T>(keys: string[]): Promise<(T | null)[]>;
|
|
134
136
|
getDataKeysFromGroup(groupKey: string): Promise<string[] | null>;
|
|
137
|
+
getGroupSize(groupKey: string): Promise<number | null>;
|
|
138
|
+
listGroupKeys(prefix: string): Promise<string[] | null>;
|
|
135
139
|
setData<T>({
|
|
136
140
|
key,
|
|
137
141
|
value,
|
|
@@ -432,6 +436,7 @@ type HttpParameters = {
|
|
|
432
436
|
headers: HttpHeaders;
|
|
433
437
|
};
|
|
434
438
|
interface IHttpClient {
|
|
439
|
+
readonly egressProxyUrl?: string;
|
|
435
440
|
request<P, T>({
|
|
436
441
|
headers,
|
|
437
442
|
url,
|
|
@@ -575,13 +580,15 @@ type TransportFactory = ({
|
|
|
575
580
|
redisClientConfig,
|
|
576
581
|
context,
|
|
577
582
|
requestConfig,
|
|
578
|
-
httpsAgentConfig
|
|
583
|
+
httpsAgentConfig,
|
|
584
|
+
egressProxyUrl
|
|
579
585
|
}: {
|
|
580
586
|
logger?: ILogger;
|
|
581
587
|
redisClientConfig?: RedisClientConfig;
|
|
582
588
|
context?: RequestContext;
|
|
583
589
|
requestConfig?: RequestConfig;
|
|
584
590
|
httpsAgentConfig?: https.AgentOptions;
|
|
591
|
+
egressProxyUrl?: string;
|
|
585
592
|
}) => Promise<AxiosInstance>;
|
|
586
593
|
//#endregion
|
|
587
594
|
//#region src/signing/types.d.ts
|
|
@@ -659,6 +666,43 @@ declare const HttpErrorMessages: Record<number, string>;
|
|
|
659
666
|
//#region src/customErrors/index.d.ts
|
|
660
667
|
declare const translateCustomError: (response: HttpResponse, configs?: CustomErrorConfig[], credentials?: Record<string, unknown>) => HttpResponse;
|
|
661
668
|
//#endregion
|
|
669
|
+
//#region src/egressProxy/egressProxyError.d.ts
|
|
670
|
+
declare class EgressProxyError extends Error {
|
|
671
|
+
readonly status: number;
|
|
672
|
+
readonly proxyStatus?: number;
|
|
673
|
+
readonly proxyReason?: string;
|
|
674
|
+
readonly cause?: unknown;
|
|
675
|
+
constructor(message: string, {
|
|
676
|
+
status,
|
|
677
|
+
proxyStatus,
|
|
678
|
+
proxyReason,
|
|
679
|
+
cause
|
|
680
|
+
}: {
|
|
681
|
+
status: number;
|
|
682
|
+
proxyStatus?: number;
|
|
683
|
+
proxyReason?: string;
|
|
684
|
+
cause?: unknown;
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
declare class ConflictingProxyError extends Error {
|
|
688
|
+
name: string;
|
|
689
|
+
}
|
|
690
|
+
declare class UntunnelledTransportError extends Error {
|
|
691
|
+
name: string;
|
|
692
|
+
}
|
|
693
|
+
declare class InvalidEgressProxyUrlError extends Error {
|
|
694
|
+
name: string;
|
|
695
|
+
}
|
|
696
|
+
declare const isEgressProxyError: (value: unknown) => value is EgressProxyError;
|
|
697
|
+
declare const findEgressProxyError: (error: unknown) => EgressProxyError | undefined;
|
|
698
|
+
//#endregion
|
|
699
|
+
//#region src/egressProxy/egressProxyFetch.d.ts
|
|
700
|
+
declare const createEgressProxyFetch: (egressProxyUrl: string, {
|
|
701
|
+
connectTimeoutMs
|
|
702
|
+
}?: {
|
|
703
|
+
connectTimeoutMs?: number;
|
|
704
|
+
}) => FetchLike;
|
|
705
|
+
//#endregion
|
|
662
706
|
//#region src/errors/httpResponseError.d.ts
|
|
663
707
|
declare class HttpResponseError extends Error {
|
|
664
708
|
readonly response: HttpResponse;
|
|
@@ -750,13 +794,15 @@ declare const getTransportInstance: ({
|
|
|
750
794
|
redisClientConfig,
|
|
751
795
|
context,
|
|
752
796
|
requestConfig,
|
|
753
|
-
httpsAgentConfig
|
|
797
|
+
httpsAgentConfig,
|
|
798
|
+
egressProxyUrl
|
|
754
799
|
}?: {
|
|
755
800
|
logger?: ILogger;
|
|
756
801
|
redisClientConfig?: RedisClientConfig;
|
|
757
802
|
context?: RequestContext;
|
|
758
803
|
requestConfig?: RequestConfig;
|
|
759
804
|
httpsAgentConfig?: https.AgentOptions;
|
|
805
|
+
egressProxyUrl?: string;
|
|
760
806
|
}) => Promise<AxiosInstance>;
|
|
761
807
|
//#endregion
|
|
762
808
|
//#region src/httpClient/cancelledCalls.d.ts
|
|
@@ -766,18 +812,21 @@ declare const getCancelledCallCount: (signal: AbortSignal) => number;
|
|
|
766
812
|
declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
767
813
|
#private;
|
|
768
814
|
name: string;
|
|
815
|
+
readonly egressProxyUrl?: string;
|
|
769
816
|
constructor({
|
|
770
817
|
transportFactory,
|
|
771
818
|
getRedisClient,
|
|
772
819
|
logger,
|
|
773
820
|
redisClientConfig,
|
|
774
|
-
errorMappingFn
|
|
821
|
+
errorMappingFn,
|
|
822
|
+
egressProxyUrl
|
|
775
823
|
}?: {
|
|
776
824
|
transportFactory?: TransportFactory;
|
|
777
825
|
getRedisClient?: RedisClientBuilder;
|
|
778
826
|
logger?: ILogger;
|
|
779
827
|
redisClientConfig?: RedisClientConfig;
|
|
780
828
|
errorMappingFn?: ErrorMappingFn<TError>;
|
|
829
|
+
egressProxyUrl?: string;
|
|
781
830
|
});
|
|
782
831
|
request<P, T>({
|
|
783
832
|
headers,
|
|
@@ -892,19 +941,21 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
892
941
|
}
|
|
893
942
|
//#endregion
|
|
894
943
|
//#region src/httpClient/httpClientManager.d.ts
|
|
895
|
-
declare const buildHttpClientInstance: <TError extends Error = Error>(redisClientConfig: RedisClientConfig, logger?: ILogger, errorMappingFn?: ErrorMappingFn<TError
|
|
944
|
+
declare const buildHttpClientInstance: <TError extends Error = Error>(redisClientConfig: RedisClientConfig, logger?: ILogger, errorMappingFn?: ErrorMappingFn<TError>, egressProxyUrl?: string) => IHttpClient;
|
|
896
945
|
declare class HttpClientManager {
|
|
897
|
-
private static
|
|
946
|
+
private static httpClientInstances;
|
|
898
947
|
static getInstance<TError extends Error = Error>({
|
|
899
948
|
redisClientConfig,
|
|
900
949
|
logger,
|
|
901
950
|
errorMappingFn,
|
|
902
|
-
getHttpClient
|
|
951
|
+
getHttpClient,
|
|
952
|
+
egressProxyUrl
|
|
903
953
|
}: {
|
|
904
954
|
redisClientConfig: RedisClientConfig;
|
|
905
955
|
logger?: ILogger;
|
|
906
956
|
errorMappingFn?: ErrorMappingFn<TError>;
|
|
907
957
|
getHttpClient?: typeof buildHttpClientInstance;
|
|
958
|
+
egressProxyUrl?: string;
|
|
908
959
|
}): Promise<IHttpClient>;
|
|
909
960
|
static resetInstance(): void;
|
|
910
961
|
}
|
|
@@ -942,6 +993,7 @@ type HttpTransportInstanceConfig = {
|
|
|
942
993
|
requestConfig?: RequestConfig;
|
|
943
994
|
concurrencyManager?: ConcurrencyManager;
|
|
944
995
|
rateLimitManager?: RateLimitManager;
|
|
996
|
+
egressProxyUrl?: string;
|
|
945
997
|
};
|
|
946
998
|
interface InterceptorManager<V> extends AxiosInterceptorManager<V> {
|
|
947
999
|
forEach(fn: (handler: any) => unknown): void;
|
|
@@ -958,7 +1010,8 @@ declare class HttpTransportFactory {
|
|
|
958
1010
|
context,
|
|
959
1011
|
requestConfig,
|
|
960
1012
|
concurrencyManager,
|
|
961
|
-
rateLimitManager
|
|
1013
|
+
rateLimitManager,
|
|
1014
|
+
egressProxyUrl
|
|
962
1015
|
}: HttpTransportInstanceConfig): AxiosInstance;
|
|
963
1016
|
private static applyInterceptors;
|
|
964
1017
|
private static resolveInterceptorInstance;
|
|
@@ -1067,6 +1120,7 @@ type McpClientConfig = {
|
|
|
1067
1120
|
timeout?: number;
|
|
1068
1121
|
requestConfig?: RequestConfig;
|
|
1069
1122
|
context?: RequestContext;
|
|
1123
|
+
egressProxyUrl?: string;
|
|
1070
1124
|
};
|
|
1071
1125
|
type McpToolContentBlock = {
|
|
1072
1126
|
type: string;
|
|
@@ -1235,6 +1289,8 @@ declare class MemoryStore<T> implements ICacheClient {
|
|
|
1235
1289
|
private slideExpiry;
|
|
1236
1290
|
getDataBatch<U = T>(keys: string[]): Promise<(U | null)[]>;
|
|
1237
1291
|
getDataKeysFromGroup(groupKey: string): Promise<string[]>;
|
|
1292
|
+
getGroupSize(groupKey: string): Promise<number>;
|
|
1293
|
+
listGroupKeys(prefix: string): Promise<string[]>;
|
|
1238
1294
|
deleteDataKeyFromGroup(groupKey: string, key: string): Promise<boolean>;
|
|
1239
1295
|
private getLiveGroup;
|
|
1240
1296
|
setData<U = T>({
|
|
@@ -1385,4 +1441,4 @@ type LockEntry = {
|
|
|
1385
1441
|
unlock: Unlock;
|
|
1386
1442
|
};
|
|
1387
1443
|
//#endregion
|
|
1388
|
-
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 McpIconFinder, type McpListToolsParams, type McpListToolsResult, type McpOAuthDiscoveryDependencies, type McpOAuthDiscoveryOptions, 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, type SameSiteIssuerFallback, ScriptManager, type SigningCredentials, type SigningOptions, type SigningRequest, type SigningStrategy, type StreamHttpResponse, SubscriptionManager, type TransportInitializationOptions, TransportManagersUnavailableError, type Unlock, buildHttpClientInstance, buildHttpsAgent, convertError, createAuthorizationHeaders, discoverMcpOAuthServerInfo, discoverSameSiteAuthorizationServerMetadata, findMcpIcon, getCancelledCallCount, getRetryAfterWaitTime, getSigningStrategy, getTransportInstance, getTransportManagers, initializeTransportSystem, isFailedStatusCode, isInfoStatusCode, isRequestAbortedError, isSameSiteIssuer, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, probeMcpServer, registerSigningStrategy, serializeHttpResponseError, shutdownTransportSystem, superNormalizeHeaders, translateCustomError };
|
|
1444
|
+
export { type AuthorizationChallenge, type AxiosErrorWithRequestMetadata, type AxiosErrorWithRetryCount, CUSTOM_ERROR_CONFIG_SCHEMA, type CertificatesInput, type ConcurrencyConfig, ConcurrencyManager, ConflictingProxyError, type CustomErrorConfig, EgressProxyError, 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, InvalidEgressProxyUrlError, type Lock, type LockEntry, LockManager, type McpCallToolParams, type McpCallToolResult, McpClient, type McpClientConfig, type McpClientInfo, type McpIconFinder, type McpListToolsParams, type McpListToolsResult, type McpOAuthDiscoveryDependencies, type McpOAuthDiscoveryOptions, 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, type SameSiteIssuerFallback, ScriptManager, type SigningCredentials, type SigningOptions, type SigningRequest, type SigningStrategy, type StreamHttpResponse, SubscriptionManager, type TransportInitializationOptions, TransportManagersUnavailableError, type Unlock, UntunnelledTransportError, buildHttpClientInstance, buildHttpsAgent, convertError, createAuthorizationHeaders, createEgressProxyFetch, discoverMcpOAuthServerInfo, discoverSameSiteAuthorizationServerMetadata, findEgressProxyError, findMcpIcon, getCancelledCallCount, getRetryAfterWaitTime, getSigningStrategy, getTransportInstance, getTransportManagers, initializeTransportSystem, isEgressProxyError, isFailedStatusCode, isInfoStatusCode, isRequestAbortedError, isSameSiteIssuer, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, probeMcpServer, registerSigningStrategy, serializeHttpResponseError, shutdownTransportSystem, superNormalizeHeaders, translateCustomError };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __name } from "./chunk-BhWHdk3m.mjs";
|
|
2
2
|
import { z } from "@stackone/utils";
|
|
3
3
|
import * as redis from "redis";
|
|
4
|
-
import { AxiosError, AxiosInstance, AxiosInterceptorManager, AxiosInterceptorOptions, AxiosResponse, CreateAxiosDefaults, InternalAxiosRequestConfig } from "axios";
|
|
5
|
-
import https from "node:https";
|
|
6
4
|
import http, { AgentOptions } from "node:http";
|
|
5
|
+
import https from "node:https";
|
|
6
|
+
import { AxiosError, AxiosInstance, AxiosInterceptorManager, AxiosInterceptorOptions, AxiosResponse, CreateAxiosDefaults, InternalAxiosRequestConfig } from "axios";
|
|
7
7
|
import { Readable } from "node:stream";
|
|
8
8
|
import { AuthorizationServerMetadata, Client, ClientOptions, FetchLike, OAuthProtectedResourceMetadata, OAuthServerInfo, StreamableHTTPClientTransportOptions, Transport } from "@modelcontextprotocol/client";
|
|
9
9
|
import { ILogger } from "@stackone/logger";
|
|
@@ -35,6 +35,8 @@ interface ICacheClient<ClientType = unknown> {
|
|
|
35
35
|
getData<T>(key: string): Promise<T | null>;
|
|
36
36
|
getDataBatch<T>(keys: string[]): Promise<(T | null)[]>;
|
|
37
37
|
getDataKeysFromGroup(groupKey: string): Promise<string[] | null>;
|
|
38
|
+
getGroupSize?(groupKey: string): Promise<number | null>;
|
|
39
|
+
listGroupKeys?(prefix: string): Promise<string[] | null>;
|
|
38
40
|
listData<T>({
|
|
39
41
|
partialKey,
|
|
40
42
|
limit,
|
|
@@ -131,6 +133,8 @@ declare class RedisClient implements ICacheClient<RedisClientType> {
|
|
|
131
133
|
getData<T>(key: string): Promise<T | null>;
|
|
132
134
|
getDataBatch<T>(keys: string[]): Promise<(T | null)[]>;
|
|
133
135
|
getDataKeysFromGroup(groupKey: string): Promise<string[] | null>;
|
|
136
|
+
getGroupSize(groupKey: string): Promise<number | null>;
|
|
137
|
+
listGroupKeys(prefix: string): Promise<string[] | null>;
|
|
134
138
|
setData<T>({
|
|
135
139
|
key,
|
|
136
140
|
value,
|
|
@@ -431,6 +435,7 @@ type HttpParameters = {
|
|
|
431
435
|
headers: HttpHeaders;
|
|
432
436
|
};
|
|
433
437
|
interface IHttpClient {
|
|
438
|
+
readonly egressProxyUrl?: string;
|
|
434
439
|
request<P, T>({
|
|
435
440
|
headers,
|
|
436
441
|
url,
|
|
@@ -574,13 +579,15 @@ type TransportFactory = ({
|
|
|
574
579
|
redisClientConfig,
|
|
575
580
|
context,
|
|
576
581
|
requestConfig,
|
|
577
|
-
httpsAgentConfig
|
|
582
|
+
httpsAgentConfig,
|
|
583
|
+
egressProxyUrl
|
|
578
584
|
}: {
|
|
579
585
|
logger?: ILogger;
|
|
580
586
|
redisClientConfig?: RedisClientConfig;
|
|
581
587
|
context?: RequestContext;
|
|
582
588
|
requestConfig?: RequestConfig;
|
|
583
589
|
httpsAgentConfig?: https.AgentOptions;
|
|
590
|
+
egressProxyUrl?: string;
|
|
584
591
|
}) => Promise<AxiosInstance>;
|
|
585
592
|
//#endregion
|
|
586
593
|
//#region src/signing/types.d.ts
|
|
@@ -658,6 +665,43 @@ declare const HttpErrorMessages: Record<number, string>;
|
|
|
658
665
|
//#region src/customErrors/index.d.ts
|
|
659
666
|
declare const translateCustomError: (response: HttpResponse, configs?: CustomErrorConfig[], credentials?: Record<string, unknown>) => HttpResponse;
|
|
660
667
|
//#endregion
|
|
668
|
+
//#region src/egressProxy/egressProxyError.d.ts
|
|
669
|
+
declare class EgressProxyError extends Error {
|
|
670
|
+
readonly status: number;
|
|
671
|
+
readonly proxyStatus?: number;
|
|
672
|
+
readonly proxyReason?: string;
|
|
673
|
+
readonly cause?: unknown;
|
|
674
|
+
constructor(message: string, {
|
|
675
|
+
status,
|
|
676
|
+
proxyStatus,
|
|
677
|
+
proxyReason,
|
|
678
|
+
cause
|
|
679
|
+
}: {
|
|
680
|
+
status: number;
|
|
681
|
+
proxyStatus?: number;
|
|
682
|
+
proxyReason?: string;
|
|
683
|
+
cause?: unknown;
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
declare class ConflictingProxyError extends Error {
|
|
687
|
+
name: string;
|
|
688
|
+
}
|
|
689
|
+
declare class UntunnelledTransportError extends Error {
|
|
690
|
+
name: string;
|
|
691
|
+
}
|
|
692
|
+
declare class InvalidEgressProxyUrlError extends Error {
|
|
693
|
+
name: string;
|
|
694
|
+
}
|
|
695
|
+
declare const isEgressProxyError: (value: unknown) => value is EgressProxyError;
|
|
696
|
+
declare const findEgressProxyError: (error: unknown) => EgressProxyError | undefined;
|
|
697
|
+
//#endregion
|
|
698
|
+
//#region src/egressProxy/egressProxyFetch.d.ts
|
|
699
|
+
declare const createEgressProxyFetch: (egressProxyUrl: string, {
|
|
700
|
+
connectTimeoutMs
|
|
701
|
+
}?: {
|
|
702
|
+
connectTimeoutMs?: number;
|
|
703
|
+
}) => FetchLike;
|
|
704
|
+
//#endregion
|
|
661
705
|
//#region src/errors/httpResponseError.d.ts
|
|
662
706
|
declare class HttpResponseError extends Error {
|
|
663
707
|
readonly response: HttpResponse;
|
|
@@ -749,13 +793,15 @@ declare const getTransportInstance: ({
|
|
|
749
793
|
redisClientConfig,
|
|
750
794
|
context,
|
|
751
795
|
requestConfig,
|
|
752
|
-
httpsAgentConfig
|
|
796
|
+
httpsAgentConfig,
|
|
797
|
+
egressProxyUrl
|
|
753
798
|
}?: {
|
|
754
799
|
logger?: ILogger;
|
|
755
800
|
redisClientConfig?: RedisClientConfig;
|
|
756
801
|
context?: RequestContext;
|
|
757
802
|
requestConfig?: RequestConfig;
|
|
758
803
|
httpsAgentConfig?: https.AgentOptions;
|
|
804
|
+
egressProxyUrl?: string;
|
|
759
805
|
}) => Promise<AxiosInstance>;
|
|
760
806
|
//#endregion
|
|
761
807
|
//#region src/httpClient/cancelledCalls.d.ts
|
|
@@ -765,18 +811,21 @@ declare const getCancelledCallCount: (signal: AbortSignal) => number;
|
|
|
765
811
|
declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
766
812
|
#private;
|
|
767
813
|
name: string;
|
|
814
|
+
readonly egressProxyUrl?: string;
|
|
768
815
|
constructor({
|
|
769
816
|
transportFactory,
|
|
770
817
|
getRedisClient,
|
|
771
818
|
logger,
|
|
772
819
|
redisClientConfig,
|
|
773
|
-
errorMappingFn
|
|
820
|
+
errorMappingFn,
|
|
821
|
+
egressProxyUrl
|
|
774
822
|
}?: {
|
|
775
823
|
transportFactory?: TransportFactory;
|
|
776
824
|
getRedisClient?: RedisClientBuilder;
|
|
777
825
|
logger?: ILogger;
|
|
778
826
|
redisClientConfig?: RedisClientConfig;
|
|
779
827
|
errorMappingFn?: ErrorMappingFn<TError>;
|
|
828
|
+
egressProxyUrl?: string;
|
|
780
829
|
});
|
|
781
830
|
request<P, T>({
|
|
782
831
|
headers,
|
|
@@ -891,19 +940,21 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
891
940
|
}
|
|
892
941
|
//#endregion
|
|
893
942
|
//#region src/httpClient/httpClientManager.d.ts
|
|
894
|
-
declare const buildHttpClientInstance: <TError extends Error = Error>(redisClientConfig: RedisClientConfig, logger?: ILogger, errorMappingFn?: ErrorMappingFn<TError
|
|
943
|
+
declare const buildHttpClientInstance: <TError extends Error = Error>(redisClientConfig: RedisClientConfig, logger?: ILogger, errorMappingFn?: ErrorMappingFn<TError>, egressProxyUrl?: string) => IHttpClient;
|
|
895
944
|
declare class HttpClientManager {
|
|
896
|
-
private static
|
|
945
|
+
private static httpClientInstances;
|
|
897
946
|
static getInstance<TError extends Error = Error>({
|
|
898
947
|
redisClientConfig,
|
|
899
948
|
logger,
|
|
900
949
|
errorMappingFn,
|
|
901
|
-
getHttpClient
|
|
950
|
+
getHttpClient,
|
|
951
|
+
egressProxyUrl
|
|
902
952
|
}: {
|
|
903
953
|
redisClientConfig: RedisClientConfig;
|
|
904
954
|
logger?: ILogger;
|
|
905
955
|
errorMappingFn?: ErrorMappingFn<TError>;
|
|
906
956
|
getHttpClient?: typeof buildHttpClientInstance;
|
|
957
|
+
egressProxyUrl?: string;
|
|
907
958
|
}): Promise<IHttpClient>;
|
|
908
959
|
static resetInstance(): void;
|
|
909
960
|
}
|
|
@@ -941,6 +992,7 @@ type HttpTransportInstanceConfig = {
|
|
|
941
992
|
requestConfig?: RequestConfig;
|
|
942
993
|
concurrencyManager?: ConcurrencyManager;
|
|
943
994
|
rateLimitManager?: RateLimitManager;
|
|
995
|
+
egressProxyUrl?: string;
|
|
944
996
|
};
|
|
945
997
|
interface InterceptorManager<V> extends AxiosInterceptorManager<V> {
|
|
946
998
|
forEach(fn: (handler: any) => unknown): void;
|
|
@@ -957,7 +1009,8 @@ declare class HttpTransportFactory {
|
|
|
957
1009
|
context,
|
|
958
1010
|
requestConfig,
|
|
959
1011
|
concurrencyManager,
|
|
960
|
-
rateLimitManager
|
|
1012
|
+
rateLimitManager,
|
|
1013
|
+
egressProxyUrl
|
|
961
1014
|
}: HttpTransportInstanceConfig): AxiosInstance;
|
|
962
1015
|
private static applyInterceptors;
|
|
963
1016
|
private static resolveInterceptorInstance;
|
|
@@ -1066,6 +1119,7 @@ type McpClientConfig = {
|
|
|
1066
1119
|
timeout?: number;
|
|
1067
1120
|
requestConfig?: RequestConfig;
|
|
1068
1121
|
context?: RequestContext;
|
|
1122
|
+
egressProxyUrl?: string;
|
|
1069
1123
|
};
|
|
1070
1124
|
type McpToolContentBlock = {
|
|
1071
1125
|
type: string;
|
|
@@ -1234,6 +1288,8 @@ declare class MemoryStore<T> implements ICacheClient {
|
|
|
1234
1288
|
private slideExpiry;
|
|
1235
1289
|
getDataBatch<U = T>(keys: string[]): Promise<(U | null)[]>;
|
|
1236
1290
|
getDataKeysFromGroup(groupKey: string): Promise<string[]>;
|
|
1291
|
+
getGroupSize(groupKey: string): Promise<number>;
|
|
1292
|
+
listGroupKeys(prefix: string): Promise<string[]>;
|
|
1237
1293
|
deleteDataKeyFromGroup(groupKey: string, key: string): Promise<boolean>;
|
|
1238
1294
|
private getLiveGroup;
|
|
1239
1295
|
setData<U = T>({
|
|
@@ -1384,4 +1440,4 @@ type LockEntry = {
|
|
|
1384
1440
|
unlock: Unlock;
|
|
1385
1441
|
};
|
|
1386
1442
|
//#endregion
|
|
1387
|
-
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 McpIconFinder, type McpListToolsParams, type McpListToolsResult, type McpOAuthDiscoveryDependencies, type McpOAuthDiscoveryOptions, 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, type SameSiteIssuerFallback, ScriptManager, type SigningCredentials, type SigningOptions, type SigningRequest, type SigningStrategy, type StreamHttpResponse, SubscriptionManager, type TransportInitializationOptions, TransportManagersUnavailableError, type Unlock, buildHttpClientInstance, buildHttpsAgent, convertError, createAuthorizationHeaders, discoverMcpOAuthServerInfo, discoverSameSiteAuthorizationServerMetadata, findMcpIcon, getCancelledCallCount, getRetryAfterWaitTime, getSigningStrategy, getTransportInstance, getTransportManagers, initializeTransportSystem, isFailedStatusCode, isInfoStatusCode, isRequestAbortedError, isSameSiteIssuer, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, probeMcpServer, registerSigningStrategy, serializeHttpResponseError, shutdownTransportSystem, superNormalizeHeaders, translateCustomError };
|
|
1443
|
+
export { type AuthorizationChallenge, type AxiosErrorWithRequestMetadata, type AxiosErrorWithRetryCount, CUSTOM_ERROR_CONFIG_SCHEMA, type CertificatesInput, type ConcurrencyConfig, ConcurrencyManager, ConflictingProxyError, type CustomErrorConfig, EgressProxyError, 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, InvalidEgressProxyUrlError, type Lock, type LockEntry, LockManager, type McpCallToolParams, type McpCallToolResult, McpClient, type McpClientConfig, type McpClientInfo, type McpIconFinder, type McpListToolsParams, type McpListToolsResult, type McpOAuthDiscoveryDependencies, type McpOAuthDiscoveryOptions, 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, type SameSiteIssuerFallback, ScriptManager, type SigningCredentials, type SigningOptions, type SigningRequest, type SigningStrategy, type StreamHttpResponse, SubscriptionManager, type TransportInitializationOptions, TransportManagersUnavailableError, type Unlock, UntunnelledTransportError, buildHttpClientInstance, buildHttpsAgent, convertError, createAuthorizationHeaders, createEgressProxyFetch, discoverMcpOAuthServerInfo, discoverSameSiteAuthorizationServerMetadata, findEgressProxyError, findMcpIcon, getCancelledCallCount, getRetryAfterWaitTime, getSigningStrategy, getTransportInstance, getTransportManagers, initializeTransportSystem, isEgressProxyError, isFailedStatusCode, isInfoStatusCode, isRequestAbortedError, isSameSiteIssuer, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, probeMcpServer, registerSigningStrategy, serializeHttpResponseError, shutdownTransportSystem, superNormalizeHeaders, translateCustomError };
|