{"version":3,"file":"generate-typescript-types.cjs","names":["z","action"],"sources":["../../src/actions/generate-typescript-types.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { supabase } from \"../app\";\n\nexport const SupabaseGenerateTypescriptTypesInput = z.object({\n  ref: z.string().describe(\"The unique reference ID of the Supabase project for which to generate TypeScript types.\"),\n  included_schemas: z.string().default(\"public\").describe(\"Comma-separated database schema names to include in the generated TypeScript types.\").optional(),\n}).describe(\"Request schema for `GenerateTypescriptTypes`\");\nexport const SupabaseGenerateTypescriptTypesOutput = z.object({\n  types: z.string().describe(\"A single string containing the complete TypeScript type declarations generated from the project's database schema (e.g., Database interface, table Row/Insert/Update types). Intended for use with supabase-js and related tooling.\").nullable(),\n}).passthrough().describe(\"Response schema for `GenerateTypescriptTypes`.\\n\\nMatches Supabase Management API GET /v1/projects/{ref}/types/typescript\\nwhich returns a JSON object with a single field `types` containing the\\ncomplete generated TypeScript declarations for the project's database schema.\");\n\nexport const supabaseGenerateTypescriptTypes: AppAction<\n  typeof SupabaseGenerateTypescriptTypesInput,\n  typeof SupabaseGenerateTypescriptTypesOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_GENERATE_TYPESCRIPT_TYPES\", {\n  slug: \"supabase-generate-typescript-types\",\n  name: \"Generate TypeScript types\",\n  description: \"Generates and retrieves TypeScript types from a Supabase project's database; any schemas specified in `included_schemas` must exist in the project.\",\n  input: SupabaseGenerateTypescriptTypesInput,\n  output: SupabaseGenerateTypescriptTypesOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,uCAAuCA,IAAAA,EAAE,OAAO;CAC3D,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yFAAyF;CAClH,kBAAkBA,IAAAA,EAAE,OAAO,CAAC,CAAC,QAAQ,QAAQ,CAAC,CAAC,SAAS,qFAAqF,CAAC,CAAC,SAAS;AAC1J,CAAC,CAAC,CAAC,SAAS,8CAA8C;AAC1D,MAAa,wCAAwCA,IAAAA,EAAE,OAAO,EAC5D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qOAAqO,CAAC,CAAC,SAAS,EAC7Q,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,kRAAkR;AAE5S,MAAa,kCAITC,eAAAA,OAAO,sCAAsC;CAC/C,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}