{"version":3,"file":"get-sql-snippet.mjs","names":[],"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,6BAA6B,EAAE,OAAO,EACjD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,EACjF,CAAC,CAAC,CAAC,SAAS,oCAAoC;AAChD,MAAM,mCAAmC,EAAE,KAAK,CAAC,KAAK,CAAC;AACvD,MAAM,oCAAoC,EAAE,OAAO;CACjD,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;CAC3E,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS;AACnE,CAAC,CAAC,CAAC,YAAY;AACf,MAAM,sCAAsC,EAAE,OAAO;CACnD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS;CAClE,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;CAC9F,gBAAgB,EAAE,OAAO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