airbrowser-client 1.1.8

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.
Files changed (94) hide show
  1. package/.openapi-generator/FILES +74 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +165 -0
  5. package/api.ts +4299 -0
  6. package/base.ts +62 -0
  7. package/common.ts +113 -0
  8. package/configuration.ts +121 -0
  9. package/dist/api.d.ts +2543 -0
  10. package/dist/api.js +3260 -0
  11. package/dist/base.d.ts +42 -0
  12. package/dist/base.js +46 -0
  13. package/dist/common.d.ts +28 -0
  14. package/dist/common.js +124 -0
  15. package/dist/configuration.d.ts +98 -0
  16. package/dist/configuration.js +44 -0
  17. package/dist/esm/api.d.ts +2543 -0
  18. package/dist/esm/api.js +3241 -0
  19. package/dist/esm/base.d.ts +42 -0
  20. package/dist/esm/base.js +41 -0
  21. package/dist/esm/common.d.ts +28 -0
  22. package/dist/esm/common.js +112 -0
  23. package/dist/esm/configuration.d.ts +98 -0
  24. package/dist/esm/configuration.js +40 -0
  25. package/dist/esm/index.d.ts +13 -0
  26. package/dist/esm/index.js +15 -0
  27. package/dist/index.d.ts +13 -0
  28. package/dist/index.js +31 -0
  29. package/docs/ActionResult.md +26 -0
  30. package/docs/AttributeResponse.md +26 -0
  31. package/docs/BaseResponse.md +24 -0
  32. package/docs/BrowserApi.md +1922 -0
  33. package/docs/BrowserConfig.md +36 -0
  34. package/docs/BrowserCreated.md +26 -0
  35. package/docs/BrowserCreationData.md +22 -0
  36. package/docs/BrowserInfoResponse.md +26 -0
  37. package/docs/BrowserList.md +26 -0
  38. package/docs/BrowserListData.md +22 -0
  39. package/docs/CheckElementRequest.md +24 -0
  40. package/docs/ClickRequest.md +26 -0
  41. package/docs/CombinedDialogRequest.md +22 -0
  42. package/docs/CombinedEmulateRequest.md +32 -0
  43. package/docs/CombinedGuiClickRequest.md +30 -0
  44. package/docs/CombinedScrollRequest.md +32 -0
  45. package/docs/ConsoleLogsRequest.md +22 -0
  46. package/docs/ContentData.md +24 -0
  47. package/docs/ContentResponse.md +26 -0
  48. package/docs/CreateProfileRequest.md +20 -0
  49. package/docs/DetectCoordinatesRequest.md +20 -0
  50. package/docs/DetectCoordinatesResult.md +44 -0
  51. package/docs/ElementDataRequest.md +26 -0
  52. package/docs/ErrorResponse.md +24 -0
  53. package/docs/ExecuteData.md +20 -0
  54. package/docs/ExecuteRequest.md +22 -0
  55. package/docs/ExecuteResponse.md +26 -0
  56. package/docs/FillFormRequest.md +22 -0
  57. package/docs/FormField.md +22 -0
  58. package/docs/HealthApi.md +95 -0
  59. package/docs/HealthStatus.md +24 -0
  60. package/docs/HistoryRequest.md +20 -0
  61. package/docs/LogsResponse.md +26 -0
  62. package/docs/MouseRequest.md +28 -0
  63. package/docs/NavigateRequest.md +22 -0
  64. package/docs/NetworkLogsRequest.md +22 -0
  65. package/docs/PerformanceRequest.md +22 -0
  66. package/docs/PoolApi.md +104 -0
  67. package/docs/PoolScaled.md +26 -0
  68. package/docs/PoolStatusResponse.md +26 -0
  69. package/docs/PressKeysRequest.md +24 -0
  70. package/docs/ProfileInfo.md +28 -0
  71. package/docs/ProfileListData.md +20 -0
  72. package/docs/ProfileListResponse.md +26 -0
  73. package/docs/ProfileResponse.md +26 -0
  74. package/docs/ProfilesApi.md +209 -0
  75. package/docs/ResizeRequest.md +22 -0
  76. package/docs/ScaleData.md +20 -0
  77. package/docs/ScalePool.md +20 -0
  78. package/docs/ScreenshotData.md +22 -0
  79. package/docs/ScreenshotResponse.md +26 -0
  80. package/docs/SelectRequest.md +30 -0
  81. package/docs/SnapshotRequest.md +20 -0
  82. package/docs/SuccessResponse.md +26 -0
  83. package/docs/TabsRequest.md +26 -0
  84. package/docs/TypeRequest.md +26 -0
  85. package/docs/UploadFileRequest.md +24 -0
  86. package/docs/UrlData.md +20 -0
  87. package/docs/UrlResponse.md +26 -0
  88. package/docs/WaitElementRequest.md +26 -0
  89. package/docs/WhatIsVisibleResult.md +34 -0
  90. package/git_push.sh +57 -0
  91. package/index.ts +18 -0
  92. package/package.json +33 -0
  93. package/tsconfig.esm.json +7 -0
  94. package/tsconfig.json +18 -0
