{"version":3,"file":"create-login-role.cjs","names":["z","action"],"sources":["../../src/actions/create-login-role.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 SupabaseCreateLoginRoleInput = z.object({\n  ref: z.string().describe(\"Project reference ID (unique identifier for the Supabase project).\"),\n  read_only: z.boolean().describe(\"Whether the login role should have read-only permissions. Set to true for read-only access, false for full access.\"),\n}).describe(\"Request schema for creating a CLI login role with temporary password.\");\nexport const SupabaseCreateLoginRoleOutput = z.object({\n  role: z.string().describe(\"The name of the created database role for CLI login.\").nullable(),\n  password: z.string().describe(\"Temporary password for the login role. Store securely as it's only provided once.\").nullable(),\n  ttl_seconds: z.number().int().describe(\"Time-to-live in seconds for this login role before it expires.\").nullable(),\n}).passthrough().describe(\"Response containing the temporary login credentials for CLI access.\");\n\nexport const supabaseCreateLoginRole: AppAction<\n  typeof SupabaseCreateLoginRoleInput,\n  typeof SupabaseCreateLoginRoleOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_CREATE_LOGIN_ROLE\", {\n  slug: \"supabase-create-login-role\",\n  name: \"Create CLI login role\",\n  description: \"Creates a temporary CLI login role for database access with specified permissions; use when setting up CLI authentication for development or administrative tasks.\",\n  input: SupabaseCreateLoginRoleInput,\n  output: SupabaseCreateLoginRoleOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,+BAA+BA,IAAAA,EAAE,OAAO;CACnD,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE;CAC7F,WAAWA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,oHAAoH;AACtJ,CAAC,CAAC,CAAC,SAAS,uEAAuE;AACnF,MAAa,gCAAgCA,IAAAA,EAAE,OAAO;CACpD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS;CAC3F,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS;CAC5H,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;AACpH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,qEAAqE;AAE/F,MAAa,0BAITC,eAAAA,OAAO,8BAA8B;CACvC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}