{"version":3,"file":"create-organization.mjs","names":[],"sources":["../../src/actions/create-organization.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 SupabaseCreateOrganizationInput = z.object({\n  name: z.string().describe(\"The name for the new organization.\"),\n}).describe(\"Request schema for `CreateOrganization`\");\nexport const SupabaseCreateOrganizationOutput = z.object({\n  id: z.string().describe(\"Unique identifier of the newly created organization; opaque string generated by the system.\").nullable(),\n  name: z.string().describe(\"Display name of the newly created organization; human-readable and accepts any UTF-8 string.\").nullable(),\n}).passthrough().describe(\"Response body for Supabase Management API: Create an organization (POST /v1/organizations).\\n\\nPer official docs, the API returns the created organization object directly, not wrapped\\nin a `data` field. The object contains only `id` and `name`.\\nSource: Supabase Management API docs – Create an organization (post /v1/organizations).\");\n\nexport const supabaseCreateOrganization: AppAction<\n  typeof SupabaseCreateOrganizationInput,\n  typeof SupabaseCreateOrganizationOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_CREATE_ORGANIZATION\", {\n  slug: \"supabase-create-organization\",\n  name: \"Create an organization\",\n  description: \"Creates a new Supabase organization, which serves as a top-level container for projects, billing, and team access.\",\n  input: SupabaseCreateOrganizationInput,\n  output: SupabaseCreateOrganizationOutput,\n});\n"],"mappings":";;;AAcA,MAAa,6BAIT,OAAO,gCAAgC;CACzC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAhB6C,EAAE,OAAO,EACtD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,EAChE,CAAC,CAAC,CAAC,SAAS,yCAcH;CACP,QAd8C,EAAE,OAAO;EACvD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,6FAA6F,CAAC,CAAC,SAAS;EAChI,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,8FAA8F,CAAC,CAAC,SAAS;CACrI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,gVAWhB;AACV,CAAC"}