{"version":3,"file":"update-pgsodium-config.mjs","names":[],"sources":["../../src/actions/update-pgsodium-config.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 SupabaseUpdatePgsodiumConfigInput = z.object({\n  ref: z.string().describe(\"The unique identifier (ref ID) of the Supabase project.\"),\n  root_key: z.string().describe(\"The new root encryption key for pgsodium. Must be a cryptographically strong key.\"),\n}).describe(\"Request schema for `UpdatePgsodiumConfig`\");\nexport const SupabaseUpdatePgsodiumConfigOutput = z.object({\n  root_key: z.string().describe(\"The project's pgsodium root encryption key after the update. Updating this root_key can cause all data encrypted with the older key to become inaccessible. Hex-encoded 32-byte pgsodium root key; sensitive secret; handle securely. Exactly 64 hexadecimal characters.\").nullable(),\n}).passthrough().describe(\"Response schema for `UpdatePgsodiumConfig`\");\n\nexport const supabaseUpdatePgsodiumConfig: AppAction<\n  typeof SupabaseUpdatePgsodiumConfigInput,\n  typeof SupabaseUpdatePgsodiumConfigOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_UPDATE_PGSODIUM_CONFIG\", {\n  slug: \"supabase-update-pgsodium-config\",\n  name: \"Update pgsodium root key\",\n  description: \"Critically updates or initializes a Supabase project's pgsodium root encryption key for security setup or key rotation, requiring secure backup of the new key to prevent irreversible data loss.\",\n  input: SupabaseUpdatePgsodiumConfigInput,\n  output: SupabaseUpdatePgsodiumConfigOutput,\n});\n"],"mappings":";;;AAcA,MAAa,+BAIT,OAAO,mCAAmC;CAC5C,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAhB+C,EAAE,OAAO;EACxD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD;EAClF,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF;CACnH,CAAC,CAAC,CAAC,SAAS,2CAaH;CACP,QAbgD,EAAE,OAAO,EACzD,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,0QAA0Q,CAAC,CAAC,SAAS,EACrT,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,4CAWhB;AACV,CAAC"}