{"version":3,"file":"update-project-postgrest-config.mjs","names":[],"sources":["../../src/actions/update-project-postgrest-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 SupabaseUpdateProjectPostgrestConfigInput = z.object({\n  ref: z.string().describe(\"The unique identifier (reference) of the Supabase project.\"),\n  db_pool: z.number().int().describe(\"The maximum number of connections in the PostgreSQL connection pool for PostgREST. If `null` or not provided, the pool size may be automatically configured based on compute size.\").optional(),\n  max_rows: z.number().int().describe(\"The maximum number of rows PostgREST can return in a single response; this setting helps control payload size and query performance.\").optional(),\n  db_schema: z.string().describe(\"A comma-separated string of PostgreSQL schemas to be exposed through the PostgREST API (e.g., 'public,api').\").optional(),\n  db_extra_search_path: z.string().describe(\"A comma-separated string of additional PostgreSQL schemas to search for objects if not found in the primary schema(s) defined by `db_schema`. An empty string can be used to clear existing paths.\").optional(),\n}).describe(\"Request schema for `UpdateProjectPostgrestConfig`\");\nexport const SupabaseUpdateProjectPostgrestConfigOutput = z.object({\n  db_pool: z.number().int().describe(\"Maximum number of database connections PostgREST keeps open in its connection pool for this project. Null indicates that the default or project-level setting is used.\").nullable().optional(),\n  max_rows: z.number().int().describe(\"Hard limit on the number of rows PostgREST will return from a table, view, or RPC call. Helps cap payload sizes for accidental or malicious requests.\").nullable(),\n  db_schema: z.string().describe(\"Comma-separated list of database schemas that PostgREST exposes as API endpoints for this project (for example: \\\"public,storage,graphql_public\\\"). These schemas get REST endpoints.\").nullable(),\n  db_extra_search_path: z.string().describe(\"Comma-separated list of extra schemas to include in PostgreSQL search_path for every request (for example: \\\"public,extensions\\\"). Objects in these schemas do not get API endpoints but can be referenced by database objects within the exposed db_schema list. Empty string means no extras.\").nullable(),\n}).passthrough().describe(\"Response schema for `UpdateProjectPostgrestConfig`\");\n\nexport const supabaseUpdateProjectPostgrestConfig: AppAction<\n  typeof SupabaseUpdateProjectPostgrestConfigInput,\n  typeof SupabaseUpdateProjectPostgrestConfigOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_UPDATE_PROJECT_POSTGREST_CONFIG\", {\n  slug: \"supabase-update-project-postgrest-config\",\n  name: \"Update project's PostgREST config\",\n  description: \"Updates PostgREST configuration settings (e.g., `max_rows`, `db_pool`, `db_schema`, `db_extra_search_path`) for a Supabase project to fine-tune API performance, data exposure, and database resource usage.\",\n  input: SupabaseUpdateProjectPostgrestConfigInput,\n  output: SupabaseUpdateProjectPostgrestConfigOutput,\n});\n"],"mappings":";;;AAoBA,MAAa,uCAIT,OAAO,4CAA4C;CACrD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAtBuD,EAAE,OAAO;EAChE,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D;EACrF,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oLAAoL,CAAC,CAAC,SAAS;EAClO,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,sIAAsI,CAAC,CAAC,SAAS;EACrL,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,8GAA8G,CAAC,CAAC,SAAS;EACxJ,sBAAsB,EAAE,OAAO,CAAC,CAAC,SAAS,oMAAoM,CAAC,CAAC,SAAS;CAC3P,CAAC,CAAC,CAAC,SAAS,mDAgBH;CACP,QAhBwD,EAAE,OAAO;EACjE,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wKAAwK,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACjO,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uJAAuJ,CAAC,CAAC,SAAS;EACtM,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,uLAAuL,CAAC,CAAC,SAAS;EACjO,sBAAsB,EAAE,OAAO,CAAC,CAAC,SAAS,iSAAiS,CAAC,CAAC,SAAS;CACxV,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oDAWhB;AACV,CAAC"}