airbrowser-client 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## airbrowser-client@1.7.0
1
+ ## airbrowser-client@1.8.0
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install airbrowser-client@1.7.0 --save
39
+ npm install airbrowser-client@1.8.0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -62,6 +62,7 @@ Class | Method | HTTP request | Description
62
62
  *BrowserApi* | [**emulate**](docs/BrowserApi.md#emulate) | **POST** /browser/{browser_id}/emulate | Emulation: set, clear, list_devices
63
63
  *BrowserApi* | [**executeScript**](docs/BrowserApi.md#executescript) | **POST** /browser/{browser_id}/execute_script | Execute JavaScript
64
64
  *BrowserApi* | [**fillForm**](docs/BrowserApi.md#fillform) | **POST** /browser/{browser_id}/fill_form | Fill multiple form fields
65
+ *BrowserApi* | [**getCdpEndpoint**](docs/BrowserApi.md#getcdpendpoint) | **GET** /browser/{browser_id}/get_cdp_endpoint | Get Chrome DevTools Protocol WebSocket URL for direct CDP access
65
66
  *BrowserApi* | [**getContent**](docs/BrowserApi.md#getcontent) | **GET** /browser/{browser_id}/get_content | Get page HTML
66
67
  *BrowserApi* | [**getElementData**](docs/BrowserApi.md#getelementdata) | **GET** /browser/{browser_id}/get_element_data | Get element text, attribute, or property
67
68
  *BrowserApi* | [**getUrl**](docs/BrowserApi.md#geturl) | **GET** /browser/{browser_id}/get_url | Get current URL
package/api.ts CHANGED
@@ -1053,6 +1053,40 @@ export const BrowserApiAxiosParamCreator = function (configuration?: Configurati
1053
1053
  options: localVarRequestOptions,
1054
1054
  };
1055
1055
  },
1056
+ /**
1057
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
1058
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
1059
+ * @param {string} browserId
1060
+ * @param {*} [options] Override http request option.
1061
+ * @throws {RequiredError}
1062
+ */
1063
+ getCdpEndpoint: async (browserId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1064
+ // verify required parameter 'browserId' is not null or undefined
1065
+ assertParamExists('getCdpEndpoint', 'browserId', browserId)
1066
+ const localVarPath = `/browser/{browser_id}/get_cdp_endpoint`
1067
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
1068
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1069
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1070
+ let baseOptions;
1071
+ if (configuration) {
1072
+ baseOptions = configuration.baseOptions;
1073
+ }
1074
+
1075
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1076
+ const localVarHeaderParameter = {} as any;
1077
+ const localVarQueryParameter = {} as any;
1078
+
1079
+ localVarHeaderParameter['Accept'] = 'application/json';
1080
+
1081
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1082
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1083
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1084
+
1085
+ return {
1086
+ url: toPathString(localVarUrlObj),
1087
+ options: localVarRequestOptions,
1088
+ };
1089
+ },
1056
1090
  /**
1057
1091
  *
1058
1092
  * @summary Get page HTML
@@ -2116,6 +2150,19 @@ export const BrowserApiFp = function(configuration?: Configuration) {
2116
2150
  const localVarOperationServerBasePath = operationServerMap['BrowserApi.fillForm']?.[localVarOperationServerIndex]?.url;
2117
2151
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2118
2152
  },
2153
+ /**
2154
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
2155
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
2156
+ * @param {string} browserId
2157
+ * @param {*} [options] Override http request option.
2158
+ * @throws {RequiredError}
2159
+ */
2160
+ async getCdpEndpoint(browserId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenericResponse>> {
2161
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCdpEndpoint(browserId, options);
2162
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2163
+ const localVarOperationServerBasePath = operationServerMap['BrowserApi.getCdpEndpoint']?.[localVarOperationServerIndex]?.url;
2164
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2165
+ },
2119
2166
  /**
2120
2167
  *
2121
2168
  * @summary Get page HTML
@@ -2567,6 +2614,16 @@ export const BrowserApiFactory = function (configuration?: Configuration, basePa
2567
2614
  fillForm(browserId: string, payload: FillFormRequest, options?: RawAxiosRequestConfig): AxiosPromise<GenericResponse> {
2568
2615
  return localVarFp.fillForm(browserId, payload, options).then((request) => request(axios, basePath));
2569
2616
  },
2617
+ /**
2618
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
2619
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
2620
+ * @param {string} browserId
2621
+ * @param {*} [options] Override http request option.
2622
+ * @throws {RequiredError}
2623
+ */
2624
+ getCdpEndpoint(browserId: string, options?: RawAxiosRequestConfig): AxiosPromise<GenericResponse> {
2625
+ return localVarFp.getCdpEndpoint(browserId, options).then((request) => request(axios, basePath));
2626
+ },
2570
2627
  /**
2571
2628
  *
2572
2629
  * @summary Get page HTML
@@ -2958,6 +3015,17 @@ export class BrowserApi extends BaseAPI {
2958
3015
  return BrowserApiFp(this.configuration).fillForm(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2959
3016
  }
2960
3017
 
3018
+ /**
3019
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
3020
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
3021
+ * @param {string} browserId
3022
+ * @param {*} [options] Override http request option.
3023
+ * @throws {RequiredError}
3024
+ */
3025
+ public getCdpEndpoint(browserId: string, options?: RawAxiosRequestConfig) {
3026
+ return BrowserApiFp(this.configuration).getCdpEndpoint(browserId, options).then((request) => request(this.axios, this.basePath));
3027
+ }
3028
+
2961
3029
  /**
2962
3030
  *
2963
3031
  * @summary Get page HTML
package/dist/api.d.ts CHANGED
@@ -709,6 +709,14 @@ export declare const BrowserApiAxiosParamCreator: (configuration?: Configuration
709
709
  * @throws {RequiredError}
710
710
  */
711
711
  fillForm: (browserId: string, payload: FillFormRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
712
+ /**
713
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
714
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
715
+ * @param {string} browserId
716
+ * @param {*} [options] Override http request option.
717
+ * @throws {RequiredError}
718
+ */
719
+ getCdpEndpoint: (browserId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
712
720
  /**
713
721
  *
714
722
  * @summary Get page HTML
@@ -1019,6 +1027,14 @@ export declare const BrowserApiFp: (configuration?: Configuration) => {
1019
1027
  * @throws {RequiredError}
1020
1028
  */
1021
1029
  fillForm(browserId: string, payload: FillFormRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenericResponse>>;
1030
+ /**
1031
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
1032
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
1033
+ * @param {string} browserId
1034
+ * @param {*} [options] Override http request option.
1035
+ * @throws {RequiredError}
1036
+ */
1037
+ getCdpEndpoint(browserId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenericResponse>>;
1022
1038
  /**
1023
1039
  *
1024
1040
  * @summary Get page HTML
@@ -1329,6 +1345,14 @@ export declare const BrowserApiFactory: (configuration?: Configuration, basePath
1329
1345
  * @throws {RequiredError}
1330
1346
  */
1331
1347
  fillForm(browserId: string, payload: FillFormRequest, options?: RawAxiosRequestConfig): AxiosPromise<GenericResponse>;
1348
+ /**
1349
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
1350
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
1351
+ * @param {string} browserId
1352
+ * @param {*} [options] Override http request option.
1353
+ * @throws {RequiredError}
1354
+ */
1355
+ getCdpEndpoint(browserId: string, options?: RawAxiosRequestConfig): AxiosPromise<GenericResponse>;
1332
1356
  /**
1333
1357
  *
1334
1358
  * @summary Get page HTML
@@ -1639,6 +1663,14 @@ export declare class BrowserApi extends BaseAPI {
1639
1663
  * @throws {RequiredError}
1640
1664
  */
1641
1665
  fillForm(browserId: string, payload: FillFormRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GenericResponse, any, {}>>;
1666
+ /**
1667
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
1668
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
1669
+ * @param {string} browserId
1670
+ * @param {*} [options] Override http request option.
1671
+ * @throws {RequiredError}
1672
+ */
1673
+ getCdpEndpoint(browserId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GenericResponse, any, {}>>;
1642
1674
  /**
1643
1675
  *
1644
1676
  * @summary Get page HTML
package/dist/api.js CHANGED
@@ -417,6 +417,36 @@ const BrowserApiAxiosParamCreator = function (configuration) {
417
417
  options: localVarRequestOptions,
418
418
  };
419
419
  }),
420
+ /**
421
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
422
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
423
+ * @param {string} browserId
424
+ * @param {*} [options] Override http request option.
425
+ * @throws {RequiredError}
426
+ */
427
+ getCdpEndpoint: (browserId_1, ...args_1) => __awaiter(this, [browserId_1, ...args_1], void 0, function* (browserId, options = {}) {
428
+ // verify required parameter 'browserId' is not null or undefined
429
+ (0, common_1.assertParamExists)('getCdpEndpoint', 'browserId', browserId);
430
+ const localVarPath = `/browser/{browser_id}/get_cdp_endpoint`
431
+ .replace(`{${"browser_id"}}`, encodeURIComponent(String(browserId)));
432
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
433
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
434
+ let baseOptions;
435
+ if (configuration) {
436
+ baseOptions = configuration.baseOptions;
437
+ }
438
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
439
+ const localVarHeaderParameter = {};
440
+ const localVarQueryParameter = {};
441
+ localVarHeaderParameter['Accept'] = 'application/json';
442
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
443
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
444
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
445
+ return {
446
+ url: (0, common_1.toPathString)(localVarUrlObj),
447
+ options: localVarRequestOptions,
448
+ };
449
+ }),
420
450
  /**
421
451
  *
422
452
  * @summary Get page HTML
@@ -1417,6 +1447,22 @@ const BrowserApiFp = function (configuration) {
1417
1447
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1418
1448
  });
1419
1449
  },
1450
+ /**
1451
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
1452
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
1453
+ * @param {string} browserId
1454
+ * @param {*} [options] Override http request option.
1455
+ * @throws {RequiredError}
1456
+ */
1457
+ getCdpEndpoint(browserId, options) {
1458
+ return __awaiter(this, void 0, void 0, function* () {
1459
+ var _a, _b, _c;
1460
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCdpEndpoint(browserId, 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 = base_1.operationServerMap['BrowserApi.getCdpEndpoint']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1463
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1464
+ });
1465
+ },
1420
1466
  /**
1421
1467
  *
1422
1468
  * @summary Get page HTML
@@ -1937,6 +1983,16 @@ const BrowserApiFactory = function (configuration, basePath, axios) {
1937
1983
  fillForm(browserId, payload, options) {
1938
1984
  return localVarFp.fillForm(browserId, payload, options).then((request) => request(axios, basePath));
1939
1985
  },
1986
+ /**
1987
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
1988
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
1989
+ * @param {string} browserId
1990
+ * @param {*} [options] Override http request option.
1991
+ * @throws {RequiredError}
1992
+ */
1993
+ getCdpEndpoint(browserId, options) {
1994
+ return localVarFp.getCdpEndpoint(browserId, options).then((request) => request(axios, basePath));
1995
+ },
1940
1996
  /**
1941
1997
  *
1942
1998
  * @summary Get page HTML
@@ -2317,6 +2373,16 @@ class BrowserApi extends base_1.BaseAPI {
2317
2373
  fillForm(browserId, payload, options) {
2318
2374
  return (0, exports.BrowserApiFp)(this.configuration).fillForm(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2319
2375
  }
2376
+ /**
2377
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
2378
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
2379
+ * @param {string} browserId
2380
+ * @param {*} [options] Override http request option.
2381
+ * @throws {RequiredError}
2382
+ */
2383
+ getCdpEndpoint(browserId, options) {
2384
+ return (0, exports.BrowserApiFp)(this.configuration).getCdpEndpoint(browserId, options).then((request) => request(this.axios, this.basePath));
2385
+ }
2320
2386
  /**
2321
2387
  *
2322
2388
  * @summary Get page HTML
package/dist/esm/api.d.ts CHANGED
@@ -709,6 +709,14 @@ export declare const BrowserApiAxiosParamCreator: (configuration?: Configuration
709
709
  * @throws {RequiredError}
710
710
  */
711
711
  fillForm: (browserId: string, payload: FillFormRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
712
+ /**
713
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
714
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
715
+ * @param {string} browserId
716
+ * @param {*} [options] Override http request option.
717
+ * @throws {RequiredError}
718
+ */
719
+ getCdpEndpoint: (browserId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
712
720
  /**
713
721
  *
714
722
  * @summary Get page HTML
@@ -1019,6 +1027,14 @@ export declare const BrowserApiFp: (configuration?: Configuration) => {
1019
1027
  * @throws {RequiredError}
1020
1028
  */
1021
1029
  fillForm(browserId: string, payload: FillFormRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenericResponse>>;
1030
+ /**
1031
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
1032
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
1033
+ * @param {string} browserId
1034
+ * @param {*} [options] Override http request option.
1035
+ * @throws {RequiredError}
1036
+ */
1037
+ getCdpEndpoint(browserId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenericResponse>>;
1022
1038
  /**
1023
1039
  *
1024
1040
  * @summary Get page HTML
@@ -1329,6 +1345,14 @@ export declare const BrowserApiFactory: (configuration?: Configuration, basePath
1329
1345
  * @throws {RequiredError}
1330
1346
  */
1331
1347
  fillForm(browserId: string, payload: FillFormRequest, options?: RawAxiosRequestConfig): AxiosPromise<GenericResponse>;
1348
+ /**
1349
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
1350
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
1351
+ * @param {string} browserId
1352
+ * @param {*} [options] Override http request option.
1353
+ * @throws {RequiredError}
1354
+ */
1355
+ getCdpEndpoint(browserId: string, options?: RawAxiosRequestConfig): AxiosPromise<GenericResponse>;
1332
1356
  /**
1333
1357
  *
1334
1358
  * @summary Get page HTML
@@ -1639,6 +1663,14 @@ export declare class BrowserApi extends BaseAPI {
1639
1663
  * @throws {RequiredError}
1640
1664
  */
1641
1665
  fillForm(browserId: string, payload: FillFormRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GenericResponse, any, {}>>;
1666
+ /**
1667
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
1668
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
1669
+ * @param {string} browserId
1670
+ * @param {*} [options] Override http request option.
1671
+ * @throws {RequiredError}
1672
+ */
1673
+ getCdpEndpoint(browserId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GenericResponse, any, {}>>;
1642
1674
  /**
1643
1675
  *
1644
1676
  * @summary Get page HTML
package/dist/esm/api.js CHANGED
@@ -414,6 +414,36 @@ export const BrowserApiAxiosParamCreator = function (configuration) {
414
414
  options: localVarRequestOptions,
415
415
  };
416
416
  }),
417
+ /**
418
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
419
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
420
+ * @param {string} browserId
421
+ * @param {*} [options] Override http request option.
422
+ * @throws {RequiredError}
423
+ */
424
+ getCdpEndpoint: (browserId_1, ...args_1) => __awaiter(this, [browserId_1, ...args_1], void 0, function* (browserId, options = {}) {
425
+ // verify required parameter 'browserId' is not null or undefined
426
+ assertParamExists('getCdpEndpoint', 'browserId', browserId);
427
+ const localVarPath = `/browser/{browser_id}/get_cdp_endpoint`
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: 'GET' }, baseOptions), options);
436
+ const localVarHeaderParameter = {};
437
+ const localVarQueryParameter = {};
438
+ localVarHeaderParameter['Accept'] = 'application/json';
439
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
440
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
441
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
442
+ return {
443
+ url: toPathString(localVarUrlObj),
444
+ options: localVarRequestOptions,
445
+ };
446
+ }),
417
447
  /**
418
448
  *
419
449
  * @summary Get page HTML
@@ -1413,6 +1443,22 @@ export const BrowserApiFp = function (configuration) {
1413
1443
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1414
1444
  });
1415
1445
  },
1446
+ /**
1447
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
1448
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
1449
+ * @param {string} browserId
1450
+ * @param {*} [options] Override http request option.
1451
+ * @throws {RequiredError}
1452
+ */
1453
+ getCdpEndpoint(browserId, options) {
1454
+ return __awaiter(this, void 0, void 0, function* () {
1455
+ var _a, _b, _c;
1456
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCdpEndpoint(browserId, options);
1457
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1458
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BrowserApi.getCdpEndpoint']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1459
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1460
+ });
1461
+ },
1416
1462
  /**
1417
1463
  *
1418
1464
  * @summary Get page HTML
@@ -1932,6 +1978,16 @@ export const BrowserApiFactory = function (configuration, basePath, axios) {
1932
1978
  fillForm(browserId, payload, options) {
1933
1979
  return localVarFp.fillForm(browserId, payload, options).then((request) => request(axios, basePath));
1934
1980
  },
1981
+ /**
1982
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
1983
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
1984
+ * @param {string} browserId
1985
+ * @param {*} [options] Override http request option.
1986
+ * @throws {RequiredError}
1987
+ */
1988
+ getCdpEndpoint(browserId, options) {
1989
+ return localVarFp.getCdpEndpoint(browserId, options).then((request) => request(axios, basePath));
1990
+ },
1935
1991
  /**
1936
1992
  *
1937
1993
  * @summary Get page HTML
@@ -2311,6 +2367,16 @@ export class BrowserApi extends BaseAPI {
2311
2367
  fillForm(browserId, payload, options) {
2312
2368
  return BrowserApiFp(this.configuration).fillForm(browserId, payload, options).then((request) => request(this.axios, this.basePath));
2313
2369
  }
2370
+ /**
2371
+ * Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
2372
+ * @summary Get Chrome DevTools Protocol WebSocket URL for direct CDP access
2373
+ * @param {string} browserId
2374
+ * @param {*} [options] Override http request option.
2375
+ * @throws {RequiredError}
2376
+ */
2377
+ getCdpEndpoint(browserId, options) {
2378
+ return BrowserApiFp(this.configuration).getCdpEndpoint(browserId, options).then((request) => request(this.axios, this.basePath));
2379
+ }
2314
2380
  /**
2315
2381
  *
2316
2382
  * @summary Get page HTML
@@ -15,6 +15,7 @@ All URIs are relative to */api/v1*
15
15
  |[**emulate**](#emulate) | **POST** /browser/{browser_id}/emulate | Emulation: set, clear, list_devices|
16
16
  |[**executeScript**](#executescript) | **POST** /browser/{browser_id}/execute_script | Execute JavaScript|
17
17
  |[**fillForm**](#fillform) | **POST** /browser/{browser_id}/fill_form | Fill multiple form fields|
18
+ |[**getCdpEndpoint**](#getcdpendpoint) | **GET** /browser/{browser_id}/get_cdp_endpoint | Get Chrome DevTools Protocol WebSocket URL for direct CDP access|
18
19
  |[**getContent**](#getcontent) | **GET** /browser/{browser_id}/get_content | Get page HTML|
19
20
  |[**getElementData**](#getelementdata) | **GET** /browser/{browser_id}/get_element_data | Get element text, attribute, or property|
20
21
  |[**getUrl**](#geturl) | **GET** /browser/{browser_id}/get_url | Get current URL|
@@ -623,6 +624,57 @@ No authorization required
623
624
  - **Accept**: application/json
624
625
 
625
626
 
627
+ ### HTTP response details
628
+ | Status code | Description | Response headers |
629
+ |-------------|-------------|------------------|
630
+ |**200** | Success | - |
631
+
632
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
633
+
634
+ # **getCdpEndpoint**
635
+ > GenericResponse getCdpEndpoint()
636
+
637
+ Returns the WebSocket URL that external tools (Playwright, Puppeteer, etc.) can use to connect directly to Chrome\'s DevTools Protocol for advanced automation like network interception, performance profiling, or custom CDP commands. The returned URL format: ws://host:port/devtools/browser/{guid} Note: The URL uses the container\'s internal address. For external access, ensure the CDP port is exposed and use the appropriate host address.
638
+
639
+ ### Example
640
+
641
+ ```typescript
642
+ import {
643
+ BrowserApi,
644
+ Configuration
645
+ } from 'airbrowser-client';
646
+
647
+ const configuration = new Configuration();
648
+ const apiInstance = new BrowserApi(configuration);
649
+
650
+ let browserId: string; // (default to undefined)
651
+
652
+ const { status, data } = await apiInstance.getCdpEndpoint(
653
+ browserId
654
+ );
655
+ ```
656
+
657
+ ### Parameters
658
+
659
+ |Name | Type | Description | Notes|
660
+ |------------- | ------------- | ------------- | -------------|
661
+ | **browserId** | [**string**] | | defaults to undefined|
662
+
663
+
664
+ ### Return type
665
+
666
+ **GenericResponse**
667
+
668
+ ### Authorization
669
+
670
+ No authorization required
671
+
672
+ ### HTTP request headers
673
+
674
+ - **Content-Type**: Not defined
675
+ - **Accept**: application/json
676
+
677
+
626
678
  ### HTTP response details
627
679
  | Status code | Description | Response headers |
628
680
  |-------------|-------------|------------------|
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "airbrowser-client",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "OpenAPI client for airbrowser-client",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {