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
package/dist/index.d.ts CHANGED
@@ -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, ErrorCallback as CookieErrorCallback, MemoryCookieStore, Nullable, Store } from 'tough-cookie';
5
+ import { Callback, Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieJarOptions, CreateCookieOptions, ErrorCallback as CookieErrorCallback, GetCookiesOptions, MemoryCookieStore, 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;
@@ -249,6 +252,38 @@ export declare class RezoCookieJar extends TouchCookieJar {
249
252
  constructor(cookies: Cookie[], url: string);
250
253
  constructor(store: Nullable<Store>, options?: CreateCookieJarOptions | boolean);
251
254
  private generateCookies;
255
+ setCookieSync(cookie: string | Cookie, url: string, options?: SetCookieOptions): Cookie | undefined;
256
+ setCookie(cookie: string | TouchCookie, url: string | URL, callback: Callback<TouchCookie | undefined>): void;
257
+ setCookie(cookie: string | TouchCookie, url: string | URL, options: SetCookieOptions, callback: Callback<TouchCookie | undefined>): void;
258
+ setCookie(cookie: string | TouchCookie, url: string | URL, options?: SetCookieOptions): Promise<TouchCookie | undefined>;
259
+ setCookie(cookie: string | TouchCookie, url: string | URL, options: SetCookieOptions | Callback<TouchCookie | undefined>, callback?: Callback<TouchCookie | undefined>): unknown;
260
+ getCookies(url: string, callback: Callback<TouchCookie[]>): void;
261
+ getCookies(url: string | URL, options: GetCookiesOptions | undefined, callback: Callback<TouchCookie[]>): void;
262
+ getCookies(url: string | URL, options?: GetCookiesOptions): Promise<TouchCookie[]>;
263
+ getCookies(url: string | URL, options: GetCookiesOptions | undefined | Callback<TouchCookie[]>, callback?: Callback<TouchCookie[]>): unknown;
264
+ getCookiesSync(url: string, options?: GetCookiesOptions): Cookie[];
265
+ getCookieString(url: string, callback: Callback<string | undefined>): void;
266
+ getCookieString(url: string, options: GetCookiesOptions, callback: Callback<string | undefined>): void;
267
+ getCookieString(url: string, options?: GetCookiesOptions): Promise<string>;
268
+ getCookieString(url: string, options: GetCookiesOptions | Callback<string | undefined>, callback?: Callback<string | undefined>): unknown;
269
+ getCookieStringSync(url: string, options?: GetCookiesOptions): string;
270
+ getSetCookieStrings(url: string, callback: Callback<string[] | undefined>): void;
271
+ getSetCookieStrings(url: string, options: GetCookiesOptions, callback: Callback<string[] | undefined>): void;
272
+ getSetCookieStrings(url: string, options?: GetCookiesOptions): Promise<string[] | undefined>;
273
+ getSetCookieStrings(url: string, options: GetCookiesOptions, callback?: Callback<string[] | undefined>): unknown;
274
+ getSetCookieStringsSync(url: string, options?: GetCookiesOptions): string[];
275
+ serialize(callback: Callback<SerializedCookieJar>): void;
276
+ serialize(): Promise<SerializedCookieJar>;
277
+ serializeSync(): SerializedCookieJar | undefined;
278
+ toJSON(): ReturnType<TouchCookieJar["toJSON"]>;
279
+ private toPublicSerializedJar;
280
+ private toStoredCookie;
281
+ private toPublicCookies;
282
+ private toPublicCookie;
283
+ private toStoredCookieKey;
284
+ private toPublicCookieKey;
285
+ private cookiesToCookieString;
286
+ private cookiesToSetCookieStrings;
252
287
  /**
253
288
  * Get all cookies from the cookie jar.
254
289
  *
@@ -4199,34 +4234,36 @@ export interface RezoRequestConfig<D = any> {
4199
4234
  * TLS negotiation for HTTPS).
4200
4235
  *
4201
4236
  * **Behavior:**
4202
- * - `false` (default) - Connection closes after each request. Process exits immediately.
4203
- * - `true` - Connection stays open for reuse. Idle connections close after `keepAliveMsecs`.
4237
+ * - `true` (default) - Connections are pooled and reused across requests to the
4238
+ * same host. Idle pooled sockets are closed after ~5 seconds.
4239
+ * - `false` - A fresh connection is opened for every request and closed after
4240
+ * the response. No pooling, no reuse.
4204
4241
  *
4205
- * **When to use `keepAlive: true`:**
4242
+ * **When to keep the default (`keepAlive: true`):**
4206
4243
  * - Making multiple requests to the same host in sequence
4207
4244
  * - Long-running applications (servers, bots, scrapers)
4208
4245
  * - Performance-critical applications where connection overhead matters
4209
4246
  *
4210
- * **When to use `keepAlive: false` (default):**
4211
- * - Single requests or scripts that should exit immediately
4212
- * - CLI tools that make one-off requests
4213
- * - When you need predictable process termination
4247
+ * **When to use `keepAlive: false`:**
4248
+ * - Hosts that reset reused connections aggressively
4249
+ * - Debugging connection-level issues (isolates every request)
4250
+ * - One-off requests where connection reuse buys nothing
4214
4251
  *
4215
4252
  * @example
4216
4253
  * ```typescript
4217
- * // Default: process exits immediately after request
4254
+ * // Default: pooled keep-alive connections
4218
4255
  * const { data } = await rezo.get('https://api.example.com/data');
4219
4256
  *
4220
- * // Keep connection alive for 1 minute (default) for subsequent requests
4221
- * const client = new Rezo({ keepAlive: true });
4257
+ * // Fresh connection per request for this instance
4258
+ * const client = rezo.create({ keepAlive: false });
4222
4259
  * await client.get('https://api.example.com/users');
4223
- * await client.get('https://api.example.com/posts'); // Reuses connection
4260
+ * await client.get('https://api.example.com/posts'); // New connection again
4224
4261
  *
4225
- * // Custom keep-alive timeout (30 seconds)
4226
- * const client = new Rezo({ keepAlive: true, keepAliveMsecs: 30000 });
4262
+ * // Or per request
4263
+ * await rezo.get('https://api.example.com/data', { keepAlive: false });
4227
4264
  * ```
4228
4265
  *
4229
- * @default false
4266
+ * @default true
4230
4267
  */
4231
4268
  keepAlive?: boolean;
4232
4269
  /**
@@ -4648,9 +4685,9 @@ export interface httpAdapterOverloads {
4648
4685
  request(options: RezoRequestOptions & {
4649
4686
  responseType: "blob";
4650
4687
  }): Promise<RezoResponse<Blob>>;
4651
- request(options: RezoRequestOptions & {
4688
+ request<T extends string = string>(options: RezoRequestOptions & {
4652
4689
  responseType: "text";
4653
- }): Promise<RezoResponse<string>>;
4690
+ }): Promise<RezoResponse<T>>;
4654
4691
  request(options: RezoRequestOptions & {
4655
4692
  responseType: "download";
4656
4693
  }): Promise<RezoDownloadResponse>;
@@ -4680,9 +4717,9 @@ export interface httpAdapterOverloads {
4680
4717
  get(url: string | URL, options: RezoHttpGetRequest & {
4681
4718
  responseType: "blob";
4682
4719
  }): Promise<RezoResponse<Blob>>;
4683
- get(url: string | URL, options: RezoHttpGetRequest & {
4720
+ get<T extends string = string>(url: string | URL, options: RezoHttpGetRequest & {
4684
4721
  responseType: "text";
4685
- }): Promise<RezoResponse<string>>;
4722
+ }): Promise<RezoResponse<T>>;
4686
4723
  get(url: string | URL, options: RezoHttpGetRequest & {
4687
4724
  responseType: "download";
4688
4725
  }): Promise<RezoDownloadResponse>;
@@ -4714,9 +4751,9 @@ export interface httpAdapterOverloads {
4714
4751
  delete(url: string | URL, options: RezoHttpDeleteRequest & {
4715
4752
  responseType: "blob";
4716
4753
  }): Promise<RezoResponse<Blob>>;
4717
- delete(url: string | URL, options: RezoHttpDeleteRequest & {
4754
+ delete<T extends string = string>(url: string | URL, options: RezoHttpDeleteRequest & {
4718
4755
  responseType: "text";
4719
- }): Promise<RezoResponse<string>>;
4756
+ }): Promise<RezoResponse<T>>;
4720
4757
  delete(url: string | URL, options: RezoHttpDeleteRequest & {
4721
4758
  responseType: "download";
4722
4759
  }): Promise<RezoDownloadResponse>;
@@ -4803,9 +4840,9 @@ export interface httpAdapterPostOverloads {
4803
4840
  post(url: string | URL, data: any, options: RezoHttpPostRequest & {
4804
4841
  responseType: "blob";
4805
4842
  }): Promise<RezoResponse<Blob>>;
4806
- post(url: string | URL, data: any, options: RezoHttpPostRequest & {
4843
+ post<T extends string = string>(url: string | URL, data: any, options: RezoHttpPostRequest & {
4807
4844
  responseType: "text";
4808
- }): Promise<RezoResponse<string>>;
4845
+ }): Promise<RezoResponse<T>>;
4809
4846
  post(url: string | URL, data: any, options: RezoHttpPostRequest & {
4810
4847
  responseType: "download";
4811
4848
  }): Promise<RezoDownloadResponse>;
@@ -4833,15 +4870,15 @@ export interface httpAdapterPostOverloads {
4833
4870
  postJson<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
4834
4871
  responseType: "auto" | "json";
4835
4872
  }): Promise<RezoResponse<T>>;
4836
- postJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPostRequest & {
4873
+ postJson<T extends string = string>(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPostRequest & {
4837
4874
  responseType: "text";
4838
- }): Promise<RezoResponse<string>>;
4839
- postJson(url: string | URL, jsonString: string, options: RezoHttpPostRequest & {
4875
+ }): Promise<RezoResponse<T>>;
4876
+ postJson<T extends string = string>(url: string | URL, jsonString: string, options: RezoHttpPostRequest & {
4840
4877
  responseType: "text";
4841
- }): Promise<RezoResponse<string>>;
4842
- postJson(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
4878
+ }): Promise<RezoResponse<T>>;
4879
+ postJson<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
4843
4880
  responseType: "text";
4844
- }): Promise<RezoResponse<string>>;
4881
+ }): Promise<RezoResponse<T>>;
4845
4882
  postJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPostRequest & {
4846
4883
  responseType: "arrayBuffer";
4847
4884
  }): Promise<RezoResponse<ArrayBuffer>>;
@@ -4893,15 +4930,15 @@ export interface httpAdapterPostOverloads {
4893
4930
  postForm<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
4894
4931
  responseType: "auto" | "json";
4895
4932
  }): Promise<RezoResponse<T>>;
4896
- postForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPostRequest & {
4933
+ postForm<T extends string = string>(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPostRequest & {
4897
4934
  responseType: "text";
4898
- }): Promise<RezoResponse<string>>;
4899
- postForm(url: string | URL, string: string, options: RezoHttpPostRequest & {
4935
+ }): Promise<RezoResponse<T>>;
4936
+ postForm<T extends string = string>(url: string | URL, string: string, options: RezoHttpPostRequest & {
4900
4937
  responseType: "text";
4901
- }): Promise<RezoResponse<string>>;
4902
- postForm(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
4938
+ }): Promise<RezoResponse<T>>;
4939
+ postForm<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPostRequest & {
4903
4940
  responseType: "text";
4904
- }): Promise<RezoResponse<string>>;
4941
+ }): Promise<RezoResponse<T>>;
4905
4942
  postForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPostRequest & {
4906
4943
  responseType: "arrayBuffer";
4907
4944
  }): Promise<RezoResponse<ArrayBuffer>>;
@@ -4962,15 +4999,15 @@ export interface httpAdapterPostOverloads {
4962
4999
  postMultipart<T = any>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPostRequest & {
4963
5000
  responseType: "json";
4964
5001
  }): Promise<RezoResponse<T>>;
4965
- postMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPostRequest & {
5002
+ postMultipart<T extends string = string>(url: string | URL, formData: RezoFormData, options: RezoHttpPostRequest & {
4966
5003
  responseType: "text";
4967
- }): Promise<RezoResponse<string>>;
4968
- postMultipart(url: string | URL, formData: FormData, options: RezoHttpPostRequest & {
5004
+ }): Promise<RezoResponse<T>>;
5005
+ postMultipart<T extends string = string>(url: string | URL, formData: FormData, options: RezoHttpPostRequest & {
4969
5006
  responseType: "text";
4970
- }): Promise<RezoResponse<string>>;
4971
- postMultipart(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPostRequest & {
5007
+ }): Promise<RezoResponse<T>>;
5008
+ postMultipart<T extends string = string>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPostRequest & {
4972
5009
  responseType: "text";
4973
- }): Promise<RezoResponse<string>>;
5010
+ }): Promise<RezoResponse<T>>;
4974
5011
  postMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPostRequest & {
4975
5012
  responseType: "stream";
4976
5013
  }): Promise<RezoStreamResponse>;
@@ -5026,9 +5063,9 @@ export interface httpAdapterPatchOverloads {
5026
5063
  patch(url: string | URL, data: any, options: RezoHttpPatchRequest & {
5027
5064
  responseType: "blob";
5028
5065
  }): Promise<RezoResponse<Blob>>;
5029
- patch(url: string | URL, data: any, options: RezoHttpPatchRequest & {
5066
+ patch<T extends string = string>(url: string | URL, data: any, options: RezoHttpPatchRequest & {
5030
5067
  responseType: "text";
5031
- }): Promise<RezoResponse<string>>;
5068
+ }): Promise<RezoResponse<T>>;
5032
5069
  patch(url: string | URL, data: any, options: RezoHttpPatchRequest & {
5033
5070
  responseType: "download";
5034
5071
  }): RezoDownloadResponse;
@@ -5056,15 +5093,15 @@ export interface httpAdapterPatchOverloads {
5056
5093
  patchJson<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
5057
5094
  responseType: "auto" | "json";
5058
5095
  }): Promise<RezoResponse<T>>;
5059
- patchJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPatchRequest & {
5096
+ patchJson<T extends string = string>(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPatchRequest & {
5060
5097
  responseType: "text";
5061
- }): Promise<RezoResponse<string>>;
5062
- patchJson(url: string | URL, jsonString: string, options: RezoHttpPatchRequest & {
5098
+ }): Promise<RezoResponse<T>>;
5099
+ patchJson<T extends string = string>(url: string | URL, jsonString: string, options: RezoHttpPatchRequest & {
5063
5100
  responseType: "text";
5064
- }): Promise<RezoResponse<string>>;
5065
- patchJson(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
5101
+ }): Promise<RezoResponse<T>>;
5102
+ patchJson<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
5066
5103
  responseType: "text";
5067
- }): Promise<RezoResponse<string>>;
5104
+ }): Promise<RezoResponse<T>>;
5068
5105
  patchJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPatchRequest & {
5069
5106
  responseType: "arrayBuffer";
5070
5107
  }): Promise<RezoResponse<ArrayBuffer>>;
@@ -5125,15 +5162,15 @@ export interface httpAdapterPatchOverloads {
5125
5162
  patchForm<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
5126
5163
  responseType: "auto" | "json";
5127
5164
  }): Promise<RezoResponse<T>>;
5128
- patchForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPatchRequest & {
5165
+ patchForm<T extends string = string>(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPatchRequest & {
5129
5166
  responseType: "text";
5130
- }): Promise<RezoResponse<string>>;
5131
- patchForm(url: string | URL, string: string, options: RezoHttpPatchRequest & {
5167
+ }): Promise<RezoResponse<T>>;
5168
+ patchForm<T extends string = string>(url: string | URL, string: string, options: RezoHttpPatchRequest & {
5132
5169
  responseType: "text";
5133
- }): Promise<RezoResponse<string>>;
5134
- patchForm(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
5170
+ }): Promise<RezoResponse<T>>;
5171
+ patchForm<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPatchRequest & {
5135
5172
  responseType: "text";
5136
- }): Promise<RezoResponse<string>>;
5173
+ }): Promise<RezoResponse<T>>;
5137
5174
  patchForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPatchRequest & {
5138
5175
  responseType: "arrayBuffer";
5139
5176
  }): Promise<RezoResponse<ArrayBuffer>>;
@@ -5194,15 +5231,15 @@ export interface httpAdapterPatchOverloads {
5194
5231
  patchMultipart<T = any>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPatchRequest & {
5195
5232
  responseType: "auto" | "json";
5196
5233
  }): Promise<RezoResponse<T>>;
5197
- patchMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPatchRequest & {
5234
+ patchMultipart<T extends string = string>(url: string | URL, formData: RezoFormData, options: RezoHttpPatchRequest & {
5198
5235
  responseType: "text";
5199
- }): Promise<RezoResponse<string>>;
5200
- patchMultipart(url: string | URL, formData: FormData, options: RezoHttpPatchRequest & {
5236
+ }): Promise<RezoResponse<T>>;
5237
+ patchMultipart<T extends string = string>(url: string | URL, formData: FormData, options: RezoHttpPatchRequest & {
5201
5238
  responseType: "text";
5202
- }): Promise<RezoResponse<string>>;
5203
- patchMultipart(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPatchRequest & {
5239
+ }): Promise<RezoResponse<T>>;
5240
+ patchMultipart<T extends string = string>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPatchRequest & {
5204
5241
  responseType: "text";
5205
- }): Promise<RezoResponse<string>>;
5242
+ }): Promise<RezoResponse<T>>;
5206
5243
  patchMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPatchRequest & {
5207
5244
  responseType: "stream";
5208
5245
  }): RezoStreamResponse;
@@ -5267,9 +5304,9 @@ export interface httpAdapterPutOverloads {
5267
5304
  put(url: string | URL, data: any, options: RezoHttpPutRequest & {
5268
5305
  responseType: "blob";
5269
5306
  }): Promise<RezoResponse<Blob>>;
5270
- put(url: string | URL, data: any, options: RezoHttpPutRequest & {
5307
+ put<T extends string = string>(url: string | URL, data: any, options: RezoHttpPutRequest & {
5271
5308
  responseType: "text";
5272
- }): Promise<RezoResponse<string>>;
5309
+ }): Promise<RezoResponse<T>>;
5273
5310
  put(url: string | URL, data: any, options: RezoHttpPutRequest & {
5274
5311
  responseType: "download";
5275
5312
  }): RezoDownloadResponse;
@@ -5297,15 +5334,15 @@ export interface httpAdapterPutOverloads {
5297
5334
  putJson<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
5298
5335
  responseType: "auto" | "json";
5299
5336
  }): Promise<RezoResponse<T>>;
5300
- putJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPutRequest & {
5337
+ putJson<T extends string = string>(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPutRequest & {
5301
5338
  responseType: "text";
5302
- }): Promise<RezoResponse<string>>;
5303
- putJson(url: string | URL, jsonString: string, options: RezoHttpPutRequest & {
5339
+ }): Promise<RezoResponse<T>>;
5340
+ putJson<T extends string = string>(url: string | URL, jsonString: string, options: RezoHttpPutRequest & {
5304
5341
  responseType: "text";
5305
- }): Promise<RezoResponse<string>>;
5306
- putJson(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
5342
+ }): Promise<RezoResponse<T>>;
5343
+ putJson<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
5307
5344
  responseType: "text";
5308
- }): Promise<RezoResponse<string>>;
5345
+ }): Promise<RezoResponse<T>>;
5309
5346
  putJson(url: string | URL, data: Record<any, any> | Array<any>, options: RezoHttpPutRequest & {
5310
5347
  responseType: "arrayBuffer";
5311
5348
  }): Promise<RezoResponse<ArrayBuffer>>;
@@ -5366,15 +5403,15 @@ export interface httpAdapterPutOverloads {
5366
5403
  putForm<T = any>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
5367
5404
  responseType: "auto" | "json";
5368
5405
  }): Promise<RezoResponse<T>>;
5369
- putForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPutRequest & {
5406
+ putForm<T extends string = string>(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPutRequest & {
5370
5407
  responseType: "text";
5371
- }): Promise<RezoResponse<string>>;
5372
- putForm(url: string | URL, string: string, options: RezoHttpPutRequest & {
5408
+ }): Promise<RezoResponse<T>>;
5409
+ putForm<T extends string = string>(url: string | URL, string: string, options: RezoHttpPutRequest & {
5373
5410
  responseType: "text";
5374
- }): Promise<RezoResponse<string>>;
5375
- putForm(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
5411
+ }): Promise<RezoResponse<T>>;
5412
+ putForm<T extends string = string>(url: string | URL, nullData: null | undefined, options: RezoHttpPutRequest & {
5376
5413
  responseType: "text";
5377
- }): Promise<RezoResponse<string>>;
5414
+ }): Promise<RezoResponse<T>>;
5378
5415
  putForm(url: string | URL, data: URLSearchParams | RezoURLSearchParams | Record<string, any>, options: RezoHttpPutRequest & {
5379
5416
  responseType: "arrayBuffer";
5380
5417
  }): Promise<RezoResponse<ArrayBuffer>>;
@@ -5435,15 +5472,15 @@ export interface httpAdapterPutOverloads {
5435
5472
  putMultipart<T = any>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPutRequest & {
5436
5473
  responseType: "auto" | "json";
5437
5474
  }): Promise<RezoResponse<T>>;
5438
- putMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPutRequest & {
5475
+ putMultipart<T extends string = string>(url: string | URL, formData: RezoFormData, options: RezoHttpPutRequest & {
5439
5476
  responseType: "text";
5440
- }): Promise<RezoResponse<string>>;
5441
- putMultipart(url: string | URL, formData: FormData, options: RezoHttpPutRequest & {
5477
+ }): Promise<RezoResponse<T>>;
5478
+ putMultipart<T extends string = string>(url: string | URL, formData: FormData, options: RezoHttpPutRequest & {
5442
5479
  responseType: "text";
5443
- }): Promise<RezoResponse<string>>;
5444
- putMultipart(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPutRequest & {
5480
+ }): Promise<RezoResponse<T>>;
5481
+ putMultipart<T extends string = string>(url: string | URL, dataObject: Record<string, any>, options: RezoHttpPutRequest & {
5445
5482
  responseType: "text";
5446
- }): Promise<RezoResponse<string>>;
5483
+ }): Promise<RezoResponse<T>>;
5447
5484
  putMultipart(url: string | URL, formData: RezoFormData, options: RezoHttpPutRequest & {
5448
5485
  responseType: "stream";
5449
5486
  }): RezoStreamResponse;
@@ -6326,7 +6363,7 @@ export declare function getRandomProfileByFamily(family: BrowserProfile["family"
6326
6363
  *
6327
6364
  * IMPORTANT: Update these values when bumping package version.
6328
6365
  */
6329
- export declare const VERSION = "1.0.136";
6366
+ export declare const VERSION = "1.0.138";
6330
6367
  export declare const PACKAGE_NAME = "rezo";
6331
6368
  export declare const isRezoError: typeof RezoError.isRezoError;
6332
6369
  export declare const Cancel: typeof RezoError;
@@ -1,14 +1,14 @@
1
- const _mod_z9wlwu = require('./base.cjs');
2
- exports.Agent = _mod_z9wlwu.Agent;;
3
- const _mod_ctuiub = require('./http-proxy.cjs');
4
- exports.HttpProxyAgent = _mod_ctuiub.HttpProxyAgent;;
5
- const _mod_c364ja = require('./https-proxy.cjs');
6
- exports.HttpsProxyAgent = _mod_c364ja.HttpsProxyAgent;;
7
- const _mod_ogddxt = require('./socks-proxy.cjs');
8
- exports.SocksProxyAgent = _mod_ogddxt.SocksProxyAgent;;
9
- const _mod_1cp4w0 = require('./socks-client.cjs');
10
- exports.SocksClient = _mod_1cp4w0.SocksClient;;
11
- const _mod_zbsho9 = require('./bun-socks-http.cjs');
12
- exports.bunHttp = _mod_zbsho9.bunHttp;
13
- exports.isBunRuntime = _mod_zbsho9.isBunRuntime;
14
- exports.isBunSocksRequest = _mod_zbsho9.isBunSocksRequest;;
1
+ const _mod_e0ykuq = require('./base.cjs');
2
+ exports.Agent = _mod_e0ykuq.Agent;;
3
+ const _mod_r69y7t = require('./http-proxy.cjs');
4
+ exports.HttpProxyAgent = _mod_r69y7t.HttpProxyAgent;;
5
+ const _mod_62ihx5 = require('./https-proxy.cjs');
6
+ exports.HttpsProxyAgent = _mod_62ihx5.HttpsProxyAgent;;
7
+ const _mod_4ra1gc = require('./socks-proxy.cjs');
8
+ exports.SocksProxyAgent = _mod_4ra1gc.SocksProxyAgent;;
9
+ const _mod_eijccw = require('./socks-client.cjs');
10
+ exports.SocksClient = _mod_eijccw.SocksClient;;
11
+ const _mod_0bthth = require('./bun-socks-http.cjs');
12
+ exports.bunHttp = _mod_0bthth.bunHttp;
13
+ exports.isBunRuntime = _mod_0bthth.isBunRuntime;
14
+ exports.isBunSocksRequest = _mod_0bthth.isBunSocksRequest;;