{"version":3,"file":"update-project-supavisor-config.mjs","names":[],"sources":["../../src/actions/update-project-supavisor-config.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 SupabaseUpdateProjectSupavisorConfigInput = z.object({\n  ref: z.string().describe(\"The unique identifier of the Supabase project.\"),\n  pool_mode: z.enum([\"session\", \"transaction\"]).describe(\"This field is deprecated and is ignored in this request. It previously controlled the pooling mode (session or transaction).\").optional(),\n  default_pool_size: z.number().int().describe(\"Default number of connections per user for the connection pool; helps manage concurrent database connections and performance. Optimal value depends on project's compute add-on size and workload.\").optional(),\n}).describe(\"Request schema for updating a project's Supavisor configuration.\");\nexport const SupabaseUpdateProjectSupavisorConfigOutput = z.object({\n  pool_mode: z.string().describe(\"The updated connection pooling mode for the project. Common values include 'session', 'transaction', or 'statement'; some platforms may support 'native' (no pooling), depending on platform support.\").nullable(),\n  default_pool_size: z.number().int().describe(\"The updated default number of connections that the Supavisor pooler opens to the project's Postgres database; represents the default number of connections allocated per pool for the project's Supavisor configuration.\").nullable(),\n}).passthrough().describe(\"Response returned by the Supabase Management API when updating a project's Supavisor (database pooler)\\nconfiguration via PATCH /v1/projects/{ref}/config/database/pooler.\");\n\nexport const supabaseUpdateProjectSupavisorConfig: AppAction<\n  typeof SupabaseUpdateProjectSupavisorConfigInput,\n  typeof SupabaseUpdateProjectSupavisorConfigOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_UPDATE_PROJECT_SUPAVISOR_CONFIG\", {\n  slug: \"supabase-update-project-supavisor-config\",\n  name: \"Update database pooler config\",\n  description: \"Updates the Supavisor (database pooler) configuration, such as `default_pool_size`, for an existing Supabase project identified by `ref`; the `pool_mode` parameter in the request is deprecated and ignored.\",\n  input: SupabaseUpdateProjectSupavisorConfigInput,\n  output: SupabaseUpdateProjectSupavisorConfigOutput,\n});\n"],"mappings":";;;AAgBA,MAAa,uCAIT,OAAO,4CAA4C;CACrD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAlBuD,EAAE,OAAO;EAChE,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD;EACzE,WAAW,EAAE,KAAK,CAAC,WAAW,aAAa,CAAC,CAAC,CAAC,SAAS,8HAA8H,CAAC,CAAC,SAAS;EAChM,mBAAmB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oMAAoM,CAAC,CAAC,SAAS;CAC9P,CAAC,CAAC,CAAC,SAAS,kEAcH;CACP,QAdwD,EAAE,OAAO;EACjE,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,uMAAuM,CAAC,CAAC,SAAS;EACjP,mBAAmB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0NAA0N,CAAC,CAAC,SAAS;CACpR,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,4KAWhB;AACV,CAAC"}