/** * CloudFormation Registry JSON Schema parser. * * Parses each CFNSchema into typed structures suitable for code generation: * resources with properties and attributes, property types from definitions, * and enum types from string enum definitions. */ import { constraintsIsEmpty as coreConstraintsIsEmpty, type PropertyConstraints } from "@intentius/chant/codegen/json-schema"; export type { PropertyConstraints } from "@intentius/chant/codegen/json-schema"; export interface ParsedProperty { name: string; tsType: string; required: boolean; description?: string; enum?: string[]; constraints: PropertyConstraints; } export interface ParsedAttribute { name: string; tsType: string; } export interface ParsedPropertyType { name: string; specType: string; properties: ParsedProperty[]; } export interface ParsedEnum { name: string; values: string[]; } export interface ParsedResource { typeName: string; properties: ParsedProperty[]; attributes: ParsedAttribute[]; createOnly: string[]; writeOnly: string[]; primaryIdentifier: string[]; deprecatedProperties: string[]; conditionalCreateOnly: string[]; replacementStrategy?: "delete_then_create" | "create_then_delete"; tagging?: { taggable: boolean; tagOnCreate: boolean; tagUpdatable: boolean; }; } export interface SchemaParseResult { resource: ParsedResource; propertyTypes: ParsedPropertyType[]; enums: ParsedEnum[]; } /** * Parse a CloudFormation Registry JSON Schema into typed structures. */ export declare function parseCFNSchema(data: string | Buffer): SchemaParseResult; export declare const constraintsIsEmpty: typeof coreConstraintsIsEmpty; /** * Extract short resource name: "AWS::S3::Bucket" → "Bucket" */ export declare function cfnShortName(typeName: string): string; /** * Extract service name: "AWS::S3::Bucket" → "S3" */ export declare function cfnServiceName(typeName: string): string; //# sourceMappingURL=parse.d.ts.map