{"version":3,"file":"merge-branch.mjs","names":[],"sources":["../../src/actions/merge-branch.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 SupabaseMergeBranchInput = z.object({\n  branch_id_or_ref: z.string().describe(\"The unique identifier (UUID format) or reference of the database branch to merge.\"),\n  migration_version: z.string().describe(\"Optional migration version to merge up to. Format: timestamp like '20260216000000'. If not provided, merges all migrations.\").optional(),\n}).describe(\"Request schema for merging a database branch.\\n\\nMerges a database branch, applying all schema changes and migrations from\\nthe branch to the target (typically production).\");\nexport const SupabaseMergeBranchOutput = z.object({\n  message: z.string().describe(\"Confirmation message indicating the merge was initiated successfully (value is \\\"ok\\\").\").nullable(),\n  workflow_run_id: z.string().describe(\"Identifier of the workflow run triggered to perform the merge operation.\").nullable(),\n}).passthrough().describe(\"Response from merging a database branch.\\n\\nReturns the identifier of the workflow run triggered to perform the merge operation\\nand a confirmation message.\");\n\nexport const supabaseMergeBranch: AppAction<\n  typeof SupabaseMergeBranchInput,\n  typeof SupabaseMergeBranchOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_MERGE_BRANCH\", {\n  slug: \"supabase-merge-branch\",\n  name: \"Merge a database branch\",\n  description: \"Merges a database branch, applying all schema changes and migrations from the branch to the target database. Use this action when you need to promote changes from a database branch to production or another target environment after testing and validation are complete. This operation is irreversible - once merged, the changes cannot be automatically rolled back.\",\n  input: SupabaseMergeBranchInput,\n  output: SupabaseMergeBranchOutput,\n});\n"],"mappings":";;;AAeA,MAAa,sBAIT,OAAO,yBAAyB;CAClC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAjBsC,EAAE,OAAO;EAC/C,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF;EACzH,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,6HAA6H,CAAC,CAAC,SAAS;CACjL,CAAC,CAAC,CAAC,SAAS,8KAcH;CACP,QAduC,EAAE,OAAO;EAChD,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,yFAAyF,CAAC,CAAC,SAAS;EACjI,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;CAC5H,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8JAWhB;AACV,CAAC"}