{"version":3,"file":"get-function-body.mjs","names":[],"sources":["../../src/actions/get-function-body.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 SupabaseGetFunctionBodyInput = z.object({\n  ref: z.string().describe(\"The unique reference ID of the Supabase project.\"),\n  function_slug: z.string().describe(\"The unique identifier (slug) of the serverless Edge Function whose body is to be retrieved. This is typically the function's name.\"),\n}).describe(\"Request schema for `GetFunctionBody`\");\nexport const SupabaseGetFunctionBodyOutput = z.record(z.string(), z.unknown()).describe(\"Response schema for `GetFunctionBody`.\\n\\nOfficial Supabase Management API docs specify an empty 200 OK response schema (no fields)\\nfor GET /v1/projects/{ref}/functions/{function_slug}/body. Therefore this model is intentionally empty\\nto match the documented API response. See Supabase docs: Retrieve a function body endpoint.\");\n\nexport const supabaseGetFunctionBody: AppAction<\n  typeof SupabaseGetFunctionBodyInput,\n  typeof SupabaseGetFunctionBodyOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_GET_FUNCTION_BODY\", {\n  slug: \"supabase-get-function-body\",\n  name: \"Retrieve a function body\",\n  description: \"Retrieves the source code (body) for a specified serverless Edge Function using its project reference and function slug; this is a read-only operation that does not execute the function or return runtime logs.\",\n  input: SupabaseGetFunctionBodyInput,\n  output: SupabaseGetFunctionBodyOutput,\n});\n"],"mappings":";;;AAYA,MAAa,0BAIT,OAAO,8BAA8B;CACvC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAd0C,EAAE,OAAO;EACnD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD;EAC3E,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,oIAAoI;CACzK,CAAC,CAAC,CAAC,SAAS,sCAWH;CACP,QAX2C,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,0UAW9E;AACV,CAAC"}