{"version":3,"file":"get-migration.mjs","names":[],"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":";;;AAmBA,MAAa,uBAIT,OAAO,0BAA0B;CACnC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OArBuC,EAAE,OAAO;EAChD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,uUAAuU;EAChW,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,oHAAoH;CACnJ,CAAC,CAAC,CAAC,SAAS,uEAkBH;CACP,QAlBwC,EAAE,OAAO;EACjD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3F,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;EAClF,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAClI,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACzH,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,qGAAqG,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACpK,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8LAWhB;AACV,CAAC"}