@stackone/transport 2.40.0 → 2.40.2
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 +9 -5
- package/dist/index.d.mts +10 -6
- package/dist/index.mjs +9 -9
- package/package.json +2 -2
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 [
|
|
385
|
+
declare const RequestParameterLocations: readonly ['query', 'body', 'headers'];
|
|
386
386
|
type RequestParameterLocation = (typeof RequestParameterLocations)[number];
|
|
387
|
-
declare const QueryArrayFormats: readonly [
|
|
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 [
|
|
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 [
|
|
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;
|
|
@@ -1148,6 +1148,8 @@ type McpServerProbe = {
|
|
|
1148
1148
|
authorizationServers?: string[];
|
|
1149
1149
|
dynamicRegistration?: boolean;
|
|
1150
1150
|
resourceMetadataUrl?: string;
|
|
1151
|
+
tokenEndpoint?: string;
|
|
1152
|
+
refreshTokenGrant?: boolean;
|
|
1151
1153
|
};
|
|
1152
1154
|
resource?: {
|
|
1153
1155
|
name?: string;
|
|
@@ -1168,6 +1170,8 @@ type ResourceMetadata = {
|
|
|
1168
1170
|
};
|
|
1169
1171
|
type AuthorizationServerMetadata = {
|
|
1170
1172
|
registration_endpoint?: string;
|
|
1173
|
+
token_endpoint?: string;
|
|
1174
|
+
grant_types_supported?: string[];
|
|
1171
1175
|
scopes_supported?: string[];
|
|
1172
1176
|
};
|
|
1173
1177
|
type ProbeDependencies = {
|
|
@@ -1338,7 +1342,7 @@ declare class SubscriptionManager {
|
|
|
1338
1342
|
}
|
|
1339
1343
|
//#endregion
|
|
1340
1344
|
//#region src/utils/extractRatelimitHeaders.d.ts
|
|
1341
|
-
declare const superNormalizeHeaders: (headers: AxiosResponse[
|
|
1345
|
+
declare const superNormalizeHeaders: (headers: AxiosResponse['headers']) => Record<string, number | null>;
|
|
1342
1346
|
//#endregion
|
|
1343
1347
|
//#region src/utils/retryAfter.d.ts
|
|
1344
1348
|
type RetryAfter = string | number | null;
|
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 [
|
|
384
|
+
declare const RequestParameterLocations: readonly ['query', 'body', 'headers'];
|
|
385
385
|
type RequestParameterLocation = (typeof RequestParameterLocations)[number];
|
|
386
|
-
declare const QueryArrayFormats: readonly [
|
|
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 [
|
|
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 [
|
|
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;
|
|
@@ -1147,6 +1147,8 @@ type McpServerProbe = {
|
|
|
1147
1147
|
authorizationServers?: string[];
|
|
1148
1148
|
dynamicRegistration?: boolean;
|
|
1149
1149
|
resourceMetadataUrl?: string;
|
|
1150
|
+
tokenEndpoint?: string;
|
|
1151
|
+
refreshTokenGrant?: boolean;
|
|
1150
1152
|
};
|
|
1151
1153
|
resource?: {
|
|
1152
1154
|
name?: string;
|
|
@@ -1167,6 +1169,8 @@ type ResourceMetadata = {
|
|
|
1167
1169
|
};
|
|
1168
1170
|
type AuthorizationServerMetadata = {
|
|
1169
1171
|
registration_endpoint?: string;
|
|
1172
|
+
token_endpoint?: string;
|
|
1173
|
+
grant_types_supported?: string[];
|
|
1170
1174
|
scopes_supported?: string[];
|
|
1171
1175
|
};
|
|
1172
1176
|
type ProbeDependencies = {
|
|
@@ -1337,7 +1341,7 @@ declare class SubscriptionManager {
|
|
|
1337
1341
|
}
|
|
1338
1342
|
//#endregion
|
|
1339
1343
|
//#region src/utils/extractRatelimitHeaders.d.ts
|
|
1340
|
-
declare const superNormalizeHeaders: (headers: AxiosResponse[
|
|
1344
|
+
declare const superNormalizeHeaders: (headers: AxiosResponse['headers']) => Record<string, number | null>;
|
|
1341
1345
|
//#endregion
|
|
1342
1346
|
//#region src/utils/retryAfter.d.ts
|
|
1343
1347
|
type RetryAfter = string | number | null;
|