{"version":3,"file":"update-pgsodium-config.cjs","names":["z","action"],"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":";;;;AAMA,MAAa,oCAAoCA,IAAAA,EAAE,OAAO;CACxD,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD;CAClF,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF;AACnH,CAAC,CAAC,CAAC,SAAS,2CAA2C;AACvD,MAAa,qCAAqCA,IAAAA,EAAE,OAAO,EACzD,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0QAA0Q,CAAC,CAAC,SAAS,EACrT,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,4CAA4C;AAEtE,MAAa,+BAITC,eAAAA,OAAO,mCAAmC;CAC5C,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}