{
	"definitions": {},
	"type": "object",
	"properties": {
		"replication": {
			"type": "object",
			"properties": {
				"connections": {
					"type": "array",
					"items": {
						"anyOf": [
							{
								"type": "object",
								"properties": {
									"type": {
										"description": "Unique string identifier for the data source type (e.g., \"postgresql\", \"mysql\", etc.).",
										"type": "string"
									},
									"id": {
										"description": "Unique identifier for the connection. Optional when only a single connection is present.",
										"type": "string"
									},
									"tag": {
										"description": "Additional meta tag for the connection, used for categorization or grouping.",
										"type": "string"
									},
									"debug_api": {
										"description": "When enabled, allows query execution.",
										"type": "boolean"
									}
								},
								"additionalProperties": true,
								"required": [
									"type"
								]
							},
							{
								"type": "object",
								"properties": {
									"type": {
										"type": "string",
										"const": "mongodb"
									},
									"id": {
										"description": "Unique identifier for the connection. Optional when only a single connection is present.",
										"type": "string"
									},
									"tag": {
										"description": "Additional meta tag for the connection, used for categorization or grouping.",
										"type": "string"
									},
									"debug_api": {
										"description": "When enabled, allows query execution.",
										"type": "boolean"
									},
									"uri": {
										"type": "string"
									},
									"database": {
										"type": "string"
									},
									"username": {
										"type": "string"
									},
									"password": {
										"type": "string"
									},
									"reject_ip_ranges": {
										"type": "array",
										"items": {
											"type": "string"
										}
									},
									"post_images": {
										"anyOf": [
											{
												"type": "string",
												"const": "off"
											},
											{
												"type": "string",
												"const": "auto_configure"
											},
											{
												"type": "string",
												"const": "read_only"
											}
										]
									}
								},
								"additionalProperties": true,
								"required": [
									"type",
									"uri"
								]
							},
							{
								"type": "object",
								"properties": {
									"type": {
										"type": "string",
										"const": "mssql"
									},
									"id": {
										"description": "Unique identifier for the connection. Optional when only a single connection is present.",
										"type": "string"
									},
									"tag": {
										"description": "Additional meta tag for the connection, used for categorization or grouping.",
										"type": "string"
									},
									"debug_api": {
										"description": "When enabled, allows query execution.",
										"type": "boolean"
									},
									"uri": {
										"type": "string"
									},
									"username": {
										"type": "string"
									},
									"password": {
										"type": "string"
									},
									"database": {
										"type": "string"
									},
									"schema": {
										"type": "string"
									},
									"hostname": {
										"type": "string"
									},
									"port": {
										"description": "A network port value that can be specified as either a number or a string that will be parsed to a number.",
										"anyOf": [
											{
												"type": "number"
											},
											{
												"type": "string"
											}
										]
									},
									"authentication": {
										"anyOf": [
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"const": "default"
													},
													"options": {
														"type": "object",
														"properties": {
															"userName": {
																"type": "string"
															},
															"password": {
																"type": "string"
															}
														},
														"additionalProperties": true,
														"required": [
															"userName",
															"password"
														]
													}
												},
												"additionalProperties": true,
												"required": [
													"type",
													"options"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"const": "azure-active-directory-service-principal-secret"
													},
													"options": {
														"type": "object",
														"properties": {
															"clientId": {
																"type": "string"
															},
															"clientSecret": {
																"type": "string"
															},
															"tenantId": {
																"type": "string"
															}
														},
														"additionalProperties": true,
														"required": [
															"clientId",
															"clientSecret",
															"tenantId"
														]
													}
												},
												"additionalProperties": true,
												"required": [
													"type",
													"options"
												]
											}
										]
									},
									"reject_ip_ranges": {
										"type": "array",
										"items": {
											"type": "string"
										}
									},
									"additionalConfig": {
										"type": "object",
										"properties": {
											"pollingIntervalMs": {
												"type": "number"
											},
											"pollingBatchSize": {
												"type": "number"
											},
											"trustServerCertificate": {
												"type": "boolean"
											}
										},
										"additionalProperties": true,
										"required": []
									}
								},
								"additionalProperties": true,
								"required": [
									"type"
								]
							},
							{
								"type": "object",
								"properties": {
									"type": {
										"type": "string",
										"const": "mysql"
									},
									"id": {
										"description": "Unique identifier for the connection. Optional when only a single connection is present.",
										"type": "string"
									},
									"tag": {
										"description": "Additional meta tag for the connection, used for categorization or grouping.",
										"type": "string"
									},
									"debug_api": {
										"description": "When enabled, allows query execution.",
										"type": "boolean"
									},
									"uri": {
										"type": "string"
									},
									"hostname": {
										"type": "string"
									},
									"port": {
										"description": "A network port value that can be specified as either a number or a string that will be parsed to a number.",
										"anyOf": [
											{
												"type": "number"
											},
											{
												"type": "string"
											}
										]
									},
									"username": {
										"type": "string"
									},
									"password": {
										"type": "string"
									},
									"database": {
										"type": "string"
									},
									"server_id": {
										"type": "number"
									},
									"cacert": {
										"type": "string"
									},
									"client_certificate": {
										"type": "string"
									},
									"client_private_key": {
										"type": "string"
									},
									"reject_ip_ranges": {
										"type": "array",
										"items": {
											"type": "string"
										}
									},
									"binlog_queue_memory_limit": {
										"type": "number"
									}
								},
								"additionalProperties": true,
								"required": [
									"type"
								]
							},
							{
								"type": "object",
								"properties": {
									"type": {
										"type": "string",
										"const": "postgresql"
									},
									"id": {
										"type": "string"
									},
									"tag": {
										"type": "string"
									},
									"debug_api": {
										"description": "When enabled, allows query execution.",
										"type": "boolean"
									},
									"uri": {
										"type": "string"
									},
									"hostname": {
										"type": "string"
									},
									"port": {
										"description": "A network port value that can be specified as either a number or a string that will be parsed to a number.",
										"anyOf": [
											{
												"type": "number"
											},
											{
												"type": "string"
											}
										]
									},
									"username": {
										"type": "string"
									},
									"password": {
										"type": "string"
									},
									"database": {
										"type": "string"
									},
									"sslmode": {
										"anyOf": [
											{
												"type": "string",
												"const": "verify-full"
											},
											{
												"type": "string",
												"const": "verify-ca"
											},
											{
												"type": "string",
												"const": "disable"
											}
										]
									},
									"cacert": {
										"type": "string"
									},
									"client_certificate": {
										"type": "string"
									},
									"client_private_key": {
										"type": "string"
									},
									"tls_servername": {
										"type": "string"
									},
									"reject_ip_ranges": {
										"type": "array",
										"items": {
											"type": "string"
										}
									},
									"slot_name_prefix": {
										"type": "string"
									},
									"max_pool_size": {
										"type": "number"
									},
									"connect_timeout": {
										"type": "number"
									}
								},
								"additionalProperties": true,
								"required": [
									"type"
								]
							},
							{
								"type": "object",
								"properties": {
									"type": {
										"type": "string",
										"const": "convex"
									},
									"id": {
										"description": "Unique identifier for the connection. Optional when only a single connection is present.",
										"type": "string"
									},
									"tag": {
										"description": "Additional meta tag for the connection, used for categorization or grouping.",
										"type": "string"
									},
									"debug_api": {
										"description": "When enabled, allows query execution.",
										"type": "boolean"
									},
									"deployment_url": {
										"type": "string"
									},
									"deploy_key": {
										"type": "string"
									},
									"polling_interval_ms": {
										"type": "number"
									},
									"request_timeout_ms": {
										"type": "number"
									},
									"reject_ip_ranges": {
										"type": "array",
										"items": {
											"type": "string"
										}
									}
								},
								"additionalProperties": true,
								"required": [
									"type",
									"deployment_url",
									"deploy_key"
								]
							}
						]
					}
				}
			},
			"additionalProperties": true,
			"required": []
		},
		"client_auth": {
			"description": "Configuration for client authentication mechanisms.",
			"type": "object",
			"properties": {
				"jwks_uri": {
					"description": "URI or array of URIs pointing to JWKS endpoints for client authentication.",
					"anyOf": [
						{
							"type": "string"
						},
						{
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					]
				},
				"block_local_jwks": {
					"description": "When true, blocks JWKS URIs that resolve to local network addresses.",
					"type": "boolean"
				},
				"jwks_reject_ip_ranges": {
					"description": "IP ranges to reject when validating JWKS URIs.",
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"jwks": {
					"description": "Inline JWKS configuration for client authentication.",
					"type": "object",
					"properties": {
						"keys": {
							"description": "An array of JSON Web Keys (JWKs).",
							"type": "array",
							"items": {
								"description": "A JSON Web Key (JWK) representing a cryptographic key. Can be RSA, HMAC, OKP, or EC key types.",
								"anyOf": [
									{
										"description": "JSON Web Key (JWK) representation of an RSA key.",
										"type": "object",
										"properties": {
											"kty": {
												"description": "Key type identifier, must be \"RSA\" for RSA keys.",
												"type": "string",
												"const": "RSA"
											},
											"kid": {
												"description": "Key ID, a unique identifier for the key.",
												"type": "string"
											},
											"n": {
												"description": "RSA modulus, Base64 URL encoded.",
												"type": "string"
											},
											"e": {
												"description": "RSA exponent, Base64 URL encoded.",
												"type": "string"
											},
											"alg": {
												"description": "The algorithm intended for use with this key (RS256, RS384, or RS512).",
												"anyOf": [
													{
														"type": "string",
														"const": "RS256"
													},
													{
														"type": "string",
														"const": "RS384"
													},
													{
														"type": "string",
														"const": "RS512"
													}
												]
											},
											"use": {
												"description": "The intended use of the key (e.g., \"sig\" for signature).",
												"type": "string"
											}
										},
										"additionalProperties": true,
										"required": [
											"kty",
											"kid",
											"n",
											"e"
										]
									},
									{
										"description": "JSON Web Key (JWK) representation of an HMAC key.",
										"type": "object",
										"properties": {
											"kty": {
												"description": "Key type identifier, must be \"oct\" for HMAC keys.",
												"type": "string",
												"const": "oct"
											},
											"kid": {
												"description": "Key ID. Undefined kid indicates it can match any JWT, with or without a kid. Use a kid wherever possible.",
												"type": "string"
											},
											"k": {
												"description": "The HMAC key value, Base64 URL encoded.",
												"type": "string"
											},
											"alg": {
												"description": "The algorithm intended for use with this key (HS256, HS384, or HS512).",
												"anyOf": [
													{
														"type": "string",
														"const": "HS256"
													},
													{
														"type": "string",
														"const": "HS384"
													},
													{
														"type": "string",
														"const": "HS512"
													}
												]
											},
											"use": {
												"description": "The intended use of the key (e.g., \"sig\" for signature).",
												"type": "string"
											}
										},
										"additionalProperties": true,
										"required": [
											"kty",
											"k",
											"alg"
										]
									},
									{
										"description": "JSON Web Key (JWK) representation of an Octet Key Pair (OKP) key used with Edwards-curve Digital Signature Algorithm.",
										"type": "object",
										"properties": {
											"kty": {
												"description": "Key type identifier, must be \"OKP\" for Octet Key Pair keys.",
												"type": "string",
												"const": "OKP"
											},
											"kid": {
												"description": "Key ID, a unique identifier for the key.",
												"type": "string"
											},
											"crv": {
												"description": "The cryptographic curve used with this key. Only Ed25519 and Ed448 are supported.",
												"anyOf": [
													{
														"type": "string",
														"const": "Ed25519"
													},
													{
														"type": "string",
														"const": "Ed448"
													}
												]
											},
											"x": {
												"description": "The public key, Base64 URL encoded.",
												"type": "string"
											},
											"alg": {
												"description": "The algorithm intended for use with this key (EdDSA).",
												"type": "string",
												"const": "EdDSA"
											},
											"use": {
												"description": "The intended use of the key (e.g., \"sig\" for signature).",
												"type": "string"
											}
										},
										"additionalProperties": true,
										"required": [
											"kty",
											"crv",
											"x",
											"alg"
										]
									},
									{
										"description": "JSON Web Key (JWK) representation of an Elliptic Curve key.",
										"type": "object",
										"properties": {
											"kty": {
												"description": "Key type identifier, must be \"EC\" for Elliptic Curve keys.",
												"type": "string",
												"const": "EC"
											},
											"kid": {
												"description": "Key ID, a unique identifier for the key.",
												"type": "string"
											},
											"crv": {
												"description": "The cryptographic curve used with this key (P-256, P-384, or P-521).",
												"anyOf": [
													{
														"type": "string",
														"const": "P-256"
													},
													{
														"type": "string",
														"const": "P-384"
													},
													{
														"type": "string",
														"const": "P-521"
													}
												]
											},
											"x": {
												"description": "The x coordinate for the Elliptic Curve point, Base64 URL encoded.",
												"type": "string"
											},
											"y": {
												"description": "The y coordinate for the Elliptic Curve point, Base64 URL encoded.",
												"type": "string"
											},
											"alg": {
												"description": "The algorithm intended for use with this key (ES256, ES384, or ES512).",
												"anyOf": [
													{
														"type": "string",
														"const": "ES256"
													},
													{
														"type": "string",
														"const": "ES384"
													},
													{
														"type": "string",
														"const": "ES512"
													}
												]
											},
											"use": {
												"description": "The intended use of the key (e.g., \"sig\" for signature).",
												"type": "string"
											}
										},
										"additionalProperties": true,
										"required": [
											"kty",
											"crv",
											"x",
											"y",
											"alg"
										]
									}
								]
							}
						}
					},
					"additionalProperties": true,
					"required": [
						"keys"
					]
				},
				"supabase": {
					"description": "Enables Supabase authentication integration.",
					"type": "boolean"
				},
				"supabase_jwt_secret": {
					"description": "JWT secret for Supabase authentication.",
					"type": "string"
				},
				"audience": {
					"description": "Valid audiences for JWT validation.",
					"type": "array",
					"items": {
						"type": "string"
					}
				}
			},
			"additionalProperties": true,
			"required": []
		},
		"api": {
			"description": "API service configuration and parameters.",
			"type": "object",
			"properties": {
				"tokens": {
					"description": "API access tokens for administrative operations.",
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"parameters": {
					"description": "Performance and safety parameters for the API service.",
					"type": "object",
					"properties": {
						"max_concurrent_connections": {
							"description": "Maximum number of connections (http streams or websockets) per API process.\nDefault of 200.",
							"type": "number"
						},
						"max_data_fetch_concurrency": {
							"description": "This should not be siginificantly more than storage.max_pool_size, otherwise it would block on the\npool. Increasing this can significantly increase memory usage in some cases.\nDefault of 10.",
							"type": "number"
						},
						"max_buckets_per_connection": {
							"description": "Maximum number of buckets for each connection.\nMore buckets increase latency and memory usage. While the actual number is controlled by sync config,\nhaving a hard limit ensures that the service errors instead of crashing when the sync config is misconfigured.\nDefault of 1000.",
							"type": "number"
						},
						"max_parameter_query_results": {
							"description": "Related to max_buckets_per_connection, but this limit applies directly on the parameter\nquery results, _before_ we convert it into an unique set.\nDefault of 1000.",
							"type": "number"
						},
						"bucket_count_cache_ttl_minutes": {
							"description": "How long to keep cached bucket counts before refreshing them, in minutes.\nBucket counts may be affected by compacting.\nDefault of 60 (1 hour).",
							"type": "number"
						}
					},
					"additionalProperties": true,
					"required": []
				}
			},
			"additionalProperties": true,
			"required": []
		},
		"storage": {
			"anyOf": [
				{
					"type": "object",
					"properties": {
						"type": {
							"description": "The type of storage backend to use (e.g., \"postgresql\", \"mongodb\").",
							"type": "string"
						},
						"max_pool_size": {
							"description": "Maximum number of connections to the storage database, per process. Defaults to 8.",
							"type": "number"
						}
					},
					"additionalProperties": true,
					"required": [
						"type"
					]
				},
				{
					"type": "object",
					"properties": {
						"type": {
							"type": "string",
							"const": "postgresql"
						},
						"max_pool_size": {
							"type": "number"
						},
						"id": {
							"type": "string"
						},
						"tag": {
							"type": "string"
						},
						"uri": {
							"type": "string"
						},
						"hostname": {
							"type": "string"
						},
						"port": {
							"description": "A network port value that can be specified as either a number or a string that will be parsed to a number.",
							"anyOf": [
								{
									"type": "number"
								},
								{
									"type": "string"
								}
							]
						},
						"username": {
							"type": "string"
						},
						"password": {
							"type": "string"
						},
						"database": {
							"type": "string"
						},
						"sslmode": {
							"anyOf": [
								{
									"type": "string",
									"const": "verify-full"
								},
								{
									"type": "string",
									"const": "verify-ca"
								},
								{
									"type": "string",
									"const": "disable"
								}
							]
						},
						"cacert": {
							"type": "string"
						},
						"client_certificate": {
							"type": "string"
						},
						"client_private_key": {
							"type": "string"
						},
						"tls_servername": {
							"type": "string"
						},
						"reject_ip_ranges": {
							"type": "array",
							"items": {
								"type": "string"
							}
						},
						"slot_name_prefix": {
							"type": "string"
						},
						"connect_timeout": {
							"type": "number"
						},
						"batch_limits": {
							"type": "object",
							"properties": {
								"max_estimated_size": {
									"type": "number"
								},
								"max_record_count": {
									"type": "number"
								},
								"max_current_data_batch_size": {
									"type": "number"
								}
							},
							"additionalProperties": true,
							"required": []
						}
					},
					"additionalProperties": true,
					"required": [
						"type"
					]
				},
				{
					"type": "object",
					"properties": {
						"type": {
							"type": "string",
							"const": "mongodb"
						},
						"uri": {
							"type": "string"
						},
						"database": {
							"type": "string"
						},
						"username": {
							"type": "string"
						},
						"password": {
							"type": "string"
						},
						"reject_ip_ranges": {
							"type": "array",
							"items": {
								"type": "string"
							}
						},
						"bulk_read_preference": {
							"anyOf": [
								{
									"type": "string",
									"const": "primary"
								},
								{
									"type": "string",
									"const": "primaryPreferred"
								},
								{
									"type": "string",
									"const": "secondary"
								},
								{
									"type": "string",
									"const": "secondaryPreferred"
								},
								{
									"type": "string",
									"const": "nearest"
								}
							]
						}
					},
					"additionalProperties": true,
					"required": [
						"type",
						"uri"
					]
				}
			]
		},
		"port": {
			"description": "The port on which the service will listen for connections. Can be specified as a number or string.",
			"anyOf": [
				{
					"type": "number"
				},
				{
					"type": "string"
				}
			]
		},
		"sync_config": {
			"description": "Configuration for synchronization rules that define data access patterns.",
			"type": "object",
			"properties": {
				"path": {
					"description": "Path to the sync config YAML file.",
					"type": "string"
				},
				"content": {
					"description": "Inline sync config content as a string.",
					"type": "string"
				},
				"exit_on_error": {
					"description": "Whether to exit the process if there is an error parsing sync config.",
					"type": "boolean"
				}
			},
			"additionalProperties": true,
			"required": []
		},
		"sync_rules": {
			"description": "Deprecated. Use sync_config instead.",
			"type": "object",
			"properties": {
				"path": {
					"description": "Path to the sync config YAML file.",
					"type": "string"
				},
				"content": {
					"description": "Inline sync config content as a string.",
					"type": "string"
				},
				"exit_on_error": {
					"description": "Whether to exit the process if there is an error parsing sync config.",
					"type": "boolean"
				}
			},
			"additionalProperties": true,
			"required": []
		},
		"metadata": {
			"description": "Custom metadata key-value pairs for the service.",
			"type": "object",
			"additionalProperties": {
				"type": "string"
			},
			"properties": {},
			"required": []
		},
		"migrations": {
			"description": "Configuration for database schema migrations.",
			"type": "object",
			"properties": {
				"disable_auto_migration": {
					"description": "When true, disables automatic storage database schema migrations.",
					"type": "boolean"
				}
			},
			"additionalProperties": true,
			"required": []
		},
		"telemetry": {
			"description": "Configuration for service telemetry and monitoring.",
			"type": "object",
			"properties": {
				"prometheus_port": {
					"description": "Port on which Prometheus metrics will be exposed. When set, metrics will be available on this port for scraping.",
					"anyOf": [
						{
							"type": "number"
						},
						{
							"type": "string"
						}
					]
				},
				"disable_telemetry_sharing": {
					"description": "When true, disables sharing of anonymized telemetry data.",
					"type": "boolean"
				},
				"internal_service_endpoint": {
					"description": "Internal endpoint for telemetry services.",
					"type": "string"
				}
			},
			"additionalProperties": true,
			"required": [
				"disable_telemetry_sharing"
			]
		},
		"healthcheck": {
			"type": "object",
			"properties": {
				"probes": {
					"description": "Mechanisms for exposing health check data.",
					"type": "object",
					"properties": {
						"use_filesystem": {
							"description": "Enables exposing healthcheck status via filesystem files.",
							"type": "boolean"
						},
						"use_http": {
							"description": "Enables exposing healthcheck status via HTTP endpoints.",
							"type": "boolean"
						},
						"use_legacy": {
							"description": "Deprecated. \nEnables HTTP probes for both API and UNIFIED service modes. FileSystem probes are always enabled.",
							"type": "boolean"
						}
					},
					"additionalProperties": true,
					"required": []
				}
			},
			"additionalProperties": true,
			"required": []
		},
		"system": {
			"description": "System-level configuration options.",
			"type": "object",
			"properties": {
				"logging": {
					"description": "Service logging configuration.",
					"type": "object",
					"properties": {
						"level": {
							"description": "Log level for the service logs.",
							"anyOf": [
								{
									"type": "string",
									"const": "silly"
								},
								{
									"type": "string",
									"const": "debug"
								},
								{
									"type": "string",
									"const": "verbose"
								},
								{
									"type": "string",
									"const": "http"
								},
								{
									"type": "string",
									"const": "info"
								},
								{
									"type": "string",
									"const": "warn"
								},
								{
									"type": "string",
									"const": "error"
								}
							]
						},
						"format": {
							"description": "Log output format.",
							"anyOf": [
								{
									"type": "string",
									"const": "json"
								},
								{
									"type": "string",
									"const": "text"
								}
							]
						}
					},
					"additionalProperties": true,
					"required": []
				}
			},
			"additionalProperties": true,
			"required": []
		},
		"parameters": {
			"description": "Global parameters that can be referenced in sync config and other configurations.",
			"type": "object",
			"additionalProperties": {
				"anyOf": [
					{
						"type": "number"
					},
					{
						"type": "string"
					},
					{
						"type": "boolean"
					},
					{
						"type": "null"
					}
				]
			},
			"properties": {},
			"required": []
		}
	},
	"additionalProperties": true,
	"required": []
}