/** * Fly Machines API OpenAPI 3.0.1 parser. * * The flaps spec has no resource marker and is mostly request/response DTOs, * so we generate a curated set of resources rather than every schema. Each * curated resource pairs a request schema (writable authoring surface) with a * response schema (read-only attributes). The property types reachable from the * request schemas — notably the fly.MachineConfig graph — are emitted as * standalone property-type classes so `config` is fully typed. */ import { type PropertyConstraints } from "@intentius/chant/codegen/json-schema"; export type { PropertyConstraints }; export interface ParsedProperty { name: string; tsType: string; required: boolean; description?: string; constraints: PropertyConstraints; } export interface ParsedResource { typeName: string; description?: string; properties: ParsedProperty[]; attributes: Array<{ name: string; tsType: string; }>; } export interface FlyParseResult { resource: ParsedResource; /** Always empty — fly emits property types as standalone results. */ propertyTypes: Array<{ name: string; defType: string; }>; /** Always empty — enums are inlined as string-literal unions. */ enums: Array<{ name: string; values: string[]; }>; /** Whether this entity is a property type (nested config shape). */ isProperty?: boolean; } /** * Parse the flaps OpenAPI spec into the curated resources and the property * types reachable from their request schemas. */ export declare function parseFlyOpenAPI(data: string | Buffer): FlyParseResult[]; /** * Convert a schema name into a PascalCase class-name segment. * "fly.MachineConfig" → "MachineConfig", "fly.dnsOption" → "DnsOption". */ export declare function schemaToClassName(schemaName: string): string; /** Extract short name: "Fly::Machines::Machine" → "Machine". */ export declare function flyShortName(typeName: string): string; /** Extract service name: "Fly::Machines::Machine" → "Machines". */ export declare function flyServiceName(typeName: string): string; //# sourceMappingURL=parse.d.ts.map