@onkernel/sdk 0.76.0 → 0.78.0

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 (106) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/client.d.mts +4 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +4 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/api-keys.d.mts +10 -2
  10. package/resources/api-keys.d.mts.map +1 -1
  11. package/resources/api-keys.d.ts +10 -2
  12. package/resources/api-keys.d.ts.map +1 -1
  13. package/resources/audit-logs.d.mts +2 -2
  14. package/resources/audit-logs.d.mts.map +1 -1
  15. package/resources/audit-logs.d.ts +2 -2
  16. package/resources/audit-logs.d.ts.map +1 -1
  17. package/resources/auth/connections.d.mts +30 -10
  18. package/resources/auth/connections.d.mts.map +1 -1
  19. package/resources/auth/connections.d.ts +30 -10
  20. package/resources/auth/connections.d.ts.map +1 -1
  21. package/resources/browser-pools.d.mts +56 -45
  22. package/resources/browser-pools.d.mts.map +1 -1
  23. package/resources/browser-pools.d.ts +56 -45
  24. package/resources/browser-pools.d.ts.map +1 -1
  25. package/resources/browsers/telemetry.d.mts +4 -1
  26. package/resources/browsers/telemetry.d.mts.map +1 -1
  27. package/resources/browsers/telemetry.d.ts +4 -1
  28. package/resources/browsers/telemetry.d.ts.map +1 -1
  29. package/resources/credential-providers.d.mts +2 -1
  30. package/resources/credential-providers.d.mts.map +1 -1
  31. package/resources/credential-providers.d.ts +2 -1
  32. package/resources/credential-providers.d.ts.map +1 -1
  33. package/resources/credentials.d.mts +2 -1
  34. package/resources/credentials.d.mts.map +1 -1
  35. package/resources/credentials.d.ts +2 -1
  36. package/resources/credentials.d.ts.map +1 -1
  37. package/resources/deployments.d.mts +112 -0
  38. package/resources/deployments.d.mts.map +1 -1
  39. package/resources/deployments.d.ts +112 -0
  40. package/resources/deployments.d.ts.map +1 -1
  41. package/resources/extensions.d.mts +9 -1
  42. package/resources/extensions.d.mts.map +1 -1
  43. package/resources/extensions.d.ts +9 -1
  44. package/resources/extensions.d.ts.map +1 -1
  45. package/resources/index.d.mts +2 -2
  46. package/resources/index.d.mts.map +1 -1
  47. package/resources/index.d.ts +2 -2
  48. package/resources/index.d.ts.map +1 -1
  49. package/resources/index.js.map +1 -1
  50. package/resources/index.mjs +1 -1
  51. package/resources/index.mjs.map +1 -1
  52. package/resources/organization/limits.d.mts +14 -13
  53. package/resources/organization/limits.d.mts.map +1 -1
  54. package/resources/organization/limits.d.ts +14 -13
  55. package/resources/organization/limits.d.ts.map +1 -1
  56. package/resources/organization/limits.js +4 -4
  57. package/resources/organization/limits.js.map +1 -1
  58. package/resources/organization/limits.mjs +4 -4
  59. package/resources/organization/limits.mjs.map +1 -1
  60. package/resources/profiles.d.mts +72 -3
  61. package/resources/profiles.d.mts.map +1 -1
  62. package/resources/profiles.d.ts +72 -3
  63. package/resources/profiles.d.ts.map +1 -1
  64. package/resources/profiles.js +54 -0
  65. package/resources/profiles.js.map +1 -1
  66. package/resources/profiles.mjs +54 -0
  67. package/resources/profiles.mjs.map +1 -1
  68. package/resources/projects/limits.d.mts +18 -12
  69. package/resources/projects/limits.d.mts.map +1 -1
  70. package/resources/projects/limits.d.ts +18 -12
  71. package/resources/projects/limits.d.ts.map +1 -1
  72. package/resources/projects/projects.d.mts +5 -0
  73. package/resources/projects/projects.d.mts.map +1 -1
  74. package/resources/projects/projects.d.ts +5 -0
  75. package/resources/projects/projects.d.ts.map +1 -1
  76. package/resources/projects/projects.js.map +1 -1
  77. package/resources/projects/projects.mjs.map +1 -1
  78. package/resources/proxies.d.mts +187 -2
  79. package/resources/proxies.d.mts.map +1 -1
  80. package/resources/proxies.d.ts +187 -2
  81. package/resources/proxies.d.ts.map +1 -1
  82. package/resources/proxies.js +46 -0
  83. package/resources/proxies.js.map +1 -1
  84. package/resources/proxies.mjs +46 -0
  85. package/resources/proxies.mjs.map +1 -1
  86. package/src/client.ts +6 -1
  87. package/src/resources/api-keys.ts +11 -2
  88. package/src/resources/audit-logs.ts +2 -2
  89. package/src/resources/auth/connections.ts +30 -10
  90. package/src/resources/browser-pools.ts +57 -45
  91. package/src/resources/browsers/telemetry.ts +4 -1
  92. package/src/resources/credential-providers.ts +2 -1
  93. package/src/resources/credentials.ts +2 -1
  94. package/src/resources/deployments.ts +132 -0
  95. package/src/resources/extensions.ts +10 -1
  96. package/src/resources/index.ts +8 -1
  97. package/src/resources/organization/limits.ts +14 -13
  98. package/src/resources/profiles.ts +85 -3
  99. package/src/resources/projects/limits.ts +18 -12
  100. package/src/resources/projects/projects.ts +6 -0
  101. package/src/resources/proxies.ts +222 -1
  102. package/src/version.ts +1 -1
  103. package/version.d.mts +1 -1
  104. package/version.d.ts +1 -1
  105. package/version.js +1 -1
  106. package/version.mjs +1 -1
