webdriver-bidi-protocol 0.3.11 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.1](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.4.0...webdriver-bidi-protocol-v0.4.1) (2026-02-11)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * re-generate types based on spec updates ([#323](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/323)) ([ea25193](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/ea25193553542688555e820afa255c7cccaf8802))
9
+
10
+ ## [0.4.0](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.3.11...webdriver-bidi-protocol-v0.4.0) (2026-01-20)
11
+
12
+
13
+ ### Features
14
+
15
+ * add `ua-client-hints` spec support ([#313](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/313)) ([85b944b](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/85b944bc24f1408b5f9bad655898e0f7c00fe9da))
16
+
3
17
  ## [0.3.11](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.3.10...webdriver-bidi-protocol-v0.3.11) (2026-01-13)
4
18
 
5
19
 
@@ -1,6 +1,7 @@
1
1
  import type * as Bidi from './main.js';
2
2
  import type * as BidiPermissions from './permissions.js';
3
3
  import type * as BidiBluetooth from './web-bluetooth.js';
4
+ import type * as BidiUaClientHints from './ua-client-hints.js';
4
5
  export interface Commands {
5
6
  'bluetooth.disableSimulation': {
6
7
  params: BidiBluetooth.Bluetooth.DisableSimulationParameters;
@@ -290,6 +291,14 @@ export interface Commands {
290
291
  params: Bidi.Storage.SetCookieParameters;
291
292
  returnType: Bidi.Storage.SetCookieResult;
292
293
  };
294
+ 'userAgentClientHints.setClientHintsOverride': {
295
+ params: {
296
+ clientHints: BidiUaClientHints.UserAgentClientHints.ClientHintsMetadata | null;
297
+ contexts?: [string, ...string[]];
298
+ userContexts?: [string, ...string[]];
299
+ };
300
+ returnType: BidiUaClientHints.UserAgentClientHints.SetClientHintsOverrideResult;
301
+ };
293
302
  'webExtension.install': {
294
303
  params: Bidi.WebExtension.InstallParameters;
295
304
  returnType: Bidi.WebExtension.InstallResult;
@@ -0,0 +1,35 @@
1
+ export type UserAgentClientHintsCommand =
2
+ UserAgentClientHints.SetClientHintsOverrideCommand;
3
+ export declare namespace UserAgentClientHints {
4
+ type SetClientHintsOverrideCommand = {
5
+ method: 'userAgentClientHints.setClientHintsOverride';
6
+ params: {
7
+ clientHints: UserAgentClientHints.ClientHintsMetadata | null;
8
+ contexts?: [string, ...string[]];
9
+ userContexts?: [string, ...string[]];
10
+ };
11
+ };
12
+ }
13
+ export declare namespace UserAgentClientHints {
14
+ type ClientHintsMetadata = {
15
+ brands?: [...UserAgentClientHints.BrandVersion[]];
16
+ fullVersionList?: [...UserAgentClientHints.BrandVersion[]];
17
+ platform?: string;
18
+ platformVersion?: string;
19
+ architecture?: string;
20
+ model?: string;
21
+ mobile?: boolean;
22
+ bitness?: string;
23
+ wow64?: boolean;
24
+ formFactors?: [...string[]];
25
+ };
26
+ }
27
+ export declare namespace UserAgentClientHints {
28
+ type BrandVersion = {
29
+ brand: string;
30
+ version: string;
31
+ };
32
+ }
33
+ export declare namespace UserAgentClientHints {
34
+ type SetClientHintsOverrideResult = Record<string, never>;
35
+ }
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', {value: true});
package/out/index.d.ts CHANGED
@@ -6,9 +6,12 @@
6
6
  import * as Bidi from './gen/main.js';
7
7
  import * as BidiPermissions from './gen/permissions.js';
8
8
  import * as BidiBluetooth from './gen/web-bluetooth.js';
9
+ import * as BidiUaClientHints from './gen/ua-client-hints.js';
9
10
  export * from './gen/main.js';
10
11
  export * from './gen/permissions.js';
11
12
  export * from './gen/web-bluetooth.js';
13
+ export {UserAgentClientHintsCommand} from './gen/ua-client-hints.js';
14
+ export {BidiUaClientHints};
12
15
  export * from './gen/mapping.js';
13
16
  type ExternalSpecCommand<T> = {
14
17
  id: Bidi.JsUint;
@@ -17,7 +20,8 @@ export type Result = Bidi.ResultData;
17
20
  export type Command =
18
21
  | Bidi.Command
19
22
  | ExternalSpecCommand<BidiPermissions.PermissionsCommand>
20
- | ExternalSpecCommand<BidiBluetooth.BluetoothCommand>;
23
+ | ExternalSpecCommand<BidiBluetooth.BluetoothCommand>
24
+ | ExternalSpecCommand<BidiUaClientHints.UserAgentClientHintsCommand>;
21
25
  type ExternalSpecEvent<T> = {
22
26
  type: 'event';
23
27
  } & T &
package/out/index.js CHANGED
@@ -27,6 +27,39 @@ var __createBinding =
27
27
  if (k2 === undefined) k2 = k;
28
28
  o[k2] = m[k];
29
29
  });
30
+ var __setModuleDefault =
31
+ (this && this.__setModuleDefault) ||
32
+ (Object.create
33
+ ? function (o, v) {
34
+ Object.defineProperty(o, 'default', {enumerable: true, value: v});
35
+ }
36
+ : function (o, v) {
37
+ o['default'] = v;
38
+ });
39
+ var __importStar =
40
+ (this && this.__importStar) ||
41
+ (function () {
42
+ var ownKeys = function (o) {
43
+ ownKeys =
44
+ Object.getOwnPropertyNames ||
45
+ function (o) {
46
+ var ar = [];
47
+ for (var k in o)
48
+ if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
49
+ return ar;
50
+ };
51
+ return ownKeys(o);
52
+ };
53
+ return function (mod) {
54
+ if (mod && mod.__esModule) return mod;
55
+ var result = {};
56
+ if (mod != null)
57
+ for (var k = ownKeys(mod), i = 0; i < k.length; i++)
58
+ if (k[i] !== 'default') __createBinding(result, mod, k[i]);
59
+ __setModuleDefault(result, mod);
60
+ return result;
61
+ };
62
+ })();
30
63
  var __exportStar =
31
64
  (this && this.__exportStar) ||
32
65
  function (m, exports) {
@@ -35,6 +68,9 @@ var __exportStar =
35
68
  __createBinding(exports, m, p);
36
69
  };
37
70
  Object.defineProperty(exports, '__esModule', {value: true});
71
+ exports.BidiUaClientHints = void 0;
72
+ const BidiUaClientHints = __importStar(require('./gen/ua-client-hints.js'));
73
+ exports.BidiUaClientHints = BidiUaClientHints;
38
74
  __exportStar(require('./gen/main.js'), exports);
39
75
  __exportStar(require('./gen/permissions.js'), exports);
40
76
  __exportStar(require('./gen/web-bluetooth.js'), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webdriver-bidi-protocol",
3
- "version": "0.3.11",
3
+ "version": "0.4.1",
4
4
  "description": "",
5
5
  "main": "out/index.js",
6
6
  "types": "out/index.d.ts",
@@ -27,7 +27,7 @@
27
27
  "devDependencies": {
28
28
  "@types/node": "^25.0.2",
29
29
  "parse5": "^8.0.0",
30
- "prettier": "3.7.4",
30
+ "prettier": "3.8.1",
31
31
  "tsd": "0.33.0",
32
32
  "typescript": "5.9.3",
33
33
  "ts-morph": "27.0.2"
@@ -1,6 +1,7 @@
1
1
  import type * as Bidi from './main.js';
2
2
  import type * as BidiPermissions from './permissions.js';
3
3
  import type * as BidiBluetooth from './web-bluetooth.js';
4
+ import type * as BidiUaClientHints from './ua-client-hints.js';
4
5
 
5
6
  export interface Commands {
6
7
  'bluetooth.disableSimulation': {
@@ -291,6 +292,14 @@ export interface Commands {
291
292
  params: Bidi.Storage.SetCookieParameters;
292
293
  returnType: Bidi.Storage.SetCookieResult;
293
294
  };
295
+ 'userAgentClientHints.setClientHintsOverride': {
296
+ params: {
297
+ clientHints: BidiUaClientHints.UserAgentClientHints.ClientHintsMetadata | null;
298
+ contexts?: [string, ...string[]];
299
+ userContexts?: [string, ...string[]];
300
+ };
301
+ returnType: BidiUaClientHints.UserAgentClientHints.SetClientHintsOverrideResult;
302
+ };
294
303
  'webExtension.install': {
295
304
  params: Bidi.WebExtension.InstallParameters;
296
305
  returnType: Bidi.WebExtension.InstallResult;
@@ -0,0 +1,35 @@
1
+ export type UserAgentClientHintsCommand =
2
+ UserAgentClientHints.SetClientHintsOverrideCommand;
3
+ export namespace UserAgentClientHints {
4
+ export type SetClientHintsOverrideCommand = {
5
+ method: 'userAgentClientHints.setClientHintsOverride';
6
+ params: {
7
+ clientHints: UserAgentClientHints.ClientHintsMetadata | null;
8
+ contexts?: [string, ...string[]];
9
+ userContexts?: [string, ...string[]];
10
+ };
11
+ };
12
+ }
13
+ export namespace UserAgentClientHints {
14
+ export type ClientHintsMetadata = {
15
+ brands?: [...UserAgentClientHints.BrandVersion[]];
16
+ fullVersionList?: [...UserAgentClientHints.BrandVersion[]];
17
+ platform?: string;
18
+ platformVersion?: string;
19
+ architecture?: string;
20
+ model?: string;
21
+ mobile?: boolean;
22
+ bitness?: string;
23
+ wow64?: boolean;
24
+ formFactors?: [...string[]];
25
+ };
26
+ }
27
+ export namespace UserAgentClientHints {
28
+ export type BrandVersion = {
29
+ brand: string;
30
+ version: string;
31
+ };
32
+ }
33
+ export namespace UserAgentClientHints {
34
+ export type SetClientHintsOverrideResult = Record<string, never>;
35
+ }
package/src/index.ts CHANGED
@@ -7,10 +7,16 @@
7
7
  import * as Bidi from './gen/main.js';
8
8
  import * as BidiPermissions from './gen/permissions.js';
9
9
  import * as BidiBluetooth from './gen/web-bluetooth.js';
10
+ import * as BidiUaClientHints from './gen/ua-client-hints.js';
10
11
 
11
12
  export * from './gen/main.js';
12
13
  export * from './gen/permissions.js';
13
14
  export * from './gen/web-bluetooth.js';
15
+ // Only `UserAgentClientHintsCommand` is exported, because the UA-CH extends
16
+ // the `emulation` WebDriver BiDi domain and exposes `Emulation` namespace
17
+ // which is already exported by main spec.
18
+ export {UserAgentClientHintsCommand} from './gen/ua-client-hints.js';
19
+ export {BidiUaClientHints};
14
20
 
15
21
  export * from './gen/mapping.js';
16
22
 
@@ -25,7 +31,8 @@ export type Result = Bidi.ResultData;
25
31
  export type Command =
26
32
  | Bidi.Command
27
33
  | ExternalSpecCommand<BidiPermissions.PermissionsCommand>
28
- | ExternalSpecCommand<BidiBluetooth.BluetoothCommand>;
34
+ | ExternalSpecCommand<BidiBluetooth.BluetoothCommand>
35
+ | ExternalSpecCommand<BidiUaClientHints.UserAgentClientHintsCommand>;
29
36
 
30
37
  type ExternalSpecEvent<T> = {
31
38
  // type is defined by the main WebDriver BiDi spec and extension specs do