@onkernel/sdk 0.11.0 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +31 -0
  3. package/client.d.mts +11 -2
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +11 -2
  6. package/client.d.ts.map +1 -1
  7. package/client.js +11 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +11 -0
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +53 -0
  12. package/core/pagination.d.mts.map +1 -0
  13. package/core/pagination.d.ts +53 -0
  14. package/core/pagination.d.ts.map +1 -0
  15. package/core/pagination.js +110 -0
  16. package/core/pagination.js.map +1 -0
  17. package/core/pagination.mjs +104 -0
  18. package/core/pagination.mjs.map +1 -0
  19. package/index.d.mts +1 -0
  20. package/index.d.mts.map +1 -1
  21. package/index.d.ts +1 -0
  22. package/index.d.ts.map +1 -1
  23. package/index.js +3 -1
  24. package/index.js.map +1 -1
  25. package/index.mjs +1 -0
  26. package/index.mjs.map +1 -1
  27. package/internal/utils/values.js +3 -3
  28. package/internal/utils/values.js.map +1 -1
  29. package/internal/utils/values.mjs +3 -3
  30. package/internal/utils/values.mjs.map +1 -1
  31. package/package.json +11 -1
  32. package/pagination.d.mts +2 -0
  33. package/pagination.d.mts.map +1 -0
  34. package/pagination.d.ts +2 -0
  35. package/pagination.d.ts.map +1 -0
  36. package/pagination.js +6 -0
  37. package/pagination.js.map +1 -0
  38. package/pagination.mjs +2 -0
  39. package/pagination.mjs.map +1 -0
  40. package/resources/browsers/browsers.d.mts +9 -1
  41. package/resources/browsers/browsers.d.mts.map +1 -1
  42. package/resources/browsers/browsers.d.ts +9 -1
  43. package/resources/browsers/browsers.d.ts.map +1 -1
  44. package/resources/browsers/browsers.js.map +1 -1
  45. package/resources/browsers/browsers.mjs.map +1 -1
  46. package/resources/deployments.d.mts +45 -43
  47. package/resources/deployments.d.mts.map +1 -1
  48. package/resources/deployments.d.ts +45 -43
  49. package/resources/deployments.d.ts.map +1 -1
  50. package/resources/deployments.js +9 -2
  51. package/resources/deployments.js.map +1 -1
  52. package/resources/deployments.mjs +9 -2
  53. package/resources/deployments.mjs.map +1 -1
  54. package/resources/index.d.mts +2 -1
  55. package/resources/index.d.mts.map +1 -1
  56. package/resources/index.d.ts +2 -1
  57. package/resources/index.d.ts.map +1 -1
  58. package/resources/index.js +3 -1
  59. package/resources/index.js.map +1 -1
  60. package/resources/index.mjs +1 -0
  61. package/resources/index.mjs.map +1 -1
  62. package/resources/invocations.d.mts +2 -1
  63. package/resources/invocations.d.mts.map +1 -1
  64. package/resources/invocations.d.ts +2 -1
  65. package/resources/invocations.d.ts.map +1 -1
  66. package/resources/invocations.js +2 -1
  67. package/resources/invocations.js.map +1 -1
  68. package/resources/invocations.mjs +2 -1
  69. package/resources/invocations.mjs.map +1 -1
  70. package/resources/proxies.d.mts +512 -0
  71. package/resources/proxies.d.mts.map +1 -0
  72. package/resources/proxies.d.ts +512 -0
  73. package/resources/proxies.d.ts.map +1 -0
  74. package/resources/proxies.js +38 -0
  75. package/resources/proxies.js.map +1 -0
  76. package/resources/proxies.mjs +34 -0
  77. package/resources/proxies.mjs.map +1 -0
  78. package/src/client.ts +46 -0
  79. package/src/core/pagination.ts +167 -0
  80. package/src/index.ts +1 -0
  81. package/src/internal/utils/values.ts +3 -3
  82. package/src/pagination.ts +2 -0
  83. package/src/resources/browsers/browsers.ts +10 -1
  84. package/src/resources/deployments.ts +48 -42
  85. package/src/resources/index.ts +8 -0
  86. package/src/resources/invocations.ts +2 -1
  87. package/src/resources/proxies.ts +876 -0
  88. package/src/version.ts +1 -1
  89. package/version.d.mts +1 -1
  90. package/version.d.ts +1 -1
  91. package/version.js +1 -1
  92. package/version.mjs +1 -1
