Initial commit: MangaReader iOS App

 Features:
- App iOS completa para leer manga sin publicidad
- Scraper con WKWebView para manhwaweb.com
- Sistema de descargas offline
- Lector con zoom y navegación
- Favoritos y progreso de lectura
- Compatible con iOS 15+ y Sideloadly/3uTools

📦 Contenido:
- Backend Node.js con Puppeteer (opcional)
- App iOS con SwiftUI
- Scraper de capítulos e imágenes
- Sistema de almacenamiento local
- Testing completo
- Documentación exhaustiva

🧪 Prueba: Capítulo 789 de One Piece descargado exitosamente
  - 21 páginas descargadas
  - 4.68 MB total
  - URLs verificadas y funcionales

🎉 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-02-04 15:34:18 +01:00
commit b474182dd9
6394 changed files with 1063909 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,354 @@
"use strict";
/**
* 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.
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BluetoothEventSchema = exports.BluetoothCommandSchema = exports.Bluetooth = void 0;
/**
* 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.
const zod_1 = __importDefault(require("zod"));
var Bluetooth;
(function (Bluetooth) {
Bluetooth.BluetoothUuidSchema = zod_1.default.lazy(() => zod_1.default.string());
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.BluetoothManufacturerDataSchema = zod_1.default.lazy(() => zod_1.default.object({
key: zod_1.default.number().int().nonnegative(),
data: zod_1.default.string(),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.CharacteristicPropertiesSchema = zod_1.default.lazy(() => zod_1.default.object({
broadcast: zod_1.default.boolean().optional(),
read: zod_1.default.boolean().optional(),
writeWithoutResponse: zod_1.default.boolean().optional(),
write: zod_1.default.boolean().optional(),
notify: zod_1.default.boolean().optional(),
indicate: zod_1.default.boolean().optional(),
authenticatedSignedWrites: zod_1.default.boolean().optional(),
extendedProperties: zod_1.default.boolean().optional(),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.RequestDeviceSchema = zod_1.default.lazy(() => zod_1.default.string());
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.RequestDeviceInfoSchema = zod_1.default.lazy(() => zod_1.default.object({
id: Bluetooth.RequestDeviceSchema,
name: zod_1.default.union([zod_1.default.string(), zod_1.default.null()]),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.RequestDevicePromptSchema = zod_1.default.lazy(() => zod_1.default.string());
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.ScanRecordSchema = zod_1.default.lazy(() => zod_1.default.object({
name: zod_1.default.string().optional(),
uuids: zod_1.default.array(Bluetooth.BluetoothUuidSchema).optional(),
appearance: zod_1.default.number().optional(),
manufacturerData: zod_1.default
.array(Bluetooth.BluetoothManufacturerDataSchema)
.optional(),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
exports.BluetoothCommandSchema = zod_1.default.lazy(() => zod_1.default.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 = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('bluetooth.handleRequestDevicePrompt'),
params: Bluetooth.HandleRequestDevicePromptParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.HandleRequestDevicePromptParametersSchema = zod_1.default.lazy(() => zod_1.default
.object({
context: zod_1.default.string(),
prompt: Bluetooth.RequestDevicePromptSchema,
})
.and(zod_1.default.union([
Bluetooth.HandleRequestDevicePromptAcceptParametersSchema,
Bluetooth.HandleRequestDevicePromptCancelParametersSchema,
])));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.HandleRequestDevicePromptAcceptParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
accept: zod_1.default.literal(true),
device: Bluetooth.RequestDeviceSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.HandleRequestDevicePromptCancelParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
accept: zod_1.default.literal(false),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateAdapterSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('bluetooth.simulateAdapter'),
params: Bluetooth.SimulateAdapterParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateAdapterParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
context: zod_1.default.string(),
leSupported: zod_1.default.boolean().optional(),
state: zod_1.default.enum(['absent', 'powered-off', 'powered-on']),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.DisableSimulationSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('bluetooth.disableSimulation'),
params: Bluetooth.DisableSimulationParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.DisableSimulationParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
context: zod_1.default.string(),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulatePreconnectedPeripheralSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('bluetooth.simulatePreconnectedPeripheral'),
params: Bluetooth.SimulatePreconnectedPeripheralParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulatePreconnectedPeripheralParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
context: zod_1.default.string(),
address: zod_1.default.string(),
name: zod_1.default.string(),
manufacturerData: zod_1.default.array(Bluetooth.BluetoothManufacturerDataSchema),
knownServiceUuids: zod_1.default.array(Bluetooth.BluetoothUuidSchema),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateAdvertisementSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('bluetooth.simulateAdvertisement'),
params: Bluetooth.SimulateAdvertisementParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateAdvertisementParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
context: zod_1.default.string(),
scanEntry: Bluetooth.SimulateAdvertisementScanEntryParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateAdvertisementScanEntryParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
deviceAddress: zod_1.default.string(),
rssi: zod_1.default.number(),
scanRecord: Bluetooth.ScanRecordSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateGattConnectionResponseSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('bluetooth.simulateGattConnectionResponse'),
params: Bluetooth.SimulateGattConnectionResponseParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateGattConnectionResponseParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
context: zod_1.default.string(),
address: zod_1.default.string(),
code: zod_1.default.number().int().nonnegative(),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateGattDisconnectionSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('bluetooth.simulateGattDisconnection'),
params: Bluetooth.SimulateGattDisconnectionParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateGattDisconnectionParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
context: zod_1.default.string(),
address: zod_1.default.string(),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateServiceSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('bluetooth.simulateService'),
params: Bluetooth.SimulateServiceParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateServiceParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
context: zod_1.default.string(),
address: zod_1.default.string(),
uuid: Bluetooth.BluetoothUuidSchema,
type: zod_1.default.enum(['add', 'remove']),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateCharacteristicSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('bluetooth.simulateCharacteristic'),
params: Bluetooth.SimulateCharacteristicParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateCharacteristicParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
context: zod_1.default.string(),
address: zod_1.default.string(),
serviceUuid: Bluetooth.BluetoothUuidSchema,
characteristicUuid: Bluetooth.BluetoothUuidSchema,
characteristicProperties: Bluetooth.CharacteristicPropertiesSchema.optional(),
type: zod_1.default.enum(['add', 'remove']),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateCharacteristicResponseSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('bluetooth.simulateCharacteristicResponse'),
params: Bluetooth.SimulateCharacteristicResponseParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateCharacteristicResponseParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
context: zod_1.default.string(),
address: zod_1.default.string(),
serviceUuid: Bluetooth.BluetoothUuidSchema,
characteristicUuid: Bluetooth.BluetoothUuidSchema,
type: zod_1.default.enum([
'read',
'write',
'subscribe-to-notifications',
'unsubscribe-from-notifications',
]),
code: zod_1.default.number().int().nonnegative(),
data: zod_1.default.array(zod_1.default.number().int().nonnegative()).optional(),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateDescriptorSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('bluetooth.simulateDescriptor'),
params: Bluetooth.SimulateDescriptorParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateDescriptorParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
context: zod_1.default.string(),
address: zod_1.default.string(),
serviceUuid: Bluetooth.BluetoothUuidSchema,
characteristicUuid: Bluetooth.BluetoothUuidSchema,
descriptorUuid: Bluetooth.BluetoothUuidSchema,
type: zod_1.default.enum(['add', 'remove']),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateDescriptorResponseSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('bluetooth.simulateDescriptorResponse'),
params: Bluetooth.SimulateDescriptorResponseParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.SimulateDescriptorResponseParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
context: zod_1.default.string(),
address: zod_1.default.string(),
serviceUuid: Bluetooth.BluetoothUuidSchema,
characteristicUuid: Bluetooth.BluetoothUuidSchema,
descriptorUuid: Bluetooth.BluetoothUuidSchema,
type: zod_1.default.enum(['read', 'write']),
code: zod_1.default.number().int().nonnegative(),
data: zod_1.default.array(zod_1.default.number().int().nonnegative()).optional(),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
exports.BluetoothEventSchema = zod_1.default.lazy(() => zod_1.default.union([
Bluetooth.RequestDevicePromptUpdatedSchema,
Bluetooth.GattConnectionAttemptedSchema,
]));
(function (Bluetooth) {
Bluetooth.RequestDevicePromptUpdatedSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('bluetooth.requestDevicePromptUpdated'),
params: Bluetooth.RequestDevicePromptUpdatedParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.RequestDevicePromptUpdatedParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
context: zod_1.default.string(),
prompt: Bluetooth.RequestDevicePromptSchema,
devices: zod_1.default.array(Bluetooth.RequestDeviceInfoSchema),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.GattConnectionAttemptedSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('bluetooth.gattConnectionAttempted'),
params: Bluetooth.GattConnectionAttemptedParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.GattConnectionAttemptedParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
context: zod_1.default.string(),
address: zod_1.default.string(),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.CharacteristicEventGeneratedSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('bluetooth.characteristicEventGenerated'),
params: Bluetooth.CharacteristicEventGeneratedParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.CharacteristicEventGeneratedParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
context: zod_1.default.string(),
address: zod_1.default.string(),
serviceUuid: Bluetooth.BluetoothUuidSchema,
characteristicUuid: Bluetooth.BluetoothUuidSchema,
type: zod_1.default.enum([
'read',
'write-with-response',
'write-without-response',
'subscribe-to-notifications',
'unsubscribe-from-notifications',
]),
data: zod_1.default.array(zod_1.default.number().int().nonnegative()).optional(),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.DescriptorEventGeneratedSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('bluetooth.descriptorEventGenerated'),
params: Bluetooth.DescriptorEventGeneratedParametersSchema,
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
(function (Bluetooth) {
Bluetooth.DescriptorEventGeneratedParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
context: zod_1.default.string(),
address: zod_1.default.string(),
serviceUuid: Bluetooth.BluetoothUuidSchema,
characteristicUuid: Bluetooth.BluetoothUuidSchema,
descriptorUuid: Bluetooth.BluetoothUuidSchema,
type: zod_1.default.enum(['read', 'write']),
data: zod_1.default.array(zod_1.default.number().int().nonnegative()).optional(),
}));
})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));
//# sourceMappingURL=webdriver-bidi-bluetooth.js.map

File diff suppressed because one or more lines are too long

View 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;
}>>;
}

View File

@@ -0,0 +1,49 @@
"use strict";
/**
* 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.
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpeculationEventSchema = exports.Speculation = void 0;
/**
* 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.
const zod_1 = __importDefault(require("zod"));
var Speculation;
(function (Speculation) {
Speculation.PreloadingStatusSchema = zod_1.default.lazy(() => zod_1.default.enum(['pending', 'ready', 'success', 'failure']));
})(Speculation || (exports.Speculation = Speculation = {}));
exports.SpeculationEventSchema = zod_1.default.lazy(() => Speculation.PrefetchStatusUpdatedSchema);
(function (Speculation) {
Speculation.PrefetchStatusUpdatedSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('speculation.prefetchStatusUpdated'),
params: Speculation.PrefetchStatusUpdatedParametersSchema,
}));
})(Speculation || (exports.Speculation = Speculation = {}));
(function (Speculation) {
Speculation.PrefetchStatusUpdatedParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
context: zod_1.default.string(),
url: zod_1.default.string(),
status: Speculation.PreloadingStatusSchema,
}));
})(Speculation || (exports.Speculation = Speculation = {}));
//# sourceMappingURL=webdriver-bidi-nav-speculation.js.map

View 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,8CAAoB;AAEpB,IAAiB,WAAW,CAI3B;AAJD,WAAiB,WAAW;IACb,kCAAsB,GAAG,aAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAChD,aAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CACnD,CAAC;AACJ,CAAC,EAJgB,WAAW,2BAAX,WAAW,QAI3B;AACY,QAAA,sBAAsB,GAAG,aAAC,CAAC,IAAI,CAC1C,GAAG,EAAE,CAAC,WAAW,CAAC,2BAA2B,CAC9C,CAAC;AACF,WAAiB,WAAW;IACb,uCAA2B,GAAG,aAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACrD,aAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,aAAC,CAAC,OAAO,CAAC,mCAAmC,CAAC;QACtD,MAAM,EAAE,WAAW,CAAC,qCAAqC;KAC1D,CAAC,CACH,CAAC;AACJ,CAAC,EAPgB,WAAW,2BAAX,WAAW,QAO3B;AACD,WAAiB,WAAW;IACb,iDAAqC,GAAG,aAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC/D,aAAC,CAAC,MAAM,CAAC;QACP,OAAO,EAAE,aAAC,CAAC,MAAM,EAAE;QACnB,GAAG,EAAE,aAAC,CAAC,MAAM,EAAE;QACf,MAAM,EAAE,WAAW,CAAC,sBAAsB;KAC3C,CAAC,CACH,CAAC;AACJ,CAAC,EARgB,WAAW,2BAAX,WAAW,QAQ3B"}

View 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;
}>>;
}

View File

@@ -0,0 +1,56 @@
"use strict";
/**
* 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.
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Permissions = exports.PermissionsCommandSchema = void 0;
/**
* 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.
const zod_1 = __importDefault(require("zod"));
exports.PermissionsCommandSchema = zod_1.default.lazy(() => Permissions.SetPermissionSchema);
var Permissions;
(function (Permissions) {
Permissions.PermissionDescriptorSchema = zod_1.default.lazy(() => zod_1.default.object({
name: zod_1.default.string(),
}));
})(Permissions || (exports.Permissions = Permissions = {}));
(function (Permissions) {
Permissions.PermissionStateSchema = zod_1.default.lazy(() => zod_1.default.enum(['granted', 'denied', 'prompt']));
})(Permissions || (exports.Permissions = Permissions = {}));
(function (Permissions) {
Permissions.SetPermissionSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('permissions.setPermission'),
params: Permissions.SetPermissionParametersSchema,
}));
})(Permissions || (exports.Permissions = Permissions = {}));
(function (Permissions) {
Permissions.SetPermissionParametersSchema = zod_1.default.lazy(() => zod_1.default.object({
descriptor: Permissions.PermissionDescriptorSchema,
state: Permissions.PermissionStateSchema,
origin: zod_1.default.string(),
embeddedOrigin: zod_1.default.string().optional(),
userContext: zod_1.default.string().optional(),
}));
})(Permissions || (exports.Permissions = Permissions = {}));
//# sourceMappingURL=webdriver-bidi-permissions.js.map

View 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,8CAAoB;AAEP,QAAA,wBAAwB,GAAG,aAAC,CAAC,IAAI,CAC5C,GAAG,EAAE,CAAC,WAAW,CAAC,mBAAmB,CACtC,CAAC;AACF,IAAiB,WAAW,CAM3B;AAND,WAAiB,WAAW;IACb,sCAA0B,GAAG,aAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACpD,aAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE;KACjB,CAAC,CACH,CAAC;AACJ,CAAC,EANgB,WAAW,2BAAX,WAAW,QAM3B;AACD,WAAiB,WAAW;IACb,iCAAqB,GAAG,aAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC/C,aAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CACxC,CAAC;AACJ,CAAC,EAJgB,WAAW,2BAAX,WAAW,QAI3B;AACD,WAAiB,WAAW;IACb,+BAAmB,GAAG,aAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC7C,aAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,aAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC;QAC9C,MAAM,EAAE,WAAW,CAAC,6BAA6B;KAClD,CAAC,CACH,CAAC;AACJ,CAAC,EAPgB,WAAW,2BAAX,WAAW,QAO3B;AACD,WAAiB,WAAW;IACb,yCAA6B,GAAG,aAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACvD,aAAC,CAAC,MAAM,CAAC;QACP,UAAU,EAAE,WAAW,CAAC,0BAA0B;QAClD,KAAK,EAAE,WAAW,CAAC,qBAAqB;QACxC,MAAM,EAAE,aAAC,CAAC,MAAM,EAAE;QAClB,cAAc,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACrC,WAAW,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACnC,CAAC,CACH,CAAC;AACJ,CAAC,EAVgB,WAAW,2BAAX,WAAW,QAU3B"}

View 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, {}, {}>>;
}

View File

@@ -0,0 +1,66 @@
"use strict";
/**
* 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.
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Emulation = exports.UserAgentClientHintsCommandSchema = void 0;
/**
* 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.
const zod_1 = __importDefault(require("zod"));
exports.UserAgentClientHintsCommandSchema = zod_1.default.lazy(() => Emulation.SetClientHintsOverrideCommandSchema);
var Emulation;
(function (Emulation) {
Emulation.SetClientHintsOverrideCommandSchema = zod_1.default.lazy(() => zod_1.default.object({
method: zod_1.default.literal('emulation.setClientHintsOverride'),
params: zod_1.default.object({
clientHints: zod_1.default.union([Emulation.ClientHintsMetadataSchema, zod_1.default.null()]),
contexts: zod_1.default.array(zod_1.default.string()).min(1).optional(),
userContexts: zod_1.default.array(zod_1.default.string()).min(1).optional(),
}),
}));
})(Emulation || (exports.Emulation = Emulation = {}));
(function (Emulation) {
Emulation.ClientHintsMetadataSchema = zod_1.default.lazy(() => zod_1.default.object({
brands: zod_1.default.array(Emulation.BrandVersionSchema).optional(),
fullVersionList: zod_1.default.array(Emulation.BrandVersionSchema).optional(),
platform: zod_1.default.string().optional(),
platformVersion: zod_1.default.string().optional(),
architecture: zod_1.default.string().optional(),
model: zod_1.default.string().optional(),
mobile: zod_1.default.boolean().optional(),
bitness: zod_1.default.string().optional(),
wow64: zod_1.default.boolean().optional(),
formFactors: zod_1.default.array(zod_1.default.string()).optional(),
}));
})(Emulation || (exports.Emulation = Emulation = {}));
(function (Emulation) {
Emulation.BrandVersionSchema = zod_1.default.lazy(() => zod_1.default.object({
brand: zod_1.default.string(),
version: zod_1.default.string(),
}));
})(Emulation || (exports.Emulation = Emulation = {}));
(function (Emulation) {
Emulation.SetClientHintsOverrideResultSchema = zod_1.default.lazy(() => zod_1.default.object({}));
})(Emulation || (exports.Emulation = Emulation = {}));
//# sourceMappingURL=webdriver-bidi-ua-client-hints.js.map

View 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,8CAAoB;AAEP,QAAA,iCAAiC,GAAG,aAAC,CAAC,IAAI,CACrD,GAAG,EAAE,CAAC,SAAS,CAAC,mCAAmC,CACpD,CAAC;AACF,IAAiB,SAAS,CAWzB;AAXD,WAAiB,SAAS;IACX,6CAAmC,GAAG,aAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC7D,aAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,aAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC;QACrD,MAAM,EAAE,aAAC,CAAC,MAAM,CAAC;YACf,WAAW,EAAE,aAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,yBAAyB,EAAE,aAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YACrE,QAAQ,EAAE,aAAC,CAAC,KAAK,CAAC,aAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YAC/C,YAAY,EAAE,aAAC,CAAC,KAAK,CAAC,aAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;SACpD,CAAC;KACH,CAAC,CACH,CAAC;AACJ,CAAC,EAXgB,SAAS,yBAAT,SAAS,QAWzB;AACD,WAAiB,SAAS;IACX,mCAAyB,GAAG,aAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACnD,aAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,aAAC,CAAC,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;QACxD,eAAe,EAAE,aAAC,CAAC,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;QACjE,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,eAAe,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACtC,YAAY,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACnC,KAAK,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC5B,MAAM,EAAE,aAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAC9B,OAAO,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,KAAK,EAAE,aAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAC7B,WAAW,EAAE,aAAC,CAAC,KAAK,CAAC,aAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;KAC5C,CAAC,CACH,CAAC;AACJ,CAAC,EAfgB,SAAS,yBAAT,SAAS,QAezB;AACD,WAAiB,SAAS;IACX,4BAAkB,GAAG,aAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC5C,aAAC,CAAC,MAAM,CAAC;QACP,KAAK,EAAE,aAAC,CAAC,MAAM,EAAE;QACjB,OAAO,EAAE,aAAC,CAAC,MAAM,EAAE;KACpB,CAAC,CACH,CAAC;AACJ,CAAC,EAPgB,SAAS,yBAAT,SAAS,QAOzB;AACD,WAAiB,SAAS;IACX,4CAAkC,GAAG,aAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,aAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/E,CAAC,EAFgB,SAAS,yBAAT,SAAS,QAEzB"}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long