{"version":3,"file":"restore-pitr-backup.mjs","names":[],"sources":["../../src/actions/restore-pitr-backup.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 SupabaseRestorePitrBackupInput = z.object({\n  ref: z.string().describe(\"Unique identifier of the Supabase project.\"),\n  recovery_time_target_unix: z.number().int().describe(\"Unix timestamp (seconds) for the desired database restoration point.\"),\n}).describe(\"Request schema for restoring a Supabase project's database to a specific point in time.\");\nexport const SupabaseRestorePitrBackupOutput = z.object({\n  error: z.string().describe(\"Error message if the operation failed.\").nullable().optional(),\n  message: z.string().describe(\"Success or informational message about the restoration operation.\").nullable().optional(),\n  error_code: z.string().describe(\"Error code for troubleshooting (e.g., 'pitr_not_enabled', 'invalid_timestamp').\").nullable().optional(),\n}).passthrough().describe(\"Response from the PITR restore endpoint.\\n\\nOn success (HTTP 201), an empty JSON object is returned indicating the restoration\\nhas been initiated. The response may also include error details for failed operations.\");\n\nexport const supabaseRestorePitrBackup: AppAction<\n  typeof SupabaseRestorePitrBackupInput,\n  typeof SupabaseRestorePitrBackupOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_RESTORE_PITR_BACKUP\", {\n  slug: \"supabase-restore-pitr-backup\",\n  name: \"Restore database PITR backup\",\n  description: \"Restores a Supabase project's database to a specific Unix timestamp using Point-in-Time Recovery (PITR), overwriting the current state; requires a paid plan with PITR and physical backups enabled.\",\n  input: SupabaseRestorePitrBackupInput,\n  output: SupabaseRestorePitrBackupOutput,\n});\n"],"mappings":";;;AAgBA,MAAa,4BAIT,OAAO,gCAAgC;CACzC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAlB4C,EAAE,OAAO;EACrD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C;EACrE,2BAA2B,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,sEAAsE;CAC7H,CAAC,CAAC,CAAC,SAAS,yFAeH;CACP,QAf6C,EAAE,OAAO;EACtD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACzF,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACtH,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,wNAWhB;AACV,CAAC"}