@onkernel/sdk 0.7.1 → 0.8.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.
- package/CHANGELOG.md +27 -0
- package/README.md +14 -27
- package/client.d.mts +5 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -5
- package/client.d.ts.map +1 -1
- package/client.js +14 -11
- package/client.js.map +1 -1
- package/client.mjs +14 -11
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/apps.d.mts +61 -1
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +61 -1
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +11 -2
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +9 -1
- package/resources/apps.mjs.map +1 -1
- package/resources/browsers/browsers.d.mts +160 -0
- package/resources/browsers/browsers.d.mts.map +1 -0
- package/resources/browsers/browsers.d.ts +160 -0
- package/resources/browsers/browsers.d.ts.map +1 -0
- package/resources/browsers/browsers.js +88 -0
- package/resources/browsers/browsers.js.map +1 -0
- package/resources/browsers/browsers.mjs +83 -0
- package/resources/browsers/browsers.mjs.map +1 -0
- package/resources/browsers/index.d.mts +3 -0
- package/resources/browsers/index.d.mts.map +1 -0
- package/resources/browsers/index.d.ts +3 -0
- package/resources/browsers/index.d.ts.map +1 -0
- package/resources/browsers/index.js +9 -0
- package/resources/browsers/index.js.map +1 -0
- package/resources/browsers/index.mjs +4 -0
- package/resources/browsers/index.mjs.map +1 -0
- package/resources/browsers/replays.d.mts +120 -0
- package/resources/browsers/replays.d.mts.map +1 -0
- package/resources/browsers/replays.d.ts +120 -0
- package/resources/browsers/replays.d.ts.map +1 -0
- package/resources/browsers/replays.js +72 -0
- package/resources/browsers/replays.js.map +1 -0
- package/resources/browsers/replays.mjs +68 -0
- package/resources/browsers/replays.mjs.map +1 -0
- package/resources/browsers.d.mts +1 -185
- package/resources/browsers.d.mts.map +1 -1
- package/resources/browsers.d.ts +1 -185
- package/resources/browsers.d.ts.map +1 -1
- package/resources/browsers.js +2 -96
- package/resources/browsers.js.map +1 -1
- package/resources/browsers.mjs +1 -94
- package/resources/browsers.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.ts +2 -2
- package/resources/index.js +2 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/invocations.d.mts +4 -0
- package/resources/invocations.d.mts.map +1 -1
- package/resources/invocations.d.ts +4 -0
- package/resources/invocations.d.ts.map +1 -1
- package/src/client.ts +24 -21
- package/src/resources/apps.ts +73 -1
- package/src/resources/browsers/browsers.ts +234 -0
- package/src/resources/browsers/index.ts +19 -0
- package/src/resources/browsers/replays.ts +168 -0
- package/src/resources/browsers.ts +1 -251
- package/src/resources/index.ts +2 -2
- package/src/resources/invocations.ts +5 -0
- 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/resources/apps/apps.d.mts +0 -71
- package/resources/apps/apps.d.mts.map +0 -1
- package/resources/apps/apps.d.ts +0 -71
- package/resources/apps/apps.d.ts.map +0 -1
- package/resources/apps/apps.js +0 -28
- package/resources/apps/apps.js.map +0 -1
- package/resources/apps/apps.mjs +0 -23
- package/resources/apps/apps.mjs.map +0 -1
- package/resources/apps/deployments.d.mts +0 -135
- package/resources/apps/deployments.d.mts.map +0 -1
- package/resources/apps/deployments.d.ts +0 -135
- package/resources/apps/deployments.d.ts.map +0 -1
- package/resources/apps/deployments.js +0 -43
- package/resources/apps/deployments.js.map +0 -1
- package/resources/apps/deployments.mjs +0 -39
- package/resources/apps/deployments.mjs.map +0 -1
- package/resources/apps/index.d.mts +0 -3
- package/resources/apps/index.d.mts.map +0 -1
- package/resources/apps/index.d.ts +0 -3
- package/resources/apps/index.d.ts.map +0 -1
- package/resources/apps/index.js +0 -9
- package/resources/apps/index.js.map +0 -1
- package/resources/apps/index.mjs +0 -4
- package/resources/apps/index.mjs.map +0 -1
- package/src/resources/apps/apps.ts +0 -98
- package/src/resources/apps/deployments.ts +0 -175
- package/src/resources/apps/index.ts +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocations.d.mts","sourceRoot":"","sources":["../src/resources/invocations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAIpG;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAItF;;;;;;;;;OASG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wBAAwB,CAAC;IAIvC;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOtE;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;CAO3F;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,KAAK,EAAE,kBAAkB,CAAC;IAE1B,UAAU,EAAE,oBAAoB,CAAC,UAAU,CAAC;IAE5C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,yBAAiB,oBAAoB,CAAC;IACpC,UAAiB,UAAU;QACzB;;WAEG;QACH,EAAE,EAAE,MAAM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BAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
package/src/client.ts
CHANGED
|
@@ -16,15 +16,7 @@ import * as Errors from './core/error';
|
|
|
16
16
|
import * as Uploads from './core/uploads';
|
|
17
17
|
import * as API from './resources/index';
|
|
18
18
|
import { APIPromise } from './core/api-promise';
|
|
19
|
-
import {
|
|
20
|
-
BrowserCreateParams,
|
|
21
|
-
BrowserCreateResponse,
|
|
22
|
-
BrowserDeleteParams,
|
|
23
|
-
BrowserListResponse,
|
|
24
|
-
BrowserPersistence,
|
|
25
|
-
BrowserRetrieveResponse,
|
|
26
|
-
Browsers,
|
|
27
|
-
} from './resources/browsers';
|
|
19
|
+
import { AppListParams, AppListResponse, Apps } from './resources/apps';
|
|
28
20
|
import {
|
|
29
21
|
DeploymentCreateParams,
|
|
30
22
|
DeploymentCreateResponse,
|
|
@@ -47,7 +39,15 @@ import {
|
|
|
47
39
|
InvocationUpdateResponse,
|
|
48
40
|
Invocations,
|
|
49
41
|
} from './resources/invocations';
|
|
50
|
-
import {
|
|
42
|
+
import {
|
|
43
|
+
BrowserCreateParams,
|
|
44
|
+
BrowserCreateResponse,
|
|
45
|
+
BrowserDeleteParams,
|
|
46
|
+
BrowserListResponse,
|
|
47
|
+
BrowserPersistence,
|
|
48
|
+
BrowserRetrieveResponse,
|
|
49
|
+
Browsers,
|
|
50
|
+
} from './resources/browsers/browsers';
|
|
51
51
|
import { type Fetch } from './internal/builtin-types';
|
|
52
52
|
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
|
|
53
53
|
import { FinalRequestOptions, RequestOptions } from './internal/request-options';
|
|
@@ -230,7 +230,7 @@ export class Kernel {
|
|
|
230
230
|
* Create a new client instance re-using the same options given to the current client with optional overriding.
|
|
231
231
|
*/
|
|
232
232
|
withOptions(options: Partial<ClientOptions>): this {
|
|
233
|
-
|
|
233
|
+
const client = new (this.constructor as any as new (props: ClientOptions) => typeof this)({
|
|
234
234
|
...this._options,
|
|
235
235
|
environment: options.environment ? options.environment : undefined,
|
|
236
236
|
baseURL: options.environment ? undefined : this.baseURL,
|
|
@@ -243,6 +243,7 @@ export class Kernel {
|
|
|
243
243
|
apiKey: this.apiKey,
|
|
244
244
|
...options,
|
|
245
245
|
});
|
|
246
|
+
return client;
|
|
246
247
|
}
|
|
247
248
|
|
|
248
249
|
/**
|
|
@@ -260,7 +261,7 @@ export class Kernel {
|
|
|
260
261
|
return;
|
|
261
262
|
}
|
|
262
263
|
|
|
263
|
-
protected authHeaders(opts: FinalRequestOptions): NullableHeaders | undefined {
|
|
264
|
+
protected async authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined> {
|
|
264
265
|
return buildHeaders([{ Authorization: `Bearer ${this.apiKey}` }]);
|
|
265
266
|
}
|
|
266
267
|
|
|
@@ -392,7 +393,9 @@ export class Kernel {
|
|
|
392
393
|
|
|
393
394
|
await this.prepareOptions(options);
|
|
394
395
|
|
|
395
|
-
const { req, url, timeout } = this.buildRequest(options, {
|
|
396
|
+
const { req, url, timeout } = await this.buildRequest(options, {
|
|
397
|
+
retryCount: maxRetries - retriesRemaining,
|
|
398
|
+
});
|
|
396
399
|
|
|
397
400
|
await this.prepareRequest(req, { url, options });
|
|
398
401
|
|
|
@@ -470,7 +473,7 @@ export class Kernel {
|
|
|
470
473
|
} with status ${response.status} in ${headersTime - startTime}ms`;
|
|
471
474
|
|
|
472
475
|
if (!response.ok) {
|
|
473
|
-
const shouldRetry = this.shouldRetry(response);
|
|
476
|
+
const shouldRetry = await this.shouldRetry(response);
|
|
474
477
|
if (retriesRemaining && shouldRetry) {
|
|
475
478
|
const retryMessage = `retrying, ${retriesRemaining} attempts remaining`;
|
|
476
479
|
|
|
@@ -569,7 +572,7 @@ export class Kernel {
|
|
|
569
572
|
}
|
|
570
573
|
}
|
|
571
574
|
|
|
572
|
-
private shouldRetry(response: Response): boolean {
|
|
575
|
+
private async shouldRetry(response: Response): Promise<boolean> {
|
|
573
576
|
// Note this is not a standard header.
|
|
574
577
|
const shouldRetryHeader = response.headers.get('x-should-retry');
|
|
575
578
|
|
|
@@ -646,10 +649,10 @@ export class Kernel {
|
|
|
646
649
|
return sleepSeconds * jitter * 1000;
|
|
647
650
|
}
|
|
648
651
|
|
|
649
|
-
buildRequest(
|
|
652
|
+
async buildRequest(
|
|
650
653
|
inputOptions: FinalRequestOptions,
|
|
651
654
|
{ retryCount = 0 }: { retryCount?: number } = {},
|
|
652
|
-
): { req: FinalizedRequestInit; url: string; timeout: number } {
|
|
655
|
+
): Promise<{ req: FinalizedRequestInit; url: string; timeout: number }> {
|
|
653
656
|
const options = { ...inputOptions };
|
|
654
657
|
const { method, path, query, defaultBaseURL } = options;
|
|
655
658
|
|
|
@@ -657,7 +660,7 @@ export class Kernel {
|
|
|
657
660
|
if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);
|
|
658
661
|
options.timeout = options.timeout ?? this.timeout;
|
|
659
662
|
const { bodyHeaders, body } = this.buildBody({ options });
|
|
660
|
-
const reqHeaders = this.buildHeaders({ options: inputOptions, method, bodyHeaders, retryCount });
|
|
663
|
+
const reqHeaders = await this.buildHeaders({ options: inputOptions, method, bodyHeaders, retryCount });
|
|
661
664
|
|
|
662
665
|
const req: FinalizedRequestInit = {
|
|
663
666
|
method,
|
|
@@ -673,7 +676,7 @@ export class Kernel {
|
|
|
673
676
|
return { req, url, timeout: options.timeout };
|
|
674
677
|
}
|
|
675
678
|
|
|
676
|
-
private buildHeaders({
|
|
679
|
+
private async buildHeaders({
|
|
677
680
|
options,
|
|
678
681
|
method,
|
|
679
682
|
bodyHeaders,
|
|
@@ -683,7 +686,7 @@ export class Kernel {
|
|
|
683
686
|
method: HTTPMethod;
|
|
684
687
|
bodyHeaders: HeadersLike;
|
|
685
688
|
retryCount: number;
|
|
686
|
-
}): Headers {
|
|
689
|
+
}): Promise<Headers> {
|
|
687
690
|
let idempotencyHeaders: HeadersLike = {};
|
|
688
691
|
if (this.idempotencyHeader && method !== 'get') {
|
|
689
692
|
if (!options.idempotencyKey) options.idempotencyKey = this.defaultIdempotencyKey();
|
|
@@ -699,7 +702,7 @@ export class Kernel {
|
|
|
699
702
|
...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}),
|
|
700
703
|
...getPlatformHeaders(),
|
|
701
704
|
},
|
|
702
|
-
this.authHeaders(options),
|
|
705
|
+
await this.authHeaders(options),
|
|
703
706
|
this._options.defaultHeaders,
|
|
704
707
|
bodyHeaders,
|
|
705
708
|
options.headers,
|
package/src/resources/apps.ts
CHANGED
|
@@ -1,3 +1,75 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as Shared from './shared';
|
|
5
|
+
import { APIPromise } from '../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
|
|
8
|
+
export class Apps extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* List applications. Optionally filter by app name and/or version label.
|
|
11
|
+
*/
|
|
12
|
+
list(query: AppListParams | null | undefined = {}, options?: RequestOptions): APIPromise<AppListResponse> {
|
|
13
|
+
return this._client.get('/apps', { query, ...options });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type AppListResponse = Array<AppListResponse.AppListResponseItem>;
|
|
18
|
+
|
|
19
|
+
export namespace AppListResponse {
|
|
20
|
+
/**
|
|
21
|
+
* Summary of an application version.
|
|
22
|
+
*/
|
|
23
|
+
export interface AppListResponseItem {
|
|
24
|
+
/**
|
|
25
|
+
* Unique identifier for the app version
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* List of actions available on the app
|
|
31
|
+
*/
|
|
32
|
+
actions: Array<Shared.AppAction>;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Name of the application
|
|
36
|
+
*/
|
|
37
|
+
app_name: string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Deployment ID
|
|
41
|
+
*/
|
|
42
|
+
deployment: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Environment variables configured for this app version
|
|
46
|
+
*/
|
|
47
|
+
env_vars: { [key: string]: string };
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Deployment region code
|
|
51
|
+
*/
|
|
52
|
+
region: 'aws.us-east-1a';
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Version label for the application
|
|
56
|
+
*/
|
|
57
|
+
version: string;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface AppListParams {
|
|
62
|
+
/**
|
|
63
|
+
* Filter results by application name.
|
|
64
|
+
*/
|
|
65
|
+
app_name?: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Filter results by version label.
|
|
69
|
+
*/
|
|
70
|
+
version?: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export declare namespace Apps {
|
|
74
|
+
export { type AppListResponse as AppListResponse, type AppListParams as AppListParams };
|
|
75
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as BrowsersAPI from './browsers';
|
|
5
|
+
import * as ReplaysAPI from './replays';
|
|
6
|
+
import {
|
|
7
|
+
ReplayDownloadParams,
|
|
8
|
+
ReplayListResponse,
|
|
9
|
+
ReplayStartParams,
|
|
10
|
+
ReplayStartResponse,
|
|
11
|
+
ReplayStopParams,
|
|
12
|
+
Replays,
|
|
13
|
+
} from './replays';
|
|
14
|
+
import { APIPromise } from '../../core/api-promise';
|
|
15
|
+
import { buildHeaders } from '../../internal/headers';
|
|
16
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
17
|
+
import { path } from '../../internal/utils/path';
|
|
18
|
+
|
|
19
|
+
export class Browsers extends APIResource {
|
|
20
|
+
replays: ReplaysAPI.Replays = new ReplaysAPI.Replays(this._client);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Create a new browser session from within an action.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const browser = await client.browsers.create();
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
create(
|
|
31
|
+
body: BrowserCreateParams | null | undefined = {},
|
|
32
|
+
options?: RequestOptions,
|
|
33
|
+
): APIPromise<BrowserCreateResponse> {
|
|
34
|
+
return this._client.post('/browsers', { body, ...options });
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Get information about a browser session.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const browser = await client.browsers.retrieve(
|
|
43
|
+
* 'htzv5orfit78e1m2biiifpbv',
|
|
44
|
+
* );
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<BrowserRetrieveResponse> {
|
|
48
|
+
return this._client.get(path`/browsers/${id}`, options);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* List active browser sessions
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const browsers = await client.browsers.list();
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
list(options?: RequestOptions): APIPromise<BrowserListResponse> {
|
|
60
|
+
return this._client.get('/browsers', options);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Delete a persistent browser session by its persistent_id.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* await client.browsers.delete({
|
|
69
|
+
* persistent_id: 'persistent_id',
|
|
70
|
+
* });
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
delete(params: BrowserDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
74
|
+
const { persistent_id } = params;
|
|
75
|
+
return this._client.delete('/browsers', {
|
|
76
|
+
query: { persistent_id },
|
|
77
|
+
...options,
|
|
78
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Delete a browser session by ID
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* await client.browsers.deleteByID(
|
|
88
|
+
* 'htzv5orfit78e1m2biiifpbv',
|
|
89
|
+
* );
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
deleteByID(id: string, options?: RequestOptions): APIPromise<void> {
|
|
93
|
+
return this._client.delete(path`/browsers/${id}`, {
|
|
94
|
+
...options,
|
|
95
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Optional persistence configuration for the browser session.
|
|
102
|
+
*/
|
|
103
|
+
export interface BrowserPersistence {
|
|
104
|
+
/**
|
|
105
|
+
* Unique identifier for the persistent browser session.
|
|
106
|
+
*/
|
|
107
|
+
id: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface BrowserCreateResponse {
|
|
111
|
+
/**
|
|
112
|
+
* Websocket URL for Chrome DevTools Protocol connections to the browser session
|
|
113
|
+
*/
|
|
114
|
+
cdp_ws_url: string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Unique identifier for the browser session
|
|
118
|
+
*/
|
|
119
|
+
session_id: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Remote URL for live viewing the browser session. Only available for non-headless
|
|
123
|
+
* browsers.
|
|
124
|
+
*/
|
|
125
|
+
browser_live_view_url?: string;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Optional persistence configuration for the browser session.
|
|
129
|
+
*/
|
|
130
|
+
persistence?: BrowserPersistence;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface BrowserRetrieveResponse {
|
|
134
|
+
/**
|
|
135
|
+
* Websocket URL for Chrome DevTools Protocol connections to the browser session
|
|
136
|
+
*/
|
|
137
|
+
cdp_ws_url: string;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Unique identifier for the browser session
|
|
141
|
+
*/
|
|
142
|
+
session_id: string;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Remote URL for live viewing the browser session. Only available for non-headless
|
|
146
|
+
* browsers.
|
|
147
|
+
*/
|
|
148
|
+
browser_live_view_url?: string;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Optional persistence configuration for the browser session.
|
|
152
|
+
*/
|
|
153
|
+
persistence?: BrowserPersistence;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export type BrowserListResponse = Array<BrowserListResponse.BrowserListResponseItem>;
|
|
157
|
+
|
|
158
|
+
export namespace BrowserListResponse {
|
|
159
|
+
export interface BrowserListResponseItem {
|
|
160
|
+
/**
|
|
161
|
+
* Websocket URL for Chrome DevTools Protocol connections to the browser session
|
|
162
|
+
*/
|
|
163
|
+
cdp_ws_url: string;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Unique identifier for the browser session
|
|
167
|
+
*/
|
|
168
|
+
session_id: string;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Remote URL for live viewing the browser session. Only available for non-headless
|
|
172
|
+
* browsers.
|
|
173
|
+
*/
|
|
174
|
+
browser_live_view_url?: string;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Optional persistence configuration for the browser session.
|
|
178
|
+
*/
|
|
179
|
+
persistence?: BrowsersAPI.BrowserPersistence;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface BrowserCreateParams {
|
|
184
|
+
/**
|
|
185
|
+
* If true, launches the browser using a headless image (no VNC/GUI). Defaults to
|
|
186
|
+
* false.
|
|
187
|
+
*/
|
|
188
|
+
headless?: boolean;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* action invocation ID
|
|
192
|
+
*/
|
|
193
|
+
invocation_id?: string;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Optional persistence configuration for the browser session.
|
|
197
|
+
*/
|
|
198
|
+
persistence?: BrowserPersistence;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* If true, launches the browser in stealth mode to reduce detection by anti-bot
|
|
202
|
+
* mechanisms.
|
|
203
|
+
*/
|
|
204
|
+
stealth?: boolean;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface BrowserDeleteParams {
|
|
208
|
+
/**
|
|
209
|
+
* Persistent browser identifier
|
|
210
|
+
*/
|
|
211
|
+
persistent_id: string;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
Browsers.Replays = Replays;
|
|
215
|
+
|
|
216
|
+
export declare namespace Browsers {
|
|
217
|
+
export {
|
|
218
|
+
type BrowserPersistence as BrowserPersistence,
|
|
219
|
+
type BrowserCreateResponse as BrowserCreateResponse,
|
|
220
|
+
type BrowserRetrieveResponse as BrowserRetrieveResponse,
|
|
221
|
+
type BrowserListResponse as BrowserListResponse,
|
|
222
|
+
type BrowserCreateParams as BrowserCreateParams,
|
|
223
|
+
type BrowserDeleteParams as BrowserDeleteParams,
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
export {
|
|
227
|
+
Replays as Replays,
|
|
228
|
+
type ReplayListResponse as ReplayListResponse,
|
|
229
|
+
type ReplayStartResponse as ReplayStartResponse,
|
|
230
|
+
type ReplayDownloadParams as ReplayDownloadParams,
|
|
231
|
+
type ReplayStartParams as ReplayStartParams,
|
|
232
|
+
type ReplayStopParams as ReplayStopParams,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Browsers,
|
|
5
|
+
type BrowserPersistence,
|
|
6
|
+
type BrowserCreateResponse,
|
|
7
|
+
type BrowserRetrieveResponse,
|
|
8
|
+
type BrowserListResponse,
|
|
9
|
+
type BrowserCreateParams,
|
|
10
|
+
type BrowserDeleteParams,
|
|
11
|
+
} from './browsers';
|
|
12
|
+
export {
|
|
13
|
+
Replays,
|
|
14
|
+
type ReplayListResponse,
|
|
15
|
+
type ReplayStartResponse,
|
|
16
|
+
type ReplayDownloadParams,
|
|
17
|
+
type ReplayStartParams,
|
|
18
|
+
type ReplayStopParams,
|
|
19
|
+
} from './replays';
|
|
@@ -0,0 +1,168 @@
|
|
|
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 Replays extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* List all replays for the specified browser session.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const replays = await client.browsers.replays.list('id');
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
list(id: string, options?: RequestOptions): APIPromise<ReplayListResponse> {
|
|
19
|
+
return this._client.get(path`/browsers/${id}/replays`, options);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Download or stream the specified replay recording.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const response = await client.browsers.replays.download(
|
|
28
|
+
* 'replay_id',
|
|
29
|
+
* { id: 'id' },
|
|
30
|
+
* );
|
|
31
|
+
*
|
|
32
|
+
* const content = await response.blob();
|
|
33
|
+
* console.log(content);
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
download(replayID: string, params: ReplayDownloadParams, options?: RequestOptions): APIPromise<Response> {
|
|
37
|
+
const { id } = params;
|
|
38
|
+
return this._client.get(path`/browsers/${id}/replays/${replayID}`, {
|
|
39
|
+
...options,
|
|
40
|
+
headers: buildHeaders([{ Accept: 'video/mp4' }, options?.headers]),
|
|
41
|
+
__binaryResponse: true,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Start recording the browser session and return a replay ID.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const response = await client.browsers.replays.start('id');
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
start(
|
|
54
|
+
id: string,
|
|
55
|
+
body: ReplayStartParams | null | undefined = {},
|
|
56
|
+
options?: RequestOptions,
|
|
57
|
+
): APIPromise<ReplayStartResponse> {
|
|
58
|
+
return this._client.post(path`/browsers/${id}/replays`, { body, ...options });
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Stop the specified replay recording and persist the video.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* await client.browsers.replays.stop('replay_id', {
|
|
67
|
+
* id: 'id',
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
stop(replayID: string, params: ReplayStopParams, options?: RequestOptions): APIPromise<void> {
|
|
72
|
+
const { id } = params;
|
|
73
|
+
return this._client.post(path`/browsers/${id}/replays/${replayID}/stop`, {
|
|
74
|
+
...options,
|
|
75
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type ReplayListResponse = Array<ReplayListResponse.ReplayListResponseItem>;
|
|
81
|
+
|
|
82
|
+
export namespace ReplayListResponse {
|
|
83
|
+
/**
|
|
84
|
+
* Information about a browser replay recording.
|
|
85
|
+
*/
|
|
86
|
+
export interface ReplayListResponseItem {
|
|
87
|
+
/**
|
|
88
|
+
* Unique identifier for the replay recording.
|
|
89
|
+
*/
|
|
90
|
+
replay_id: string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Timestamp when replay finished
|
|
94
|
+
*/
|
|
95
|
+
finished_at?: string | null;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* URL for viewing the replay recording.
|
|
99
|
+
*/
|
|
100
|
+
replay_view_url?: string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Timestamp when replay started
|
|
104
|
+
*/
|
|
105
|
+
started_at?: string | null;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Information about a browser replay recording.
|
|
111
|
+
*/
|
|
112
|
+
export interface ReplayStartResponse {
|
|
113
|
+
/**
|
|
114
|
+
* Unique identifier for the replay recording.
|
|
115
|
+
*/
|
|
116
|
+
replay_id: string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Timestamp when replay finished
|
|
120
|
+
*/
|
|
121
|
+
finished_at?: string | null;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* URL for viewing the replay recording.
|
|
125
|
+
*/
|
|
126
|
+
replay_view_url?: string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Timestamp when replay started
|
|
130
|
+
*/
|
|
131
|
+
started_at?: string | null;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface ReplayDownloadParams {
|
|
135
|
+
/**
|
|
136
|
+
* Browser session ID
|
|
137
|
+
*/
|
|
138
|
+
id: string;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface ReplayStartParams {
|
|
142
|
+
/**
|
|
143
|
+
* Recording framerate in fps.
|
|
144
|
+
*/
|
|
145
|
+
framerate?: number;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Maximum recording duration in seconds.
|
|
149
|
+
*/
|
|
150
|
+
max_duration_in_seconds?: number;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface ReplayStopParams {
|
|
154
|
+
/**
|
|
155
|
+
* Browser session ID
|
|
156
|
+
*/
|
|
157
|
+
id: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export declare namespace Replays {
|
|
161
|
+
export {
|
|
162
|
+
type ReplayListResponse as ReplayListResponse,
|
|
163
|
+
type ReplayStartResponse as ReplayStartResponse,
|
|
164
|
+
type ReplayDownloadParams as ReplayDownloadParams,
|
|
165
|
+
type ReplayStartParams as ReplayStartParams,
|
|
166
|
+
type ReplayStopParams as ReplayStopParams,
|
|
167
|
+
};
|
|
168
|
+
}
|