@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
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Browsers = void 0;
|
|
5
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../core/resource.js");
|
|
7
|
+
const ReplaysAPI = tslib_1.__importStar(require("./replays.js"));
|
|
8
|
+
const replays_1 = require("./replays.js");
|
|
9
|
+
const headers_1 = require("../../internal/headers.js");
|
|
10
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
11
|
+
class Browsers extends resource_1.APIResource {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.replays = new ReplaysAPI.Replays(this._client);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create a new browser session from within an action.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const browser = await client.browsers.create();
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
create(body = {}, options) {
|
|
25
|
+
return this._client.post('/browsers', { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get information about a browser session.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const browser = await client.browsers.retrieve(
|
|
33
|
+
* 'htzv5orfit78e1m2biiifpbv',
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
retrieve(id, options) {
|
|
38
|
+
return this._client.get((0, path_1.path) `/browsers/${id}`, options);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* List active browser sessions
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const browsers = await client.browsers.list();
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
list(options) {
|
|
49
|
+
return this._client.get('/browsers', options);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Delete a persistent browser session by its persistent_id.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* await client.browsers.delete({
|
|
57
|
+
* persistent_id: 'persistent_id',
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
delete(params, options) {
|
|
62
|
+
const { persistent_id } = params;
|
|
63
|
+
return this._client.delete('/browsers', {
|
|
64
|
+
query: { persistent_id },
|
|
65
|
+
...options,
|
|
66
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Delete a browser session by ID
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* await client.browsers.deleteByID(
|
|
75
|
+
* 'htzv5orfit78e1m2biiifpbv',
|
|
76
|
+
* );
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
deleteByID(id, options) {
|
|
80
|
+
return this._client.delete((0, path_1.path) `/browsers/${id}`, {
|
|
81
|
+
...options,
|
|
82
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.Browsers = Browsers;
|
|
87
|
+
Browsers.Replays = replays_1.Replays;
|
|
88
|
+
//# sourceMappingURL=browsers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browsers.js","sourceRoot":"","sources":["../../src/resources/browsers/browsers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,iEAAwC;AACxC,0CAOmB;AAEnB,uDAAsD;AAEt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,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AA/ED,4BA+EC;AAoHD,QAAQ,CAAC,OAAO,GAAG,iBAAO,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import * as ReplaysAPI from "./replays.mjs";
|
|
4
|
+
import { Replays, } from "./replays.mjs";
|
|
5
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
6
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
7
|
+
export class Browsers extends APIResource {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.replays = new ReplaysAPI.Replays(this._client);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Create a new browser session from within an action.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const browser = await client.browsers.create();
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(body = {}, options) {
|
|
21
|
+
return this._client.post('/browsers', { body, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get information about a browser session.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const browser = await client.browsers.retrieve(
|
|
29
|
+
* 'htzv5orfit78e1m2biiifpbv',
|
|
30
|
+
* );
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
retrieve(id, options) {
|
|
34
|
+
return this._client.get(path `/browsers/${id}`, options);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* List active browser sessions
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const browsers = await client.browsers.list();
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
list(options) {
|
|
45
|
+
return this._client.get('/browsers', options);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Delete a persistent browser session by its persistent_id.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* await client.browsers.delete({
|
|
53
|
+
* persistent_id: 'persistent_id',
|
|
54
|
+
* });
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
delete(params, options) {
|
|
58
|
+
const { persistent_id } = params;
|
|
59
|
+
return this._client.delete('/browsers', {
|
|
60
|
+
query: { persistent_id },
|
|
61
|
+
...options,
|
|
62
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Delete a browser session by ID
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* await client.browsers.deleteByID(
|
|
71
|
+
* 'htzv5orfit78e1m2biiifpbv',
|
|
72
|
+
* );
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
deleteByID(id, options) {
|
|
76
|
+
return this._client.delete(path `/browsers/${id}`, {
|
|
77
|
+
...options,
|
|
78
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
Browsers.Replays = Replays;
|
|
83
|
+
//# sourceMappingURL=browsers.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browsers.mjs","sourceRoot":"","sources":["../../src/resources/browsers/browsers.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,UAAU;OACf,EAML,OAAO,GACR;OAEM,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAA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|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Browsers, type BrowserPersistence, type BrowserCreateResponse, type BrowserRetrieveResponse, type BrowserListResponse, type BrowserCreateParams, type BrowserDeleteParams, } from "./browsers.mjs";
|
|
2
|
+
export { Replays, type ReplayListResponse, type ReplayStartResponse, type ReplayDownloadParams, type ReplayStartParams, type ReplayStopParams, } from "./replays.mjs";
|
|
3
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/browsers/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB;OACM,EACL,OAAO,EACP,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Browsers, type BrowserPersistence, type BrowserCreateResponse, type BrowserRetrieveResponse, type BrowserListResponse, type BrowserCreateParams, type BrowserDeleteParams, } from "./browsers.js";
|
|
2
|
+
export { Replays, type ReplayListResponse, type ReplayStartResponse, type ReplayDownloadParams, type ReplayStartParams, type ReplayStopParams, } from "./replays.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/browsers/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB;OACM,EACL,OAAO,EACP,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Replays = exports.Browsers = void 0;
|
|
5
|
+
var browsers_1 = require("./browsers.js");
|
|
6
|
+
Object.defineProperty(exports, "Browsers", { enumerable: true, get: function () { return browsers_1.Browsers; } });
|
|
7
|
+
var replays_1 = require("./replays.js");
|
|
8
|
+
Object.defineProperty(exports, "Replays", { enumerable: true, get: function () { return replays_1.Replays; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/browsers/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0CAQoB;AAPlB,oGAAA,QAAQ,OAAA;AAQV,wCAOmB;AANjB,kGAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/browsers/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,QAAQ,GAOT;OACM,EACL,OAAO,GAMR"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
+
export declare class Replays extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* List all replays for the specified browser session.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const replays = await client.browsers.replays.list('id');
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
list(id: string, options?: RequestOptions): APIPromise<ReplayListResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Download or stream the specified replay recording.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const response = await client.browsers.replays.download(
|
|
20
|
+
* 'replay_id',
|
|
21
|
+
* { id: 'id' },
|
|
22
|
+
* );
|
|
23
|
+
*
|
|
24
|
+
* const content = await response.blob();
|
|
25
|
+
* console.log(content);
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
download(replayID: string, params: ReplayDownloadParams, options?: RequestOptions): APIPromise<Response>;
|
|
29
|
+
/**
|
|
30
|
+
* Start recording the browser session and return a replay ID.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const response = await client.browsers.replays.start('id');
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
start(id: string, body?: ReplayStartParams | null | undefined, options?: RequestOptions): APIPromise<ReplayStartResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Stop the specified replay recording and persist the video.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* await client.browsers.replays.stop('replay_id', {
|
|
44
|
+
* id: 'id',
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
stop(replayID: string, params: ReplayStopParams, options?: RequestOptions): APIPromise<void>;
|
|
49
|
+
}
|
|
50
|
+
export type ReplayListResponse = Array<ReplayListResponse.ReplayListResponseItem>;
|
|
51
|
+
export declare namespace ReplayListResponse {
|
|
52
|
+
/**
|
|
53
|
+
* Information about a browser replay recording.
|
|
54
|
+
*/
|
|
55
|
+
interface ReplayListResponseItem {
|
|
56
|
+
/**
|
|
57
|
+
* Unique identifier for the replay recording.
|
|
58
|
+
*/
|
|
59
|
+
replay_id: string;
|
|
60
|
+
/**
|
|
61
|
+
* Timestamp when replay finished
|
|
62
|
+
*/
|
|
63
|
+
finished_at?: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* URL for viewing the replay recording.
|
|
66
|
+
*/
|
|
67
|
+
replay_view_url?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Timestamp when replay started
|
|
70
|
+
*/
|
|
71
|
+
started_at?: string | null;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Information about a browser replay recording.
|
|
76
|
+
*/
|
|
77
|
+
export interface ReplayStartResponse {
|
|
78
|
+
/**
|
|
79
|
+
* Unique identifier for the replay recording.
|
|
80
|
+
*/
|
|
81
|
+
replay_id: string;
|
|
82
|
+
/**
|
|
83
|
+
* Timestamp when replay finished
|
|
84
|
+
*/
|
|
85
|
+
finished_at?: string | null;
|
|
86
|
+
/**
|
|
87
|
+
* URL for viewing the replay recording.
|
|
88
|
+
*/
|
|
89
|
+
replay_view_url?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Timestamp when replay started
|
|
92
|
+
*/
|
|
93
|
+
started_at?: string | null;
|
|
94
|
+
}
|
|
95
|
+
export interface ReplayDownloadParams {
|
|
96
|
+
/**
|
|
97
|
+
* Browser session ID
|
|
98
|
+
*/
|
|
99
|
+
id: string;
|
|
100
|
+
}
|
|
101
|
+
export interface ReplayStartParams {
|
|
102
|
+
/**
|
|
103
|
+
* Recording framerate in fps.
|
|
104
|
+
*/
|
|
105
|
+
framerate?: number;
|
|
106
|
+
/**
|
|
107
|
+
* Maximum recording duration in seconds.
|
|
108
|
+
*/
|
|
109
|
+
max_duration_in_seconds?: number;
|
|
110
|
+
}
|
|
111
|
+
export interface ReplayStopParams {
|
|
112
|
+
/**
|
|
113
|
+
* Browser session ID
|
|
114
|
+
*/
|
|
115
|
+
id: string;
|
|
116
|
+
}
|
|
117
|
+
export declare namespace Replays {
|
|
118
|
+
export { type ReplayListResponse as ReplayListResponse, type ReplayStartResponse as ReplayStartResponse, type ReplayDownloadParams as ReplayDownloadParams, type ReplayStartParams as ReplayStartParams, type ReplayStopParams as ReplayStopParams, };
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=replays.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replays.d.mts","sourceRoot":"","sources":["../../src/resources/browsers/replays.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAI1E;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;IASxG;;;;;;;OAOG;IACH,KAAK,CACH,EAAE,EAAE,MAAM,EACV,IAAI,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;IAIlC;;;;;;;;;OASG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAO7F;AAED,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;AAElF,yBAAiB,kBAAkB,CAAC;IAClC;;OAEG;IACH,UAAiB,sBAAsB;QACrC;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE5B;;WAEG;QACH,eAAe,CAAC,EAAE,MAAM,CAAC;QAEzB;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC5B;CACF;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
export declare class Replays extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* List all replays for the specified browser session.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const replays = await client.browsers.replays.list('id');
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
list(id: string, options?: RequestOptions): APIPromise<ReplayListResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Download or stream the specified replay recording.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const response = await client.browsers.replays.download(
|
|
20
|
+
* 'replay_id',
|
|
21
|
+
* { id: 'id' },
|
|
22
|
+
* );
|
|
23
|
+
*
|
|
24
|
+
* const content = await response.blob();
|
|
25
|
+
* console.log(content);
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
download(replayID: string, params: ReplayDownloadParams, options?: RequestOptions): APIPromise<Response>;
|
|
29
|
+
/**
|
|
30
|
+
* Start recording the browser session and return a replay ID.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const response = await client.browsers.replays.start('id');
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
start(id: string, body?: ReplayStartParams | null | undefined, options?: RequestOptions): APIPromise<ReplayStartResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Stop the specified replay recording and persist the video.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* await client.browsers.replays.stop('replay_id', {
|
|
44
|
+
* id: 'id',
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
stop(replayID: string, params: ReplayStopParams, options?: RequestOptions): APIPromise<void>;
|
|
49
|
+
}
|
|
50
|
+
export type ReplayListResponse = Array<ReplayListResponse.ReplayListResponseItem>;
|
|
51
|
+
export declare namespace ReplayListResponse {
|
|
52
|
+
/**
|
|
53
|
+
* Information about a browser replay recording.
|
|
54
|
+
*/
|
|
55
|
+
interface ReplayListResponseItem {
|
|
56
|
+
/**
|
|
57
|
+
* Unique identifier for the replay recording.
|
|
58
|
+
*/
|
|
59
|
+
replay_id: string;
|
|
60
|
+
/**
|
|
61
|
+
* Timestamp when replay finished
|
|
62
|
+
*/
|
|
63
|
+
finished_at?: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* URL for viewing the replay recording.
|
|
66
|
+
*/
|
|
67
|
+
replay_view_url?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Timestamp when replay started
|
|
70
|
+
*/
|
|
71
|
+
started_at?: string | null;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Information about a browser replay recording.
|
|
76
|
+
*/
|
|
77
|
+
export interface ReplayStartResponse {
|
|
78
|
+
/**
|
|
79
|
+
* Unique identifier for the replay recording.
|
|
80
|
+
*/
|
|
81
|
+
replay_id: string;
|
|
82
|
+
/**
|
|
83
|
+
* Timestamp when replay finished
|
|
84
|
+
*/
|
|
85
|
+
finished_at?: string | null;
|
|
86
|
+
/**
|
|
87
|
+
* URL for viewing the replay recording.
|
|
88
|
+
*/
|
|
89
|
+
replay_view_url?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Timestamp when replay started
|
|
92
|
+
*/
|
|
93
|
+
started_at?: string | null;
|
|
94
|
+
}
|
|
95
|
+
export interface ReplayDownloadParams {
|
|
96
|
+
/**
|
|
97
|
+
* Browser session ID
|
|
98
|
+
*/
|
|
99
|
+
id: string;
|
|
100
|
+
}
|
|
101
|
+
export interface ReplayStartParams {
|
|
102
|
+
/**
|
|
103
|
+
* Recording framerate in fps.
|
|
104
|
+
*/
|
|
105
|
+
framerate?: number;
|
|
106
|
+
/**
|
|
107
|
+
* Maximum recording duration in seconds.
|
|
108
|
+
*/
|
|
109
|
+
max_duration_in_seconds?: number;
|
|
110
|
+
}
|
|
111
|
+
export interface ReplayStopParams {
|
|
112
|
+
/**
|
|
113
|
+
* Browser session ID
|
|
114
|
+
*/
|
|
115
|
+
id: string;
|
|
116
|
+
}
|
|
117
|
+
export declare namespace Replays {
|
|
118
|
+
export { type ReplayListResponse as ReplayListResponse, type ReplayStartResponse as ReplayStartResponse, type ReplayDownloadParams as ReplayDownloadParams, type ReplayStartParams as ReplayStartParams, type ReplayStopParams as ReplayStopParams, };
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=replays.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Replays = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../internal/headers.js");
|
|
7
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
class Replays extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* List all replays for the specified browser session.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const replays = await client.browsers.replays.list('id');
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
list(id, options) {
|
|
18
|
+
return this._client.get((0, path_1.path) `/browsers/${id}/replays`, options);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Download or stream the specified replay recording.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const response = await client.browsers.replays.download(
|
|
26
|
+
* 'replay_id',
|
|
27
|
+
* { id: 'id' },
|
|
28
|
+
* );
|
|
29
|
+
*
|
|
30
|
+
* const content = await response.blob();
|
|
31
|
+
* console.log(content);
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
download(replayID, params, options) {
|
|
35
|
+
const { id } = params;
|
|
36
|
+
return this._client.get((0, path_1.path) `/browsers/${id}/replays/${replayID}`, {
|
|
37
|
+
...options,
|
|
38
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: 'video/mp4' }, options?.headers]),
|
|
39
|
+
__binaryResponse: true,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Start recording the browser session and return a replay ID.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const response = await client.browsers.replays.start('id');
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
start(id, body = {}, options) {
|
|
51
|
+
return this._client.post((0, path_1.path) `/browsers/${id}/replays`, { body, ...options });
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Stop the specified replay recording and persist the video.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* await client.browsers.replays.stop('replay_id', {
|
|
59
|
+
* id: 'id',
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
stop(replayID, params, options) {
|
|
64
|
+
const { id } = params;
|
|
65
|
+
return this._client.post((0, path_1.path) `/browsers/${id}/replays/${replayID}/stop`, {
|
|
66
|
+
...options,
|
|
67
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.Replays = Replays;
|
|
72
|
+
//# sourceMappingURL=replays.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replays.js","sourceRoot":"","sources":["../../src/resources/browsers/replays.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAU,EAAE,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,QAAgB,EAAE,MAA4B,EAAE,OAAwB;QAC/E,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,YAAY,QAAQ,EAAE,EAAE;YACjE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAClE,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CACH,EAAU,EACV,OAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CAAC,QAAgB,EAAE,MAAwB,EAAE,OAAwB;QACvE,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,YAAY,QAAQ,OAAO,EAAE;YACvE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AArED,0BAqEC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
4
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
5
|
+
export class Replays extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* List all replays for the specified browser session.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const replays = await client.browsers.replays.list('id');
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
list(id, options) {
|
|
15
|
+
return this._client.get(path `/browsers/${id}/replays`, options);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Download or stream the specified replay recording.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const response = await client.browsers.replays.download(
|
|
23
|
+
* 'replay_id',
|
|
24
|
+
* { id: 'id' },
|
|
25
|
+
* );
|
|
26
|
+
*
|
|
27
|
+
* const content = await response.blob();
|
|
28
|
+
* console.log(content);
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
download(replayID, params, options) {
|
|
32
|
+
const { id } = params;
|
|
33
|
+
return this._client.get(path `/browsers/${id}/replays/${replayID}`, {
|
|
34
|
+
...options,
|
|
35
|
+
headers: buildHeaders([{ Accept: 'video/mp4' }, options?.headers]),
|
|
36
|
+
__binaryResponse: true,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Start recording the browser session and return a replay ID.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const response = await client.browsers.replays.start('id');
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
start(id, body = {}, options) {
|
|
48
|
+
return this._client.post(path `/browsers/${id}/replays`, { body, ...options });
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Stop the specified replay recording and persist the video.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* await client.browsers.replays.stop('replay_id', {
|
|
56
|
+
* id: 'id',
|
|
57
|
+
* });
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
stop(replayID, params, options) {
|
|
61
|
+
const { id } = params;
|
|
62
|
+
return this._client.post(path `/browsers/${id}/replays/${replayID}/stop`, {
|
|
63
|
+
...options,
|
|
64
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=replays.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replays.mjs","sourceRoot":"","sources":["../../src/resources/browsers/replays.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAU,EAAE,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,QAAgB,EAAE,MAA4B,EAAE,OAAwB;QAC/E,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC;QACt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