@stackone/transport 2.39.1 → 2.40.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.d.cts CHANGED
@@ -382,9 +382,9 @@ type RequestConfig = {
382
382
  };
383
383
  //#endregion
384
384
  //#region src/parsers/types.d.ts
385
- declare const RequestParameterLocations: readonly ["query", "body", "headers"];
385
+ declare const RequestParameterLocations: readonly ['query', 'body', 'headers'];
386
386
  type RequestParameterLocation = (typeof RequestParameterLocations)[number];
387
- declare const QueryArrayFormats: readonly ["repeat", "brackets", "comma", "stringify"];
387
+ declare const QueryArrayFormats: readonly ['repeat', 'brackets', 'comma', 'stringify'];
388
388
  type QueryArrayFormat = (typeof QueryArrayFormats)[number];
389
389
  type RequestParameter = {
390
390
  name: string;
@@ -407,7 +407,7 @@ type HttpQueryParamValue = {
407
407
  type HttpQueryParams = {
408
408
  [key: string]: string | string[] | HttpQueryParamValue;
409
409
  };
410
- declare const HttpMethods: readonly ["get", "post", "put", "delete", "patch"];
410
+ declare const HttpMethods: readonly ['get', 'post', 'put', 'delete', 'patch'];
411
411
  type HttpMethod = (typeof HttpMethods)[number];
412
412
  type ResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text';
413
413
  type HttpResponse<T = any, P = any> = {
@@ -667,7 +667,7 @@ declare class HttpResponseError extends Error {
667
667
  }
668
668
  //#endregion
669
669
  //#region src/errors/requestAbortedError.d.ts
670
- declare const REQUEST_ABORT_REASONS: readonly ["client_disconnect", "timeout"];
670
+ declare const REQUEST_ABORT_REASONS: readonly ['client_disconnect', 'timeout'];
671
671
  type RequestAbortReason = (typeof REQUEST_ABORT_REASONS)[number];
672
672
  declare class RequestAbortedError extends Error {
673
673
  readonly reason: RequestAbortReason;
@@ -1136,6 +1136,10 @@ declare class McpClient implements IMcpClient {
1136
1136
  private buildRequestOptions;
1137
1137
  }
1138
1138
  //#endregion
1139
+ //#region src/mcpClient/mcpIcon.d.ts
1140
+ type McpIconFinder = (serverUrl: string, advertisedIconUrl?: string) => Promise<string | undefined>;
1141
+ declare const findMcpIcon: (serverUrl: string, advertisedIconUrl?: string, fetchFn?: typeof fetch) => Promise<string | undefined>;
1142
+ //#endregion
1139
1143
  //#region src/mcpClient/probeMcpServer.d.ts
1140
1144
  type McpServerProbe = {
1141
1145
  requiresAuthorization: boolean;
@@ -1144,6 +1148,8 @@ type McpServerProbe = {
1144
1148
  authorizationServers?: string[];
1145
1149
  dynamicRegistration?: boolean;
1146
1150
  resourceMetadataUrl?: string;
1151
+ tokenEndpoint?: string;
1152
+ refreshTokenGrant?: boolean;
1147
1153
  };
1148
1154
  resource?: {
1149
1155
  name?: string;
@@ -1164,6 +1170,8 @@ type ResourceMetadata = {
1164
1170
  };
1165
1171
  type AuthorizationServerMetadata = {
1166
1172
  registration_endpoint?: string;
1173
+ token_endpoint?: string;
1174
+ grant_types_supported?: string[];
1167
1175
  scopes_supported?: string[];
1168
1176
  };
1169
1177
  type ProbeDependencies = {
@@ -1334,7 +1342,7 @@ declare class SubscriptionManager {
1334
1342
  }
1335
1343
  //#endregion
1336
1344
  //#region src/utils/extractRatelimitHeaders.d.ts
1337
- declare const superNormalizeHeaders: (headers: AxiosResponse["headers"]) => Record<string, number | null>;
1345
+ declare const superNormalizeHeaders: (headers: AxiosResponse['headers']) => Record<string, number | null>;
1338
1346
  //#endregion
1339
1347
  //#region src/utils/retryAfter.d.ts
1340
1348
  type RetryAfter = string | number | null;
@@ -1353,4 +1361,4 @@ type LockEntry = {
1353
1361
  unlock: Unlock;
1354
1362
  };
1355
1363
  //#endregion
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 };
1364
+ 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 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, findMcpIcon, getCancelledCallCount, getRetryAfterWaitTime, getSigningStrategy, getTransportInstance, getTransportManagers, initializeTransportSystem, isFailedStatusCode, isInfoStatusCode, isRequestAbortedError, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, probeMcpServer, registerSigningStrategy, serializeHttpResponseError, shutdownTransportSystem, superNormalizeHeaders, translateCustomError };
package/dist/index.d.mts CHANGED
@@ -3,10 +3,10 @@ import { z } from "@stackone/utils";
3
3
  import * as redis from "redis";
4
4
  import { AxiosError, AxiosInstance, AxiosInterceptorManager, AxiosInterceptorOptions, AxiosResponse, CreateAxiosDefaults, InternalAxiosRequestConfig } from "axios";
5
5
  import https from "node:https";
6
+ import http, { AgentOptions } from "node:http";
6
7
  import { Readable } from "node:stream";
7
8
  import { Client, ClientOptions, StreamableHTTPClientTransportOptions, Transport } from "@modelcontextprotocol/client";
8
9
  import { ILogger } from "@stackone/logger";
9
- import http, { AgentOptions } from "node:http";
10
10
  import * as tls$1 from "tls";
11
11
 
12
12
  //#region src/asyncSingleton/index.d.ts
@@ -381,9 +381,9 @@ type RequestConfig = {
381
381
  };
382
382
  //#endregion
383
383
  //#region src/parsers/types.d.ts
384
- declare const RequestParameterLocations: readonly ["query", "body", "headers"];
384
+ declare const RequestParameterLocations: readonly ['query', 'body', 'headers'];
385
385
  type RequestParameterLocation = (typeof RequestParameterLocations)[number];
386
- declare const QueryArrayFormats: readonly ["repeat", "brackets", "comma", "stringify"];
386
+ declare const QueryArrayFormats: readonly ['repeat', 'brackets', 'comma', 'stringify'];
387
387
  type QueryArrayFormat = (typeof QueryArrayFormats)[number];
388
388
  type RequestParameter = {
389
389
  name: string;
@@ -406,7 +406,7 @@ type HttpQueryParamValue = {
406
406
  type HttpQueryParams = {
407
407
  [key: string]: string | string[] | HttpQueryParamValue;
408
408
  };
409
- declare const HttpMethods: readonly ["get", "post", "put", "delete", "patch"];
409
+ declare const HttpMethods: readonly ['get', 'post', 'put', 'delete', 'patch'];
410
410
  type HttpMethod = (typeof HttpMethods)[number];
411
411
  type ResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text';
412
412
  type HttpResponse<T = any, P = any> = {
@@ -666,7 +666,7 @@ declare class HttpResponseError extends Error {
666
666
  }
667
667
  //#endregion
668
668
  //#region src/errors/requestAbortedError.d.ts
669
- declare const REQUEST_ABORT_REASONS: readonly ["client_disconnect", "timeout"];
669
+ declare const REQUEST_ABORT_REASONS: readonly ['client_disconnect', 'timeout'];
670
670
  type RequestAbortReason = (typeof REQUEST_ABORT_REASONS)[number];
671
671
  declare class RequestAbortedError extends Error {
672
672
  readonly reason: RequestAbortReason;
@@ -1135,6 +1135,10 @@ declare class McpClient implements IMcpClient {
1135
1135
  private buildRequestOptions;
1136
1136
  }
1137
1137
  //#endregion
1138
+ //#region src/mcpClient/mcpIcon.d.ts
1139
+ type McpIconFinder = (serverUrl: string, advertisedIconUrl?: string) => Promise<string | undefined>;
1140
+ declare const findMcpIcon: (serverUrl: string, advertisedIconUrl?: string, fetchFn?: typeof fetch) => Promise<string | undefined>;
1141
+ //#endregion
1138
1142
  //#region src/mcpClient/probeMcpServer.d.ts
1139
1143
  type McpServerProbe = {
1140
1144
  requiresAuthorization: boolean;
@@ -1143,6 +1147,8 @@ type McpServerProbe = {
1143
1147
  authorizationServers?: string[];
1144
1148
  dynamicRegistration?: boolean;
1145
1149
  resourceMetadataUrl?: string;
1150
+ tokenEndpoint?: string;
1151
+ refreshTokenGrant?: boolean;
1146
1152
  };
1147
1153
  resource?: {
1148
1154
  name?: string;
@@ -1163,6 +1169,8 @@ type ResourceMetadata = {
1163
1169
  };
1164
1170
  type AuthorizationServerMetadata = {
1165
1171
  registration_endpoint?: string;
1172
+ token_endpoint?: string;
1173
+ grant_types_supported?: string[];
1166
1174
  scopes_supported?: string[];
1167
1175
  };
1168
1176
  type ProbeDependencies = {
@@ -1333,7 +1341,7 @@ declare class SubscriptionManager {
1333
1341
  }
1334
1342
  //#endregion
1335
1343
  //#region src/utils/extractRatelimitHeaders.d.ts
1336
- declare const superNormalizeHeaders: (headers: AxiosResponse["headers"]) => Record<string, number | null>;
1344
+ declare const superNormalizeHeaders: (headers: AxiosResponse['headers']) => Record<string, number | null>;
1337
1345
  //#endregion
1338
1346
  //#region src/utils/retryAfter.d.ts
1339
1347
  type RetryAfter = string | number | null;
@@ -1352,4 +1360,4 @@ type LockEntry = {
1352
1360
  unlock: Unlock;
1353
1361
  };
1354
1362
  //#endregion
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 };
1363
+ 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 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, findMcpIcon, getCancelledCallCount, getRetryAfterWaitTime, getSigningStrategy, getTransportInstance, getTransportManagers, initializeTransportSystem, isFailedStatusCode, isInfoStatusCode, isRequestAbortedError, isSuccessStatusCode, isTransportSystemReady, parseRequestParameters, probeMcpServer, registerSigningStrategy, serializeHttpResponseError, shutdownTransportSystem, superNormalizeHeaders, translateCustomError };