{"version":3,"file":"get-project-postgres-config.mjs","names":[],"sources":["../../src/actions/get-project-postgres-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 SupabaseGetProjectPostgresConfigInput = z.object({\n  ref: z.string().describe(\"The unique reference ID of the Supabase project.\"),\n}).describe(\"Request schema for retrieving the PostgreSQL configuration of a Supabase project.\");\nconst SupabaseGetProjectPostgresConfig_SessionReplicationRoleSchema = z.enum([\"origin\", \"replica\", \"local\"]);\nexport const SupabaseGetProjectPostgresConfigOutput = z.object({\n  work_mem: z.string().describe(\"Amount of memory to be used by internal sort operations and hash tables before writing to temporary disk files, e.g., '64MB'.\").nullable().optional(),\n  max_wal_size: z.string().describe(\"Maximum size to let the WAL grow before automatic checkpoints are triggered, e.g., '2GB'.\").nullable().optional(),\n  wal_keep_size: z.string().describe(\"Amount of WAL files to keep for standby servers, e.g., '512MB'.\").nullable().optional(),\n  shared_buffers: z.string().describe(\"Amount of memory the database server uses for shared memory buffers, e.g., '1GB'.\").nullable().optional(),\n  max_connections: z.number().int().describe(\"Maximum number of concurrent connections to the database cluster.\").nullable().optional(),\n  max_wal_senders: z.number().int().describe(\"Maximum number of concurrent WAL sender processes for replication.\").nullable().optional(),\n  statement_timeout: z.string().describe(\"Abort any statement that runs for longer than the specified time, e.g., '5min' or '0' to disable.\").nullable().optional(),\n  wal_sender_timeout: z.string().describe(\"Termination timeout for WAL sender if no data/heartbeat is received, e.g., '60s'.\").nullable().optional(),\n  effective_cache_size: z.string().describe(\"Planner hint for how much memory is available for disk caching by the OS and database, e.g., '4GB'.\").nullable().optional(),\n  maintenance_work_mem: z.string().describe(\"Maximum memory to be used for maintenance operations such as VACUUM, CREATE INDEX, etc., e.g., '1GB'.\").nullable().optional(),\n  max_parallel_workers: z.number().int().describe(\"Maximum number of parallel workers that can be active at one time for the cluster.\").nullable().optional(),\n  max_worker_processes: z.number().int().describe(\"Maximum number of background worker processes that can be registered.\").nullable().optional(),\n  max_replication_slots: z.number().int().describe(\"Maximum number of replication slots (physical or logical) that can be defined.\").nullable().optional(),\n  max_slot_wal_keep_size: z.string().describe(\"Maximum size of WAL files to retain for replication slots, e.g., '1GB' or '0' to disable the limit.\").nullable().optional(),\n  track_commit_timestamp: z.boolean().describe(\"Enables recording the commit timestamp of transactions.\").nullable().optional(),\n  session_replication_role: SupabaseGetProjectPostgresConfig_SessionReplicationRoleSchema.nullable().optional(),\n  logical_decoding_work_mem: z.string().describe(\"Sets the maximum memory to be used by logical decoding, e.g., '64MB'.\").nullable().optional(),\n  max_locks_per_transaction: z.number().int().describe(\"Maximum number of database objects that can be locked simultaneously per transaction.\").nullable().optional(),\n  max_standby_archive_delay: z.string().describe(\"Maximum delay a standby server will tolerate (when applying WAL from archive) before canceling conflicting queries, e.g., '30s' or '-1' to wait forever.\").nullable().optional(),\n  track_activity_query_size: z.string().describe(\"Maximum query text size (in bytes) stored for each active session’s current query.\").nullable().optional(),\n  max_standby_streaming_delay: z.string().describe(\"Maximum delay a standby server will tolerate (when streaming) before canceling conflicting queries, e.g., '30s' or '-1' to wait forever.\").nullable().optional(),\n  max_parallel_workers_per_gather: z.number().int().describe(\"Maximum number of parallel workers that can be started by a single Gather or Gather Merge node.\").nullable().optional(),\n  max_parallel_maintenance_workers: z.number().int().describe(\"Maximum number of parallel workers that can be used by a single maintenance operation.\").nullable().optional(),\n}).passthrough().describe(\"Response schema for `GetProjectPostgresConfig`, containing the PostgreSQL configuration.\\n\\nReturns the PostgreSQL config fields directly (not wrapped in a 'data' field).\");\n\nexport const supabaseGetProjectPostgresConfig: AppAction<\n  typeof SupabaseGetProjectPostgresConfigInput,\n  typeof SupabaseGetProjectPostgresConfigOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_GET_PROJECT_POSTGRES_CONFIG\", {\n  slug: \"supabase-get-project-postgres-config\",\n  name: \"Get project postgres config\",\n  description: \"Retrieves the current read-only PostgreSQL database configuration for a specified Supabase project's `ref`, noting that some advanced or security-sensitive details might be omitted from the response.\",\n  input: SupabaseGetProjectPostgresConfigInput,\n  output: SupabaseGetProjectPostgresConfigOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,wCAAwC,EAAE,OAAO,EAC5D,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,EAC7E,CAAC,CAAC,CAAC,SAAS,mFAAmF;AAC/F,MAAM,gEAAgE,EAAE,KAAK;CAAC;CAAU;CAAW;AAAO,CAAC;AA2B3G,MAAa,mCAIT,OAAO,wCAAwC;CACjD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAnCoD,EAAE,OAAO;EAC7D,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,+HAA+H,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACnL,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,2FAA2F,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACnJ,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC1H,gBAAgB,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC7I,iBAAiB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACpI,iBAAiB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACrI,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,mGAAmG,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAChK,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACjJ,sBAAsB,EAAE,OAAO,CAAC,CAAC,SAAS,qGAAqG,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