{"version":3,"file":"create-a-project.cjs","names":["z","action"],"sources":["../../src/actions/create-a-project.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 SupabaseCreateAProjectInput = z.object({\n  name: z.string().describe(\"Name for the new project; must be unique within the organization and not contain dots.\"),\n  plan: z.enum([\"free\", \"pro\"]).describe(\"Subscription plans (now set at the organization level).\").optional(),\n  region: z.enum([\"ap-east-1\", \"ap-northeast-1\", \"ap-northeast-2\", \"ap-south-1\", \"ap-southeast-1\", \"ap-southeast-2\", \"ca-central-1\", \"eu-central-1\", \"eu-central-2\", \"eu-north-1\", \"eu-west-1\", \"eu-west-2\", \"eu-west-3\", \"sa-east-1\", \"us-east-1\", \"us-east-2\", \"us-west-1\", \"us-west-2\"]).describe(\"Geographical region for the project's server and database.\"),\n  db_pass: z.string().describe(\"Password for the new database (required). Must be a secure password. IMPORTANT: Store this password securely as it cannot be retrieved later via the API and is needed for direct database connections.\"),\n  kps_enabled: z.boolean().describe(\"Deprecated and ignored.\").optional(),\n  template_url: z.string().describe(\"Optional URL to a Supabase project template (e.g., from Git) to initialize the project.\").optional(),\n  organization_id: z.string().describe(\"The actual organization ID or slug from your Supabase account. IMPORTANT: 'personal' is NOT a valid value - you must use the real organization ID returned by the 'List All Organizations' API endpoint (GET /v1/organizations) or found in your Supabase dashboard settings.\"),\n  postgres_engine: z.enum([\"15\"]).describe(\"Supported major versions of the PostgreSQL engine.\").optional(),\n  release_channel: z.enum([\"alpha\", \"beta\", \"ga\", \"internal\", \"withdrawn\"]).describe(\"Available release channels for Supabase software.\").optional(),\n  desired_instance_size: z.enum([\"12xlarge\", \"16xlarge\", \"2xlarge\", \"4xlarge\", \"8xlarge\", \"large\", \"medium\", \"micro\", \"small\", \"xlarge\"]).describe(\"Available compute instance sizes for a Supabase project.\").optional(),\n}).describe(\"Request to create a new Supabase project.\");\nconst SupabaseCreateAProject_StatusSchema = z.enum([\"ACTIVE_HEALTHY\", \"ACTIVE_UNHEALTHY\", \"COMING_UP\", \"GOING_DOWN\", \"INACTIVE\", \"INIT_FAILED\", \"REMOVED\", \"RESTARTING\", \"UNKNOWN\", \"UPGRADING\", \"PAUSING\", \"RESTORING\", \"RESTORE_FAILED\", \"PAUSE_FAILED\"]).describe(\"Possible operational statuses for a Supabase project.\");\nexport const SupabaseCreateAProjectOutput = z.object({\n  id: z.string().describe(\"Unique identifier (project reference) of the newly created project. Use this for subsequent API calls.\").nullable(),\n  ref: z.string().describe(\"Project reference string, typically identical to id. Can be used interchangeably with id in API calls.\").nullable().optional(),\n  name: z.string().describe(\"Human-readable name of the project.\").nullable(),\n  region: z.string().describe(\"Cloud region where the project is hosted (for example, 'us-east-1').\").nullable(),\n  status: SupabaseCreateAProject_StatusSchema.nullable(),\n  created_at: z.string().describe(\"Timestamp when the project was created, in ISO 8601 UTC format (typically with a 'Z' suffix).\").nullable(),\n  organization_id: z.string().describe(\"Identifier of the organization that owns the project.\").nullable(),\n  organization_slug: z.string().describe(\"URL-friendly slug of the organization that owns the project.\").nullable().optional(),\n}).passthrough().describe(\"Response body for 201 Created from POST /v1/projects (Create a project).\\n\\nMatches the official Supabase Management API docs which return a single\\nproject object (not wrapped) with a minimal set of fields on creation.\\nSee: supabase.com/docs/reference/api (Create a project).\");\n\nexport const supabaseCreateAProject: AppAction<\n  typeof SupabaseCreateAProjectInput,\n  typeof SupabaseCreateAProjectOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_CREATE_A_PROJECT\", {\n  slug: \"supabase-create-a-project\",\n  name: \"Create new project\",\n  description: \"Creates a new Supabase project, requiring a unique name (no dots) within the organization; project creation is asynchronous.\",\n  input: SupabaseCreateAProjectInput,\n  output: SupabaseCreateAProjectOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wFAAwF;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