@onkernel/sdk 0.55.0 → 0.58.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 +34 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/streaming.d.mts.map +1 -1
- package/core/streaming.d.ts.map +1 -1
- package/core/streaming.mjs.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/decoders/line.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/lib/browser-fetch.d.mts.map +1 -1
- package/lib/browser-fetch.d.ts.map +1 -1
- package/lib/browser-fetch.mjs.map +1 -1
- package/lib/browser-routing.d.mts.map +1 -1
- package/lib/browser-routing.d.ts.map +1 -1
- package/lib/browser-routing.mjs.map +1 -1
- package/package.json +1 -1
- package/pagination.d.mts +1 -0
- package/pagination.d.mts.map +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.mjs +1 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/api-keys.d.mts +146 -0
- package/resources/api-keys.d.mts.map +1 -0
- package/resources/api-keys.d.ts +146 -0
- package/resources/api-keys.d.ts.map +1 -0
- package/resources/api-keys.js +81 -0
- package/resources/api-keys.js.map +1 -0
- package/resources/api-keys.mjs +77 -0
- package/resources/api-keys.mjs.map +1 -0
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.mjs.map +1 -1
- package/resources/auth/auth.d.mts.map +1 -1
- package/resources/auth/auth.d.ts.map +1 -1
- package/resources/auth/auth.mjs.map +1 -1
- package/resources/auth/connections.d.mts +35 -5
- package/resources/auth/connections.d.mts.map +1 -1
- package/resources/auth/connections.d.ts +35 -5
- package/resources/auth/connections.d.ts.map +1 -1
- package/resources/auth/connections.mjs.map +1 -1
- package/resources/auth/index.d.mts.map +1 -1
- package/resources/auth/index.d.ts.map +1 -1
- package/resources/auth/index.mjs.map +1 -1
- package/resources/auth.d.mts.map +1 -1
- package/resources/auth.d.ts.map +1 -1
- package/resources/auth.mjs.map +1 -1
- package/resources/browser-pools.d.mts +33 -15
- package/resources/browser-pools.d.mts.map +1 -1
- package/resources/browser-pools.d.ts +33 -15
- package/resources/browser-pools.d.ts.map +1 -1
- package/resources/browser-pools.js.map +1 -1
- package/resources/browser-pools.mjs.map +1 -1
- package/resources/browsers/browsers.d.mts +144 -53
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +144 -53
- package/resources/browsers/browsers.d.ts.map +1 -1
- package/resources/browsers/browsers.js +4 -14
- package/resources/browsers/browsers.js.map +1 -1
- package/resources/browsers/browsers.mjs +4 -14
- package/resources/browsers/browsers.mjs.map +1 -1
- package/resources/browsers/computer.d.mts.map +1 -1
- package/resources/browsers/computer.d.ts.map +1 -1
- package/resources/browsers/computer.mjs.map +1 -1
- package/resources/browsers/fs/fs.d.mts.map +1 -1
- package/resources/browsers/fs/fs.d.ts.map +1 -1
- package/resources/browsers/fs/fs.mjs.map +1 -1
- package/resources/browsers/fs/index.d.mts.map +1 -1
- package/resources/browsers/fs/index.d.ts.map +1 -1
- package/resources/browsers/fs/index.mjs.map +1 -1
- package/resources/browsers/fs/watch.d.mts.map +1 -1
- package/resources/browsers/fs/watch.d.ts.map +1 -1
- package/resources/browsers/fs/watch.mjs.map +1 -1
- package/resources/browsers/fs.d.mts.map +1 -1
- package/resources/browsers/fs.d.ts.map +1 -1
- package/resources/browsers/fs.mjs.map +1 -1
- package/resources/browsers/index.d.mts +2 -1
- package/resources/browsers/index.d.mts.map +1 -1
- package/resources/browsers/index.d.ts +2 -1
- package/resources/browsers/index.d.ts.map +1 -1
- package/resources/browsers/index.js +3 -1
- package/resources/browsers/index.js.map +1 -1
- package/resources/browsers/index.mjs +1 -0
- package/resources/browsers/index.mjs.map +1 -1
- package/resources/browsers/logs.d.mts.map +1 -1
- package/resources/browsers/logs.d.ts.map +1 -1
- package/resources/browsers/logs.mjs.map +1 -1
- package/resources/browsers/playwright.d.mts.map +1 -1
- package/resources/browsers/playwright.d.ts.map +1 -1
- package/resources/browsers/playwright.mjs.map +1 -1
- package/resources/browsers/process.d.mts.map +1 -1
- package/resources/browsers/process.d.ts.map +1 -1
- package/resources/browsers/process.mjs.map +1 -1
- package/resources/browsers/replays.d.mts.map +1 -1
- package/resources/browsers/replays.d.ts.map +1 -1
- package/resources/browsers/replays.mjs.map +1 -1
- package/resources/browsers/telemetry.d.mts +1230 -0
- package/resources/browsers/telemetry.d.mts.map +1 -0
- package/resources/browsers/telemetry.d.ts +1230 -0
- package/resources/browsers/telemetry.d.ts.map +1 -0
- package/resources/browsers/telemetry.js +45 -0
- package/resources/browsers/telemetry.js.map +1 -0
- package/resources/browsers/telemetry.mjs +41 -0
- package/resources/browsers/telemetry.mjs.map +1 -0
- package/resources/browsers.d.mts.map +1 -1
- package/resources/browsers.d.ts.map +1 -1
- package/resources/browsers.mjs.map +1 -1
- package/resources/credential-providers.d.mts.map +1 -1
- package/resources/credential-providers.d.ts.map +1 -1
- package/resources/credential-providers.mjs.map +1 -1
- package/resources/credentials.d.mts.map +1 -1
- package/resources/credentials.d.ts.map +1 -1
- package/resources/credentials.mjs.map +1 -1
- package/resources/deployments.d.mts.map +1 -1
- package/resources/deployments.d.ts.map +1 -1
- package/resources/deployments.mjs.map +1 -1
- package/resources/extensions.d.mts.map +1 -1
- package/resources/extensions.d.ts.map +1 -1
- package/resources/extensions.mjs.map +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invocations.d.mts +18 -6
- package/resources/invocations.d.mts.map +1 -1
- package/resources/invocations.d.ts +18 -6
- package/resources/invocations.d.ts.map +1 -1
- package/resources/invocations.js.map +1 -1
- package/resources/invocations.mjs.map +1 -1
- package/resources/profiles.d.mts.map +1 -1
- package/resources/profiles.d.ts.map +1 -1
- package/resources/profiles.mjs.map +1 -1
- package/resources/projects/index.d.mts.map +1 -1
- package/resources/projects/index.d.ts.map +1 -1
- package/resources/projects/index.mjs.map +1 -1
- package/resources/projects/limits.d.mts +0 -15
- package/resources/projects/limits.d.mts.map +1 -1
- package/resources/projects/limits.d.ts +0 -15
- package/resources/projects/limits.d.ts.map +1 -1
- package/resources/projects/limits.js +2 -2
- package/resources/projects/limits.js.map +1 -1
- package/resources/projects/limits.mjs +2 -2
- package/resources/projects/limits.mjs.map +1 -1
- package/resources/projects/projects.d.mts +1 -2
- package/resources/projects/projects.d.mts.map +1 -1
- package/resources/projects/projects.d.ts +1 -2
- package/resources/projects/projects.d.ts.map +1 -1
- package/resources/projects/projects.js +6 -7
- package/resources/projects/projects.js.map +1 -1
- package/resources/projects/projects.mjs +6 -7
- package/resources/projects/projects.mjs.map +1 -1
- package/resources/projects.d.mts.map +1 -1
- package/resources/projects.d.ts.map +1 -1
- package/resources/projects.mjs.map +1 -1
- package/resources/proxies.d.mts +3 -1
- package/resources/proxies.d.mts.map +1 -1
- package/resources/proxies.d.ts +3 -1
- package/resources/proxies.d.ts.map +1 -1
- package/resources/proxies.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +24 -4
- package/src/resources/api-keys.ts +195 -0
- package/src/resources/auth/connections.ts +49 -5
- package/src/resources/browser-pools.ts +33 -16
- package/src/resources/browsers/browsers.ts +218 -69
- package/src/resources/browsers/index.ts +35 -2
- package/src/resources/browsers/telemetry.ts +1521 -0
- package/src/resources/index.ts +9 -2
- package/src/resources/invocations.ts +18 -7
- package/src/resources/projects/limits.ts +2 -20
- package/src/resources/projects/projects.ts +6 -7
- package/src/resources/proxies.ts +3 -1
- package/src/version.ts +1 -1
- package/streaming.d.mts +1 -0
- package/streaming.d.mts.map +1 -1
- package/streaming.d.ts +1 -0
- package/streaming.d.ts.map +1 -1
- package/streaming.mjs +1 -0
- package/streaming.mjs.map +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +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/client.ts
CHANGED
|
@@ -19,6 +19,15 @@ import { AbstractPage, type OffsetPaginationParams, OffsetPaginationResponse } f
|
|
|
19
19
|
import * as Uploads from './core/uploads';
|
|
20
20
|
import * as API from './resources/index';
|
|
21
21
|
import { APIPromise } from './core/api-promise';
|
|
22
|
+
import {
|
|
23
|
+
APIKey,
|
|
24
|
+
APIKeyCreateParams,
|
|
25
|
+
APIKeyListParams,
|
|
26
|
+
APIKeyUpdateParams,
|
|
27
|
+
APIKeys,
|
|
28
|
+
APIKeysOffsetPagination,
|
|
29
|
+
CreatedAPIKey,
|
|
30
|
+
} from './resources/api-keys';
|
|
22
31
|
import { AppListParams, AppListResponse, AppListResponsesOffsetPagination, Apps } from './resources/apps';
|
|
23
32
|
import {
|
|
24
33
|
BrowserRouteCache,
|
|
@@ -110,12 +119,10 @@ import {
|
|
|
110
119
|
BrowserCreateResponse,
|
|
111
120
|
BrowserCurlParams,
|
|
112
121
|
BrowserCurlResponse,
|
|
113
|
-
BrowserDeleteParams,
|
|
114
122
|
BrowserListParams,
|
|
115
123
|
BrowserListResponse,
|
|
116
124
|
BrowserListResponsesOffsetPagination,
|
|
117
125
|
BrowserLoadExtensionsParams,
|
|
118
|
-
BrowserPersistence,
|
|
119
126
|
BrowserPoolRef,
|
|
120
127
|
BrowserRetrieveParams,
|
|
121
128
|
BrowserRetrieveResponse,
|
|
@@ -972,6 +979,10 @@ export class Kernel {
|
|
|
972
979
|
* Create and manage projects for resource isolation within an organization.
|
|
973
980
|
*/
|
|
974
981
|
projects: API.Projects = new API.Projects(this);
|
|
982
|
+
/**
|
|
983
|
+
* Create and manage API keys for organization and project-scoped access.
|
|
984
|
+
*/
|
|
985
|
+
apiKeys: API.APIKeys = new API.APIKeys(this);
|
|
975
986
|
/**
|
|
976
987
|
* Configure external credential providers like 1Password.
|
|
977
988
|
*/
|
|
@@ -989,6 +1000,7 @@ Kernel.Extensions = Extensions;
|
|
|
989
1000
|
Kernel.BrowserPools = BrowserPools;
|
|
990
1001
|
Kernel.Credentials = Credentials;
|
|
991
1002
|
Kernel.Projects = Projects;
|
|
1003
|
+
Kernel.APIKeys = APIKeys;
|
|
992
1004
|
Kernel.CredentialProviders = CredentialProviders;
|
|
993
1005
|
|
|
994
1006
|
export declare namespace Kernel {
|
|
@@ -1038,7 +1050,6 @@ export declare namespace Kernel {
|
|
|
1038
1050
|
|
|
1039
1051
|
export {
|
|
1040
1052
|
Browsers as Browsers,
|
|
1041
|
-
type BrowserPersistence as BrowserPersistence,
|
|
1042
1053
|
type BrowserPoolRef as BrowserPoolRef,
|
|
1043
1054
|
type BrowserUsage as BrowserUsage,
|
|
1044
1055
|
type Profile as Profile,
|
|
@@ -1052,7 +1063,6 @@ export declare namespace Kernel {
|
|
|
1052
1063
|
type BrowserRetrieveParams as BrowserRetrieveParams,
|
|
1053
1064
|
type BrowserUpdateParams as BrowserUpdateParams,
|
|
1054
1065
|
type BrowserListParams as BrowserListParams,
|
|
1055
|
-
type BrowserDeleteParams as BrowserDeleteParams,
|
|
1056
1066
|
type BrowserCurlParams as BrowserCurlParams,
|
|
1057
1067
|
type BrowserLoadExtensionsParams as BrowserLoadExtensionsParams,
|
|
1058
1068
|
};
|
|
@@ -1118,6 +1128,16 @@ export declare namespace Kernel {
|
|
|
1118
1128
|
type ProjectListParams as ProjectListParams,
|
|
1119
1129
|
};
|
|
1120
1130
|
|
|
1131
|
+
export {
|
|
1132
|
+
APIKeys as APIKeys,
|
|
1133
|
+
type APIKey as APIKey,
|
|
1134
|
+
type CreatedAPIKey as CreatedAPIKey,
|
|
1135
|
+
type APIKeysOffsetPagination as APIKeysOffsetPagination,
|
|
1136
|
+
type APIKeyCreateParams as APIKeyCreateParams,
|
|
1137
|
+
type APIKeyUpdateParams as APIKeyUpdateParams,
|
|
1138
|
+
type APIKeyListParams as APIKeyListParams,
|
|
1139
|
+
};
|
|
1140
|
+
|
|
1121
1141
|
export {
|
|
1122
1142
|
CredentialProviders as CredentialProviders,
|
|
1123
1143
|
type CreateCredentialProviderRequest as CreateCredentialProviderRequest,
|
|
@@ -0,0 +1,195 @@
|
|
|
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 { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../core/pagination';
|
|
6
|
+
import { buildHeaders } from '../internal/headers';
|
|
7
|
+
import { RequestOptions } from '../internal/request-options';
|
|
8
|
+
import { path } from '../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Create and manage API keys for organization and project-scoped access.
|
|
12
|
+
*/
|
|
13
|
+
export class APIKeys extends APIResource {
|
|
14
|
+
/**
|
|
15
|
+
* Create a new API key within the authenticated organization.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const createdAPIKey = await client.apiKeys.create({
|
|
20
|
+
* name: 'staging',
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
create(body: APIKeyCreateParams, options?: RequestOptions): APIPromise<CreatedAPIKey> {
|
|
25
|
+
return this._client.post('/org/api_keys', { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Retrieve an API key by ID for the authenticated organization. API keys are
|
|
30
|
+
* masked.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const apiKey = await client.apiKeys.retrieve('id');
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<APIKey> {
|
|
38
|
+
return this._client.get(path`/org/api_keys/${id}`, options);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Update an API key's name.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const apiKey = await client.apiKeys.update('id', {
|
|
47
|
+
* name: 'new-api-name',
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
update(id: string, body: APIKeyUpdateParams, options?: RequestOptions): APIPromise<APIKey> {
|
|
52
|
+
return this._client.patch(path`/org/api_keys/${id}`, { body, ...options });
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* List API keys for the authenticated organization. API keys are masked.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* // Automatically fetches more pages as needed.
|
|
61
|
+
* for await (const apiKey of client.apiKeys.list()) {
|
|
62
|
+
* // ...
|
|
63
|
+
* }
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
list(
|
|
67
|
+
query: APIKeyListParams | null | undefined = {},
|
|
68
|
+
options?: RequestOptions,
|
|
69
|
+
): PagePromise<APIKeysOffsetPagination, APIKey> {
|
|
70
|
+
return this._client.getAPIList('/org/api_keys', OffsetPagination<APIKey>, { query, ...options });
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Delete an API key.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* await client.apiKeys.delete('id');
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
82
|
+
return this._client.delete(path`/org/api_keys/${id}`, {
|
|
83
|
+
...options,
|
|
84
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export type APIKeysOffsetPagination = OffsetPagination<APIKey>;
|
|
90
|
+
|
|
91
|
+
export interface APIKey {
|
|
92
|
+
/**
|
|
93
|
+
* Unique API key identifier
|
|
94
|
+
*/
|
|
95
|
+
id: string;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* When the API key was created
|
|
99
|
+
*/
|
|
100
|
+
created_at: string;
|
|
101
|
+
|
|
102
|
+
created_by: APIKey.CreatedBy;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* When the API key expires
|
|
106
|
+
*/
|
|
107
|
+
expires_at: string | null;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Masked version of the API key
|
|
111
|
+
*/
|
|
112
|
+
masked_key: string;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* API key name
|
|
116
|
+
*/
|
|
117
|
+
name: string;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Project identifier for project-scoped API keys. Null means org-wide.
|
|
121
|
+
*/
|
|
122
|
+
project_id: string | null;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Project name for project-scoped API keys. Null means the key is org-wide or the
|
|
126
|
+
* project name is unavailable.
|
|
127
|
+
*/
|
|
128
|
+
project_name: string | null;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export namespace APIKey {
|
|
132
|
+
export interface CreatedBy {
|
|
133
|
+
/**
|
|
134
|
+
* Kernel user ID of the creator.
|
|
135
|
+
*/
|
|
136
|
+
id: string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Email address of the creator.
|
|
140
|
+
*/
|
|
141
|
+
email: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Display name of the creator, if available.
|
|
145
|
+
*/
|
|
146
|
+
name: string | null;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* API key returned immediately after creation. Includes the plaintext key once.
|
|
152
|
+
*/
|
|
153
|
+
export interface CreatedAPIKey extends APIKey {
|
|
154
|
+
/**
|
|
155
|
+
* Plaintext API key. Only returned once when the key is created.
|
|
156
|
+
*/
|
|
157
|
+
key: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface APIKeyCreateParams {
|
|
161
|
+
/**
|
|
162
|
+
* API key name (1-255 characters)
|
|
163
|
+
*/
|
|
164
|
+
name: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Number of days until expiry, up to 3650. Use null for never.
|
|
168
|
+
*/
|
|
169
|
+
days_to_expire?: number | null;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Unique project identifier
|
|
173
|
+
*/
|
|
174
|
+
project_id?: string | null;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface APIKeyUpdateParams {
|
|
178
|
+
/**
|
|
179
|
+
* New API key name
|
|
180
|
+
*/
|
|
181
|
+
name: string;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export interface APIKeyListParams extends OffsetPaginationParams {}
|
|
185
|
+
|
|
186
|
+
export declare namespace APIKeys {
|
|
187
|
+
export {
|
|
188
|
+
type APIKey as APIKey,
|
|
189
|
+
type CreatedAPIKey as CreatedAPIKey,
|
|
190
|
+
type APIKeysOffsetPagination as APIKeysOffsetPagination,
|
|
191
|
+
type APIKeyCreateParams as APIKeyCreateParams,
|
|
192
|
+
type APIKeyUpdateParams as APIKeyUpdateParams,
|
|
193
|
+
type APIKeyListParams as APIKeyListParams,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
@@ -269,15 +269,59 @@ export interface ManagedAuth {
|
|
|
269
269
|
browser_session_id?: string | null;
|
|
270
270
|
|
|
271
271
|
/**
|
|
272
|
-
* Whether
|
|
273
|
-
*
|
|
272
|
+
* Whether Kernel can automatically re-authenticate this connection when the
|
|
273
|
+
* session expires. Requires a prior successful login plus either a Kernel
|
|
274
|
+
* credential or an external credential reference. See `can_reauth_reason` for the
|
|
275
|
+
* specific outcome.
|
|
274
276
|
*/
|
|
275
277
|
can_reauth?: boolean;
|
|
276
278
|
|
|
277
279
|
/**
|
|
278
|
-
*
|
|
279
|
-
|
|
280
|
-
|
|
280
|
+
* Machine-readable reason for the current value of `can_reauth`. Affirmative
|
|
281
|
+
* values (re-auth is possible):
|
|
282
|
+
*
|
|
283
|
+
* - `external_credential` — an external credential provider is attached
|
|
284
|
+
* - `cua_has_credential` — CUA flow with a stored credential
|
|
285
|
+
* - `has_credential` — Kernel credential is attached (optimistic; plan viability
|
|
286
|
+
* not checked)
|
|
287
|
+
* - `viable_plans_found` — at least one stored login plan can be replayed
|
|
288
|
+
* - `no_requirements_recorded` — no recorded credential requirements to fail
|
|
289
|
+
* against
|
|
290
|
+
* - `requirements_satisfiable` — recorded requirements can be met by the attached
|
|
291
|
+
* credential
|
|
292
|
+
*
|
|
293
|
+
* Negative values (a human must complete the login flow):
|
|
294
|
+
*
|
|
295
|
+
* - `no_prior_successful_login` — connection has never completed a successful
|
|
296
|
+
* login
|
|
297
|
+
* - `no_credential` — no Kernel or external credential attached
|
|
298
|
+
* - `no_viable_plans` — credential attached but no replayable login plan exists
|
|
299
|
+
* yet
|
|
300
|
+
* - `viable_plans_require_external_action` — stored plans need an external step
|
|
301
|
+
* (email link, push, etc.)
|
|
302
|
+
* - `requires_external_action` — recorded requirements include an external step
|
|
303
|
+
* - `requires_totp_without_secret` — flow needs a TOTP code but no TOTP secret is
|
|
304
|
+
* stored
|
|
305
|
+
* - `requires_sms_code` — flow needs an SMS code that cannot be received
|
|
306
|
+
* automatically
|
|
307
|
+
* - `requires_email_code` — flow needs an email code that cannot be received
|
|
308
|
+
* automatically
|
|
309
|
+
*/
|
|
310
|
+
can_reauth_reason?:
|
|
311
|
+
| 'external_credential'
|
|
312
|
+
| 'cua_has_credential'
|
|
313
|
+
| 'has_credential'
|
|
314
|
+
| 'viable_plans_found'
|
|
315
|
+
| 'no_requirements_recorded'
|
|
316
|
+
| 'requirements_satisfiable'
|
|
317
|
+
| 'no_prior_successful_login'
|
|
318
|
+
| 'no_credential'
|
|
319
|
+
| 'no_viable_plans'
|
|
320
|
+
| 'viable_plans_require_external_action'
|
|
321
|
+
| 'requires_external_action'
|
|
322
|
+
| 'requires_totp_without_secret'
|
|
323
|
+
| 'requires_sms_code'
|
|
324
|
+
| 'requires_email_code';
|
|
281
325
|
|
|
282
326
|
/**
|
|
283
327
|
* Reference to credentials for the auth connection. Use one of:
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import * as Shared from './shared';
|
|
5
5
|
import * as BrowsersAPI from './browsers/browsers';
|
|
6
|
+
import * as TelemetryAPI from './browsers/telemetry';
|
|
6
7
|
import { APIPromise } from '../core/api-promise';
|
|
7
8
|
import { buildHeaders } from '../internal/headers';
|
|
8
9
|
import { RequestOptions } from '../internal/request-options';
|
|
@@ -238,9 +239,11 @@ export namespace BrowserPool {
|
|
|
238
239
|
proxy_id?: string;
|
|
239
240
|
|
|
240
241
|
/**
|
|
241
|
-
* Optional URL to
|
|
242
|
-
*
|
|
243
|
-
* browsers
|
|
242
|
+
* Optional URL to navigate to when a new browser is warmed into the pool.
|
|
243
|
+
* Best-effort: failures to navigate do not fail pool fill. Only applied to
|
|
244
|
+
* newly-warmed browsers; browsers reused via release/acquire keep whatever URL the
|
|
245
|
+
* previous lease left them on. Accepts any URL Chromium can resolve, including
|
|
246
|
+
* chrome:// pages.
|
|
244
247
|
*/
|
|
245
248
|
start_url?: string;
|
|
246
249
|
|
|
@@ -323,6 +326,13 @@ export interface BrowserPoolAcquireResponse {
|
|
|
323
326
|
*/
|
|
324
327
|
browser_live_view_url?: string;
|
|
325
328
|
|
|
329
|
+
/**
|
|
330
|
+
* Custom Chrome enterprise policy overrides that were applied to this browser
|
|
331
|
+
* session, if any. Echoed back for verification. Keys are Chrome enterprise policy
|
|
332
|
+
* names.
|
|
333
|
+
*/
|
|
334
|
+
chrome_policy?: { [key: string]: unknown };
|
|
335
|
+
|
|
326
336
|
/**
|
|
327
337
|
* When the browser session was soft-deleted. Only present for deleted sessions.
|
|
328
338
|
*/
|
|
@@ -339,12 +349,6 @@ export interface BrowserPoolAcquireResponse {
|
|
|
339
349
|
*/
|
|
340
350
|
kiosk_mode?: boolean;
|
|
341
351
|
|
|
342
|
-
/**
|
|
343
|
-
* @deprecated DEPRECATED: Use timeout_seconds (up to 72 hours) and Profiles
|
|
344
|
-
* instead.
|
|
345
|
-
*/
|
|
346
|
-
persistence?: BrowsersAPI.BrowserPersistence;
|
|
347
|
-
|
|
348
352
|
/**
|
|
349
353
|
* Browser pool this session was acquired from, if any.
|
|
350
354
|
*/
|
|
@@ -361,10 +365,19 @@ export interface BrowserPoolAcquireResponse {
|
|
|
361
365
|
proxy_id?: string;
|
|
362
366
|
|
|
363
367
|
/**
|
|
364
|
-
*
|
|
368
|
+
* URL the session was asked to navigate to on creation, if any. Recorded for
|
|
369
|
+
* debugging. Navigation is fire-and-forget — the URL is dispatched to the browser
|
|
370
|
+
* without waiting for it to load, and any errors (DNS failure, bad status,
|
|
371
|
+
* timeout) are silently dropped. Captures what was requested, not what the browser
|
|
372
|
+
* actually loaded.
|
|
365
373
|
*/
|
|
366
374
|
start_url?: string;
|
|
367
375
|
|
|
376
|
+
/**
|
|
377
|
+
* Active telemetry configuration for the session, if any.
|
|
378
|
+
*/
|
|
379
|
+
telemetry?: TelemetryAPI.BrowserTelemetryConfig | null;
|
|
380
|
+
|
|
368
381
|
/**
|
|
369
382
|
* Session usage metrics.
|
|
370
383
|
*/
|
|
@@ -443,9 +456,11 @@ export interface BrowserPoolCreateParams {
|
|
|
443
456
|
proxy_id?: string;
|
|
444
457
|
|
|
445
458
|
/**
|
|
446
|
-
* Optional URL to
|
|
447
|
-
*
|
|
448
|
-
* browsers
|
|
459
|
+
* Optional URL to navigate to when a new browser is warmed into the pool.
|
|
460
|
+
* Best-effort: failures to navigate do not fail pool fill. Only applied to
|
|
461
|
+
* newly-warmed browsers; browsers reused via release/acquire keep whatever URL the
|
|
462
|
+
* previous lease left them on. Accepts any URL Chromium can resolve, including
|
|
463
|
+
* chrome:// pages.
|
|
449
464
|
*/
|
|
450
465
|
start_url?: string;
|
|
451
466
|
|
|
@@ -540,9 +555,11 @@ export interface BrowserPoolUpdateParams {
|
|
|
540
555
|
proxy_id?: string;
|
|
541
556
|
|
|
542
557
|
/**
|
|
543
|
-
* Optional URL to
|
|
544
|
-
*
|
|
545
|
-
* browsers
|
|
558
|
+
* Optional URL to navigate to when a new browser is warmed into the pool.
|
|
559
|
+
* Best-effort: failures to navigate do not fail pool fill. Only applied to
|
|
560
|
+
* newly-warmed browsers; browsers reused via release/acquire keep whatever URL the
|
|
561
|
+
* previous lease left them on. Accepts any URL Chromium can resolve, including
|
|
562
|
+
* chrome:// pages.
|
|
546
563
|
*/
|
|
547
564
|
start_url?: string;
|
|
548
565
|
|