@@ -0,0 +1,3241 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Airbrowser API
5
+ * Undetectable Chrome-in-Docker for developers and agents (REST + MCP)
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from './base';
29
+ export const CheckElementRequestCheckEnum = {
30
+ Exists: 'exists',
31
+ Visible: 'visible'
32
+ };
33
+ export const CombinedDialogRequestActionEnum = {
34
+ Get: 'get',
35
+ Accept: 'accept',
36
+ Dismiss: 'dismiss'
37
+ };
38
+ export const CombinedEmulateRequestActionEnum = {
39
+ Set: 'set',
40
+ Clear: 'clear',
41
+ ListDevices: 'list_devices'
42
+ };
43
+ export const ConsoleLogsRequestActionEnum = {
44
+ Get: 'get',
45
+ Clear: 'clear'
46
+ };
47
+ export const ElementDataRequestTypeEnum = {
48
+ Text: 'text',
49
+ Attribute: 'attribute',
50
+ Property: 'property'
51
+ };
52
+ export const HistoryRequestActionEnum = {
53
+ Back: 'back',
54
+ Forward: 'forward',
55
+ Refresh: 'refresh'
56
+ };
57
+ export const NetworkLogsRequestActionEnum = {
58
+ Get: 'get',
59
+ Clear: 'clear'
60
+ };
61
+ export const PerformanceRequestActionEnum = {
62
+ StartTrace: 'start_trace',
63
+ StopTrace: 'stop_trace',
64
+ Metrics: 'metrics',
65
+ Analyze: 'analyze'
66
+ };
67
+ export const SelectRequestActionEnum = {
68
+ Select: 'select',
69
+ Options: 'options'
70
+ };
71
+ export const TabsRequestActionEnum = {
72
+ List: 'list',
73
+ New: 'new',
74
+ Switch: 'switch',
75
+ Close: 'close',
76
+ Current: 'current'
77
+ };
78
+ export const WaitElementRequestUntilEnum = {
79
+ Visible: 'visible',
80
+ Hidden: 'hidden'
81
+ };
82
+ /**
83
+ * BrowserApi - axios parameter creator
84
+ */
85
+ export const BrowserApiAxiosParamCreator = function (configuration) {
86
+ return {
87
+ /**
88
+ *
89
+ * @summary Check if element exists or is visible
90
+ * @param {string} browserId Unique browser identifier
91
+ * @param {CheckElementRequest} payload
92
+ * @param {*} [options] Override http request option.
93
+ * @throws {RequiredError}
94
+ */
95
+ checkElement: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
96
+ // verify required parameter 'browserId' is not null or undefined
97
+ assertParamExists('checkElement', 'browserId', browserId);
98
+ // verify required parameter 'payload' is not null or undefined
99
+ assertParamExists('checkElement', 'payload', payload);
100
+ const localVarPath = `/browser/{browser_id}/check_element`
101
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
102
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
103
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
104
+ let baseOptions;
105
+ if (configuration) {
106
+ baseOptions = configuration.baseOptions;
107
+ }
108
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
109
+ const localVarHeaderParameter = {};
110
+ const localVarQueryParameter = {};
111
+ localVarHeaderParameter['Content-Type'] = 'application/json';
112
+ localVarHeaderParameter['Accept'] = 'application/json';
113
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
114
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
115
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
116
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
117
+ return {
118
+ url: toPathString(localVarUrlObj),
119
+ options: localVarRequestOptions,
120
+ };
121
+ }),
122
+ /**
123
+ * Use if_visible=true to only click if visible.
124
+ * @summary Click element
125
+ * @param {string} browserId Unique browser identifier
126
+ * @param {ClickRequest} payload
127
+ * @param {*} [options] Override http request option.
128
+ * @throws {RequiredError}
129
+ */
130
+ click: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
131
+ // verify required parameter 'browserId' is not null or undefined
132
+ assertParamExists('click', 'browserId', browserId);
133
+ // verify required parameter 'payload' is not null or undefined
134
+ assertParamExists('click', 'payload', payload);
135
+ const localVarPath = `/browser/{browser_id}/click`
136
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
137
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
138
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
139
+ let baseOptions;
140
+ if (configuration) {
141
+ baseOptions = configuration.baseOptions;
142
+ }
143
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
144
+ const localVarHeaderParameter = {};
145
+ const localVarQueryParameter = {};
146
+ localVarHeaderParameter['Content-Type'] = 'application/json';
147
+ localVarHeaderParameter['Accept'] = 'application/json';
148
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
149
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
150
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
151
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
152
+ return {
153
+ url: toPathString(localVarUrlObj),
154
+ options: localVarRequestOptions,
155
+ };
156
+ }),
157
+ /**
158
+ *
159
+ * @summary Close all active browser instances
160
+ * @param {*} [options] Override http request option.
161
+ * @throws {RequiredError}
162
+ */
163
+ closeAllBrowsers: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
164
+ const localVarPath = `/browser/close_all`;
165
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
166
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
167
+ let baseOptions;
168
+ if (configuration) {
169
+ baseOptions = configuration.baseOptions;
170
+ }
171
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
172
+ const localVarHeaderParameter = {};
173
+ const localVarQueryParameter = {};
174
+ localVarHeaderParameter['Accept'] = 'application/json';
175
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
176
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
177
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
178
+ return {
179
+ url: toPathString(localVarUrlObj),
180
+ options: localVarRequestOptions,
181
+ };
182
+ }),
183
+ /**
184
+ *
185
+ * @summary Close a browser instance
186
+ * @param {string} browserId Unique browser identifier
187
+ * @param {*} [options] Override http request option.
188
+ * @throws {RequiredError}
189
+ */
190
+ closeBrowser: (browserId_1, ...args_1) => __awaiter(this, [browserId_1, ...args_1], void 0, function* (browserId, options = {}) {
191
+ // verify required parameter 'browserId' is not null or undefined
192
+ assertParamExists('closeBrowser', 'browserId', browserId);
193
+ const localVarPath = `/browser/{browser_id}/close`
194
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
195
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
196
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
197
+ let baseOptions;
198
+ if (configuration) {
199
+ baseOptions = configuration.baseOptions;
200
+ }
201
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
202
+ const localVarHeaderParameter = {};
203
+ const localVarQueryParameter = {};
204
+ localVarHeaderParameter['Accept'] = 'application/json';
205
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
206
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
207
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
208
+ return {
209
+ url: toPathString(localVarUrlObj),
210
+ options: localVarRequestOptions,
211
+ };
212
+ }),
213
+ /**
214
+ *
215
+ * @summary Get or clear console logs
216
+ * @param {string} browserId Unique browser identifier
217
+ * @param {ConsoleLogsRequest} payload
218
+ * @param {*} [options] Override http request option.
219
+ * @throws {RequiredError}
220
+ */
221
+ consoleLogs: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
222
+ // verify required parameter 'browserId' is not null or undefined
223
+ assertParamExists('consoleLogs', 'browserId', browserId);
224
+ // verify required parameter 'payload' is not null or undefined
225
+ assertParamExists('consoleLogs', 'payload', payload);
226
+ const localVarPath = `/browser/{browser_id}/console`
227
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
228
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
229
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
230
+ let baseOptions;
231
+ if (configuration) {
232
+ baseOptions = configuration.baseOptions;
233
+ }
234
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
235
+ const localVarHeaderParameter = {};
236
+ const localVarQueryParameter = {};
237
+ localVarHeaderParameter['Content-Type'] = 'application/json';
238
+ localVarHeaderParameter['Accept'] = 'application/json';
239
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
240
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
241
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
242
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
243
+ return {
244
+ url: toPathString(localVarUrlObj),
245
+ options: localVarRequestOptions,
246
+ };
247
+ }),
248
+ /**
249
+ *
250
+ * @summary Create a new browser instance
251
+ * @param {BrowserConfig} payload
252
+ * @param {*} [options] Override http request option.
253
+ * @throws {RequiredError}
254
+ */
255
+ createBrowser: (payload_1, ...args_1) => __awaiter(this, [payload_1, ...args_1], void 0, function* (payload, options = {}) {
256
+ // verify required parameter 'payload' is not null or undefined
257
+ assertParamExists('createBrowser', 'payload', payload);
258
+ const localVarPath = `/browser/create`;
259
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
260
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
261
+ let baseOptions;
262
+ if (configuration) {
263
+ baseOptions = configuration.baseOptions;
264
+ }
265
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
266
+ const localVarHeaderParameter = {};
267
+ const localVarQueryParameter = {};
268
+ localVarHeaderParameter['Content-Type'] = 'application/json';
269
+ localVarHeaderParameter['Accept'] = 'application/json';
270
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
271
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
272
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
273
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
274
+ return {
275
+ url: toPathString(localVarUrlObj),
276
+ options: localVarRequestOptions,
277
+ };
278
+ }),
279
+ /**
280
+ *
281
+ * @summary Close and remove a browser instance
282
+ * @param {string} browserId Unique browser identifier
283
+ * @param {*} [options] Override http request option.
284
+ * @throws {RequiredError}
285
+ */
286
+ deleteBrowser: (browserId_1, ...args_1) => __awaiter(this, [browserId_1, ...args_1], void 0, function* (browserId, options = {}) {
287
+ // verify required parameter 'browserId' is not null or undefined
288
+ assertParamExists('deleteBrowser', 'browserId', browserId);
289
+ const localVarPath = `/browser/{browser_id}`
290
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
291
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
292
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
293
+ let baseOptions;
294
+ if (configuration) {
295
+ baseOptions = configuration.baseOptions;
296
+ }
297
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
298
+ const localVarHeaderParameter = {};
299
+ const localVarQueryParameter = {};
300
+ localVarHeaderParameter['Accept'] = 'application/json';
301
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
302
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
303
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
304
+ return {
305
+ url: toPathString(localVarUrlObj),
306
+ options: localVarRequestOptions,
307
+ };
308
+ }),
309
+ /**
310
+ *
311
+ * @summary Detect element coordinates using AI vision
312
+ * @param {string} browserId Unique browser identifier
313
+ * @param {DetectCoordinatesRequest} payload
314
+ * @param {*} [options] Override http request option.
315
+ * @throws {RequiredError}
316
+ */
317
+ detectCoordinates: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
318
+ // verify required parameter 'browserId' is not null or undefined
319
+ assertParamExists('detectCoordinates', 'browserId', browserId);
320
+ // verify required parameter 'payload' is not null or undefined
321
+ assertParamExists('detectCoordinates', 'payload', payload);
322
+ const localVarPath = `/browser/{browser_id}/detect_coordinates`
323
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
324
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
325
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
326
+ let baseOptions;
327
+ if (configuration) {
328
+ baseOptions = configuration.baseOptions;
329
+ }
330
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
331
+ const localVarHeaderParameter = {};
332
+ const localVarQueryParameter = {};
333
+ localVarHeaderParameter['Content-Type'] = 'application/json';
334
+ localVarHeaderParameter['Accept'] = 'application/json';
335
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
336
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
337
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
338
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
339
+ return {
340
+ url: toPathString(localVarUrlObj),
341
+ options: localVarRequestOptions,
342
+ };
343
+ }),
344
+ /**
345
+ *
346
+ * @summary Manage browser dialogs: get, accept, or dismiss
347
+ * @param {string} browserId Unique browser identifier
348
+ * @param {CombinedDialogRequest} payload
349
+ * @param {*} [options] Override http request option.
350
+ * @throws {RequiredError}
351
+ */
352
+ dialog: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
353
+ // verify required parameter 'browserId' is not null or undefined
354
+ assertParamExists('dialog', 'browserId', browserId);
355
+ // verify required parameter 'payload' is not null or undefined
356
+ assertParamExists('dialog', 'payload', payload);
357
+ const localVarPath = `/browser/{browser_id}/dialog`
358
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
359
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
360
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
361
+ let baseOptions;
362
+ if (configuration) {
363
+ baseOptions = configuration.baseOptions;
364
+ }
365
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
366
+ const localVarHeaderParameter = {};
367
+ const localVarQueryParameter = {};
368
+ localVarHeaderParameter['Content-Type'] = 'application/json';
369
+ localVarHeaderParameter['Accept'] = 'application/json';
370
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
371
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
372
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
373
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
374
+ return {
375
+ url: toPathString(localVarUrlObj),
376
+ options: localVarRequestOptions,
377
+ };
378
+ }),
379
+ /**
380
+ *
381
+ * @summary Manage device emulation: set, clear, or list_devices
382
+ * @param {string} browserId Unique browser identifier
383
+ * @param {CombinedEmulateRequest} payload
384
+ * @param {*} [options] Override http request option.
385
+ * @throws {RequiredError}
386
+ */
387
+ emulate: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
388
+ // verify required parameter 'browserId' is not null or undefined
389
+ assertParamExists('emulate', 'browserId', browserId);
390
+ // verify required parameter 'payload' is not null or undefined
391
+ assertParamExists('emulate', 'payload', payload);
392
+ const localVarPath = `/browser/{browser_id}/emulate`
393
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
394
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
395
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
396
+ let baseOptions;
397
+ if (configuration) {
398
+ baseOptions = configuration.baseOptions;
399
+ }
400
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
401
+ const localVarHeaderParameter = {};
402
+ const localVarQueryParameter = {};
403
+ localVarHeaderParameter['Content-Type'] = 'application/json';
404
+ localVarHeaderParameter['Accept'] = 'application/json';
405
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
406
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
407
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
408
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
409
+ return {
410
+ url: toPathString(localVarUrlObj),
411
+ options: localVarRequestOptions,
412
+ };
413
+ }),
414
+ /**
415
+ *
416
+ * @summary Execute JavaScript
417
+ * @param {string} browserId Unique browser identifier
418
+ * @param {ExecuteRequest} payload
419
+ * @param {*} [options] Override http request option.
420
+ * @throws {RequiredError}
421
+ */
422
+ executeScript: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
423
+ // verify required parameter 'browserId' is not null or undefined
424
+ assertParamExists('executeScript', 'browserId', browserId);
425
+ // verify required parameter 'payload' is not null or undefined
426
+ assertParamExists('executeScript', 'payload', payload);
427
+ const localVarPath = `/browser/{browser_id}/execute`
428
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
429
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
430
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
431
+ let baseOptions;
432
+ if (configuration) {
433
+ baseOptions = configuration.baseOptions;
434
+ }
435
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
436
+ const localVarHeaderParameter = {};
437
+ const localVarQueryParameter = {};
438
+ localVarHeaderParameter['Content-Type'] = 'application/json';
439
+ localVarHeaderParameter['Accept'] = 'application/json';
440
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
441
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
442
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
443
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
444
+ return {
445
+ url: toPathString(localVarUrlObj),
446
+ options: localVarRequestOptions,
447
+ };
448
+ }),
449
+ /**
450
+ *
451
+ * @summary Fill multiple form fields
452
+ * @param {string} browserId Unique browser identifier
453
+ * @param {FillFormRequest} payload
454
+ * @param {*} [options] Override http request option.
455
+ * @throws {RequiredError}
456
+ */
457
+ fillForm: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
458
+ // verify required parameter 'browserId' is not null or undefined
459
+ assertParamExists('fillForm', 'browserId', browserId);
460
+ // verify required parameter 'payload' is not null or undefined
461
+ assertParamExists('fillForm', 'payload', payload);
462
+ const localVarPath = `/browser/{browser_id}/fill_form`
463
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
464
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
465
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
466
+ let baseOptions;
467
+ if (configuration) {
468
+ baseOptions = configuration.baseOptions;
469
+ }
470
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
471
+ const localVarHeaderParameter = {};
472
+ const localVarQueryParameter = {};
473
+ localVarHeaderParameter['Content-Type'] = 'application/json';
474
+ localVarHeaderParameter['Accept'] = 'application/json';
475
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
476
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
477
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
478
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
479
+ return {
480
+ url: toPathString(localVarUrlObj),
481
+ options: localVarRequestOptions,
482
+ };
483
+ }),
484
+ /**
485
+ *
486
+ * @summary Get browser instance details
487
+ * @param {string} browserId Unique browser identifier
488
+ * @param {*} [options] Override http request option.
489
+ * @throws {RequiredError}
490
+ */
491
+ getBrowser: (browserId_1, ...args_1) => __awaiter(this, [browserId_1, ...args_1], void 0, function* (browserId, options = {}) {
492
+ // verify required parameter 'browserId' is not null or undefined
493
+ assertParamExists('getBrowser', 'browserId', browserId);
494
+ const localVarPath = `/browser/{browser_id}`
495
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
496
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
497
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
498
+ let baseOptions;
499
+ if (configuration) {
500
+ baseOptions = configuration.baseOptions;
501
+ }
502
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
503
+ const localVarHeaderParameter = {};
504
+ const localVarQueryParameter = {};
505
+ localVarHeaderParameter['Accept'] = 'application/json';
506
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
507
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
508
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
509
+ return {
510
+ url: toPathString(localVarUrlObj),
511
+ options: localVarRequestOptions,
512
+ };
513
+ }),
514
+ /**
515
+ *
516
+ * @summary Get browser status
517
+ * @param {string} browserId Unique browser identifier
518
+ * @param {*} [options] Override http request option.
519
+ * @throws {RequiredError}
520
+ */
521
+ getBrowserStatus: (browserId_1, ...args_1) => __awaiter(this, [browserId_1, ...args_1], void 0, function* (browserId, options = {}) {
522
+ // verify required parameter 'browserId' is not null or undefined
523
+ assertParamExists('getBrowserStatus', 'browserId', browserId);
524
+ const localVarPath = `/browser/{browser_id}/status`
525
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
526
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
527
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
528
+ let baseOptions;
529
+ if (configuration) {
530
+ baseOptions = configuration.baseOptions;
531
+ }
532
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
533
+ const localVarHeaderParameter = {};
534
+ const localVarQueryParameter = {};
535
+ localVarHeaderParameter['Accept'] = 'application/json';
536
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
537
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
538
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
539
+ return {
540
+ url: toPathString(localVarUrlObj),
541
+ options: localVarRequestOptions,
542
+ };
543
+ }),
544
+ /**
545
+ *
546
+ * @summary Get page HTML content
547
+ * @param {string} browserId Unique browser identifier
548
+ * @param {*} [options] Override http request option.
549
+ * @throws {RequiredError}
550
+ */
551
+ getContent: (browserId_1, ...args_1) => __awaiter(this, [browserId_1, ...args_1], void 0, function* (browserId, options = {}) {
552
+ // verify required parameter 'browserId' is not null or undefined
553
+ assertParamExists('getContent', 'browserId', browserId);
554
+ const localVarPath = `/browser/{browser_id}/content`
555
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
556
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
557
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
558
+ let baseOptions;
559
+ if (configuration) {
560
+ baseOptions = configuration.baseOptions;
561
+ }
562
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
563
+ const localVarHeaderParameter = {};
564
+ const localVarQueryParameter = {};
565
+ localVarHeaderParameter['Accept'] = 'application/json';
566
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
567
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
568
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
569
+ return {
570
+ url: toPathString(localVarUrlObj),
571
+ options: localVarRequestOptions,
572
+ };
573
+ }),
574
+ /**
575
+ *
576
+ * @summary Get element text, attribute, or property
577
+ * @param {string} browserId Unique browser identifier
578
+ * @param {ElementDataRequest} payload
579
+ * @param {*} [options] Override http request option.
580
+ * @throws {RequiredError}
581
+ */
582
+ getElementData: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
583
+ // verify required parameter 'browserId' is not null or undefined
584
+ assertParamExists('getElementData', 'browserId', browserId);
585
+ // verify required parameter 'payload' is not null or undefined
586
+ assertParamExists('getElementData', 'payload', payload);
587
+ const localVarPath = `/browser/{browser_id}/element_data`
588
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
589
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
590
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
591
+ let baseOptions;
592
+ if (configuration) {
593
+ baseOptions = configuration.baseOptions;
594
+ }
595
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
596
+ const localVarHeaderParameter = {};
597
+ const localVarQueryParameter = {};
598
+ localVarHeaderParameter['Content-Type'] = 'application/json';
599
+ localVarHeaderParameter['Accept'] = 'application/json';
600
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
601
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
602
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
603
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
604
+ return {
605
+ url: toPathString(localVarUrlObj),
606
+ options: localVarRequestOptions,
607
+ };
608
+ }),
609
+ /**
610
+ *
611
+ * @summary Get browser pool status
612
+ * @param {*} [options] Override http request option.
613
+ * @throws {RequiredError}
614
+ */
615
+ getPoolStatus: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
616
+ const localVarPath = `/browser/pool/status`;
617
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
618
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
619
+ let baseOptions;
620
+ if (configuration) {
621
+ baseOptions = configuration.baseOptions;
622
+ }
623
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
624
+ const localVarHeaderParameter = {};
625
+ const localVarQueryParameter = {};
626
+ localVarHeaderParameter['Accept'] = 'application/json';
627
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
628
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
629
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
630
+ return {
631
+ url: toPathString(localVarUrlObj),
632
+ options: localVarRequestOptions,
633
+ };
634
+ }),
635
+ /**
636
+ *
637
+ * @summary Get current page URL
638
+ * @param {string} browserId Unique browser identifier
639
+ * @param {*} [options] Override http request option.
640
+ * @throws {RequiredError}
641
+ */
642
+ getUrl: (browserId_1, ...args_1) => __awaiter(this, [browserId_1, ...args_1], void 0, function* (browserId, options = {}) {
643
+ // verify required parameter 'browserId' is not null or undefined
644
+ assertParamExists('getUrl', 'browserId', browserId);
645
+ const localVarPath = `/browser/{browser_id}/url`
646
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
647
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
648
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
649
+ let baseOptions;
650
+ if (configuration) {
651
+ baseOptions = configuration.baseOptions;
652
+ }
653
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
654
+ const localVarHeaderParameter = {};
655
+ const localVarQueryParameter = {};
656
+ localVarHeaderParameter['Accept'] = 'application/json';
657
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
658
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
659
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
660
+ return {
661
+ url: toPathString(localVarUrlObj),
662
+ options: localVarRequestOptions,
663
+ };
664
+ }),
665
+ /**
666
+ *
667
+ * @summary Click using selector or screen coordinates
668
+ * @param {string} browserId Unique browser identifier
669
+ * @param {CombinedGuiClickRequest} payload
670
+ * @param {*} [options] Override http request option.
671
+ * @throws {RequiredError}
672
+ */
673
+ guiClick: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
674
+ // verify required parameter 'browserId' is not null or undefined
675
+ assertParamExists('guiClick', 'browserId', browserId);
676
+ // verify required parameter 'payload' is not null or undefined
677
+ assertParamExists('guiClick', 'payload', payload);
678
+ const localVarPath = `/browser/{browser_id}/gui_click`
679
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
680
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
681
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
682
+ let baseOptions;
683
+ if (configuration) {
684
+ baseOptions = configuration.baseOptions;
685
+ }
686
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
687
+ const localVarHeaderParameter = {};
688
+ const localVarQueryParameter = {};
689
+ localVarHeaderParameter['Content-Type'] = 'application/json';
690
+ localVarHeaderParameter['Accept'] = 'application/json';
691
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
692
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
693
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
694
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
695
+ return {
696
+ url: toPathString(localVarUrlObj),
697
+ options: localVarRequestOptions,
698
+ };
699
+ }),
700
+ /**
701
+ *
702
+ * @summary Execute history action: back, forward, or refresh
703
+ * @param {string} browserId Unique browser identifier
704
+ * @param {HistoryRequest} payload
705
+ * @param {*} [options] Override http request option.
706
+ * @throws {RequiredError}
707
+ */
708
+ history: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
709
+ // verify required parameter 'browserId' is not null or undefined
710
+ assertParamExists('history', 'browserId', browserId);
711
+ // verify required parameter 'payload' is not null or undefined
712
+ assertParamExists('history', 'payload', payload);
713
+ const localVarPath = `/browser/{browser_id}/history`
714
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
715
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
716
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
717
+ let baseOptions;
718
+ if (configuration) {
719
+ baseOptions = configuration.baseOptions;
720
+ }
721
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
722
+ const localVarHeaderParameter = {};
723
+ const localVarQueryParameter = {};
724
+ localVarHeaderParameter['Content-Type'] = 'application/json';
725
+ localVarHeaderParameter['Accept'] = 'application/json';
726
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
727
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
728
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
729
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
730
+ return {
731
+ url: toPathString(localVarUrlObj),
732
+ options: localVarRequestOptions,
733
+ };
734
+ }),
735
+ /**
736
+ *
737
+ * @summary List all active browser instances
738
+ * @param {*} [options] Override http request option.
739
+ * @throws {RequiredError}
740
+ */
741
+ listBrowsers: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
742
+ const localVarPath = `/browser/list`;
743
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
744
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
745
+ let baseOptions;
746
+ if (configuration) {
747
+ baseOptions = configuration.baseOptions;
748
+ }
749
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
750
+ const localVarHeaderParameter = {};
751
+ const localVarQueryParameter = {};
752
+ localVarHeaderParameter['Accept'] = 'application/json';
753
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
754
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
755
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
756
+ return {
757
+ url: toPathString(localVarUrlObj),
758
+ options: localVarRequestOptions,
759
+ };
760
+ }),
761
+ /**
762
+ *
763
+ * @summary Mouse action: hover or drag
764
+ * @param {string} browserId Unique browser identifier
765
+ * @param {MouseRequest} payload
766
+ * @param {*} [options] Override http request option.
767
+ * @throws {RequiredError}
768
+ */
769
+ mouse: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
770
+ // verify required parameter 'browserId' is not null or undefined
771
+ assertParamExists('mouse', 'browserId', browserId);
772
+ // verify required parameter 'payload' is not null or undefined
773
+ assertParamExists('mouse', 'payload', payload);
774
+ const localVarPath = `/browser/{browser_id}/mouse`
775
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
776
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
777
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
778
+ let baseOptions;
779
+ if (configuration) {
780
+ baseOptions = configuration.baseOptions;
781
+ }
782
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
783
+ const localVarHeaderParameter = {};
784
+ const localVarQueryParameter = {};
785
+ localVarHeaderParameter['Content-Type'] = 'application/json';
786
+ localVarHeaderParameter['Accept'] = 'application/json';
787
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
788
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
789
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
790
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
791
+ return {
792
+ url: toPathString(localVarUrlObj),
793
+ options: localVarRequestOptions,
794
+ };
795
+ }),
796
+ /**
797
+ *
798
+ * @summary Navigate to a URL
799
+ * @param {string} browserId Unique browser identifier
800
+ * @param {NavigateRequest} payload
801
+ * @param {*} [options] Override http request option.
802
+ * @throws {RequiredError}
803
+ */
804
+ navigateBrowser: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
805
+ // verify required parameter 'browserId' is not null or undefined
806
+ assertParamExists('navigateBrowser', 'browserId', browserId);
807
+ // verify required parameter 'payload' is not null or undefined
808
+ assertParamExists('navigateBrowser', 'payload', payload);
809
+ const localVarPath = `/browser/{browser_id}/navigate`
810
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
811
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
812
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
813
+ let baseOptions;
814
+ if (configuration) {
815
+ baseOptions = configuration.baseOptions;
816
+ }
817
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
818
+ const localVarHeaderParameter = {};
819
+ const localVarQueryParameter = {};
820
+ localVarHeaderParameter['Content-Type'] = 'application/json';
821
+ localVarHeaderParameter['Accept'] = 'application/json';
822
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
823
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
824
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
825
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
826
+ return {
827
+ url: toPathString(localVarUrlObj),
828
+ options: localVarRequestOptions,
829
+ };
830
+ }),
831
+ /**
832
+ *
833
+ * @summary Get or clear network logs
834
+ * @param {string} browserId Unique browser identifier
835
+ * @param {NetworkLogsRequest} payload
836
+ * @param {*} [options] Override http request option.
837
+ * @throws {RequiredError}
838
+ */
839
+ networkLogs: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
840
+ // verify required parameter 'browserId' is not null or undefined
841
+ assertParamExists('networkLogs', 'browserId', browserId);
842
+ // verify required parameter 'payload' is not null or undefined
843
+ assertParamExists('networkLogs', 'payload', payload);
844
+ const localVarPath = `/browser/{browser_id}/network`
845
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
846
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
847
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
848
+ let baseOptions;
849
+ if (configuration) {
850
+ baseOptions = configuration.baseOptions;
851
+ }
852
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
853
+ const localVarHeaderParameter = {};
854
+ const localVarQueryParameter = {};
855
+ localVarHeaderParameter['Content-Type'] = 'application/json';
856
+ localVarHeaderParameter['Accept'] = 'application/json';
857
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
858
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
859
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
860
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
861
+ return {
862
+ url: toPathString(localVarUrlObj),
863
+ options: localVarRequestOptions,
864
+ };
865
+ }),
866
+ /**
867
+ *
868
+ * @summary Manage performance: start_trace, stop_trace, metrics, or analyze
869
+ * @param {string} browserId Unique browser identifier
870
+ * @param {PerformanceRequest} payload
871
+ * @param {*} [options] Override http request option.
872
+ * @throws {RequiredError}
873
+ */
874
+ performance: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
875
+ // verify required parameter 'browserId' is not null or undefined
876
+ assertParamExists('performance', 'browserId', browserId);
877
+ // verify required parameter 'payload' is not null or undefined
878
+ assertParamExists('performance', 'payload', payload);
879
+ const localVarPath = `/browser/{browser_id}/performance`
880
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
881
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
882
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
883
+ let baseOptions;
884
+ if (configuration) {
885
+ baseOptions = configuration.baseOptions;
886
+ }
887
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
888
+ const localVarHeaderParameter = {};
889
+ const localVarQueryParameter = {};
890
+ localVarHeaderParameter['Content-Type'] = 'application/json';
891
+ localVarHeaderParameter['Accept'] = 'application/json';
892
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
893
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
894
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
895
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
896
+ return {
897
+ url: toPathString(localVarUrlObj),
898
+ options: localVarRequestOptions,
899
+ };
900
+ }),
901
+ /**
902
+ *
903
+ * @summary Press keys on an element
904
+ * @param {string} browserId Unique browser identifier
905
+ * @param {PressKeysRequest} payload
906
+ * @param {*} [options] Override http request option.
907
+ * @throws {RequiredError}
908
+ */
909
+ pressKeys: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
910
+ // verify required parameter 'browserId' is not null or undefined
911
+ assertParamExists('pressKeys', 'browserId', browserId);
912
+ // verify required parameter 'payload' is not null or undefined
913
+ assertParamExists('pressKeys', 'payload', payload);
914
+ const localVarPath = `/browser/{browser_id}/press_keys`
915
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
916
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
917
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
918
+ let baseOptions;
919
+ if (configuration) {
920
+ baseOptions = configuration.baseOptions;
921
+ }
922
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
923
+ const localVarHeaderParameter = {};
924
+ const localVarQueryParameter = {};
925
+ localVarHeaderParameter['Content-Type'] = 'application/json';
926
+ localVarHeaderParameter['Accept'] = 'application/json';
927
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
928
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
929
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
930
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
931
+ return {
932
+ url: toPathString(localVarUrlObj),
933
+ options: localVarRequestOptions,
934
+ };
935
+ }),
936
+ /**
937
+ *
938
+ * @summary Resize viewport
939
+ * @param {string} browserId Unique browser identifier
940
+ * @param {ResizeRequest} payload
941
+ * @param {*} [options] Override http request option.
942
+ * @throws {RequiredError}
943
+ */
944
+ resize: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
945
+ // verify required parameter 'browserId' is not null or undefined
946
+ assertParamExists('resize', 'browserId', browserId);
947
+ // verify required parameter 'payload' is not null or undefined
948
+ assertParamExists('resize', 'payload', payload);
949
+ const localVarPath = `/browser/{browser_id}/resize`
950
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
951
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
952
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
953
+ let baseOptions;
954
+ if (configuration) {
955
+ baseOptions = configuration.baseOptions;
956
+ }
957
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
958
+ const localVarHeaderParameter = {};
959
+ const localVarQueryParameter = {};
960
+ localVarHeaderParameter['Content-Type'] = 'application/json';
961
+ localVarHeaderParameter['Accept'] = 'application/json';
962
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
963
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
964
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
965
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
966
+ return {
967
+ url: toPathString(localVarUrlObj),
968
+ options: localVarRequestOptions,
969
+ };
970
+ }),
971
+ /**
972
+ *
973
+ * @summary Scroll to element/coordinates (absolute) or by delta (relative)
974
+ * @param {string} browserId Unique browser identifier
975
+ * @param {CombinedScrollRequest} payload
976
+ * @param {*} [options] Override http request option.
977
+ * @throws {RequiredError}
978
+ */
979
+ scroll: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
980
+ // verify required parameter 'browserId' is not null or undefined
981
+ assertParamExists('scroll', 'browserId', browserId);
982
+ // verify required parameter 'payload' is not null or undefined
983
+ assertParamExists('scroll', 'payload', payload);
984
+ const localVarPath = `/browser/{browser_id}/scroll`
985
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
986
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
987
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
988
+ let baseOptions;
989
+ if (configuration) {
990
+ baseOptions = configuration.baseOptions;
991
+ }
992
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
993
+ const localVarHeaderParameter = {};
994
+ const localVarQueryParameter = {};
995
+ localVarHeaderParameter['Content-Type'] = 'application/json';
996
+ localVarHeaderParameter['Accept'] = 'application/json';
997
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
998
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
999
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1000
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
1001
+ return {
1002
+ url: toPathString(localVarUrlObj),
1003
+ options: localVarRequestOptions,
1004
+ };
1005
+ }),
1006
+ /**
1007
+ *
1008
+ * @summary Select dropdown: select option or get options
1009
+ * @param {string} browserId Unique browser identifier
1010
+ * @param {SelectRequest} payload
1011
+ * @param {*} [options] Override http request option.
1012
+ * @throws {RequiredError}
1013
+ */
1014
+ select: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
1015
+ // verify required parameter 'browserId' is not null or undefined
1016
+ assertParamExists('select', 'browserId', browserId);
1017
+ // verify required parameter 'payload' is not null or undefined
1018
+ assertParamExists('select', 'payload', payload);
1019
+ const localVarPath = `/browser/{browser_id}/select`
1020
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
1021
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1022
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1023
+ let baseOptions;
1024
+ if (configuration) {
1025
+ baseOptions = configuration.baseOptions;
1026
+ }
1027
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1028
+ const localVarHeaderParameter = {};
1029
+ const localVarQueryParameter = {};
1030
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1031
+ localVarHeaderParameter['Accept'] = 'application/json';
1032
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1033
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1034
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1035
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
1036
+ return {
1037
+ url: toPathString(localVarUrlObj),
1038
+ options: localVarRequestOptions,
1039
+ };
1040
+ }),
1041
+ /**
1042
+ *
1043
+ * @summary Manage browser tabs: list, new, switch, close, or current
1044
+ * @param {string} browserId Unique browser identifier
1045
+ * @param {TabsRequest} payload
1046
+ * @param {*} [options] Override http request option.
1047
+ * @throws {RequiredError}
1048
+ */
1049
+ tabs: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
1050
+ // verify required parameter 'browserId' is not null or undefined
1051
+ assertParamExists('tabs', 'browserId', browserId);
1052
+ // verify required parameter 'payload' is not null or undefined
1053
+ assertParamExists('tabs', 'payload', payload);
1054
+ const localVarPath = `/browser/{browser_id}/tabs`
1055
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
1056
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1057
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1058
+ let baseOptions;
1059
+ if (configuration) {
1060
+ baseOptions = configuration.baseOptions;
1061
+ }
1062
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1063
+ const localVarHeaderParameter = {};
1064
+ const localVarQueryParameter = {};
1065
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1066
+ localVarHeaderParameter['Accept'] = 'application/json';
1067
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1068
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1069
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1070
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
1071
+ return {
1072
+ url: toPathString(localVarUrlObj),
1073
+ options: localVarRequestOptions,
1074
+ };
1075
+ }),
1076
+ /**
1077
+ *
1078
+ * @summary Take a screenshot
1079
+ * @param {string} browserId Unique browser identifier
1080
+ * @param {*} [options] Override http request option.
1081
+ * @throws {RequiredError}
1082
+ */
1083
+ takeScreenshot: (browserId_1, ...args_1) => __awaiter(this, [browserId_1, ...args_1], void 0, function* (browserId, options = {}) {
1084
+ // verify required parameter 'browserId' is not null or undefined
1085
+ assertParamExists('takeScreenshot', 'browserId', browserId);
1086
+ const localVarPath = `/browser/{browser_id}/screenshot`
1087
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
1088
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1089
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1090
+ let baseOptions;
1091
+ if (configuration) {
1092
+ baseOptions = configuration.baseOptions;
1093
+ }
1094
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1095
+ const localVarHeaderParameter = {};
1096
+ const localVarQueryParameter = {};
1097
+ localVarHeaderParameter['Accept'] = 'application/json';
1098
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1099
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1100
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1101
+ return {
1102
+ url: toPathString(localVarUrlObj),
1103
+ options: localVarRequestOptions,
1104
+ };
1105
+ }),
1106
+ /**
1107
+ *
1108
+ * @summary Take DOM/accessibility snapshot
1109
+ * @param {string} browserId Unique browser identifier
1110
+ * @param {SnapshotRequest} payload
1111
+ * @param {*} [options] Override http request option.
1112
+ * @throws {RequiredError}
1113
+ */
1114
+ takeSnapshot: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
1115
+ // verify required parameter 'browserId' is not null or undefined
1116
+ assertParamExists('takeSnapshot', 'browserId', browserId);
1117
+ // verify required parameter 'payload' is not null or undefined
1118
+ assertParamExists('takeSnapshot', 'payload', payload);
1119
+ const localVarPath = `/browser/{browser_id}/snapshot`
1120
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
1121
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1122
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1123
+ let baseOptions;
1124
+ if (configuration) {
1125
+ baseOptions = configuration.baseOptions;
1126
+ }
1127
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1128
+ const localVarHeaderParameter = {};
1129
+ const localVarQueryParameter = {};
1130
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1131
+ localVarHeaderParameter['Accept'] = 'application/json';
1132
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1133
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1134
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1135
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
1136
+ return {
1137
+ url: toPathString(localVarUrlObj),
1138
+ options: localVarRequestOptions,
1139
+ };
1140
+ }),
1141
+ /**
1142
+ *
1143
+ * @summary Type text into an element
1144
+ * @param {string} browserId Unique browser identifier
1145
+ * @param {TypeRequest} payload
1146
+ * @param {*} [options] Override http request option.
1147
+ * @throws {RequiredError}
1148
+ */
1149
+ typeText: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
1150
+ // verify required parameter 'browserId' is not null or undefined
1151
+ assertParamExists('typeText', 'browserId', browserId);
1152
+ // verify required parameter 'payload' is not null or undefined
1153
+ assertParamExists('typeText', 'payload', payload);
1154
+ const localVarPath = `/browser/{browser_id}/type`
1155
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
1156
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1157
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1158
+ let baseOptions;
1159
+ if (configuration) {
1160
+ baseOptions = configuration.baseOptions;
1161
+ }
1162
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1163
+ const localVarHeaderParameter = {};
1164
+ const localVarQueryParameter = {};
1165
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1166
+ localVarHeaderParameter['Accept'] = 'application/json';
1167
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1168
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1169
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1170
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
1171
+ return {
1172
+ url: toPathString(localVarUrlObj),
1173
+ options: localVarRequestOptions,
1174
+ };
1175
+ }),
1176
+ /**
1177
+ *
1178
+ * @summary Upload a file
1179
+ * @param {string} browserId Unique browser identifier
1180
+ * @param {UploadFileRequest} payload
1181
+ * @param {*} [options] Override http request option.
1182
+ * @throws {RequiredError}
1183
+ */
1184
+ uploadFile: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
1185
+ // verify required parameter 'browserId' is not null or undefined
1186
+ assertParamExists('uploadFile', 'browserId', browserId);
1187
+ // verify required parameter 'payload' is not null or undefined
1188
+ assertParamExists('uploadFile', 'payload', payload);
1189
+ const localVarPath = `/browser/{browser_id}/upload_file`
1190
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
1191
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1192
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1193
+ let baseOptions;
1194
+ if (configuration) {
1195
+ baseOptions = configuration.baseOptions;
1196
+ }
1197
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1198
+ const localVarHeaderParameter = {};
1199
+ const localVarQueryParameter = {};
1200
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1201
+ localVarHeaderParameter['Accept'] = 'application/json';
1202
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1203
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1204
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1205
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
1206
+ return {
1207
+ url: toPathString(localVarUrlObj),
1208
+ options: localVarRequestOptions,
1209
+ };
1210
+ }),
1211
+ /**
1212
+ *
1213
+ * @summary Wait for element to become visible or hidden
1214
+ * @param {string} browserId Unique browser identifier
1215
+ * @param {WaitElementRequest} payload
1216
+ * @param {*} [options] Override http request option.
1217
+ * @throws {RequiredError}
1218
+ */
1219
+ waitElement: (browserId_1, payload_1, ...args_1) => __awaiter(this, [browserId_1, payload_1, ...args_1], void 0, function* (browserId, payload, options = {}) {
1220
+ // verify required parameter 'browserId' is not null or undefined
1221
+ assertParamExists('waitElement', 'browserId', browserId);
1222
+ // verify required parameter 'payload' is not null or undefined
1223
+ assertParamExists('waitElement', 'payload', payload);
1224
+ const localVarPath = `/browser/{browser_id}/wait_element`
1225
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
1226
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1227
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1228
+ let baseOptions;
1229
+ if (configuration) {
1230
+ baseOptions = configuration.baseOptions;
1231
+ }
1232
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1233
+ const localVarHeaderParameter = {};
1234
+ const localVarQueryParameter = {};
1235
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1236
+ localVarHeaderParameter['Accept'] = 'application/json';
1237
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1238
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1239
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1240
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
1241
+ return {
1242
+ url: toPathString(localVarUrlObj),
1243
+ options: localVarRequestOptions,
1244
+ };
1245
+ }),
1246
+ /**
1247
+ *
1248
+ * @summary Analyze visible page content using AI
1249
+ * @param {string} browserId Unique browser identifier
1250
+ * @param {*} [options] Override http request option.
1251
+ * @throws {RequiredError}
1252
+ */
1253
+ whatIsVisible: (browserId_1, ...args_1) => __awaiter(this, [browserId_1, ...args_1], void 0, function* (browserId, options = {}) {
1254
+ // verify required parameter 'browserId' is not null or undefined
1255
+ assertParamExists('whatIsVisible', 'browserId', browserId);
1256
+ const localVarPath = `/browser/{browser_id}/what_is_visible`
1257
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
1258
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1259
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1260
+ let baseOptions;
1261
+ if (configuration) {
1262
+ baseOptions = configuration.baseOptions;
1263
+ }
1264
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1265
+ const localVarHeaderParameter = {};
1266
+ const localVarQueryParameter = {};
1267
+ localVarHeaderParameter['Accept'] = 'application/json';
1268
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1269
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1270
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1271
+ return {
1272
+ url: toPathString(localVarUrlObj),
1273
+ options: localVarRequestOptions,
1274
+ };
1275
+ }),
1276
+ };
1277
+ };
1278
+ /**
1279
+ * BrowserApi - functional programming interface
1280
+ */
1281
+ export const BrowserApiFp = function (configuration) {
1282
+ const localVarAxiosParamCreator = BrowserApiAxiosParamCreator(configuration);
1283
+ return {
1284
+ /**
1285
+ *
1286
+ * @summary Check if element exists or is visible
1287
+ * @param {string} browserId Unique browser identifier
1288
+ * @param {CheckElementRequest} payload
1289
+ * @param {*} [options] Override http request option.
1290
+ * @throws {RequiredError}
1291
+ */
1292
+ checkElement(browserId, payload, options) {
1293
+ return __awaiter(this, void 0, void 0, function* () {
1294
+ var _a, _b, _c;
1295
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.checkElement(browserId, payload, options);
1296
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1297
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.checkElement']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1298
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1299
+ });
1300
+ },
1301
+ /**
1302
+ * Use if_visible=true to only click if visible.
1303
+ * @summary Click element
1304
+ * @param {string} browserId Unique browser identifier
1305
+ * @param {ClickRequest} payload
1306
+ * @param {*} [options] Override http request option.
1307
+ * @throws {RequiredError}
1308
+ */
1309
+ click(browserId, payload, options) {
1310
+ return __awaiter(this, void 0, void 0, function* () {
1311
+ var _a, _b, _c;
1312
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.click(browserId, payload, options);
1313
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1314
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.click']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1315
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1316
+ });
1317
+ },
1318
+ /**
1319
+ *
1320
+ * @summary Close all active browser instances
1321
+ * @param {*} [options] Override http request option.
1322
+ * @throws {RequiredError}
1323
+ */
1324
+ closeAllBrowsers(options) {
1325
+ return __awaiter(this, void 0, void 0, function* () {
1326
+ var _a, _b, _c;
1327
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.closeAllBrowsers(options);
1328
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1329
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.closeAllBrowsers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1330
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1331
+ });
1332
+ },
1333
+ /**
1334
+ *
1335
+ * @summary Close a browser instance
1336
+ * @param {string} browserId Unique browser identifier
1337
+ * @param {*} [options] Override http request option.
1338
+ * @throws {RequiredError}
1339
+ */
1340
+ closeBrowser(browserId, options) {
1341
+ return __awaiter(this, void 0, void 0, function* () {
1342
+ var _a, _b, _c;
1343
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.closeBrowser(browserId, options);
1344
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1345
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.closeBrowser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1346
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1347
+ });
1348
+ },
1349
+ /**
1350
+ *
1351
+ * @summary Get or clear console logs
1352
+ * @param {string} browserId Unique browser identifier
1353
+ * @param {ConsoleLogsRequest} payload
1354
+ * @param {*} [options] Override http request option.
1355
+ * @throws {RequiredError}
1356
+ */
1357
+ consoleLogs(browserId, payload, options) {
1358
+ return __awaiter(this, void 0, void 0, function* () {
1359
+ var _a, _b, _c;
1360
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.consoleLogs(browserId, payload, options);
1361
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1362
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.consoleLogs']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1363
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1364
+ });
1365
+ },
1366
+ /**
1367
+ *
1368
+ * @summary Create a new browser instance
1369
+ * @param {BrowserConfig} payload
1370
+ * @param {*} [options] Override http request option.
1371
+ * @throws {RequiredError}
1372
+ */
1373
+ createBrowser(payload, options) {
1374
+ return __awaiter(this, void 0, void 0, function* () {
1375
+ var _a, _b, _c;
1376
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createBrowser(payload, options);
1377
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1378
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.createBrowser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1379
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1380
+ });
1381
+ },
1382
+ /**
1383
+ *
1384
+ * @summary Close and remove a browser instance
1385
+ * @param {string} browserId Unique browser identifier
1386
+ * @param {*} [options] Override http request option.
1387
+ * @throws {RequiredError}
1388
+ */
1389
+ deleteBrowser(browserId, options) {
1390
+ return __awaiter(this, void 0, void 0, function* () {
1391
+ var _a, _b, _c;
1392
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteBrowser(browserId, options);
1393
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1394
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.deleteBrowser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1395
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1396
+ });
1397
+ },
1398
+ /**
1399
+ *
1400
+ * @summary Detect element coordinates using AI vision
1401
+ * @param {string} browserId Unique browser identifier
1402
+ * @param {DetectCoordinatesRequest} payload
1403
+ * @param {*} [options] Override http request option.
1404
+ * @throws {RequiredError}
1405
+ */
1406
+ detectCoordinates(browserId, payload, options) {
1407
+ return __awaiter(this, void 0, void 0, function* () {
1408
+ var _a, _b, _c;
1409
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.detectCoordinates(browserId, payload, options);
1410
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1411
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.detectCoordinates']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1412
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1413
+ });
1414
+ },
1415
+ /**
1416
+ *
1417
+ * @summary Manage browser dialogs: get, accept, or dismiss
1418
+ * @param {string} browserId Unique browser identifier
1419
+ * @param {CombinedDialogRequest} payload
1420
+ * @param {*} [options] Override http request option.
1421
+ * @throws {RequiredError}
1422
+ */
1423
+ dialog(browserId, payload, options) {
1424
+ return __awaiter(this, void 0, void 0, function* () {
1425
+ var _a, _b, _c;
1426
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.dialog(browserId, payload, options);
1427
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1428
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.dialog']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1429
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1430
+ });
1431
+ },
1432
+ /**
1433
+ *
1434
+ * @summary Manage device emulation: set, clear, or list_devices
1435
+ * @param {string} browserId Unique browser identifier
1436
+ * @param {CombinedEmulateRequest} payload
1437
+ * @param {*} [options] Override http request option.
1438
+ * @throws {RequiredError}
1439
+ */
1440
+ emulate(browserId, payload, options) {
1441
+ return __awaiter(this, void 0, void 0, function* () {
1442
+ var _a, _b, _c;
1443
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.emulate(browserId, payload, options);
1444
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1445
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.emulate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1446
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1447
+ });
1448
+ },
1449
+ /**
1450
+ *
1451
+ * @summary Execute JavaScript
1452
+ * @param {string} browserId Unique browser identifier
1453
+ * @param {ExecuteRequest} payload
1454
+ * @param {*} [options] Override http request option.
1455
+ * @throws {RequiredError}
1456
+ */
1457
+ executeScript(browserId, payload, options) {
1458
+ return __awaiter(this, void 0, void 0, function* () {
1459
+ var _a, _b, _c;
1460
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.executeScript(browserId, payload, options);
1461
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1462
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.executeScript']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1463
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1464
+ });
1465
+ },
1466
+ /**
1467
+ *
1468
+ * @summary Fill multiple form fields
1469
+ * @param {string} browserId Unique browser identifier
1470
+ * @param {FillFormRequest} payload
1471
+ * @param {*} [options] Override http request option.
1472
+ * @throws {RequiredError}
1473
+ */
1474
+ fillForm(browserId, payload, options) {
1475
+ return __awaiter(this, void 0, void 0, function* () {
1476
+ var _a, _b, _c;
1477
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.fillForm(browserId, payload, options);
1478
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1479
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.fillForm']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1480
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1481
+ });
1482
+ },
1483
+ /**
1484
+ *
1485
+ * @summary Get browser instance details
1486
+ * @param {string} browserId Unique browser identifier
1487
+ * @param {*} [options] Override http request option.
1488
+ * @throws {RequiredError}
1489
+ */
1490
+ getBrowser(browserId, options) {
1491
+ return __awaiter(this, void 0, void 0, function* () {
1492
+ var _a, _b, _c;
1493
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getBrowser(browserId, options);
1494
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1495
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.getBrowser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1496
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1497
+ });
1498
+ },
1499
+ /**
1500
+ *
1501
+ * @summary Get browser status
1502
+ * @param {string} browserId Unique browser identifier
1503
+ * @param {*} [options] Override http request option.
1504
+ * @throws {RequiredError}
1505
+ */
1506
+ getBrowserStatus(browserId, options) {
1507
+ return __awaiter(this, void 0, void 0, function* () {
1508
+ var _a, _b, _c;
1509
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getBrowserStatus(browserId, options);
1510
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1511
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.getBrowserStatus']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1512
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1513
+ });
1514
+ },
1515
+ /**
1516
+ *
1517
+ * @summary Get page HTML content
1518
+ * @param {string} browserId Unique browser identifier
1519
+ * @param {*} [options] Override http request option.
1520
+ * @throws {RequiredError}
1521
+ */
1522
+ getContent(browserId, options) {
1523
+ return __awaiter(this, void 0, void 0, function* () {
1524
+ var _a, _b, _c;
1525
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getContent(browserId, options);
1526
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1527
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.getContent']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1528
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1529
+ });
1530
+ },
1531
+ /**
1532
+ *
1533
+ * @summary Get element text, attribute, or property
1534
+ * @param {string} browserId Unique browser identifier
1535
+ * @param {ElementDataRequest} payload
1536
+ * @param {*} [options] Override http request option.
1537
+ * @throws {RequiredError}
1538
+ */
1539
+ getElementData(browserId, payload, options) {
1540
+ return __awaiter(this, void 0, void 0, function* () {
1541
+ var _a, _b, _c;
1542
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getElementData(browserId, payload, options);
1543
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1544
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.getElementData']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1545
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1546
+ });
1547
+ },
1548
+ /**
1549
+ *
1550
+ * @summary Get browser pool status
1551
+ * @param {*} [options] Override http request option.
1552
+ * @throws {RequiredError}
1553
+ */
1554
+ getPoolStatus(options) {
1555
+ return __awaiter(this, void 0, void 0, function* () {
1556
+ var _a, _b, _c;
1557
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getPoolStatus(options);
1558
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1559
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.getPoolStatus']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1560
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1561
+ });
1562
+ },
1563
+ /**
1564
+ *
1565
+ * @summary Get current page URL
1566
+ * @param {string} browserId Unique browser identifier
1567
+ * @param {*} [options] Override http request option.
1568
+ * @throws {RequiredError}
1569
+ */
1570
+ getUrl(browserId, options) {
1571
+ return __awaiter(this, void 0, void 0, function* () {
1572
+ var _a, _b, _c;
1573
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getUrl(browserId, options);
1574
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1575
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.getUrl']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1576
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1577
+ });
1578
+ },
1579
+ /**
1580
+ *
1581
+ * @summary Click using selector or screen coordinates
1582
+ * @param {string} browserId Unique browser identifier
1583
+ * @param {CombinedGuiClickRequest} payload
1584
+ * @param {*} [options] Override http request option.
1585
+ * @throws {RequiredError}
1586
+ */
1587
+ guiClick(browserId, payload, options) {
1588
+ return __awaiter(this, void 0, void 0, function* () {
1589
+ var _a, _b, _c;
1590
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.guiClick(browserId, payload, options);
1591
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1592
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.guiClick']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1593
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1594
+ });
1595
+ },
1596
+ /**
1597
+ *
1598
+ * @summary Execute history action: back, forward, or refresh
1599
+ * @param {string} browserId Unique browser identifier
1600
+ * @param {HistoryRequest} payload
1601
+ * @param {*} [options] Override http request option.
1602
+ * @throws {RequiredError}
1603
+ */
1604
+ history(browserId, payload, options) {
1605
+ return __awaiter(this, void 0, void 0, function* () {
1606
+ var _a, _b, _c;
1607
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.history(browserId, payload, options);
1608
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1609
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.history']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1610
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1611
+ });
1612
+ },
1613
+ /**
1614
+ *
1615
+ * @summary List all active browser instances
1616
+ * @param {*} [options] Override http request option.
1617
+ * @throws {RequiredError}
1618
+ */
1619
+ listBrowsers(options) {
1620
+ return __awaiter(this, void 0, void 0, function* () {
1621
+ var _a, _b, _c;
1622
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listBrowsers(options);
1623
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1624
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.listBrowsers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1625
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1626
+ });
1627
+ },
1628
+ /**
1629
+ *
1630
+ * @summary Mouse action: hover or drag
1631
+ * @param {string} browserId Unique browser identifier
1632
+ * @param {MouseRequest} payload
1633
+ * @param {*} [options] Override http request option.
1634
+ * @throws {RequiredError}
1635
+ */
1636
+ mouse(browserId, payload, options) {
1637
+ return __awaiter(this, void 0, void 0, function* () {
1638
+ var _a, _b, _c;
1639
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.mouse(browserId, payload, options);
1640
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1641
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.mouse']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1642
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1643
+ });
1644
+ },
1645
+ /**
1646
+ *
1647
+ * @summary Navigate to a URL
1648
+ * @param {string} browserId Unique browser identifier
1649
+ * @param {NavigateRequest} payload
1650
+ * @param {*} [options] Override http request option.
1651
+ * @throws {RequiredError}
1652
+ */
1653
+ navigateBrowser(browserId, payload, options) {
1654
+ return __awaiter(this, void 0, void 0, function* () {
1655
+ var _a, _b, _c;
1656
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.navigateBrowser(browserId, payload, options);
1657
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1658
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.navigateBrowser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1659
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1660
+ });
1661
+ },
1662
+ /**
1663
+ *
1664
+ * @summary Get or clear network logs
1665
+ * @param {string} browserId Unique browser identifier
1666
+ * @param {NetworkLogsRequest} payload
1667
+ * @param {*} [options] Override http request option.
1668
+ * @throws {RequiredError}
1669
+ */
1670
+ networkLogs(browserId, payload, options) {
1671
+ return __awaiter(this, void 0, void 0, function* () {
1672
+ var _a, _b, _c;
1673
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.networkLogs(browserId, payload, options);
1674
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1675
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.networkLogs']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1676
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1677
+ });
1678
+ },
1679
+ /**
1680
+ *
1681
+ * @summary Manage performance: start_trace, stop_trace, metrics, or analyze
1682
+ * @param {string} browserId Unique browser identifier
1683
+ * @param {PerformanceRequest} payload
1684
+ * @param {*} [options] Override http request option.
1685
+ * @throws {RequiredError}
1686
+ */
1687
+ performance(browserId, payload, options) {
1688
+ return __awaiter(this, void 0, void 0, function* () {
1689
+ var _a, _b, _c;
1690
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.performance(browserId, payload, options);
1691
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1692
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.performance']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1693
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1694
+ });
1695
+ },
1696
+ /**
1697
+ *
1698
+ * @summary Press keys on an element
1699
+ * @param {string} browserId Unique browser identifier
1700
+ * @param {PressKeysRequest} payload
1701
+ * @param {*} [options] Override http request option.
1702
+ * @throws {RequiredError}
1703
+ */
1704
+ pressKeys(browserId, payload, options) {
1705
+ return __awaiter(this, void 0, void 0, function* () {
1706
+ var _a, _b, _c;
1707
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.pressKeys(browserId, payload, options);
1708
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1709
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.pressKeys']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1710
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1711
+ });
1712
+ },
1713
+ /**
1714
+ *
1715
+ * @summary Resize viewport
1716
+ * @param {string} browserId Unique browser identifier
1717
+ * @param {ResizeRequest} payload
1718
+ * @param {*} [options] Override http request option.
1719
+ * @throws {RequiredError}
1720
+ */
1721
+ resize(browserId, payload, options) {
1722
+ return __awaiter(this, void 0, void 0, function* () {
1723
+ var _a, _b, _c;
1724
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.resize(browserId, payload, options);
1725
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1726
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.resize']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1727
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1728
+ });
1729
+ },
1730
+ /**
1731
+ *
1732
+ * @summary Scroll to element/coordinates (absolute) or by delta (relative)
1733
+ * @param {string} browserId Unique browser identifier
1734
+ * @param {CombinedScrollRequest} payload
1735
+ * @param {*} [options] Override http request option.
1736
+ * @throws {RequiredError}
1737
+ */
1738
+ scroll(browserId, payload, options) {
1739
+ return __awaiter(this, void 0, void 0, function* () {
1740
+ var _a, _b, _c;
1741
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.scroll(browserId, payload, options);
1742
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1743
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.scroll']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1744
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1745
+ });
1746
+ },
1747
+ /**
1748
+ *
1749
+ * @summary Select dropdown: select option or get options
1750
+ * @param {string} browserId Unique browser identifier
1751
+ * @param {SelectRequest} payload
1752
+ * @param {*} [options] Override http request option.
1753
+ * @throws {RequiredError}
1754
+ */
1755
+ select(browserId, payload, options) {
1756
+ return __awaiter(this, void 0, void 0, function* () {
1757
+ var _a, _b, _c;
1758
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.select(browserId, payload, options);
1759
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1760
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.select']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1761
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1762
+ });
1763
+ },
1764
+ /**
1765
+ *
1766
+ * @summary Manage browser tabs: list, new, switch, close, or current
1767
+ * @param {string} browserId Unique browser identifier
1768
+ * @param {TabsRequest} payload
1769
+ * @param {*} [options] Override http request option.
1770
+ * @throws {RequiredError}
1771
+ */
1772
+ tabs(browserId, payload, options) {
1773
+ return __awaiter(this, void 0, void 0, function* () {
1774
+ var _a, _b, _c;
1775
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.tabs(browserId, payload, options);
1776
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1777
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.tabs']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1778
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1779
+ });
1780
+ },
1781
+ /**
1782
+ *
1783
+ * @summary Take a screenshot
1784
+ * @param {string} browserId Unique browser identifier
1785
+ * @param {*} [options] Override http request option.
1786
+ * @throws {RequiredError}
1787
+ */
1788
+ takeScreenshot(browserId, options) {
1789
+ return __awaiter(this, void 0, void 0, function* () {
1790
+ var _a, _b, _c;
1791
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.takeScreenshot(browserId, options);
1792
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1793
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.takeScreenshot']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1794
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1795
+ });
1796
+ },
1797
+ /**
1798
+ *
1799
+ * @summary Take DOM/accessibility snapshot
1800
+ * @param {string} browserId Unique browser identifier
1801
+ * @param {SnapshotRequest} payload
1802
+ * @param {*} [options] Override http request option.
1803
+ * @throws {RequiredError}
1804
+ */
1805
+ takeSnapshot(browserId, payload, options) {
1806
+ return __awaiter(this, void 0, void 0, function* () {
1807
+ var _a, _b, _c;
1808
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.takeSnapshot(browserId, payload, options);
1809
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1810
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.takeSnapshot']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1811
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1812
+ });
1813
+ },
1814
+ /**
1815
+ *
1816
+ * @summary Type text into an element
1817
+ * @param {string} browserId Unique browser identifier
1818
+ * @param {TypeRequest} payload
1819
+ * @param {*} [options] Override http request option.
1820
+ * @throws {RequiredError}
1821
+ */
1822
+ typeText(browserId, payload, options) {
1823
+ return __awaiter(this, void 0, void 0, function* () {
1824
+ var _a, _b, _c;
1825
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.typeText(browserId, payload, options);
1826
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1827
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.typeText']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1828
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1829
+ });
1830
+ },
1831
+ /**
1832
+ *
1833
+ * @summary Upload a file
1834
+ * @param {string} browserId Unique browser identifier
1835
+ * @param {UploadFileRequest} payload
1836
+ * @param {*} [options] Override http request option.
1837
+ * @throws {RequiredError}
1838
+ */
1839
+ uploadFile(browserId, payload, options) {
1840
+ return __awaiter(this, void 0, void 0, function* () {
1841
+ var _a, _b, _c;
1842
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.uploadFile(browserId, payload, options);
1843
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1844
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.uploadFile']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1845
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1846
+ });
1847
+ },
1848
+ /**
1849
+ *
1850
+ * @summary Wait for element to become visible or hidden
1851
+ * @param {string} browserId Unique browser identifier
1852
+ * @param {WaitElementRequest} payload
1853
+ * @param {*} [options] Override http request option.
1854
+ * @throws {RequiredError}
1855
+ */
1856
+ waitElement(browserId, payload, options) {
1857
+ return __awaiter(this, void 0, void 0, function* () {
1858
+ var _a, _b, _c;
1859
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.waitElement(browserId, payload, options);
1860
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1861
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.waitElement']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1862
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1863
+ });
1864
+ },
1865
+ /**
1866
+ *
1867
+ * @summary Analyze visible page content using AI
1868
+ * @param {string} browserId Unique browser identifier
1869
+ * @param {*} [options] Override http request option.
1870
+ * @throws {RequiredError}
1871
+ */
1872
+ whatIsVisible(browserId, options) {
1873
+ return __awaiter(this, void 0, void 0, function* () {
1874
+ var _a, _b, _c;
1875
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.whatIsVisible(browserId, options);
1876
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1877
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.whatIsVisible']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1878
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1879
+ });
1880
+ },
1881
+ };
1882
+ };
1883
+ /**
1884
+ * BrowserApi - factory interface
1885
+ */
1886
+ export const BrowserApiFactory = function (configuration, basePath, axios) {
1887
+ const localVarFp = BrowserApiFp(configuration);
1888
+ return {
1889
+ /**
1890
+ *
1891
+ * @summary Check if element exists or is visible
1892
+ * @param {string} browserId Unique browser identifier
1893
+ * @param {CheckElementRequest} payload
1894
+ * @param {*} [options] Override http request option.
1895
+ * @throws {RequiredError}
1896
+ */
1897
+ checkElement(browserId, payload, options) {
1898
+ return localVarFp.checkElement(browserId, payload, options).then((request) => request(axios, basePath));
1899
+ },
1900
+ /**
1901
+ * Use if_visible=true to only click if visible.
1902
+ * @summary Click element
1903
+ * @param {string} browserId Unique browser identifier
1904
+ * @param {ClickRequest} payload
1905
+ * @param {*} [options] Override http request option.
1906
+ * @throws {RequiredError}
1907
+ */
1908
+ click(browserId, payload, options) {
1909
+ return localVarFp.click(browserId, payload, options).then((request) => request(axios, basePath));
1910
+ },
1911
+ /**
1912
+ *
1913
+ * @summary Close all active browser instances
1914
+ * @param {*} [options] Override http request option.
1915
+ * @throws {RequiredError}
1916
+ */
1917
+ closeAllBrowsers(options) {
1918
+ return localVarFp.closeAllBrowsers(options).then((request) => request(axios, basePath));
1919
+ },
1920
+ /**
1921
+ *
1922
+ * @summary Close a browser instance
1923
+ * @param {string} browserId Unique browser identifier
1924
+ * @param {*} [options] Override http request option.
1925
+ * @throws {RequiredError}
1926
+ */
1927
+ closeBrowser(browserId, options) {
1928
+ return localVarFp.closeBrowser(browserId, options).then((request) => request(axios, basePath));
1929
+ },
1930
+ /**
1931
+ *
1932
+ * @summary Get or clear console logs
1933
+ * @param {string} browserId Unique browser identifier
1934
+ * @param {ConsoleLogsRequest} payload
1935
+ * @param {*} [options] Override http request option.
1936
+ * @throws {RequiredError}
1937
+ */
1938
+ consoleLogs(browserId, payload, options) {
1939
+ return localVarFp.consoleLogs(browserId, payload, options).then((request) => request(axios, basePath));
1940
+ },
1941
+ /**
1942
+ *
1943
+ * @summary Create a new browser instance
1944
+ * @param {BrowserConfig} payload
1945
+ * @param {*} [options] Override http request option.
1946
+ * @throws {RequiredError}
1947
+ */
1948
+ createBrowser(payload, options) {
1949
+ return localVarFp.createBrowser(payload, options).then((request) => request(axios, basePath));
1950
+ },
1951
+ /**
1952
+ *
1953
+ * @summary Close and remove a browser instance
1954
+ * @param {string} browserId Unique browser identifier
1955
+ * @param {*} [options] Override http request option.
1956
+ * @throws {RequiredError}
1957
+ */
1958
+ deleteBrowser(browserId, options) {
1959
+ return localVarFp.deleteBrowser(browserId, options).then((request) => request(axios, basePath));
1960
+ },
1961
+ /**
1962
+ *
1963
+ * @summary Detect element coordinates using AI vision
1964
+ * @param {string} browserId Unique browser identifier
1965
+ * @param {DetectCoordinatesRequest} payload
1966
+ * @param {*} [options] Override http request option.
1967
+ * @throws {RequiredError}
1968
+ */
1969
+ detectCoordinates(browserId, payload, options) {
1970
+ return localVarFp.detectCoordinates(browserId, payload, options).then((request) => request(axios, basePath));
1971
+ },
1972
+ /**
1973
+ *
1974
+ * @summary Manage browser dialogs: get, accept, or dismiss
1975
+ * @param {string} browserId Unique browser identifier
1976
+ * @param {CombinedDialogRequest} payload
1977
+ * @param {*} [options] Override http request option.
1978
+ * @throws {RequiredError}
1979
+ */
1980
+ dialog(browserId, payload, options) {
1981
+ return localVarFp.dialog(browserId, payload, options).then((request) => request(axios, basePath));
1982
+ },
1983
+ /**
1984
+ *
1985
+ * @summary Manage device emulation: set, clear, or list_devices
1986
+ * @param {string} browserId Unique browser identifier
1987
+ * @param {CombinedEmulateRequest} payload
1988
+ * @param {*} [options] Override http request option.
1989
+ * @throws {RequiredError}
1990
+ */
1991
+ emulate(browserId, payload, options) {
1992
+ return localVarFp.emulate(browserId, payload, options).then((request) => request(axios, basePath));
1993
+ },
1994
+ /**
1995
+ *
1996
+ * @summary Execute JavaScript
1997
+ * @param {string} browserId Unique browser identifier
1998
+ * @param {ExecuteRequest} payload
1999
+ * @param {*} [options] Override http request option.
2000
+ * @throws {RequiredError}
2001
+ */
2002
+ executeScript(browserId, payload, options) {
2003
+ return localVarFp.executeScript(browserId, payload, options).then((request) => request(axios, basePath));
2004
+ },
2005
+ /**
2006
+ *
2007
+ * @summary Fill multiple form fields
2008
+ * @param {string} browserId Unique browser identifier
2009
+ * @param {FillFormRequest} payload
2010
+ * @param {*} [options] Override http request option.
2011
+ * @throws {RequiredError}
2012
+ */
2013
+ fillForm(browserId, payload, options) {
2014
+ return localVarFp.fillForm(browserId, payload, options).then((request) => request(axios, basePath));
2015
+ },
2016
+ /**
2017
+ *
2018
+ * @summary Get browser instance details
2019
+ * @param {string} browserId Unique browser identifier
2020
+ * @param {*} [options] Override http request option.
2021
+ * @throws {RequiredError}
2022
+ */
2023
+ getBrowser(browserId, options) {
2024
+ return localVarFp.getBrowser(browserId, options).then((request) => request(axios, basePath));
2025
+ },
2026
+ /**
2027
+ *
2028
+ * @summary Get browser status
2029
+ * @param {string} browserId Unique browser identifier
2030
+ * @param {*} [options] Override http request option.
2031
+ * @throws {RequiredError}
2032
+ */
2033
+ getBrowserStatus(browserId, options) {
2034
+ return localVarFp.getBrowserStatus(browserId, options).then((request) => request(axios, basePath));
2035
+ },
2036
+ /**
2037
+ *
2038
+ * @summary Get page HTML content
2039
+ * @param {string} browserId Unique browser identifier
2040
+ * @param {*} [options] Override http request option.
2041
+ * @throws {RequiredError}
2042
+ */
2043
+ getContent(browserId, options) {
2044
+ return localVarFp.getContent(browserId, options).then((request) => request(axios, basePath));
2045
+ },
2046
+ /**
2047
+ *
2048
+ * @summary Get element text, attribute, or property
2049
+ * @param {string} browserId Unique browser identifier
2050
+ * @param {ElementDataRequest} payload
2051
+ * @param {*} [options] Override http request option.
2052
+ * @throws {RequiredError}
2053
+ */
2054
+ getElementData(browserId, payload, options) {
2055
+ return localVarFp.getElementData(browserId, payload, options).then((request) => request(axios, basePath));
2056
+ },
2057
+ /**
2058
+ *
2059
+ * @summary Get browser pool status
2060
+ * @param {*} [options] Override http request option.
2061
+ * @throws {RequiredError}
2062
+ */
2063
+ getPoolStatus(options) {
2064
+ return localVarFp.getPoolStatus(options).then((request) => request(axios, basePath));
2065
+ },
2066
+ /**
2067
+ *
2068
+ * @summary Get current page URL
2069
+ * @param {string} browserId Unique browser identifier
2070
+ * @param {*} [options] Override http request option.
2071
+ * @throws {RequiredError}
2072
+ */
2073
+ getUrl(browserId, options) {
2074
+ return localVarFp.getUrl(browserId, options).then((request) => request(axios, basePath));
2075
+ },
2076
+ /**
2077
+ *
2078
+ * @summary Click using selector or screen coordinates
2079
+ * @param {string} browserId Unique browser identifier
2080
+ * @param {CombinedGuiClickRequest} payload
2081
+ * @param {*} [options] Override http request option.
2082
+ * @throws {RequiredError}
2083
+ */
2084
+ guiClick(browserId, payload, options) {
2085
+ return localVarFp.guiClick(browserId, payload, options).then((request) => request(axios, basePath));
2086
+ },
2087
+ /**
2088
+ *
2089
+ * @summary Execute history action: back, forward, or refresh
2090
+ * @param {string} browserId Unique browser identifier
2091
+ * @param {HistoryRequest} payload
2092
+ * @param {*} [options] Override http request option.
2093
+ * @throws {RequiredError}
2094
+ */
2095
+ history(browserId, payload, options) {
2096
+ return localVarFp.history(browserId, payload, options).then((request) => request(axios, basePath));
2097
+ },
2098
+ /**
2099
+ *
2100
+ * @summary List all active browser instances
2101
+ * @param {*} [options] Override http request option.
2102
+ * @throws {RequiredError}
2103
+ */
2104
+ listBrowsers(options) {
2105
+ return localVarFp.listBrowsers(options).then((request) => request(axios, basePath));
2106
+ },
2107
+ /**
2108
+ *
2109
+ * @summary Mouse action: hover or drag
2110
+ * @param {string} browserId Unique browser identifier
2111
+ * @param {MouseRequest} payload
2112
+ * @param {*} [options] Override http request option.
2113
+ * @throws {RequiredError}
2114
+ */
2115
+ mouse(browserId, payload, options) {
2116
+ return localVarFp.mouse(browserId, payload, options).then((request) => request(axios, basePath));
2117
+ },
2118
+ /**
2119
+ *
2120
+ * @summary Navigate to a URL
2121
+ * @param {string} browserId Unique browser identifier
2122
+ * @param {NavigateRequest} payload
2123
+ * @param {*} [options] Override http request option.
2124
+ * @throws {RequiredError}
2125
+ */
2126
+ navigateBrowser(browserId, payload, options) {
2127
+ return localVarFp.navigateBrowser(browserId, payload, options).then((request) => request(axios, basePath));
2128
+ },
2129
+ /**
2130
+ *
2131
+ * @summary Get or clear network logs
2132
+ * @param {string} browserId Unique browser identifier
2133
+ * @param {NetworkLogsRequest} payload
2134
+ * @param {*} [options] Override http request option.
2135
+ * @throws {RequiredError}
2136
+ */
2137
+ networkLogs(browserId, payload, options) {
2138
+ return localVarFp.networkLogs(browserId, payload, options).then((request) => request(axios, basePath));
2139
+ },
2140
+ /**
2141
+ *
2142
+ * @summary Manage performance: start_trace, stop_trace, metrics, or analyze
2143
+ * @param {string} browserId Unique browser identifier
2144
+ * @param {PerformanceRequest} payload
2145
+ * @param {*} [options] Override http request option.
2146
+ * @throws {RequiredError}
2147
+ */
2148
+ performance(browserId, payload, options) {
2149
+ return localVarFp.performance(browserId, payload, options).then((request) => request(axios, basePath));
2150
+ },
2151
+ /**
2152
+ *
2153
+ * @summary Press keys on an element
2154
+ * @param {string} browserId Unique browser identifier
2155
+ * @param {PressKeysRequest} payload
2156
+ * @param {*} [options] Override http request option.
2157
+ * @throws {RequiredError}
2158
+ */
2159
+ pressKeys(browserId, payload, options) {
2160
+ return localVarFp.pressKeys(browserId, payload, options).then((request) => request(axios, basePath));
2161
+ },
2162
+ /**
2163
+ *
2164
+ * @summary Resize viewport
2165
+ * @param {string} browserId Unique browser identifier
2166
+ * @param {ResizeRequest} payload
2167
+ * @param {*} [options] Override http request option.
2168
+ * @throws {RequiredError}
2169
+ */
2170
+ resize(browserId, payload, options) {
2171
+ return localVarFp.resize(browserId, payload, options).then((request) => request(axios, basePath));
2172
+ },
2173
+ /**
2174
+ *
2175
+ * @summary Scroll to element/coordinates (absolute) or by delta (relative)
2176
+ * @param {string} browserId Unique browser identifier
2177
+ * @param {CombinedScrollRequest} payload
2178
+ * @param {*} [options] Override http request option.
2179
+ * @throws {RequiredError}
2180
+ */
2181
+ scroll(browserId, payload, options) {
2182
+ return localVarFp.scroll(browserId, payload, options).then((request) => request(axios, basePath));
2183
+ },
2184
+ /**
2185
+ *
2186
+ * @summary Select dropdown: select option or get options
2187
+ * @param {string} browserId Unique browser identifier
2188
+ * @param {SelectRequest} payload
2189
+ * @param {*} [options] Override http request option.
2190
+ * @throws {RequiredError}
2191
+ */
2192
+ select(browserId, payload, options) {
2193
+ return localVarFp.select(browserId, payload, options).then((request) => request(axios, basePath));
2194
+ },
2195
+ /**
2196
+ *
2197
+ * @summary Manage browser tabs: list, new, switch, close, or current
2198
+ * @param {string} browserId Unique browser identifier
2199
+ * @param {TabsRequest} payload
2200
+ * @param {*} [options] Override http request option.
2201
+ * @throws {RequiredError}
2202
+ */
2203
+ tabs(browserId, payload, options) {
2204
+ return localVarFp.tabs(browserId, payload, options).then((request) => request(axios, basePath));
2205
+ },
2206
+ /**
2207
+ *
2208
+ * @summary Take a screenshot
2209
+ * @param {string} browserId Unique browser identifier
2210
+ * @param {*} [options] Override http request option.
2211
+ * @throws {RequiredError}
2212
+ */
2213
+ takeScreenshot(browserId, options) {
2214
+ return localVarFp.takeScreenshot(browserId, options).then((request) => request(axios, basePath));
2215
+ },
2216
+ /**
2217
+ *
2218
+ * @summary Take DOM/accessibility snapshot
2219
+ * @param {string} browserId Unique browser identifier
2220
+ * @param {SnapshotRequest} payload
2221
+ * @param {*} [options] Override http request option.
2222
+ * @throws {RequiredError}
2223
+ */
2224
+ takeSnapshot(browserId, payload, options) {
2225
+ return localVarFp.takeSnapshot(browserId, payload, options).then((request) => request(axios, basePath));
2226
+ },
2227
+ /**
2228
+ *
2229
+ * @summary Type text into an element
2230
+ * @param {string} browserId Unique browser identifier
2231
+ * @param {TypeRequest} payload
2232
+ * @param {*} [options] Override http request option.
2233
+ * @throws {RequiredError}
2234
+ */
2235
+ typeText(browserId, payload, options) {
2236
+ return localVarFp.typeText(browserId, payload, options).then((request) => request(axios, basePath));
2237
+ },
2238
+ /**
2239
+ *
2240
+ * @summary Upload a file
2241
+ * @param {string} browserId Unique browser identifier
2242
+ * @param {UploadFileRequest} payload
2243
+ * @param {*} [options] Override http request option.
2244
+ * @throws {RequiredError}
2245
+ */
2246
+ uploadFile(browserId, payload, options) {
2247
+ return localVarFp.uploadFile(browserId, payload, options).then((request) => request(axios, basePath));
2248
+ },
2249
+ /**
2250
+ *
2251
+ * @summary Wait for element to become visible or hidden
2252
+ * @param {string} browserId Unique browser identifier
2253
+ * @param {WaitElementRequest} payload
2254
+ * @param {*} [options] Override http request option.
2255
+ * @throws {RequiredError}
2256
+ */
2257
+ waitElement(browserId, payload, options) {
2258
+ return localVarFp.waitElement(browserId, payload, options).then((request) => request(axios, basePath));
2259
+ },
2260
+ /**
2261
+ *
2262
+ * @summary Analyze visible page content using AI
2263
+ * @param {string} browserId Unique browser identifier
2264
+ * @param {*} [options] Override http request option.
2265
+ * @throws {RequiredError}
2266
+ */
2267
+ whatIsVisible(browserId, options) {
2268
+ return localVarFp.whatIsVisible(browserId, options).then((request) => request(axios, basePath));
2269
+ },
2270
+ };
2271
+ };
2272
+ /**
2273
+ * BrowserApi - object-oriented interface
2274
+ */
2275
+ export class BrowserApi extends BaseAPI {
2276
+ /**
2277
+ *
2278
+ * @summary Check if element exists or is visible
2279
+ * @param {string} browserId Unique browser identifier
2280
+ * @param {CheckElementRequest} payload
2281
+ * @param {*} [options] Override http request option.
2282
+ * @throws {RequiredError}
2283
+ */
2284
+ checkElement(browserId, payload, options) {
2285
+ return BrowserApiFp(this.configuration).checkElement(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2286
+ }
2287
+ /**
2288
+ * Use if_visible=true to only click if visible.
2289
+ * @summary Click element
2290
+ * @param {string} browserId Unique browser identifier
2291
+ * @param {ClickRequest} payload
2292
+ * @param {*} [options] Override http request option.
2293
+ * @throws {RequiredError}
2294
+ */
2295
+ click(browserId, payload, options) {
2296
+ return BrowserApiFp(this.configuration).click(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2297
+ }
2298
+ /**
2299
+ *
2300
+ * @summary Close all active browser instances
2301
+ * @param {*} [options] Override http request option.
2302
+ * @throws {RequiredError}
2303
+ */
2304
+ closeAllBrowsers(options) {
2305
+ return BrowserApiFp(this.configuration).closeAllBrowsers(options).then((request) => request(this.axios, this.basePath));
2306
+ }
2307
+ /**
2308
+ *
2309
+ * @summary Close a browser instance
2310
+ * @param {string} browserId Unique browser identifier
2311
+ * @param {*} [options] Override http request option.
2312
+ * @throws {RequiredError}
2313
+ */
2314
+ closeBrowser(browserId, options) {
2315
+ return BrowserApiFp(this.configuration).closeBrowser(browserId, options).then((request) => request(this.axios, this.basePath));
2316
+ }
2317
+ /**
2318
+ *
2319
+ * @summary Get or clear console logs
2320
+ * @param {string} browserId Unique browser identifier
2321
+ * @param {ConsoleLogsRequest} payload
2322
+ * @param {*} [options] Override http request option.
2323
+ * @throws {RequiredError}
2324
+ */
2325
+ consoleLogs(browserId, payload, options) {
2326
+ return BrowserApiFp(this.configuration).consoleLogs(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2327
+ }
2328
+ /**
2329
+ *
2330
+ * @summary Create a new browser instance
2331
+ * @param {BrowserConfig} payload
2332
+ * @param {*} [options] Override http request option.
2333
+ * @throws {RequiredError}
2334
+ */
2335
+ createBrowser(payload, options) {
2336
+ return BrowserApiFp(this.configuration).createBrowser(payload, options).then((request) => request(this.axios, this.basePath));
2337
+ }
2338
+ /**
2339
+ *
2340
+ * @summary Close and remove a browser instance
2341
+ * @param {string} browserId Unique browser identifier
2342
+ * @param {*} [options] Override http request option.
2343
+ * @throws {RequiredError}
2344
+ */
2345
+ deleteBrowser(browserId, options) {
2346
+ return BrowserApiFp(this.configuration).deleteBrowser(browserId, options).then((request) => request(this.axios, this.basePath));
2347
+ }
2348
+ /**
2349
+ *
2350
+ * @summary Detect element coordinates using AI vision
2351
+ * @param {string} browserId Unique browser identifier
2352
+ * @param {DetectCoordinatesRequest} payload
2353
+ * @param {*} [options] Override http request option.
2354
+ * @throws {RequiredError}
2355
+ */
2356
+ detectCoordinates(browserId, payload, options) {
2357
+ return BrowserApiFp(this.configuration).detectCoordinates(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2358
+ }
2359
+ /**
2360
+ *
2361
+ * @summary Manage browser dialogs: get, accept, or dismiss
2362
+ * @param {string} browserId Unique browser identifier
2363
+ * @param {CombinedDialogRequest} payload
2364
+ * @param {*} [options] Override http request option.
2365
+ * @throws {RequiredError}
2366
+ */
2367
+ dialog(browserId, payload, options) {
2368
+ return BrowserApiFp(this.configuration).dialog(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2369
+ }
2370
+ /**
2371
+ *
2372
+ * @summary Manage device emulation: set, clear, or list_devices
2373
+ * @param {string} browserId Unique browser identifier
2374
+ * @param {CombinedEmulateRequest} payload
2375
+ * @param {*} [options] Override http request option.
2376
+ * @throws {RequiredError}
2377
+ */
2378
+ emulate(browserId, payload, options) {
2379
+ return BrowserApiFp(this.configuration).emulate(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2380
+ }
2381
+ /**
2382
+ *
2383
+ * @summary Execute JavaScript
2384
+ * @param {string} browserId Unique browser identifier
2385
+ * @param {ExecuteRequest} payload
2386
+ * @param {*} [options] Override http request option.
2387
+ * @throws {RequiredError}
2388
+ */
2389
+ executeScript(browserId, payload, options) {
2390
+ return BrowserApiFp(this.configuration).executeScript(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2391
+ }
2392
+ /**
2393
+ *
2394
+ * @summary Fill multiple form fields
2395
+ * @param {string} browserId Unique browser identifier
2396
+ * @param {FillFormRequest} payload
2397
+ * @param {*} [options] Override http request option.
2398
+ * @throws {RequiredError}
2399
+ */
2400
+ fillForm(browserId, payload, options) {
2401
+ return BrowserApiFp(this.configuration).fillForm(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2402
+ }
2403
+ /**
2404
+ *
2405
+ * @summary Get browser instance details
2406
+ * @param {string} browserId Unique browser identifier
2407
+ * @param {*} [options] Override http request option.
2408
+ * @throws {RequiredError}
2409
+ */
2410
+ getBrowser(browserId, options) {
2411
+ return BrowserApiFp(this.configuration).getBrowser(browserId, options).then((request) => request(this.axios, this.basePath));
2412
+ }
2413
+ /**
2414
+ *
2415
+ * @summary Get browser status
2416
+ * @param {string} browserId Unique browser identifier
2417
+ * @param {*} [options] Override http request option.
2418
+ * @throws {RequiredError}
2419
+ */
2420
+ getBrowserStatus(browserId, options) {
2421
+ return BrowserApiFp(this.configuration).getBrowserStatus(browserId, options).then((request) => request(this.axios, this.basePath));
2422
+ }
2423
+ /**
2424
+ *
2425
+ * @summary Get page HTML content
2426
+ * @param {string} browserId Unique browser identifier
2427
+ * @param {*} [options] Override http request option.
2428
+ * @throws {RequiredError}
2429
+ */
2430
+ getContent(browserId, options) {
2431
+ return BrowserApiFp(this.configuration).getContent(browserId, options).then((request) => request(this.axios, this.basePath));
2432
+ }
2433
+ /**
2434
+ *
2435
+ * @summary Get element text, attribute, or property
2436
+ * @param {string} browserId Unique browser identifier
2437
+ * @param {ElementDataRequest} payload
2438
+ * @param {*} [options] Override http request option.
2439
+ * @throws {RequiredError}
2440
+ */
2441
+ getElementData(browserId, payload, options) {
2442
+ return BrowserApiFp(this.configuration).getElementData(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2443
+ }
2444
+ /**
2445
+ *
2446
+ * @summary Get browser pool status
2447
+ * @param {*} [options] Override http request option.
2448
+ * @throws {RequiredError}
2449
+ */
2450
+ getPoolStatus(options) {
2451
+ return BrowserApiFp(this.configuration).getPoolStatus(options).then((request) => request(this.axios, this.basePath));
2452
+ }
2453
+ /**
2454
+ *
2455
+ * @summary Get current page URL
2456
+ * @param {string} browserId Unique browser identifier
2457
+ * @param {*} [options] Override http request option.
2458
+ * @throws {RequiredError}
2459
+ */
2460
+ getUrl(browserId, options) {
2461
+ return BrowserApiFp(this.configuration).getUrl(browserId, options).then((request) => request(this.axios, this.basePath));
2462
+ }
2463
+ /**
2464
+ *
2465
+ * @summary Click using selector or screen coordinates
2466
+ * @param {string} browserId Unique browser identifier
2467
+ * @param {CombinedGuiClickRequest} payload
2468
+ * @param {*} [options] Override http request option.
2469
+ * @throws {RequiredError}
2470
+ */
2471
+ guiClick(browserId, payload, options) {
2472
+ return BrowserApiFp(this.configuration).guiClick(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2473
+ }
2474
+ /**
2475
+ *
2476
+ * @summary Execute history action: back, forward, or refresh
2477
+ * @param {string} browserId Unique browser identifier
2478
+ * @param {HistoryRequest} payload
2479
+ * @param {*} [options] Override http request option.
2480
+ * @throws {RequiredError}
2481
+ */
2482
+ history(browserId, payload, options) {
2483
+ return BrowserApiFp(this.configuration).history(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2484
+ }
2485
+ /**
2486
+ *
2487
+ * @summary List all active browser instances
2488
+ * @param {*} [options] Override http request option.
2489
+ * @throws {RequiredError}
2490
+ */
2491
+ listBrowsers(options) {
2492
+ return BrowserApiFp(this.configuration).listBrowsers(options).then((request) => request(this.axios, this.basePath));
2493
+ }
2494
+ /**
2495
+ *
2496
+ * @summary Mouse action: hover or drag
2497
+ * @param {string} browserId Unique browser identifier
2498
+ * @param {MouseRequest} payload
2499
+ * @param {*} [options] Override http request option.
2500
+ * @throws {RequiredError}
2501
+ */
2502
+ mouse(browserId, payload, options) {
2503
+ return BrowserApiFp(this.configuration).mouse(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2504
+ }
2505
+ /**
2506
+ *
2507
+ * @summary Navigate to a URL
2508
+ * @param {string} browserId Unique browser identifier
2509
+ * @param {NavigateRequest} payload
2510
+ * @param {*} [options] Override http request option.
2511
+ * @throws {RequiredError}
2512
+ */
2513
+ navigateBrowser(browserId, payload, options) {
2514
+ return BrowserApiFp(this.configuration).navigateBrowser(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2515
+ }
2516
+ /**
2517
+ *
2518
+ * @summary Get or clear network logs
2519
+ * @param {string} browserId Unique browser identifier
2520
+ * @param {NetworkLogsRequest} payload
2521
+ * @param {*} [options] Override http request option.
2522
+ * @throws {RequiredError}
2523
+ */
2524
+ networkLogs(browserId, payload, options) {
2525
+ return BrowserApiFp(this.configuration).networkLogs(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2526
+ }
2527
+ /**
2528
+ *
2529
+ * @summary Manage performance: start_trace, stop_trace, metrics, or analyze
2530
+ * @param {string} browserId Unique browser identifier
2531
+ * @param {PerformanceRequest} payload
2532
+ * @param {*} [options] Override http request option.
2533
+ * @throws {RequiredError}
2534
+ */
2535
+ performance(browserId, payload, options) {
2536
+ return BrowserApiFp(this.configuration).performance(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2537
+ }
2538
+ /**
2539
+ *
2540
+ * @summary Press keys on an element
2541
+ * @param {string} browserId Unique browser identifier
2542
+ * @param {PressKeysRequest} payload
2543
+ * @param {*} [options] Override http request option.
2544
+ * @throws {RequiredError}
2545
+ */
2546
+ pressKeys(browserId, payload, options) {
2547
+ return BrowserApiFp(this.configuration).pressKeys(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2548
+ }
2549
+ /**
2550
+ *
2551
+ * @summary Resize viewport
2552
+ * @param {string} browserId Unique browser identifier
2553
+ * @param {ResizeRequest} payload
2554
+ * @param {*} [options] Override http request option.
2555
+ * @throws {RequiredError}
2556
+ */
2557
+ resize(browserId, payload, options) {
2558
+ return BrowserApiFp(this.configuration).resize(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2559
+ }
2560
+ /**
2561
+ *
2562
+ * @summary Scroll to element/coordinates (absolute) or by delta (relative)
2563
+ * @param {string} browserId Unique browser identifier
2564
+ * @param {CombinedScrollRequest} payload
2565
+ * @param {*} [options] Override http request option.
2566
+ * @throws {RequiredError}
2567
+ */
2568
+ scroll(browserId, payload, options) {
2569
+ return BrowserApiFp(this.configuration).scroll(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2570
+ }
2571
+ /**
2572
+ *
2573
+ * @summary Select dropdown: select option or get options
2574
+ * @param {string} browserId Unique browser identifier
2575
+ * @param {SelectRequest} payload
2576
+ * @param {*} [options] Override http request option.
2577
+ * @throws {RequiredError}
2578
+ */
2579
+ select(browserId, payload, options) {
2580
+ return BrowserApiFp(this.configuration).select(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2581
+ }
2582
+ /**
2583
+ *
2584
+ * @summary Manage browser tabs: list, new, switch, close, or current
2585
+ * @param {string} browserId Unique browser identifier
2586
+ * @param {TabsRequest} payload
2587
+ * @param {*} [options] Override http request option.
2588
+ * @throws {RequiredError}
2589
+ */
2590
+ tabs(browserId, payload, options) {
2591
+ return BrowserApiFp(this.configuration).tabs(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2592
+ }
2593
+ /**
2594
+ *
2595
+ * @summary Take a screenshot
2596
+ * @param {string} browserId Unique browser identifier
2597
+ * @param {*} [options] Override http request option.
2598
+ * @throws {RequiredError}
2599
+ */
2600
+ takeScreenshot(browserId, options) {
2601
+ return BrowserApiFp(this.configuration).takeScreenshot(browserId, options).then((request) => request(this.axios, this.basePath));
2602
+ }
2603
+ /**
2604
+ *
2605
+ * @summary Take DOM/accessibility snapshot
2606
+ * @param {string} browserId Unique browser identifier
2607
+ * @param {SnapshotRequest} payload
2608
+ * @param {*} [options] Override http request option.
2609
+ * @throws {RequiredError}
2610
+ */
2611
+ takeSnapshot(browserId, payload, options) {
2612
+ return BrowserApiFp(this.configuration).takeSnapshot(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2613
+ }
2614
+ /**
2615
+ *
2616
+ * @summary Type text into an element
2617
+ * @param {string} browserId Unique browser identifier
2618
+ * @param {TypeRequest} payload
2619
+ * @param {*} [options] Override http request option.
2620
+ * @throws {RequiredError}
2621
+ */
2622
+ typeText(browserId, payload, options) {
2623
+ return BrowserApiFp(this.configuration).typeText(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2624
+ }
2625
+ /**
2626
+ *
2627
+ * @summary Upload a file
2628
+ * @param {string} browserId Unique browser identifier
2629
+ * @param {UploadFileRequest} payload
2630
+ * @param {*} [options] Override http request option.
2631
+ * @throws {RequiredError}
2632
+ */
2633
+ uploadFile(browserId, payload, options) {
2634
+ return BrowserApiFp(this.configuration).uploadFile(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2635
+ }
2636
+ /**
2637
+ *
2638
+ * @summary Wait for element to become visible or hidden
2639
+ * @param {string} browserId Unique browser identifier
2640
+ * @param {WaitElementRequest} payload
2641
+ * @param {*} [options] Override http request option.
2642
+ * @throws {RequiredError}
2643
+ */
2644
+ waitElement(browserId, payload, options) {
2645
+ return BrowserApiFp(this.configuration).waitElement(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2646
+ }
2647
+ /**
2648
+ *
2649
+ * @summary Analyze visible page content using AI
2650
+ * @param {string} browserId Unique browser identifier
2651
+ * @param {*} [options] Override http request option.
2652
+ * @throws {RequiredError}
2653
+ */
2654
+ whatIsVisible(browserId, options) {
2655
+ return BrowserApiFp(this.configuration).whatIsVisible(browserId, options).then((request) => request(this.axios, this.basePath));
2656
+ }
2657
+ }
2658
+ /**
2659
+ * HealthApi - axios parameter creator
2660
+ */
2661
+ export const HealthApiAxiosParamCreator = function (configuration) {
2662
+ return {
2663
+ /**
2664
+ *
2665
+ * @summary Check the health status of the browser pool
2666
+ * @param {*} [options] Override http request option.
2667
+ * @throws {RequiredError}
2668
+ */
2669
+ healthCheck: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
2670
+ const localVarPath = `/health/`;
2671
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2672
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2673
+ let baseOptions;
2674
+ if (configuration) {
2675
+ baseOptions = configuration.baseOptions;
2676
+ }
2677
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2678
+ const localVarHeaderParameter = {};
2679
+ const localVarQueryParameter = {};
2680
+ localVarHeaderParameter['Accept'] = 'application/json';
2681
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2682
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2683
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2684
+ return {
2685
+ url: toPathString(localVarUrlObj),
2686
+ options: localVarRequestOptions,
2687
+ };
2688
+ }),
2689
+ /**
2690
+ *
2691
+ * @summary Get Prometheus-style metrics for monitoring
2692
+ * @param {*} [options] Override http request option.
2693
+ * @throws {RequiredError}
2694
+ */
2695
+ prometheusMetrics: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
2696
+ const localVarPath = `/health/metrics`;
2697
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2698
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2699
+ let baseOptions;
2700
+ if (configuration) {
2701
+ baseOptions = configuration.baseOptions;
2702
+ }
2703
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2704
+ const localVarHeaderParameter = {};
2705
+ const localVarQueryParameter = {};
2706
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2707
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2708
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2709
+ return {
2710
+ url: toPathString(localVarUrlObj),
2711
+ options: localVarRequestOptions,
2712
+ };
2713
+ }),
2714
+ };
2715
+ };
2716
+ /**
2717
+ * HealthApi - functional programming interface
2718
+ */
2719
+ export const HealthApiFp = function (configuration) {
2720
+ const localVarAxiosParamCreator = HealthApiAxiosParamCreator(configuration);
2721
+ return {
2722
+ /**
2723
+ *
2724
+ * @summary Check the health status of the browser pool
2725
+ * @param {*} [options] Override http request option.
2726
+ * @throws {RequiredError}
2727
+ */
2728
+ healthCheck(options) {
2729
+ return __awaiter(this, void 0, void 0, function* () {
2730
+ var _a, _b, _c;
2731
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.healthCheck(options);
2732
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2733
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['HealthApi.healthCheck']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2734
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2735
+ });
2736
+ },
2737
+ /**
2738
+ *
2739
+ * @summary Get Prometheus-style metrics for monitoring
2740
+ * @param {*} [options] Override http request option.
2741
+ * @throws {RequiredError}
2742
+ */
2743
+ prometheusMetrics(options) {
2744
+ return __awaiter(this, void 0, void 0, function* () {
2745
+ var _a, _b, _c;
2746
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.prometheusMetrics(options);
2747
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2748
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['HealthApi.prometheusMetrics']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2749
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2750
+ });
2751
+ },
2752
+ };
2753
+ };
2754
+ /**
2755
+ * HealthApi - factory interface
2756
+ */
2757
+ export const HealthApiFactory = function (configuration, basePath, axios) {
2758
+ const localVarFp = HealthApiFp(configuration);
2759
+ return {
2760
+ /**
2761
+ *
2762
+ * @summary Check the health status of the browser pool
2763
+ * @param {*} [options] Override http request option.
2764
+ * @throws {RequiredError}
2765
+ */
2766
+ healthCheck(options) {
2767
+ return localVarFp.healthCheck(options).then((request) => request(axios, basePath));
2768
+ },
2769
+ /**
2770
+ *
2771
+ * @summary Get Prometheus-style metrics for monitoring
2772
+ * @param {*} [options] Override http request option.
2773
+ * @throws {RequiredError}
2774
+ */
2775
+ prometheusMetrics(options) {
2776
+ return localVarFp.prometheusMetrics(options).then((request) => request(axios, basePath));
2777
+ },
2778
+ };
2779
+ };
2780
+ /**
2781
+ * HealthApi - object-oriented interface
2782
+ */
2783
+ export class HealthApi extends BaseAPI {
2784
+ /**
2785
+ *
2786
+ * @summary Check the health status of the browser pool
2787
+ * @param {*} [options] Override http request option.
2788
+ * @throws {RequiredError}
2789
+ */
2790
+ healthCheck(options) {
2791
+ return HealthApiFp(this.configuration).healthCheck(options).then((request) => request(this.axios, this.basePath));
2792
+ }
2793
+ /**
2794
+ *
2795
+ * @summary Get Prometheus-style metrics for monitoring
2796
+ * @param {*} [options] Override http request option.
2797
+ * @throws {RequiredError}
2798
+ */
2799
+ prometheusMetrics(options) {
2800
+ return HealthApiFp(this.configuration).prometheusMetrics(options).then((request) => request(this.axios, this.basePath));
2801
+ }
2802
+ }
2803
+ /**
2804
+ * PoolApi - axios parameter creator
2805
+ */
2806
+ export const PoolApiAxiosParamCreator = function (configuration) {
2807
+ return {
2808
+ /**
2809
+ *
2810
+ * @summary Scale the browser pool to a new maximum size
2811
+ * @param {ScalePool} payload
2812
+ * @param {*} [options] Override http request option.
2813
+ * @throws {RequiredError}
2814
+ */
2815
+ scalePool: (payload_1, ...args_1) => __awaiter(this, [payload_1, ...args_1], void 0, function* (payload, options = {}) {
2816
+ // verify required parameter 'payload' is not null or undefined
2817
+ assertParamExists('scalePool', 'payload', payload);
2818
+ const localVarPath = `/pool/scale`;
2819
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2820
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2821
+ let baseOptions;
2822
+ if (configuration) {
2823
+ baseOptions = configuration.baseOptions;
2824
+ }
2825
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2826
+ const localVarHeaderParameter = {};
2827
+ const localVarQueryParameter = {};
2828
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2829
+ localVarHeaderParameter['Accept'] = 'application/json';
2830
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2831
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2832
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2833
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
2834
+ return {
2835
+ url: toPathString(localVarUrlObj),
2836
+ options: localVarRequestOptions,
2837
+ };
2838
+ }),
2839
+ /**
2840
+ *
2841
+ * @summary Gracefully shutdown the browser pool server
2842
+ * @param {*} [options] Override http request option.
2843
+ * @throws {RequiredError}
2844
+ */
2845
+ shutdownServer: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
2846
+ const localVarPath = `/pool/shutdown`;
2847
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2848
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2849
+ let baseOptions;
2850
+ if (configuration) {
2851
+ baseOptions = configuration.baseOptions;
2852
+ }
2853
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2854
+ const localVarHeaderParameter = {};
2855
+ const localVarQueryParameter = {};
2856
+ localVarHeaderParameter['Accept'] = 'application/json';
2857
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2858
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2859
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2860
+ return {
2861
+ url: toPathString(localVarUrlObj),
2862
+ options: localVarRequestOptions,
2863
+ };
2864
+ }),
2865
+ };
2866
+ };
2867
+ /**
2868
+ * PoolApi - functional programming interface
2869
+ */
2870
+ export const PoolApiFp = function (configuration) {
2871
+ const localVarAxiosParamCreator = PoolApiAxiosParamCreator(configuration);
2872
+ return {
2873
+ /**
2874
+ *
2875
+ * @summary Scale the browser pool to a new maximum size
2876
+ * @param {ScalePool} payload
2877
+ * @param {*} [options] Override http request option.
2878
+ * @throws {RequiredError}
2879
+ */
2880
+ scalePool(payload, options) {
2881
+ return __awaiter(this, void 0, void 0, function* () {
2882
+ var _a, _b, _c;
2883
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.scalePool(payload, options);
2884
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2885
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PoolApi.scalePool']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2886
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2887
+ });
2888
+ },
2889
+ /**
2890
+ *
2891
+ * @summary Gracefully shutdown the browser pool server
2892
+ * @param {*} [options] Override http request option.
2893
+ * @throws {RequiredError}
2894
+ */
2895
+ shutdownServer(options) {
2896
+ return __awaiter(this, void 0, void 0, function* () {
2897
+ var _a, _b, _c;
2898
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.shutdownServer(options);
2899
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2900
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PoolApi.shutdownServer']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2901
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2902
+ });
2903
+ },
2904
+ };
2905
+ };
2906
+ /**
2907
+ * PoolApi - factory interface
2908
+ */
2909
+ export const PoolApiFactory = function (configuration, basePath, axios) {
2910
+ const localVarFp = PoolApiFp(configuration);
2911
+ return {
2912
+ /**
2913
+ *
2914
+ * @summary Scale the browser pool to a new maximum size
2915
+ * @param {ScalePool} payload
2916
+ * @param {*} [options] Override http request option.
2917
+ * @throws {RequiredError}
2918
+ */
2919
+ scalePool(payload, options) {
2920
+ return localVarFp.scalePool(payload, options).then((request) => request(axios, basePath));
2921
+ },
2922
+ /**
2923
+ *
2924
+ * @summary Gracefully shutdown the browser pool server
2925
+ * @param {*} [options] Override http request option.
2926
+ * @throws {RequiredError}
2927
+ */
2928
+ shutdownServer(options) {
2929
+ return localVarFp.shutdownServer(options).then((request) => request(axios, basePath));
2930
+ },
2931
+ };
2932
+ };
2933
+ /**
2934
+ * PoolApi - object-oriented interface
2935
+ */
2936
+ export class PoolApi extends BaseAPI {
2937
+ /**
2938
+ *
2939
+ * @summary Scale the browser pool to a new maximum size
2940
+ * @param {ScalePool} payload
2941
+ * @param {*} [options] Override http request option.
2942
+ * @throws {RequiredError}
2943
+ */
2944
+ scalePool(payload, options) {
2945
+ return PoolApiFp(this.configuration).scalePool(payload, options).then((request) => request(this.axios, this.basePath));
2946
+ }
2947
+ /**
2948
+ *
2949
+ * @summary Gracefully shutdown the browser pool server
2950
+ * @param {*} [options] Override http request option.
2951
+ * @throws {RequiredError}
2952
+ */
2953
+ shutdownServer(options) {
2954
+ return PoolApiFp(this.configuration).shutdownServer(options).then((request) => request(this.axios, this.basePath));
2955
+ }
2956
+ }
2957
+ /**
2958
+ * ProfilesApi - axios parameter creator
2959
+ */
2960
+ export const ProfilesApiAxiosParamCreator = function (configuration) {
2961
+ return {
2962
+ /**
2963
+ *
2964
+ * @summary Create a new browser profile
2965
+ * @param {CreateProfileRequest} payload
2966
+ * @param {*} [options] Override http request option.
2967
+ * @throws {RequiredError}
2968
+ */
2969
+ createProfile: (payload_1, ...args_1) => __awaiter(this, [payload_1, ...args_1], void 0, function* (payload, options = {}) {
2970
+ // verify required parameter 'payload' is not null or undefined
2971
+ assertParamExists('createProfile', 'payload', payload);
2972
+ const localVarPath = `/profiles/`;
2973
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2974
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2975
+ let baseOptions;
2976
+ if (configuration) {
2977
+ baseOptions = configuration.baseOptions;
2978
+ }
2979
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2980
+ const localVarHeaderParameter = {};
2981
+ const localVarQueryParameter = {};
2982
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2983
+ localVarHeaderParameter['Accept'] = 'application/json';
2984
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2985
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2986
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2987
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
2988
+ return {
2989
+ url: toPathString(localVarUrlObj),
2990
+ options: localVarRequestOptions,
2991
+ };
2992
+ }),
2993
+ /**
2994
+ *
2995
+ * @summary Delete a browser profile
2996
+ * @param {string} profileName Profile name
2997
+ * @param {*} [options] Override http request option.
2998
+ * @throws {RequiredError}
2999
+ */
3000
+ deleteProfile: (profileName_1, ...args_1) => __awaiter(this, [profileName_1, ...args_1], void 0, function* (profileName, options = {}) {
3001
+ // verify required parameter 'profileName' is not null or undefined
3002
+ assertParamExists('deleteProfile', 'profileName', profileName);
3003
+ const localVarPath = `/profiles/{profile_name}`
3004
+ .replace(`{${"profile_name"}}`, encodeURIComponent(String(profileName)));
3005
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3006
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3007
+ let baseOptions;
3008
+ if (configuration) {
3009
+ baseOptions = configuration.baseOptions;
3010
+ }
3011
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
3012
+ const localVarHeaderParameter = {};
3013
+ const localVarQueryParameter = {};
3014
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3015
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3016
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3017
+ return {
3018
+ url: toPathString(localVarUrlObj),
3019
+ options: localVarRequestOptions,
3020
+ };
3021
+ }),
3022
+ /**
3023
+ *
3024
+ * @summary Get profile information
3025
+ * @param {string} profileName Profile name
3026
+ * @param {*} [options] Override http request option.
3027
+ * @throws {RequiredError}
3028
+ */
3029
+ getProfile: (profileName_1, ...args_1) => __awaiter(this, [profileName_1, ...args_1], void 0, function* (profileName, options = {}) {
3030
+ // verify required parameter 'profileName' is not null or undefined
3031
+ assertParamExists('getProfile', 'profileName', profileName);
3032
+ const localVarPath = `/profiles/{profile_name}`
3033
+ .replace(`{${"profile_name"}}`, encodeURIComponent(String(profileName)));
3034
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3035
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3036
+ let baseOptions;
3037
+ if (configuration) {
3038
+ baseOptions = configuration.baseOptions;
3039
+ }
3040
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3041
+ const localVarHeaderParameter = {};
3042
+ const localVarQueryParameter = {};
3043
+ localVarHeaderParameter['Accept'] = 'application/json';
3044
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3045
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3046
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3047
+ return {
3048
+ url: toPathString(localVarUrlObj),
3049
+ options: localVarRequestOptions,
3050
+ };
3051
+ }),
3052
+ /**
3053
+ *
3054
+ * @summary List all browser profiles
3055
+ * @param {*} [options] Override http request option.
3056
+ * @throws {RequiredError}
3057
+ */
3058
+ listProfiles: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
3059
+ const localVarPath = `/profiles/`;
3060
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3061
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3062
+ let baseOptions;
3063
+ if (configuration) {
3064
+ baseOptions = configuration.baseOptions;
3065
+ }
3066
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3067
+ const localVarHeaderParameter = {};
3068
+ const localVarQueryParameter = {};
3069
+ localVarHeaderParameter['Accept'] = 'application/json';
3070
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3071
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3072
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3073
+ return {
3074
+ url: toPathString(localVarUrlObj),
3075
+ options: localVarRequestOptions,
3076
+ };
3077
+ }),
3078
+ };
3079
+ };
3080
+ /**
3081
+ * ProfilesApi - functional programming interface
3082
+ */
3083
+ export const ProfilesApiFp = function (configuration) {
3084
+ const localVarAxiosParamCreator = ProfilesApiAxiosParamCreator(configuration);
3085
+ return {
3086
+ /**
3087
+ *
3088
+ * @summary Create a new browser profile
3089
+ * @param {CreateProfileRequest} payload
3090
+ * @param {*} [options] Override http request option.
3091
+ * @throws {RequiredError}
3092
+ */
3093
+ createProfile(payload, options) {
3094
+ return __awaiter(this, void 0, void 0, function* () {
3095
+ var _a, _b, _c;
3096
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createProfile(payload, options);
3097
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3098
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProfilesApi.createProfile']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3099
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3100
+ });
3101
+ },
3102
+ /**
3103
+ *
3104
+ * @summary Delete a browser profile
3105
+ * @param {string} profileName Profile name
3106
+ * @param {*} [options] Override http request option.
3107
+ * @throws {RequiredError}
3108
+ */
3109
+ deleteProfile(profileName, options) {
3110
+ return __awaiter(this, void 0, void 0, function* () {
3111
+ var _a, _b, _c;
3112
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteProfile(profileName, options);
3113
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3114
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProfilesApi.deleteProfile']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3115
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3116
+ });
3117
+ },
3118
+ /**
3119
+ *
3120
+ * @summary Get profile information
3121
+ * @param {string} profileName Profile name
3122
+ * @param {*} [options] Override http request option.
3123
+ * @throws {RequiredError}
3124
+ */
3125
+ getProfile(profileName, options) {
3126
+ return __awaiter(this, void 0, void 0, function* () {
3127
+ var _a, _b, _c;
3128
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getProfile(profileName, options);
3129
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3130
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProfilesApi.getProfile']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3131
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3132
+ });
3133
+ },
3134
+ /**
3135
+ *
3136
+ * @summary List all browser profiles
3137
+ * @param {*} [options] Override http request option.
3138
+ * @throws {RequiredError}
3139
+ */
3140
+ listProfiles(options) {
3141
+ return __awaiter(this, void 0, void 0, function* () {
3142
+ var _a, _b, _c;
3143
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listProfiles(options);
3144
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3145
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProfilesApi.listProfiles']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3146
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3147
+ });
3148
+ },
3149
+ };
3150
+ };
3151
+ /**
3152
+ * ProfilesApi - factory interface
3153
+ */
3154
+ export const ProfilesApiFactory = function (configuration, basePath, axios) {
3155
+ const localVarFp = ProfilesApiFp(configuration);
3156
+ return {
3157
+ /**
3158
+ *
3159
+ * @summary Create a new browser profile
3160
+ * @param {CreateProfileRequest} payload
3161
+ * @param {*} [options] Override http request option.
3162
+ * @throws {RequiredError}
3163
+ */
3164
+ createProfile(payload, options) {
3165
+ return localVarFp.createProfile(payload, options).then((request) => request(axios, basePath));
3166
+ },
3167
+ /**
3168
+ *
3169
+ * @summary Delete a browser profile
3170
+ * @param {string} profileName Profile name
3171
+ * @param {*} [options] Override http request option.
3172
+ * @throws {RequiredError}
3173
+ */
3174
+ deleteProfile(profileName, options) {
3175
+ return localVarFp.deleteProfile(profileName, options).then((request) => request(axios, basePath));
3176
+ },
3177
+ /**
3178
+ *
3179
+ * @summary Get profile information
3180
+ * @param {string} profileName Profile name
3181
+ * @param {*} [options] Override http request option.
3182
+ * @throws {RequiredError}
3183
+ */
3184
+ getProfile(profileName, options) {
3185
+ return localVarFp.getProfile(profileName, options).then((request) => request(axios, basePath));
3186
+ },
3187
+ /**
3188
+ *
3189
+ * @summary List all browser profiles
3190
+ * @param {*} [options] Override http request option.
3191
+ * @throws {RequiredError}
3192
+ */
3193
+ listProfiles(options) {
3194
+ return localVarFp.listProfiles(options).then((request) => request(axios, basePath));
3195
+ },
3196
+ };
3197
+ };
3198
+ /**
3199
+ * ProfilesApi - object-oriented interface
3200
+ */
3201
+ export class ProfilesApi extends BaseAPI {
3202
+ /**
3203
+ *
3204
+ * @summary Create a new browser profile
3205
+ * @param {CreateProfileRequest} payload
3206
+ * @param {*} [options] Override http request option.
3207
+ * @throws {RequiredError}
3208
+ */
3209
+ createProfile(payload, options) {
3210
+ return ProfilesApiFp(this.configuration).createProfile(payload, options).then((request) => request(this.axios, this.basePath));
3211
+ }
3212
+ /**
3213
+ *
3214
+ * @summary Delete a browser profile
3215
+ * @param {string} profileName Profile name
3216
+ * @param {*} [options] Override http request option.
3217
+ * @throws {RequiredError}
3218
+ */
3219
+ deleteProfile(profileName, options) {
3220
+ return ProfilesApiFp(this.configuration).deleteProfile(profileName, options).then((request) => request(this.axios, this.basePath));
3221
+ }
3222
+ /**
3223
+ *
3224
+ * @summary Get profile information
3225
+ * @param {string} profileName Profile name
3226
+ * @param {*} [options] Override http request option.
3227
+ * @throws {RequiredError}
3228
+ */
3229
+ getProfile(profileName, options) {
3230
+ return ProfilesApiFp(this.configuration).getProfile(profileName, options).then((request) => request(this.axios, this.basePath));
3231
+ }
3232
+ /**
3233
+ *
3234
+ * @summary List all browser profiles
3235
+ * @param {*} [options] Override http request option.
3236
+ * @throws {RequiredError}
3237
+ */
3238
+ listProfiles(options) {
3239
+ return ProfilesApiFp(this.configuration).listProfiles(options).then((request) => request(this.axios, this.basePath));
3240
+ }
3241
+ }