{"version":3,"file":"merge-branch.cjs","names":["z","action"],"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":";;;;AAMA,MAAa,2BAA2BA,IAAAA,EAAE,OAAO;CAC/C,kBAAkBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF;CACzH,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6HAA6H,CAAC,CAAC,SAAS;AACjL,CAAC,CAAC,CAAC,SAAS,8KAA8K;AAC1L,MAAa,4BAA4BA,IAAAA,EAAE,OAAO;CAChD,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yFAAyF,CAAC,CAAC,SAAS;CACjI,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;AAC5H,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8JAA8J;AAExL,MAAa,sBAITC,eAAAA,OAAO,yBAAyB;CAClC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}