rezo 1.0.136 → 1.0.138
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/README.md +3 -3
- package/dist/adapters/entries/curl.d.ts +119 -82
- package/dist/adapters/entries/fetch.d.ts +119 -82
- package/dist/adapters/entries/http.d.ts +119 -82
- package/dist/adapters/entries/http2.d.ts +119 -82
- package/dist/adapters/entries/react-native.cjs +6 -6
- package/dist/adapters/entries/react-native.d.ts +119 -82
- package/dist/adapters/entries/xhr.d.ts +119 -82
- package/dist/adapters/http.cjs +26 -0
- package/dist/adapters/http.js +26 -0
- package/dist/adapters/index.cjs +10 -10
- package/dist/adapters/index.d.ts +52 -15
- package/dist/cache/index.cjs +9 -9
- package/dist/cookies/cookie-jar.cjs +154 -9
- package/dist/cookies/cookie-jar.js +150 -5
- package/dist/cookies/index.cjs +10 -10
- package/dist/crawler/index.cjs +42 -42
- package/dist/crawler/plugin/index.cjs +1 -1
- package/dist/crawler.d.ts +118 -81
- package/dist/entries/crawler.cjs +24 -24
- package/dist/errors/rezo-error.cjs +3 -2
- package/dist/errors/rezo-error.js +3 -2
- package/dist/index.cjs +58 -58
- package/dist/index.d.ts +119 -82
- package/dist/internal/agents/index.cjs +14 -14
- package/dist/platform/browser.d.ts +119 -82
- package/dist/platform/bun.d.ts +119 -82
- package/dist/platform/deno.d.ts +119 -82
- package/dist/platform/node.d.ts +119 -82
- package/dist/platform/react-native.cjs +6 -6
- package/dist/platform/react-native.d.ts +119 -82
- package/dist/platform/worker.d.ts +119 -82
- package/dist/proxy/index.cjs +4 -4
- package/dist/queue/index.cjs +8 -8
- package/dist/responses/universal/index.cjs +11 -11
- package/dist/stealth/index.cjs +17 -17
- package/dist/stealth/profiles/index.cjs +10 -10
- package/dist/utils/agent-pool.cjs +1 -1
- package/dist/utils/agent-pool.js +1 -1
- package/dist/utils/headers.cjs +3 -0
- package/dist/utils/headers.js +3 -0
- package/dist/utils/http-config.cjs +15 -2
- package/dist/utils/http-config.js +15 -2
- package/dist/utils/staged-timeout.cjs +1 -2
- package/dist/utils/staged-timeout.js +1 -2
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/wget/index.cjs +51 -51
- package/dist/wget/index.d.ts +118 -81
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { Agent as HttpAgent, OutgoingHttpHeaders } from 'node:http';
|
|
|
2
2
|
import { Agent as HttpsAgent } from 'node:https';
|
|
3
3
|
import { Socket } from 'node:net';
|
|
4
4
|
import { SecureContext, TLSSocket } from 'node:tls';
|
|
5
|
-
import { Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieJarOptions, CreateCookieOptions, Nullable, Store } from 'tough-cookie';
|
|
5
|
+
import { Callback, Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieJarOptions, CreateCookieOptions, GetCookiesOptions, Nullable, SerializedCookieJar, SetCookieOptions, Store } from 'tough-cookie';
|
|
6
6
|
|
|
7
7
|
export interface RezoHttpHeaders {
|
|
8
8
|
accept?: string | undefined;
|
|
@@ -137,6 +137,9 @@ export declare class RezoHeaders extends Headers {
|
|
|
137
137
|
* Used by stealth adapters to match browser header ordering.
|
|
138
138
|
*/
|
|
139
139
|
toOrderedObject(order: string[]): Record<string, string | string[]>;
|
|
140
|
+
toJSON(): Record<string, string> & {
|
|
141
|
+
"set-cookie"?: string[];
|
|
142
|
+
};
|
|
140
143
|
toObject(omit?: Array<keyof RezoHttpHeaders> | keyof RezoHttpHeaders): Record<string, string | string[]>;
|
|
141
144
|
toString(): string;
|
|
142
145
|
set(name: keyof RezoHttpHeaders, value: string): void;
|
|
@@ -214,6 +217,38 @@ export declare class RezoCookieJar extends TouchCookieJar {
|
|
|
214
217
|
constructor(cookies: Cookie[], url: string);
|
|
215
218
|
constructor(store: Nullable<Store>, options?: CreateCookieJarOptions | boolean);
|
|
216
219
|
private generateCookies;
|
|
220
|
+
setCookieSync(cookie: string | Cookie, url: string, options?: SetCookieOptions): Cookie | undefined;
|
|
221
|
+
setCookie(cookie: string | TouchCookie, url: string | URL, callback: Callback<TouchCookie | undefined>): void;
|
|
222
|
+
setCookie(cookie: string | TouchCookie, url: string | URL, options: SetCookieOptions, callback: Callback<TouchCookie | undefined>): void;
|
|
223
|
+
setCookie(cookie: string | TouchCookie, url: string | URL, options?: SetCookieOptions): Promise<TouchCookie | undefined>;
|
|
224
|
+
setCookie(cookie: string | TouchCookie, url: string | URL, options: SetCookieOptions | Callback<TouchCookie | undefined>, callback?: Callback<TouchCookie | undefined>): unknown;
|
|
225
|
+
getCookies(url: string, callback: Callback<TouchCookie[]>): void;
|
|
226
|
+
getCookies(url: string | URL, options: GetCookiesOptions | undefined, callback: Callback<TouchCookie[]>): void;
|
|
227
|
+
getCookies(url: string | URL, options?: GetCookiesOptions): Promise<TouchCookie[]>;
|
|
228
|
+
getCookies(url: string | URL, options: GetCookiesOptions | undefined | Callback<TouchCookie[]>, callback?: Callback<TouchCookie[]>): unknown;
|
|
229
|
+
getCookiesSync(url: string, options?: GetCookiesOptions): Cookie[];
|
|
230
|
+
getCookieString(url: string, callback: Callback<string | undefined>): void;
|
|
231
|
+
getCookieString(url: string, options: GetCookiesOptions, callback: Callback<string | undefined>): void;
|
|
232
|
+
getCookieString(url: string, options?: GetCookiesOptions): Promise<string>;
|
|
233
|
+
getCookieString(url: string, options: GetCookiesOptions | Callback<string | undefined>, callback?: Callback<string | undefined>): unknown;
|
|
234
|
+
getCookieStringSync(url: string, options?: GetCookiesOptions): string;
|
|
235
|
+
getSetCookieStrings(url: string, callback: Callback<string[] | undefined>): void;
|
|
236
|
+
getSetCookieStrings(url: string, options: GetCookiesOptions, callback: Callback<string[] | undefined>): void;
|
|
237
|
+
getSetCookieStrings(url: string, options?: GetCookiesOptions): Promise<string[] | undefined>;
|
|
238
|
+
getSetCookieStrings(url: string, options: GetCookiesOptions, callback?: Callback<string[] | undefined>): unknown;
|
|
239
|
+
getSetCookieStringsSync(url: string, options?: GetCookiesOptions): string[];
|
|
240
|
+
serialize(callback: Callback<SerializedCookieJar>): void;
|
|
241
|
+
serialize(): Promise<SerializedCookieJar>;
|
|
242
|
+
serializeSync(): SerializedCookieJar | undefined;
|
|
243
|
+
toJSON(): ReturnType<TouchCookieJar["toJSON"]>;
|
|
244
|
+
private toPublicSerializedJar;
|
|
245
|
+
private toStoredCookie;
|
|
246
|
+
private toPublicCookies;
|
|
247
|
+
private toPublicCookie;
|
|
248
|
+
private toStoredCookieKey;
|
|
249
|
+
private toPublicCookieKey;
|
|
250
|
+
private cookiesToCookieString;
|
|
251
|
+
private cookiesToSetCookieStrings;
|
|
217
252
|
/**
|
|
218
253
|
* Get all cookies from the cookie jar.
|
|
219
254
|
*
|
|
@@ -4068,34 +4103,36 @@ export interface RezoRequestConfig<D = any> {
|
|
|
4068
4103
|
* TLS negotiation for HTTPS).
|
|
4069
4104
|
*
|
|
4070
4105
|
* **Behavior:**
|
|
4071
|
-
* - `
|
|
4072
|
-
*
|
|
4106
|
+
* - `true` (default) - Connections are pooled and reused across requests to the
|
|
4107
|
+
* same host. Idle pooled sockets are closed after ~5 seconds.
|
|
4108
|
+
* - `false` - A fresh connection is opened for every request and closed after
|
|
4109
|
+
* the response. No pooling, no reuse.
|
|
4073
4110
|
*
|
|
4074
|
-
* **When to
|
|
4111
|
+
* **When to keep the default (`keepAlive: true`):**
|
|
4075
4112
|
* - Making multiple requests to the same host in sequence
|
|
4076
4113
|
* - Long-running applications (servers, bots, scrapers)
|
|
4077
4114
|
* - Performance-critical applications where connection overhead matters
|
|
4078
4115
|
*
|
|
4079
|
-
* **When to use `keepAlive: false
|
|
4080
|
-
* -
|
|
4081
|
-
* -
|
|
4082
|
-
* -
|
|
4116
|
+
* **When to use `keepAlive: false`:**
|
|
4117
|
+
* - Hosts that reset reused connections aggressively
|
|
4118
|
+
* - Debugging connection-level issues (isolates every request)
|
|
4119
|
+
* - One-off requests where connection reuse buys nothing
|
|
4083
4120
|
*
|
|
4084
4121
|
* @example
|
|
4085
4122
|
* ```typescript
|
|
4086
|
-
* // Default:
|
|
4123
|
+
* // Default: pooled keep-alive connections
|
|
4087
4124
|
* const { data } = await rezo.get('https://api.example.com/data');
|
|
4088
4125
|
*
|
|
4089
|
-
* //
|
|
4090
|
-
* const client =
|
|
4126
|
+
* // Fresh connection per request for this instance
|
|
4127
|
+
* const client = rezo.create({ keepAlive: false });
|
|
4091
4128
|
* await client.get('https://api.example.com/users');
|
|
4092
|
-
* await client.get('https://api.example.com/posts'); //
|
|
4129
|
+
* await client.get('https://api.example.com/posts'); // New connection again
|
|
4093
4130
|
*
|
|
4094
|
-
* //
|
|
4095
|
-
*
|
|
4131
|
+
* // Or per request
|
|
4132
|
+
* await rezo.get('https://api.example.com/data', { keepAlive: false });
|
|
4096
4133
|
* ```
|
|
4097
4134
|
*
|
|
4098
|
-
* @default
|
|
4135
|
+
* @default true
|
|
4099
4136
|
*/
|
|
4100
4137
|
keepAlive?: boolean;
|
|
4101
4138
|
/**
|
|
@@ -4517,9 +4554,9 @@ export interface httpAdapterOverloads {
|
|
|
4517
4554
|
request(options: RezoRequestOptions & {
|
|
4518
4555
|
responseType: "blob";
|
|
4519
4556
|
}): Promise<RezoResponse<Blob>>;
|
|
4520
|
-
request(options: RezoRequestOptions & {
|
|
4557
|
+
request<T extends string = string>(options: RezoRequestOptions & {
|
|
4521
4558
|
responseType: "text";
|
|
4522
|
-
}): Promise<RezoResponse<
|
|
4559
|
+
}): Promise<RezoResponse<T>>;
|
|
4523
4560
|
request(options: RezoRequestOptions & {
|
|
4524
4561
|
responseType: "download";
|
|
4525
4562
|
}): Promise<RezoDownloadResponse>;
|
|
@@ -4549,9 +4586,9 @@ export interface httpAdapterOverloads {
|
|
|
4549
4586
|
get(url: string | URL, options: RezoHttpGetRequest & {
|
|
4550
4587
|
responseType: "blob";
|
|
4551
4588
|
}): Promise<RezoResponse<Blob>>;
|
|
4552
|
-
get(url: string | URL, options: RezoHttpGetRequest & {
|
|
4589
|
+
get<T extends string = string>(url: string | URL, options: RezoHttpGetRequest & {
|
|
4553
4590
|
responseType: "text";
|
|
4554
|
-
}): Promise<RezoResponse<
|
|
4591
|
+
}): Promise<RezoResponse<T>>;
|
|
4555
4592
|
get(url: string | URL, options: RezoHttpGetRequest & {
|
|
4556
4593
|
responseType: "download";
|
|
4557
4594
|
}): Promise<RezoDownloadResponse>;
|
|
@@ -4583,9 +4620,9 @@ export interface httpAdapterOverloads {
|
|
|
4583
4620
|
delete(url: string | URL, options: RezoHttpDeleteRequest & {
|
|
4584
4621
|
responseType: "blob";
|
|
4585
4622
|
}): Promise<RezoResponse<Blob>>;
|
|
4586
|
-
delete(url: string | URL, options: RezoHttpDeleteRequest & {
|
|
4623
|
+
delete<T extends string = string>(url: string | URL, options: RezoHttpDeleteRequest & {
|
|
4587
4624
|
responseType: "text";
|
|
4588
|
-
}): Promise<RezoResponse<
|
|
4625
|
+
}): Promise<RezoResponse<T>>;
|
|
4589
4626
|
delete(url: string | URL, options: RezoHttpDeleteRequest & {
|
|
4590
4627
|
responseType: "download";
|
|
4591
4628
|
}): Promise<RezoDownloadResponse>;
|
|
@@ -4672,9 +4709,9 @@ export interface httpAdapterPostOverloads {
|
|
|
4672
4709
|
post(url: string | URL, data: any, options: RezoHttpPostRequest & {
|
|
4673
4710
|
responseType: "blob";
|
|
4674
4711
|
}): Promise<RezoResponse<Blob>>;
|
|
4675
|
-
post(url: string | URL, data: any, options: RezoHttpPostRequest & {
|
|
4712
|
+
post<T extends string = string>(url: string | URL, data: any, options: RezoHttpPostRequest & {
|
|
4676
4713
|
responseType: "text";
|
|
4677
|
-
}): Promise<RezoResponse<
|
|
4714
|
+
}): Promise<RezoResponse<T>>;
|
|
4678
4715
|
post(url: string | URL, data: any, options: RezoHttpPostRequest & {
|
|
4679
4716
|
responseType: "download";
|
|
4680
4717
|
}): Promise<RezoDownloadResponse>;
|
|
@@ -4702,15 +4739,15 @@ export interface httpAdapterPostOverloads {
|
|
|
4702
4739
|
postJson<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
4703
4740
|
responseType: "auto" | "json";
|
|
4704
4741
|
}): Promise<RezoResponse<T>>;
|
|
4705
|
-
postJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPostRequest & {
|
|
4742
|
+
postJson<T extends string = string>(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPostRequest & {
|
|
4706
4743
|
responseType: "text";
|
|
4707
|
-
}): Promise<RezoResponse<
|
|
4708
|
-
postJson(url: string | URL, jsonString: string, options: RezoHttpPostRequest & {
|
|
4744
|
+
}): Promise<RezoResponse<T>>;
|
|
4745
|
+
postJson<T extends string = string>(url: string | URL, jsonString: string, options: RezoHttpPostRequest & {
|
|
4709
4746
|
responseType: "text";
|
|
4710
|
-
}): Promise<RezoResponse<
|
|
4711
|
-
postJson(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
4747
|
+
}): Promise<RezoResponse<T>>;
|
|
4748
|
+
postJson<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
4712
4749
|
responseType: "text";
|
|
4713
|
-
}): Promise<RezoResponse<
|
|
4750
|
+
}): Promise<RezoResponse<T>>;
|
|
4714
4751
|
postJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPostRequest & {
|
|
4715
4752
|
responseType: "arrayBuffer";
|
|
4716
4753
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -4762,15 +4799,15 @@ export interface httpAdapterPostOverloads {
|
|
|
4762
4799
|
postForm<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
4763
4800
|
responseType: "auto" | "json";
|
|
4764
4801
|
}): Promise<RezoResponse<T>>;
|
|
4765
|
-
postForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPostRequest & {
|
|
4802
|
+
postForm<T extends string = string>(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPostRequest & {
|
|
4766
4803
|
responseType: "text";
|
|
4767
|
-
}): Promise<RezoResponse<
|
|
4768
|
-
postForm(url: string | URL, string: string, options: RezoHttpPostRequest & {
|
|
4804
|
+
}): Promise<RezoResponse<T>>;
|
|
4805
|
+
postForm<T extends string = string>(url: string | URL, string: string, options: RezoHttpPostRequest & {
|
|
4769
4806
|
responseType: "text";
|
|
4770
|
-
}): Promise<RezoResponse<
|
|
4771
|
-
postForm(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
4807
|
+
}): Promise<RezoResponse<T>>;
|
|
4808
|
+
postForm<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
4772
4809
|
responseType: "text";
|
|
4773
|
-
}): Promise<RezoResponse<
|
|
4810
|
+
}): Promise<RezoResponse<T>>;
|
|
4774
4811
|
postForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPostRequest & {
|
|
4775
4812
|
responseType: "arrayBuffer";
|
|
4776
4813
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -4831,15 +4868,15 @@ export interface httpAdapterPostOverloads {
|
|
|
4831
4868
|
postMultipart<T = any>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPostRequest & {
|
|
4832
4869
|
responseType: "json";
|
|
4833
4870
|
}): Promise<RezoResponse<T>>;
|
|
4834
|
-
postMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPostRequest & {
|
|
4871
|
+
postMultipart<T extends string = string>(url: string | URL, formData: RezoFormData, options: RezoHttpPostRequest & {
|
|
4835
4872
|
responseType: "text";
|
|
4836
|
-
}): Promise<RezoResponse<
|
|
4837
|
-
postMultipart(url: string | URL, formData: FormData, options: RezoHttpPostRequest & {
|
|
4873
|
+
}): Promise<RezoResponse<T>>;
|
|
4874
|
+
postMultipart<T extends string = string>(url: string | URL, formData: FormData, options: RezoHttpPostRequest & {
|
|
4838
4875
|
responseType: "text";
|
|
4839
|
-
}): Promise<RezoResponse<
|
|
4840
|
-
postMultipart(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPostRequest & {
|
|
4876
|
+
}): Promise<RezoResponse<T>>;
|
|
4877
|
+
postMultipart<T extends string = string>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPostRequest & {
|
|
4841
4878
|
responseType: "text";
|
|
4842
|
-
}): Promise<RezoResponse<
|
|
4879
|
+
}): Promise<RezoResponse<T>>;
|
|
4843
4880
|
postMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPostRequest & {
|
|
4844
4881
|
responseType: "stream";
|
|
4845
4882
|
}): Promise<RezoStreamResponse>;
|
|
@@ -4895,9 +4932,9 @@ export interface httpAdapterPatchOverloads {
|
|
|
4895
4932
|
patch(url: string | URL, data: any, options: RezoHttpPatchRequest & {
|
|
4896
4933
|
responseType: "blob";
|
|
4897
4934
|
}): Promise<RezoResponse<Blob>>;
|
|
4898
|
-
patch(url: string | URL, data: any, options: RezoHttpPatchRequest & {
|
|
4935
|
+
patch<T extends string = string>(url: string | URL, data: any, options: RezoHttpPatchRequest & {
|
|
4899
4936
|
responseType: "text";
|
|
4900
|
-
}): Promise<RezoResponse<
|
|
4937
|
+
}): Promise<RezoResponse<T>>;
|
|
4901
4938
|
patch(url: string | URL, data: any, options: RezoHttpPatchRequest & {
|
|
4902
4939
|
responseType: "download";
|
|
4903
4940
|
}): RezoDownloadResponse;
|
|
@@ -4925,15 +4962,15 @@ export interface httpAdapterPatchOverloads {
|
|
|
4925
4962
|
patchJson<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
4926
4963
|
responseType: "auto" | "json";
|
|
4927
4964
|
}): Promise<RezoResponse<T>>;
|
|
4928
|
-
patchJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPatchRequest & {
|
|
4965
|
+
patchJson<T extends string = string>(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPatchRequest & {
|
|
4929
4966
|
responseType: "text";
|
|
4930
|
-
}): Promise<RezoResponse<
|
|
4931
|
-
patchJson(url: string | URL, jsonString: string, options: RezoHttpPatchRequest & {
|
|
4967
|
+
}): Promise<RezoResponse<T>>;
|
|
4968
|
+
patchJson<T extends string = string>(url: string | URL, jsonString: string, options: RezoHttpPatchRequest & {
|
|
4932
4969
|
responseType: "text";
|
|
4933
|
-
}): Promise<RezoResponse<
|
|
4934
|
-
patchJson(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
4970
|
+
}): Promise<RezoResponse<T>>;
|
|
4971
|
+
patchJson<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
4935
4972
|
responseType: "text";
|
|
4936
|
-
}): Promise<RezoResponse<
|
|
4973
|
+
}): Promise<RezoResponse<T>>;
|
|
4937
4974
|
patchJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPatchRequest & {
|
|
4938
4975
|
responseType: "arrayBuffer";
|
|
4939
4976
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -4994,15 +5031,15 @@ export interface httpAdapterPatchOverloads {
|
|
|
4994
5031
|
patchForm<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
4995
5032
|
responseType: "auto" | "json";
|
|
4996
5033
|
}): Promise<RezoResponse<T>>;
|
|
4997
|
-
patchForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPatchRequest & {
|
|
5034
|
+
patchForm<T extends string = string>(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPatchRequest & {
|
|
4998
5035
|
responseType: "text";
|
|
4999
|
-
}): Promise<RezoResponse<
|
|
5000
|
-
patchForm(url: string | URL, string: string, options: RezoHttpPatchRequest & {
|
|
5036
|
+
}): Promise<RezoResponse<T>>;
|
|
5037
|
+
patchForm<T extends string = string>(url: string | URL, string: string, options: RezoHttpPatchRequest & {
|
|
5001
5038
|
responseType: "text";
|
|
5002
|
-
}): Promise<RezoResponse<
|
|
5003
|
-
patchForm(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
5039
|
+
}): Promise<RezoResponse<T>>;
|
|
5040
|
+
patchForm<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
5004
5041
|
responseType: "text";
|
|
5005
|
-
}): Promise<RezoResponse<
|
|
5042
|
+
}): Promise<RezoResponse<T>>;
|
|
5006
5043
|
patchForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPatchRequest & {
|
|
5007
5044
|
responseType: "arrayBuffer";
|
|
5008
5045
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -5063,15 +5100,15 @@ export interface httpAdapterPatchOverloads {
|
|
|
5063
5100
|
patchMultipart<T = any>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPatchRequest & {
|
|
5064
5101
|
responseType: "auto" | "json";
|
|
5065
5102
|
}): Promise<RezoResponse<T>>;
|
|
5066
|
-
patchMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPatchRequest & {
|
|
5103
|
+
patchMultipart<T extends string = string>(url: string | URL, formData: RezoFormData, options: RezoHttpPatchRequest & {
|
|
5067
5104
|
responseType: "text";
|
|
5068
|
-
}): Promise<RezoResponse<
|
|
5069
|
-
patchMultipart(url: string | URL, formData: FormData, options: RezoHttpPatchRequest & {
|
|
5105
|
+
}): Promise<RezoResponse<T>>;
|
|
5106
|
+
patchMultipart<T extends string = string>(url: string | URL, formData: FormData, options: RezoHttpPatchRequest & {
|
|
5070
5107
|
responseType: "text";
|
|
5071
|
-
}): Promise<RezoResponse<
|
|
5072
|
-
patchMultipart(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPatchRequest & {
|
|
5108
|
+
}): Promise<RezoResponse<T>>;
|
|
5109
|
+
patchMultipart<T extends string = string>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPatchRequest & {
|
|
5073
5110
|
responseType: "text";
|
|
5074
|
-
}): Promise<RezoResponse<
|
|
5111
|
+
}): Promise<RezoResponse<T>>;
|
|
5075
5112
|
patchMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPatchRequest & {
|
|
5076
5113
|
responseType: "stream";
|
|
5077
5114
|
}): RezoStreamResponse;
|
|
@@ -5136,9 +5173,9 @@ export interface httpAdapterPutOverloads {
|
|
|
5136
5173
|
put(url: string | URL, data: any, options: RezoHttpPutRequest & {
|
|
5137
5174
|
responseType: "blob";
|
|
5138
5175
|
}): Promise<RezoResponse<Blob>>;
|
|
5139
|
-
put(url: string | URL, data: any, options: RezoHttpPutRequest & {
|
|
5176
|
+
put<T extends string = string>(url: string | URL, data: any, options: RezoHttpPutRequest & {
|
|
5140
5177
|
responseType: "text";
|
|
5141
|
-
}): Promise<RezoResponse<
|
|
5178
|
+
}): Promise<RezoResponse<T>>;
|
|
5142
5179
|
put(url: string | URL, data: any, options: RezoHttpPutRequest & {
|
|
5143
5180
|
responseType: "download";
|
|
5144
5181
|
}): RezoDownloadResponse;
|
|
@@ -5166,15 +5203,15 @@ export interface httpAdapterPutOverloads {
|
|
|
5166
5203
|
putJson<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
5167
5204
|
responseType: "auto" | "json";
|
|
5168
5205
|
}): Promise<RezoResponse<T>>;
|
|
5169
|
-
putJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPutRequest & {
|
|
5206
|
+
putJson<T extends string = string>(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPutRequest & {
|
|
5170
5207
|
responseType: "text";
|
|
5171
|
-
}): Promise<RezoResponse<
|
|
5172
|
-
putJson(url: string | URL, jsonString: string, options: RezoHttpPutRequest & {
|
|
5208
|
+
}): Promise<RezoResponse<T>>;
|
|
5209
|
+
putJson<T extends string = string>(url: string | URL, jsonString: string, options: RezoHttpPutRequest & {
|
|
5173
5210
|
responseType: "text";
|
|
5174
|
-
}): Promise<RezoResponse<
|
|
5175
|
-
putJson(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
5211
|
+
}): Promise<RezoResponse<T>>;
|
|
5212
|
+
putJson<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
5176
5213
|
responseType: "text";
|
|
5177
|
-
}): Promise<RezoResponse<
|
|
5214
|
+
}): Promise<RezoResponse<T>>;
|
|
5178
5215
|
putJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPutRequest & {
|
|
5179
5216
|
responseType: "arrayBuffer";
|
|
5180
5217
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -5235,15 +5272,15 @@ export interface httpAdapterPutOverloads {
|
|
|
5235
5272
|
putForm<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
5236
5273
|
responseType: "auto" | "json";
|
|
5237
5274
|
}): Promise<RezoResponse<T>>;
|
|
5238
|
-
putForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPutRequest & {
|
|
5275
|
+
putForm<T extends string = string>(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPutRequest & {
|
|
5239
5276
|
responseType: "text";
|
|
5240
|
-
}): Promise<RezoResponse<
|
|
5241
|
-
putForm(url: string | URL, string: string, options: RezoHttpPutRequest & {
|
|
5277
|
+
}): Promise<RezoResponse<T>>;
|
|
5278
|
+
putForm<T extends string = string>(url: string | URL, string: string, options: RezoHttpPutRequest & {
|
|
5242
5279
|
responseType: "text";
|
|
5243
|
-
}): Promise<RezoResponse<
|
|
5244
|
-
putForm(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
5280
|
+
}): Promise<RezoResponse<T>>;
|
|
5281
|
+
putForm<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
5245
5282
|
responseType: "text";
|
|
5246
|
-
}): Promise<RezoResponse<
|
|
5283
|
+
}): Promise<RezoResponse<T>>;
|
|
5247
5284
|
putForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPutRequest & {
|
|
5248
5285
|
responseType: "arrayBuffer";
|
|
5249
5286
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -5304,15 +5341,15 @@ export interface httpAdapterPutOverloads {
|
|
|
5304
5341
|
putMultipart<T = any>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPutRequest & {
|
|
5305
5342
|
responseType: "auto" | "json";
|
|
5306
5343
|
}): Promise<RezoResponse<T>>;
|
|
5307
|
-
putMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPutRequest & {
|
|
5344
|
+
putMultipart<T extends string = string>(url: string | URL, formData: RezoFormData, options: RezoHttpPutRequest & {
|
|
5308
5345
|
responseType: "text";
|
|
5309
|
-
}): Promise<RezoResponse<
|
|
5310
|
-
putMultipart(url: string | URL, formData: FormData, options: RezoHttpPutRequest & {
|
|
5346
|
+
}): Promise<RezoResponse<T>>;
|
|
5347
|
+
putMultipart<T extends string = string>(url: string | URL, formData: FormData, options: RezoHttpPutRequest & {
|
|
5311
5348
|
responseType: "text";
|
|
5312
|
-
}): Promise<RezoResponse<
|
|
5313
|
-
putMultipart(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPutRequest & {
|
|
5349
|
+
}): Promise<RezoResponse<T>>;
|
|
5350
|
+
putMultipart<T extends string = string>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPutRequest & {
|
|
5314
5351
|
responseType: "text";
|
|
5315
|
-
}): Promise<RezoResponse<
|
|
5352
|
+
}): Promise<RezoResponse<T>>;
|
|
5316
5353
|
putMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPutRequest & {
|
|
5317
5354
|
responseType: "stream";
|
|
5318
5355
|
}): RezoStreamResponse;
|
|
@@ -6061,7 +6098,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
6061
6098
|
*
|
|
6062
6099
|
* IMPORTANT: Update these values when bumping package version.
|
|
6063
6100
|
*/
|
|
6064
|
-
export declare const VERSION = "1.0.
|
|
6101
|
+
export declare const VERSION = "1.0.138";
|
|
6065
6102
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
6066
6103
|
export declare const Cancel: typeof RezoError;
|
|
6067
6104
|
export declare const CancelToken: {
|