{"version":3,"file":"create-login-role.mjs","names":[],"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":";;;AAgBA,MAAa,0BAIT,OAAO,8BAA8B;CACvC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAlB0C,EAAE,OAAO;EACnD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE;EAC7F,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS,oHAAoH;CACtJ,CAAC,CAAC,CAAC,SAAS,uEAeH;CACP,QAf2C,EAAE,OAAO;EACpD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS;EAC3F,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS;EAC5H,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;CACpH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,qEAWhB;AACV,CAAC"}