{"version":3,"file":"delete-all-branches.cjs","names":["z","action"],"sources":["../../src/actions/delete-all-branches.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 SupabaseDeleteAllBranchesInput = z.object({\n  ref: z.string().describe(\"The unique reference ID of the Supabase project for which all database branches will be deleted. This ID can be found in your project's dashboard URL.\"),\n}).describe(\"Request schema for deleting all database branches in a project.\");\nexport const SupabaseDeleteAllBranchesOutput = z.object({\n  error: z.string().describe(\"Error details if the operation failed.\").nullable().optional(),\n  message: z.string().default(\"Preview branching has been disabled successfully.\").describe(\"Human-readable message describing the operation outcome.\").nullable().optional(),\n  success: z.boolean().default(true).describe(\"Indicates whether preview branching was disabled successfully.\").nullable().optional(),\n}).passthrough().describe(\"Response schema for deleting all database branches.\\n\\nThe API returns an empty JSON object ({}) on success.\");\n\nexport const supabaseDeleteAllBranches: AppAction<\n  typeof SupabaseDeleteAllBranchesInput,\n  typeof SupabaseDeleteAllBranchesOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_DELETE_ALL_BRANCHES\", {\n  slug: \"supabase-delete-all-branches\",\n  name: \"Delete all branches\",\n  description: \"Disables preview branching for a Supabase project, which deletes all remaining branches. IMPORTANT: Before calling this endpoint, you must manually delete all non-default branches. The API will reject the request with a 422 error if non-default branches exist. Use this action when you need to completely disable the preview branching feature for a project. This action is irreversible - all branches will be permanently removed and preview branching will be disabled. Requirements: - Preview branching must be enabled on the project - All non-default branches must be deleted first - Project must be on Pro plan or above to have preview branching\",\n  input: SupabaseDeleteAllBranchesInput,\n  output: SupabaseDeleteAllBranchesOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,iCAAiCA,IAAAA,EAAE,OAAO,EACrD,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wJAAwJ,EACnL,CAAC,CAAC,CAAC,SAAS,iEAAiE;AAC7E,MAAa,kCAAkCA,IAAAA,EAAE,OAAO;CACtD,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzF,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,QAAQ,mDAAmD,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1K,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACpI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8GAA8G;AAExI,MAAa,4BAITC,eAAAA,OAAO,gCAAgC;CACzC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}