@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.
- package/CHANGELOG.md +25 -0
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/api-keys.d.mts +10 -2
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +10 -2
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/audit-logs.d.mts +2 -2
- package/resources/audit-logs.d.mts.map +1 -1
- package/resources/audit-logs.d.ts +2 -2
- package/resources/audit-logs.d.ts.map +1 -1
- package/resources/auth/connections.d.mts +30 -10
- package/resources/auth/connections.d.mts.map +1 -1
- package/resources/auth/connections.d.ts +30 -10
- package/resources/auth/connections.d.ts.map +1 -1
- package/resources/browser-pools.d.mts +56 -45
- package/resources/browser-pools.d.mts.map +1 -1
- package/resources/browser-pools.d.ts +56 -45
- package/resources/browser-pools.d.ts.map +1 -1
- package/resources/browsers/telemetry.d.mts +4 -1
- package/resources/browsers/telemetry.d.mts.map +1 -1
- package/resources/browsers/telemetry.d.ts +4 -1
- package/resources/browsers/telemetry.d.ts.map +1 -1
- package/resources/credential-providers.d.mts +2 -1
- package/resources/credential-providers.d.mts.map +1 -1
- package/resources/credential-providers.d.ts +2 -1
- package/resources/credential-providers.d.ts.map +1 -1
- package/resources/credentials.d.mts +2 -1
- package/resources/credentials.d.mts.map +1 -1
- package/resources/credentials.d.ts +2 -1
- package/resources/credentials.d.ts.map +1 -1
- package/resources/deployments.d.mts +112 -0
- package/resources/deployments.d.mts.map +1 -1
- package/resources/deployments.d.ts +112 -0
- package/resources/deployments.d.ts.map +1 -1
- package/resources/extensions.d.mts +9 -1
- package/resources/extensions.d.mts.map +1 -1
- package/resources/extensions.d.ts +9 -1
- package/resources/extensions.d.ts.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/organization/limits.d.mts +14 -13
- package/resources/organization/limits.d.mts.map +1 -1
- package/resources/organization/limits.d.ts +14 -13
- package/resources/organization/limits.d.ts.map +1 -1
- package/resources/organization/limits.js +4 -4
- package/resources/organization/limits.js.map +1 -1
- package/resources/organization/limits.mjs +4 -4
- package/resources/organization/limits.mjs.map +1 -1
- package/resources/profiles.d.mts +72 -3
- package/resources/profiles.d.mts.map +1 -1
- package/resources/profiles.d.ts +72 -3
- package/resources/profiles.d.ts.map +1 -1
- package/resources/profiles.js +54 -0
- package/resources/profiles.js.map +1 -1
- package/resources/profiles.mjs +54 -0
- package/resources/profiles.mjs.map +1 -1
- package/resources/projects/limits.d.mts +18 -12
- package/resources/projects/limits.d.mts.map +1 -1
- package/resources/projects/limits.d.ts +18 -12
- package/resources/projects/limits.d.ts.map +1 -1
- package/resources/projects/projects.d.mts +5 -0
- package/resources/projects/projects.d.mts.map +1 -1
- package/resources/projects/projects.d.ts +5 -0
- package/resources/projects/projects.d.ts.map +1 -1
- package/resources/projects/projects.js.map +1 -1
- package/resources/projects/projects.mjs.map +1 -1
- package/resources/proxies.d.mts +187 -2
- package/resources/proxies.d.mts.map +1 -1
- package/resources/proxies.d.ts +187 -2
- package/resources/proxies.d.ts.map +1 -1
- package/resources/proxies.js +46 -0
- package/resources/proxies.js.map +1 -1
- package/resources/proxies.mjs +46 -0
- package/resources/proxies.mjs.map +1 -1
- package/src/client.ts +6 -1
- package/src/resources/api-keys.ts +11 -2
- package/src/resources/audit-logs.ts +2 -2
- package/src/resources/auth/connections.ts +30 -10
- package/src/resources/browser-pools.ts +57 -45
- package/src/resources/browsers/telemetry.ts +4 -1
- package/src/resources/credential-providers.ts +2 -1
- package/src/resources/credentials.ts +2 -1
- package/src/resources/deployments.ts +132 -0
- package/src/resources/extensions.ts +10 -1
- package/src/resources/index.ts +8 -1
- package/src/resources/organization/limits.ts +14 -13
- package/src/resources/profiles.ts +85 -3
- package/src/resources/projects/limits.ts +18 -12
- package/src/resources/projects/projects.ts +6 -0
- package/src/resources/proxies.ts +222 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/proxies.ts
CHANGED
|
@@ -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
|
-
*
|
|
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.
|
|
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.
|
|
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.
|
|
1
|
+
export declare const VERSION = "0.78.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.78.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|