@stackone/transport 2.24.0 → 2.25.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 +13 -13
- package/dist/index.d.cts +11 -11
- package/dist/index.d.mts +11 -11
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import https from "node:https";
|
|
|
3
3
|
import { AxiosError, AxiosInstance, AxiosInterceptorManager, AxiosInterceptorOptions, AxiosResponse, CreateAxiosDefaults, InternalAxiosRequestConfig } from "axios";
|
|
4
4
|
import * as redis from "redis";
|
|
5
5
|
import { Readable } from "node:stream";
|
|
6
|
-
import { z } from "
|
|
6
|
+
import { z } from "zod/v4";
|
|
7
7
|
|
|
8
8
|
//#region rolldown:runtime
|
|
9
9
|
//#endregion
|
|
@@ -412,7 +412,7 @@ type HttpQueryParams = {
|
|
|
412
412
|
};
|
|
413
413
|
declare const HttpMethods: readonly ["get", "post", "put", "delete", "patch"];
|
|
414
414
|
type HttpMethod = (typeof HttpMethods)[number];
|
|
415
|
-
type HttpResponse<T = any, P = any> = {
|
|
415
|
+
type HttpResponse<T = any, P$1 = any> = {
|
|
416
416
|
data: T;
|
|
417
417
|
status: number;
|
|
418
418
|
headers: HttpHeaders;
|
|
@@ -420,7 +420,7 @@ type HttpResponse<T = any, P = any> = {
|
|
|
420
420
|
responseType?: string;
|
|
421
421
|
responseTime?: Date;
|
|
422
422
|
message?: string;
|
|
423
|
-
body?: P;
|
|
423
|
+
body?: P$1;
|
|
424
424
|
};
|
|
425
425
|
type StreamHttpResponse = {
|
|
426
426
|
status: number;
|
|
@@ -434,7 +434,7 @@ type HttpParameters = {
|
|
|
434
434
|
headers: HttpHeaders;
|
|
435
435
|
};
|
|
436
436
|
interface IHttpClient {
|
|
437
|
-
request<P, T>({
|
|
437
|
+
request<P$1, T>({
|
|
438
438
|
headers,
|
|
439
439
|
url,
|
|
440
440
|
method,
|
|
@@ -457,7 +457,7 @@ interface IHttpClient {
|
|
|
457
457
|
responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text';
|
|
458
458
|
cacheTTL?: number;
|
|
459
459
|
context?: RequestContext;
|
|
460
|
-
payload?: P;
|
|
460
|
+
payload?: P$1;
|
|
461
461
|
httpsAgent?: https.Agent;
|
|
462
462
|
httpAgent?: http.Agent;
|
|
463
463
|
requestConfig?: RequestConfig;
|
|
@@ -480,7 +480,7 @@ interface IHttpClient {
|
|
|
480
480
|
context?: RequestContext;
|
|
481
481
|
requestConfig?: RequestConfig;
|
|
482
482
|
}): Promise<HttpResponse<T>>;
|
|
483
|
-
post<P, T>({
|
|
483
|
+
post<P$1, T>({
|
|
484
484
|
headers,
|
|
485
485
|
url,
|
|
486
486
|
maxRedirects,
|
|
@@ -494,7 +494,7 @@ interface IHttpClient {
|
|
|
494
494
|
maxRedirects?: number;
|
|
495
495
|
cacheTTL?: number;
|
|
496
496
|
context?: RequestContext;
|
|
497
|
-
payload?: P;
|
|
497
|
+
payload?: P$1;
|
|
498
498
|
requestConfig?: RequestConfig;
|
|
499
499
|
}): Promise<HttpResponse<T>>;
|
|
500
500
|
requestStream({
|
|
@@ -745,7 +745,7 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
745
745
|
redisClientConfig?: RedisClientConfig;
|
|
746
746
|
errorMappingFn?: ErrorMappingFn<TError>;
|
|
747
747
|
});
|
|
748
|
-
request<P, T>({
|
|
748
|
+
request<P$1, T>({
|
|
749
749
|
headers,
|
|
750
750
|
url,
|
|
751
751
|
method,
|
|
@@ -770,7 +770,7 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
770
770
|
cacheTTL?: number;
|
|
771
771
|
context?: RequestContext;
|
|
772
772
|
traceId?: string;
|
|
773
|
-
payload?: P;
|
|
773
|
+
payload?: P$1;
|
|
774
774
|
httpsAgent?: https.Agent;
|
|
775
775
|
httpAgent?: http.Agent;
|
|
776
776
|
requestConfig?: RequestConfig;
|
|
@@ -795,7 +795,7 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
795
795
|
traceId?: string;
|
|
796
796
|
requestConfig?: RequestConfig;
|
|
797
797
|
}): Promise<HttpResponse<T>>;
|
|
798
|
-
post<P, T>({
|
|
798
|
+
post<P$1, T>({
|
|
799
799
|
headers,
|
|
800
800
|
url,
|
|
801
801
|
maxRedirects,
|
|
@@ -811,7 +811,7 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
811
811
|
cacheTTL?: number;
|
|
812
812
|
context?: RequestContext;
|
|
813
813
|
traceId?: string;
|
|
814
|
-
payload?: P;
|
|
814
|
+
payload?: P$1;
|
|
815
815
|
requestConfig?: RequestConfig;
|
|
816
816
|
}): Promise<HttpResponse<T>>;
|
|
817
817
|
requestStream({
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as __name } from "./chunk-hhuvQGXm.mjs";
|
|
2
|
-
import { z } from "@stackone/utils";
|
|
3
2
|
import * as redis from "redis";
|
|
4
3
|
import { AxiosError, AxiosInstance, AxiosInterceptorManager, AxiosInterceptorOptions, AxiosResponse, CreateAxiosDefaults, InternalAxiosRequestConfig } from "axios";
|
|
5
4
|
import https from "node:https";
|
|
6
5
|
import http, { AgentOptions } from "node:http";
|
|
7
6
|
import { Readable } from "node:stream";
|
|
7
|
+
import { z } from "zod/v4";
|
|
8
8
|
|
|
9
9
|
//#region ../logger/src/types.d.ts
|
|
10
10
|
interface ILogger {
|
|
@@ -411,7 +411,7 @@ type HttpQueryParams = {
|
|
|
411
411
|
};
|
|
412
412
|
declare const HttpMethods: readonly ["get", "post", "put", "delete", "patch"];
|
|
413
413
|
type HttpMethod = (typeof HttpMethods)[number];
|
|
414
|
-
type HttpResponse<T = any, P = any> = {
|
|
414
|
+
type HttpResponse<T = any, P$1 = any> = {
|
|
415
415
|
data: T;
|
|
416
416
|
status: number;
|
|
417
417
|
headers: HttpHeaders;
|
|
@@ -419,7 +419,7 @@ type HttpResponse<T = any, P = any> = {
|
|
|
419
419
|
responseType?: string;
|
|
420
420
|
responseTime?: Date;
|
|
421
421
|
message?: string;
|
|
422
|
-
body?: P;
|
|
422
|
+
body?: P$1;
|
|
423
423
|
};
|
|
424
424
|
type StreamHttpResponse = {
|
|
425
425
|
status: number;
|
|
@@ -433,7 +433,7 @@ type HttpParameters = {
|
|
|
433
433
|
headers: HttpHeaders;
|
|
434
434
|
};
|
|
435
435
|
interface IHttpClient {
|
|
436
|
-
request<P, T>({
|
|
436
|
+
request<P$1, T>({
|
|
437
437
|
headers,
|
|
438
438
|
url,
|
|
439
439
|
method,
|
|
@@ -456,7 +456,7 @@ interface IHttpClient {
|
|
|
456
456
|
responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text';
|
|
457
457
|
cacheTTL?: number;
|
|
458
458
|
context?: RequestContext;
|
|
459
|
-
payload?: P;
|
|
459
|
+
payload?: P$1;
|
|
460
460
|
httpsAgent?: https.Agent;
|
|
461
461
|
httpAgent?: http.Agent;
|
|
462
462
|
requestConfig?: RequestConfig;
|
|
@@ -479,7 +479,7 @@ interface IHttpClient {
|
|
|
479
479
|
context?: RequestContext;
|
|
480
480
|
requestConfig?: RequestConfig;
|
|
481
481
|
}): Promise<HttpResponse<T>>;
|
|
482
|
-
post<P, T>({
|
|
482
|
+
post<P$1, T>({
|
|
483
483
|
headers,
|
|
484
484
|
url,
|
|
485
485
|
maxRedirects,
|
|
@@ -493,7 +493,7 @@ interface IHttpClient {
|
|
|
493
493
|
maxRedirects?: number;
|
|
494
494
|
cacheTTL?: number;
|
|
495
495
|
context?: RequestContext;
|
|
496
|
-
payload?: P;
|
|
496
|
+
payload?: P$1;
|
|
497
497
|
requestConfig?: RequestConfig;
|
|
498
498
|
}): Promise<HttpResponse<T>>;
|
|
499
499
|
requestStream({
|
|
@@ -744,7 +744,7 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
744
744
|
redisClientConfig?: RedisClientConfig;
|
|
745
745
|
errorMappingFn?: ErrorMappingFn<TError>;
|
|
746
746
|
});
|
|
747
|
-
request<P, T>({
|
|
747
|
+
request<P$1, T>({
|
|
748
748
|
headers,
|
|
749
749
|
url,
|
|
750
750
|
method,
|
|
@@ -769,7 +769,7 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
769
769
|
cacheTTL?: number;
|
|
770
770
|
context?: RequestContext;
|
|
771
771
|
traceId?: string;
|
|
772
|
-
payload?: P;
|
|
772
|
+
payload?: P$1;
|
|
773
773
|
httpsAgent?: https.Agent;
|
|
774
774
|
httpAgent?: http.Agent;
|
|
775
775
|
requestConfig?: RequestConfig;
|
|
@@ -794,7 +794,7 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
794
794
|
traceId?: string;
|
|
795
795
|
requestConfig?: RequestConfig;
|
|
796
796
|
}): Promise<HttpResponse<T>>;
|
|
797
|
-
post<P, T>({
|
|
797
|
+
post<P$1, T>({
|
|
798
798
|
headers,
|
|
799
799
|
url,
|
|
800
800
|
maxRedirects,
|
|
@@ -810,7 +810,7 @@ declare class HttpClient<TError extends Error = Error> implements IHttpClient {
|
|
|
810
810
|
cacheTTL?: number;
|
|
811
811
|
context?: RequestContext;
|
|
812
812
|
traceId?: string;
|
|
813
|
-
payload?: P;
|
|
813
|
+
payload?: P$1;
|
|
814
814
|
requestConfig?: RequestConfig;
|
|
815
815
|
}): Promise<HttpResponse<T>>;
|
|
816
816
|
requestStream({
|