Add Brave CDP automation, replace Oracle browser mode
Connects to user's running Brave via Chrome DevTools Protocol to automate ChatGPT interaction. Uses puppeteer-core to open a tab, send the prompt, wait for response, and extract the result. No cookies, no separate profiles, no copy/paste. Just connects to the browser where the user is already logged in. One-time setup: relaunch Brave with --remote-debugging-port=9222 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2216
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-bluetooth.d.ts
generated
vendored
Normal file
2216
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-bluetooth.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
348
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-bluetooth.js
generated
vendored
Normal file
348
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-bluetooth.js
generated
vendored
Normal file
@@ -0,0 +1,348 @@
|
||||
/**
|
||||
* Copyright 2024 Google LLC.
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* THIS FILE IS AUTOGENERATED by cddlconv 0.1.7.
|
||||
* Run `node tools/generate-bidi-types.mjs` to regenerate.
|
||||
* @see https://github.com/w3c/webdriver-bidi/blob/master/index.bs
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-nocheck Some types may be circular.
|
||||
import z from 'zod';
|
||||
export var Bluetooth;
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.BluetoothUuidSchema = z.lazy(() => z.string());
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.BluetoothManufacturerDataSchema = z.lazy(() => z.object({
|
||||
key: z.number().int().nonnegative(),
|
||||
data: z.string(),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.CharacteristicPropertiesSchema = z.lazy(() => z.object({
|
||||
broadcast: z.boolean().optional(),
|
||||
read: z.boolean().optional(),
|
||||
writeWithoutResponse: z.boolean().optional(),
|
||||
write: z.boolean().optional(),
|
||||
notify: z.boolean().optional(),
|
||||
indicate: z.boolean().optional(),
|
||||
authenticatedSignedWrites: z.boolean().optional(),
|
||||
extendedProperties: z.boolean().optional(),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.RequestDeviceSchema = z.lazy(() => z.string());
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.RequestDeviceInfoSchema = z.lazy(() => z.object({
|
||||
id: Bluetooth.RequestDeviceSchema,
|
||||
name: z.union([z.string(), z.null()]),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.RequestDevicePromptSchema = z.lazy(() => z.string());
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.ScanRecordSchema = z.lazy(() => z.object({
|
||||
name: z.string().optional(),
|
||||
uuids: z.array(Bluetooth.BluetoothUuidSchema).optional(),
|
||||
appearance: z.number().optional(),
|
||||
manufacturerData: z
|
||||
.array(Bluetooth.BluetoothManufacturerDataSchema)
|
||||
.optional(),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
export const BluetoothCommandSchema = z.lazy(() => z.union([
|
||||
Bluetooth.HandleRequestDevicePromptSchema,
|
||||
Bluetooth.SimulateAdapterSchema,
|
||||
Bluetooth.DisableSimulationSchema,
|
||||
Bluetooth.SimulatePreconnectedPeripheralSchema,
|
||||
Bluetooth.SimulateAdvertisementSchema,
|
||||
Bluetooth.SimulateGattConnectionResponseSchema,
|
||||
Bluetooth.SimulateGattDisconnectionSchema,
|
||||
Bluetooth.SimulateServiceSchema,
|
||||
Bluetooth.SimulateCharacteristicSchema,
|
||||
Bluetooth.SimulateCharacteristicResponseSchema,
|
||||
Bluetooth.SimulateDescriptorSchema,
|
||||
Bluetooth.SimulateDescriptorResponseSchema,
|
||||
]));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.HandleRequestDevicePromptSchema = z.lazy(() => z.object({
|
||||
method: z.literal('bluetooth.handleRequestDevicePrompt'),
|
||||
params: Bluetooth.HandleRequestDevicePromptParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.HandleRequestDevicePromptParametersSchema = z.lazy(() => z
|
||||
.object({
|
||||
context: z.string(),
|
||||
prompt: Bluetooth.RequestDevicePromptSchema,
|
||||
})
|
||||
.and(z.union([
|
||||
Bluetooth.HandleRequestDevicePromptAcceptParametersSchema,
|
||||
Bluetooth.HandleRequestDevicePromptCancelParametersSchema,
|
||||
])));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.HandleRequestDevicePromptAcceptParametersSchema = z.lazy(() => z.object({
|
||||
accept: z.literal(true),
|
||||
device: Bluetooth.RequestDeviceSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.HandleRequestDevicePromptCancelParametersSchema = z.lazy(() => z.object({
|
||||
accept: z.literal(false),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateAdapterSchema = z.lazy(() => z.object({
|
||||
method: z.literal('bluetooth.simulateAdapter'),
|
||||
params: Bluetooth.SimulateAdapterParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateAdapterParametersSchema = z.lazy(() => z.object({
|
||||
context: z.string(),
|
||||
leSupported: z.boolean().optional(),
|
||||
state: z.enum(['absent', 'powered-off', 'powered-on']),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.DisableSimulationSchema = z.lazy(() => z.object({
|
||||
method: z.literal('bluetooth.disableSimulation'),
|
||||
params: Bluetooth.DisableSimulationParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.DisableSimulationParametersSchema = z.lazy(() => z.object({
|
||||
context: z.string(),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulatePreconnectedPeripheralSchema = z.lazy(() => z.object({
|
||||
method: z.literal('bluetooth.simulatePreconnectedPeripheral'),
|
||||
params: Bluetooth.SimulatePreconnectedPeripheralParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulatePreconnectedPeripheralParametersSchema = z.lazy(() => z.object({
|
||||
context: z.string(),
|
||||
address: z.string(),
|
||||
name: z.string(),
|
||||
manufacturerData: z.array(Bluetooth.BluetoothManufacturerDataSchema),
|
||||
knownServiceUuids: z.array(Bluetooth.BluetoothUuidSchema),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateAdvertisementSchema = z.lazy(() => z.object({
|
||||
method: z.literal('bluetooth.simulateAdvertisement'),
|
||||
params: Bluetooth.SimulateAdvertisementParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateAdvertisementParametersSchema = z.lazy(() => z.object({
|
||||
context: z.string(),
|
||||
scanEntry: Bluetooth.SimulateAdvertisementScanEntryParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateAdvertisementScanEntryParametersSchema = z.lazy(() => z.object({
|
||||
deviceAddress: z.string(),
|
||||
rssi: z.number(),
|
||||
scanRecord: Bluetooth.ScanRecordSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateGattConnectionResponseSchema = z.lazy(() => z.object({
|
||||
method: z.literal('bluetooth.simulateGattConnectionResponse'),
|
||||
params: Bluetooth.SimulateGattConnectionResponseParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateGattConnectionResponseParametersSchema = z.lazy(() => z.object({
|
||||
context: z.string(),
|
||||
address: z.string(),
|
||||
code: z.number().int().nonnegative(),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateGattDisconnectionSchema = z.lazy(() => z.object({
|
||||
method: z.literal('bluetooth.simulateGattDisconnection'),
|
||||
params: Bluetooth.SimulateGattDisconnectionParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateGattDisconnectionParametersSchema = z.lazy(() => z.object({
|
||||
context: z.string(),
|
||||
address: z.string(),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateServiceSchema = z.lazy(() => z.object({
|
||||
method: z.literal('bluetooth.simulateService'),
|
||||
params: Bluetooth.SimulateServiceParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateServiceParametersSchema = z.lazy(() => z.object({
|
||||
context: z.string(),
|
||||
address: z.string(),
|
||||
uuid: Bluetooth.BluetoothUuidSchema,
|
||||
type: z.enum(['add', 'remove']),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateCharacteristicSchema = z.lazy(() => z.object({
|
||||
method: z.literal('bluetooth.simulateCharacteristic'),
|
||||
params: Bluetooth.SimulateCharacteristicParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateCharacteristicParametersSchema = z.lazy(() => z.object({
|
||||
context: z.string(),
|
||||
address: z.string(),
|
||||
serviceUuid: Bluetooth.BluetoothUuidSchema,
|
||||
characteristicUuid: Bluetooth.BluetoothUuidSchema,
|
||||
characteristicProperties: Bluetooth.CharacteristicPropertiesSchema.optional(),
|
||||
type: z.enum(['add', 'remove']),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateCharacteristicResponseSchema = z.lazy(() => z.object({
|
||||
method: z.literal('bluetooth.simulateCharacteristicResponse'),
|
||||
params: Bluetooth.SimulateCharacteristicResponseParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateCharacteristicResponseParametersSchema = z.lazy(() => z.object({
|
||||
context: z.string(),
|
||||
address: z.string(),
|
||||
serviceUuid: Bluetooth.BluetoothUuidSchema,
|
||||
characteristicUuid: Bluetooth.BluetoothUuidSchema,
|
||||
type: z.enum([
|
||||
'read',
|
||||
'write',
|
||||
'subscribe-to-notifications',
|
||||
'unsubscribe-from-notifications',
|
||||
]),
|
||||
code: z.number().int().nonnegative(),
|
||||
data: z.array(z.number().int().nonnegative()).optional(),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateDescriptorSchema = z.lazy(() => z.object({
|
||||
method: z.literal('bluetooth.simulateDescriptor'),
|
||||
params: Bluetooth.SimulateDescriptorParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateDescriptorParametersSchema = z.lazy(() => z.object({
|
||||
context: z.string(),
|
||||
address: z.string(),
|
||||
serviceUuid: Bluetooth.BluetoothUuidSchema,
|
||||
characteristicUuid: Bluetooth.BluetoothUuidSchema,
|
||||
descriptorUuid: Bluetooth.BluetoothUuidSchema,
|
||||
type: z.enum(['add', 'remove']),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateDescriptorResponseSchema = z.lazy(() => z.object({
|
||||
method: z.literal('bluetooth.simulateDescriptorResponse'),
|
||||
params: Bluetooth.SimulateDescriptorResponseParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.SimulateDescriptorResponseParametersSchema = z.lazy(() => z.object({
|
||||
context: z.string(),
|
||||
address: z.string(),
|
||||
serviceUuid: Bluetooth.BluetoothUuidSchema,
|
||||
characteristicUuid: Bluetooth.BluetoothUuidSchema,
|
||||
descriptorUuid: Bluetooth.BluetoothUuidSchema,
|
||||
type: z.enum(['read', 'write']),
|
||||
code: z.number().int().nonnegative(),
|
||||
data: z.array(z.number().int().nonnegative()).optional(),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
export const BluetoothEventSchema = z.lazy(() => z.union([
|
||||
Bluetooth.RequestDevicePromptUpdatedSchema,
|
||||
Bluetooth.GattConnectionAttemptedSchema,
|
||||
]));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.RequestDevicePromptUpdatedSchema = z.lazy(() => z.object({
|
||||
method: z.literal('bluetooth.requestDevicePromptUpdated'),
|
||||
params: Bluetooth.RequestDevicePromptUpdatedParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.RequestDevicePromptUpdatedParametersSchema = z.lazy(() => z.object({
|
||||
context: z.string(),
|
||||
prompt: Bluetooth.RequestDevicePromptSchema,
|
||||
devices: z.array(Bluetooth.RequestDeviceInfoSchema),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.GattConnectionAttemptedSchema = z.lazy(() => z.object({
|
||||
method: z.literal('bluetooth.gattConnectionAttempted'),
|
||||
params: Bluetooth.GattConnectionAttemptedParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.GattConnectionAttemptedParametersSchema = z.lazy(() => z.object({
|
||||
context: z.string(),
|
||||
address: z.string(),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.CharacteristicEventGeneratedSchema = z.lazy(() => z.object({
|
||||
method: z.literal('bluetooth.characteristicEventGenerated'),
|
||||
params: Bluetooth.CharacteristicEventGeneratedParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.CharacteristicEventGeneratedParametersSchema = z.lazy(() => z.object({
|
||||
context: z.string(),
|
||||
address: z.string(),
|
||||
serviceUuid: Bluetooth.BluetoothUuidSchema,
|
||||
characteristicUuid: Bluetooth.BluetoothUuidSchema,
|
||||
type: z.enum([
|
||||
'read',
|
||||
'write-with-response',
|
||||
'write-without-response',
|
||||
'subscribe-to-notifications',
|
||||
'unsubscribe-from-notifications',
|
||||
]),
|
||||
data: z.array(z.number().int().nonnegative()).optional(),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.DescriptorEventGeneratedSchema = z.lazy(() => z.object({
|
||||
method: z.literal('bluetooth.descriptorEventGenerated'),
|
||||
params: Bluetooth.DescriptorEventGeneratedParametersSchema,
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
(function (Bluetooth) {
|
||||
Bluetooth.DescriptorEventGeneratedParametersSchema = z.lazy(() => z.object({
|
||||
context: z.string(),
|
||||
address: z.string(),
|
||||
serviceUuid: Bluetooth.BluetoothUuidSchema,
|
||||
characteristicUuid: Bluetooth.BluetoothUuidSchema,
|
||||
descriptorUuid: Bluetooth.BluetoothUuidSchema,
|
||||
type: z.enum(['read', 'write']),
|
||||
data: z.array(z.number().int().nonnegative()).optional(),
|
||||
}));
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
//# sourceMappingURL=webdriver-bidi-bluetooth.js.map
|
||||
1
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-bluetooth.js.map
generated
vendored
Normal file
1
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-bluetooth.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
102
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-nav-speculation.d.ts
generated
vendored
Normal file
102
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-nav-speculation.d.ts
generated
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
/**
|
||||
* Copyright 2024 Google LLC.
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* THIS FILE IS AUTOGENERATED by cddlconv 0.1.7.
|
||||
* Run `node tools/generate-bidi-types.mjs` to regenerate.
|
||||
* @see https://github.com/w3c/webdriver-bidi/blob/master/index.bs
|
||||
*/
|
||||
import z from 'zod';
|
||||
export declare namespace Speculation {
|
||||
const PreloadingStatusSchema: z.ZodLazy<z.ZodEnum<["pending", "ready", "success", "failure"]>>;
|
||||
}
|
||||
export declare const SpeculationEventSchema: z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
||||
method: z.ZodLiteral<"speculation.prefetchStatusUpdated">;
|
||||
params: z.ZodLazy<z.ZodObject<{
|
||||
context: z.ZodString;
|
||||
url: z.ZodString;
|
||||
status: z.ZodLazy<z.ZodEnum<["pending", "ready", "success", "failure"]>>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
url: string;
|
||||
status: "success" | "pending" | "ready" | "failure";
|
||||
context: string;
|
||||
}, {
|
||||
url: string;
|
||||
status: "success" | "pending" | "ready" | "failure";
|
||||
context: string;
|
||||
}>>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
params: {
|
||||
url: string;
|
||||
status: "success" | "pending" | "ready" | "failure";
|
||||
context: string;
|
||||
};
|
||||
method: "speculation.prefetchStatusUpdated";
|
||||
}, {
|
||||
params: {
|
||||
url: string;
|
||||
status: "success" | "pending" | "ready" | "failure";
|
||||
context: string;
|
||||
};
|
||||
method: "speculation.prefetchStatusUpdated";
|
||||
}>>>;
|
||||
export declare namespace Speculation {
|
||||
const PrefetchStatusUpdatedSchema: z.ZodLazy<z.ZodObject<{
|
||||
method: z.ZodLiteral<"speculation.prefetchStatusUpdated">;
|
||||
params: z.ZodLazy<z.ZodObject<{
|
||||
context: z.ZodString;
|
||||
url: z.ZodString;
|
||||
status: z.ZodLazy<z.ZodEnum<["pending", "ready", "success", "failure"]>>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
url: string;
|
||||
status: "success" | "pending" | "ready" | "failure";
|
||||
context: string;
|
||||
}, {
|
||||
url: string;
|
||||
status: "success" | "pending" | "ready" | "failure";
|
||||
context: string;
|
||||
}>>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
params: {
|
||||
url: string;
|
||||
status: "success" | "pending" | "ready" | "failure";
|
||||
context: string;
|
||||
};
|
||||
method: "speculation.prefetchStatusUpdated";
|
||||
}, {
|
||||
params: {
|
||||
url: string;
|
||||
status: "success" | "pending" | "ready" | "failure";
|
||||
context: string;
|
||||
};
|
||||
method: "speculation.prefetchStatusUpdated";
|
||||
}>>;
|
||||
}
|
||||
export declare namespace Speculation {
|
||||
const PrefetchStatusUpdatedParametersSchema: z.ZodLazy<z.ZodObject<{
|
||||
context: z.ZodString;
|
||||
url: z.ZodString;
|
||||
status: z.ZodLazy<z.ZodEnum<["pending", "ready", "success", "failure"]>>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
url: string;
|
||||
status: "success" | "pending" | "ready" | "failure";
|
||||
context: string;
|
||||
}, {
|
||||
url: string;
|
||||
status: "success" | "pending" | "ready" | "failure";
|
||||
context: string;
|
||||
}>>;
|
||||
}
|
||||
43
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-nav-speculation.js
generated
vendored
Normal file
43
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-nav-speculation.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* Copyright 2024 Google LLC.
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* THIS FILE IS AUTOGENERATED by cddlconv 0.1.7.
|
||||
* Run `node tools/generate-bidi-types.mjs` to regenerate.
|
||||
* @see https://github.com/w3c/webdriver-bidi/blob/master/index.bs
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-nocheck Some types may be circular.
|
||||
import z from 'zod';
|
||||
export var Speculation;
|
||||
(function (Speculation) {
|
||||
Speculation.PreloadingStatusSchema = z.lazy(() => z.enum(['pending', 'ready', 'success', 'failure']));
|
||||
})(Speculation || (Speculation = {}));
|
||||
export const SpeculationEventSchema = z.lazy(() => Speculation.PrefetchStatusUpdatedSchema);
|
||||
(function (Speculation) {
|
||||
Speculation.PrefetchStatusUpdatedSchema = z.lazy(() => z.object({
|
||||
method: z.literal('speculation.prefetchStatusUpdated'),
|
||||
params: Speculation.PrefetchStatusUpdatedParametersSchema,
|
||||
}));
|
||||
})(Speculation || (Speculation = {}));
|
||||
(function (Speculation) {
|
||||
Speculation.PrefetchStatusUpdatedParametersSchema = z.lazy(() => z.object({
|
||||
context: z.string(),
|
||||
url: z.string(),
|
||||
status: Speculation.PreloadingStatusSchema,
|
||||
}));
|
||||
})(Speculation || (Speculation = {}));
|
||||
//# sourceMappingURL=webdriver-bidi-nav-speculation.js.map
|
||||
1
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-nav-speculation.js.map
generated
vendored
Normal file
1
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-nav-speculation.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"webdriver-bidi-nav-speculation.js","sourceRoot":"","sources":["../../../../src/protocol-parser/generated/webdriver-bidi-nav-speculation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;GAIG;AAEH,6DAA6D;AAC7D,0CAA0C;AAE1C,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,KAAW,WAAW,CAI3B;AAJD,WAAiB,WAAW;IACb,kCAAsB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAChD,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CACnD,CAAC;AACJ,CAAC,EAJgB,WAAW,KAAX,WAAW,QAI3B;AACD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAC1C,GAAG,EAAE,CAAC,WAAW,CAAC,2BAA2B,CAC9C,CAAC;AACF,WAAiB,WAAW;IACb,uCAA2B,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACrD,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,mCAAmC,CAAC;QACtD,MAAM,EAAE,WAAW,CAAC,qCAAqC;KAC1D,CAAC,CACH,CAAC;AACJ,CAAC,EAPgB,WAAW,KAAX,WAAW,QAO3B;AACD,WAAiB,WAAW;IACb,iDAAqC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC/D,CAAC,CAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;QACf,MAAM,EAAE,WAAW,CAAC,sBAAsB;KAC3C,CAAC,CACH,CAAC;AACJ,CAAC,EARgB,WAAW,KAAX,WAAW,QAQ3B"}
|
||||
175
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-permissions.d.ts
generated
vendored
Normal file
175
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-permissions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,175 @@
|
||||
/**
|
||||
* Copyright 2024 Google LLC.
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* THIS FILE IS AUTOGENERATED by cddlconv 0.1.7.
|
||||
* Run `node tools/generate-bidi-types.mjs` to regenerate.
|
||||
* @see https://github.com/w3c/webdriver-bidi/blob/master/index.bs
|
||||
*/
|
||||
import z from 'zod';
|
||||
export declare const PermissionsCommandSchema: z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
||||
method: z.ZodLiteral<"permissions.setPermission">;
|
||||
params: z.ZodLazy<z.ZodObject<{
|
||||
descriptor: z.ZodLazy<z.ZodObject<{
|
||||
name: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
name: string;
|
||||
}, {
|
||||
name: string;
|
||||
}>>;
|
||||
state: z.ZodLazy<z.ZodEnum<["granted", "denied", "prompt"]>>;
|
||||
origin: z.ZodString;
|
||||
embeddedOrigin: z.ZodOptional<z.ZodString>;
|
||||
userContext: z.ZodOptional<z.ZodString>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
origin: string;
|
||||
state: "granted" | "denied" | "prompt";
|
||||
descriptor: {
|
||||
name: string;
|
||||
};
|
||||
userContext?: string | undefined;
|
||||
embeddedOrigin?: string | undefined;
|
||||
}, {
|
||||
origin: string;
|
||||
state: "granted" | "denied" | "prompt";
|
||||
descriptor: {
|
||||
name: string;
|
||||
};
|
||||
userContext?: string | undefined;
|
||||
embeddedOrigin?: string | undefined;
|
||||
}>>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
params: {
|
||||
origin: string;
|
||||
state: "granted" | "denied" | "prompt";
|
||||
descriptor: {
|
||||
name: string;
|
||||
};
|
||||
userContext?: string | undefined;
|
||||
embeddedOrigin?: string | undefined;
|
||||
};
|
||||
method: "permissions.setPermission";
|
||||
}, {
|
||||
params: {
|
||||
origin: string;
|
||||
state: "granted" | "denied" | "prompt";
|
||||
descriptor: {
|
||||
name: string;
|
||||
};
|
||||
userContext?: string | undefined;
|
||||
embeddedOrigin?: string | undefined;
|
||||
};
|
||||
method: "permissions.setPermission";
|
||||
}>>>;
|
||||
export declare namespace Permissions {
|
||||
const PermissionDescriptorSchema: z.ZodLazy<z.ZodObject<{
|
||||
name: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
name: string;
|
||||
}, {
|
||||
name: string;
|
||||
}>>;
|
||||
}
|
||||
export declare namespace Permissions {
|
||||
const PermissionStateSchema: z.ZodLazy<z.ZodEnum<["granted", "denied", "prompt"]>>;
|
||||
}
|
||||
export declare namespace Permissions {
|
||||
const SetPermissionSchema: z.ZodLazy<z.ZodObject<{
|
||||
method: z.ZodLiteral<"permissions.setPermission">;
|
||||
params: z.ZodLazy<z.ZodObject<{
|
||||
descriptor: z.ZodLazy<z.ZodObject<{
|
||||
name: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
name: string;
|
||||
}, {
|
||||
name: string;
|
||||
}>>;
|
||||
state: z.ZodLazy<z.ZodEnum<["granted", "denied", "prompt"]>>;
|
||||
origin: z.ZodString;
|
||||
embeddedOrigin: z.ZodOptional<z.ZodString>;
|
||||
userContext: z.ZodOptional<z.ZodString>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
origin: string;
|
||||
state: "granted" | "denied" | "prompt";
|
||||
descriptor: {
|
||||
name: string;
|
||||
};
|
||||
userContext?: string | undefined;
|
||||
embeddedOrigin?: string | undefined;
|
||||
}, {
|
||||
origin: string;
|
||||
state: "granted" | "denied" | "prompt";
|
||||
descriptor: {
|
||||
name: string;
|
||||
};
|
||||
userContext?: string | undefined;
|
||||
embeddedOrigin?: string | undefined;
|
||||
}>>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
params: {
|
||||
origin: string;
|
||||
state: "granted" | "denied" | "prompt";
|
||||
descriptor: {
|
||||
name: string;
|
||||
};
|
||||
userContext?: string | undefined;
|
||||
embeddedOrigin?: string | undefined;
|
||||
};
|
||||
method: "permissions.setPermission";
|
||||
}, {
|
||||
params: {
|
||||
origin: string;
|
||||
state: "granted" | "denied" | "prompt";
|
||||
descriptor: {
|
||||
name: string;
|
||||
};
|
||||
userContext?: string | undefined;
|
||||
embeddedOrigin?: string | undefined;
|
||||
};
|
||||
method: "permissions.setPermission";
|
||||
}>>;
|
||||
}
|
||||
export declare namespace Permissions {
|
||||
const SetPermissionParametersSchema: z.ZodLazy<z.ZodObject<{
|
||||
descriptor: z.ZodLazy<z.ZodObject<{
|
||||
name: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
name: string;
|
||||
}, {
|
||||
name: string;
|
||||
}>>;
|
||||
state: z.ZodLazy<z.ZodEnum<["granted", "denied", "prompt"]>>;
|
||||
origin: z.ZodString;
|
||||
embeddedOrigin: z.ZodOptional<z.ZodString>;
|
||||
userContext: z.ZodOptional<z.ZodString>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
origin: string;
|
||||
state: "granted" | "denied" | "prompt";
|
||||
descriptor: {
|
||||
name: string;
|
||||
};
|
||||
userContext?: string | undefined;
|
||||
embeddedOrigin?: string | undefined;
|
||||
}, {
|
||||
origin: string;
|
||||
state: "granted" | "denied" | "prompt";
|
||||
descriptor: {
|
||||
name: string;
|
||||
};
|
||||
userContext?: string | undefined;
|
||||
embeddedOrigin?: string | undefined;
|
||||
}>>;
|
||||
}
|
||||
50
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-permissions.js
generated
vendored
Normal file
50
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-permissions.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* Copyright 2024 Google LLC.
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* THIS FILE IS AUTOGENERATED by cddlconv 0.1.7.
|
||||
* Run `node tools/generate-bidi-types.mjs` to regenerate.
|
||||
* @see https://github.com/w3c/webdriver-bidi/blob/master/index.bs
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-nocheck Some types may be circular.
|
||||
import z from 'zod';
|
||||
export const PermissionsCommandSchema = z.lazy(() => Permissions.SetPermissionSchema);
|
||||
export var Permissions;
|
||||
(function (Permissions) {
|
||||
Permissions.PermissionDescriptorSchema = z.lazy(() => z.object({
|
||||
name: z.string(),
|
||||
}));
|
||||
})(Permissions || (Permissions = {}));
|
||||
(function (Permissions) {
|
||||
Permissions.PermissionStateSchema = z.lazy(() => z.enum(['granted', 'denied', 'prompt']));
|
||||
})(Permissions || (Permissions = {}));
|
||||
(function (Permissions) {
|
||||
Permissions.SetPermissionSchema = z.lazy(() => z.object({
|
||||
method: z.literal('permissions.setPermission'),
|
||||
params: Permissions.SetPermissionParametersSchema,
|
||||
}));
|
||||
})(Permissions || (Permissions = {}));
|
||||
(function (Permissions) {
|
||||
Permissions.SetPermissionParametersSchema = z.lazy(() => z.object({
|
||||
descriptor: Permissions.PermissionDescriptorSchema,
|
||||
state: Permissions.PermissionStateSchema,
|
||||
origin: z.string(),
|
||||
embeddedOrigin: z.string().optional(),
|
||||
userContext: z.string().optional(),
|
||||
}));
|
||||
})(Permissions || (Permissions = {}));
|
||||
//# sourceMappingURL=webdriver-bidi-permissions.js.map
|
||||
1
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-permissions.js.map
generated
vendored
Normal file
1
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-permissions.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"webdriver-bidi-permissions.js","sourceRoot":"","sources":["../../../../src/protocol-parser/generated/webdriver-bidi-permissions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;GAIG;AAEH,6DAA6D;AAC7D,0CAA0C;AAE1C,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAC5C,GAAG,EAAE,CAAC,WAAW,CAAC,mBAAmB,CACtC,CAAC;AACF,MAAM,KAAW,WAAW,CAM3B;AAND,WAAiB,WAAW;IACb,sCAA0B,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACpD,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;KACjB,CAAC,CACH,CAAC;AACJ,CAAC,EANgB,WAAW,KAAX,WAAW,QAM3B;AACD,WAAiB,WAAW;IACb,iCAAqB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC/C,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CACxC,CAAC;AACJ,CAAC,EAJgB,WAAW,KAAX,WAAW,QAI3B;AACD,WAAiB,WAAW;IACb,+BAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC7C,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC;QAC9C,MAAM,EAAE,WAAW,CAAC,6BAA6B;KAClD,CAAC,CACH,CAAC;AACJ,CAAC,EAPgB,WAAW,KAAX,WAAW,QAO3B;AACD,WAAiB,WAAW;IACb,yCAA6B,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACvD,CAAC,CAAC,MAAM,CAAC;QACP,UAAU,EAAE,WAAW,CAAC,0BAA0B;QAClD,KAAK,EAAE,WAAW,CAAC,qBAAqB;QACxC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAClB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACrC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACnC,CAAC,CACH,CAAC;AACJ,CAAC,EAVgB,WAAW,KAAX,WAAW,QAU3B"}
|
||||
427
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-ua-client-hints.d.ts
generated
vendored
Normal file
427
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-ua-client-hints.d.ts
generated
vendored
Normal file
@@ -0,0 +1,427 @@
|
||||
/**
|
||||
* Copyright 2024 Google LLC.
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* THIS FILE IS AUTOGENERATED by cddlconv 0.1.7.
|
||||
* Run `node tools/generate-bidi-types.mjs` to regenerate.
|
||||
* @see https://github.com/w3c/webdriver-bidi/blob/master/index.bs
|
||||
*/
|
||||
import z from 'zod';
|
||||
export declare const UserAgentClientHintsCommandSchema: z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
||||
method: z.ZodLiteral<"emulation.setClientHintsOverride">;
|
||||
params: z.ZodObject<{
|
||||
clientHints: z.ZodUnion<[z.ZodLazy<z.ZodObject<{
|
||||
brands: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
||||
brand: z.ZodString;
|
||||
version: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
brand: string;
|
||||
version: string;
|
||||
}, {
|
||||
brand: string;
|
||||
version: string;
|
||||
}>>, "many">>;
|
||||
fullVersionList: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
||||
brand: z.ZodString;
|
||||
version: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
brand: string;
|
||||
version: string;
|
||||
}, {
|
||||
brand: string;
|
||||
version: string;
|
||||
}>>, "many">>;
|
||||
platform: z.ZodOptional<z.ZodString>;
|
||||
platformVersion: z.ZodOptional<z.ZodString>;
|
||||
architecture: z.ZodOptional<z.ZodString>;
|
||||
model: z.ZodOptional<z.ZodString>;
|
||||
mobile: z.ZodOptional<z.ZodBoolean>;
|
||||
bitness: z.ZodOptional<z.ZodString>;
|
||||
wow64: z.ZodOptional<z.ZodBoolean>;
|
||||
formFactors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
mobile?: boolean | undefined;
|
||||
brands?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
fullVersionList?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
platform?: string | undefined;
|
||||
platformVersion?: string | undefined;
|
||||
architecture?: string | undefined;
|
||||
model?: string | undefined;
|
||||
bitness?: string | undefined;
|
||||
wow64?: boolean | undefined;
|
||||
formFactors?: string[] | undefined;
|
||||
}, {
|
||||
mobile?: boolean | undefined;
|
||||
brands?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
fullVersionList?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
platform?: string | undefined;
|
||||
platformVersion?: string | undefined;
|
||||
architecture?: string | undefined;
|
||||
model?: string | undefined;
|
||||
bitness?: string | undefined;
|
||||
wow64?: boolean | undefined;
|
||||
formFactors?: string[] | undefined;
|
||||
}>>, z.ZodNull]>;
|
||||
contexts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
||||
userContexts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
clientHints: {
|
||||
mobile?: boolean | undefined;
|
||||
brands?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
fullVersionList?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
platform?: string | undefined;
|
||||
platformVersion?: string | undefined;
|
||||
architecture?: string | undefined;
|
||||
model?: string | undefined;
|
||||
bitness?: string | undefined;
|
||||
wow64?: boolean | undefined;
|
||||
formFactors?: string[] | undefined;
|
||||
} | null;
|
||||
userContexts?: string[] | undefined;
|
||||
contexts?: string[] | undefined;
|
||||
}, {
|
||||
clientHints: {
|
||||
mobile?: boolean | undefined;
|
||||
brands?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
fullVersionList?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
platform?: string | undefined;
|
||||
platformVersion?: string | undefined;
|
||||
architecture?: string | undefined;
|
||||
model?: string | undefined;
|
||||
bitness?: string | undefined;
|
||||
wow64?: boolean | undefined;
|
||||
formFactors?: string[] | undefined;
|
||||
} | null;
|
||||
userContexts?: string[] | undefined;
|
||||
contexts?: string[] | undefined;
|
||||
}>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
params: {
|
||||
clientHints: {
|
||||
mobile?: boolean | undefined;
|
||||
brands?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
fullVersionList?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
platform?: string | undefined;
|
||||
platformVersion?: string | undefined;
|
||||
architecture?: string | undefined;
|
||||
model?: string | undefined;
|
||||
bitness?: string | undefined;
|
||||
wow64?: boolean | undefined;
|
||||
formFactors?: string[] | undefined;
|
||||
} | null;
|
||||
userContexts?: string[] | undefined;
|
||||
contexts?: string[] | undefined;
|
||||
};
|
||||
method: "emulation.setClientHintsOverride";
|
||||
}, {
|
||||
params: {
|
||||
clientHints: {
|
||||
mobile?: boolean | undefined;
|
||||
brands?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
fullVersionList?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
platform?: string | undefined;
|
||||
platformVersion?: string | undefined;
|
||||
architecture?: string | undefined;
|
||||
model?: string | undefined;
|
||||
bitness?: string | undefined;
|
||||
wow64?: boolean | undefined;
|
||||
formFactors?: string[] | undefined;
|
||||
} | null;
|
||||
userContexts?: string[] | undefined;
|
||||
contexts?: string[] | undefined;
|
||||
};
|
||||
method: "emulation.setClientHintsOverride";
|
||||
}>>>;
|
||||
export declare namespace Emulation {
|
||||
const SetClientHintsOverrideCommandSchema: z.ZodLazy<z.ZodObject<{
|
||||
method: z.ZodLiteral<"emulation.setClientHintsOverride">;
|
||||
params: z.ZodObject<{
|
||||
clientHints: z.ZodUnion<[z.ZodLazy<z.ZodObject<{
|
||||
brands: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
||||
brand: z.ZodString;
|
||||
version: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
brand: string;
|
||||
version: string;
|
||||
}, {
|
||||
brand: string;
|
||||
version: string;
|
||||
}>>, "many">>;
|
||||
fullVersionList: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
||||
brand: z.ZodString;
|
||||
version: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
brand: string;
|
||||
version: string;
|
||||
}, {
|
||||
brand: string;
|
||||
version: string;
|
||||
}>>, "many">>;
|
||||
platform: z.ZodOptional<z.ZodString>;
|
||||
platformVersion: z.ZodOptional<z.ZodString>;
|
||||
architecture: z.ZodOptional<z.ZodString>;
|
||||
model: z.ZodOptional<z.ZodString>;
|
||||
mobile: z.ZodOptional<z.ZodBoolean>;
|
||||
bitness: z.ZodOptional<z.ZodString>;
|
||||
wow64: z.ZodOptional<z.ZodBoolean>;
|
||||
formFactors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
mobile?: boolean | undefined;
|
||||
brands?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
fullVersionList?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
platform?: string | undefined;
|
||||
platformVersion?: string | undefined;
|
||||
architecture?: string | undefined;
|
||||
model?: string | undefined;
|
||||
bitness?: string | undefined;
|
||||
wow64?: boolean | undefined;
|
||||
formFactors?: string[] | undefined;
|
||||
}, {
|
||||
mobile?: boolean | undefined;
|
||||
brands?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
fullVersionList?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
platform?: string | undefined;
|
||||
platformVersion?: string | undefined;
|
||||
architecture?: string | undefined;
|
||||
model?: string | undefined;
|
||||
bitness?: string | undefined;
|
||||
wow64?: boolean | undefined;
|
||||
formFactors?: string[] | undefined;
|
||||
}>>, z.ZodNull]>;
|
||||
contexts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
||||
userContexts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
clientHints: {
|
||||
mobile?: boolean | undefined;
|
||||
brands?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
fullVersionList?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
platform?: string | undefined;
|
||||
platformVersion?: string | undefined;
|
||||
architecture?: string | undefined;
|
||||
model?: string | undefined;
|
||||
bitness?: string | undefined;
|
||||
wow64?: boolean | undefined;
|
||||
formFactors?: string[] | undefined;
|
||||
} | null;
|
||||
userContexts?: string[] | undefined;
|
||||
contexts?: string[] | undefined;
|
||||
}, {
|
||||
clientHints: {
|
||||
mobile?: boolean | undefined;
|
||||
brands?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
fullVersionList?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
platform?: string | undefined;
|
||||
platformVersion?: string | undefined;
|
||||
architecture?: string | undefined;
|
||||
model?: string | undefined;
|
||||
bitness?: string | undefined;
|
||||
wow64?: boolean | undefined;
|
||||
formFactors?: string[] | undefined;
|
||||
} | null;
|
||||
userContexts?: string[] | undefined;
|
||||
contexts?: string[] | undefined;
|
||||
}>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
params: {
|
||||
clientHints: {
|
||||
mobile?: boolean | undefined;
|
||||
brands?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
fullVersionList?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
platform?: string | undefined;
|
||||
platformVersion?: string | undefined;
|
||||
architecture?: string | undefined;
|
||||
model?: string | undefined;
|
||||
bitness?: string | undefined;
|
||||
wow64?: boolean | undefined;
|
||||
formFactors?: string[] | undefined;
|
||||
} | null;
|
||||
userContexts?: string[] | undefined;
|
||||
contexts?: string[] | undefined;
|
||||
};
|
||||
method: "emulation.setClientHintsOverride";
|
||||
}, {
|
||||
params: {
|
||||
clientHints: {
|
||||
mobile?: boolean | undefined;
|
||||
brands?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
fullVersionList?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
platform?: string | undefined;
|
||||
platformVersion?: string | undefined;
|
||||
architecture?: string | undefined;
|
||||
model?: string | undefined;
|
||||
bitness?: string | undefined;
|
||||
wow64?: boolean | undefined;
|
||||
formFactors?: string[] | undefined;
|
||||
} | null;
|
||||
userContexts?: string[] | undefined;
|
||||
contexts?: string[] | undefined;
|
||||
};
|
||||
method: "emulation.setClientHintsOverride";
|
||||
}>>;
|
||||
}
|
||||
export declare namespace Emulation {
|
||||
const ClientHintsMetadataSchema: z.ZodLazy<z.ZodObject<{
|
||||
brands: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
||||
brand: z.ZodString;
|
||||
version: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
brand: string;
|
||||
version: string;
|
||||
}, {
|
||||
brand: string;
|
||||
version: string;
|
||||
}>>, "many">>;
|
||||
fullVersionList: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
||||
brand: z.ZodString;
|
||||
version: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
brand: string;
|
||||
version: string;
|
||||
}, {
|
||||
brand: string;
|
||||
version: string;
|
||||
}>>, "many">>;
|
||||
platform: z.ZodOptional<z.ZodString>;
|
||||
platformVersion: z.ZodOptional<z.ZodString>;
|
||||
architecture: z.ZodOptional<z.ZodString>;
|
||||
model: z.ZodOptional<z.ZodString>;
|
||||
mobile: z.ZodOptional<z.ZodBoolean>;
|
||||
bitness: z.ZodOptional<z.ZodString>;
|
||||
wow64: z.ZodOptional<z.ZodBoolean>;
|
||||
formFactors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
mobile?: boolean | undefined;
|
||||
brands?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
fullVersionList?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
platform?: string | undefined;
|
||||
platformVersion?: string | undefined;
|
||||
architecture?: string | undefined;
|
||||
model?: string | undefined;
|
||||
bitness?: string | undefined;
|
||||
wow64?: boolean | undefined;
|
||||
formFactors?: string[] | undefined;
|
||||
}, {
|
||||
mobile?: boolean | undefined;
|
||||
brands?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
fullVersionList?: {
|
||||
brand: string;
|
||||
version: string;
|
||||
}[] | undefined;
|
||||
platform?: string | undefined;
|
||||
platformVersion?: string | undefined;
|
||||
architecture?: string | undefined;
|
||||
model?: string | undefined;
|
||||
bitness?: string | undefined;
|
||||
wow64?: boolean | undefined;
|
||||
formFactors?: string[] | undefined;
|
||||
}>>;
|
||||
}
|
||||
export declare namespace Emulation {
|
||||
const BrandVersionSchema: z.ZodLazy<z.ZodObject<{
|
||||
brand: z.ZodString;
|
||||
version: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
brand: string;
|
||||
version: string;
|
||||
}, {
|
||||
brand: string;
|
||||
version: string;
|
||||
}>>;
|
||||
}
|
||||
export declare namespace Emulation {
|
||||
const SetClientHintsOverrideResultSchema: z.ZodLazy<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
||||
}
|
||||
60
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-ua-client-hints.js
generated
vendored
Normal file
60
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-ua-client-hints.js
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* Copyright 2024 Google LLC.
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* THIS FILE IS AUTOGENERATED by cddlconv 0.1.7.
|
||||
* Run `node tools/generate-bidi-types.mjs` to regenerate.
|
||||
* @see https://github.com/w3c/webdriver-bidi/blob/master/index.bs
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-nocheck Some types may be circular.
|
||||
import z from 'zod';
|
||||
export const UserAgentClientHintsCommandSchema = z.lazy(() => Emulation.SetClientHintsOverrideCommandSchema);
|
||||
export var Emulation;
|
||||
(function (Emulation) {
|
||||
Emulation.SetClientHintsOverrideCommandSchema = z.lazy(() => z.object({
|
||||
method: z.literal('emulation.setClientHintsOverride'),
|
||||
params: z.object({
|
||||
clientHints: z.union([Emulation.ClientHintsMetadataSchema, z.null()]),
|
||||
contexts: z.array(z.string()).min(1).optional(),
|
||||
userContexts: z.array(z.string()).min(1).optional(),
|
||||
}),
|
||||
}));
|
||||
})(Emulation || (Emulation = {}));
|
||||
(function (Emulation) {
|
||||
Emulation.ClientHintsMetadataSchema = z.lazy(() => z.object({
|
||||
brands: z.array(Emulation.BrandVersionSchema).optional(),
|
||||
fullVersionList: z.array(Emulation.BrandVersionSchema).optional(),
|
||||
platform: z.string().optional(),
|
||||
platformVersion: z.string().optional(),
|
||||
architecture: z.string().optional(),
|
||||
model: z.string().optional(),
|
||||
mobile: z.boolean().optional(),
|
||||
bitness: z.string().optional(),
|
||||
wow64: z.boolean().optional(),
|
||||
formFactors: z.array(z.string()).optional(),
|
||||
}));
|
||||
})(Emulation || (Emulation = {}));
|
||||
(function (Emulation) {
|
||||
Emulation.BrandVersionSchema = z.lazy(() => z.object({
|
||||
brand: z.string(),
|
||||
version: z.string(),
|
||||
}));
|
||||
})(Emulation || (Emulation = {}));
|
||||
(function (Emulation) {
|
||||
Emulation.SetClientHintsOverrideResultSchema = z.lazy(() => z.object({}));
|
||||
})(Emulation || (Emulation = {}));
|
||||
//# sourceMappingURL=webdriver-bidi-ua-client-hints.js.map
|
||||
1
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-ua-client-hints.js.map
generated
vendored
Normal file
1
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi-ua-client-hints.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"webdriver-bidi-ua-client-hints.js","sourceRoot":"","sources":["../../../../src/protocol-parser/generated/webdriver-bidi-ua-client-hints.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;GAIG;AAEH,6DAA6D;AAC7D,0CAA0C;AAE1C,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,IAAI,CACrD,GAAG,EAAE,CAAC,SAAS,CAAC,mCAAmC,CACpD,CAAC;AACF,MAAM,KAAW,SAAS,CAWzB;AAXD,WAAiB,SAAS;IACX,6CAAmC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC7D,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC;QACrD,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,yBAAyB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YACrE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YAC/C,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;SACpD,CAAC;KACH,CAAC,CACH,CAAC;AACJ,CAAC,EAXgB,SAAS,KAAT,SAAS,QAWzB;AACD,WAAiB,SAAS;IACX,mCAAyB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACnD,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;QACxD,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;QACjE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACtC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACnC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC5B,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAC9B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAC7B,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;KAC5C,CAAC,CACH,CAAC;AACJ,CAAC,EAfgB,SAAS,KAAT,SAAS,QAezB;AACD,WAAiB,SAAS;IACX,4BAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC5C,CAAC,CAAC,MAAM,CAAC;QACP,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC,CACH,CAAC;AACJ,CAAC,EAPgB,SAAS,KAAT,SAAS,QAOzB;AACD,WAAiB,SAAS;IACX,4CAAkC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/E,CAAC,EAFgB,SAAS,KAAT,SAAS,QAEzB"}
|
||||
64861
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi.d.ts
generated
vendored
Normal file
64861
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2955
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi.js
generated
vendored
Normal file
2955
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi.js.map
generated
vendored
Normal file
1
node_modules/chromium-bidi/lib/esm/protocol-parser/generated/webdriver-bidi.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
175
node_modules/chromium-bidi/lib/esm/protocol-parser/protocol-parser.d.ts
generated
vendored
Normal file
175
node_modules/chromium-bidi/lib/esm/protocol-parser/protocol-parser.d.ts
generated
vendored
Normal file
@@ -0,0 +1,175 @@
|
||||
/**
|
||||
* Copyright 2022 Google LLC.
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* @fileoverview Provides parsing and validator for WebDriver BiDi protocol.
|
||||
* Parser types should match the `../protocol` types.
|
||||
*/
|
||||
import { z, type ZodType } from 'zod';
|
||||
import type * as Protocol from '../protocol/protocol.js';
|
||||
export declare function parseObject<T extends ZodType>(obj: unknown, schema: T): z.infer<T>;
|
||||
/** @see https://w3c.github.io/webdriver-bidi/#module-browser */
|
||||
export declare namespace Browser {
|
||||
function parseCreateUserContextParameters(params: unknown): Protocol.Browser.CreateUserContextParameters;
|
||||
function parseRemoveUserContextParameters(params: unknown): Protocol.Browser.RemoveUserContextParameters;
|
||||
function parseSetClientWindowStateParameters(params: unknown): Protocol.Browser.SetClientWindowStateParameters;
|
||||
function parseSetDownloadBehaviorParameters(params: unknown): Protocol.Browser.SetDownloadBehaviorParameters;
|
||||
}
|
||||
/** @see https://w3c.github.io/webdriver-bidi/#module-network */
|
||||
export declare namespace Network {
|
||||
function parseAddDataCollectorParameters(params: unknown): Protocol.Network.AddDataCollectorParameters;
|
||||
function parseAddInterceptParameters(params: unknown): Protocol.Network.AddInterceptParameters;
|
||||
function parseContinueRequestParameters(params: unknown): {
|
||||
request: string;
|
||||
url?: string | undefined;
|
||||
cookies?: {
|
||||
value: {
|
||||
type: "string";
|
||||
value: string;
|
||||
} | {
|
||||
type: "base64";
|
||||
value: string;
|
||||
};
|
||||
name: string;
|
||||
}[] | undefined;
|
||||
method?: string | undefined;
|
||||
body?: {
|
||||
type: "string";
|
||||
value: string;
|
||||
} | {
|
||||
type: "base64";
|
||||
value: string;
|
||||
} | undefined;
|
||||
headers?: {
|
||||
value: {
|
||||
type: "string";
|
||||
value: string;
|
||||
} | {
|
||||
type: "base64";
|
||||
value: string;
|
||||
};
|
||||
name: string;
|
||||
}[] | undefined;
|
||||
};
|
||||
function parseContinueResponseParameters(params: unknown): Protocol.Network.ContinueResponseParameters;
|
||||
function parseContinueWithAuthParameters(params: unknown): {
|
||||
request: string;
|
||||
} & ({
|
||||
credentials: {
|
||||
type: "password";
|
||||
password: string;
|
||||
username: string;
|
||||
};
|
||||
action: "provideCredentials";
|
||||
} | {
|
||||
action: "default" | "cancel";
|
||||
});
|
||||
function parseDisownDataParameters(params: unknown): Protocol.Network.DisownDataParameters;
|
||||
function parseFailRequestParameters(params: unknown): {
|
||||
request: string;
|
||||
};
|
||||
function parseGetDataParameters(params: unknown): Protocol.Network.GetDataParameters;
|
||||
function parseProvideResponseParameters(params: unknown): Protocol.Network.ProvideResponseParameters;
|
||||
function parseRemoveDataCollectorParameters(params: unknown): Protocol.Network.RemoveDataCollectorParameters;
|
||||
function parseRemoveInterceptParameters(params: unknown): {
|
||||
intercept: string;
|
||||
};
|
||||
function parseSetCacheBehaviorParameters(params: unknown): Protocol.Network.SetCacheBehaviorParameters;
|
||||
function parseSetExtraHeadersParameters(params: unknown): Protocol.Network.SetExtraHeadersParameters;
|
||||
}
|
||||
/** @see https://w3c.github.io/webdriver-bidi/#module-script */
|
||||
export declare namespace Script {
|
||||
function parseAddPreloadScriptParams(params: unknown): Protocol.Script.AddPreloadScriptParameters;
|
||||
function parseCallFunctionParams(params: unknown): Protocol.Script.CallFunctionParameters;
|
||||
function parseDisownParams(params: unknown): Protocol.Script.DisownParameters;
|
||||
function parseEvaluateParams(params: unknown): Protocol.Script.EvaluateParameters;
|
||||
function parseGetRealmsParams(params: unknown): Protocol.Script.GetRealmsParameters;
|
||||
function parseRemovePreloadScriptParams(params: unknown): {
|
||||
script: string;
|
||||
};
|
||||
}
|
||||
/** @see https://w3c.github.io/webdriver-bidi/#module-browsingContext */
|
||||
export declare namespace BrowsingContext {
|
||||
function parseActivateParams(params: unknown): {
|
||||
context: string;
|
||||
};
|
||||
function parseCaptureScreenshotParams(params: unknown): Protocol.BrowsingContext.CaptureScreenshotParameters;
|
||||
function parseCloseParams(params: unknown): Protocol.BrowsingContext.CloseParameters;
|
||||
function parseCreateParams(params: unknown): Protocol.BrowsingContext.CreateParameters;
|
||||
function parseGetTreeParams(params: unknown): Protocol.BrowsingContext.GetTreeParameters;
|
||||
function parseHandleUserPromptParameters(params: unknown): Protocol.BrowsingContext.HandleUserPromptParameters;
|
||||
function parseLocateNodesParams(params: unknown): Protocol.BrowsingContext.LocateNodesParameters;
|
||||
function parseNavigateParams(params: unknown): Protocol.BrowsingContext.NavigateParameters;
|
||||
function parsePrintParams(params: unknown): Protocol.BrowsingContext.PrintParameters;
|
||||
function parseReloadParams(params: unknown): Protocol.BrowsingContext.ReloadParameters;
|
||||
function parseSetViewportParams(params: unknown): Protocol.BrowsingContext.SetViewportParameters;
|
||||
function parseTraverseHistoryParams(params: unknown): Protocol.BrowsingContext.TraverseHistoryParameters;
|
||||
}
|
||||
/** @see https://w3c.github.io/webdriver-bidi/#module-session */
|
||||
export declare namespace Session {
|
||||
function parseSubscribeParams(params: unknown): Protocol.Session.SubscribeParameters;
|
||||
function parseUnsubscribeParams(params: unknown): Protocol.Session.UnsubscribeParameters;
|
||||
}
|
||||
export declare namespace Emulation {
|
||||
function parseSetClientHintsOverrideParams(params: unknown): Protocol.UAClientHints.Emulation.SetClientHintsOverrideParameters;
|
||||
function parseSetForcedColorsModeThemeOverrideParams(params: unknown): Protocol.Emulation.SetForcedColorsModeThemeOverrideParameters;
|
||||
function parseSetGeolocationOverrideParams(params: unknown): Protocol.Emulation.SetGeolocationOverrideParameters;
|
||||
function parseSetLocaleOverrideParams(params: unknown): Protocol.Emulation.SetLocaleOverrideParameters;
|
||||
function parseSetNetworkConditionsParams(params: unknown): Protocol.Emulation.SetNetworkConditionsParameters;
|
||||
function parseSetScreenOrientationOverrideParams(params: unknown): Protocol.Emulation.SetScreenOrientationOverrideParameters;
|
||||
function parseSetScreenSettingsOverrideParams(params: unknown): Protocol.Emulation.SetScreenSettingsOverrideParameters;
|
||||
function parseSetScriptingEnabledParams(params: unknown): Protocol.Emulation.SetScriptingEnabledParameters;
|
||||
function parseSetTimezoneOverrideParams(params: unknown): Protocol.Emulation.SetTimezoneOverrideParameters;
|
||||
function parseSetTouchOverrideParams(params: unknown): Protocol.Emulation.SetTouchOverrideParameters;
|
||||
function parseSetUserAgentOverrideParams(params: unknown): Protocol.Emulation.SetUserAgentOverrideParameters;
|
||||
}
|
||||
export declare namespace Input {
|
||||
function parsePerformActionsParams(params: unknown): Protocol.Input.PerformActionsParameters;
|
||||
function parseReleaseActionsParams(params: unknown): Protocol.Input.ReleaseActionsParameters;
|
||||
function parseSetFilesParams(params: unknown): Protocol.Input.SetFilesParameters;
|
||||
}
|
||||
export declare namespace Storage {
|
||||
function parseDeleteCookiesParams(params: unknown): Protocol.Storage.DeleteCookiesParameters;
|
||||
function parseGetCookiesParams(params: unknown): Protocol.Storage.GetCookiesParameters;
|
||||
function parseSetCookieParams(params: unknown): Protocol.Storage.SetCookieParameters;
|
||||
}
|
||||
export declare namespace Cdp {
|
||||
function parseGetSessionRequest(params: unknown): Protocol.Cdp.GetSessionParameters;
|
||||
function parseResolveRealmRequest(params: unknown): Protocol.Cdp.ResolveRealmParameters;
|
||||
function parseSendCommandRequest(params: unknown): Protocol.Cdp.SendCommandParameters;
|
||||
}
|
||||
export declare namespace Permissions {
|
||||
function parseSetPermissionsParams(params: unknown): Protocol.Permissions.SetPermissionParameters;
|
||||
}
|
||||
export declare namespace Bluetooth {
|
||||
function parseDisableSimulationParameters(params: unknown): Protocol.Bluetooth.DisableSimulationParameters;
|
||||
function parseHandleRequestDevicePromptParams(params: unknown): Protocol.Bluetooth.HandleRequestDevicePromptParameters;
|
||||
function parseSimulateAdapterParams(params: unknown): Protocol.Bluetooth.SimulateAdapterParameters;
|
||||
function parseSimulateAdvertisementParams(params: unknown): Protocol.Bluetooth.SimulateAdvertisementParameters;
|
||||
function parseSimulateCharacteristicParams(params: unknown): Protocol.Bluetooth.SimulateCharacteristicParameters;
|
||||
function parseSimulateCharacteristicResponseParams(params: unknown): Protocol.Bluetooth.SimulateCharacteristicResponseParameters;
|
||||
function parseSimulateDescriptorParams(params: unknown): Protocol.Bluetooth.SimulateDescriptorParameters;
|
||||
function parseSimulateDescriptorResponseParams(params: unknown): Protocol.Bluetooth.SimulateDescriptorResponseParameters;
|
||||
function parseSimulateGattConnectionResponseParams(params: unknown): Protocol.Bluetooth.SimulateGattConnectionResponseParameters;
|
||||
function parseSimulateGattDisconnectionParams(params: unknown): Protocol.Bluetooth.SimulateGattDisconnectionParameters;
|
||||
function parseSimulatePreconnectedPeripheralParams(params: unknown): Protocol.Bluetooth.SimulatePreconnectedPeripheralParameters;
|
||||
function parseSimulateServiceParams(params: unknown): Protocol.Bluetooth.SimulateServiceParameters;
|
||||
}
|
||||
/** @see https://w3c.github.io/webdriver-bidi/#module-webExtension */
|
||||
export declare namespace WebModule {
|
||||
function parseInstallParams(params: unknown): Protocol.WebExtension.InstallParameters;
|
||||
function parseUninstallParams(params: unknown): Protocol.WebExtension.UninstallParameters;
|
||||
}
|
||||
456
node_modules/chromium-bidi/lib/esm/protocol-parser/protocol-parser.js
generated
vendored
Normal file
456
node_modules/chromium-bidi/lib/esm/protocol-parser/protocol-parser.js
generated
vendored
Normal file
@@ -0,0 +1,456 @@
|
||||
/**
|
||||
* Copyright 2022 Google LLC.
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* @fileoverview Provides parsing and validator for WebDriver BiDi protocol.
|
||||
* Parser types should match the `../protocol` types.
|
||||
*/
|
||||
import { z } from 'zod';
|
||||
import { InvalidArgumentException } from '../protocol/protocol.js';
|
||||
import * as WebDriverBidiBluetooth from './generated/webdriver-bidi-bluetooth.js';
|
||||
import * as WebDriverBidiPermissions from './generated/webdriver-bidi-permissions.js';
|
||||
import * as WebDriverBidiUAClientHints from './generated/webdriver-bidi-ua-client-hints.js';
|
||||
import * as WebDriverBidi from './generated/webdriver-bidi.js';
|
||||
export function parseObject(obj, schema) {
|
||||
const parseResult = schema.safeParse(obj);
|
||||
if (parseResult.success) {
|
||||
return parseResult.data;
|
||||
}
|
||||
const errorMessage = parseResult.error.errors
|
||||
.map((e) => `${e.message} in ` +
|
||||
`${e.path.map((p) => JSON.stringify(p)).join('/')}.`)
|
||||
.join(' ');
|
||||
throw new InvalidArgumentException(errorMessage);
|
||||
}
|
||||
/** @see https://w3c.github.io/webdriver-bidi/#module-browser */
|
||||
export var Browser;
|
||||
(function (Browser) {
|
||||
// keep-sorted start block=yes
|
||||
function parseCreateUserContextParameters(params) {
|
||||
// Work around of `cddlconv` https://github.com/google/cddlconv/issues/19.
|
||||
return parseObject(params, WebDriverBidi.Browser.CreateUserContextParametersSchema);
|
||||
}
|
||||
Browser.parseCreateUserContextParameters = parseCreateUserContextParameters;
|
||||
function parseRemoveUserContextParameters(params) {
|
||||
return parseObject(params, WebDriverBidi.Browser.RemoveUserContextParametersSchema);
|
||||
}
|
||||
Browser.parseRemoveUserContextParameters = parseRemoveUserContextParameters;
|
||||
function parseSetClientWindowStateParameters(params) {
|
||||
return parseObject(params, WebDriverBidi.Browser.SetClientWindowStateParametersSchema);
|
||||
}
|
||||
Browser.parseSetClientWindowStateParameters = parseSetClientWindowStateParameters;
|
||||
function parseSetDownloadBehaviorParameters(params) {
|
||||
return parseObject(params, WebDriverBidi.Browser.SetDownloadBehaviorParametersSchema);
|
||||
}
|
||||
Browser.parseSetDownloadBehaviorParameters = parseSetDownloadBehaviorParameters;
|
||||
// keep-sorted end
|
||||
})(Browser || (Browser = {}));
|
||||
/** @see https://w3c.github.io/webdriver-bidi/#module-network */
|
||||
export var Network;
|
||||
(function (Network) {
|
||||
// keep-sorted start block=yes
|
||||
function parseAddDataCollectorParameters(params) {
|
||||
// Work around of `cddlconv` https://github.com/google/cddlconv/issues/19.
|
||||
return parseObject(params, WebDriverBidi.Network.AddDataCollectorParametersSchema);
|
||||
}
|
||||
Network.parseAddDataCollectorParameters = parseAddDataCollectorParameters;
|
||||
function parseAddInterceptParameters(params) {
|
||||
// Work around of `cddlconv` https://github.com/google/cddlconv/issues/19.
|
||||
return parseObject(params, WebDriverBidi.Network.AddInterceptParametersSchema);
|
||||
}
|
||||
Network.parseAddInterceptParameters = parseAddInterceptParameters;
|
||||
function parseContinueRequestParameters(params) {
|
||||
return parseObject(params, WebDriverBidi.Network.ContinueRequestParametersSchema);
|
||||
}
|
||||
Network.parseContinueRequestParameters = parseContinueRequestParameters;
|
||||
function parseContinueResponseParameters(params) {
|
||||
// TODO: remove cast after https://github.com/google/cddlconv/issues/19 is fixed.
|
||||
return parseObject(params, WebDriverBidi.Network.ContinueResponseParametersSchema);
|
||||
}
|
||||
Network.parseContinueResponseParameters = parseContinueResponseParameters;
|
||||
function parseContinueWithAuthParameters(params) {
|
||||
return parseObject(params, WebDriverBidi.Network.ContinueWithAuthParametersSchema);
|
||||
}
|
||||
Network.parseContinueWithAuthParameters = parseContinueWithAuthParameters;
|
||||
function parseDisownDataParameters(params) {
|
||||
return parseObject(params, WebDriverBidi.Network.DisownDataParametersSchema);
|
||||
}
|
||||
Network.parseDisownDataParameters = parseDisownDataParameters;
|
||||
function parseFailRequestParameters(params) {
|
||||
return parseObject(params, WebDriverBidi.Network.FailRequestParametersSchema);
|
||||
}
|
||||
Network.parseFailRequestParameters = parseFailRequestParameters;
|
||||
function parseGetDataParameters(params) {
|
||||
// Work around of `cddlconv` https://github.com/google/cddlconv/issues/19.
|
||||
return parseObject(params, WebDriverBidi.Network.GetDataParametersSchema);
|
||||
}
|
||||
Network.parseGetDataParameters = parseGetDataParameters;
|
||||
function parseProvideResponseParameters(params) {
|
||||
// Work around of `cddlconv` https://github.com/google/cddlconv/issues/19.
|
||||
return parseObject(params, WebDriverBidi.Network.ProvideResponseParametersSchema);
|
||||
}
|
||||
Network.parseProvideResponseParameters = parseProvideResponseParameters;
|
||||
function parseRemoveDataCollectorParameters(params) {
|
||||
// Work around of `cddlconv` https://github.com/google/cddlconv/issues/19.
|
||||
return parseObject(params, WebDriverBidi.Network.RemoveDataCollectorParametersSchema);
|
||||
}
|
||||
Network.parseRemoveDataCollectorParameters = parseRemoveDataCollectorParameters;
|
||||
function parseRemoveInterceptParameters(params) {
|
||||
return parseObject(params, WebDriverBidi.Network.RemoveInterceptParametersSchema);
|
||||
}
|
||||
Network.parseRemoveInterceptParameters = parseRemoveInterceptParameters;
|
||||
function parseSetCacheBehaviorParameters(params) {
|
||||
return parseObject(params, WebDriverBidi.Network.SetCacheBehaviorParametersSchema);
|
||||
}
|
||||
Network.parseSetCacheBehaviorParameters = parseSetCacheBehaviorParameters;
|
||||
function parseSetExtraHeadersParameters(params) {
|
||||
return parseObject(params, WebDriverBidi.Network.SetExtraHeadersParametersSchema);
|
||||
}
|
||||
Network.parseSetExtraHeadersParameters = parseSetExtraHeadersParameters;
|
||||
// keep-sorted end
|
||||
})(Network || (Network = {}));
|
||||
/** @see https://w3c.github.io/webdriver-bidi/#module-script */
|
||||
export var Script;
|
||||
(function (Script) {
|
||||
// keep-sorted start block=yes
|
||||
function parseAddPreloadScriptParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Script.AddPreloadScriptParametersSchema);
|
||||
}
|
||||
Script.parseAddPreloadScriptParams = parseAddPreloadScriptParams;
|
||||
function parseCallFunctionParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Script.CallFunctionParametersSchema);
|
||||
}
|
||||
Script.parseCallFunctionParams = parseCallFunctionParams;
|
||||
function parseDisownParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Script.DisownParametersSchema);
|
||||
}
|
||||
Script.parseDisownParams = parseDisownParams;
|
||||
function parseEvaluateParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Script.EvaluateParametersSchema);
|
||||
}
|
||||
Script.parseEvaluateParams = parseEvaluateParams;
|
||||
function parseGetRealmsParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Script.GetRealmsParametersSchema);
|
||||
}
|
||||
Script.parseGetRealmsParams = parseGetRealmsParams;
|
||||
function parseRemovePreloadScriptParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Script.RemovePreloadScriptParametersSchema);
|
||||
}
|
||||
Script.parseRemovePreloadScriptParams = parseRemovePreloadScriptParams;
|
||||
// keep-sorted end
|
||||
})(Script || (Script = {}));
|
||||
/** @see https://w3c.github.io/webdriver-bidi/#module-browsingContext */
|
||||
export var BrowsingContext;
|
||||
(function (BrowsingContext) {
|
||||
// keep-sorted start block=yes
|
||||
function parseActivateParams(params) {
|
||||
return parseObject(params, WebDriverBidi.BrowsingContext.ActivateParametersSchema);
|
||||
}
|
||||
BrowsingContext.parseActivateParams = parseActivateParams;
|
||||
function parseCaptureScreenshotParams(params) {
|
||||
return parseObject(params, WebDriverBidi.BrowsingContext.CaptureScreenshotParametersSchema);
|
||||
}
|
||||
BrowsingContext.parseCaptureScreenshotParams = parseCaptureScreenshotParams;
|
||||
function parseCloseParams(params) {
|
||||
return parseObject(params, WebDriverBidi.BrowsingContext.CloseParametersSchema);
|
||||
}
|
||||
BrowsingContext.parseCloseParams = parseCloseParams;
|
||||
function parseCreateParams(params) {
|
||||
return parseObject(params, WebDriverBidi.BrowsingContext.CreateParametersSchema);
|
||||
}
|
||||
BrowsingContext.parseCreateParams = parseCreateParams;
|
||||
function parseGetTreeParams(params) {
|
||||
return parseObject(params, WebDriverBidi.BrowsingContext.GetTreeParametersSchema);
|
||||
}
|
||||
BrowsingContext.parseGetTreeParams = parseGetTreeParams;
|
||||
function parseHandleUserPromptParameters(params) {
|
||||
return parseObject(params, WebDriverBidi.BrowsingContext.HandleUserPromptParametersSchema);
|
||||
}
|
||||
BrowsingContext.parseHandleUserPromptParameters = parseHandleUserPromptParameters;
|
||||
function parseLocateNodesParams(params) {
|
||||
// TODO: remove cast after https://github.com/google/cddlconv/issues/19 is fixed.
|
||||
return parseObject(params, WebDriverBidi.BrowsingContext.LocateNodesParametersSchema);
|
||||
}
|
||||
BrowsingContext.parseLocateNodesParams = parseLocateNodesParams;
|
||||
function parseNavigateParams(params) {
|
||||
return parseObject(params, WebDriverBidi.BrowsingContext.NavigateParametersSchema);
|
||||
}
|
||||
BrowsingContext.parseNavigateParams = parseNavigateParams;
|
||||
function parsePrintParams(params) {
|
||||
return parseObject(params, WebDriverBidi.BrowsingContext.PrintParametersSchema);
|
||||
}
|
||||
BrowsingContext.parsePrintParams = parsePrintParams;
|
||||
function parseReloadParams(params) {
|
||||
return parseObject(params, WebDriverBidi.BrowsingContext.ReloadParametersSchema);
|
||||
}
|
||||
BrowsingContext.parseReloadParams = parseReloadParams;
|
||||
function parseSetViewportParams(params) {
|
||||
return parseObject(params, WebDriverBidi.BrowsingContext.SetViewportParametersSchema);
|
||||
}
|
||||
BrowsingContext.parseSetViewportParams = parseSetViewportParams;
|
||||
function parseTraverseHistoryParams(params) {
|
||||
return parseObject(params, WebDriverBidi.BrowsingContext.TraverseHistoryParametersSchema);
|
||||
}
|
||||
BrowsingContext.parseTraverseHistoryParams = parseTraverseHistoryParams;
|
||||
// keep-sorted end
|
||||
})(BrowsingContext || (BrowsingContext = {}));
|
||||
/** @see https://w3c.github.io/webdriver-bidi/#module-session */
|
||||
export var Session;
|
||||
(function (Session) {
|
||||
// keep-sorted start block=yes
|
||||
function parseSubscribeParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Session.SubscribeParametersSchema);
|
||||
}
|
||||
Session.parseSubscribeParams = parseSubscribeParams;
|
||||
function parseUnsubscribeParams(params) {
|
||||
if (params && typeof params === 'object' && 'subscriptions' in params) {
|
||||
return parseObject(params, WebDriverBidi.Session.UnsubscribeByIdRequestSchema);
|
||||
}
|
||||
return parseObject(params, WebDriverBidi.Session.UnsubscribeParametersSchema);
|
||||
}
|
||||
Session.parseUnsubscribeParams = parseUnsubscribeParams;
|
||||
// keep-sorted end
|
||||
})(Session || (Session = {}));
|
||||
export var Emulation;
|
||||
(function (Emulation) {
|
||||
// keep-sorted start block=yes
|
||||
function parseSetClientHintsOverrideParams(params) {
|
||||
const SetClientHintsOverrideParametersSchema = z.object({
|
||||
clientHints: z.union([
|
||||
WebDriverBidiUAClientHints.Emulation.ClientHintsMetadataSchema,
|
||||
z.null(),
|
||||
]),
|
||||
contexts: z.array(z.string()).min(1).optional(),
|
||||
userContexts: z.array(z.string()).min(1).optional(),
|
||||
});
|
||||
return parseObject(params, SetClientHintsOverrideParametersSchema);
|
||||
}
|
||||
Emulation.parseSetClientHintsOverrideParams = parseSetClientHintsOverrideParams;
|
||||
function parseSetForcedColorsModeThemeOverrideParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Emulation.SetForcedColorsModeThemeOverrideParametersSchema);
|
||||
}
|
||||
Emulation.parseSetForcedColorsModeThemeOverrideParams = parseSetForcedColorsModeThemeOverrideParams;
|
||||
function parseSetGeolocationOverrideParams(params) {
|
||||
if ('coordinates' in params && 'error' in params) {
|
||||
// Zod picks the first matching parameter omitting the other. In this case, the
|
||||
// `parseObject` will remove `error` from the params. However, specification
|
||||
// requires to throw an exception.
|
||||
throw new InvalidArgumentException('Coordinates and error cannot be set at the same time');
|
||||
}
|
||||
return parseObject(params, WebDriverBidi.Emulation.SetGeolocationOverrideParametersSchema);
|
||||
}
|
||||
Emulation.parseSetGeolocationOverrideParams = parseSetGeolocationOverrideParams;
|
||||
function parseSetLocaleOverrideParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Emulation.SetLocaleOverrideParametersSchema);
|
||||
}
|
||||
Emulation.parseSetLocaleOverrideParams = parseSetLocaleOverrideParams;
|
||||
function parseSetNetworkConditionsParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Emulation.SetNetworkConditionsParametersSchema);
|
||||
}
|
||||
Emulation.parseSetNetworkConditionsParams = parseSetNetworkConditionsParams;
|
||||
function parseSetScreenOrientationOverrideParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Emulation.SetScreenOrientationOverrideParametersSchema);
|
||||
}
|
||||
Emulation.parseSetScreenOrientationOverrideParams = parseSetScreenOrientationOverrideParams;
|
||||
function parseSetScreenSettingsOverrideParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Emulation.SetScreenSettingsOverrideParametersSchema);
|
||||
}
|
||||
Emulation.parseSetScreenSettingsOverrideParams = parseSetScreenSettingsOverrideParams;
|
||||
function parseSetScriptingEnabledParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Emulation.SetScriptingEnabledParametersSchema);
|
||||
}
|
||||
Emulation.parseSetScriptingEnabledParams = parseSetScriptingEnabledParams;
|
||||
function parseSetTimezoneOverrideParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Emulation.SetTimezoneOverrideParametersSchema);
|
||||
}
|
||||
Emulation.parseSetTimezoneOverrideParams = parseSetTimezoneOverrideParams;
|
||||
function parseSetTouchOverrideParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Emulation.SetTouchOverrideParametersSchema);
|
||||
}
|
||||
Emulation.parseSetTouchOverrideParams = parseSetTouchOverrideParams;
|
||||
function parseSetUserAgentOverrideParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Emulation.SetUserAgentOverrideParametersSchema);
|
||||
}
|
||||
Emulation.parseSetUserAgentOverrideParams = parseSetUserAgentOverrideParams;
|
||||
// keep-sorted end
|
||||
})(Emulation || (Emulation = {}));
|
||||
export var Input;
|
||||
(function (Input) {
|
||||
// keep-sorted start block=yes
|
||||
function parsePerformActionsParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Input.PerformActionsParametersSchema);
|
||||
}
|
||||
Input.parsePerformActionsParams = parsePerformActionsParams;
|
||||
function parseReleaseActionsParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Input.ReleaseActionsParametersSchema);
|
||||
}
|
||||
Input.parseReleaseActionsParams = parseReleaseActionsParams;
|
||||
function parseSetFilesParams(params) {
|
||||
return parseObject(params, WebDriverBidi.Input.SetFilesParametersSchema);
|
||||
}
|
||||
Input.parseSetFilesParams = parseSetFilesParams;
|
||||
// keep-sorted end
|
||||
})(Input || (Input = {}));
|
||||
export var Storage;
|
||||
(function (Storage) {
|
||||
// keep-sorted start block=yes
|
||||
function parseDeleteCookiesParams(params) {
|
||||
// Work around of `cddlconv` https://github.com/google/cddlconv/issues/19.
|
||||
// The generated schema `SameSiteSchema` in `src/protocol-parser/webdriver-bidi.ts` is
|
||||
// of type `"none" | "strict" | "lax"` which is not assignable to generated enum
|
||||
// `SameSite` in `src/protocol/webdriver-bidi.ts`.
|
||||
// TODO: remove cast after https://github.com/google/cddlconv/issues/19 is fixed.
|
||||
return parseObject(params, WebDriverBidi.Storage.DeleteCookiesParametersSchema);
|
||||
}
|
||||
Storage.parseDeleteCookiesParams = parseDeleteCookiesParams;
|
||||
function parseGetCookiesParams(params) {
|
||||
// Work around of `cddlconv` https://github.com/google/cddlconv/issues/19.
|
||||
// The generated schema `SameSiteSchema` in `src/protocol-parser/webdriver-bidi.ts` is
|
||||
// of type `"none" | "strict" | "lax"` which is not assignable to generated enum
|
||||
// `SameSite` in `src/protocol/webdriver-bidi.ts`.
|
||||
// TODO: remove cast after https://github.com/google/cddlconv/issues/19 is fixed.
|
||||
return parseObject(params, WebDriverBidi.Storage.GetCookiesParametersSchema);
|
||||
}
|
||||
Storage.parseGetCookiesParams = parseGetCookiesParams;
|
||||
function parseSetCookieParams(params) {
|
||||
// Work around of `cddlconv` https://github.com/google/cddlconv/issues/19.
|
||||
// The generated schema `SameSiteSchema` in `src/protocol-parser/webdriver-bidi.ts` is
|
||||
// of type `"none" | "strict" | "lax"` which is not assignable to generated enum
|
||||
// `SameSite` in `src/protocol/webdriver-bidi.ts`.
|
||||
// TODO: remove cast after https://github.com/google/cddlconv/issues/19 is fixed.
|
||||
return parseObject(params, WebDriverBidi.Storage.SetCookieParametersSchema);
|
||||
}
|
||||
Storage.parseSetCookieParams = parseSetCookieParams;
|
||||
// keep-sorted end
|
||||
})(Storage || (Storage = {}));
|
||||
export var Cdp;
|
||||
(function (Cdp) {
|
||||
// keep-sorted start block=yes
|
||||
const GetSessionRequestSchema = z.object({
|
||||
context: WebDriverBidi.BrowsingContext.BrowsingContextSchema,
|
||||
});
|
||||
const ResolveRealmRequestSchema = z.object({
|
||||
realm: WebDriverBidi.Script.RealmSchema,
|
||||
});
|
||||
const SendCommandRequestSchema = z.object({
|
||||
// Allowing any cdpMethod, and casting to proper type later on.
|
||||
method: z.string(),
|
||||
// `passthrough` allows object to have any fields.
|
||||
// https://github.com/colinhacks/zod#passthrough
|
||||
params: z.object({}).passthrough().optional(),
|
||||
session: z.string().optional(),
|
||||
});
|
||||
function parseGetSessionRequest(params) {
|
||||
return parseObject(params, GetSessionRequestSchema);
|
||||
}
|
||||
Cdp.parseGetSessionRequest = parseGetSessionRequest;
|
||||
function parseResolveRealmRequest(params) {
|
||||
return parseObject(params, ResolveRealmRequestSchema);
|
||||
}
|
||||
Cdp.parseResolveRealmRequest = parseResolveRealmRequest;
|
||||
function parseSendCommandRequest(params) {
|
||||
return parseObject(params, SendCommandRequestSchema);
|
||||
}
|
||||
Cdp.parseSendCommandRequest = parseSendCommandRequest;
|
||||
// keep-sorted end
|
||||
})(Cdp || (Cdp = {}));
|
||||
export var Permissions;
|
||||
(function (Permissions) {
|
||||
// keep-sorted start block=yes
|
||||
function parseSetPermissionsParams(params) {
|
||||
return {
|
||||
// TODO: remove once "goog:" attributes are not needed.
|
||||
...params,
|
||||
...parseObject(params, WebDriverBidiPermissions.Permissions.SetPermissionParametersSchema),
|
||||
};
|
||||
}
|
||||
Permissions.parseSetPermissionsParams = parseSetPermissionsParams;
|
||||
// keep-sorted end
|
||||
})(Permissions || (Permissions = {}));
|
||||
export var Bluetooth;
|
||||
(function (Bluetooth) {
|
||||
// keep-sorted start block=yes
|
||||
function parseDisableSimulationParameters(params) {
|
||||
return parseObject(params, WebDriverBidiBluetooth.Bluetooth.DisableSimulationParametersSchema);
|
||||
}
|
||||
Bluetooth.parseDisableSimulationParameters = parseDisableSimulationParameters;
|
||||
function parseHandleRequestDevicePromptParams(params) {
|
||||
return parseObject(params, WebDriverBidiBluetooth.Bluetooth
|
||||
.HandleRequestDevicePromptParametersSchema);
|
||||
}
|
||||
Bluetooth.parseHandleRequestDevicePromptParams = parseHandleRequestDevicePromptParams;
|
||||
function parseSimulateAdapterParams(params) {
|
||||
return parseObject(params, WebDriverBidiBluetooth.Bluetooth.SimulateAdapterParametersSchema);
|
||||
}
|
||||
Bluetooth.parseSimulateAdapterParams = parseSimulateAdapterParams;
|
||||
function parseSimulateAdvertisementParams(params) {
|
||||
return parseObject(params, WebDriverBidiBluetooth.Bluetooth.SimulateAdvertisementParametersSchema);
|
||||
}
|
||||
Bluetooth.parseSimulateAdvertisementParams = parseSimulateAdvertisementParams;
|
||||
function parseSimulateCharacteristicParams(params) {
|
||||
return parseObject(params, WebDriverBidiBluetooth.Bluetooth.SimulateCharacteristicParametersSchema);
|
||||
}
|
||||
Bluetooth.parseSimulateCharacteristicParams = parseSimulateCharacteristicParams;
|
||||
function parseSimulateCharacteristicResponseParams(params) {
|
||||
return parseObject(params, WebDriverBidiBluetooth.Bluetooth
|
||||
.SimulateCharacteristicResponseParametersSchema);
|
||||
}
|
||||
Bluetooth.parseSimulateCharacteristicResponseParams = parseSimulateCharacteristicResponseParams;
|
||||
function parseSimulateDescriptorParams(params) {
|
||||
return parseObject(params, WebDriverBidiBluetooth.Bluetooth.SimulateDescriptorParametersSchema);
|
||||
}
|
||||
Bluetooth.parseSimulateDescriptorParams = parseSimulateDescriptorParams;
|
||||
function parseSimulateDescriptorResponseParams(params) {
|
||||
return parseObject(params, WebDriverBidiBluetooth.Bluetooth
|
||||
.SimulateDescriptorResponseParametersSchema);
|
||||
}
|
||||
Bluetooth.parseSimulateDescriptorResponseParams = parseSimulateDescriptorResponseParams;
|
||||
function parseSimulateGattConnectionResponseParams(params) {
|
||||
return parseObject(params, WebDriverBidiBluetooth.Bluetooth
|
||||
.SimulateGattConnectionResponseParametersSchema);
|
||||
}
|
||||
Bluetooth.parseSimulateGattConnectionResponseParams = parseSimulateGattConnectionResponseParams;
|
||||
function parseSimulateGattDisconnectionParams(params) {
|
||||
return parseObject(params, WebDriverBidiBluetooth.Bluetooth
|
||||
.SimulateGattDisconnectionParametersSchema);
|
||||
}
|
||||
Bluetooth.parseSimulateGattDisconnectionParams = parseSimulateGattDisconnectionParams;
|
||||
function parseSimulatePreconnectedPeripheralParams(params) {
|
||||
return parseObject(params, WebDriverBidiBluetooth.Bluetooth
|
||||
.SimulatePreconnectedPeripheralParametersSchema);
|
||||
}
|
||||
Bluetooth.parseSimulatePreconnectedPeripheralParams = parseSimulatePreconnectedPeripheralParams;
|
||||
function parseSimulateServiceParams(params) {
|
||||
return parseObject(params, WebDriverBidiBluetooth.Bluetooth.SimulateServiceParametersSchema);
|
||||
}
|
||||
Bluetooth.parseSimulateServiceParams = parseSimulateServiceParams;
|
||||
// keep-sorted end
|
||||
})(Bluetooth || (Bluetooth = {}));
|
||||
/** @see https://w3c.github.io/webdriver-bidi/#module-webExtension */
|
||||
export var WebModule;
|
||||
(function (WebModule) {
|
||||
// keep-sorted start block=yes
|
||||
function parseInstallParams(params) {
|
||||
return parseObject(params, WebDriverBidi.WebExtension.InstallParametersSchema);
|
||||
}
|
||||
WebModule.parseInstallParams = parseInstallParams;
|
||||
function parseUninstallParams(params) {
|
||||
return parseObject(params, WebDriverBidi.WebExtension.UninstallParametersSchema);
|
||||
}
|
||||
WebModule.parseUninstallParams = parseUninstallParams;
|
||||
// keep-sorted end
|
||||
})(WebModule || (WebModule = {}));
|
||||
//# sourceMappingURL=protocol-parser.js.map
|
||||
1
node_modules/chromium-bidi/lib/esm/protocol-parser/protocol-parser.js.map
generated
vendored
Normal file
1
node_modules/chromium-bidi/lib/esm/protocol-parser/protocol-parser.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user