@@ -13,6 +13,13 @@ import { path } from '../internal/utils/path';
13
13
  export class Proxies extends APIResource {
14
14
  /**
15
15
  * Create a new proxy configuration in the resolved project.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const proxy = await client.proxies.create({
20
+ * type: 'datacenter',
21
+ * });
22
+ * ```
16
23
  */
17
24
  create(body: ProxyCreateParams, options?: RequestOptions): APIPromise<ProxyCreateResponse> {
18
25
  return this._client.post('/proxies', { body, ...options });
@@ -20,13 +27,43 @@ export class Proxies extends APIResource {
20
27
 
21
28
  /**
22
29
  * Retrieve a proxy in the resolved project by ID.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const proxy = await client.proxies.retrieve('id');
34
+ * ```
23
35
  */
24
36
  retrieve(id: string, options?: RequestOptions): APIPromise<ProxyRetrieveResponse> {
25
37
  return this._client.get(path`/proxies/${id}`, options);
26
38
  }
27
39
 
40
+ /**
41
+ * Update a proxy's name. Proxy names are not unique and are not ID-or-name
42
+ * addressable on this endpoint; duplicate names are allowed. Name-based
43
+ * session-create lookups can remain ambiguous until callers resolve proxies by ID
44
+ * or the API adds a stronger uniqueness contract.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * const proxy = await client.proxies.update('id', {
49
+ * name: 'my-renamed-proxy',
50
+ * });
51
+ * ```
52
+ */
53
+ update(id: string, body: ProxyUpdateParams, options?: RequestOptions): APIPromise<ProxyUpdateResponse> {
54
+ return this._client.patch(path`/proxies/${id}`, { body, ...options });
55
+ }
56
+
28
57
  /**
29
58
  * List proxies in the resolved project.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * // Automatically fetches more pages as needed.
63
+ * for await (const proxyListResponse of client.proxies.list()) {
64
+ * // ...
65
+ * }
66
+ * ```
30
67
  */
31
68
  list(
32
69
  query: ProxyListParams | null | undefined = {},
@@ -37,6 +74,11 @@ export class Proxies extends APIResource {
37
74
 
38
75
  /**
39
76
  * Soft delete a proxy. Sessions referencing it are not modified.
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * await client.proxies.delete('id');
81
+ * ```
40
82
  */
41
83
  delete(id: string, options?: RequestOptions): APIPromise<void> {
42
84
  return this._client.delete(path`/proxies/${id}`, {
@@ -52,6 +94,11 @@ export class Proxies extends APIResource {
52
94
  * exit IP. For residential and mobile proxies, the exit node varies between
53
95
  * requests, so this validates proxy configuration and connectivity rather than
54
96
  * guaranteeing site-specific reachability.
97
+ *
98
+ * @example
99
+ * ```ts
100
+ * const response = await client.proxies.check('id');
101
+ * ```
55
102
  */
56
103
  check(
57
104
  id: string,
@@ -376,6 +423,162 @@ export namespace ProxyRetrieveResponse {
376
423
  }
377
424
  }
378
425
 
426
+ /**
427
+ * Configuration for routing traffic through a proxy.
428
+ */
429
+ export interface ProxyUpdateResponse {
430
+ /**
431
+ * Proxy type to use. In terms of quality for avoiding bot-detection, from best to
432
+ * worst: `mobile` > `residential` > `isp` > `datacenter`.
433
+ */
434
+ type: 'datacenter' | 'isp' | 'residential' | 'mobile' | 'custom';
435
+
436
+ id?: string;
437
+
438
+ /**
439
+ * Hostnames that should bypass the parent proxy and connect directly.
440
+ */
441
+ bypass_hosts?: Array<string>;
442
+
443
+ /**
444
+ * Configuration specific to the selected proxy `type`.
445
+ */
446
+ config?:
447
+ | ProxyUpdateResponse.DatacenterProxyConfig
448
+ | ProxyUpdateResponse.IspProxyConfig
449
+ | ProxyUpdateResponse.ResidentialProxyConfig
450
+ | ProxyUpdateResponse.MobileProxyConfig
451
+ | ProxyUpdateResponse.CustomProxyConfig;
452
+
453
+ /**
454
+ * IP address that the proxy uses when making requests.
455
+ */
456
+ ip_address?: string;
457
+
458
+ /**
459
+ * Timestamp of the last health check performed on this proxy.
460
+ */
461
+ last_checked?: string;
462
+
463
+ /**
464
+ * Readable name of the proxy.
465
+ */
466
+ name?: string;
467
+
468
+ /**
469
+ * Protocol to use for the proxy connection.
470
+ */
471
+ protocol?: 'http' | 'https';
472
+
473
+ /**
474
+ * Current health status of the proxy.
475
+ */
476
+ status?: 'available' | 'unavailable';
477
+ }
478
+
479
+ export namespace ProxyUpdateResponse {
480
+ /**
481
+ * Configuration for a datacenter proxy.
482
+ */
483
+ export interface DatacenterProxyConfig {
484
+ /**
485
+ * ISO 3166 country code. Defaults to US if not provided.
486
+ */
487
+ country?: string;
488
+ }
489
+
490
+ /**
491
+ * Configuration for an ISP proxy.
492
+ */
493
+ export interface IspProxyConfig {
494
+ /**
495
+ * ISO 3166 country code. Defaults to US if not provided.
496
+ */
497
+ country?: string;
498
+ }
499
+
500
+ /**
501
+ * Configuration for residential proxies.
502
+ */
503
+ export interface ResidentialProxyConfig {
504
+ /**
505
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
506
+ */
507
+ asn?: string;
508
+
509
+ /**
510
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
511
+ * provided.
512
+ */
513
+ city?: string;
514
+
515
+ /**
516
+ * ISO 3166 country code.
517
+ */
518
+ country?: string;
519
+
520
+ /**
521
+ * @deprecated Operating system of the residential device.
522
+ */
523
+ os?: 'windows' | 'macos' | 'android';
524
+
525
+ /**
526
+ * Two-letter state code.
527
+ */
528
+ state?: string;
529
+
530
+ /**
531
+ * US ZIP code.
532
+ */
533
+ zip?: string;
534
+ }
535
+
536
+ /**
537
+ * Configuration for mobile proxies.
538
+ */
539
+ export interface MobileProxyConfig {
540
+ /**
541
+ * Provider city alias. Mobile carrier routing can make observed geo vary.
542
+ */
543
+ city?: string;
544
+
545
+ /**
546
+ * ISO 3166 country code
547
+ */
548
+ country?: string;
549
+
550
+ /**
551
+ * US-only state code. Mobile carrier routing can make observed geo vary.
552
+ */
553
+ state?: string;
554
+ }
555
+
556
+ /**
557
+ * Configuration for a custom proxy (e.g., private proxy server).
558
+ */
559
+ export interface CustomProxyConfig {
560
+ /**
561
+ * Proxy host address or IP.
562
+ */
563
+ host: string;
564
+
565
+ /**
566
+ * Proxy port.
567
+ */
568
+ port: number;
569
+
570
+ /**
571
+ * Whether the proxy has a password.
572
+ */
573
+ has_password?: boolean;
574
+
575
+ /**
576
+ * Username for proxy authentication.
577
+ */
578
+ username?: string;
579
+ }
580
+ }
581
+
379
582
  /**
380
583
  * Configuration for routing traffic through a proxy.
381
584
  */
@@ -824,9 +1027,25 @@ export namespace ProxyCreateParams {
824
1027
  }
825
1028
  }
826
1029
 
1030
+ export interface ProxyUpdateParams {
1031
+ /**
1032
+ * New proxy name. Proxy names are trimmed and length-checked only; duplicates are
1033
+ * allowed because proxies are updated by ID, not by name.
1034
+ */
1035
+ name: string;
1036
+ }
1037
+
827
1038
  export interface ProxyListParams extends OffsetPaginationParams {
828
1039
  /**
829
- * Search proxies by name, host, IP address, or ID.
1040
+ * Exact-match filter on proxy name using the database collation. In production,
1041
+ * matching is case- and accent-insensitive. Names are not required to be unique,
1042
+ * so multiple proxies may match.
1043
+ */
1044
+ name?: string;
1045
+
1046
+ /**
1047
+ * Case-insensitive substring match against proxy name, host, or IP address. IDs
1048
+ * match by exact value.
830
1049
  */
831
1050
  query?: string;
832
1051
  }
@@ -853,10 +1072,12 @@ export declare namespace Proxies {
853
1072
  export {
854
1073
  type ProxyCreateResponse as ProxyCreateResponse,
855
1074
  type ProxyRetrieveResponse as ProxyRetrieveResponse,
1075
+ type ProxyUpdateResponse as ProxyUpdateResponse,
856
1076
  type ProxyListResponse as ProxyListResponse,
857
1077
  type ProxyCheckResponse as ProxyCheckResponse,
858
1078
  type ProxyListResponsesOffsetPagination as ProxyListResponsesOffsetPagination,
859
1079
  type ProxyCreateParams as ProxyCreateParams,
1080
+ type ProxyUpdateParams as ProxyUpdateParams,
860
1081
  type ProxyListParams as ProxyListParams,
861
1082
  type ProxyCheckParams as ProxyCheckParams,
862
1083
  };
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.76.0'; // x-release-please-version
1
+ export const VERSION = '0.78.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.76.0";
1
+ export declare const VERSION = "0.78.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.76.0";
1
+ export declare const VERSION = "0.78.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.76.0'; // x-release-please-version
4
+ exports.VERSION = '0.78.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.76.0'; // x-release-please-version
1
+ export const VERSION = '0.78.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map