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.
Files changed (50) hide show
  1. package/README.md +3 -3
  2. package/dist/adapters/entries/curl.d.ts +119 -82
  3. package/dist/adapters/entries/fetch.d.ts +119 -82
  4. package/dist/adapters/entries/http.d.ts +119 -82
  5. package/dist/adapters/entries/http2.d.ts +119 -82
  6. package/dist/adapters/entries/react-native.cjs +6 -6
  7. package/dist/adapters/entries/react-native.d.ts +119 -82
  8. package/dist/adapters/entries/xhr.d.ts +119 -82
  9. package/dist/adapters/http.cjs +26 -0
  10. package/dist/adapters/http.js +26 -0
  11. package/dist/adapters/index.cjs +10 -10
  12. package/dist/adapters/index.d.ts +52 -15
  13. package/dist/cache/index.cjs +9 -9
  14. package/dist/cookies/cookie-jar.cjs +154 -9
  15. package/dist/cookies/cookie-jar.js +150 -5
  16. package/dist/cookies/index.cjs +10 -10
  17. package/dist/crawler/index.cjs +42 -42
  18. package/dist/crawler/plugin/index.cjs +1 -1
  19. package/dist/crawler.d.ts +118 -81
  20. package/dist/entries/crawler.cjs +24 -24
  21. package/dist/errors/rezo-error.cjs +3 -2
  22. package/dist/errors/rezo-error.js +3 -2
  23. package/dist/index.cjs +58 -58
  24. package/dist/index.d.ts +119 -82
  25. package/dist/internal/agents/index.cjs +14 -14
  26. package/dist/platform/browser.d.ts +119 -82
  27. package/dist/platform/bun.d.ts +119 -82
  28. package/dist/platform/deno.d.ts +119 -82
  29. package/dist/platform/node.d.ts +119 -82
  30. package/dist/platform/react-native.cjs +6 -6
  31. package/dist/platform/react-native.d.ts +119 -82
  32. package/dist/platform/worker.d.ts +119 -82
  33. package/dist/proxy/index.cjs +4 -4
  34. package/dist/queue/index.cjs +8 -8
  35. package/dist/responses/universal/index.cjs +11 -11
  36. package/dist/stealth/index.cjs +17 -17
  37. package/dist/stealth/profiles/index.cjs +10 -10
  38. package/dist/utils/agent-pool.cjs +1 -1
  39. package/dist/utils/agent-pool.js +1 -1
  40. package/dist/utils/headers.cjs +3 -0
  41. package/dist/utils/headers.js +3 -0
  42. package/dist/utils/http-config.cjs +15 -2
  43. package/dist/utils/http-config.js +15 -2
  44. package/dist/utils/staged-timeout.cjs +1 -2
  45. package/dist/utils/staged-timeout.js +1 -2
  46. package/dist/version.cjs +1 -1
  47. package/dist/version.js +1 -1
  48. package/dist/wget/index.cjs +51 -51
  49. package/dist/wget/index.d.ts +118 -81
  50. package/package.json +1 -1
@@ -3,7 +3,7 @@ import * as http2 from 'node:http2';
3
3
  import { Agent as HttpsAgent } from 'node:https';
4
4
  import { Socket } from 'node:net';
5
5
  import { SecureContext, TLSSocket } from 'node:tls';
6
- import { Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieJarOptions, CreateCookieOptions, Nullable, Store } from 'tough-cookie';
6
+ import { Callback, Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieJarOptions, CreateCookieOptions, GetCookiesOptions, Nullable, SerializedCookieJar, SetCookieOptions, Store } from 'tough-cookie';
7
7
 
