@onkernel/sdk 0.19.2 → 0.21.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 +22 -0
- package/client.d.mts +9 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -3
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/browser-pools.d.mts +438 -0
- package/resources/browser-pools.d.mts.map +1 -0
- package/resources/browser-pools.d.ts +438 -0
- package/resources/browser-pools.d.ts.map +1 -0
- package/resources/browser-pools.js +125 -0
- package/resources/browser-pools.js.map +1 -0
- package/resources/browser-pools.mjs +121 -0
- package/resources/browser-pools.mjs.map +1 -0
- package/resources/browsers/browsers.d.mts +79 -201
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +79 -201
- package/resources/browsers/browsers.d.ts.map +1 -1
- package/resources/browsers/browsers.js +9 -4
- package/resources/browsers/browsers.js.map +1 -1
- package/resources/browsers/browsers.mjs +9 -4
- package/resources/browsers/browsers.mjs.map +1 -1
- package/resources/browsers/index.d.mts +1 -1
- package/resources/browsers/index.d.mts.map +1 -1
- package/resources/browsers/index.d.ts +1 -1
- package/resources/browsers/index.d.ts.map +1 -1
- package/resources/browsers/index.js.map +1 -1
- package/resources/browsers/index.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/shared.d.mts +61 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +61 -0
- package/resources/shared.d.ts.map +1 -1
- package/src/client.ts +41 -1
- package/src/resources/browser-pools.ts +560 -0
- package/src/resources/browsers/browsers.ts +95 -225
- package/src/resources/browsers/index.ts +2 -0
- package/src/resources/index.ts +17 -0
- package/src/resources/shared.ts +69 -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
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as Shared from "./shared.mjs";
|
|
3
|
+
import * as BrowsersAPI from "./browsers/browsers.mjs";
|
|
4
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
5
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
6
|
+
export declare class BrowserPools extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create a new browser pool with the specified configuration and size.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const browserPool = await client.browserPools.create({
|
|
13
|
+
* size: 10,
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
create(body: BrowserPoolCreateParams, options?: RequestOptions): APIPromise<BrowserPool>;
|
|
18
|
+
/**
|
|
19
|
+
* Retrieve details for a single browser pool by its ID or name.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const browserPool = await client.browserPools.retrieve(
|
|
24
|
+
* 'id_or_name',
|
|
25
|
+
* );
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
retrieve(idOrName: string, options?: RequestOptions): APIPromise<BrowserPool>;
|
|
29
|
+
/**
|
|
30
|
+
* Updates the configuration used to create browsers in the pool.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const browserPool = await client.browserPools.update(
|
|
35
|
+
* 'id_or_name',
|
|
36
|
+
* { size: 10 },
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
update(idOrName: string, body: BrowserPoolUpdateParams, options?: RequestOptions): APIPromise<BrowserPool>;
|
|
41
|
+
/**
|
|
42
|
+
* List browser pools owned by the caller's organization.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const browserPools = await client.browserPools.list();
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
list(options?: RequestOptions): APIPromise<BrowserPoolListResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Delete a browser pool and all browsers in it. By default, deletion is blocked if
|
|
52
|
+
* browsers are currently leased. Use force=true to terminate leased browsers.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* await client.browserPools.delete('id_or_name');
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
delete(idOrName: string, body?: BrowserPoolDeleteParams | null | undefined, options?: RequestOptions): APIPromise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Long-polling endpoint to acquire a browser from the pool. Returns immediately
|
|
62
|
+
* when a browser is available, or returns 204 No Content when the poll times out.
|
|
63
|
+
* The client should retry the request to continue waiting for a browser. The
|
|
64
|
+
* acquired browser will use the pool's timeout_seconds for its idle timeout.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const response = await client.browserPools.acquire(
|
|
69
|
+
* 'id_or_name',
|
|
70
|
+
* );
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
acquire(idOrName: string, body: BrowserPoolAcquireParams, options?: RequestOptions): APIPromise<BrowserPoolAcquireResponse>;
|
|
74
|
+
/**
|
|
75
|
+
* Destroys all idle browsers in the pool; leased browsers are not affected.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* await client.browserPools.flush('id_or_name');
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
flush(idOrName: string, options?: RequestOptions): APIPromise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Release a browser back to the pool, optionally recreating the browser instance.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* await client.browserPools.release('id_or_name', {
|
|
89
|
+
* session_id: 'ts8iy3sg25ibheguyni2lg9t',
|
|
90
|
+
* });
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
release(idOrName: string, body: BrowserPoolReleaseParams, options?: RequestOptions): APIPromise<void>;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* A browser pool containing multiple identically configured browsers.
|
|
97
|
+
*/
|
|
98
|
+
export interface BrowserPool {
|
|
99
|
+
/**
|
|
100
|
+
* Unique identifier for the browser pool
|
|
101
|
+
*/
|
|
102
|
+
id: string;
|
|
103
|
+
/**
|
|
104
|
+
* Number of browsers currently acquired from the pool
|
|
105
|
+
*/
|
|
106
|
+
acquired_count: number;
|
|
107
|
+
/**
|
|
108
|
+
* Number of browsers currently available in the pool
|
|
109
|
+
*/
|
|
110
|
+
available_count: number;
|
|
111
|
+
/**
|
|
112
|
+
* Configuration used to create all browsers in this pool
|
|
113
|
+
*/
|
|
114
|
+
browser_pool_config: BrowserPoolRequest;
|
|
115
|
+
/**
|
|
116
|
+
* Timestamp when the browser pool was created
|
|
117
|
+
*/
|
|
118
|
+
created_at: string;
|
|
119
|
+
/**
|
|
120
|
+
* Browser pool name, if set
|
|
121
|
+
*/
|
|
122
|
+
name?: string;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Request body for acquiring a browser from the pool.
|
|
126
|
+
*/
|
|
127
|
+
export interface BrowserPoolAcquireRequest {
|
|
128
|
+
/**
|
|
129
|
+
* Maximum number of seconds to wait for a browser to be available. Defaults to the
|
|
130
|
+
* calculated time it would take to fill the pool at the currently configured fill
|
|
131
|
+
* rate.
|
|
132
|
+
*/
|
|
133
|
+
acquire_timeout_seconds?: number;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Request body for releasing a browser back to the pool.
|
|
137
|
+
*/
|
|
138
|
+
export interface BrowserPoolReleaseRequest {
|
|
139
|
+
/**
|
|
140
|
+
* Browser session ID to release back to the pool
|
|
141
|
+
*/
|
|
142
|
+
session_id: string;
|
|
143
|
+
/**
|
|
144
|
+
* Whether to reuse the browser instance or destroy it and create a new one.
|
|
145
|
+
* Defaults to true.
|
|
146
|
+
*/
|
|
147
|
+
reuse?: boolean;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Parameters for creating a browser pool. All browsers in the pool will be created
|
|
151
|
+
* with the same configuration.
|
|
152
|
+
*/
|
|
153
|
+
export interface BrowserPoolRequest {
|
|
154
|
+
/**
|
|
155
|
+
* Number of browsers to create in the pool
|
|
156
|
+
*/
|
|
157
|
+
size: number;
|
|
158
|
+
/**
|
|
159
|
+
* List of browser extensions to load into the session. Provide each by id or name.
|
|
160
|
+
*/
|
|
161
|
+
extensions?: Array<Shared.BrowserExtension>;
|
|
162
|
+
/**
|
|
163
|
+
* Percentage of the pool to fill per minute. Defaults to 10%.
|
|
164
|
+
*/
|
|
165
|
+
fill_rate_per_minute?: number;
|
|
166
|
+
/**
|
|
167
|
+
* If true, launches the browser using a headless image. Defaults to false.
|
|
168
|
+
*/
|
|
169
|
+
headless?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* If true, launches the browser in kiosk mode to hide address bar and tabs in live
|
|
172
|
+
* view.
|
|
173
|
+
*/
|
|
174
|
+
kiosk_mode?: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Optional name for the browser pool. Must be unique within the organization.
|
|
177
|
+
*/
|
|
178
|
+
name?: string;
|
|
179
|
+
/**
|
|
180
|
+
* Profile selection for the browser session. Provide either id or name. If
|
|
181
|
+
* specified, the matching profile will be loaded into the browser session.
|
|
182
|
+
* Profiles must be created beforehand.
|
|
183
|
+
*/
|
|
184
|
+
profile?: Shared.BrowserProfile;
|
|
185
|
+
/**
|
|
186
|
+
* Optional proxy to associate to the browser session. Must reference a proxy
|
|
187
|
+
* belonging to the caller's org.
|
|
188
|
+
*/
|
|
189
|
+
proxy_id?: string;
|
|
190
|
+
/**
|
|
191
|
+
* If true, launches the browser in stealth mode to reduce detection by anti-bot
|
|
192
|
+
* mechanisms.
|
|
193
|
+
*/
|
|
194
|
+
stealth?: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Default idle timeout in seconds for browsers acquired from this pool before they
|
|
197
|
+
* are destroyed. Defaults to 600 seconds if not specified
|
|
198
|
+
*/
|
|
199
|
+
timeout_seconds?: number;
|
|
200
|
+
/**
|
|
201
|
+
* Initial browser window size in pixels with optional refresh rate. If omitted,
|
|
202
|
+
* image defaults apply (commonly 1024x768@60). Only specific viewport
|
|
203
|
+
* configurations are supported. The server will reject unsupported combinations.
|
|
204
|
+
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
|
|
205
|
+
* 1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
|
|
206
|
+
* be automatically determined from the width and height if they match a supported
|
|
207
|
+
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
|
|
208
|
+
* live view browser
|
|
209
|
+
*/
|
|
210
|
+
viewport?: Shared.BrowserViewport;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Parameters for updating a browser pool. All browsers in the pool will be created
|
|
214
|
+
* with the same configuration.
|
|
215
|
+
*/
|
|
216
|
+
export interface BrowserPoolUpdateRequest extends BrowserPoolRequest {
|
|
217
|
+
/**
|
|
218
|
+
* Whether to discard all idle browsers and rebuild the pool immediately. Defaults
|
|
219
|
+
* to true.
|
|
220
|
+
*/
|
|
221
|
+
discard_all_idle?: boolean;
|
|
222
|
+
}
|
|
223
|
+
export type BrowserPoolListResponse = Array<BrowserPool>;
|
|
224
|
+
export interface BrowserPoolAcquireResponse {
|
|
225
|
+
/**
|
|
226
|
+
* Websocket URL for Chrome DevTools Protocol connections to the browser session
|
|
227
|
+
*/
|
|
228
|
+
cdp_ws_url: string;
|
|
229
|
+
/**
|
|
230
|
+
* When the browser session was created.
|
|
231
|
+
*/
|
|
232
|
+
created_at: string;
|
|
233
|
+
/**
|
|
234
|
+
* Whether the browser session is running in headless mode.
|
|
235
|
+
*/
|
|
236
|
+
headless: boolean;
|
|
237
|
+
/**
|
|
238
|
+
* Unique identifier for the browser session
|
|
239
|
+
*/
|
|
240
|
+
session_id: string;
|
|
241
|
+
/**
|
|
242
|
+
* Whether the browser session is running in stealth mode.
|
|
243
|
+
*/
|
|
244
|
+
stealth: boolean;
|
|
245
|
+
/**
|
|
246
|
+
* The number of seconds of inactivity before the browser session is terminated.
|
|
247
|
+
*/
|
|
248
|
+
timeout_seconds: number;
|
|
249
|
+
/**
|
|
250
|
+
* Remote URL for live viewing the browser session. Only available for non-headless
|
|
251
|
+
* browsers.
|
|
252
|
+
*/
|
|
253
|
+
browser_live_view_url?: string;
|
|
254
|
+
/**
|
|
255
|
+
* When the browser session was soft-deleted. Only present for deleted sessions.
|
|
256
|
+
*/
|
|
257
|
+
deleted_at?: string;
|
|
258
|
+
/**
|
|
259
|
+
* Whether the browser session is running in kiosk mode.
|
|
260
|
+
*/
|
|
261
|
+
kiosk_mode?: boolean;
|
|
262
|
+
/**
|
|
263
|
+
* Optional persistence configuration for the browser session.
|
|
264
|
+
*/
|
|
265
|
+
persistence?: BrowsersAPI.BrowserPersistence;
|
|
266
|
+
/**
|
|
267
|
+
* Browser profile metadata.
|
|
268
|
+
*/
|
|
269
|
+
profile?: BrowsersAPI.Profile;
|
|
270
|
+
/**
|
|
271
|
+
* ID of the proxy associated with this browser session, if any.
|
|
272
|
+
*/
|
|
273
|
+
proxy_id?: string;
|
|
274
|
+
/**
|
|
275
|
+
* Initial browser window size in pixels with optional refresh rate. If omitted,
|
|
276
|
+
* image defaults apply (commonly 1024x768@60). Only specific viewport
|
|
277
|
+
* configurations are supported. The server will reject unsupported combinations.
|
|
278
|
+
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
|
|
279
|
+
* 1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
|
|
280
|
+
* be automatically determined from the width and height if they match a supported
|
|
281
|
+
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
|
|
282
|
+
* live view browser
|
|
283
|
+
*/
|
|
284
|
+
viewport?: Shared.BrowserViewport;
|
|
285
|
+
}
|
|
286
|
+
export interface BrowserPoolCreateParams {
|
|
287
|
+
/**
|
|
288
|
+
* Number of browsers to create in the pool
|
|
289
|
+
*/
|
|
290
|
+
size: number;
|
|
291
|
+
/**
|
|
292
|
+
* List of browser extensions to load into the session. Provide each by id or name.
|
|
293
|
+
*/
|
|
294
|
+
extensions?: Array<Shared.BrowserExtension>;
|
|
295
|
+
/**
|
|
296
|
+
* Percentage of the pool to fill per minute. Defaults to 10%.
|
|
297
|
+
*/
|
|
298
|
+
fill_rate_per_minute?: number;
|
|
299
|
+
/**
|
|
300
|
+
* If true, launches the browser using a headless image. Defaults to false.
|
|
301
|
+
*/
|
|
302
|
+
headless?: boolean;
|
|
303
|
+
/**
|
|
304
|
+
* If true, launches the browser in kiosk mode to hide address bar and tabs in live
|
|
305
|
+
* view.
|
|
306
|
+
*/
|
|
307
|
+
kiosk_mode?: boolean;
|
|
308
|
+
/**
|
|
309
|
+
* Optional name for the browser pool. Must be unique within the organization.
|
|
310
|
+
*/
|
|
311
|
+
name?: string;
|
|
312
|
+
/**
|
|
313
|
+
* Profile selection for the browser session. Provide either id or name. If
|
|
314
|
+
* specified, the matching profile will be loaded into the browser session.
|
|
315
|
+
* Profiles must be created beforehand.
|
|
316
|
+
*/
|
|
317
|
+
profile?: Shared.BrowserProfile;
|
|
318
|
+
/**
|
|
319
|
+
* Optional proxy to associate to the browser session. Must reference a proxy
|
|
320
|
+
* belonging to the caller's org.
|
|
321
|
+
*/
|
|
322
|
+
proxy_id?: string;
|
|
323
|
+
/**
|
|
324
|
+
* If true, launches the browser in stealth mode to reduce detection by anti-bot
|
|
325
|
+
* mechanisms.
|
|
326
|
+
*/
|
|
327
|
+
stealth?: boolean;
|
|
328
|
+
/**
|
|
329
|
+
* Default idle timeout in seconds for browsers acquired from this pool before they
|
|
330
|
+
* are destroyed. Defaults to 600 seconds if not specified
|
|
331
|
+
*/
|
|
332
|
+
timeout_seconds?: number;
|
|
333
|
+
/**
|
|
334
|
+
* Initial browser window size in pixels with optional refresh rate. If omitted,
|
|
335
|
+
* image defaults apply (commonly 1024x768@60). Only specific viewport
|
|
336
|
+
* configurations are supported. The server will reject unsupported combinations.
|
|
337
|
+
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
|
|
338
|
+
* 1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
|
|
339
|
+
* be automatically determined from the width and height if they match a supported
|
|
340
|
+
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
|
|
341
|
+
* live view browser
|
|
342
|
+
*/
|
|
343
|
+
viewport?: Shared.BrowserViewport;
|
|
344
|
+
}
|
|
345
|
+
export interface BrowserPoolUpdateParams {
|
|
346
|
+
/**
|
|
347
|
+
* Number of browsers to create in the pool
|
|
348
|
+
*/
|
|
349
|
+
size: number;
|
|
350
|
+
/**
|
|
351
|
+
* Whether to discard all idle browsers and rebuild the pool immediately. Defaults
|
|
352
|
+
* to true.
|
|
353
|
+
*/
|
|
354
|
+
discard_all_idle?: boolean;
|
|
355
|
+
/**
|
|
356
|
+
* List of browser extensions to load into the session. Provide each by id or name.
|
|
357
|
+
*/
|
|
358
|
+
extensions?: Array<Shared.BrowserExtension>;
|
|
359
|
+
/**
|
|
360
|
+
* Percentage of the pool to fill per minute. Defaults to 10%.
|
|
361
|
+
*/
|
|
362
|
+
fill_rate_per_minute?: number;
|
|
363
|
+
/**
|
|
364
|
+
* If true, launches the browser using a headless image. Defaults to false.
|
|
365
|
+
*/
|
|
366
|
+
headless?: boolean;
|
|
367
|
+
/**
|
|
368
|
+
* If true, launches the browser in kiosk mode to hide address bar and tabs in live
|
|
369
|
+
* view.
|
|
370
|
+
*/
|
|
371
|
+
kiosk_mode?: boolean;
|
|
372
|
+
/**
|
|
373
|
+
* Optional name for the browser pool. Must be unique within the organization.
|
|
374
|
+
*/
|
|
375
|
+
name?: string;
|
|
376
|
+
/**
|
|
377
|
+
* Profile selection for the browser session. Provide either id or name. If
|
|
378
|
+
* specified, the matching profile will be loaded into the browser session.
|
|
379
|
+
* Profiles must be created beforehand.
|
|
380
|
+
*/
|
|
381
|
+
profile?: Shared.BrowserProfile;
|
|
382
|
+
/**
|
|
383
|
+
* Optional proxy to associate to the browser session. Must reference a proxy
|
|
384
|
+
* belonging to the caller's org.
|
|
385
|
+
*/
|
|
386
|
+
proxy_id?: string;
|
|
387
|
+
/**
|
|
388
|
+
* If true, launches the browser in stealth mode to reduce detection by anti-bot
|
|
389
|
+
* mechanisms.
|
|
390
|
+
*/
|
|
391
|
+
stealth?: boolean;
|
|
392
|
+
/**
|
|
393
|
+
* Default idle timeout in seconds for browsers acquired from this pool before they
|
|
394
|
+
* are destroyed. Defaults to 600 seconds if not specified
|
|
395
|
+
*/
|
|
396
|
+
timeout_seconds?: number;
|
|
397
|
+
/**
|
|
398
|
+
* Initial browser window size in pixels with optional refresh rate. If omitted,
|
|
399
|
+
* image defaults apply (commonly 1024x768@60). Only specific viewport
|
|
400
|
+
* configurations are supported. The server will reject unsupported combinations.
|
|
401
|
+
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
|
|
402
|
+
* 1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
|
|
403
|
+
* be automatically determined from the width and height if they match a supported
|
|
404
|
+
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
|
|
405
|
+
* live view browser
|
|
406
|
+
*/
|
|
407
|
+
viewport?: Shared.BrowserViewport;
|
|
408
|
+
}
|
|
409
|
+
export interface BrowserPoolDeleteParams {
|
|
410
|
+
/**
|
|
411
|
+
* If true, force delete even if browsers are currently leased. Leased browsers
|
|
412
|
+
* will be terminated.
|
|
413
|
+
*/
|
|
414
|
+
force?: boolean;
|
|
415
|
+
}
|
|
416
|
+
export interface BrowserPoolAcquireParams {
|
|
417
|
+
/**
|
|
418
|
+
* Maximum number of seconds to wait for a browser to be available. Defaults to the
|
|
419
|
+
* calculated time it would take to fill the pool at the currently configured fill
|
|
420
|
+
* rate.
|
|
421
|
+
*/
|
|
422
|
+
acquire_timeout_seconds?: number;
|
|
423
|
+
}
|
|
424
|
+
export interface BrowserPoolReleaseParams {
|
|
425
|
+
/**
|
|
426
|
+
* Browser session ID to release back to the pool
|
|
427
|
+
*/
|
|
428
|
+
session_id: string;
|
|
429
|
+
/**
|
|
430
|
+
* Whether to reuse the browser instance or destroy it and create a new one.
|
|
431
|
+
* Defaults to true.
|
|
432
|
+
*/
|
|
433
|
+
reuse?: boolean;
|
|
434
|
+
}
|
|
435
|
+
export declare namespace BrowserPools {
|
|
436
|
+
export { type BrowserPool as BrowserPool, type BrowserPoolAcquireRequest as BrowserPoolAcquireRequest, type BrowserPoolReleaseRequest as BrowserPoolReleaseRequest, type BrowserPoolRequest as BrowserPoolRequest, type BrowserPoolUpdateRequest as BrowserPoolUpdateRequest, type BrowserPoolListResponse as BrowserPoolListResponse, type BrowserPoolAcquireResponse as BrowserPoolAcquireResponse, type BrowserPoolCreateParams as BrowserPoolCreateParams, type BrowserPoolUpdateParams as BrowserPoolUpdateParams, type BrowserPoolDeleteParams as BrowserPoolDeleteParams, type BrowserPoolAcquireParams as BrowserPoolAcquireParams, type BrowserPoolReleaseParams as BrowserPoolReleaseParams, };
|
|
437
|
+
}
|
|
438
|
+
//# sourceMappingURL=browser-pools.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-pools.d.mts","sourceRoot":"","sources":["../src/resources/browser-pools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;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