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
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
-
Enterprise-grade HTTP client for Node.js 22+, Bun, Deno, browsers, React Native, and edge runtimes. One API everywhere — HTTP/2, cookies, proxy rotation, stealth mode, web crawling, and
|
|
26
|
+
Enterprise-grade HTTP client for Node.js 22+, Bun, Deno, browsers, React Native, and edge runtimes. One API everywhere — HTTP/2, cookies, proxy rotation, stealth mode, web crawling, and 60+ structured error codes out of the box.
|
|
27
27
|
|
|
28
28
|
## Install
|
|
29
29
|
|
|
@@ -73,7 +73,7 @@ const { data: posts } = await client.get('/posts');
|
|
|
73
73
|
<td>Full request lifecycle — DNS, TLS, redirects, retries, cookies, proxies</td>
|
|
74
74
|
</tr>
|
|
75
75
|
<tr>
|
|
76
|
-
<td><strong>
|
|
76
|
+
<td><strong>60+ Error Codes</strong></td>
|
|
77
77
|
<td>Structured errors with boolean flags and recovery suggestions</td>
|
|
78
78
|
</tr>
|
|
79
79
|
</table>
|
|
@@ -119,7 +119,7 @@ const client = rezo.create({
|
|
|
119
119
|
stealth: RezoStealth.chrome(),
|
|
120
120
|
proxyManager: {
|
|
121
121
|
proxies: ['socks5://proxy1:1080', 'http://proxy2:8080'],
|
|
122
|
-
rotation:
|
|
122
|
+
rotation: 'random',
|
|
123
123
|
autoDisableDeadProxies: true
|
|
124
124
|
}
|
|
125
125
|
});
|
|
@@ -4,7 +4,7 @@ import { Agent as HttpsAgent } from 'node:https';
|
|
|
4
4
|
import { Socket } from 'node:net';
|
|
5
5
|
import { Readable, Writable, WritableOptions } from 'node:stream';
|
|
6
6
|
import { SecureContext, TLSSocket } from 'node:tls';
|
|
7
|
-
import { Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieJarOptions, CreateCookieOptions, Nullable, Store } from 'tough-cookie';
|
|
7
|
+
import { Callback, Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieJarOptions, CreateCookieOptions, GetCookiesOptions, Nullable, SerializedCookieJar, SetCookieOptions, Store } from 'tough-cookie';
|
|
8
8
|
|
|
9
9
|
export declare class Cookie extends TouchCookie {
|
|
10
10
|
constructor(options?: CreateCookieOptions);
|
|
@@ -67,6 +67,38 @@ export declare class RezoCookieJar extends TouchCookieJar {
|
|
|
67
67
|
constructor(cookies: Cookie[], url: string);
|
|
68
68
|
constructor(store: Nullable<Store>, options?: CreateCookieJarOptions | boolean);
|
|
69
69
|
private generateCookies;
|
|
70
|
+
setCookieSync(cookie: string | Cookie, url: string, options?: SetCookieOptions): Cookie | undefined;
|
|
71
|
+
setCookie(cookie: string | TouchCookie, url: string | URL, callback: Callback<TouchCookie | undefined>): void;
|
|
72
|
+
setCookie(cookie: string | TouchCookie, url: string | URL, options: SetCookieOptions, callback: Callback<TouchCookie | undefined>): void;
|
|
73
|
+
setCookie(cookie: string | TouchCookie, url: string | URL, options?: SetCookieOptions): Promise<TouchCookie | undefined>;
|
|
74
|
+
setCookie(cookie: string | TouchCookie, url: string | URL, options: SetCookieOptions | Callback<TouchCookie | undefined>, callback?: Callback<TouchCookie | undefined>): unknown;
|
|
75
|
+
getCookies(url: string, callback: Callback<TouchCookie[]>): void;
|
|
76
|
+
getCookies(url: string | URL, options: GetCookiesOptions | undefined, callback: Callback<TouchCookie[]>): void;
|
|
77
|
+
getCookies(url: string | URL, options?: GetCookiesOptions): Promise<TouchCookie[]>;
|
|
78
|
+
getCookies(url: string | URL, options: GetCookiesOptions | undefined | Callback<TouchCookie[]>, callback?: Callback<TouchCookie[]>): unknown;
|
|
79
|
+
getCookiesSync(url: string, options?: GetCookiesOptions): Cookie[];
|
|
80
|
+
getCookieString(url: string, callback: Callback<string | undefined>): void;
|
|
81
|
+
getCookieString(url: string, options: GetCookiesOptions, callback: Callback<string | undefined>): void;
|
|
82
|
+
getCookieString(url: string, options?: GetCookiesOptions): Promise<string>;
|
|
83
|
+
getCookieString(url: string, options: GetCookiesOptions | Callback<string | undefined>, callback?: Callback<string | undefined>): unknown;
|
|
84
|
+
getCookieStringSync(url: string, options?: GetCookiesOptions): string;
|
|
85
|
+
getSetCookieStrings(url: string, callback: Callback<string[] | undefined>): void;
|
|
86
|
+
getSetCookieStrings(url: string, options: GetCookiesOptions, callback: Callback<string[] | undefined>): void;
|
|
87
|
+
getSetCookieStrings(url: string, options?: GetCookiesOptions): Promise<string[] | undefined>;
|
|
88
|
+
getSetCookieStrings(url: string, options: GetCookiesOptions, callback?: Callback<string[] | undefined>): unknown;
|
|
89
|
+
getSetCookieStringsSync(url: string, options?: GetCookiesOptions): string[];
|
|
90
|
+
serialize(callback: Callback<SerializedCookieJar>): void;
|
|
91
|
+
serialize(): Promise<SerializedCookieJar>;
|
|
92
|
+
serializeSync(): SerializedCookieJar | undefined;
|
|
93
|
+
toJSON(): ReturnType<TouchCookieJar["toJSON"]>;
|
|
94
|
+
private toPublicSerializedJar;
|
|
95
|
+
private toStoredCookie;
|
|
96
|
+
private toPublicCookies;
|
|
97
|
+
private toPublicCookie;
|
|
98
|
+
private toStoredCookieKey;
|
|
99
|
+
private toPublicCookieKey;
|
|
100
|
+
private cookiesToCookieString;
|
|
101
|
+
private cookiesToSetCookieStrings;
|
|
70
102
|
/**
|
|
71
103
|
* Get all cookies from the cookie jar.
|
|
72
104
|
*
|
|
@@ -317,6 +349,9 @@ export declare class RezoHeaders extends Headers {
|
|
|
317
349
|
* Used by stealth adapters to match browser header ordering.
|
|
318
350
|
*/
|
|
319
351
|
toOrderedObject(order: string[]): Record<string, string | string[]>;
|
|
352
|
+
toJSON(): Record<string, string> & {
|
|
353
|
+
"set-cookie"?: string[];
|
|
354
|
+
};
|
|
320
355
|
toObject(omit?: Array<keyof RezoHttpHeaders> | keyof RezoHttpHeaders): Record<string, string | string[]>;
|
|
321
356
|
toString(): string;
|
|
322
357
|
set(name: keyof RezoHttpHeaders, value: string): void;
|
|
@@ -2741,34 +2776,36 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2741
2776
|
* TLS negotiation for HTTPS).
|
|
2742
2777
|
*
|
|
2743
2778
|
* **Behavior:**
|
|
2744
|
-
* - `
|
|
2745
|
-
*
|
|
2779
|
+
* - `true` (default) - Connections are pooled and reused across requests to the
|
|
2780
|
+
* same host. Idle pooled sockets are closed after ~5 seconds.
|
|
2781
|
+
* - `false` - A fresh connection is opened for every request and closed after
|
|
2782
|
+
* the response. No pooling, no reuse.
|
|
2746
2783
|
*
|
|
2747
|
-
* **When to
|
|
2784
|
+
* **When to keep the default (`keepAlive: true`):**
|
|
2748
2785
|
* - Making multiple requests to the same host in sequence
|
|
2749
2786
|
* - Long-running applications (servers, bots, scrapers)
|
|
2750
2787
|
* - Performance-critical applications where connection overhead matters
|
|
2751
2788
|
*
|
|
2752
|
-
* **When to use `keepAlive: false
|
|
2753
|
-
* -
|
|
2754
|
-
* -
|
|
2755
|
-
* -
|
|
2789
|
+
* **When to use `keepAlive: false`:**
|
|
2790
|
+
* - Hosts that reset reused connections aggressively
|
|
2791
|
+
* - Debugging connection-level issues (isolates every request)
|
|
2792
|
+
* - One-off requests where connection reuse buys nothing
|
|
2756
2793
|
*
|
|
2757
2794
|
* @example
|
|
2758
2795
|
* ```typescript
|
|
2759
|
-
* // Default:
|
|
2796
|
+
* // Default: pooled keep-alive connections
|
|
2760
2797
|
* const { data } = await rezo.get('https://api.example.com/data');
|
|
2761
2798
|
*
|
|
2762
|
-
* //
|
|
2763
|
-
* const client =
|
|
2799
|
+
* // Fresh connection per request for this instance
|
|
2800
|
+
* const client = rezo.create({ keepAlive: false });
|
|
2764
2801
|
* await client.get('https://api.example.com/users');
|
|
2765
|
-
* await client.get('https://api.example.com/posts'); //
|
|
2802
|
+
* await client.get('https://api.example.com/posts'); // New connection again
|
|
2766
2803
|
*
|
|
2767
|
-
* //
|
|
2768
|
-
*
|
|
2804
|
+
* // Or per request
|
|
2805
|
+
* await rezo.get('https://api.example.com/data', { keepAlive: false });
|
|
2769
2806
|
* ```
|
|
2770
2807
|
*
|
|
2771
|
-
* @default
|
|
2808
|
+
* @default true
|
|
2772
2809
|
*/
|
|
2773
2810
|
keepAlive?: boolean;
|
|
2774
2811
|
/**
|
|
@@ -7002,9 +7039,9 @@ export interface httpAdapterOverloads {
|
|
|
7002
7039
|
request(options: RezoRequestOptions & {
|
|
7003
7040
|
responseType: "blob";
|
|
7004
7041
|
}): Promise<RezoResponse<Blob>>;
|
|
7005
|
-
request(options: RezoRequestOptions & {
|
|
7042
|
+
request<T extends string = string>(options: RezoRequestOptions & {
|
|
7006
7043
|
responseType: "text";
|
|
7007
|
-
}): Promise<RezoResponse<
|
|
7044
|
+
}): Promise<RezoResponse<T>>;
|
|
7008
7045
|
request(options: RezoRequestOptions & {
|
|
7009
7046
|
responseType: "download";
|
|
7010
7047
|
}): Promise<RezoDownloadResponse>;
|
|
@@ -7034,9 +7071,9 @@ export interface httpAdapterOverloads {
|
|
|
7034
7071
|
get(url: string | URL, options: RezoHttpGetRequest & {
|
|
7035
7072
|
responseType: "blob";
|
|
7036
7073
|
}): Promise<RezoResponse<Blob>>;
|
|
7037
|
-
get(url: string | URL, options: RezoHttpGetRequest & {
|
|
7074
|
+
get<T extends string = string>(url: string | URL, options: RezoHttpGetRequest & {
|
|
7038
7075
|
responseType: "text";
|
|
7039
|
-
}): Promise<RezoResponse<
|
|
7076
|
+
}): Promise<RezoResponse<T>>;
|
|
7040
7077
|
get(url: string | URL, options: RezoHttpGetRequest & {
|
|
7041
7078
|
responseType: "download";
|
|
7042
7079
|
}): Promise<RezoDownloadResponse>;
|
|
@@ -7068,9 +7105,9 @@ export interface httpAdapterOverloads {
|
|
|
7068
7105
|
delete(url: string | URL, options: RezoHttpDeleteRequest & {
|
|
7069
7106
|
responseType: "blob";
|
|
7070
7107
|
}): Promise<RezoResponse<Blob>>;
|
|
7071
|
-
delete(url: string | URL, options: RezoHttpDeleteRequest & {
|
|
7108
|
+
delete<T extends string = string>(url: string | URL, options: RezoHttpDeleteRequest & {
|
|
7072
7109
|
responseType: "text";
|
|
7073
|
-
}): Promise<RezoResponse<
|
|
7110
|
+
}): Promise<RezoResponse<T>>;
|
|
7074
7111
|
delete(url: string | URL, options: RezoHttpDeleteRequest & {
|
|
7075
7112
|
responseType: "download";
|
|
7076
7113
|
}): Promise<RezoDownloadResponse>;
|
|
@@ -7157,9 +7194,9 @@ export interface httpAdapterPostOverloads {
|
|
|
7157
7194
|
post(url: string | URL, data: any, options: RezoHttpPostRequest & {
|
|
7158
7195
|
responseType: "blob";
|
|
7159
7196
|
}): Promise<RezoResponse<Blob>>;
|
|
7160
|
-
post(url: string | URL, data: any, options: RezoHttpPostRequest & {
|
|
7197
|
+
post<T extends string = string>(url: string | URL, data: any, options: RezoHttpPostRequest & {
|
|
7161
7198
|
responseType: "text";
|
|
7162
|
-
}): Promise<RezoResponse<
|
|
7199
|
+
}): Promise<RezoResponse<T>>;
|
|
7163
7200
|
post(url: string | URL, data: any, options: RezoHttpPostRequest & {
|
|
7164
7201
|
responseType: "download";
|
|
7165
7202
|
}): Promise<RezoDownloadResponse>;
|
|
@@ -7187,15 +7224,15 @@ export interface httpAdapterPostOverloads {
|
|
|
7187
7224
|
postJson<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
7188
7225
|
responseType: "auto" | "json";
|
|
7189
7226
|
}): Promise<RezoResponse<T>>;
|
|
7190
|
-
postJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPostRequest & {
|
|
7227
|
+
postJson<T extends string = string>(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPostRequest & {
|
|
7191
7228
|
responseType: "text";
|
|
7192
|
-
}): Promise<RezoResponse<
|
|
7193
|
-
postJson(url: string | URL, jsonString: string, options: RezoHttpPostRequest & {
|
|
7229
|
+
}): Promise<RezoResponse<T>>;
|
|
7230
|
+
postJson<T extends string = string>(url: string | URL, jsonString: string, options: RezoHttpPostRequest & {
|
|
7194
7231
|
responseType: "text";
|
|
7195
|
-
}): Promise<RezoResponse<
|
|
7196
|
-
postJson(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
7232
|
+
}): Promise<RezoResponse<T>>;
|
|
7233
|
+
postJson<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
7197
7234
|
responseType: "text";
|
|
7198
|
-
}): Promise<RezoResponse<
|
|
7235
|
+
}): Promise<RezoResponse<T>>;
|
|
7199
7236
|
postJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPostRequest & {
|
|
7200
7237
|
responseType: "arrayBuffer";
|
|
7201
7238
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -7247,15 +7284,15 @@ export interface httpAdapterPostOverloads {
|
|
|
7247
7284
|
postForm<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
7248
7285
|
responseType: "auto" | "json";
|
|
7249
7286
|
}): Promise<RezoResponse<T>>;
|
|
7250
|
-
postForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPostRequest & {
|
|
7287
|
+
postForm<T extends string = string>(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPostRequest & {
|
|
7251
7288
|
responseType: "text";
|
|
7252
|
-
}): Promise<RezoResponse<
|
|
7253
|
-
postForm(url: string | URL, string: string, options: RezoHttpPostRequest & {
|
|
7289
|
+
}): Promise<RezoResponse<T>>;
|
|
7290
|
+
postForm<T extends string = string>(url: string | URL, string: string, options: RezoHttpPostRequest & {
|
|
7254
7291
|
responseType: "text";
|
|
7255
|
-
}): Promise<RezoResponse<
|
|
7256
|
-
postForm(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
7292
|
+
}): Promise<RezoResponse<T>>;
|
|
7293
|
+
postForm<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
|
|
7257
7294
|
responseType: "text";
|
|
7258
|
-
}): Promise<RezoResponse<
|
|
7295
|
+
}): Promise<RezoResponse<T>>;
|
|
7259
7296
|
postForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPostRequest & {
|
|
7260
7297
|
responseType: "arrayBuffer";
|
|
7261
7298
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -7316,15 +7353,15 @@ export interface httpAdapterPostOverloads {
|
|
|
7316
7353
|
postMultipart<T = any>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPostRequest & {
|
|
7317
7354
|
responseType: "json";
|
|
7318
7355
|
}): Promise<RezoResponse<T>>;
|
|
7319
|
-
postMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPostRequest & {
|
|
7356
|
+
postMultipart<T extends string = string>(url: string | URL, formData: RezoFormData, options: RezoHttpPostRequest & {
|
|
7320
7357
|
responseType: "text";
|
|
7321
|
-
}): Promise<RezoResponse<
|
|
7322
|
-
postMultipart(url: string | URL, formData: FormData, options: RezoHttpPostRequest & {
|
|
7358
|
+
}): Promise<RezoResponse<T>>;
|
|
7359
|
+
postMultipart<T extends string = string>(url: string | URL, formData: FormData, options: RezoHttpPostRequest & {
|
|
7323
7360
|
responseType: "text";
|
|
7324
|
-
}): Promise<RezoResponse<
|
|
7325
|
-
postMultipart(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPostRequest & {
|
|
7361
|
+
}): Promise<RezoResponse<T>>;
|
|
7362
|
+
postMultipart<T extends string = string>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPostRequest & {
|
|
7326
7363
|
responseType: "text";
|
|
7327
|
-
}): Promise<RezoResponse<
|
|
7364
|
+
}): Promise<RezoResponse<T>>;
|
|
7328
7365
|
postMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPostRequest & {
|
|
7329
7366
|
responseType: "stream";
|
|
7330
7367
|
}): Promise<RezoStreamResponse>;
|
|
@@ -7380,9 +7417,9 @@ export interface httpAdapterPatchOverloads {
|
|
|
7380
7417
|
patch(url: string | URL, data: any, options: RezoHttpPatchRequest & {
|
|
7381
7418
|
responseType: "blob";
|
|
7382
7419
|
}): Promise<RezoResponse<Blob>>;
|
|
7383
|
-
patch(url: string | URL, data: any, options: RezoHttpPatchRequest & {
|
|
7420
|
+
patch<T extends string = string>(url: string | URL, data: any, options: RezoHttpPatchRequest & {
|
|
7384
7421
|
responseType: "text";
|
|
7385
|
-
}): Promise<RezoResponse<
|
|
7422
|
+
}): Promise<RezoResponse<T>>;
|
|
7386
7423
|
patch(url: string | URL, data: any, options: RezoHttpPatchRequest & {
|
|
7387
7424
|
responseType: "download";
|
|
7388
7425
|
}): RezoDownloadResponse;
|
|
@@ -7410,15 +7447,15 @@ export interface httpAdapterPatchOverloads {
|
|
|
7410
7447
|
patchJson<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
7411
7448
|
responseType: "auto" | "json";
|
|
7412
7449
|
}): Promise<RezoResponse<T>>;
|
|
7413
|
-
patchJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPatchRequest & {
|
|
7450
|
+
patchJson<T extends string = string>(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPatchRequest & {
|
|
7414
7451
|
responseType: "text";
|
|
7415
|
-
}): Promise<RezoResponse<
|
|
7416
|
-
patchJson(url: string | URL, jsonString: string, options: RezoHttpPatchRequest & {
|
|
7452
|
+
}): Promise<RezoResponse<T>>;
|
|
7453
|
+
patchJson<T extends string = string>(url: string | URL, jsonString: string, options: RezoHttpPatchRequest & {
|
|
7417
7454
|
responseType: "text";
|
|
7418
|
-
}): Promise<RezoResponse<
|
|
7419
|
-
patchJson(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
7455
|
+
}): Promise<RezoResponse<T>>;
|
|
7456
|
+
patchJson<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
7420
7457
|
responseType: "text";
|
|
7421
|
-
}): Promise<RezoResponse<
|
|
7458
|
+
}): Promise<RezoResponse<T>>;
|
|
7422
7459
|
patchJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPatchRequest & {
|
|
7423
7460
|
responseType: "arrayBuffer";
|
|
7424
7461
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -7479,15 +7516,15 @@ export interface httpAdapterPatchOverloads {
|
|
|
7479
7516
|
patchForm<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
7480
7517
|
responseType: "auto" | "json";
|
|
7481
7518
|
}): Promise<RezoResponse<T>>;
|
|
7482
|
-
patchForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPatchRequest & {
|
|
7519
|
+
patchForm<T extends string = string>(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPatchRequest & {
|
|
7483
7520
|
responseType: "text";
|
|
7484
|
-
}): Promise<RezoResponse<
|
|
7485
|
-
patchForm(url: string | URL, string: string, options: RezoHttpPatchRequest & {
|
|
7521
|
+
}): Promise<RezoResponse<T>>;
|
|
7522
|
+
patchForm<T extends string = string>(url: string | URL, string: string, options: RezoHttpPatchRequest & {
|
|
7486
7523
|
responseType: "text";
|
|
7487
|
-
}): Promise<RezoResponse<
|
|
7488
|
-
patchForm(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
7524
|
+
}): Promise<RezoResponse<T>>;
|
|
7525
|
+
patchForm<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
|
|
7489
7526
|
responseType: "text";
|
|
7490
|
-
}): Promise<RezoResponse<
|
|
7527
|
+
}): Promise<RezoResponse<T>>;
|
|
7491
7528
|
patchForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPatchRequest & {
|
|
7492
7529
|
responseType: "arrayBuffer";
|
|
7493
7530
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -7548,15 +7585,15 @@ export interface httpAdapterPatchOverloads {
|
|
|
7548
7585
|
patchMultipart<T = any>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPatchRequest & {
|
|
7549
7586
|
responseType: "auto" | "json";
|
|
7550
7587
|
}): Promise<RezoResponse<T>>;
|
|
7551
|
-
patchMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPatchRequest & {
|
|
7588
|
+
patchMultipart<T extends string = string>(url: string | URL, formData: RezoFormData, options: RezoHttpPatchRequest & {
|
|
7552
7589
|
responseType: "text";
|
|
7553
|
-
}): Promise<RezoResponse<
|
|
7554
|
-
patchMultipart(url: string | URL, formData: FormData, options: RezoHttpPatchRequest & {
|
|
7590
|
+
}): Promise<RezoResponse<T>>;
|
|
7591
|
+
patchMultipart<T extends string = string>(url: string | URL, formData: FormData, options: RezoHttpPatchRequest & {
|
|
7555
7592
|
responseType: "text";
|
|
7556
|
-
}): Promise<RezoResponse<
|
|
7557
|
-
patchMultipart(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPatchRequest & {
|
|
7593
|
+
}): Promise<RezoResponse<T>>;
|
|
7594
|
+
patchMultipart<T extends string = string>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPatchRequest & {
|
|
7558
7595
|
responseType: "text";
|
|
7559
|
-
}): Promise<RezoResponse<
|
|
7596
|
+
}): Promise<RezoResponse<T>>;
|
|
7560
7597
|
patchMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPatchRequest & {
|
|
7561
7598
|
responseType: "stream";
|
|
7562
7599
|
}): RezoStreamResponse;
|
|
@@ -7621,9 +7658,9 @@ export interface httpAdapterPutOverloads {
|
|
|
7621
7658
|
put(url: string | URL, data: any, options: RezoHttpPutRequest & {
|
|
7622
7659
|
responseType: "blob";
|
|
7623
7660
|
}): Promise<RezoResponse<Blob>>;
|
|
7624
|
-
put(url: string | URL, data: any, options: RezoHttpPutRequest & {
|
|
7661
|
+
put<T extends string = string>(url: string | URL, data: any, options: RezoHttpPutRequest & {
|
|
7625
7662
|
responseType: "text";
|
|
7626
|
-
}): Promise<RezoResponse<
|
|
7663
|
+
}): Promise<RezoResponse<T>>;
|
|
7627
7664
|
put(url: string | URL, data: any, options: RezoHttpPutRequest & {
|
|
7628
7665
|
responseType: "download";
|
|
7629
7666
|
}): RezoDownloadResponse;
|
|
@@ -7651,15 +7688,15 @@ export interface httpAdapterPutOverloads {
|
|
|
7651
7688
|
putJson<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
7652
7689
|
responseType: "auto" | "json";
|
|
7653
7690
|
}): Promise<RezoResponse<T>>;
|
|
7654
|
-
putJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPutRequest & {
|
|
7691
|
+
putJson<T extends string = string>(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPutRequest & {
|
|
7655
7692
|
responseType: "text";
|
|
7656
|
-
}): Promise<RezoResponse<
|
|
7657
|
-
putJson(url: string | URL, jsonString: string, options: RezoHttpPutRequest & {
|
|
7693
|
+
}): Promise<RezoResponse<T>>;
|
|
7694
|
+
putJson<T extends string = string>(url: string | URL, jsonString: string, options: RezoHttpPutRequest & {
|
|
7658
7695
|
responseType: "text";
|
|
7659
|
-
}): Promise<RezoResponse<
|
|
7660
|
-
putJson(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
7696
|
+
}): Promise<RezoResponse<T>>;
|
|
7697
|
+
putJson<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
7661
7698
|
responseType: "text";
|
|
7662
|
-
}): Promise<RezoResponse<
|
|
7699
|
+
}): Promise<RezoResponse<T>>;
|
|
7663
7700
|
putJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPutRequest & {
|
|
7664
7701
|
responseType: "arrayBuffer";
|
|
7665
7702
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -7720,15 +7757,15 @@ export interface httpAdapterPutOverloads {
|
|
|
7720
7757
|
putForm<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
7721
7758
|
responseType: "auto" | "json";
|
|
7722
7759
|
}): Promise<RezoResponse<T>>;
|
|
7723
|
-
putForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPutRequest & {
|
|
7760
|
+
putForm<T extends string = string>(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPutRequest & {
|
|
7724
7761
|
responseType: "text";
|
|
7725
|
-
}): Promise<RezoResponse<
|
|
7726
|
-
putForm(url: string | URL, string: string, options: RezoHttpPutRequest & {
|
|
7762
|
+
}): Promise<RezoResponse<T>>;
|
|
7763
|
+
putForm<T extends string = string>(url: string | URL, string: string, options: RezoHttpPutRequest & {
|
|
7727
7764
|
responseType: "text";
|
|
7728
|
-
}): Promise<RezoResponse<
|
|
7729
|
-
putForm(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
7765
|
+
}): Promise<RezoResponse<T>>;
|
|
7766
|
+
putForm<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
|
|
7730
7767
|
responseType: "text";
|
|
7731
|
-
}): Promise<RezoResponse<
|
|
7768
|
+
}): Promise<RezoResponse<T>>;
|
|
7732
7769
|
putForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPutRequest & {
|
|
7733
7770
|
responseType: "arrayBuffer";
|
|
7734
7771
|
}): Promise<RezoResponse<ArrayBuffer>>;
|
|
@@ -7789,15 +7826,15 @@ export interface httpAdapterPutOverloads {
|
|
|
7789
7826
|
putMultipart<T = any>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPutRequest & {
|
|
7790
7827
|
responseType: "auto" | "json";
|
|
7791
7828
|
}): Promise<RezoResponse<T>>;
|
|
7792
|
-
putMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPutRequest & {
|
|
7829
|
+
putMultipart<T extends string = string>(url: string | URL, formData: RezoFormData, options: RezoHttpPutRequest & {
|
|
7793
7830
|
responseType: "text";
|
|
7794
|
-
}): Promise<RezoResponse<
|
|
7795
|
-
putMultipart(url: string | URL, formData: FormData, options: RezoHttpPutRequest & {
|
|
7831
|
+
}): Promise<RezoResponse<T>>;
|
|
7832
|
+
putMultipart<T extends string = string>(url: string | URL, formData: FormData, options: RezoHttpPutRequest & {
|
|
7796
7833
|
responseType: "text";
|
|
7797
|
-
}): Promise<RezoResponse<
|
|
7798
|
-
putMultipart(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPutRequest & {
|
|
7834
|
+
}): Promise<RezoResponse<T>>;
|
|
7835
|
+
putMultipart<T extends string = string>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPutRequest & {
|
|
7799
7836
|
responseType: "text";
|
|
7800
|
-
}): Promise<RezoResponse<
|
|
7837
|
+
}): Promise<RezoResponse<T>>;
|
|
7801
7838
|
putMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPutRequest & {
|
|
7802
7839
|
responseType: "stream";
|
|
7803
7840
|
}): RezoStreamResponse;
|
|
@@ -8546,7 +8583,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
8546
8583
|
*
|
|
8547
8584
|
* IMPORTANT: Update these values when bumping package version.
|
|
8548
8585
|
*/
|
|
8549
|
-
export declare const VERSION = "1.0.
|
|
8586
|
+
export declare const VERSION = "1.0.138";
|
|
8550
8587
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
8551
8588
|
export declare const Cancel: typeof RezoError;
|
|
8552
8589
|
export declare const CancelToken: {
|