@browserbasehq/sdk 2.15.0 → 2.17.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 +20 -0
- package/package.json +1 -1
- package/resources/agents/runs.d.ts +72 -2
- package/resources/agents/runs.d.ts.map +1 -1
- package/resources/contexts.d.ts +20 -2
- package/resources/contexts.d.ts.map +1 -1
- package/resources/contexts.js +2 -0
- package/resources/contexts.js.map +1 -1
- package/resources/contexts.mjs +2 -0
- package/resources/contexts.mjs.map +1 -1
- package/resources/sessions/index.d.ts +1 -1
- package/resources/sessions/index.d.ts.map +1 -1
- package/resources/sessions/index.js +2 -2
- package/resources/sessions/index.js.map +1 -1
- package/resources/sessions/index.mjs +1 -1
- package/resources/sessions/recording/downloads.d.ts +48 -0
- package/resources/sessions/recording/downloads.d.ts.map +1 -0
- package/resources/sessions/recording/downloads.js +25 -0
- package/resources/sessions/recording/downloads.js.map +1 -0
- package/resources/sessions/recording/downloads.mjs +21 -0
- package/resources/sessions/recording/downloads.mjs.map +1 -0
- package/resources/sessions/recording/index.d.ts +3 -0
- package/resources/sessions/recording/index.d.ts.map +1 -0
- package/resources/sessions/recording/index.js +9 -0
- package/resources/sessions/recording/index.js.map +1 -0
- package/resources/sessions/recording/index.mjs +4 -0
- package/resources/sessions/recording/index.mjs.map +1 -0
- package/resources/sessions/recording/recording.d.ts +32 -0
- package/resources/sessions/recording/recording.d.ts.map +1 -0
- package/resources/sessions/recording/recording.js +55 -0
- package/resources/sessions/recording/recording.js.map +1 -0
- package/resources/sessions/recording/recording.mjs +18 -0
- package/resources/sessions/recording/recording.mjs.map +1 -0
- package/resources/sessions/recording.d.ts +1 -27
- package/resources/sessions/recording.d.ts.map +1 -1
- package/resources/sessions/recording.js +15 -11
- package/resources/sessions/recording.js.map +1 -1
- package/resources/sessions/recording.mjs +1 -9
- package/resources/sessions/recording.mjs.map +1 -1
- package/resources/sessions/sessions.d.ts +4 -4
- package/resources/sessions/sessions.d.ts.map +1 -1
- package/resources/sessions/sessions.js +7 -6
- package/resources/sessions/sessions.js.map +1 -1
- package/resources/sessions/sessions.mjs +7 -6
- package/resources/sessions/sessions.mjs.map +1 -1
- package/src/resources/agents/runs.ts +91 -2
- package/src/resources/contexts.ts +22 -2
- package/src/resources/sessions/index.ts +1 -1
- package/src/resources/sessions/recording/downloads.ts +66 -0
- package/src/resources/sessions/recording/index.ts +9 -0
- package/src/resources/sessions/recording/recording.ts +52 -0
- package/src/resources/sessions/recording.ts +1 -37
- package/src/resources/sessions/sessions.ts +9 -8
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* Session Recording
|
|
9
|
-
*/
|
|
10
|
-
retrieve(id, options) {
|
|
11
|
-
return this._client.get(`/v1/sessions/${id}/recording`, options);
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
8
|
}
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./recording/index.js"), exports);
|
|
15
19
|
//# sourceMappingURL=recording.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recording.js","sourceRoot":"","sources":["../../src/resources/sessions/recording.ts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"recording.js","sourceRoot":"","sources":["../../src/resources/sessions/recording.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;AAEtF,uDAAkC"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
export class Recording extends APIResource {
|
|
4
|
-
/**
|
|
5
|
-
* Session Recording
|
|
6
|
-
*/
|
|
7
|
-
retrieve(id, options) {
|
|
8
|
-
return this._client.get(`/v1/sessions/${id}/recording`, options);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
2
|
+
export * from "./recording/index.mjs";
|
|
11
3
|
//# sourceMappingURL=recording.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recording.mjs","sourceRoot":"","sources":["../../src/resources/sessions/recording.ts"],"names":[],"mappings":"AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"recording.mjs","sourceRoot":"","sources":["../../src/resources/sessions/recording.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
@@ -4,12 +4,12 @@ import * as DownloadsAPI from "./downloads.js";
|
|
|
4
4
|
import { Downloads } from "./downloads.js";
|
|
5
5
|
import * as LogsAPI from "./logs.js";
|
|
6
6
|
import { LogListResponse, Logs, SessionLog } from "./logs.js";
|
|
7
|
-
import * as RecordingAPI from "./recording.js";
|
|
8
|
-
import { Recording, RecordingRetrieveResponse, SessionRecording } from "./recording.js";
|
|
9
7
|
import * as ReplaysAPI from "./replays.js";
|
|
10
8
|
import { ReplayRetrieveResponse, Replays } from "./replays.js";
|
|
11
9
|
import * as UploadsAPI from "./uploads.js";
|
|
12
10
|
import { UploadCreateParams, UploadCreateResponse, Uploads } from "./uploads.js";
|
|
11
|
+
import * as RecordingAPI from "./recording/recording.js";
|
|
12
|
+
import { Recording, RecordingRetrieveResponse, SessionRecording } from "./recording/recording.js";
|
|
13
13
|
export declare class Sessions extends APIResource {
|
|
14
14
|
downloads: DownloadsAPI.Downloads;
|
|
15
15
|
logs: LogsAPI.Logs;
|
|
@@ -19,7 +19,7 @@ export declare class Sessions extends APIResource {
|
|
|
19
19
|
/**
|
|
20
20
|
* Create a Session
|
|
21
21
|
*/
|
|
22
|
-
create(
|
|
22
|
+
create(params?: SessionCreateParams, options?: Core.RequestOptions): Core.APIPromise<SessionCreateResponse>;
|
|
23
23
|
create(options?: Core.RequestOptions): Core.APIPromise<SessionCreateResponse>;
|
|
24
24
|
/**
|
|
25
25
|
* Get a Session
|
|
@@ -155,7 +155,7 @@ export interface SessionCreateParams {
|
|
|
155
155
|
* Duration in seconds after which the session will automatically end. Defaults to
|
|
156
156
|
* the Project's `defaultTimeout`.
|
|
157
157
|
*/
|
|
158
|
-
|
|
158
|
+
api_timeout?: number;
|
|
159
159
|
/**
|
|
160
160
|
* Arbitrary user metadata to attach to the session. To learn more about user
|
|
161
161
|
* metadata, see [User Metadata](/features/sessions#user-metadata).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessions.d.ts","sourceRoot":"","sources":["../../src/resources/sessions/sessions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,YAAY,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE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__importStar(require("./logs.js"));
|
|
43
43
|
const logs_1 = require("./logs.js");
|
|
44
|
-
const RecordingAPI = __importStar(require("./recording.js"));
|
|
45
|
-
const recording_1 = require("./recording.js");
|
|
46
44
|
const ReplaysAPI = __importStar(require("./replays.js"));
|
|
47
45
|
const replays_1 = require("./replays.js");
|
|
48
46
|
const UploadsAPI = __importStar(require("./uploads.js"));
|
|
49
47
|
const uploads_1 = require("./uploads.js");
|
|
48
|
+
const RecordingAPI = __importStar(require("./recording/recording.js"));
|
|
49
|
+
const recording_1 = require("./recording/recording.js");
|
|
50
50
|
class Sessions extends resource_1.APIResource {
|
|
51
51
|
constructor() {
|
|
52
52
|
super(...arguments);
|
|
@@ -56,11 +56,12 @@ class Sessions extends resource_1.APIResource {
|
|
|
56
56
|
this.uploads = new UploadsAPI.Uploads(this._client);
|
|
57
57
|
this.replays = new ReplaysAPI.Replays(this._client);
|
|
58
58
|
}
|
|
59
|
-
create(
|
|
60
|
-
if ((0, core_1.isRequestOptions)(
|
|
61
|
-
return this.create({},
|
|
59
|
+
create(params = {}, options) {
|
|
60
|
+
if ((0, core_1.isRequestOptions)(params)) {
|
|
61
|
+
return this.create({}, params);
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
const { api_timeout, ...body } = params;
|
|
64
|
+
return this._client.post('/v1/sessions', { body: { timeout: api_timeout, ...body }, ...options });
|
|
64
65
|
}
|
|
65
66
|
/**
|
|
66
67
|
* Get a Session
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessions.js","sourceRoot":"","sources":["../../src/resources/sessions/sessions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAC7C,wCAA8C;AAE9C,6DAA4C;AAC5C,8CAAwC;AACxC,mDAAkC;AAClC,oCAA2D;AAC3D,
|
|
1
|
+
{"version":3,"file":"sessions.js","sourceRoot":"","sources":["../../src/resources/sessions/sessions.ts"],"names":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AAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,IAAyB,EAAE,OAA6B;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAOD,IAAI,CACF,QAAiD,EAAE,EACnD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QAC9B,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,EAAU,EAAE,OAA6B;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF;AA1DD,4BA0DC;AAwYD,QAAQ,CAAC,SAAS,GAAG,qBAAS,CAAC;AAC/B,QAAQ,CAAC,IAAI,GAAG,WAAI,CAAC;AACrB,QAAQ,CAAC,SAAS,GAAG,qBAAS,CAAC;AAC/B,QAAQ,CAAC,OAAO,GAAG,iBAAO,CAAC;AAC3B,QAAQ,CAAC,OAAO,GAAG,iBAAO,CAAC"}
|
|
@@ -5,12 +5,12 @@ import * as DownloadsAPI from "./downloads.mjs";
|
|
|
5
5
|
import { Downloads } from "./downloads.mjs";
|
|
6
6
|
import * as LogsAPI from "./logs.mjs";
|
|
7
7
|
import { Logs } from "./logs.mjs";
|
|
8
|
-
import * as RecordingAPI from "./recording.mjs";
|
|
9
|
-
import { Recording } from "./recording.mjs";
|
|
10
8
|
import * as ReplaysAPI from "./replays.mjs";
|
|
11
9
|
import { Replays } from "./replays.mjs";
|
|
12
10
|
import * as UploadsAPI from "./uploads.mjs";
|
|
13
11
|
import { Uploads } from "./uploads.mjs";
|
|
12
|
+
import * as RecordingAPI from "./recording/recording.mjs";
|
|
13
|
+
import { Recording } from "./recording/recording.mjs";
|
|
14
14
|
export class Sessions extends APIResource {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
@@ -20,11 +20,12 @@ export class Sessions extends APIResource {
|
|
|
20
20
|
this.uploads = new UploadsAPI.Uploads(this._client);
|
|
21
21
|
this.replays = new ReplaysAPI.Replays(this._client);
|
|
22
22
|
}
|
|
23
|
-
create(
|
|
24
|
-
if (isRequestOptions(
|
|
25
|
-
return this.create({},
|
|
23
|
+
create(params = {}, options) {
|
|
24
|
+
if (isRequestOptions(params)) {
|
|
25
|
+
return this.create({}, params);
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
const { api_timeout, ...body } = params;
|
|
28
|
+
return this._client.post('/v1/sessions', { body: { timeout: api_timeout, ...body }, ...options });
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
31
|
* Get a Session
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessions.mjs","sourceRoot":"","sources":["../../src/resources/sessions/sessions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,KAAK,YAAY;OACjB,EAAE,SAAS,EAAE;OACb,KAAK,OAAO;OACZ,EAAmB,IAAI,EAAc;OACrC,KAAK,
|
|
1
|
+
{"version":3,"file":"sessions.mjs","sourceRoot":"","sources":["../../src/resources/sessions/sessions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,KAAK,YAAY;OACjB,EAAE,SAAS,EAAE;OACb,KAAK,OAAO;OACZ,EAAmB,IAAI,EAAc;OACrC,KAAK,UAAU;OACf,EAA0B,OAAO,EAAE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B,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAOD,IAAI,CACF,QAAiD,EAAE,EACnD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QAC9B,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,EAAU,EAAE,OAA6B;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF;AAwYD,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC;AAC/B,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC;AAC/B,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;AAC3B,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC"}
|
|
@@ -440,9 +440,16 @@ export namespace RunCreateParams {
|
|
|
440
440
|
context?: BrowserSettings.Context;
|
|
441
441
|
|
|
442
442
|
/**
|
|
443
|
-
*
|
|
443
|
+
* Proxy configuration. Can be true for default proxy, or an array of proxy
|
|
444
|
+
* configurations.
|
|
444
445
|
*/
|
|
445
|
-
proxies?:
|
|
446
|
+
proxies?:
|
|
447
|
+
| Array<
|
|
448
|
+
| BrowserSettings.BrowserbaseProxyConfig
|
|
449
|
+
| BrowserSettings.ExternalProxyConfig
|
|
450
|
+
| BrowserSettings.NoneProxyConfig
|
|
451
|
+
>
|
|
452
|
+
| boolean;
|
|
446
453
|
|
|
447
454
|
/**
|
|
448
455
|
* Set true to enable Browserbase Verified for the session.
|
|
@@ -462,6 +469,88 @@ export namespace RunCreateParams {
|
|
|
462
469
|
*/
|
|
463
470
|
persist?: boolean;
|
|
464
471
|
}
|
|
472
|
+
|
|
473
|
+
export interface BrowserbaseProxyConfig {
|
|
474
|
+
/**
|
|
475
|
+
* Type of proxy. Always use 'browserbase' for the Browserbase managed proxy
|
|
476
|
+
* network.
|
|
477
|
+
*/
|
|
478
|
+
type: 'browserbase';
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Domain pattern for which this proxy should be used. If omitted, defaults to all
|
|
482
|
+
* domains. Optional.
|
|
483
|
+
*/
|
|
484
|
+
domainPattern?: string;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Geographic location for the proxy. Optional.
|
|
488
|
+
*/
|
|
489
|
+
geolocation?: BrowserbaseProxyConfig.Geolocation;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
export namespace BrowserbaseProxyConfig {
|
|
493
|
+
/**
|
|
494
|
+
* Geographic location for the proxy. Optional.
|
|
495
|
+
*/
|
|
496
|
+
export interface Geolocation {
|
|
497
|
+
/**
|
|
498
|
+
* Country code in ISO 3166-1 alpha-2 format
|
|
499
|
+
*/
|
|
500
|
+
country: string;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Name of the city. Use spaces for multi-word city names. Optional.
|
|
504
|
+
*/
|
|
505
|
+
city?: string;
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* US state code (2 characters). Must also specify US as the country. Optional.
|
|
509
|
+
*/
|
|
510
|
+
state?: string;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
export interface ExternalProxyConfig {
|
|
515
|
+
/**
|
|
516
|
+
* Server URL for external proxy. Required.
|
|
517
|
+
*/
|
|
518
|
+
server: string;
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Type of proxy. Always 'external' for this config.
|
|
522
|
+
*/
|
|
523
|
+
type: 'external';
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Domain pattern for which this proxy should be used. If omitted, defaults to all
|
|
527
|
+
* domains. Optional.
|
|
528
|
+
*/
|
|
529
|
+
domainPattern?: string;
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* Password for external proxy authentication. Optional.
|
|
533
|
+
*/
|
|
534
|
+
password?: string;
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Username for external proxy authentication. Optional.
|
|
538
|
+
*/
|
|
539
|
+
username?: string;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
export interface NoneProxyConfig {
|
|
543
|
+
/**
|
|
544
|
+
* Type of proxy. Always 'none' for this config.
|
|
545
|
+
*/
|
|
546
|
+
type: 'none';
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Domain pattern for which this proxy should be used. If omitted, defaults to all
|
|
550
|
+
* domains. Optional.
|
|
551
|
+
*/
|
|
552
|
+
domainPattern?: string;
|
|
553
|
+
}
|
|
465
554
|
}
|
|
466
555
|
|
|
467
556
|
export interface Variables {
|
|
@@ -29,6 +29,8 @@ export class Contexts extends APIResource {
|
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Update a Context
|
|
32
|
+
*
|
|
33
|
+
* @deprecated
|
|
32
34
|
*/
|
|
33
35
|
update(id: string, options?: Core.RequestOptions): Core.APIPromise<ContextUpdateResponse> {
|
|
34
36
|
return this._client.put(`/v1/contexts/${id}`, options);
|
|
@@ -56,6 +58,13 @@ export interface Context {
|
|
|
56
58
|
projectId: string;
|
|
57
59
|
|
|
58
60
|
updatedAt: string;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Optional user-defined name for the Context. Leading and trailing whitespace is
|
|
64
|
+
* trimmed before storage. Names are unique within the project among active
|
|
65
|
+
* Contexts, compared case-insensitively.
|
|
66
|
+
*/
|
|
67
|
+
name?: string;
|
|
59
68
|
}
|
|
60
69
|
|
|
61
70
|
export interface ContextCreateResponse {
|
|
@@ -79,7 +88,9 @@ export interface ContextCreateResponse {
|
|
|
79
88
|
publicKey: string;
|
|
80
89
|
|
|
81
90
|
/**
|
|
82
|
-
*
|
|
91
|
+
* @deprecated Deprecated. Browserbase no longer supports context uploads via the
|
|
92
|
+
* API; this field always contains a non-functional sentinel URL and remains only
|
|
93
|
+
* for backwards compatibility.
|
|
83
94
|
*/
|
|
84
95
|
uploadUrl: string;
|
|
85
96
|
}
|
|
@@ -105,12 +116,21 @@ export interface ContextUpdateResponse {
|
|
|
105
116
|
publicKey: string;
|
|
106
117
|
|
|
107
118
|
/**
|
|
108
|
-
*
|
|
119
|
+
* @deprecated Deprecated. Browserbase no longer supports context uploads via the
|
|
120
|
+
* API; this field always contains a non-functional sentinel URL and remains only
|
|
121
|
+
* for backwards compatibility.
|
|
109
122
|
*/
|
|
110
123
|
uploadUrl: string;
|
|
111
124
|
}
|
|
112
125
|
|
|
113
126
|
export interface ContextCreateParams {
|
|
127
|
+
/**
|
|
128
|
+
* Optional user-defined name for the Context. Leading and trailing whitespace is
|
|
129
|
+
* trimmed before storage. Names are unique within the project among active
|
|
130
|
+
* Contexts, compared case-insensitively.
|
|
131
|
+
*/
|
|
132
|
+
name?: string;
|
|
133
|
+
|
|
114
134
|
/**
|
|
115
135
|
* The Project ID. Can be found in
|
|
116
136
|
* [Settings](https://www.browserbase.com/settings). Optional - if not provided,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
export { Downloads } from './downloads';
|
|
4
4
|
export { Logs, type SessionLog, type LogListResponse } from './logs';
|
|
5
|
-
export { Recording, type SessionRecording, type RecordingRetrieveResponse } from './recording';
|
|
5
|
+
export { Recording, type SessionRecording, type RecordingRetrieveResponse } from './recording/index';
|
|
6
6
|
export { Replays, type ReplayRetrieveResponse } from './replays';
|
|
7
7
|
export {
|
|
8
8
|
Sessions,
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../resource';
|
|
4
|
+
import * as Core from '../../../core';
|
|
5
|
+
|
|
6
|
+
export class Downloads extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Requests one downloadable MP4 per recorded page of a session. Assembly runs
|
|
9
|
+
* asynchronously and every page returns as `PENDING`. Re-posting re-enqueues all
|
|
10
|
+
* pages and retries any that failed. Poll the GET endpoint for per-page status
|
|
11
|
+
* and, on standard (non-BYOS) projects, download URLs.
|
|
12
|
+
*/
|
|
13
|
+
create(id: string, options?: Core.RequestOptions): Core.APIPromise<DownloadCreateResponse> {
|
|
14
|
+
return this._client.post(`/v1/sessions/${id}/recording/downloads`, options);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Returns the per-page download status for a session, with a short-lived signed
|
|
19
|
+
* URL for each completed page on standard (non-BYOS) projects.
|
|
20
|
+
*/
|
|
21
|
+
list(id: string, options?: Core.RequestOptions): Core.APIPromise<DownloadListResponse> {
|
|
22
|
+
return this._client.get(`/v1/sessions/${id}/recording/downloads`, options);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface RecordingDownload {
|
|
27
|
+
/**
|
|
28
|
+
* Recorded page (tab) within the session, e.g. "0", "1".
|
|
29
|
+
*/
|
|
30
|
+
pageId: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Per-page MP4 assembly state. `NOT_REQUESTED`: no download has been requested for
|
|
34
|
+
* the session yet. `PENDING`: assembly is enqueued or in progress. `COMPLETED`:
|
|
35
|
+
* the MP4 is ready. `FAILED`: assembly failed; POST again to retry.
|
|
36
|
+
*/
|
|
37
|
+
status: 'NOT_REQUESTED' | 'PENDING' | 'COMPLETED' | 'FAILED';
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* When the MP4 was created. Present only when COMPLETED on a standard (non-BYOS)
|
|
41
|
+
* project.
|
|
42
|
+
*/
|
|
43
|
+
completedAt?: string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Short-lived signed CDN URL, re-minted each GET. Present only when COMPLETED on a
|
|
47
|
+
* standard (non-BYOS) project.
|
|
48
|
+
*/
|
|
49
|
+
downloadUrl?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface DownloadCreateResponse {
|
|
53
|
+
downloads: Array<RecordingDownload>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface DownloadListResponse {
|
|
57
|
+
downloads: Array<RecordingDownload>;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export declare namespace Downloads {
|
|
61
|
+
export {
|
|
62
|
+
type RecordingDownload as RecordingDownload,
|
|
63
|
+
type DownloadCreateResponse as DownloadCreateResponse,
|
|
64
|
+
type DownloadListResponse as DownloadListResponse,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Downloads,
|
|
5
|
+
type RecordingDownload,
|
|
6
|
+
type DownloadCreateResponse,
|
|
7
|
+
type DownloadListResponse,
|
|
8
|
+
} from './downloads';
|
|
9
|
+
export { Recording, type SessionRecording, type RecordingRetrieveResponse } from './recording';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../resource';
|
|
4
|
+
import * as Core from '../../../core';
|
|
5
|
+
import * as DownloadsAPI from './downloads';
|
|
6
|
+
import { DownloadCreateResponse, DownloadListResponse, Downloads, RecordingDownload } from './downloads';
|
|
7
|
+
|
|
8
|
+
export class Recording extends APIResource {
|
|
9
|
+
downloads: DownloadsAPI.Downloads = new DownloadsAPI.Downloads(this._client);
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Session Recording
|
|
13
|
+
*/
|
|
14
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<RecordingRetrieveResponse> {
|
|
15
|
+
return this._client.get(`/v1/sessions/${id}/recording`, options);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface SessionRecording {
|
|
20
|
+
/**
|
|
21
|
+
* See
|
|
22
|
+
* [rrweb documentation](https://github.com/rrweb-io/rrweb/blob/master/docs/recipes/dive-into-event.md).
|
|
23
|
+
*/
|
|
24
|
+
data: { [key: string]: unknown };
|
|
25
|
+
|
|
26
|
+
sessionId: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* milliseconds that have elapsed since the UNIX epoch
|
|
30
|
+
*/
|
|
31
|
+
timestamp: number;
|
|
32
|
+
|
|
33
|
+
type: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type RecordingRetrieveResponse = Array<SessionRecording>;
|
|
37
|
+
|
|
38
|
+
Recording.Downloads = Downloads;
|
|
39
|
+
|
|
40
|
+
export declare namespace Recording {
|
|
41
|
+
export {
|
|
42
|
+
type SessionRecording as SessionRecording,
|
|
43
|
+
type RecordingRetrieveResponse as RecordingRetrieveResponse,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
Downloads as Downloads,
|
|
48
|
+
type RecordingDownload as RecordingDownload,
|
|
49
|
+
type DownloadCreateResponse as DownloadCreateResponse,
|
|
50
|
+
type DownloadListResponse as DownloadListResponse,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -1,39 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import * as Core from '../../core';
|
|
5
|
-
|
|
6
|
-
export class Recording extends APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Session Recording
|
|
9
|
-
*/
|
|
10
|
-
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<RecordingRetrieveResponse> {
|
|
11
|
-
return this._client.get(`/v1/sessions/${id}/recording`, options);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface SessionRecording {
|
|
16
|
-
/**
|
|
17
|
-
* See
|
|
18
|
-
* [rrweb documentation](https://github.com/rrweb-io/rrweb/blob/master/docs/recipes/dive-into-event.md).
|
|
19
|
-
*/
|
|
20
|
-
data: { [key: string]: unknown };
|
|
21
|
-
|
|
22
|
-
sessionId: string;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* milliseconds that have elapsed since the UNIX epoch
|
|
26
|
-
*/
|
|
27
|
-
timestamp: number;
|
|
28
|
-
|
|
29
|
-
type: number;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export type RecordingRetrieveResponse = Array<SessionRecording>;
|
|
33
|
-
|
|
34
|
-
export declare namespace Recording {
|
|
35
|
-
export {
|
|
36
|
-
type SessionRecording as SessionRecording,
|
|
37
|
-
type RecordingRetrieveResponse as RecordingRetrieveResponse,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
3
|
+
export * from './recording/index';
|
|
@@ -7,12 +7,12 @@ import * as DownloadsAPI from './downloads';
|
|
|
7
7
|
import { Downloads } from './downloads';
|
|
8
8
|
import * as LogsAPI from './logs';
|
|
9
9
|
import { LogListResponse, Logs, SessionLog } from './logs';
|
|
10
|
-
import * as RecordingAPI from './recording';
|
|
11
|
-
import { Recording, RecordingRetrieveResponse, SessionRecording } from './recording';
|
|
12
10
|
import * as ReplaysAPI from './replays';
|
|
13
11
|
import { ReplayRetrieveResponse, Replays } from './replays';
|
|
14
12
|
import * as UploadsAPI from './uploads';
|
|
15
13
|
import { UploadCreateParams, UploadCreateResponse, Uploads } from './uploads';
|
|
14
|
+
import * as RecordingAPI from './recording/recording';
|
|
15
|
+
import { Recording, RecordingRetrieveResponse, SessionRecording } from './recording/recording';
|
|
16
16
|
|
|
17
17
|
export class Sessions extends APIResource {
|
|
18
18
|
downloads: DownloadsAPI.Downloads = new DownloadsAPI.Downloads(this._client);
|
|
@@ -24,16 +24,17 @@ export class Sessions extends APIResource {
|
|
|
24
24
|
/**
|
|
25
25
|
* Create a Session
|
|
26
26
|
*/
|
|
27
|
-
create(
|
|
27
|
+
create(params?: SessionCreateParams, options?: Core.RequestOptions): Core.APIPromise<SessionCreateResponse>;
|
|
28
28
|
create(options?: Core.RequestOptions): Core.APIPromise<SessionCreateResponse>;
|
|
29
29
|
create(
|
|
30
|
-
|
|
30
|
+
params: SessionCreateParams | Core.RequestOptions = {},
|
|
31
31
|
options?: Core.RequestOptions,
|
|
32
32
|
): Core.APIPromise<SessionCreateResponse> {
|
|
33
|
-
if (isRequestOptions(
|
|
34
|
-
return this.create({},
|
|
33
|
+
if (isRequestOptions(params)) {
|
|
34
|
+
return this.create({}, params);
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
const { api_timeout, ...body } = params;
|
|
37
|
+
return this._client.post('/v1/sessions', { body: { timeout: api_timeout, ...body }, ...options });
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
/**
|
|
@@ -230,7 +231,7 @@ export interface SessionCreateParams {
|
|
|
230
231
|
* Duration in seconds after which the session will automatically end. Defaults to
|
|
231
232
|
* the Project's `defaultTimeout`.
|
|
232
233
|
*/
|
|
233
|
-
|
|
234
|
+
api_timeout?: number;
|
|
234
235
|
|
|
235
236
|
/**
|
|
236
237
|
* Arbitrary user metadata to attach to the session. To learn more about user
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.17.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.17.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.17.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|