webdriver-bidi-protocol 0.2.10 → 0.3.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/.github/workflows/ci.yml +5 -0
- package/.github/workflows/publish.yml +1 -1
- package/.github/workflows/regenerate.yml +6 -0
- package/.nvmrc +1 -0
- package/.prettierrc.cjs +6 -1
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +21 -0
- package/out/gen/main.d.ts +18 -1
- package/out/gen/mapping.d.ts +285 -0
- package/out/gen/mapping.js +2 -0
- package/out/index.d.ts +6 -256
- package/package.json +3 -3
- package/src/gen/main.ts +18 -1
- package/src/gen/mapping.ts +286 -0
- package/src/index.ts +9 -269
- package/test-d/webdriver-bidi-protocol.test-d.ts +4 -4
- package/tools/build.sh +4 -1
- package/tools/generateCommandMap.ts +147 -0
- package/tools/utils.ts +54 -0
- package/tsconfig.json +10 -105
package/.github/workflows/ci.yml
CHANGED
|
@@ -24,6 +24,11 @@ jobs:
|
|
|
24
24
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
25
25
|
with:
|
|
26
26
|
fetch-depth: 2
|
|
27
|
+
- name: Set up Node.js
|
|
28
|
+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
|
29
|
+
with:
|
|
30
|
+
cache: npm
|
|
31
|
+
node-version-file: '.nvmrc'
|
|
27
32
|
- name: Install cddlconv
|
|
28
33
|
run: cargo install cddlconv@0.1.7
|
|
29
34
|
- name: Install dependencies
|
|
@@ -22,6 +22,12 @@ jobs:
|
|
|
22
22
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
23
23
|
with:
|
|
24
24
|
fetch-depth: 2
|
|
25
|
+
|
|
26
|
+
- name: Set up Node.js
|
|
27
|
+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
|
28
|
+
with:
|
|
29
|
+
cache: npm
|
|
30
|
+
node-version-file: '.nvmrc'
|
|
25
31
|
- name: Install cddlconv
|
|
26
32
|
run: cargo install cddlconv@0.1.7
|
|
27
33
|
- name: Install dependencies
|
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v24
|
package/.prettierrc.cjs
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.0](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.11...webdriver-bidi-protocol-v0.3.0) (2025-09-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* automatically generate command mapped types ([#243](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/243)) ([3eb25f3](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/3eb25f35e1a17885c1af7a63037de1fc74c83d05))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* re-generate types based on specifciation updates ([#245](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/245)) ([c32b70d](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/c32b70de5fb4dda145c872025192f5cd59177c34))
|
|
14
|
+
|
|
15
|
+
## [0.2.11](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.10...webdriver-bidi-protocol-v0.2.11) (2025-09-10)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* add user agent override to the mapping ([#240](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/240)) ([0336e7f](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/0336e7faa0988ac4b0582a86345e5644ee8132bb))
|
|
21
|
+
* re-generate types based on specifciation updates ([#239](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/239)) ([2e52f5a](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/2e52f5ae40367410699d3a9820ad8856e7485712))
|
|
22
|
+
* re-generate types based on specifciation updates ([#242](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/242)) ([8ae63cc](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/8ae63cc2032ac3889b261d78c57b6b5cce412cad))
|
|
23
|
+
|
|
3
24
|
## [0.2.10](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.9...webdriver-bidi-protocol-v0.2.10) (2025-09-09)
|
|
4
25
|
|
|
5
26
|
|
package/out/gen/main.d.ts
CHANGED
|
@@ -955,7 +955,8 @@ export type EmulationCommand =
|
|
|
955
955
|
| Emulation.SetLocaleOverride
|
|
956
956
|
| Emulation.SetScreenOrientationOverride
|
|
957
957
|
| Emulation.SetScriptingEnabled
|
|
958
|
-
| Emulation.SetTimezoneOverride
|
|
958
|
+
| Emulation.SetTimezoneOverride
|
|
959
|
+
| Emulation.SetUserAgentOverride;
|
|
959
960
|
export declare namespace Emulation {
|
|
960
961
|
type SetForcedColorsModeThemeOverride = {
|
|
961
962
|
method: 'emulation.setForcedColorsModeThemeOverride';
|
|
@@ -1096,6 +1097,22 @@ export declare namespace Emulation {
|
|
|
1096
1097
|
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
|
|
1097
1098
|
};
|
|
1098
1099
|
}
|
|
1100
|
+
export declare namespace Emulation {
|
|
1101
|
+
type SetUserAgentOverride = {
|
|
1102
|
+
method: 'emulation.setUserAgentOverride';
|
|
1103
|
+
params: Emulation.SetUserAgentOverrideParameters;
|
|
1104
|
+
};
|
|
1105
|
+
}
|
|
1106
|
+
export declare namespace Emulation {
|
|
1107
|
+
type SetUserAgentOverrideParameters = {
|
|
1108
|
+
userAgent: string | null;
|
|
1109
|
+
contexts?: [
|
|
1110
|
+
BrowsingContext.BrowsingContext,
|
|
1111
|
+
...BrowsingContext.BrowsingContext[],
|
|
1112
|
+
];
|
|
1113
|
+
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1099
1116
|
export declare namespace Emulation {
|
|
1100
1117
|
type SetScriptingEnabled = {
|
|
1101
1118
|
method: 'emulation.setScriptingEnabled';
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import type * as Bidi from './main.ts';
|
|
2
|
+
import type * as BidiPermissions from './permissions.ts';
|
|
3
|
+
import type * as BidiBluetooth from './web-bluetooth.ts';
|
|
4
|
+
export interface CommandMapping {
|
|
5
|
+
'bluetooth.disableSimulation': {
|
|
6
|
+
params: BidiBluetooth.Bluetooth.DisableSimulationParameters;
|
|
7
|
+
returnType: BidiBluetooth.Bluetooth.DisableSimulationParameters;
|
|
8
|
+
};
|
|
9
|
+
'bluetooth.handleRequestDevicePrompt': {
|
|
10
|
+
params: BidiBluetooth.Bluetooth.HandleRequestDevicePromptParameters;
|
|
11
|
+
returnType: BidiBluetooth.Bluetooth.HandleRequestDevicePromptParameters;
|
|
12
|
+
};
|
|
13
|
+
'bluetooth.simulateAdapter': {
|
|
14
|
+
params: BidiBluetooth.Bluetooth.SimulateAdapterParameters;
|
|
15
|
+
returnType: BidiBluetooth.Bluetooth.SimulateAdapterParameters;
|
|
16
|
+
};
|
|
17
|
+
'bluetooth.simulateAdvertisement': {
|
|
18
|
+
params: BidiBluetooth.Bluetooth.SimulateAdvertisementParameters;
|
|
19
|
+
returnType: BidiBluetooth.Bluetooth.SimulateAdvertisementParameters;
|
|
20
|
+
};
|
|
21
|
+
'bluetooth.simulateCharacteristic': {
|
|
22
|
+
params: BidiBluetooth.Bluetooth.SimulateCharacteristicParameters;
|
|
23
|
+
returnType: BidiBluetooth.Bluetooth.SimulateCharacteristicParameters;
|
|
24
|
+
};
|
|
25
|
+
'bluetooth.simulateCharacteristicResponse': {
|
|
26
|
+
params: BidiBluetooth.Bluetooth.SimulateCharacteristicResponseParameters;
|
|
27
|
+
returnType: BidiBluetooth.Bluetooth.SimulateCharacteristicResponseParameters;
|
|
28
|
+
};
|
|
29
|
+
'bluetooth.simulateDescriptor': {
|
|
30
|
+
params: BidiBluetooth.Bluetooth.SimulateDescriptorParameters;
|
|
31
|
+
returnType: BidiBluetooth.Bluetooth.SimulateDescriptorParameters;
|
|
32
|
+
};
|
|
33
|
+
'bluetooth.simulateDescriptorResponse': {
|
|
34
|
+
params: BidiBluetooth.Bluetooth.SimulateDescriptorResponseParameters;
|
|
35
|
+
returnType: BidiBluetooth.Bluetooth.SimulateDescriptorResponseParameters;
|
|
36
|
+
};
|
|
37
|
+
'bluetooth.simulateGattConnectionResponse': {
|
|
38
|
+
params: BidiBluetooth.Bluetooth.SimulateGattConnectionResponseParameters;
|
|
39
|
+
returnType: BidiBluetooth.Bluetooth.SimulateGattConnectionResponseParameters;
|
|
40
|
+
};
|
|
41
|
+
'bluetooth.simulateGattDisconnection': {
|
|
42
|
+
params: BidiBluetooth.Bluetooth.SimulateGattDisconnectionParameters;
|
|
43
|
+
returnType: BidiBluetooth.Bluetooth.SimulateGattDisconnectionParameters;
|
|
44
|
+
};
|
|
45
|
+
'bluetooth.simulatePreconnectedPeripheral': {
|
|
46
|
+
params: BidiBluetooth.Bluetooth.SimulatePreconnectedPeripheralParameters;
|
|
47
|
+
returnType: BidiBluetooth.Bluetooth.SimulatePreconnectedPeripheralParameters;
|
|
48
|
+
};
|
|
49
|
+
'bluetooth.simulateService': {
|
|
50
|
+
params: BidiBluetooth.Bluetooth.SimulateServiceParameters;
|
|
51
|
+
returnType: BidiBluetooth.Bluetooth.SimulateServiceParameters;
|
|
52
|
+
};
|
|
53
|
+
'browser.close': {
|
|
54
|
+
params: Bidi.Extensible;
|
|
55
|
+
returnType: Bidi.Extensible;
|
|
56
|
+
};
|
|
57
|
+
'browser.createUserContext': {
|
|
58
|
+
params: Bidi.Browser.CreateUserContextParameters;
|
|
59
|
+
returnType: Bidi.Browser.CreateUserContextParameters;
|
|
60
|
+
};
|
|
61
|
+
'browser.getClientWindows': {
|
|
62
|
+
params: Bidi.Extensible;
|
|
63
|
+
returnType: Bidi.Extensible;
|
|
64
|
+
};
|
|
65
|
+
'browser.getUserContexts': {
|
|
66
|
+
params: Bidi.Extensible;
|
|
67
|
+
returnType: Bidi.Extensible;
|
|
68
|
+
};
|
|
69
|
+
'browser.removeUserContext': {
|
|
70
|
+
params: Bidi.Browser.RemoveUserContextParameters;
|
|
71
|
+
returnType: Bidi.Browser.RemoveUserContextParameters;
|
|
72
|
+
};
|
|
73
|
+
'browser.setClientWindowState': {
|
|
74
|
+
params: Bidi.Browser.SetClientWindowStateParameters;
|
|
75
|
+
returnType: Bidi.Browser.SetClientWindowStateParameters;
|
|
76
|
+
};
|
|
77
|
+
'browsingContext.activate': {
|
|
78
|
+
params: Bidi.BrowsingContext.ActivateParameters;
|
|
79
|
+
returnType: Bidi.BrowsingContext.ActivateParameters;
|
|
80
|
+
};
|
|
81
|
+
'browsingContext.captureScreenshot': {
|
|
82
|
+
params: Bidi.BrowsingContext.CaptureScreenshotParameters;
|
|
83
|
+
returnType: Bidi.BrowsingContext.CaptureScreenshotParameters;
|
|
84
|
+
};
|
|
85
|
+
'browsingContext.close': {
|
|
86
|
+
params: Bidi.BrowsingContext.CloseParameters;
|
|
87
|
+
returnType: Bidi.BrowsingContext.CloseParameters;
|
|
88
|
+
};
|
|
89
|
+
'browsingContext.create': {
|
|
90
|
+
params: Bidi.BrowsingContext.CreateParameters;
|
|
91
|
+
returnType: Bidi.BrowsingContext.CreateParameters;
|
|
92
|
+
};
|
|
93
|
+
'browsingContext.getTree': {
|
|
94
|
+
params: Bidi.BrowsingContext.GetTreeParameters;
|
|
95
|
+
returnType: Bidi.BrowsingContext.GetTreeParameters;
|
|
96
|
+
};
|
|
97
|
+
'browsingContext.handleUserPrompt': {
|
|
98
|
+
params: Bidi.BrowsingContext.HandleUserPromptParameters;
|
|
99
|
+
returnType: Bidi.BrowsingContext.HandleUserPromptParameters;
|
|
100
|
+
};
|
|
101
|
+
'browsingContext.locateNodes': {
|
|
102
|
+
params: Bidi.BrowsingContext.LocateNodesParameters;
|
|
103
|
+
returnType: Bidi.BrowsingContext.LocateNodesParameters;
|
|
104
|
+
};
|
|
105
|
+
'browsingContext.navigate': {
|
|
106
|
+
params: Bidi.BrowsingContext.NavigateParameters;
|
|
107
|
+
returnType: Bidi.BrowsingContext.NavigateParameters;
|
|
108
|
+
};
|
|
109
|
+
'browsingContext.print': {
|
|
110
|
+
params: Bidi.BrowsingContext.PrintParameters;
|
|
111
|
+
returnType: Bidi.BrowsingContext.PrintParameters;
|
|
112
|
+
};
|
|
113
|
+
'browsingContext.reload': {
|
|
114
|
+
params: Bidi.BrowsingContext.ReloadParameters;
|
|
115
|
+
returnType: Bidi.BrowsingContext.ReloadParameters;
|
|
116
|
+
};
|
|
117
|
+
'browsingContext.setViewport': {
|
|
118
|
+
params: Bidi.BrowsingContext.SetViewportParameters;
|
|
119
|
+
returnType: Bidi.BrowsingContext.SetViewportParameters;
|
|
120
|
+
};
|
|
121
|
+
'browsingContext.traverseHistory': {
|
|
122
|
+
params: Bidi.BrowsingContext.TraverseHistoryParameters;
|
|
123
|
+
returnType: Bidi.BrowsingContext.TraverseHistoryParameters;
|
|
124
|
+
};
|
|
125
|
+
'emulation.setForcedColorsModeThemeOverride': {
|
|
126
|
+
params: Bidi.Emulation.SetForcedColorsModeThemeOverrideParameters;
|
|
127
|
+
returnType: Bidi.Emulation.SetForcedColorsModeThemeOverrideParameters;
|
|
128
|
+
};
|
|
129
|
+
'emulation.setGeolocationOverride': {
|
|
130
|
+
params: Bidi.Emulation.SetGeolocationOverrideParameters;
|
|
131
|
+
returnType: Bidi.Emulation.SetGeolocationOverrideParameters;
|
|
132
|
+
};
|
|
133
|
+
'emulation.setLocaleOverride': {
|
|
134
|
+
params: Bidi.Emulation.SetLocaleOverrideParameters;
|
|
135
|
+
returnType: Bidi.Emulation.SetLocaleOverrideParameters;
|
|
136
|
+
};
|
|
137
|
+
'emulation.setScreenOrientationOverride': {
|
|
138
|
+
params: Bidi.Emulation.SetScreenOrientationOverrideParameters;
|
|
139
|
+
returnType: Bidi.Emulation.SetScreenOrientationOverrideParameters;
|
|
140
|
+
};
|
|
141
|
+
'emulation.setScriptingEnabled': {
|
|
142
|
+
params: Bidi.Emulation.SetScriptingEnabledParameters;
|
|
143
|
+
returnType: Bidi.Emulation.SetScriptingEnabledParameters;
|
|
144
|
+
};
|
|
145
|
+
'emulation.setTimezoneOverride': {
|
|
146
|
+
params: Bidi.Emulation.SetTimezoneOverrideParameters;
|
|
147
|
+
returnType: Bidi.Emulation.SetTimezoneOverrideParameters;
|
|
148
|
+
};
|
|
149
|
+
'emulation.setUserAgentOverride': {
|
|
150
|
+
params: Bidi.Emulation.SetUserAgentOverrideParameters;
|
|
151
|
+
returnType: Bidi.Emulation.SetUserAgentOverrideParameters;
|
|
152
|
+
};
|
|
153
|
+
'input.performActions': {
|
|
154
|
+
params: Bidi.Input.PerformActionsParameters;
|
|
155
|
+
returnType: Bidi.Input.PerformActionsParameters;
|
|
156
|
+
};
|
|
157
|
+
'input.releaseActions': {
|
|
158
|
+
params: Bidi.Input.ReleaseActionsParameters;
|
|
159
|
+
returnType: Bidi.Input.ReleaseActionsParameters;
|
|
160
|
+
};
|
|
161
|
+
'input.setFiles': {
|
|
162
|
+
params: Bidi.Input.SetFilesParameters;
|
|
163
|
+
returnType: Bidi.Input.SetFilesParameters;
|
|
164
|
+
};
|
|
165
|
+
'network.addDataCollector': {
|
|
166
|
+
params: Bidi.Network.AddDataCollectorParameters;
|
|
167
|
+
returnType: Bidi.Network.AddDataCollectorParameters;
|
|
168
|
+
};
|
|
169
|
+
'network.addIntercept': {
|
|
170
|
+
params: Bidi.Network.AddInterceptParameters;
|
|
171
|
+
returnType: Bidi.Network.AddInterceptParameters;
|
|
172
|
+
};
|
|
173
|
+
'network.continueRequest': {
|
|
174
|
+
params: Bidi.Network.ContinueRequestParameters;
|
|
175
|
+
returnType: Bidi.Network.ContinueRequestParameters;
|
|
176
|
+
};
|
|
177
|
+
'network.continueResponse': {
|
|
178
|
+
params: Bidi.Network.ContinueResponseParameters;
|
|
179
|
+
returnType: Bidi.Network.ContinueResponseParameters;
|
|
180
|
+
};
|
|
181
|
+
'network.continueWithAuth': {
|
|
182
|
+
params: Bidi.Network.ContinueWithAuthParameters;
|
|
183
|
+
returnType: Bidi.Network.ContinueWithAuthParameters;
|
|
184
|
+
};
|
|
185
|
+
'network.disownData': {
|
|
186
|
+
params: Bidi.Network.DisownDataParameters;
|
|
187
|
+
returnType: Bidi.Network.DisownDataParameters;
|
|
188
|
+
};
|
|
189
|
+
'network.failRequest': {
|
|
190
|
+
params: Bidi.Network.FailRequestParameters;
|
|
191
|
+
returnType: Bidi.Network.FailRequestParameters;
|
|
192
|
+
};
|
|
193
|
+
'network.getData': {
|
|
194
|
+
params: Bidi.Network.GetDataParameters;
|
|
195
|
+
returnType: Bidi.Network.GetDataParameters;
|
|
196
|
+
};
|
|
197
|
+
'network.provideResponse': {
|
|
198
|
+
params: Bidi.Network.ProvideResponseParameters;
|
|
199
|
+
returnType: Bidi.Network.ProvideResponseParameters;
|
|
200
|
+
};
|
|
201
|
+
'network.removeDataCollector': {
|
|
202
|
+
params: Bidi.Network.RemoveDataCollectorParameters;
|
|
203
|
+
returnType: Bidi.Network.RemoveDataCollectorParameters;
|
|
204
|
+
};
|
|
205
|
+
'network.removeIntercept': {
|
|
206
|
+
params: Bidi.Network.RemoveInterceptParameters;
|
|
207
|
+
returnType: Bidi.Network.RemoveInterceptParameters;
|
|
208
|
+
};
|
|
209
|
+
'network.setCacheBehavior': {
|
|
210
|
+
params: Bidi.Network.SetCacheBehaviorParameters;
|
|
211
|
+
returnType: Bidi.Network.SetCacheBehaviorParameters;
|
|
212
|
+
};
|
|
213
|
+
'network.setExtraHeaders': {
|
|
214
|
+
params: Bidi.Network.SetExtraHeadersParameters;
|
|
215
|
+
returnType: Bidi.Network.SetExtraHeadersParameters;
|
|
216
|
+
};
|
|
217
|
+
'permissions.setPermission': {
|
|
218
|
+
params: BidiPermissions.Permissions.SetPermissionParameters;
|
|
219
|
+
returnType: BidiPermissions.Permissions.SetPermissionParameters;
|
|
220
|
+
};
|
|
221
|
+
'script.addPreloadScript': {
|
|
222
|
+
params: Bidi.Script.AddPreloadScriptParameters;
|
|
223
|
+
returnType: Bidi.Script.AddPreloadScriptParameters;
|
|
224
|
+
};
|
|
225
|
+
'script.callFunction': {
|
|
226
|
+
params: Bidi.Script.CallFunctionParameters;
|
|
227
|
+
returnType: Bidi.Script.CallFunctionParameters;
|
|
228
|
+
};
|
|
229
|
+
'script.disown': {
|
|
230
|
+
params: Bidi.Script.DisownParameters;
|
|
231
|
+
returnType: Bidi.Script.DisownParameters;
|
|
232
|
+
};
|
|
233
|
+
'script.evaluate': {
|
|
234
|
+
params: Bidi.Script.EvaluateParameters;
|
|
235
|
+
returnType: Bidi.Script.EvaluateParameters;
|
|
236
|
+
};
|
|
237
|
+
'script.getRealms': {
|
|
238
|
+
params: Bidi.Script.GetRealmsParameters;
|
|
239
|
+
returnType: Bidi.Script.GetRealmsParameters;
|
|
240
|
+
};
|
|
241
|
+
'script.removePreloadScript': {
|
|
242
|
+
params: Bidi.Script.RemovePreloadScriptParameters;
|
|
243
|
+
returnType: Bidi.Script.RemovePreloadScriptParameters;
|
|
244
|
+
};
|
|
245
|
+
'session.end': {
|
|
246
|
+
params: Bidi.Extensible;
|
|
247
|
+
returnType: Bidi.Extensible;
|
|
248
|
+
};
|
|
249
|
+
'session.new': {
|
|
250
|
+
params: Bidi.Session.NewParameters;
|
|
251
|
+
returnType: Bidi.Session.NewParameters;
|
|
252
|
+
};
|
|
253
|
+
'session.status': {
|
|
254
|
+
params: Bidi.Extensible;
|
|
255
|
+
returnType: Bidi.Extensible;
|
|
256
|
+
};
|
|
257
|
+
'session.subscribe': {
|
|
258
|
+
params: Bidi.Session.SubscriptionRequest;
|
|
259
|
+
returnType: Bidi.Session.SubscriptionRequest;
|
|
260
|
+
};
|
|
261
|
+
'session.unsubscribe': {
|
|
262
|
+
params: Bidi.Session.UnsubscribeParameters;
|
|
263
|
+
returnType: Bidi.Session.UnsubscribeParameters;
|
|
264
|
+
};
|
|
265
|
+
'storage.deleteCookies': {
|
|
266
|
+
params: Bidi.Storage.DeleteCookiesParameters;
|
|
267
|
+
returnType: Bidi.Storage.DeleteCookiesParameters;
|
|
268
|
+
};
|
|
269
|
+
'storage.getCookies': {
|
|
270
|
+
params: Bidi.Storage.GetCookiesParameters;
|
|
271
|
+
returnType: Bidi.Storage.GetCookiesParameters;
|
|
272
|
+
};
|
|
273
|
+
'storage.setCookie': {
|
|
274
|
+
params: Bidi.Storage.SetCookieParameters;
|
|
275
|
+
returnType: Bidi.Storage.SetCookieParameters;
|
|
276
|
+
};
|
|
277
|
+
'webExtension.install': {
|
|
278
|
+
params: Bidi.WebExtension.InstallParameters;
|
|
279
|
+
returnType: Bidi.WebExtension.InstallParameters;
|
|
280
|
+
};
|
|
281
|
+
'webExtension.uninstall': {
|
|
282
|
+
params: Bidi.WebExtension.UninstallParameters;
|
|
283
|
+
returnType: Bidi.WebExtension.UninstallParameters;
|
|
284
|
+
};
|
|
285
|
+
}
|
package/out/index.d.ts
CHANGED
|
@@ -9,269 +9,19 @@ import * as BidiBluetooth from './gen/web-bluetooth.js';
|
|
|
9
9
|
export * from './gen/main.js';
|
|
10
10
|
export * from './gen/permissions.js';
|
|
11
11
|
export * from './gen/web-bluetooth.js';
|
|
12
|
+
export type {CommandMapping} from './gen/mapping.d.ts';
|
|
12
13
|
type ExternalSpecCommand<T> = {
|
|
13
14
|
id: Bidi.JsUint;
|
|
14
15
|
} & T;
|
|
15
|
-
type
|
|
16
|
-
type: 'event';
|
|
17
|
-
} & T &
|
|
18
|
-
Bidi.Extensible;
|
|
16
|
+
export type Result = Bidi.ResultData;
|
|
19
17
|
export type Command =
|
|
20
18
|
| Bidi.Command
|
|
21
19
|
| ExternalSpecCommand<BidiPermissions.PermissionsCommand>
|
|
22
20
|
| ExternalSpecCommand<BidiBluetooth.BluetoothCommand>;
|
|
21
|
+
type ExternalSpecEvent<T> = {
|
|
22
|
+
type: 'event';
|
|
23
|
+
} & T &
|
|
24
|
+
Bidi.Extensible;
|
|
23
25
|
export type Event =
|
|
24
26
|
| Bidi.Event
|
|
25
27
|
| ExternalSpecEvent<BidiBluetooth.BluetoothEvent>;
|
|
26
|
-
export interface Commands {
|
|
27
|
-
'bluetooth.handleRequestDevicePrompt': {
|
|
28
|
-
params: BidiBluetooth.Bluetooth.HandleRequestDevicePromptParameters;
|
|
29
|
-
returnType: Bidi.EmptyResult;
|
|
30
|
-
};
|
|
31
|
-
'bluetooth.disableSimulation': {
|
|
32
|
-
params: BidiBluetooth.Bluetooth.DisableSimulationParameters;
|
|
33
|
-
returnType: Bidi.EmptyResult;
|
|
34
|
-
};
|
|
35
|
-
'bluetooth.simulateAdapter': {
|
|
36
|
-
params: BidiBluetooth.Bluetooth.SimulateAdapterParameters;
|
|
37
|
-
returnType: Bidi.EmptyResult;
|
|
38
|
-
};
|
|
39
|
-
'bluetooth.simulateAdvertisement': {
|
|
40
|
-
params: BidiBluetooth.Bluetooth.SimulateAdvertisementParameters;
|
|
41
|
-
returnType: Bidi.EmptyResult;
|
|
42
|
-
};
|
|
43
|
-
'bluetooth.simulatePreconnectedPeripheral': {
|
|
44
|
-
params: BidiBluetooth.Bluetooth.SimulatePreconnectedPeripheralParameters;
|
|
45
|
-
returnType: Bidi.EmptyResult;
|
|
46
|
-
};
|
|
47
|
-
'bluetooth.simulateGattDisconnection': {
|
|
48
|
-
params: BidiBluetooth.Bluetooth.SimulateGattDisconnectionParameters;
|
|
49
|
-
returnType: Bidi.EmptyResult;
|
|
50
|
-
};
|
|
51
|
-
'bluetooth.simulateDescriptor': {
|
|
52
|
-
params: BidiBluetooth.Bluetooth.SimulateDescriptorParameters;
|
|
53
|
-
returnType: Bidi.EmptyResult;
|
|
54
|
-
};
|
|
55
|
-
'bluetooth.simulateDescriptorResponse': {
|
|
56
|
-
params: BidiBluetooth.Bluetooth.SimulateDescriptorResponseParameters;
|
|
57
|
-
returnType: Bidi.EmptyResult;
|
|
58
|
-
};
|
|
59
|
-
'browser.close': {
|
|
60
|
-
params: Bidi.EmptyParams;
|
|
61
|
-
returnType: Bidi.EmptyResult;
|
|
62
|
-
};
|
|
63
|
-
'browser.getgetClientWindows': {
|
|
64
|
-
params: Bidi.EmptyParams;
|
|
65
|
-
returnType: Bidi.Browser.GetClientWindowsResult;
|
|
66
|
-
};
|
|
67
|
-
'browser.createUserContext': {
|
|
68
|
-
params: Bidi.EmptyParams;
|
|
69
|
-
returnType: Bidi.Browser.CreateUserContextResult;
|
|
70
|
-
};
|
|
71
|
-
'browser.getUserContexts': {
|
|
72
|
-
params: Bidi.EmptyParams;
|
|
73
|
-
returnType: Bidi.Browser.GetUserContextsResult;
|
|
74
|
-
};
|
|
75
|
-
'browser.removeUserContext': {
|
|
76
|
-
params: {
|
|
77
|
-
userContext: Bidi.Browser.UserContext;
|
|
78
|
-
};
|
|
79
|
-
returnType: Bidi.Browser.RemoveUserContext;
|
|
80
|
-
};
|
|
81
|
-
'browser.setClientWindowState': {
|
|
82
|
-
params: Bidi.Browser.SetClientWindowStateParameters;
|
|
83
|
-
returnType: Bidi.Browser.ClientWindowInfo;
|
|
84
|
-
};
|
|
85
|
-
'browsingContext.activate': {
|
|
86
|
-
params: Bidi.BrowsingContext.ActivateParameters;
|
|
87
|
-
returnType: Bidi.EmptyResult;
|
|
88
|
-
};
|
|
89
|
-
'browsingContext.create': {
|
|
90
|
-
params: Bidi.BrowsingContext.CreateParameters;
|
|
91
|
-
returnType: Bidi.BrowsingContext.CreateResult;
|
|
92
|
-
};
|
|
93
|
-
'browsingContext.close': {
|
|
94
|
-
params: Bidi.BrowsingContext.CloseParameters;
|
|
95
|
-
returnType: Bidi.EmptyResult;
|
|
96
|
-
};
|
|
97
|
-
'browsingContext.getTree': {
|
|
98
|
-
params: Bidi.BrowsingContext.GetTreeParameters;
|
|
99
|
-
returnType: Bidi.BrowsingContext.GetTreeResult;
|
|
100
|
-
};
|
|
101
|
-
'browsingContext.locateNodes': {
|
|
102
|
-
params: Bidi.BrowsingContext.LocateNodesParameters;
|
|
103
|
-
returnType: Bidi.BrowsingContext.LocateNodesResult;
|
|
104
|
-
};
|
|
105
|
-
'browsingContext.navigate': {
|
|
106
|
-
params: Bidi.BrowsingContext.NavigateParameters;
|
|
107
|
-
returnType: Bidi.BrowsingContext.NavigateResult;
|
|
108
|
-
};
|
|
109
|
-
'browsingContext.reload': {
|
|
110
|
-
params: Bidi.BrowsingContext.ReloadParameters;
|
|
111
|
-
returnType: Bidi.BrowsingContext.NavigateResult;
|
|
112
|
-
};
|
|
113
|
-
'browsingContext.print': {
|
|
114
|
-
params: Bidi.BrowsingContext.PrintParameters;
|
|
115
|
-
returnType: Bidi.BrowsingContext.PrintResult;
|
|
116
|
-
};
|
|
117
|
-
'browsingContext.captureScreenshot': {
|
|
118
|
-
params: Bidi.BrowsingContext.CaptureScreenshotParameters;
|
|
119
|
-
returnType: Bidi.BrowsingContext.CaptureScreenshotResult;
|
|
120
|
-
};
|
|
121
|
-
'browsingContext.handleUserPrompt': {
|
|
122
|
-
params: Bidi.BrowsingContext.HandleUserPromptParameters;
|
|
123
|
-
returnType: Bidi.EmptyResult;
|
|
124
|
-
};
|
|
125
|
-
'browsingContext.setViewport': {
|
|
126
|
-
params: Bidi.BrowsingContext.SetViewportParameters;
|
|
127
|
-
returnType: Bidi.EmptyResult;
|
|
128
|
-
};
|
|
129
|
-
'browsingContext.traverseHistory': {
|
|
130
|
-
params: Bidi.BrowsingContext.TraverseHistoryParameters;
|
|
131
|
-
returnType: Bidi.EmptyResult;
|
|
132
|
-
};
|
|
133
|
-
'emulation.setForcedColorsModeThemeOverride': {
|
|
134
|
-
params: Bidi.Emulation.SetForcedColorsModeThemeOverrideParameters;
|
|
135
|
-
returnType: Bidi.EmptyResult;
|
|
136
|
-
};
|
|
137
|
-
'emulation.setGeolocationOverride': {
|
|
138
|
-
params: Bidi.Emulation.SetGeolocationOverrideParameters;
|
|
139
|
-
returnType: Bidi.EmptyResult;
|
|
140
|
-
};
|
|
141
|
-
'emulation.setLocaleOverride': {
|
|
142
|
-
params: Bidi.Emulation.SetLocaleOverrideParameters;
|
|
143
|
-
returnType: Bidi.EmptyResult;
|
|
144
|
-
};
|
|
145
|
-
'emulation.setScreenOrientationOverride': {
|
|
146
|
-
params: Bidi.Emulation.SetScreenOrientationOverrideParameters;
|
|
147
|
-
returnType: Bidi.EmptyResult;
|
|
148
|
-
};
|
|
149
|
-
'emulation.setTimezoneOverride': {
|
|
150
|
-
params: Bidi.Emulation.SetTimezoneOverrideParameters;
|
|
151
|
-
returnType: Bidi.EmptyResult;
|
|
152
|
-
};
|
|
153
|
-
'emulation.setScriptingEnabled': {
|
|
154
|
-
params: Bidi.Emulation.SetScriptingEnabledParameters;
|
|
155
|
-
returnType: Bidi.EmptyResult;
|
|
156
|
-
};
|
|
157
|
-
'input.performActions': {
|
|
158
|
-
params: Bidi.Input.PerformActionsParameters;
|
|
159
|
-
returnType: Bidi.EmptyResult;
|
|
160
|
-
};
|
|
161
|
-
'input.releaseActions': {
|
|
162
|
-
params: Bidi.Input.ReleaseActionsParameters;
|
|
163
|
-
returnType: Bidi.EmptyResult;
|
|
164
|
-
};
|
|
165
|
-
'input.setFiles': {
|
|
166
|
-
params: Bidi.Input.SetFilesParameters;
|
|
167
|
-
returnType: Bidi.EmptyResult;
|
|
168
|
-
};
|
|
169
|
-
'permissions.setPermission': {
|
|
170
|
-
params: BidiPermissions.Permissions.SetPermissionParameters;
|
|
171
|
-
returnType: Bidi.EmptyResult;
|
|
172
|
-
};
|
|
173
|
-
'script.evaluate': {
|
|
174
|
-
params: Bidi.Script.EvaluateParameters;
|
|
175
|
-
returnType: Bidi.Script.EvaluateResult;
|
|
176
|
-
};
|
|
177
|
-
'script.callFunction': {
|
|
178
|
-
params: Bidi.Script.CallFunctionParameters;
|
|
179
|
-
returnType: Bidi.Script.EvaluateResult;
|
|
180
|
-
};
|
|
181
|
-
'script.disown': {
|
|
182
|
-
params: Bidi.Script.DisownParameters;
|
|
183
|
-
returnType: Bidi.EmptyResult;
|
|
184
|
-
};
|
|
185
|
-
'script.addPreloadScript': {
|
|
186
|
-
params: Bidi.Script.AddPreloadScriptParameters;
|
|
187
|
-
returnType: Bidi.Script.AddPreloadScriptResult;
|
|
188
|
-
};
|
|
189
|
-
'script.removePreloadScript': {
|
|
190
|
-
params: Bidi.Script.RemovePreloadScriptParameters;
|
|
191
|
-
returnType: Bidi.EmptyResult;
|
|
192
|
-
};
|
|
193
|
-
'session.end': {
|
|
194
|
-
params: Bidi.EmptyParams;
|
|
195
|
-
returnType: Bidi.EmptyResult;
|
|
196
|
-
};
|
|
197
|
-
'session.new': {
|
|
198
|
-
params: Bidi.Session.NewParameters;
|
|
199
|
-
returnType: Bidi.Session.NewResult;
|
|
200
|
-
};
|
|
201
|
-
'session.status': {
|
|
202
|
-
params: object;
|
|
203
|
-
returnType: Bidi.Session.StatusResult;
|
|
204
|
-
};
|
|
205
|
-
'session.subscribe': {
|
|
206
|
-
params: Bidi.Session.SubscriptionRequest;
|
|
207
|
-
returnType: Bidi.EmptyResult;
|
|
208
|
-
};
|
|
209
|
-
'session.unsubscribe': {
|
|
210
|
-
params: Bidi.Session.SubscriptionRequest;
|
|
211
|
-
returnType: Bidi.EmptyResult;
|
|
212
|
-
};
|
|
213
|
-
'storage.deleteCookies': {
|
|
214
|
-
params: Bidi.Storage.DeleteCookiesParameters;
|
|
215
|
-
returnType: Bidi.Storage.DeleteCookiesResult;
|
|
216
|
-
};
|
|
217
|
-
'storage.getCookies': {
|
|
218
|
-
params: Bidi.Storage.GetCookiesParameters;
|
|
219
|
-
returnType: Bidi.Storage.GetCookiesResult;
|
|
220
|
-
};
|
|
221
|
-
'storage.setCookie': {
|
|
222
|
-
params: Bidi.Storage.SetCookieParameters;
|
|
223
|
-
returnType: Bidi.Storage.SetCookieParameters;
|
|
224
|
-
};
|
|
225
|
-
'network.addDataCollector': {
|
|
226
|
-
params: Bidi.Network.AddDataCollectorParameters;
|
|
227
|
-
returnType: Bidi.Network.AddDataCollectorResult;
|
|
228
|
-
};
|
|
229
|
-
'network.addIntercept': {
|
|
230
|
-
params: Bidi.Network.AddInterceptParameters;
|
|
231
|
-
returnType: Bidi.Network.AddInterceptResult;
|
|
232
|
-
};
|
|
233
|
-
'network.removeIntercept': {
|
|
234
|
-
params: Bidi.Network.RemoveInterceptParameters;
|
|
235
|
-
returnType: Bidi.EmptyResult;
|
|
236
|
-
};
|
|
237
|
-
'network.continueRequest': {
|
|
238
|
-
params: Bidi.Network.ContinueRequestParameters;
|
|
239
|
-
returnType: Bidi.EmptyResult;
|
|
240
|
-
};
|
|
241
|
-
'network.continueWithAuth': {
|
|
242
|
-
params: Bidi.Network.ContinueWithAuthParameters;
|
|
243
|
-
returnType: Bidi.EmptyResult;
|
|
244
|
-
};
|
|
245
|
-
'network.failRequest': {
|
|
246
|
-
params: Bidi.Network.FailRequestParameters;
|
|
247
|
-
returnType: Bidi.EmptyResult;
|
|
248
|
-
};
|
|
249
|
-
'network.provideResponse': {
|
|
250
|
-
params: Bidi.Network.ProvideResponseParameters;
|
|
251
|
-
returnType: Bidi.EmptyResult;
|
|
252
|
-
};
|
|
253
|
-
'network.disownData': {
|
|
254
|
-
params: Bidi.Network.DisownDataParameters;
|
|
255
|
-
returnType: Bidi.EmptyResult;
|
|
256
|
-
};
|
|
257
|
-
'network.getData': {
|
|
258
|
-
params: Bidi.Network.GetDataParameters;
|
|
259
|
-
returnType: Bidi.Network.GetDataResult;
|
|
260
|
-
};
|
|
261
|
-
'network.setCacheBehavior': {
|
|
262
|
-
params: Bidi.Network.SetCacheBehaviorParameters;
|
|
263
|
-
returnType: Bidi.EmptyResult;
|
|
264
|
-
};
|
|
265
|
-
'network.setExtraHeaders': {
|
|
266
|
-
params: Bidi.Network.SetExtraHeadersParameters;
|
|
267
|
-
returnType: Bidi.EmptyResult;
|
|
268
|
-
};
|
|
269
|
-
'webExtension.install': {
|
|
270
|
-
params: Bidi.WebExtension.InstallParameters;
|
|
271
|
-
returnType: Bidi.WebExtension.InstallResult;
|
|
272
|
-
};
|
|
273
|
-
'webExtension.uninstall': {
|
|
274
|
-
params: Bidi.WebExtension.UninstallParameters;
|
|
275
|
-
returnType: Bidi.EmptyResult;
|
|
276
|
-
};
|
|
277
|
-
}
|