import { eg, TypeFromCodec } from '@cloudflare/util-en-garde'; const HTTPApplication = eg.object({ id: eg.string, name: eg.string, status: eg.string, current_version: eg.string, last_updated: eg.string }); export type HTTPApplication = TypeFromCodec; const ZoneApplication = eg.object({ id: eg.string, name: eg.string, status: eg.string, current_version: eg.string, last_updated: eg.string }); export type ZoneApplication = TypeFromCodec; const ZoneVersion = eg.object({ version: eg.number, id: eg.string, zone_tag: eg.string.optional, zone_name: eg.string.optional, cloned_from: eg.string.optional, application_id: eg.string, description: eg.string, status: eg.string, locked: eg.boolean, last_updated: eg.string.optional }); export type ZoneVersion = TypeFromCodec; const ZoneVersionCompare = eg.object({ first_version: eg.object({ file_data: eg.string, metadata: eg.object({ created_on: eg.string, status: eg.string }) }), second_version: eg.object({ file_data: eg.string, metadata: eg.object({ created_on: eg.string, status: eg.string }) }) }); export type ZoneVersionCompare = TypeFromCodec; const CreateZoneVersionCompare = eg.object({ first_version: eg.string, second_version: eg.string }); export type CreateZoneVersionCompare = TypeFromCodec< typeof CreateZoneVersionCompare >; const CreateZoneVersion = eg.object({ version: eg.number, id: eg.string, clone_from: eg.string, application_id: eg.string, description: eg.string, status: eg.string, locked: eg.boolean, last_updated: eg.string }); export type CreateZoneVersion = TypeFromCodec; const WAFMigrationStatus = eg.object({ new_waf_status: eg.string, old_waf_status: eg.string }); export type WAFMigrationStatus = TypeFromCodec;