{"version":3,"file":"get-project-api-key.mjs","names":[],"sources":["../../src/actions/get-project-api-key.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 SupabaseGetProjectApiKeyInput = z.object({\n  id: z.string().describe(\"UUID of the API key (must be UUID format from publishable/secret type keys, not legacy key names like 'anon' or 'service_role'). You can get this ID from the List Project API Keys action.\"),\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  reveal: z.boolean().describe(\"If true, reveals the full API key value in the response. If false or omitted, secret key values will be partially redacted. Per Supabase's security model, secrets are hidden by default.\").optional(),\n}).describe(\"Request schema for retrieving a specific API key from a Supabase project.\");\nexport const SupabaseGetProjectApiKeyOutput = z.object({\n  id: z.string().describe(\"Unique identifier of the API key (UUID or legacy identifier).\").nullable().optional(),\n  hash: z.string().describe(\"Server-side hash of the API key material, used for lookup and auditing.\").nullable().optional(),\n  name: z.string().describe(\"Display name assigned to the API key (e.g., 'anon', 'service_role', or a custom name).\").nullable(),\n  type: z.string().describe(\"Category of API key. One of: 'publishable', 'secret', or 'legacy'.\").nullable().optional(),\n  prefix: z.string().describe(\"Human-readable key prefix used for display/matching (e.g., sb_publishable_..., sb_secret_...).\").nullable().optional(),\n  api_key: z.string().describe(\"Full API key value. Returned only when 'reveal=true' is provided by an authorized caller; otherwise omitted or redacted.\").nullable().optional(),\n  updated_at: z.string().describe(\"RFC 3339 timestamp when the API key was last updated (e.g., 2021-12-31T23:34:00Z).\").nullable().optional(),\n  description: z.string().describe(\"Optional description for the API key. Legacy keys commonly indicate their role; modern keys may be null.\").nullable().optional(),\n  inserted_at: z.string().describe(\"RFC 3339 timestamp when the API key was created (e.g., 2021-12-31T23:34:00Z).\").nullable().optional(),\n  secret_jwt_template: z.record(z.string(), z.unknown()).describe(\"Template for claims/config associated with JWT-style keys. Null or omitted for publishable keys.\").nullable().optional(),\n}).passthrough().describe(\"Response schema containing the API key details.\");\n\nexport const supabaseGetProjectApiKey: AppAction<\n  typeof SupabaseGetProjectApiKeyInput,\n  typeof SupabaseGetProjectApiKeyOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_GET_PROJECT_API_KEY\", {\n  slug: \"supabase-get-project-api-key\",\n  name: \"Get project API key\",\n  description: \"Retrieves details of a specific API key for a Supabase project by its UUID. Use when you need to inspect a single key's configuration, type, or metadata.\",\n  input: SupabaseGetProjectApiKeyInput,\n  output: SupabaseGetProjectApiKeyOutput,\n});\n"],"mappings":";;;AAwBA,MAAa,2BAIT,OAAO,gCAAgC;CACzC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OA1B2C,EAAE,OAAO;EACpD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,6LAA6L;EACrN,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,8KAA8K;EACvM,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS,2LAA2L,CAAC,CAAC,SAAS;CACrO,CAAC,CAAC,CAAC,SAAS,2EAsBH;CACP,QAtB4C,EAAE,OAAO;EACrD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC7G,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,yEAAyE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACzH,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,wFAAwF,CAAC,CAAC,SAAS;EAC7H,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACpH,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,gGAAgG,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAClJ,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,0HAA0H,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC7K,YAAY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