Skip to content

Commit

Permalink
Update CDDL to the latest and merged spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnj committed Oct 4, 2024
1 parent 03ed42a commit 7ee958b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
18 changes: 9 additions & 9 deletions src/protocol-parser/generated/webdriver-bidi-bluetooth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ export namespace Bluetooth {
export const BluetoothServiceUuidSchema = z.lazy(() => z.string());
}
export namespace Bluetooth {
export const BluetoothManufacturerDataMapSchema = z.lazy(() =>
z.array(
z.object({
key: z.number().int().nonnegative(),
data: z.string(),
})
)
export const BluetoothManufacturerDataSchema = z.lazy(() =>
z.object({
key: z.number().int().nonnegative(),
data: z.string(),
})
);
}
export namespace Bluetooth {
Expand All @@ -59,7 +57,9 @@ export namespace Bluetooth {
name: z.string().optional(),
uuids: z.array(Bluetooth.BluetoothServiceUuidSchema).optional(),
appearance: z.number().optional(),
manufacturerData: Bluetooth.BluetoothManufacturerDataMapSchema.optional(),
manufacturerData: z
.array(Bluetooth.BluetoothManufacturerDataSchema)
.optional(),
})
);
}
Expand Down Expand Up @@ -131,7 +131,7 @@ export namespace Bluetooth {
context: z.string(),
address: z.string(),
name: z.string(),
manufacturerData: Bluetooth.BluetoothManufacturerDataMapSchema,
manufacturerData: z.array(Bluetooth.BluetoothManufacturerDataSchema),
knownServiceUuids: z.array(Bluetooth.BluetoothServiceUuidSchema),
})
);
Expand Down
14 changes: 6 additions & 8 deletions src/protocol/generated/webdriver-bidi-bluetooth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ export namespace Bluetooth {
export type BluetoothServiceUuid = string;
}
export namespace Bluetooth {
export type BluetoothManufacturerDataMap = [
...{
key: number;
data: string;
}[],
];
export type BluetoothManufacturerData = {
key: number;
data: string;
};
}
export namespace Bluetooth {
export type RequestDevice = string;
Expand All @@ -49,7 +47,7 @@ export namespace Bluetooth {
name?: string;
uuids?: [...Bluetooth.BluetoothServiceUuid[]];
appearance?: number;
manufacturerData?: Bluetooth.BluetoothManufacturerDataMap;
manufacturerData?: [...Bluetooth.BluetoothManufacturerData[]];
};
}
export namespace Bluetooth {
Expand Down Expand Up @@ -101,7 +99,7 @@ export namespace Bluetooth {
context: string;
address: string;
name: string;
manufacturerData: Bluetooth.BluetoothManufacturerDataMap;
manufacturerData: [...Bluetooth.BluetoothManufacturerData[]];
knownServiceUuids: [...Bluetooth.BluetoothServiceUuid[]];
};
}
Expand Down

0 comments on commit 7ee958b

Please sign in to comment.