{ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "AsyncValidator": { "properties": { "args": { "items": { "type": "string" }, "type": "array" }, "name": { "type": "string" } }, "type": "object" }, "Auth": { "properties": { "password": { "description": "The password for auth", "type": "string" }, "username": { "description": "The username for auth", "type": "string" } }, "type": "object" }, "AuthMechanism": { "enum": [ "DEFAULT", "GSSAPI", "MONGODB-AWS", "MONGODB-CR", "MONGODB-X509", "PLAIN", "SCRAM-SHA-1", "SCRAM-SHA-256" ], "type": "string" }, "AuthMechanismProperties": { "properties": { "AWS_SESSION_TOKEN": { "type": "string" }, "CANONICALIZE_HOST_NAME": { "type": "boolean" }, "SERVICE_NAME": { "type": "string" }, "SERVICE_REALM": { "type": "string" } }, "type": "object" }, "AutoEncrypter": { "type": "object" }, "AutoEncryptionOptions": { "properties": { "bypassAutoEncryption": { "description": "Allows the user to bypass auto encryption, maintaining implicit decryption", "type": "boolean" }, "extraOptions": { "properties": { "mongocryptdBypassSpawn": { "description": "If true, autoEncryption will not attempt to spawn a mongocryptd before connecting", "type": "boolean" }, "mongocryptdSpawnArgs": { "description": "Command line arguments to use when auto-spawning a mongocryptd", "items": { "type": "string" }, "type": "array" }, "mongocryptdSpawnPath": { "description": "The path to the mongocryptd executable on the system", "type": "string" }, "mongocryptdURI": { "description": "A local process the driver communicates with to determine how to encrypt values in a command.\nDefaults to \"mongodb://%2Fvar%2Fmongocryptd.sock\" if domain sockets are available or \"mongodb://localhost:27020\" otherwise", "type": "string" } }, "type": "object" }, "keyVaultClient": { "$ref": "#/definitions/MongoClient", "description": "A `MongoClient` used to fetch keys from a key vault" }, "keyVaultNamespace": { "description": "The namespace where keys are stored in the key vault", "type": "string" }, "kmsProviders": { "description": "Configuration options that are used by specific KMS providers during key generation, encryption, and decryption.", "properties": { "aws": { "description": "Configuration options for using 'aws' as your KMS provider", "properties": { "accessKeyId": { "description": "The access key used for the AWS KMS provider", "type": "string" }, "secretAccessKey": { "description": "The secret access key used for the AWS KMS provider", "type": "string" }, "sessionToken": { "description": "An optional AWS session token that will be used as the\nX-Amz-Security-Token header for AWS requests.", "type": "string" } }, "type": "object" }, "azure": { "description": "Configuration options for using 'azure' as your KMS provider", "properties": { "clientId": { "description": "The client ID to authenticate a registered application", "type": "string" }, "clientSecret": { "description": "The client secret to authenticate a registered application", "type": "string" }, "identityPlatformEndpoint": { "description": "If present, a host with optional port. E.g. \"example.com\" or \"example.com:443\".\nThis is optional, and only needed if customer is using a non-commercial Azure instance\n(e.g. a government or China account, which use different URLs).\nDefaults to \"login.microsoftonline.com\"", "type": "string" }, "tenantId": { "description": "The tenant ID identifies the organization for the account", "type": "string" } }, "type": "object" }, "gcp": { "description": "Configuration options for using 'gcp' as your KMS provider", "properties": { "email": { "description": "The service account email to authenticate", "type": "string" }, "endpoint": { "description": "If present, a host with optional port. E.g. \"example.com\" or \"example.com:443\".\nDefaults to \"oauth2.googleapis.com\"", "type": "string" }, "privateKey": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "type": "string" } ], "description": "A PKCS#8 encrypted key. This can either be a base64 string or a binary representation" } }, "type": "object" }, "local": { "description": "Configuration options for using 'local' as your KMS provider", "properties": { "key": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "type": "string" } ], "description": "The master key used to encrypt/decrypt data keys.\nA 96-byte long Buffer or base64 encoded string." } }, "type": "object" } }, "type": "object" }, "options": { "properties": { "logger": { "description": "An optional hook to catch logging messages from the underlying encryption engine", "type": "object" } }, "type": "object" }, "proxyOptions": { "$ref": "#/definitions/ProxyOptions" }, "schemaMap": { "$ref": "#/definitions/Document", "description": "A map of namespaces to a local JSON schema for encryption\n\n**NOTE**: Supplying options.schemaMap provides more security than relying on JSON Schemas obtained from the server.\nIt protects against a malicious server advertising a false JSON Schema, which could trick the client into sending decrypted data that should be encrypted.\nSchemas supplied in the schemaMap only apply to configuring automatic encryption for client side encryption.\nOther validation rules in the JSON schema will not be enforced by the driver and will result in an error." } }, "type": "object" }, "BSONSerializeOptions": { "description": "BSON Serialization options.", "properties": { "bsonRegExp": { "description": "return BSON regular expressions as BSONRegExp instances.", "type": "boolean" }, "checkKeys": { "description": "the serializer will check if keys are valid.", "type": "boolean" }, "enableUtf8Validation": { "description": "Enable utf8 validation when deserializing BSON documents. Defaults to true.", "type": "boolean" }, "fieldsAsRaw": { "$ref": "#/definitions/Document", "description": "allow to specify if there what fields we wish to return as unserialized raw buffer." }, "ignoreUndefined": { "description": "serialize will not emit undefined fields **(default:true)**", "type": "boolean" }, "promoteBuffers": { "description": "when deserializing a Binary will return it as a node.js Buffer instance.", "type": "boolean" }, "promoteLongs": { "description": "when deserializing a Long will fit it into a Number if it's smaller than 53 bits", "type": "boolean" }, "promoteValues": { "description": "when deserializing will promote BSON values to their Node.js closest equivalent types.", "type": "boolean" }, "raw": { "description": "Return BSON filled buffers from operations", "type": "boolean" }, "serializeFunctions": { "description": "serialize the javascript functions **(default:false)**.", "type": "boolean" } }, "type": "object" }, "ClientMetadata": { "properties": { "application": { "properties": { "name": { "type": "string" } }, "type": "object" }, "driver": { "properties": { "name": { "type": "string" }, "version": { "type": "string" } }, "type": "object" }, "os": { "properties": { "architecture": { "type": "string" }, "name": { "$ref": "#/definitions/global.NodeJS.Platform" }, "type": { "type": "string" }, "version": { "type": "string" } }, "type": "object" }, "platform": { "type": "string" }, "version": { "type": "string" } }, "type": "object" }, "Document": { "additionalProperties": {}, "type": "object" }, "DriverInfo": { "properties": { "name": { "type": "string" }, "platform": { "type": "string" }, "version": { "type": "string" } }, "type": "object" }, "FileStorageOptions": { "properties": { "dataDir": { "description": "Directory where to store the file. The filename will be .json.", "type": "string" }, "type": { "enum": [ "file" ], "type": "string" } }, "type": "object" }, "HateoasMode": { "enum": [ "body", "header", "none" ], "type": "string" }, "HedgeOptions": { "properties": { "enabled": { "description": "Explicitly enable or disable hedged reads.", "type": "boolean" } }, "type": "object" }, "HostAddress": { "properties": { "host": { "type": "string" }, "isIPv6": { "type": "boolean" }, "port": { "type": "number" }, "socketPath": { "type": "string" } }, "type": "object" }, "KeyObject": { "properties": { "passphrase": { "description": "Optional passphrase.", "type": "string" }, "pem": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "type": "string" } ], "description": "Private keys in PEM format." } }, "type": "object" }, "Logger": { "properties": { "className": { "type": "string" } }, "type": "object" }, "LoggerConfig": { "properties": { "error": { "type": "object" }, "network": { "type": "object" }, "query": { "type": "object" } }, "type": "object" }, "LoggerLevel": { "enum": [ "debug", "error", "info", "warn" ], "type": "string" }, "MariaDBMapping": { "properties": { "columns": { "items": { "properties": { "alias": { "type": "string" }, "name": { "type": "string" }, "type": { "enum": [ "number", "string" ], "type": "string" } }, "type": "object" }, "type": "array" }, "id": { "properties": { "name": { "type": "string" }, "type": { "enum": [ "number", "string" ], "type": "string" } }, "type": "object" }, "tableCreationSQLRequest": { "type": "string" }, "tableName": { "type": "string" } }, "type": "object" }, "MariaDBStorageOptions": { "properties": { "config": { "$ref": "#/definitions/PoolConfig", "description": "PoolConfig. See the MariaDB NodeJS drivers options." }, "database": { "description": "Database to select. The database will be created if not already existing.", "type": "string" }, "mapping": { "$ref": "#/definitions/MariaDBMapping" }, "type": { "enum": [ "mariadb" ], "type": "string" } }, "type": "object" }, "MongoClient": { "description": "The **MongoClient** class is a class that allows for making Connections to MongoDB.", "properties": { "autoEncrypter": { "$ref": "#/definitions/AutoEncrypter" }, "bsonOptions": { "$ref": "#/definitions/BSONSerializeOptions" }, "logger": { "$ref": "#/definitions/Logger" }, "options": { "$ref": "#/definitions/MongoOptions" }, "readConcern": { "$ref": "#/definitions/ReadConcern" }, "readPreference": { "$ref": "#/definitions/ReadPreference" }, "serverApi": { "$ref": "#/definitions/ServerApi" }, "writeConcern": { "$ref": "#/definitions/WriteConcern" } }, "type": "object" }, "MongoClientOptions": { "description": "Describes all possible URI query options for the mongo client", "properties": { "ALPNProtocols": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, "type": "array" } ], "description": "An array of strings or a Buffer naming possible ALPN protocols.\n(Protocols should be ordered by their priority.)" }, "appName": { "description": "The name of the application that created this MongoClient instance. MongoDB 3.4 and newer will print this value in the server log upon establishing each connection. It is also recorded in the slow query log and profile collections", "type": "string" }, "auth": { "$ref": "#/definitions/Auth", "description": "The auth settings for when connection to server." }, "authMechanism": { "$ref": "#/definitions/AuthMechanism", "description": "Specify the authentication mechanism that MongoDB will use to authenticate the connection." }, "authMechanismProperties": { "$ref": "#/definitions/AuthMechanismProperties", "description": "Specify properties for the specified authMechanism as a comma-separated list of colon-separated key-value pairs." }, "authSource": { "description": "Specify the database name associated with the user’s credentials.", "type": "string" }, "autoEncryption": { "$ref": "#/definitions/AutoEncryptionOptions", "description": "Optionally enable client side auto encryption" }, "bsonRegExp": { "description": "return BSON regular expressions as BSONRegExp instances.", "type": "boolean" }, "ca": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "type": "string" } ] }, "type": "array" }, { "type": "string" } ], "description": "Optionally override the trusted CA certificates. Default is to trust\nthe well-known CAs curated by Mozilla. Mozilla's CAs are completely\nreplaced when CAs are explicitly specified using this option." }, "cert": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "type": "string" } ] }, "type": "array" }, { "type": "string" } ], "description": "Cert chains in PEM format. One cert chain should be provided per\nprivate key. Each cert chain should consist of the PEM formatted\ncertificate for a provided private key, followed by the PEM\nformatted intermediate certificates (if any), in order, and not\nincluding the root CA (the root CA must be pre-known to the peer,\nsee ca). When providing multiple cert chains, they do not have to\nbe in the same order as their private keys in key. If the\nintermediate certificates are not provided, the peer will not be\nable to validate the certificate, and the handshake will fail." }, "checkKeys": { "description": "the serializer will check if keys are valid.", "type": "boolean" }, "checkServerIdentity": { "description": "Verifies the certificate `cert` is issued to `hostname`.\n\nReturns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on\nfailure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type).\n\nThis function can be overwritten by providing alternative function as part of\nthe `options.checkServerIdentity` option passed to `tls.connect()`. The\noverwriting function can call `tls.checkServerIdentity()` of course, to augment\nthe checks done with additional verification.\n\nThis function is only called if the certificate passed all other checks, such as\nbeing issued by trusted CA (`options.ca`).", "type": "object" }, "ciphers": { "description": "Cipher suite specification, replacing the default. For more\ninformation, see modifying the default cipher suite. Permitted\nciphers can be obtained via tls.getCiphers(). Cipher names must be\nuppercased in order for OpenSSL to accept them.", "type": "string" }, "compressors": { "anyOf": [ { "items": { "enum": [ "none", "snappy", "zlib" ], "type": "string" }, "type": "array" }, { "type": "string" } ], "description": "An array or comma-delimited string of compressors to enable network compression for communication between this client and a mongod/mongos instance." }, "connectTimeoutMS": { "description": "The time in milliseconds to attempt a connection before timing out.", "type": "number" }, "crl": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "type": "string" } ] }, "type": "array" }, { "type": "string" } ], "description": "PEM formatted CRLs (Certificate Revocation Lists)." }, "directConnection": { "description": "Allow a driver to force a Single topology type with a connection string containing one host", "type": "boolean" }, "driverInfo": { "$ref": "#/definitions/DriverInfo", "description": "Allows a wrapping driver to amend the client metadata generated by the driver to include information about the wrapping driver" }, "ecdhCurve": { "description": "A string describing a named curve or a colon separated list of curve\nNIDs or names, for example P-521:P-384:P-256, to use for ECDH key\nagreement. Set to auto to select the curve automatically. Use\ncrypto.getCurves() to obtain a list of available curve names. On\nrecent releases, openssl ecparam -list_curves will also display the\nname and description of each available elliptic curve. Default:\ntls.DEFAULT_ECDH_CURVE.", "type": "string" }, "enableUtf8Validation": { "description": "Enable utf8 validation when deserializing BSON documents. Defaults to true.", "type": "boolean" }, "family": { "type": "number" }, "fieldsAsRaw": { "$ref": "#/definitions/Document", "description": "allow to specify if there what fields we wish to return as unserialized raw buffer." }, "forceServerObjectId": { "description": "Force server to assign `_id` values instead of driver", "type": "boolean" }, "heartbeatFrequencyMS": { "description": "heartbeatFrequencyMS controls when the driver checks the state of the MongoDB deployment. Specify the interval (in milliseconds) between checks, counted from the end of the previous check until the beginning of the next one.", "type": "number" }, "hints": { "type": "number" }, "ignoreUndefined": { "description": "serialize will not emit undefined fields **(default:true)**", "type": "boolean" }, "journal": { "description": "The journal write concern", "type": "boolean" }, "keepAlive": { "description": "TCP Connection keep alive enabled", "type": "boolean" }, "keepAliveInitialDelay": { "description": "The number of milliseconds to wait before initiating keepAlive on the TCP socket", "type": "number" }, "key": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "$ref": "#/definitions/KeyObject" } ] }, "type": "array" }, { "type": "string" } ], "description": "Private keys in PEM format. PEM allows the option of private keys\nbeing encrypted. Encrypted keys will be decrypted with\noptions.passphrase. Multiple keys using different algorithms can be\nprovided either as an array of unencrypted key strings or buffers,\nor an array of objects in the form {pem: [,\npassphrase: ]}. The object form can only occur in an array.\nobject.passphrase is optional. Encrypted keys will be decrypted with\nobject.passphrase if provided, or options.passphrase if it is not." }, "loadBalanced": { "description": "Instruct the driver it is connecting to a load balancer fronting a mongos like service", "type": "boolean" }, "localAddress": { "type": "string" }, "localPort": { "type": "number" }, "localThresholdMS": { "description": "The size (in milliseconds) of the latency window for selecting among multiple suitable MongoDB instances.", "type": "number" }, "logger": { "$ref": "#/definitions/Logger", "description": "Custom logger object" }, "loggerLevel": { "$ref": "#/definitions/LoggerLevel", "description": "The logging level" }, "lookup": { "type": "object" }, "maxIdleTimeMS": { "description": "The maximum number of milliseconds that a connection can remain idle in the pool before being removed and closed.", "type": "number" }, "maxPoolSize": { "description": "The maximum number of connections in the connection pool.", "type": "number" }, "maxStalenessSeconds": { "description": "Specifies, in seconds, how stale a secondary can be before the client stops using it for read operations.", "type": "number" }, "minDHSize": { "type": "number" }, "minHeartbeatFrequencyMS": { "description": "Sets the minimum heartbeat frequency. In the event that the driver has to frequently re-check a server's availability, it will wait at least this long since the previous check to avoid wasted effort.", "type": "number" }, "minPoolSize": { "description": "The minimum number of connections in the connection pool.", "type": "number" }, "monitorCommands": { "description": "Enable command monitoring for this client", "type": "boolean" }, "noDelay": { "description": "TCP Connection no delay", "type": "boolean" }, "passphrase": { "description": "Shared passphrase used for a single private key and/or a PFX.", "type": "string" }, "pfx": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "$ref": "#/definitions/PxfObject" }, { "type": "string" } ] }, "type": "array" }, { "type": "string" } ], "description": "PFX or PKCS12 encoded private key and certificate chain. pfx is an\nalternative to providing key and cert individually. PFX is usually\nencrypted, if it is, passphrase will be used to decrypt it. Multiple\nPFX can be provided either as an array of unencrypted PFX buffers,\nor an array of objects in the form {buf: [,\npassphrase: ]}. The object form can only occur in an array.\nobject.passphrase is optional. Encrypted PFX will be decrypted with\nobject.passphrase if provided, or options.passphrase if it is not." }, "pkFactory": { "$ref": "#/definitions/PkFactory", "description": "A primary key factory function for generation of custom `_id` keys" }, "promiseLibrary": { "description": "A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible" }, "promoteBuffers": { "description": "when deserializing a Binary will return it as a node.js Buffer instance.", "type": "boolean" }, "promoteLongs": { "description": "when deserializing a Long will fit it into a Number if it's smaller than 53 bits", "type": "boolean" }, "promoteValues": { "description": "when deserializing will promote BSON values to their Node.js closest equivalent types.", "type": "boolean" }, "proxyHost": { "description": "Configures a Socks5 proxy host used for creating TCP connections.", "type": "string" }, "proxyPassword": { "description": "Configures a Socks5 proxy password when the proxy in proxyHost requires username/password authentication.", "type": "string" }, "proxyPort": { "description": "Configures a Socks5 proxy port used for creating TCP connections.", "type": "number" }, "proxyUsername": { "description": "Configures a Socks5 proxy username when the proxy in proxyHost requires username/password authentication.", "type": "string" }, "raw": { "description": "Return document results as raw BSON buffers", "type": "boolean" }, "readConcern": { "anyOf": [ { "$ref": "#/definitions/ReadConcern" }, { "properties": { "level": { "$ref": "#/definitions/ReadConcernLevel" } }, "type": "object" }, { "enum": [ "available", "linearizable", "local", "majority", "snapshot" ], "type": "string" } ], "description": "Specify a read concern for the collection (only MongoDB 3.2 or higher supported)" }, "readConcernLevel": { "$ref": "#/definitions/ReadConcernLevel", "description": "The level of isolation" }, "readPreference": { "anyOf": [ { "$ref": "#/definitions/ReadPreference" }, { "enum": [ "nearest", "primary", "primaryPreferred", "secondary", "secondaryPreferred" ], "type": "string" } ], "description": "Specifies the read preferences for this connection" }, "readPreferenceTags": { "description": "Specifies the tags document as a comma-separated list of colon-separated key-value pairs.", "items": { "additionalProperties": { "type": "string" }, "type": "object" }, "type": "array" }, "rejectUnauthorized": { "default": true, "description": "If true the server will reject any connection which is not\nauthorized with the list of supplied CAs. This option only has an\neffect if requestCert is true.", "type": "boolean" }, "replicaSet": { "description": "Specifies the name of the replica set, if the mongod is a member of a replica set.", "type": "string" }, "retryReads": { "description": "Enables retryable reads.", "type": "boolean" }, "retryWrites": { "description": "Enable retryable writes.", "type": "boolean" }, "secureContext": { "$ref": "#/definitions/SecureContext", "description": "An optional TLS context object from tls.createSecureContext()" }, "secureProtocol": { "description": "Legacy mechanism to select the TLS protocol version to use, it does\nnot support independent control of the minimum and maximum version,\nand does not support limiting the protocol to TLSv1.3. Use\nminVersion and maxVersion instead. The possible values are listed as\nSSL_METHODS, use the function names as strings. For example, use\n'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow\nany TLS protocol version up to TLSv1.3. It is not recommended to use\nTLS versions less than 1.2, but it may be required for\ninteroperability. Default: none, see minVersion.", "type": "string" }, "serializeFunctions": { "description": "serialize the javascript functions **(default:false)**.", "type": "boolean" }, "serverApi": { "anyOf": [ { "$ref": "#/definitions/ServerApi" }, { "enum": [ "1" ], "type": "string" } ], "description": "Server API version" }, "serverSelectionTimeoutMS": { "description": "Specifies how long (in milliseconds) to block for server selection before throwing an exception.", "type": "number" }, "servername": { "type": "string" }, "session": { "additionalProperties": false, "description": "An optional Buffer instance containing a TLS session.", "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, "socketTimeoutMS": { "description": "The time in milliseconds to attempt a send or receive on a socket before the attempt times out.", "type": "number" }, "srvMaxHosts": { "description": "The maximum number of hosts to connect to when using an srv connection string, a setting of `0` means unlimited hosts", "type": "number" }, "srvServiceName": { "description": "Modifies the srv URI to look like:\n\n`_{srvServiceName}._tcp.{hostname}.{domainname}`\n\nQuerying this DNS URI is expected to respond with SRV records", "type": "string" }, "ssl": { "description": "A boolean to enable or disables TLS/SSL for the connection. (The ssl option is equivalent to the tls option.)", "type": "boolean" }, "sslCA": { "description": "SSL Certificate file path.", "type": "string" }, "sslCRL": { "description": "SSL Certificate revocation list file path.", "type": "string" }, "sslCert": { "description": "SSL Certificate file path.", "type": "string" }, "sslKey": { "description": "SSL Key file file path.", "type": "string" }, "sslPass": { "description": "SSL Certificate pass phrase.", "type": "string" }, "sslValidate": { "description": "Validate mongod server certificate against Certificate Authority", "type": "boolean" }, "tls": { "description": "Enables or disables TLS/SSL for the connection.", "type": "boolean" }, "tlsAllowInvalidCertificates": { "description": "Bypasses validation of the certificates presented by the mongod/mongos instance", "type": "boolean" }, "tlsAllowInvalidHostnames": { "description": "Disables hostname validation of the certificate presented by the mongod/mongos instance.", "type": "boolean" }, "tlsCAFile": { "description": "Specifies the location of a local .pem file that contains the root certificate chain from the Certificate Authority. This file is used to validate the certificate presented by the mongod/mongos instance.", "type": "string" }, "tlsCertificateFile": { "description": "Specifies the location of a local TLS Certificate", "type": "string" }, "tlsCertificateKeyFile": { "description": "Specifies the location of a local .pem file that contains either the client's TLS/SSL certificate and key or only the client's TLS/SSL key when tlsCertificateFile is used to provide the certificate.", "type": "string" }, "tlsCertificateKeyFilePassword": { "description": "Specifies the password to de-crypt the tlsCertificateKeyFile.", "type": "string" }, "tlsInsecure": { "description": "Disables various certificate validations.", "type": "boolean" }, "w": { "anyOf": [ { "enum": [ "majority" ], "type": "string" }, { "type": "number" } ], "description": "The write concern w value" }, "waitQueueTimeoutMS": { "description": "The maximum time in milliseconds that a thread can wait for a connection to become available.", "type": "number" }, "wtimeoutMS": { "description": "The write concern timeout", "type": "number" }, "zlibCompressionLevel": { "description": "An integer that specifies the compression level if using zlib for network compression.", "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "type": "number" } }, "type": "object" }, "MongoCredentials": { "description": "A representation of the credentials used by MongoDB", "properties": { "mechanism": { "$ref": "#/definitions/AuthMechanism", "description": "The method used to authenticate" }, "mechanismProperties": { "$ref": "#/definitions/AuthMechanismProperties", "description": "Special properties used by some types of auth mechanisms" }, "password": { "description": "The password used for authentication", "type": "string" }, "source": { "description": "The database that the user should authenticate against", "type": "string" }, "username": { "description": "The username used for authentication", "type": "string" } }, "type": "object" }, "MongoDBStorageOptions": { "properties": { "opts": { "$ref": "#/definitions/MongoClientOptions", "description": "MongoClientOptions. See the MongoClient NodeJS drivers options." }, "type": { "enum": [ "mongodb" ], "type": "string" }, "uri": { "description": "MongoDB URI connection string.", "type": "string" } }, "type": "object" }, "MongoOptions": { "description": "Mongo Client Options", "properties": { "ALPNProtocols": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, "type": "array" } ], "description": "An array of strings or a Buffer naming possible ALPN protocols.\n(Protocols should be ordered by their priority.)" }, "autoEncrypter": { "$ref": "#/definitions/AutoEncrypter" }, "autoEncryption": { "$ref": "#/definitions/AutoEncryptionOptions", "description": "Optionally enable client side auto encryption" }, "ca": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "type": "string" } ] }, "type": "array" }, { "type": "string" } ], "description": "Optionally override the trusted CA certificates. Default is to trust\nthe well-known CAs curated by Mozilla. Mozilla's CAs are completely\nreplaced when CAs are explicitly specified using this option." }, "cert": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "type": "string" } ] }, "type": "array" }, { "type": "string" } ], "description": "Cert chains in PEM format. One cert chain should be provided per\nprivate key. Each cert chain should consist of the PEM formatted\ncertificate for a provided private key, followed by the PEM\nformatted intermediate certificates (if any), in order, and not\nincluding the root CA (the root CA must be pre-known to the peer,\nsee ca). When providing multiple cert chains, they do not have to\nbe in the same order as their private keys in key. If the\nintermediate certificates are not provided, the peer will not be\nable to validate the certificate, and the handshake will fail." }, "checkServerIdentity": { "description": "Verifies the certificate `cert` is issued to `hostname`.\n\nReturns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on\nfailure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type).\n\nThis function can be overwritten by providing alternative function as part of\nthe `options.checkServerIdentity` option passed to `tls.connect()`. The\noverwriting function can call `tls.checkServerIdentity()` of course, to augment\nthe checks done with additional verification.\n\nThis function is only called if the certificate passed all other checks, such as\nbeing issued by trusted CA (`options.ca`).", "type": "object" }, "ciphers": { "description": "Cipher suite specification, replacing the default. For more\ninformation, see modifying the default cipher suite. Permitted\nciphers can be obtained via tls.getCiphers(). Cipher names must be\nuppercased in order for OpenSSL to accept them.", "type": "string" }, "compressors": { "items": { "enum": [ "none", "snappy", "zlib" ], "type": "string" }, "type": "array" }, "connectTimeoutMS": { "description": "The time in milliseconds to attempt a connection before timing out.", "type": "number" }, "credentials": { "$ref": "#/definitions/MongoCredentials" }, "crl": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "type": "string" } ] }, "type": "array" }, { "type": "string" } ], "description": "PEM formatted CRLs (Certificate Revocation Lists)." }, "dbName": { "type": "string" }, "directConnection": { "description": "Allow a driver to force a Single topology type with a connection string containing one host", "type": "boolean" }, "driverInfo": { "$ref": "#/definitions/DriverInfo", "description": "Allows a wrapping driver to amend the client metadata generated by the driver to include information about the wrapping driver" }, "ecdhCurve": { "description": "A string describing a named curve or a colon separated list of curve\nNIDs or names, for example P-521:P-384:P-256, to use for ECDH key\nagreement. Set to auto to select the curve automatically. Use\ncrypto.getCurves() to obtain a list of available curve names. On\nrecent releases, openssl ecparam -list_curves will also display the\nname and description of each available elliptic curve. Default:\ntls.DEFAULT_ECDH_CURVE.", "type": "string" }, "family": { "type": "number" }, "forceServerObjectId": { "description": "Force server to assign `_id` values instead of driver", "type": "boolean" }, "heartbeatFrequencyMS": { "description": "heartbeatFrequencyMS controls when the driver checks the state of the MongoDB deployment. Specify the interval (in milliseconds) between checks, counted from the end of the previous check until the beginning of the next one.", "type": "number" }, "hints": { "type": "number" }, "hosts": { "items": { "$ref": "#/definitions/HostAddress" }, "type": "array" }, "keepAlive": { "description": "TCP Connection keep alive enabled", "type": "boolean" }, "keepAliveInitialDelay": { "description": "The number of milliseconds to wait before initiating keepAlive on the TCP socket", "type": "number" }, "key": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "$ref": "#/definitions/KeyObject" } ] }, "type": "array" }, { "type": "string" } ], "description": "Private keys in PEM format. PEM allows the option of private keys\nbeing encrypted. Encrypted keys will be decrypted with\noptions.passphrase. Multiple keys using different algorithms can be\nprovided either as an array of unencrypted key strings or buffers,\nor an array of objects in the form {pem: [,\npassphrase: ]}. The object form can only occur in an array.\nobject.passphrase is optional. Encrypted keys will be decrypted with\nobject.passphrase if provided, or options.passphrase if it is not." }, "loadBalanced": { "type": "boolean" }, "localAddress": { "type": "string" }, "localPort": { "type": "number" }, "localThresholdMS": { "description": "The size (in milliseconds) of the latency window for selecting among multiple suitable MongoDB instances.", "type": "number" }, "logger": { "$ref": "#/definitions/Logger", "description": "Custom logger object" }, "lookup": { "type": "object" }, "maxIdleTimeMS": { "description": "The maximum number of milliseconds that a connection can remain idle in the pool before being removed and closed.", "type": "number" }, "maxPoolSize": { "description": "The maximum number of connections in the connection pool.", "type": "number" }, "metadata": { "$ref": "#/definitions/ClientMetadata" }, "minDHSize": { "type": "number" }, "minHeartbeatFrequencyMS": { "description": "Sets the minimum heartbeat frequency. In the event that the driver has to frequently re-check a server's availability, it will wait at least this long since the previous check to avoid wasted effort.", "type": "number" }, "minPoolSize": { "description": "The minimum number of connections in the connection pool.", "type": "number" }, "monitorCommands": { "description": "Enable command monitoring for this client", "type": "boolean" }, "noDelay": { "description": "TCP Connection no delay", "type": "boolean" }, "passphrase": { "description": "Shared passphrase used for a single private key and/or a PFX.", "type": "string" }, "pfx": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "$ref": "#/definitions/PxfObject" }, { "type": "string" } ] }, "type": "array" }, { "type": "string" } ], "description": "PFX or PKCS12 encoded private key and certificate chain. pfx is an\nalternative to providing key and cert individually. PFX is usually\nencrypted, if it is, passphrase will be used to decrypt it. Multiple\nPFX can be provided either as an array of unencrypted PFX buffers,\nor an array of objects in the form {buf: [,\npassphrase: ]}. The object form can only occur in an array.\nobject.passphrase is optional. Encrypted PFX will be decrypted with\nobject.passphrase if provided, or options.passphrase if it is not." }, "pkFactory": { "$ref": "#/definitions/PkFactory", "description": "A primary key factory function for generation of custom `_id` keys" }, "promiseLibrary": { "description": "A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible" }, "proxyHost": { "type": "string" }, "proxyPassword": { "type": "string" }, "proxyPort": { "type": "number" }, "proxyUsername": { "type": "string" }, "raw": { "description": "Return document results as raw BSON buffers", "type": "boolean" }, "readConcern": { "$ref": "#/definitions/ReadConcern" }, "readPreference": { "$ref": "#/definitions/ReadPreference" }, "rejectUnauthorized": { "default": true, "description": "If true the server will reject any connection which is not\nauthorized with the list of supplied CAs. This option only has an\neffect if requestCert is true.", "type": "boolean" }, "replicaSet": { "description": "Specifies the name of the replica set, if the mongod is a member of a replica set.", "type": "string" }, "retryReads": { "description": "Enables retryable reads.", "type": "boolean" }, "retryWrites": { "description": "Enable retryable writes.", "type": "boolean" }, "secureContext": { "$ref": "#/definitions/SecureContext", "description": "An optional TLS context object from tls.createSecureContext()" }, "secureProtocol": { "description": "Legacy mechanism to select the TLS protocol version to use, it does\nnot support independent control of the minimum and maximum version,\nand does not support limiting the protocol to TLSv1.3. Use\nminVersion and maxVersion instead. The possible values are listed as\nSSL_METHODS, use the function names as strings. For example, use\n'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow\nany TLS protocol version up to TLSv1.3. It is not recommended to use\nTLS versions less than 1.2, but it may be required for\ninteroperability. Default: none, see minVersion.", "type": "string" }, "serverApi": { "$ref": "#/definitions/ServerApi" }, "serverSelectionTimeoutMS": { "description": "Specifies how long (in milliseconds) to block for server selection before throwing an exception.", "type": "number" }, "servername": { "type": "string" }, "session": { "additionalProperties": false, "description": "An optional Buffer instance containing a TLS session.", "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, "socketTimeoutMS": { "description": "The time in milliseconds to attempt a send or receive on a socket before the attempt times out.", "type": "number" }, "srvHost": { "type": "string" }, "srvMaxHosts": { "description": "The maximum number of hosts to connect to when using an srv connection string, a setting of `0` means unlimited hosts", "type": "number" }, "srvServiceName": { "description": "Modifies the srv URI to look like:\n\n`_{srvServiceName}._tcp.{hostname}.{domainname}`\n\nQuerying this DNS URI is expected to respond with SRV records", "type": "string" }, "tls": { "description": "# NOTE ABOUT TLS Options\n\nIf set TLS enabled, equivalent to setting the ssl option.\n\n### Additional options:\n\n| nodejs option | MongoDB equivalent | type |\n|:---------------------|--------------------------------------------------------- |:---------------------------------------|\n| `ca` | `sslCA`, `tlsCAFile` | `string \\| Buffer \\| Buffer[]` |\n| `crl` | `sslCRL` | `string \\| Buffer \\| Buffer[]` |\n| `cert` | `sslCert`, `tlsCertificateFile`, `tlsCertificateKeyFile` | `string \\| Buffer \\| Buffer[]` |\n| `key` | `sslKey`, `tlsCertificateKeyFile` | `string \\| Buffer \\| KeyObject[]` |\n| `passphrase` | `sslPass`, `tlsCertificateKeyFilePassword` | `string` |\n| `rejectUnauthorized` | `sslValidate` | `boolean` |", "type": "boolean" }, "tlsAllowInvalidCertificates": { "description": "Bypasses validation of the certificates presented by the mongod/mongos instance", "type": "boolean" }, "tlsAllowInvalidHostnames": { "description": "Disables hostname validation of the certificate presented by the mongod/mongos instance.", "type": "boolean" }, "tlsInsecure": { "description": "Disables various certificate validations.", "type": "boolean" }, "waitQueueTimeoutMS": { "description": "The maximum time in milliseconds that a thread can wait for a connection to become available.", "type": "number" }, "writeConcern": { "$ref": "#/definitions/WriteConcern" }, "zlibCompressionLevel": { "description": "An integer that specifies the compression level if using zlib for network compression.", "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "type": "number" } }, "type": "object" }, "Partial": { "properties": { "delay": { "default": 0, "description": "milliseconds of time before sending back an HTTP response (for testing purpose).", "type": "number" }, "enableLogs": { "default": true, "description": "Enable crudity logging.", "type": "boolean" }, "hateoas": { "$ref": "#/definitions/HateoasMode", "default": "header", "description": "Set Hateoas information in the body or in the header." }, "pageSize": { "default": 20, "description": "Size for pagination.", "type": "number" }, "singularResourceName": { "description": "Singular name of the resource.", "type": "string" }, "storage": { "anyOf": [ { "allOf": [ { "$ref": "#/definitions/FileStorageOptions" }, { "properties": { "type": { "default": "file", "description": "Storage type (ex: file, mongodb, mariadb, etc.).", "type": "string" } }, "type": "object" } ] }, { "allOf": [ { "$ref": "#/definitions/MongoDBStorageOptions" }, { "properties": { "type": { "default": "file", "description": "Storage type (ex: file, mongodb, mariadb, etc.).", "type": "string" } }, "type": "object" } ] }, { "allOf": [ { "$ref": "#/definitions/MariaDBStorageOptions" }, { "properties": { "type": { "default": "file", "description": "Storage type (ex: file, mongodb, mariadb, etc.).", "type": "string" } }, "type": "object" } ] } ], "description": "Storage options object (file storage or mongodb storage, or mariadb storage)" }, "validators": { "items": { "$ref": "#/definitions/AsyncValidator" }, "type": "array" } }, "type": "object" }, "PkFactory": { "type": "object" }, "PoolConfig": { "properties": { "acquireTimeout": { "description": "The milliseconds before a timeout occurs during the connection acquisition. This is slightly different from\nconnectTimeout, because acquiring a pool connection does not always involve making a connection.\n(Default: 10 seconds)", "type": "number" }, "allowPublicKeyRetrieval": { "description": "Indicate that if `rsaPublicKey` or `cachingRsaPublicKey` public key are not provided, if client can ask server\nto send public key.\ndefault: false", "type": "boolean" }, "arrayParenthesis": { "description": "Indicate if array are included in parenthesis. This option permit compatibility with version < 2.5", "type": "boolean" }, "autoJsonMap": { "description": "indicate if JSON fields for MariaDB server 10.5.2+ results in JSON format (or String if disabled)", "type": "boolean" }, "bigIntAsNumber": { "description": "Force returning BIGINT data as Number in place of BigInt.\n\nDefault: false;", "type": "boolean" }, "bulk": { "description": "disabled bulk command in batch.", "type": "boolean" }, "cachingRsaPublicKey": { "description": "Indicate path/content to MySQL server caching RSA public key.\nuse requires Node.js v11.6+", "type": "string" }, "charset": { "description": "Protocol character set used with the server.\nConnection collation will be the default collation associated with charset.\nIt's mainly used for micro-optimizations. The default is often sufficient.\nexample 'UTF8MB4', 'CP1250'.\n(default 'UTF8MB4')", "type": "string" }, "checkDuplicate": { "description": "indicate to throw an exception if result-set will not contain some data due to having duplicate identifier\n(Default: true)", "type": "boolean" }, "collation": { "description": "Permit to defined collation used for connection.\nThis will defined the charset encoding used for exchanges with database and defines the order used when\ncomparing strings. It's mainly used for micro-optimizations\n(Default: 'UTF8MB4_UNICODE_CI')", "type": "string" }, "compress": { "description": "Compress exchanges with database using gzip.\nThis can give you better performance when accessing a database in a different location.\n(Default: false)", "type": "boolean" }, "connectAttributes": { "description": "When enabled, sends information during connection to server\n- client name\n- version\n- operating system\n- Node.js version\n\nIf JSON is set, add JSON key/value to those values.\n\nWhen Performance Schema is enabled, server can display client information on each connection." }, "connectTimeout": { "description": "The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10 seconds)", "type": "number" }, "connectionLimit": { "description": "The maximum number of connections to create at once. (Default: 10)", "type": "number" }, "database": { "description": "Name of the database to use for this connection", "type": "string" }, "dateStrings": { "description": "Whether to retrieve dates as strings or as Date objects.", "type": "boolean" }, "debug": { "description": "This will print all incoming and outgoing packets on stdout.\n(Default: false)", "type": "boolean" }, "debugCompress": { "description": "This will print all incoming and outgoing compressed packets on stdout.\n(Default: false)", "type": "boolean" }, "debugLen": { "description": "When debugging, maximum packet length to write to console.\n(Default: 256)", "type": "number" }, "decimalAsNumber": { "description": "force returning decimal values as Number in place of String\n\nDefault: false;", "type": "boolean" }, "forceVersionCheck": { "description": "Force server version check by explicitly using SELECT VERSION(), not relying on server initial packet.\n(Default: false)", "type": "boolean" }, "foundRows": { "description": "When enabled, the update number corresponds to update rows.\nWhen disabled, it indicates the real rows changed.", "type": "boolean" }, "host": { "description": "The hostname of the database you are connecting to. (Default: localhost)", "type": "string" }, "idleTimeout": { "description": "Indicate idle time after which a pool connection is released.\nValue must be lower than [@@wait_timeout](https://mariadb.com/kb/en/library/server-system-variables/#wait_timeout).\nIn seconds (0 means never release)\nDefault: 1800 ( = 30 minutes)", "type": "number" }, "initSql": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ], "description": "When a connection is established, permit to execute commands before using connection" }, "initializationTimeout": { "description": "Timeout after which pool give up creating new connection.", "type": "number" }, "insertIdAsNumber": { "description": "force returning insertId as Number in place of BigInt\n\nDefault: false;", "type": "boolean" }, "keepAliveDelay": { "description": "permit to enable socket keep alive, setting delay. 0 means not enabled. Keep in mind that this don't reset server\n[@@wait_timeout](https://mariadb.com/kb/en/library/server-system-variables/#wait_timeout)\n(use pool option idleTimeout for that).\nin ms\n(Default: 0)", "type": "number" }, "leakDetectionTimeout": { "description": "Permit to indicate a timeout to log connection borrowed from pool.\nWhen a connection is borrowed from pool and this timeout is reached,\na message will be logged to console indicating a possible connection leak.\nAnother message will tell if the possible logged leak has been released.\nA value of 0 (default) meaning Leak detection is disable", "type": "number" }, "logPackets": { "description": "Debug option : permit to save last exchanged packet.\nError messages will display those last exchanged packet.\n\n(Default: false)", "type": "boolean" }, "logger": { "$ref": "#/definitions/LoggerConfig", "description": "Configure logger" }, "maxAllowedPacket": { "description": "permit to indicate server global variable max_allowed_packet value to ensure efficient batching.\ndefault is 4Mb. see batch documentation", "type": "number" }, "minDelayValidation": { "description": "When asking a connection to pool, the pool will validate the connection state.\n\"minDelayValidation\" permits disabling this validation if the connection has been borrowed recently avoiding\nuseless verifications in case of frequent reuse of connections.\n0 means validation is done each time the connection is asked. (in ms)\nDefault: 500 (in millisecond)", "type": "number" }, "minimumIdle": { "description": "Permit to set a minimum number of connection in pool.\n**Recommendation is to use fixed pool, so not setting this value**", "type": "number" }, "multipleStatements": { "description": "Allow multiple mysql statements per query. Be careful with this, it exposes you to SQL injection attacks.\n(Default: false)", "type": "boolean" }, "namedPlaceholders": { "description": "Allows the use of named placeholders.", "type": "boolean" }, "nestTables": { "description": "Presents result-sets by table to avoid results with colliding fields.\nSee the query() description for more information.", "type": [ "string", "boolean" ] }, "noControlAfterUse": { "description": "No rollback or reset when releasing a connection to pool.\nDefault: false", "type": "boolean" }, "password": { "description": "The password of that MySQL user", "type": "string" }, "permitLocalInfile": { "description": "Allows the use of LOAD DATA INFILE statements.\nLoading data from a file from the client may be a security issue, as a man-in-the-middle proxy server can change\nthe actual file the server loads. Being able to execute a query on the client gives you access to files on\nthe client.\n(Default: false)", "type": "boolean" }, "permitSetMultiParamEntries": { "description": "Compatibility option to permit setting multiple value by a JSON object to replace one question mark.\nkey values will replace the question mark with format like key1=val,key2='val2'.\nSince it doesn't respect the usual prepared statement format that one value is for one question mark,\nthis can lead to incomprehension, even if badly use to possible injection.", "type": "boolean" }, "pipelining": { "description": "Sends queries one by one without waiting on the results of the previous entry.\n(Default: true)", "type": "boolean" }, "port": { "description": "The port number to connect to. (Default: 3306)", "type": "number" }, "prepareCacheLength": { "description": "Indicate prepare cache size when using prepared statement\n\ndefault to 256.", "type": "number" }, "resetAfterUse": { "description": "Use COM_STMT_RESET when releasing a connection to pool.\nDefault: true", "type": "boolean" }, "rowsAsArray": { "description": "Return result-sets as array, rather than a JSON object. This is a faster way to get results", "type": "boolean" }, "rsaPublicKey": { "description": "Indicate path/content to MySQL server RSA public key.\nuse requires Node.js v11.6+", "type": "string" }, "sessionVariables": { "description": "Permit to set session variables when connecting.\nExample: sessionVariables:{'idle_transaction_timeout':10000}" }, "socketPath": { "description": "The path to a unix domain socket to connect to. When used host and port are ignored", "type": "string" }, "socketTimeout": { "description": "Socket timeout in milliseconds after the connection is established", "type": "number" }, "ssl": { "anyOf": [ { "allOf": [ { "$ref": "#/definitions/SecureContextOptions" }, { "properties": { "rejectUnauthorized": { "type": "boolean" } }, "type": "object" } ] }, { "type": "boolean" } ], "description": "object with ssl parameters or a boolean to enable ssl without setting any other ssl option.\nsee\nhttps://github.com/mariadb-corporation/mariadb-connector-nodejs/blob/master/documentation/connection-options.md#ssl\nfor more information" }, "stream": { "description": "Permit to set stream.", "type": "object" }, "timeout": { "description": "Allows timeout for command execution.", "type": "number" }, "timezone": { "description": "Forces use of the indicated timezone, rather than the current Node.js timezone.\nPossible values are Z for UTC, local or ±HH:MM format", "type": "string" }, "trace": { "description": "Adds the stack trace at the time of query creation to the error stack trace, making it easier to identify the\npart of the code that issued the query.\nNote: This feature is disabled by default due to the performance cost of stack creation.\nOnly turn it on when you need to debug issues.\n(Default: false)", "type": "boolean" }, "typeCast": { "description": "Allows to cast result types.", "type": "object" }, "user": { "description": "The MySQL user to authenticate as", "type": "string" } }, "type": "object" }, "ProxyOptions": { "properties": { "proxyHost": { "type": "string" }, "proxyPassword": { "type": "string" }, "proxyPort": { "type": "number" }, "proxyUsername": { "type": "string" } }, "type": "object" }, "PxfObject": { "properties": { "buf": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "type": "string" } ], "description": "PFX or PKCS12 encoded private key and certificate chain." }, "passphrase": { "description": "Optional passphrase.", "type": "string" } }, "type": "object" }, "ReadConcern": { "description": "The MongoDB ReadConcern, which allows for control of the consistency and isolation properties\nof the data read from replica sets and replica set shards.", "properties": { "level": { "type": "string" } }, "type": "object" }, "ReadConcernLevel": { "enum": [ "available", "linearizable", "local", "majority", "snapshot" ], "type": "string" }, "ReadPreference": { "description": "The **ReadPreference** class is a class that represents a MongoDB ReadPreference and is\nused to construct connections.", "properties": { "hedge": { "$ref": "#/definitions/HedgeOptions" }, "maxStalenessSeconds": { "type": "number" }, "minWireVersion": { "type": "number" }, "mode": { "$ref": "#/definitions/ReadPreferenceMode" }, "preference": { "$ref": "#/definitions/ReadPreferenceMode" }, "tags": { "items": { "additionalProperties": { "type": "string" }, "type": "object" }, "type": "array" } }, "type": "object" }, "ReadPreferenceMode": { "enum": [ "nearest", "primary", "primaryPreferred", "secondary", "secondaryPreferred" ], "type": "string" }, "SecureContext": { "properties": { "context": {} }, "type": "object" }, "SecureContextOptions": { "properties": { "ca": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "type": "string" } ] }, "type": "array" }, { "type": "string" } ], "description": "Optionally override the trusted CA certificates. Default is to trust\nthe well-known CAs curated by Mozilla. Mozilla's CAs are completely\nreplaced when CAs are explicitly specified using this option." }, "cert": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "type": "string" } ] }, "type": "array" }, { "type": "string" } ], "description": "Cert chains in PEM format. One cert chain should be provided per\nprivate key. Each cert chain should consist of the PEM formatted\ncertificate for a provided private key, followed by the PEM\nformatted intermediate certificates (if any), in order, and not\nincluding the root CA (the root CA must be pre-known to the peer,\nsee ca). When providing multiple cert chains, they do not have to\nbe in the same order as their private keys in key. If the\nintermediate certificates are not provided, the peer will not be\nable to validate the certificate, and the handshake will fail." }, "ciphers": { "description": "Cipher suite specification, replacing the default. For more\ninformation, see modifying the default cipher suite. Permitted\nciphers can be obtained via tls.getCiphers(). Cipher names must be\nuppercased in order for OpenSSL to accept them.", "type": "string" }, "clientCertEngine": { "description": "Name of an OpenSSL engine which can provide the client certificate.", "type": "string" }, "crl": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "type": "string" } ] }, "type": "array" }, { "type": "string" } ], "description": "PEM formatted CRLs (Certificate Revocation Lists)." }, "dhparam": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "type": "string" } ], "description": "Diffie Hellman parameters, required for Perfect Forward Secrecy. Use\nopenssl dhparam to create the parameters. The key length must be\ngreater than or equal to 1024 bits or else an error will be thrown.\nAlthough 1024 bits is permissible, use 2048 bits or larger for\nstronger security. If omitted or invalid, the parameters are\nsilently discarded and DHE ciphers will not be available." }, "ecdhCurve": { "description": "A string describing a named curve or a colon separated list of curve\nNIDs or names, for example P-521:P-384:P-256, to use for ECDH key\nagreement. Set to auto to select the curve automatically. Use\ncrypto.getCurves() to obtain a list of available curve names. On\nrecent releases, openssl ecparam -list_curves will also display the\nname and description of each available elliptic curve. Default:\ntls.DEFAULT_ECDH_CURVE.", "type": "string" }, "honorCipherOrder": { "description": "Attempt to use the server's cipher suite preferences instead of the\nclient's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be\nset in secureOptions", "type": "boolean" }, "key": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "$ref": "#/definitions/KeyObject" } ] }, "type": "array" }, { "type": "string" } ], "description": "Private keys in PEM format. PEM allows the option of private keys\nbeing encrypted. Encrypted keys will be decrypted with\noptions.passphrase. Multiple keys using different algorithms can be\nprovided either as an array of unencrypted key strings or buffers,\nor an array of objects in the form {pem: [,\npassphrase: ]}. The object form can only occur in an array.\nobject.passphrase is optional. Encrypted keys will be decrypted with\nobject.passphrase if provided, or options.passphrase if it is not." }, "maxVersion": { "description": "Optionally set the maximum TLS version to allow. One\nof `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the\n`secureProtocol` option, use one or the other.\n**Default:** `'TLSv1.3'`, unless changed using CLI options. Using\n`--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to\n`'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used.", "enum": [ "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3" ], "type": "string" }, "minVersion": { "description": "Optionally set the minimum TLS version to allow. One\nof `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the\n`secureProtocol` option, use one or the other. It is not recommended to use\nless than TLSv1.2, but it may be required for interoperability.\n**Default:** `'TLSv1.2'`, unless changed using CLI options. Using\n`--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to\n`'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to\n'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used.", "enum": [ "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3" ], "type": "string" }, "passphrase": { "description": "Shared passphrase used for a single private key and/or a PFX.", "type": "string" }, "pfx": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "items": { "anyOf": [ { "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" }, { "$ref": "#/definitions/PxfObject" }, { "type": "string" } ] }, "type": "array" }, { "type": "string" } ], "description": "PFX or PKCS12 encoded private key and certificate chain. pfx is an\nalternative to providing key and cert individually. PFX is usually\nencrypted, if it is, passphrase will be used to decrypt it. Multiple\nPFX can be provided either as an array of unencrypted PFX buffers,\nor an array of objects in the form {buf: [,\npassphrase: ]}. The object form can only occur in an array.\nobject.passphrase is optional. Encrypted PFX will be decrypted with\nobject.passphrase if provided, or options.passphrase if it is not." }, "privateKeyEngine": { "description": "Name of an OpenSSL engine to get private key from. Should be used\ntogether with privateKeyIdentifier.", "type": "string" }, "privateKeyIdentifier": { "description": "Identifier of a private key managed by an OpenSSL engine. Should be\nused together with privateKeyEngine. Should not be set together with\nkey, because both options define a private key in different ways.", "type": "string" }, "secureOptions": { "description": "Optionally affect the OpenSSL protocol behavior, which is not\nusually necessary. This should be used carefully if at all! Value is\na numeric bitmask of the SSL_OP_* options from OpenSSL Options", "type": "number" }, "secureProtocol": { "description": "Legacy mechanism to select the TLS protocol version to use, it does\nnot support independent control of the minimum and maximum version,\nand does not support limiting the protocol to TLSv1.3. Use\nminVersion and maxVersion instead. The possible values are listed as\nSSL_METHODS, use the function names as strings. For example, use\n'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow\nany TLS protocol version up to TLSv1.3. It is not recommended to use\nTLS versions less than 1.2, but it may be required for\ninteroperability. Default: none, see minVersion.", "type": "string" }, "sessionIdContext": { "description": "Opaque identifier used by servers to ensure session state is not\nshared between applications. Unused by clients.", "type": "string" }, "sessionTimeout": { "description": "The number of seconds after which a TLS session created by the\nserver will no longer be resumable. See Session Resumption for more\ninformation. Default: 300.", "type": "number" }, "sigalgs": { "description": "Colon-separated list of supported signature algorithms. The list\ncan contain digest algorithms (SHA256, MD5 etc.), public key\nalgorithms (RSA-PSS, ECDSA etc.), combination of both (e.g\n'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512).", "type": "string" }, "ticketKeys": { "additionalProperties": false, "description": "48-bytes of cryptographically strong pseudo-random data.\nSee Session Resumption for more information.", "patternProperties": { "^[0-9]+$": { "type": "number" } }, "type": "object" } }, "type": "object" }, "ServerApi": { "properties": { "deprecationErrors": { "type": "boolean" }, "strict": { "type": "boolean" }, "version": { "enum": [ "1" ], "type": "string" } }, "type": "object" }, "WriteConcern": { "description": "A MongoDB WriteConcern, which describes the level of acknowledgement\nrequested from MongoDB for write operations.", "properties": { "fsync": { "description": "equivalent to the j option", "enum": [ 1, false, true ] }, "j": { "description": "request acknowledgment that the write operation has been written to the on-disk journal", "type": "boolean" }, "w": { "anyOf": [ { "enum": [ "majority" ], "type": "string" }, { "type": "number" } ], "description": "request acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags." }, "wtimeout": { "description": "specify a time limit to prevent write operations from blocking indefinitely", "type": "number" } }, "type": "object" }, "global.NodeJS.Platform": { "enum": [ "aix", "android", "cygwin", "darwin", "freebsd", "haiku", "linux", "netbsd", "openbsd", "sunos", "win32" ], "type": "string" } }, "properties": { "cors": { "default": true, "description": "true to enable CORS", "type": "boolean" }, "enableLogs": { "default": true, "description": "Enable crudity logging.", "type": "boolean" }, "port": { "default": 3000, "description": "Port that the crudity server listen to.", "type": "number" }, "publicDir": { "default": "'./public'", "description": "Directory where to listen to", "type": "string" }, "resources": { "additionalProperties": { "$ref": "#/definitions/Partial" }, "description": "Object that specifies all the resource names and their config.", "type": "object" }, "rootEndPoint": { "default": "'/api'", "description": "The root endpoint for all ressources.", "type": "string" } }, "type": "object" }