8
8
  export interface RezoHttpHeaders {
9
9
  accept?: string | undefined;
@@ -138,6 +138,9 @@ export declare class RezoHeaders extends Headers {
138
138
  * Used by stealth adapters to match browser header ordering.
139
139
  */
140
140
  toOrderedObject(order: string[]): Record<string, string | string[]>;
141
+ toJSON(): Record<string, string> & {
142
+ "set-cookie"?: string[];
143
+ };
141
144
  toObject(omit?: Array<keyof RezoHttpHeaders> | keyof RezoHttpHeaders): Record<string, string | string[]>;
142
145
  toString(): string;
143
146
  set(name: keyof RezoHttpHeaders, value: string): void;
@@ -215,6 +218,38 @@ export declare class RezoCookieJar extends TouchCookieJar {
215
218
  constructor(cookies: Cookie[], url: string);
216
219
  constructor(store: Nullable<Store>, options?: CreateCookieJarOptions | boolean);
217
220
  private generateCookies;
221
+ setCookieSync(cookie: string | Cookie, url: string, options?: SetCookieOptions): Cookie | undefined;
222
+ setCookie(cookie: string | TouchCookie, url: string | URL, callback: Callback<TouchCookie | undefined>): void;
223
+ setCookie(cookie: string | TouchCookie, url: string | URL, options: SetCookieOptions, callback: Callback<TouchCookie | undefined>): void;
224
+ setCookie(cookie: string | TouchCookie, url: string | URL, options?: SetCookieOptions): Promise<TouchCookie | undefined>;
225
+ setCookie(cookie: string | TouchCookie, url: string | URL, options: SetCookieOptions | Callback<TouchCookie | undefined>, callback?: Callback<TouchCookie | undefined>): unknown;
226
+ getCookies(url: string, callback: Callback<TouchCookie[]>): void;
227
+ getCookies(url: string | URL, options: GetCookiesOptions | undefined, callback: Callback<TouchCookie[]>): void;
228
+ getCookies(url: string | URL, options?: GetCookiesOptions): Promise<TouchCookie[]>;
229
+ getCookies(url: string | URL, options: GetCookiesOptions | undefined | Callback<TouchCookie[]>, callback?: Callback<TouchCookie[]>): unknown;
230
+ getCookiesSync(url: string, options?: GetCookiesOptions): Cookie[];
231
+ getCookieString(url: string, callback: Callback<string | undefined>): void;
232
+ getCookieString(url: string, options: GetCookiesOptions, callback: Callback<string | undefined>): void;
233
+ getCookieString(url: string, options?: GetCookiesOptions): Promise<string>;
234
+ getCookieString(url: string, options: GetCookiesOptions | Callback<string | undefined>, callback?: Callback<string | undefined>): unknown;
235
+ getCookieStringSync(url: string, options?: GetCookiesOptions): string;
236
+ getSetCookieStrings(url: string, callback: Callback<string[] | undefined>): void;
237
+ getSetCookieStrings(url: string, options: GetCookiesOptions, callback: Callback<string[] | undefined>): void;
238
+ getSetCookieStrings(url: string, options?: GetCookiesOptions): Promise<string[] | undefined>;
239
+ getSetCookieStrings(url: string, options: GetCookiesOptions, callback?: Callback<string[] | undefined>): unknown;
240
+ getSetCookieStringsSync(url: string, options?: GetCookiesOptions): string[];
241
+ serialize(callback: Callback<SerializedCookieJar>): void;
242
+ serialize(): Promise<SerializedCookieJar>;
243
+ serializeSync(): SerializedCookieJar | undefined;
244
+ toJSON(): ReturnType<TouchCookieJar["toJSON"]>;
245
+ private toPublicSerializedJar;
246
+ private toStoredCookie;
247
+ private toPublicCookies;
248
+ private toPublicCookie;
249
+ private toStoredCookieKey;
250
+ private toPublicCookieKey;
251
+ private cookiesToCookieString;
252
+ private cookiesToSetCookieStrings;
218
253
  /**
219
254
  * Get all cookies from the cookie jar.
220
255
  *
@@ -4069,34 +4104,36 @@ export interface RezoRequestConfig<D = any> {
4069
4104
  * TLS negotiation for HTTPS).
4070
4105
  *
4071
4106
  * **Behavior:**
4072
- * - `false` (default) - Connection closes after each request. Process exits immediately.
4073
- * - `true` - Connection stays open for reuse. Idle connections close after `keepAliveMsecs`.
4107
+ * - `true` (default) - Connections are pooled and reused across requests to the
4108
+ * same host. Idle pooled sockets are closed after ~5 seconds.
4109
+ * - `false` - A fresh connection is opened for every request and closed after
4110
+ * the response. No pooling, no reuse.
4074
4111
  *
4075
- * **When to use `keepAlive: true`:**
4112
+ * **When to keep the default (`keepAlive: true`):**
4076
4113
  * - Making multiple requests to the same host in sequence
4077
4114
  * - Long-running applications (servers, bots, scrapers)
4078
4115
  * - Performance-critical applications where connection overhead matters
4079
4116
  *
4080
- * **When to use `keepAlive: false` (default):**
4081
- * - Single requests or scripts that should exit immediately
4082
- * - CLI tools that make one-off requests
4083
- * - When you need predictable process termination
4117
+ * **When to use `keepAlive: false`:**
4118
+ * - Hosts that reset reused connections aggressively
4119
+ * - Debugging connection-level issues (isolates every request)
4120
+ * - One-off requests where connection reuse buys nothing
4084
4121
  *
4085
4122
  * @example
4086
4123
  * ```typescript
4087
- * // Default: process exits immediately after request
4124
+ * // Default: pooled keep-alive connections
4088
4125
  * const { data } = await rezo.get('https://api.example.com/data');
4089
4126
  *
4090
- * // Keep connection alive for 1 minute (default) for subsequent requests
4091
- * const client = new Rezo({ keepAlive: true });
4127
+ * // Fresh connection per request for this instance
4128
+ * const client = rezo.create({ keepAlive: false });
4092
4129
  * await client.get('https://api.example.com/users');
4093
- * await client.get('https://api.example.com/posts'); // Reuses connection
4130
+ * await client.get('https://api.example.com/posts'); // New connection again
4094
4131
  *
4095
- * // Custom keep-alive timeout (30 seconds)
4096
- * const client = new Rezo({ keepAlive: true, keepAliveMsecs: 30000 });
4132
+ * // Or per request
4133
+ * await rezo.get('https://api.example.com/data', { keepAlive: false });
4097
4134
  * ```
4098
4135
  *
4099
- * @default false
4136
+ * @default true
4100
4137
  */
4101
4138
  keepAlive?: boolean;
4102
4139
  /**
@@ -4543,9 +4580,9 @@ export interface httpAdapterOverloads {
4543
4580
  request(options: RezoRequestOptions & {
4544
4581
  responseType: "blob";
4545
4582
  }): Promise<RezoResponse<Blob>>;
4546
- request(options: RezoRequestOptions & {
4583
+ request<T extends string = string>(options: RezoRequestOptions & {
4547
4584
  responseType: "text";
4548
- }): Promise<RezoResponse<string>>;
4585
+ }): Promise<RezoResponse<T>>;
4549
4586
  request(options: RezoRequestOptions & {
4550
4587
  responseType: "download";
4551
4588
  }): Promise<RezoDownloadResponse>;
@@ -4575,9 +4612,9 @@ export interface httpAdapterOverloads {
4575
4612
  get(url: string | URL, options: RezoHttpGetRequest & {
4576
4613
  responseType: "blob";
4577
4614
  }): Promise<RezoResponse<Blob>>;
4578
- get(url: string | URL, options: RezoHttpGetRequest & {
4615
+ get<T extends string = string>(url: string | URL, options: RezoHttpGetRequest & {
4579
4616
  responseType: "text";
4580
- }): Promise<RezoResponse<string>>;
4617
+ }): Promise<RezoResponse<T>>;
4581
4618
  get(url: string | URL, options: RezoHttpGetRequest & {
4582
4619
  responseType: "download";
4583
4620
  }): Promise<RezoDownloadResponse>;
@@ -4609,9 +4646,9 @@ export interface httpAdapterOverloads {
4609
4646
  delete(url: string | URL, options: RezoHttpDeleteRequest & {
4610
4647
  responseType: "blob";
4611
4648
  }): Promise<RezoResponse<Blob>>;
4612
- delete(url: string | URL, options: RezoHttpDeleteRequest & {
4649
+ delete<T extends string = string>(url: string | URL, options: RezoHttpDeleteRequest & {
4613
4650
  responseType: "text";
4614
- }): Promise<RezoResponse<string>>;
4651
+ }): Promise<RezoResponse<T>>;
4615
4652
  delete(url: string | URL, options: RezoHttpDeleteRequest & {
4616
4653
  responseType: "download";
4617
4654
  }): Promise<RezoDownloadResponse>;
@@ -4698,9 +4735,9 @@ export interface httpAdapterPostOverloads {
4698
4735
  post(url: string | URL, data: any, options: RezoHttpPostRequest & {
4699
4736
  responseType: "blob";
4700
4737
  }): Promise<RezoResponse<Blob>>;
4701
- post(url: string | URL, data: any, options: RezoHttpPostRequest & {
4738
+ post<T extends string = string>(url: string | URL, data: any, options: RezoHttpPostRequest & {
4702
4739
  responseType: "text";
4703
- }): Promise<RezoResponse<string>>;
4740
+ }): Promise<RezoResponse<T>>;
4704
4741
  post(url: string | URL, data: any, options: RezoHttpPostRequest & {
4705
4742
  responseType: "download";
4706
4743
  }): Promise<RezoDownloadResponse>;
@@ -4728,15 +4765,15 @@ export interface httpAdapterPostOverloads {
4728
4765
  postJson<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
4729
4766
  responseType: "auto" | "json";
4730
4767
  }): Promise<RezoResponse<T>>;
4731
- postJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPostRequest & {
4768
+ postJson<T extends string = string>(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPostRequest & {
4732
4769
  responseType: "text";
4733
- }): Promise<RezoResponse<string>>;
4734
- postJson(url: string | URL, jsonString: string, options: RezoHttpPostRequest & {
4770
+ }): Promise<RezoResponse<T>>;
4771
+ postJson<T extends string = string>(url: string | URL, jsonString: string, options: RezoHttpPostRequest & {
4735
4772
  responseType: "text";
4736
- }): Promise<RezoResponse<string>>;
4737
- postJson(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
4773
+ }): Promise<RezoResponse<T>>;
4774
+ postJson<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
4738
4775
  responseType: "text";
4739
- }): Promise<RezoResponse<string>>;
4776
+ }): Promise<RezoResponse<T>>;
4740
4777
  postJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPostRequest & {
4741
4778
  responseType: "arrayBuffer";
4742
4779
  }): Promise<RezoResponse<ArrayBuffer>>;
@@ -4788,15 +4825,15 @@ export interface httpAdapterPostOverloads {
4788
4825
  postForm<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
4789
4826
  responseType: "auto" | "json";
4790
4827
  }): Promise<RezoResponse<T>>;
4791
- postForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPostRequest & {
4828
+ postForm<T extends string = string>(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPostRequest & {
4792
4829
  responseType: "text";
4793
- }): Promise<RezoResponse<string>>;
4794
- postForm(url: string | URL, string: string, options: RezoHttpPostRequest & {
4830
+ }): Promise<RezoResponse<T>>;
4831
+ postForm<T extends string = string>(url: string | URL, string: string, options: RezoHttpPostRequest & {
4795
4832
  responseType: "text";
4796
- }): Promise<RezoResponse<string>>;
4797
- postForm(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
4833
+ }): Promise<RezoResponse<T>>;
4834
+ postForm<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
4798
4835
  responseType: "text";
4799
- }): Promise<RezoResponse<string>>;
4836
+ }): Promise<RezoResponse<T>>;
4800
4837
  postForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPostRequest & {
4801
4838
  responseType: "arrayBuffer";
4802
4839
  }): Promise<RezoResponse<ArrayBuffer>>;
@@ -4857,15 +4894,15 @@ export interface httpAdapterPostOverloads {
4857
4894
  postMultipart<T = any>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPostRequest & {
4858
4895
  responseType: "json";
4859
4896
  }): Promise<RezoResponse<T>>;
4860
- postMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPostRequest & {
4897
+ postMultipart<T extends string = string>(url: string | URL, formData: RezoFormData, options: RezoHttpPostRequest & {
4861
4898
  responseType: "text";
4862
- }): Promise<RezoResponse<string>>;
4863
- postMultipart(url: string | URL, formData: FormData, options: RezoHttpPostRequest & {
4899
+ }): Promise<RezoResponse<T>>;
4900
+ postMultipart<T extends string = string>(url: string | URL, formData: FormData, options: RezoHttpPostRequest & {
4864
4901
  responseType: "text";
4865
- }): Promise<RezoResponse<string>>;
4866
- postMultipart(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPostRequest & {
4902
+ }): Promise<RezoResponse<T>>;
4903
+ postMultipart<T extends string = string>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPostRequest & {
4867
4904
  responseType: "text";
4868
- }): Promise<RezoResponse<string>>;
4905
+ }): Promise<RezoResponse<T>>;
4869
4906
  postMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPostRequest & {
4870
4907
  responseType: "stream";
4871
4908
  }): Promise<RezoStreamResponse>;
@@ -4921,9 +4958,9 @@ export interface httpAdapterPatchOverloads {
4921
4958
  patch(url: string | URL, data: any, options: RezoHttpPatchRequest & {
4922
4959
  responseType: "blob";
4923
4960
  }): Promise<RezoResponse<Blob>>;
4924
- patch(url: string | URL, data: any, options: RezoHttpPatchRequest & {
4961
+ patch<T extends string = string>(url: string | URL, data: any, options: RezoHttpPatchRequest & {
4925
4962
  responseType: "text";
4926
- }): Promise<RezoResponse<string>>;
4963
+ }): Promise<RezoResponse<T>>;
4927
4964
  patch(url: string | URL, data: any, options: RezoHttpPatchRequest & {
4928
4965
  responseType: "download";
4929
4966
  }): RezoDownloadResponse;
@@ -4951,15 +4988,15 @@ export interface httpAdapterPatchOverloads {
4951
4988
  patchJson<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
4952
4989
  responseType: "auto" | "json";
4953
4990
  }): Promise<RezoResponse<T>>;
4954
- patchJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPatchRequest & {
4991
+ patchJson<T extends string = string>(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPatchRequest & {
4955
4992
  responseType: "text";
4956
- }): Promise<RezoResponse<string>>;
4957
- patchJson(url: string | URL, jsonString: string, options: RezoHttpPatchRequest & {
4993
+ }): Promise<RezoResponse<T>>;
4994
+ patchJson<T extends string = string>(url: string | URL, jsonString: string, options: RezoHttpPatchRequest & {
4958
4995
  responseType: "text";
4959
- }): Promise<RezoResponse<string>>;
4960
- patchJson(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
4996
+ }): Promise<RezoResponse<T>>;
4997
+ patchJson<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
4961
4998
  responseType: "text";
4962
- }): Promise<RezoResponse<string>>;
4999
+ }): Promise<RezoResponse<T>>;
4963
5000
  patchJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPatchRequest & {
4964
5001
  responseType: "arrayBuffer";
4965
5002
  }): Promise<RezoResponse<ArrayBuffer>>;
@@ -5020,15 +5057,15 @@ export interface httpAdapterPatchOverloads {
5020
5057
  patchForm<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
5021
5058
  responseType: "auto" | "json";
5022
5059
  }): Promise<RezoResponse<T>>;
5023
- patchForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPatchRequest & {
5060
+ patchForm<T extends string = string>(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPatchRequest & {
5024
5061
  responseType: "text";
5025
- }): Promise<RezoResponse<string>>;
5026
- patchForm(url: string | URL, string: string, options: RezoHttpPatchRequest & {
5062
+ }): Promise<RezoResponse<T>>;
5063
+ patchForm<T extends string = string>(url: string | URL, string: string, options: RezoHttpPatchRequest & {
5027
5064
  responseType: "text";
5028
- }): Promise<RezoResponse<string>>;
5029
- patchForm(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
5065
+ }): Promise<RezoResponse<T>>;
5066
+ patchForm<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
5030
5067
  responseType: "text";
5031
- }): Promise<RezoResponse<string>>;
5068
+ }): Promise<RezoResponse<T>>;
5032
5069
  patchForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPatchRequest & {
5033
5070
  responseType: "arrayBuffer";
5034
5071
  }): Promise<RezoResponse<ArrayBuffer>>;
@@ -5089,15 +5126,15 @@ export interface httpAdapterPatchOverloads {
5089
5126
  patchMultipart<T = any>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPatchRequest & {
5090
5127
  responseType: "auto" | "json";
5091
5128
  }): Promise<RezoResponse<T>>;
5092
- patchMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPatchRequest & {
5129
+ patchMultipart<T extends string = string>(url: string | URL, formData: RezoFormData, options: RezoHttpPatchRequest & {
5093
5130
  responseType: "text";
5094
- }): Promise<RezoResponse<string>>;
5095
- patchMultipart(url: string | URL, formData: FormData, options: RezoHttpPatchRequest & {
5131
+ }): Promise<RezoResponse<T>>;
5132
+ patchMultipart<T extends string = string>(url: string | URL, formData: FormData, options: RezoHttpPatchRequest & {
5096
5133
  responseType: "text";
5097
- }): Promise<RezoResponse<string>>;
5098
- patchMultipart(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPatchRequest & {
5134
+ }): Promise<RezoResponse<T>>;
5135
+ patchMultipart<T extends string = string>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPatchRequest & {
5099
5136
  responseType: "text";
5100
- }): Promise<RezoResponse<string>>;
5137
+ }): Promise<RezoResponse<T>>;
5101
5138
  patchMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPatchRequest & {
5102
5139
  responseType: "stream";
5103
5140
  }): RezoStreamResponse;
@@ -5162,9 +5199,9 @@ export interface httpAdapterPutOverloads {
5162
5199
  put(url: string | URL, data: any, options: RezoHttpPutRequest & {
5163
5200
  responseType: "blob";
5164
5201
  }): Promise<RezoResponse<Blob>>;
5165
- put(url: string | URL, data: any, options: RezoHttpPutRequest & {
5202
+ put<T extends string = string>(url: string | URL, data: any, options: RezoHttpPutRequest & {
5166
5203
  responseType: "text";
5167
- }): Promise<RezoResponse<string>>;
5204
+ }): Promise<RezoResponse<T>>;
5168
5205
  put(url: string | URL, data: any, options: RezoHttpPutRequest & {
5169
5206
  responseType: "download";
5170
5207
  }): RezoDownloadResponse;
@@ -5192,15 +5229,15 @@ export interface httpAdapterPutOverloads {
5192
5229
  putJson<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
5193
5230
  responseType: "auto" | "json";
5194
5231
  }): Promise<RezoResponse<T>>;
5195
- putJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPutRequest & {
5232
+ putJson<T extends string = string>(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPutRequest & {
5196
5233
  responseType: "text";
5197
- }): Promise<RezoResponse<string>>;
5198
- putJson(url: string | URL, jsonString: string, options: RezoHttpPutRequest & {
5234
+ }): Promise<RezoResponse<T>>;
5235
+ putJson<T extends string = string>(url: string | URL, jsonString: string, options: RezoHttpPutRequest & {
5199
5236
  responseType: "text";
5200
- }): Promise<RezoResponse<string>>;
5201
- putJson(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
5237
+ }): Promise<RezoResponse<T>>;
5238
+ putJson<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
5202
5239
  responseType: "text";
5203
- }): Promise<RezoResponse<string>>;
5240
+ }): Promise<RezoResponse<T>>;
5204
5241
  putJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPutRequest & {
5205
5242
  responseType: "arrayBuffer";
5206
5243
  }): Promise<RezoResponse<ArrayBuffer>>;
@@ -5261,15 +5298,15 @@ export interface httpAdapterPutOverloads {
5261
5298
  putForm<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
5262
5299
  responseType: "auto" | "json";
5263
5300
  }): Promise<RezoResponse<T>>;
5264
- putForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPutRequest & {
5301
+ putForm<T extends string = string>(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPutRequest & {
5265
5302
  responseType: "text";
5266
- }): Promise<RezoResponse<string>>;
5267
- putForm(url: string | URL, string: string, options: RezoHttpPutRequest & {
5303
+ }): Promise<RezoResponse<T>>;
5304
+ putForm<T extends string = string>(url: string | URL, string: string, options: RezoHttpPutRequest & {
5268
5305
  responseType: "text";
5269
- }): Promise<RezoResponse<string>>;
5270
- putForm(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
5306
+ }): Promise<RezoResponse<T>>;
5307
+ putForm<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
5271
5308
  responseType: "text";
5272
- }): Promise<RezoResponse<string>>;
5309
+ }): Promise<RezoResponse<T>>;
5273
5310
  putForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPutRequest & {
5274
5311
  responseType: "arrayBuffer";
5275
5312
  }): Promise<RezoResponse<ArrayBuffer>>;
@@ -5330,15 +5367,15 @@ export interface httpAdapterPutOverloads {
5330
5367
  putMultipart<T = any>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPutRequest & {
5331
5368
  responseType: "auto" | "json";
5332
5369
  }): Promise<RezoResponse<T>>;
5333
- putMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPutRequest & {
5370
+ putMultipart<T extends string = string>(url: string | URL, formData: RezoFormData, options: RezoHttpPutRequest & {
5334
5371
  responseType: "text";
5335
- }): Promise<RezoResponse<string>>;
5336
- putMultipart(url: string | URL, formData: FormData, options: RezoHttpPutRequest & {
5372
+ }): Promise<RezoResponse<T>>;
5373
+ putMultipart<T extends string = string>(url: string | URL, formData: FormData, options: RezoHttpPutRequest & {
5337
5374
  responseType: "text";
5338
- }): Promise<RezoResponse<string>>;
5339
- putMultipart(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPutRequest & {
5375
+ }): Promise<RezoResponse<T>>;
5376
+ putMultipart<T extends string = string>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPutRequest & {
5340
5377
  responseType: "text";
5341
- }): Promise<RezoResponse<string>>;
5378
+ }): Promise<RezoResponse<T>>;
5342
5379
  putMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPutRequest & {
5343
5380
  responseType: "stream";
5344
5381
  }): RezoStreamResponse;
@@ -6087,7 +6124,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
6087
6124
  *
6088
6125
  * IMPORTANT: Update these values when bumping package version.
6089
6126
  */
6090
- export declare const VERSION = "1.0.136";
6127
+ export declare const VERSION = "1.0.138";
6091
6128
  export declare const isRezoError: typeof RezoError.isRezoError;
6092
6129
  export declare const Cancel: typeof RezoError;
6093
6130
  export declare const CancelToken: {
@@ -6,12 +6,12 @@ const { RezoFormData } = require('../../utils/form-data.cjs');
6
6
  const { RezoCookieJar, Cookie } = require('../../cookies/cookie-jar.cjs');
7
7
  const { createDefaultHooks, mergeHooks } = require('../../core/hooks.cjs');
8
8
  const { VERSION } = require('../../version.cjs');
9
- const _mod_ey8xp8 = require('../../platform/react-native-providers.cjs');
10
- exports.createFetchStreamTransport = _mod_ey8xp8.createFetchStreamTransport;
11
- exports.createExpoFileSystemAdapter = _mod_ey8xp8.createExpoFileSystemAdapter;
12
- exports.createReactNativeFsAdapter = _mod_ey8xp8.createReactNativeFsAdapter;
13
- exports.createNetInfoProvider = _mod_ey8xp8.createNetInfoProvider;
14
- exports.createExpoBackgroundTaskProvider = _mod_ey8xp8.createExpoBackgroundTaskProvider;;
9
+ const _mod_uyu65l = require('../../platform/react-native-providers.cjs');
10
+ exports.createFetchStreamTransport = _mod_uyu65l.createFetchStreamTransport;
11
+ exports.createExpoFileSystemAdapter = _mod_uyu65l.createExpoFileSystemAdapter;
12
+ exports.createReactNativeFsAdapter = _mod_uyu65l.createReactNativeFsAdapter;
13
+ exports.createNetInfoProvider = _mod_uyu65l.createNetInfoProvider;
14
+ exports.createExpoBackgroundTaskProvider = _mod_uyu65l.createExpoBackgroundTaskProvider;;
15
15
  exports.Rezo = Rezo;
16
16
  exports.RezoError = RezoError;
17
17
  exports.RezoErrorCode = RezoErrorCode;