{"version":3,"file":"alpha-create-api-key.mjs","names":[],"sources":["../../src/actions/alpha-create-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 SupabaseAlphaCreateApiKeyInput = z.object({\n  ref: z.string().describe(\"The unique reference ID of the Supabase project.\"),\n  name: z.string().describe(\"Name for the API key. Must start with a lowercase letter or underscore, followed only by lowercase alphanumeric characters or underscores. Example: 'my_api_key_01'.\"),\n  type: z.enum([\"publishable\", \"secret\"]).describe(\"Specifies the type of API key: 'publishable' for client-side use or 'secret' for server-side operations.\"),\n  description: z.string().describe(\"Optional human-readable description for the API key.\").optional(),\n}).describe(\"Request schema for `AlphaCreateApiKey`\");\nconst SupabaseAlphaCreateApiKey_ApiKeyTypeSchema = z.enum([\"legacy\", \"publishable\", \"secret\"]).describe(\"API key type returned by Supabase.\");\nexport const SupabaseAlphaCreateApiKeyOutput = z.object({\n  id: z.string().describe(\"Unique identifier of the API key record within the project.\").nullable(),\n  hash: z.string().describe(\"Cryptographic hash of the API key value for safe storage/lookup.\").nullable(),\n  name: z.string().describe(\"Human-readable name/label assigned to the API key.\").nullable(),\n  type: SupabaseAlphaCreateApiKey_ApiKeyTypeSchema.nullable(),\n  prefix: z.string().describe(\"Short, non-sensitive prefix of the key value for identification.\").nullable(),\n  api_key: z.string().describe(\"The plaintext API key value. Only returned when the request includes reveal=true. Treat as a secret and store securely.\").nullable().optional(),\n  updated_at: z.string().describe(\"Timestamp when the API key record was last updated (ISO 8601, UTC).\").nullable(),\n  description: z.string().describe(\"Optional free-form description for the API key.\").nullable().optional(),\n  inserted_at: z.string().describe(\"Timestamp when the API key was created (ISO 8601, UTC).\").nullable(),\n  secret_jwt_template: z.record(z.string(), z.unknown()).describe(\"Optional template object used when minting short-lived internal JWTs derived from this API key. Keys/values define default claims or overrides.\").nullable().optional(),\n}).passthrough().describe(\"Response schema for `AlphaCreateApiKey`.\\n\\nMatches Supabase Management API create API key response. The `api_key` field\\nis conditionally included only when `reveal=true` is provided by the caller.\");\n\nexport const supabaseAlphaCreateApiKey: AppAction<\n  typeof SupabaseAlphaCreateApiKeyInput,\n  typeof SupabaseAlphaCreateApiKeyOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_ALPHA_CREATE_API_KEY\", {\n  slug: \"supabase-alpha-create-api-key\",\n  name: \"Create project api key\",\n  description: \"Creates a 'publishable' or 'secret' API key for an existing Supabase project, optionally with a description; 'secret' keys can have customized JWT templates.\",\n  input: SupabaseAlphaCreateApiKeyInput,\n  output: SupabaseAlphaCreateApiKeyOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,iCAAiC,EAAE,OAAO;CACrD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD;CAC3E,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,sKAAsK;CAChM,MAAM,EAAE,KAAK,CAAC,eAAe,QAAQ,CAAC,CAAC,CAAC,SAAS,0GAA0G;CAC3J,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS;AACpG,CAAC,CAAC,CAAC,SAAS,wCAAwC;AACpD,MAAM,6CAA6C,EAAE,KAAK;CAAC;CAAU;CAAe;AAAQ,CAAC,CAAC,CAAC,SAAS,oCAAoC;AAc5I,MAAa,4BAIT,OAAO,iCAAiC;CAC1C,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAtB6C,EAAE,OAAO;EACtD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;EAChG,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC,SAAS;EACvG,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;EACzF,MAAM,2CAA2C,SAAS;EAC1D,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC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