{"version":3,"file":"get-sql-snippet.cjs","names":["z","action"],"sources":["../../src/actions/get-sql-snippet.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 SupabaseGetSqlSnippetInput = z.object({\n  id: z.string().describe(\"The unique identifier of the SQL snippet to retrieve.\"),\n}).describe(\"Request schema for `GetSqlSnippet`\");\nconst SupabaseGetSqlSnippet_TypeSchema = z.enum([\"sql\"]);\nconst SupabaseGetSqlSnippet_OwnerSchema = z.object({\n  id: z.number().int().describe(\"Numeric identifier of the owner.\").nullable(),\n  username: z.string().describe(\"Username of the owner.\").nullable(),\n}).passthrough();\nconst SupabaseGetSqlSnippet_ContentSchema = z.object({\n  sql: z.string().describe(\"The SQL text of the snippet.\").nullable(),\n  favorite: z.boolean().describe(\"Whether the snippet content is marked as favorite.\").nullable(),\n  schema_version: z.string().describe(\"Schema version string for the snippet content.\").nullable(),\n}).passthrough();\nconst SupabaseGetSqlSnippet_ProjectSchema = z.object({\n  id: z.number().int().describe(\"Numeric identifier of the project.\").nullable(),\n  name: z.string().describe(\"Name of the project.\").nullable(),\n}).passthrough();\nconst SupabaseGetSqlSnippet_UpdatedBySchema = z.object({\n  id: z.number().int().describe(\"Numeric identifier of the user who performed the last update.\").nullable(),\n  username: z.string().describe(\"Username of the user who performed the last update.\").nullable(),\n}).passthrough();\nconst SupabaseGetSqlSnippet_VisibilitySchema = z.enum([\"user\", \"project\", \"org\", \"public\"]);\nexport const SupabaseGetSqlSnippetOutput = z.object({\n  id: z.string().describe(\"Unique identifier of the SQL snippet.\").nullable(),\n  name: z.string().describe(\"Human-readable name of the snippet.\").nullable(),\n  type: SupabaseGetSqlSnippet_TypeSchema.nullable(),\n  owner: SupabaseGetSqlSnippet_OwnerSchema.nullable(),\n  content: SupabaseGetSqlSnippet_ContentSchema.nullable(),\n  project: SupabaseGetSqlSnippet_ProjectSchema.nullable(),\n  updated_at: z.string().describe(\"Timestamp when the snippet was last updated (ISO 8601, UTC).\").nullable(),\n  updated_by: SupabaseGetSqlSnippet_UpdatedBySchema.nullable(),\n  visibility: SupabaseGetSqlSnippet_VisibilitySchema.nullable(),\n  description: z.string().describe(\"Text description of the snippet.\").nullable().optional(),\n  inserted_at: z.string().describe(\"Timestamp when the snippet was created (ISO 8601, UTC).\").nullable(),\n}).passthrough().describe(\"Response schema for `GetSqlSnippet`.\\n\\nMatches the Supabase Management API response for GET /v1/snippets/{id} directly\\n(no top-level \\\"data\\\" wrapper).\");\n\nexport const supabaseGetSqlSnippet: AppAction<\n  typeof SupabaseGetSqlSnippetInput,\n  typeof SupabaseGetSqlSnippetOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_GET_SQL_SNIPPET\", {\n  slug: \"supabase-get-sql-snippet\",\n  name: \"Get a specific SQL snippet\",\n  description: \"Retrieves a specific SQL snippet by its unique identifier.\",\n  input: SupabaseGetSqlSnippetInput,\n  output: SupabaseGetSqlSnippetOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,6BAA6BA,IAAAA,EAAE,OAAO,EACjD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,EACjF,CAAC,CAAC,CAAC,SAAS,oCAAoC;AAChD,MAAM,mCAAmCA,IAAAA,EAAE,KAAK,CAAC,KAAK,CAAC;AACvD,MAAM,oCAAoCA,IAAAA,EAAE,OAAO;CACjD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;CAC3E,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS;AACnE,CAAC,CAAC,CAAC,YAAY;AACf,MAAM,sCAAsCA,IAAAA,EAAE,OAAO;CACnD,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS;CAClE,UAAUA,IAAAA,EAA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