{"version":3,"file":"restore-pitr-backup.cjs","names":["z","action"],"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":";;;;AAMA,MAAa,iCAAiCA,IAAAA,EAAE,OAAO;CACrD,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C;CACrE,2BAA2BA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,sEAAsE;AAC7H,CAAC,CAAC,CAAC,SAAS,yFAAyF;AACrG,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,SAAS,mEAAmE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtH,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACzI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,wNAAwN;AAElP,MAAa,4BAITC,eAAAA,OAAO,gCAAgC;CACzC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}