{"version":3,"file":"get-project-logs.mjs","names":[],"sources":["../../src/actions/get-project-logs.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 SupabaseGetProjectLogsInput = z.object({\n  ref: z.string().describe(\"The unique reference ID (20 alphanumeric characters) of your Supabase project. You can find this in your project's dashboard URL or by calling the List All Projects action.\"),\n  sql: z.string().describe(\"Custom SQL query to execute on the logs. Allows filtering, aggregation, and transformation of log data. See Supabase docs for querying logs for more details.\").optional(),\n  iso_timestamp_end: z.string().describe(\"End timestamp for filtering logs in ISO 8601 format (e.g., '2024-01-31T23:59:59Z'). Only logs before or at this timestamp will be included.\").optional(),\n  iso_timestamp_start: z.string().describe(\"Start timestamp for filtering logs in ISO 8601 format (e.g., '2024-01-01T00:00:00Z'). Only logs on or after this timestamp will be included.\").optional(),\n}).describe(\"Request schema for `GetProjectLogs`\");\nconst SupabaseGetProjectLogs_ErrorDetailSchema = z.object({\n  code: z.number().describe(\"Error code number\").nullable(),\n  errors: z.array(z.unknown()).describe(\"List of error details\"),\n  status: z.string().describe(\"Error status string\").nullable(),\n  message: z.string().describe(\"Human-readable error message\").nullable(),\n}).passthrough().describe(\"Detailed error information when an API error occurs.\");\nexport const SupabaseGetProjectLogsOutput = z.object({\n  error: z.union([z.string(), SupabaseGetProjectLogs_ErrorDetailSchema]).nullable().optional(),\n  result: z.array(z.record(z.string(), z.unknown())).describe(\"Array of log entries. Each entry contains log data with fields that vary based on the log source and custom SQL query applied.\").nullable().optional(),\n}).passthrough().describe(\"Response schema for `GetProjectLogs`\");\n\nexport const supabaseGetProjectLogs: AppAction<\n  typeof SupabaseGetProjectLogsInput,\n  typeof SupabaseGetProjectLogsOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_GET_PROJECT_LOGS\", {\n  slug: \"supabase-get-project-logs\",\n  name: \"Get project logs\",\n  description: \"Retrieves analytics logs for a Supabase project. Use this to fetch and analyze project logs including edge function logs, database logs, and API logs for monitoring and debugging.\",\n  input: SupabaseGetProjectLogsInput,\n  output: SupabaseGetProjectLogsOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,8BAA8B,EAAE,OAAO;CAClD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,8KAA8K;CACvM,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,+JAA+J,CAAC,CAAC,SAAS;CACnM,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,6IAA6I,CAAC,CAAC,SAAS;CAC/L,qBAAqB,EAAE,OAAO,CAAC,CAAC,SAAS,8IAA8I,CAAC,CAAC,SAAS;AACpM,CAAC,CAAC,CAAC,SAAS,qCAAqC;AACjD,MAAM,2CAA2C,EAAE,OAAO;CACxD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAAC,SAAS;CACxD,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,uBAAuB;CAC7D,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB,CAAC,CAAC,SAAS;CAC5D,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS;AACxE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,sDAAsD;AAMhF,MAAa,yBAIT,OAAO,6BAA6B;CACtC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAd0C,EAAE,OAAO;EACnD,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,wCAAwC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3F,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,gIAAgI,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpN,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,sCAWhB;AACV,CAAC"}