{"version":3,"file":"get-function.mjs","names":[],"sources":["../../src/actions/get-function.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 SupabaseGetFunctionInput = z.object({\n  ref: z.string().describe(\"The unique reference ID of the Supabase project. Must be exactly 20 lowercase alphanumeric characters (letters a-z and digits 0-9 only, no hyphens, underscores, or special characters). You can find this in your Supabase project URL (e.g., https://supabase.com/dashboard/project/<ref>) or by using the 'List all projects' API.\"),\n  function_slug: z.string().describe(\"The unique identifier (slug) for the Edge Function.\"),\n}).describe(\"Request schema for retrieving detailed information about a specific Supabase Edge Function.\");\nconst SupabaseGetFunction_StatusSchema = z.enum([\"ACTIVE\", \"REMOVED\", \"THROTTLED\"]);\nexport const SupabaseGetFunctionOutput = z.object({\n  id: z.string().describe(\"Unique identifier of the function.\").nullable(),\n  name: z.string().describe(\"Human-readable name of the function.\").nullable(),\n  slug: z.string().describe(\"URL-friendly identifier (slug) of the function, used in invocation endpoints.\").nullable(),\n  status: SupabaseGetFunction_StatusSchema.nullable(),\n  version: z.number().int().describe(\"Version number of the function.\").nullable(),\n  created_at: z.number().int().describe(\"Timestamp when the function was created, in milliseconds since Unix epoch.\").nullable(),\n  import_map: z.boolean().describe(\"Whether an import map is enabled for the function.\").nullable(),\n  updated_at: z.number().int().describe(\"Timestamp when the function was last updated, in milliseconds since Unix epoch.\").nullable(),\n  verify_jwt: z.boolean().describe(\"Whether the function requires verification of JWTs.\").nullable(),\n  ezbr_sha256: z.string().describe(\"SHA-256 hash associated with the function bundle (EZBR), if present. Hex-encoded 64-character string. May be null when not applicable.\").nullable().optional(),\n  entrypoint_path: z.string().describe(\"Path to the function's entrypoint file (e.g., index.ts).\").nullable(),\n  import_map_path: z.string().describe(\"Path to the import map used by the function, if any. May be null or an empty string when not set.\").nullable().optional(),\n}).passthrough().describe(\"Response body for Supabase Management API: Retrieve a function (GET /v1/projects/{ref}/functions/{function_slug}).\\n\\nMatches the official docs fields and types. Returns the function object directly (no wrapper).\");\n\nexport const supabaseGetFunction: AppAction<\n  typeof SupabaseGetFunctionInput,\n  typeof SupabaseGetFunctionOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_GET_FUNCTION\", {\n  slug: \"supabase-get-function\",\n  name: \"Retrieve a function\",\n  description: \"Retrieves detailed information, metadata, configuration, and status for a specific Edge Function using its project reference ID and function slug.\",\n  input: SupabaseGetFunctionInput,\n  output: SupabaseGetFunctionOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,2BAA2B,EAAE,OAAO;CAC/C,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,uUAAuU;CAChW,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD;AAC1F,CAAC,CAAC,CAAC,SAAS,6FAA6F;AACzG,MAAM,mCAAmC,EAAE,KAAK;CAAC;CAAU;CAAW;AAAW,CAAC;AAgBlF,MAAa,sBAIT,OAAO,yBAAyB;CAClC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAxBuC,EAAE,OAAO;EAChD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;EACvE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;EAC3E,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,+EAA+E,CAAC,CAAC,SAAS;EACpH,QAAQ,iCAAiC,SAAS;EAClD,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS;EAC/E,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,4EAA4E,CAAC,CAAC,SAAS;EAC7H,YAAY,EAAE,QAAQ,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;EAChG,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iFA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