@@ -0,0 +1,876 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { buildHeaders } from '../internal/headers';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class Proxies extends APIResource {
10
+ /**
11
+ * Create a new proxy configuration for the caller's organization.
12
+ */
13
+ create(body: ProxyCreateParams, options?: RequestOptions): APIPromise<ProxyCreateResponse> {
14
+ return this._client.post('/proxies', { body, ...options });
15
+ }
16
+
17
+ /**
18
+ * Retrieve a proxy belonging to the caller's organization by ID.
19
+ */
20
+ retrieve(id: string, options?: RequestOptions): APIPromise<ProxyRetrieveResponse> {
21
+ return this._client.get(path`/proxies/${id}`, options);
22
+ }
23
+
24
+ /**
25
+ * List proxies owned by the caller's organization.
26
+ */
27
+ list(options?: RequestOptions): APIPromise<ProxyListResponse> {
28
+ return this._client.get('/proxies', options);
29
+ }
30
+
31
+ /**
32
+ * Soft delete a proxy. Sessions referencing it are not modified.
33
+ */
34
+ delete(id: string, options?: RequestOptions): APIPromise<void> {
35
+ return this._client.delete(path`/proxies/${id}`, {
36
+ ...options,
37
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
38
+ });
39
+ }
40
+ }
41
+
42
+ /**
43
+ * Configuration for routing traffic through a proxy.
44
+ */
45
+ export interface ProxyCreateResponse {
46
+ /**
47
+ * Proxy type to use. In terms of quality for avoiding bot-detection, from best to
48
+ * worst: `mobile` > `residential` > `isp` > `datacenter`.
49
+ */
50
+ type: 'datacenter' | 'isp' | 'residential' | 'mobile' | 'custom';
51
+
52
+ id?: string;
53
+
54
+ /**
55
+ * Configuration specific to the selected proxy `type`.
56
+ */
57
+ config?:
58
+ | ProxyCreateResponse.DatacenterProxyConfig
59
+ | ProxyCreateResponse.IspProxyConfig
60
+ | ProxyCreateResponse.ResidentialProxyConfig
61
+ | ProxyCreateResponse.MobileProxyConfig
62
+ | ProxyCreateResponse.CustomProxyConfig;
63
+
64
+ /**
65
+ * Readable name of the proxy.
66
+ */
67
+ name?: string;
68
+ }
69
+
70
+ export namespace ProxyCreateResponse {
71
+ /**
72
+ * Configuration for a datacenter proxy.
73
+ */
74
+ export interface DatacenterProxyConfig {
75
+ /**
76
+ * ISO 3166 country code or EU for the proxy exit node.
77
+ */
78
+ country: string;
79
+ }
80
+
81
+ /**
82
+ * Configuration for an ISP proxy.
83
+ */
84
+ export interface IspProxyConfig {
85
+ /**
86
+ * ISO 3166 country code or EU for the proxy exit node.
87
+ */
88
+ country: string;
89
+ }
90
+
91
+ /**
92
+ * Configuration for residential proxies.
93
+ */
94
+ export interface ResidentialProxyConfig {
95
+ /**
96
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
97
+ */
98
+ asn?: string;
99
+
100
+ /**
101
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
102
+ * provided.
103
+ */
104
+ city?: string;
105
+
106
+ /**
107
+ * ISO 3166 country code or EU for the proxy exit node. Required if `city` is
108
+ * provided.
109
+ */
110
+ country?: string;
111
+
112
+ /**
113
+ * Operating system of the residential device.
114
+ */
115
+ os?: 'windows' | 'macos' | 'android';
116
+
117
+ /**
118
+ * Two-letter state code.
119
+ */
120
+ state?: string;
121
+
122
+ /**
123
+ * US ZIP code.
124
+ */
125
+ zip?: string;
126
+ }
127
+
128
+ /**
129
+ * Configuration for mobile proxies.
130
+ */
131
+ export interface MobileProxyConfig {
132
+ /**
133
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
134
+ */
135
+ asn?: string;
136
+
137
+ /**
138
+ * Mobile carrier.
139
+ */
140
+ carrier?:
141
+ | 'a1'
142
+ | 'aircel'
143
+ | 'airtel'
144
+ | 'att'
145
+ | 'celcom'
146
+ | 'chinamobile'
147
+ | 'claro'
148
+ | 'comcast'
149
+ | 'cox'
150
+ | 'digi'
151
+ | 'dt'
152
+ | 'docomo'
153
+ | 'dtac'
154
+ | 'etisalat'
155
+ | 'idea'
156
+ | 'kyivstar'
157
+ | 'meo'
158
+ | 'megafon'
159
+ | 'mtn'
160
+ | 'mtnza'
161
+ | 'mts'
162
+ | 'optus'
163
+ | 'orange'
164
+ | 'qwest'
165
+ | 'reliance_jio'
166
+ | 'robi'
167
+ | 'sprint'
168
+ | 'telefonica'
169
+ | 'telstra'
170
+ | 'tmobile'
171
+ | 'tigo'
172
+ | 'tim'
173
+ | 'verizon'
174
+ | 'vimpelcom'
175
+ | 'vodacomza'
176
+ | 'vodafone'
177
+ | 'vivo'
178
+ | 'zain'
179
+ | 'vivabo'
180
+ | 'telenormyanmar'
181
+ | 'kcelljsc'
182
+ | 'swisscom'
183
+ | 'singtel'
184
+ | 'asiacell'
185
+ | 'windit'
186
+ | 'cellc'
187
+ | 'ooredoo'
188
+ | 'drei'
189
+ | 'umobile'
190
+ | 'cableone'
191
+ | 'proximus'
192
+ | 'tele2'
193
+ | 'mobitel'
194
+ | 'o2'
195
+ | 'bouygues'
196
+ | 'free'
197
+ | 'sfr'
198
+ | 'digicel';
199
+
200
+ /**
201
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
202
+ * provided.
203
+ */
204
+ city?: string;
205
+
206
+ /**
207
+ * ISO 3166 country code or EU for the proxy exit node. Required if `city` is
208
+ * provided.
209
+ */
210
+ country?: string;
211
+
212
+ /**
213
+ * Two-letter state code.
214
+ */
215
+ state?: string;
216
+
217
+ /**
218
+ * US ZIP code.
219
+ */
220
+ zip?: string;
221
+ }
222
+
223
+ /**
224
+ * Configuration for a custom proxy (e.g., private proxy server).
225
+ */
226
+ export interface CustomProxyConfig {
227
+ /**
228
+ * Proxy host address or IP.
229
+ */
230
+ host: string;
231
+
232
+ /**
233
+ * Proxy port.
234
+ */
235
+ port: number;
236
+
237
+ /**
238
+ * Whether the proxy has a password.
239
+ */
240
+ has_password?: boolean;
241
+
242
+ /**
243
+ * Username for proxy authentication.
244
+ */
245
+ username?: string;
246
+ }
247
+ }
248
+
249
+ /**
250
+ * Configuration for routing traffic through a proxy.
251
+ */
252
+ export interface ProxyRetrieveResponse {
253
+ /**
254
+ * Proxy type to use. In terms of quality for avoiding bot-detection, from best to
255
+ * worst: `mobile` > `residential` > `isp` > `datacenter`.
256
+ */
257
+ type: 'datacenter' | 'isp' | 'residential' | 'mobile' | 'custom';
258
+
259
+ id?: string;
260
+
261
+ /**
262
+ * Configuration specific to the selected proxy `type`.
263
+ */
264
+ config?:
265
+ | ProxyRetrieveResponse.DatacenterProxyConfig
266
+ | ProxyRetrieveResponse.IspProxyConfig
267
+ | ProxyRetrieveResponse.ResidentialProxyConfig
268
+ | ProxyRetrieveResponse.MobileProxyConfig
269
+ | ProxyRetrieveResponse.CustomProxyConfig;
270
+
271
+ /**
272
+ * Readable name of the proxy.
273
+ */
274
+ name?: string;
275
+ }
276
+
277
+ export namespace ProxyRetrieveResponse {
278
+ /**
279
+ * Configuration for a datacenter proxy.
280
+ */
281
+ export interface DatacenterProxyConfig {
282
+ /**
283
+ * ISO 3166 country code or EU for the proxy exit node.
284
+ */
285
+ country: string;
286
+ }
287
+
288
+ /**
289
+ * Configuration for an ISP proxy.
290
+ */
291
+ export interface IspProxyConfig {
292
+ /**
293
+ * ISO 3166 country code or EU for the proxy exit node.
294
+ */
295
+ country: string;
296
+ }
297
+
298
+ /**
299
+ * Configuration for residential proxies.
300
+ */
301
+ export interface ResidentialProxyConfig {
302
+ /**
303
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
304
+ */
305
+ asn?: string;
306
+
307
+ /**
308
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
309
+ * provided.
310
+ */
311
+ city?: string;
312
+
313
+ /**
314
+ * ISO 3166 country code or EU for the proxy exit node. Required if `city` is
315
+ * provided.
316
+ */
317
+ country?: string;
318
+
319
+ /**
320
+ * Operating system of the residential device.
321
+ */
322
+ os?: 'windows' | 'macos' | 'android';
323
+
324
+ /**
325
+ * Two-letter state code.
326
+ */
327
+ state?: string;
328
+
329
+ /**
330
+ * US ZIP code.
331
+ */
332
+ zip?: string;
333
+ }
334
+
335
+ /**
336
+ * Configuration for mobile proxies.
337
+ */
338
+ export interface MobileProxyConfig {
339
+ /**
340
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
341
+ */
342
+ asn?: string;
343
+
344
+ /**
345
+ * Mobile carrier.
346
+ */
347
+ carrier?:
348
+ | 'a1'
349
+ | 'aircel'
350
+ | 'airtel'
351
+ | 'att'
352
+ | 'celcom'
353
+ | 'chinamobile'
354
+ | 'claro'
355
+ | 'comcast'
356
+ | 'cox'
357
+ | 'digi'
358
+ | 'dt'
359
+ | 'docomo'
360
+ | 'dtac'
361
+ | 'etisalat'
362
+ | 'idea'
363
+ | 'kyivstar'
364
+ | 'meo'
365
+ | 'megafon'
366
+ | 'mtn'
367
+ | 'mtnza'
368
+ | 'mts'
369
+ | 'optus'
370
+ | 'orange'
371
+ | 'qwest'
372
+ | 'reliance_jio'
373
+ | 'robi'
374
+ | 'sprint'
375
+ | 'telefonica'
376
+ | 'telstra'
377
+ | 'tmobile'
378
+ | 'tigo'
379
+ | 'tim'
380
+ | 'verizon'
381
+ | 'vimpelcom'
382
+ | 'vodacomza'
383
+ | 'vodafone'
384
+ | 'vivo'
385
+ | 'zain'
386
+ | 'vivabo'
387
+ | 'telenormyanmar'
388
+ | 'kcelljsc'
389
+ | 'swisscom'
390
+ | 'singtel'
391
+ | 'asiacell'
392
+ | 'windit'
393
+ | 'cellc'
394
+ | 'ooredoo'
395
+ | 'drei'
396
+ | 'umobile'
397
+ | 'cableone'
398
+ | 'proximus'
399
+ | 'tele2'
400
+ | 'mobitel'
401
+ | 'o2'
402
+ | 'bouygues'
403
+ | 'free'
404
+ | 'sfr'
405
+ | 'digicel';
406
+
407
+ /**
408
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
409
+ * provided.
410
+ */
411
+ city?: string;
412
+
413
+ /**
414
+ * ISO 3166 country code or EU for the proxy exit node. Required if `city` is
415
+ * provided.
416
+ */
417
+ country?: string;
418
+
419
+ /**
420
+ * Two-letter state code.
421
+ */
422
+ state?: string;
423
+
424
+ /**
425
+ * US ZIP code.
426
+ */
427
+ zip?: string;
428
+ }
429
+
430
+ /**
431
+ * Configuration for a custom proxy (e.g., private proxy server).
432
+ */
433
+ export interface CustomProxyConfig {
434
+ /**
435
+ * Proxy host address or IP.
436
+ */
437
+ host: string;
438
+
439
+ /**
440
+ * Proxy port.
441
+ */
442
+ port: number;
443
+
444
+ /**
445
+ * Whether the proxy has a password.
446
+ */
447
+ has_password?: boolean;
448
+
449
+ /**
450
+ * Username for proxy authentication.
451
+ */
452
+ username?: string;
453
+ }
454
+ }
455
+
456
+ export type ProxyListResponse = Array<ProxyListResponse.ProxyListResponseItem>;
457
+
458
+ export namespace ProxyListResponse {
459
+ /**
460
+ * Configuration for routing traffic through a proxy.
461
+ */
462
+ export interface ProxyListResponseItem {
463
+ /**
464
+ * Proxy type to use. In terms of quality for avoiding bot-detection, from best to
465
+ * worst: `mobile` > `residential` > `isp` > `datacenter`.
466
+ */
467
+ type: 'datacenter' | 'isp' | 'residential' | 'mobile' | 'custom';
468
+
469
+ id?: string;
470
+
471
+ /**
472
+ * Configuration specific to the selected proxy `type`.
473
+ */
474
+ config?:
475
+ | ProxyListResponseItem.DatacenterProxyConfig
476
+ | ProxyListResponseItem.IspProxyConfig
477
+ | ProxyListResponseItem.ResidentialProxyConfig
478
+ | ProxyListResponseItem.MobileProxyConfig
479
+ | ProxyListResponseItem.CustomProxyConfig;
480
+
481
+ /**
482
+ * Readable name of the proxy.
483
+ */
484
+ name?: string;
485
+ }
486
+
487
+ export namespace ProxyListResponseItem {
488
+ /**
489
+ * Configuration for a datacenter proxy.
490
+ */
491
+ export interface DatacenterProxyConfig {
492
+ /**
493
+ * ISO 3166 country code or EU for the proxy exit node.
494
+ */
495
+ country: string;
496
+ }
497
+
498
+ /**
499
+ * Configuration for an ISP proxy.
500
+ */
501
+ export interface IspProxyConfig {
502
+ /**
503
+ * ISO 3166 country code or EU for the proxy exit node.
504
+ */
505
+ country: string;
506
+ }
507
+
508
+ /**
509
+ * Configuration for residential proxies.
510
+ */
511
+ export interface ResidentialProxyConfig {
512
+ /**
513
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
514
+ */
515
+ asn?: string;
516
+
517
+ /**
518
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
519
+ * provided.
520
+ */
521
+ city?: string;
522
+
523
+ /**
524
+ * ISO 3166 country code or EU for the proxy exit node. Required if `city` is
525
+ * provided.
526
+ */
527
+ country?: string;
528
+
529
+ /**
530
+ * Operating system of the residential device.
531
+ */
532
+ os?: 'windows' | 'macos' | 'android';
533
+
534
+ /**
535
+ * Two-letter state code.
536
+ */
537
+ state?: string;
538
+
539
+ /**
540
+ * US ZIP code.
541
+ */
542
+ zip?: string;
543
+ }
544
+
545
+ /**
546
+ * Configuration for mobile proxies.
547
+ */
548
+ export interface MobileProxyConfig {
549
+ /**
550
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
551
+ */
552
+ asn?: string;
553
+
554
+ /**
555
+ * Mobile carrier.
556
+ */
557
+ carrier?:
558
+ | 'a1'
559
+ | 'aircel'
560
+ | 'airtel'
561
+ | 'att'
562
+ | 'celcom'
563
+ | 'chinamobile'
564
+ | 'claro'
565
+ | 'comcast'
566
+ | 'cox'
567
+ | 'digi'
568
+ | 'dt'
569
+ | 'docomo'
570
+ | 'dtac'
571
+ | 'etisalat'
572
+ | 'idea'
573
+ | 'kyivstar'
574
+ | 'meo'
575
+ | 'megafon'
576
+ | 'mtn'
577
+ | 'mtnza'
578
+ | 'mts'
579
+ | 'optus'
580
+ | 'orange'
581
+ | 'qwest'
582
+ | 'reliance_jio'
583
+ | 'robi'
584
+ | 'sprint'
585
+ | 'telefonica'
586
+ | 'telstra'
587
+ | 'tmobile'
588
+ | 'tigo'
589
+ | 'tim'
590
+ | 'verizon'
591
+ | 'vimpelcom'
592
+ | 'vodacomza'
593
+ | 'vodafone'
594
+ | 'vivo'
595
+ | 'zain'
596
+ | 'vivabo'
597
+ | 'telenormyanmar'
598
+ | 'kcelljsc'
599
+ | 'swisscom'
600
+ | 'singtel'
601
+ | 'asiacell'
602
+ | 'windit'
603
+ | 'cellc'
604
+ | 'ooredoo'
605
+ | 'drei'
606
+ | 'umobile'
607
+ | 'cableone'
608
+ | 'proximus'
609
+ | 'tele2'
610
+ | 'mobitel'
611
+ | 'o2'
612
+ | 'bouygues'
613
+ | 'free'
614
+ | 'sfr'
615
+ | 'digicel';
616
+
617
+ /**
618
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
619
+ * provided.
620
+ */
621
+ city?: string;
622
+
623
+ /**
624
+ * ISO 3166 country code or EU for the proxy exit node. Required if `city` is
625
+ * provided.
626
+ */
627
+ country?: string;
628
+
629
+ /**
630
+ * Two-letter state code.
631
+ */
632
+ state?: string;
633
+
634
+ /**
635
+ * US ZIP code.
636
+ */
637
+ zip?: string;
638
+ }
639
+
640
+ /**
641
+ * Configuration for a custom proxy (e.g., private proxy server).
642
+ */
643
+ export interface CustomProxyConfig {
644
+ /**
645
+ * Proxy host address or IP.
646
+ */
647
+ host: string;
648
+
649
+ /**
650
+ * Proxy port.
651
+ */
652
+ port: number;
653
+
654
+ /**
655
+ * Whether the proxy has a password.
656
+ */
657
+ has_password?: boolean;
658
+
659
+ /**
660
+ * Username for proxy authentication.
661
+ */
662
+ username?: string;
663
+ }
664
+ }
665
+ }
666
+
667
+ export interface ProxyCreateParams {
668
+ /**
669
+ * Proxy type to use. In terms of quality for avoiding bot-detection, from best to
670
+ * worst: `mobile` > `residential` > `isp` > `datacenter`.
671
+ */
672
+ type: 'datacenter' | 'isp' | 'residential' | 'mobile' | 'custom';
673
+
674
+ /**
675
+ * Configuration specific to the selected proxy `type`.
676
+ */
677
+ config?:
678
+ | ProxyCreateParams.DatacenterProxyConfig
679
+ | ProxyCreateParams.IspProxyConfig
680
+ | ProxyCreateParams.ResidentialProxyConfig
681
+ | ProxyCreateParams.MobileProxyConfig
682
+ | ProxyCreateParams.CreateCustomProxyConfig;
683
+
684
+ /**
685
+ * Readable name of the proxy.
686
+ */
687
+ name?: string;
688
+ }
689
+
690
+ export namespace ProxyCreateParams {
691
+ /**
692
+ * Configuration for a datacenter proxy.
693
+ */
694
+ export interface DatacenterProxyConfig {
695
+ /**
696
+ * ISO 3166 country code or EU for the proxy exit node.
697
+ */
698
+ country: string;
699
+ }
700
+
701
+ /**
702
+ * Configuration for an ISP proxy.
703
+ */
704
+ export interface IspProxyConfig {
705
+ /**
706
+ * ISO 3166 country code or EU for the proxy exit node.
707
+ */
708
+ country: string;
709
+ }
710
+
711
+ /**
712
+ * Configuration for residential proxies.
713
+ */
714
+ export interface ResidentialProxyConfig {
715
+ /**
716
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
717
+ */
718
+ asn?: string;
719
+
720
+ /**
721
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
722
+ * provided.
723
+ */
724
+ city?: string;
725
+
726
+ /**
727
+ * ISO 3166 country code or EU for the proxy exit node. Required if `city` is
728
+ * provided.
729
+ */
730
+ country?: string;
731
+
732
+ /**
733
+ * Operating system of the residential device.
734
+ */
735
+ os?: 'windows' | 'macos' | 'android';
736
+
737
+ /**
738
+ * Two-letter state code.
739
+ */
740
+ state?: string;
741
+
742
+ /**
743
+ * US ZIP code.
744
+ */
745
+ zip?: string;
746
+ }
747
+
748
+ /**
749
+ * Configuration for mobile proxies.
750
+ */
751
+ export interface MobileProxyConfig {
752
+ /**
753
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
754
+ */
755
+ asn?: string;
756
+
757
+ /**
758
+ * Mobile carrier.
759
+ */
760
+ carrier?:
761
+ | 'a1'
762
+ | 'aircel'
763
+ | 'airtel'
764
+ | 'att'
765
+ | 'celcom'
766
+ | 'chinamobile'
767
+ | 'claro'
768
+ | 'comcast'
769
+ | 'cox'
770
+ | 'digi'
771
+ | 'dt'
772
+ | 'docomo'
773
+ | 'dtac'
774
+ | 'etisalat'
775
+ | 'idea'
776
+ | 'kyivstar'
777
+ | 'meo'
778
+ | 'megafon'
779
+ | 'mtn'
780
+ | 'mtnza'
781
+ | 'mts'
782
+ | 'optus'
783
+ | 'orange'
784
+ | 'qwest'
785
+ | 'reliance_jio'
786
+ | 'robi'
787
+ | 'sprint'
788
+ | 'telefonica'
789
+ | 'telstra'
790
+ | 'tmobile'
791
+ | 'tigo'
792
+ | 'tim'
793
+ | 'verizon'
794
+ | 'vimpelcom'
795
+ | 'vodacomza'
796
+ | 'vodafone'
797
+ | 'vivo'
798
+ | 'zain'
799
+ | 'vivabo'
800
+ | 'telenormyanmar'
801
+ | 'kcelljsc'
802
+ | 'swisscom'
803
+ | 'singtel'
804
+ | 'asiacell'
805
+ | 'windit'
806
+ | 'cellc'
807
+ | 'ooredoo'
808
+ | 'drei'
809
+ | 'umobile'
810
+ | 'cableone'
811
+ | 'proximus'
812
+ | 'tele2'
813
+ | 'mobitel'
814
+ | 'o2'
815
+ | 'bouygues'
816
+ | 'free'
817
+ | 'sfr'
818
+ | 'digicel';
819
+
820
+ /**
821
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
822
+ * provided.
823
+ */
824
+ city?: string;
825
+
826
+ /**
827
+ * ISO 3166 country code or EU for the proxy exit node. Required if `city` is
828
+ * provided.
829
+ */
830
+ country?: string;
831
+
832
+ /**
833
+ * Two-letter state code.
834
+ */
835
+ state?: string;
836
+
837
+ /**
838
+ * US ZIP code.
839
+ */
840
+ zip?: string;
841
+ }
842
+
843
+ /**
844
+ * Configuration for a custom proxy (e.g., private proxy server).
845
+ */
846
+ export interface CreateCustomProxyConfig {
847
+ /**
848
+ * Proxy host address or IP.
849
+ */
850
+ host: string;
851
+
852
+ /**
853
+ * Proxy port.
854
+ */
855
+ port: number;
856
+
857
+ /**
858
+ * Password for proxy authentication.
859
+ */
860
+ password?: string;
861
+
862
+ /**
863
+ * Username for proxy authentication.
864
+ */
865
+ username?: string;
866
+ }
867
+ }
868
+
869
+ export declare namespace Proxies {
870
+ export {
871
+ type ProxyCreateResponse as ProxyCreateResponse,
872
+ type ProxyRetrieveResponse as ProxyRetrieveResponse,
873
+ type ProxyListResponse as ProxyListResponse,
874
+ type ProxyCreateParams as ProxyCreateParams,
875
+ };
876
+ }