{"version":3,"file":"get-migration.cjs","names":["z","action"],"sources":["../../src/actions/get-migration.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 SupabaseGetMigrationInput = z.object({\n  ref: z.string().describe(\"The unique reference ID of the Supabase project. Must be exactly 20 lowercase alphanumeric characters (letters a-z and digits 0-9 only, no hyphens, underscores, or special characters). You can find this in your Supabase project URL (e.g., https://supabase.com/dashboard/project/<ref>) or by using the 'List all projects' API.\"),\n  version: z.string().describe(\"The version identifier of the migration to fetch. Typically a timestamp-based identifier (e.g., '20260216042751').\"),\n}).describe(\"Request schema for fetching an existing entry from migration history.\");\nexport const SupabaseGetMigrationOutput = z.object({\n  name: z.string().describe(\"The name or description of the migration.\").nullable().optional(),\n  version: z.string().describe(\"The version identifier of the migration.\").nullable(),\n  rollback: z.array(z.string()).describe(\"List of SQL statements to execute when rolling back this migration.\").nullable().optional(),\n  created_by: z.string().describe(\"The identifier of the user or system that created this migration.\").nullable().optional(),\n  statements: z.array(z.string()).describe(\"List of SQL statements that comprise the migration. These are executed when applying the migration.\").nullable().optional(),\n  idempotency_key: z.string().describe(\"A unique key used to ensure idempotent execution of the migration.\").nullable().optional(),\n}).passthrough().describe(\"Response schema for fetching a migration entry from history.\\n\\nReturns details of a database migration including the SQL statements,\\nrollback commands, and metadata about who created it.\");\n\nexport const supabaseGetMigration: AppAction<\n  typeof SupabaseGetMigrationInput,\n  typeof SupabaseGetMigrationOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_GET_MIGRATION\", {\n  slug: \"supabase-get-migration\",\n  name: \"Get a migration\",\n  description: \"Retrieves a specific database migration entry from the migration history using its version identifier. Use when you need to inspect migration details, SQL statements, or rollback commands for a specific migration version.\",\n  input: SupabaseGetMigrationInput,\n  output: SupabaseGetMigrationOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,4BAA4BA,IAAAA,EAAE,OAAO;CAChD,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uUAAuU;CAChW,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oHAAoH;AACnJ,CAAC,CAAC,CAAC,SAAS,uEAAuE;AACnF,MAAa,6BAA6BA,IAAAA,EAAE,OAAO;CACjD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3F,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;CAClF,UAAUA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClI,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzH,YAAYA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,qGAAqG,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpK,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACjI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8LAA8L;AAExN,MAAa,uBAITC,eAAAA,OAAO,0BAA0B;CACnC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}