UNPKG

@webda/core

Version:

Expose API with Lambda

1,591 lines (1,590 loc) 79.3 kB
{ "beans": {}, "deployers": {}, "moddas": { "Webda/Aggregator": "lib/stores/aggregator:default", "Webda/AliasStore": "lib/stores/aliasstore:AliasStore", "Webda/AsyncEvents": "lib/services/asyncevents:EventService", "Webda/Authentication": "lib/services/authentication:Authentication", "Webda/Binary": "lib/services/binary:BinaryService", "Webda/ConfigurationService": "lib/services/configuration:default", "Webda/ConsoleLogger": "lib/utils/logger:ConsoleLoggerService", "Webda/CookieSessionManager": "lib/utils/session:CookieSessionManager", "Webda/CronService": "lib/services/cron:CronService", "Webda/CryptoService": "lib/services/cryptoservice:default", "Webda/DebugMailer": "lib/services/debugmailer:default", "Webda/FileBinary": "lib/services/filebinary:FileBinary", "Webda/FileConfiguration": "lib/services/fileconfiguration:FileConfigurationService", "Webda/FileLogger": "lib/utils/logger:FileLoggerService", "Webda/FileQueue": "lib/queues/filequeue:FileQueue", "Webda/FileStore": "lib/stores/file:FileStore", "Webda/InvitationService": "lib/services/invitationservice:default", "Webda/KubernetesConfigurationService": "lib/services/kubernetesconfiguration:KubernetesConfigurationService", "Webda/Mailer": "lib/services/mailer:Mailer", "Webda/Mapper": "lib/stores/mapper:default", "Webda/MemoryLogger": "lib/utils/logger:MemoryLoggerService", "Webda/MemoryQueue": "lib/queues/memoryqueue:MemoryQueue", "Webda/MemoryStore": "lib/stores/memory:MemoryStore", "Webda/ModelsOperationsService": "lib/services/domainservice:ModelsOperationsService", "Webda/MultiNotificationService": "lib/services/notificationservice:default", "Webda/PrometheusService": "lib/services/prometheus:PrometheusService", "Webda/RESTDomainService": "lib/services/domainservice:RESTDomainService", "Webda/ResourceService": "lib/services/resource:default" }, "models": { "graph": { "Webda/AclModel": {}, "Webda/CoreModel": {}, "Webda/Ident": { "links": [ { "attribute": "_user", "model": "Webda/User", "type": "LINK" } ] }, "Webda/OwnerModel": { "links": [ { "attribute": "_user", "model": "Webda/User", "type": "LINK" } ] }, "Webda/RoleModel": {}, "Webda/SimpleUser": { "maps": [ { "attribute": "_idents", "cascadeDelete": false, "model": "Webda/Ident", "targetLink": "_user", "targetAttributes": [ "_type", "uuid", "email" ] } ] }, "Webda/User": {}, "Webda/UuidModel": {} }, "tree": { "Webda/AclModel": {}, "Webda/RoleModel": {}, "Webda/User": { "Webda/SimpleUser": {} }, "Webda/UuidModel": { "Webda/OwnerModel": { "Webda/Ident": {} } } }, "plurals": {}, "list": { "Webda/AclModel": "lib/models/aclmodel:default", "Webda/CoreModel": "lib/models/coremodel:CoreModel", "Webda/Ident": "lib/models/ident:Ident", "Webda/OwnerModel": "lib/models/ownermodel:OwnerModel", "Webda/RoleModel": "lib/models/rolemodel:RoleModel", "Webda/SimpleUser": "lib/models/user:SimpleUser", "Webda/User": "lib/models/user:User", "Webda/UuidModel": "lib/models/coremodel:UuidModel" }, "reflections": { "Webda/AclModel": { "_creator": "string", "__acl": "Acl", "_permissions": "string[]", "__class": "CoreModelDefinition<this>", "__type": "string", "__types": "string[]", "__ctx": "OperationContext", "__store": "Store<this>", "__dirty": "Set<string | symbol>", "_creationDate": "Date", "_lastUpdate": "Date", "__deleted": "boolean" }, "Webda/CoreModel": { "__class": "CoreModelDefinition<this>", "__type": "string", "__types": "string[]", "__ctx": "OperationContext", "__store": "Store<this>", "__dirty": "Set<string | symbol>", "_creationDate": "Date", "_lastUpdate": "Date", "__deleted": "boolean" }, "Webda/Ident": { "_type": "string", "uid": "string", "__profile": "unknown", "__tokens": "IdentTokens", "_lastUsed": "Date", "_user": "ModelLink<User>", "__new": "boolean", "_failedLogin": "number", "_lastValidationEmail": "number", "_validation": "Date", "email": "string", "provider": "string", "public": "boolean", "uuid": "string", "__class": "CoreModelDefinition<this>", "__type": "string", "__types": "string[]", "__ctx": "OperationContext", "__store": "Store<this>", "__dirty": "Set<string | symbol>", "_creationDate": "Date", "_lastUpdate": "Date", "__deleted": "boolean" }, "Webda/OwnerModel": { "_user": "ModelLink<User>", "public": "boolean", "uuid": "string", "__class": "CoreModelDefinition<this>", "__type": "string", "__types": "string[]", "__ctx": "OperationContext", "__store": "Store<this>", "__dirty": "Set<string | symbol>", "_creationDate": "Date", "_lastUpdate": "Date", "__deleted": "boolean" }, "Webda/RoleModel": { "__class": "CoreModelDefinition<this>", "__type": "string", "__types": "string[]", "__ctx": "OperationContext", "__store": "Store<this>", "__dirty": "Set<string | symbol>", "_creationDate": "Date", "_lastUpdate": "Date", "__deleted": "boolean" }, "Webda/SimpleUser": { "_groups": "string[]", "_roles": "string[]", "_idents": "ModelsMapped<Ident, \"_user\", \"_type\" | \"uuid\" | \"email\">", "__password": "string", "displayName": "string", "_lastPasswordRecovery": "number", "_avatar": "string", "locale": "string", "email": "string", "__class": "CoreModelDefinition<this>", "__type": "string", "__types": "string[]", "__ctx": "OperationContext", "__store": "Store<this>", "__dirty": "Set<string | symbol>", "_creationDate": "Date", "_lastUpdate": "Date", "__deleted": "boolean" }, "Webda/User": { "__password": "string", "displayName": "string", "_lastPasswordRecovery": "number", "_avatar": "string", "locale": "string", "email": "string", "__class": "CoreModelDefinition<this>", "__type": "string", "__types": "string[]", "__ctx": "OperationContext", "__store": "Store<this>", "__dirty": "Set<string | symbol>", "_creationDate": "Date", "_lastUpdate": "Date", "__deleted": "boolean" }, "Webda/UuidModel": { "uuid": "string", "__class": "CoreModelDefinition<this>", "__type": "string", "__types": "string[]", "__ctx": "OperationContext", "__store": "Store<this>", "__dirty": "Set<string | symbol>", "_creationDate": "Date", "_lastUpdate": "Date", "__deleted": "boolean" } } }, "schemas": { "Webda/AclModel": { "type": "object", "properties": { "_creationDate": { "type": "string", "format": "date-time", "description": "Creation date", "readOnly": true }, "_lastUpdate": { "type": "string", "format": "date-time", "description": "Last update date", "readOnly": true }, "_creator": { "type": "string", "description": "Object creator", "readOnly": true } }, "description": "Object that contains ACL to define its own permissions", "$schema": "http://json-schema.org/draft-07/schema#", "title": "AclModel" }, "Webda/Aggregator": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the service" }, "url": { "type": "string", "description": "URL on which to serve the content" }, "fields": { "type": "array", "items": { "type": "string" }, "description": "Field to duplicate" }, "source": { "type": "string", "description": "Source service" }, "target": { "type": "string", "description": "Target store" }, "async": { "type": "boolean", "description": "Async", "default": false }, "attribute": { "type": "string", "description": "Attribute to use for link\n\nDepending on the type - string[]: will consider each string as id - string: will be consider as id - Object: each keys will be consider as id" }, "targetAttribute": { "type": "string", "description": "The object will contain a Mapper" }, "cascade": { "type": "boolean", "description": "Delete source if target object is deleted" }, "key": { "type": "string", "default": "index" }, "openapi": { "type": "object", "additionalProperties": true } }, "required": [ "async", "attribute", "cascade", "fields", "key", "source", "target", "targetAttribute", "type" ], "$schema": "http://json-schema.org/draft-07/schema#", "title": "AggregatorService" }, "Webda/AliasStore": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the service" }, "url": { "type": "string", "description": "URL on which to serve the content" }, "model": { "type": "string", "description": "Webda model to use within the Store", "default": "Webda/CoreModel" }, "additionalModels": { "type": "array", "items": { "type": "string" }, "description": "Additional models\n\nAllow this store to manage other models", "default": [] }, "asyncDelete": { "type": "boolean", "description": "async delete" }, "expose": { "$ref": "#/definitions/StoreExposeParameters", "description": "Expose the service to an urls", "deprecated": "will probably be removed in 4.0 in favor of Expose annotation" }, "strict": { "type": "boolean", "description": "Allow to load object that does not have the type data\n\nIf set to true, then the Store will only managed the defined _model and no model extending this one", "default": false }, "defaultModel": { "type": "boolean", "description": "When __type model not found, use the model If strict is setup this parameter is not used", "default": true }, "forceModel": { "type": "boolean", "description": "If set, Store will ignore the __type", "default": false }, "slowQueryThreshold": { "type": "number", "description": "Slow query threshold", "default": 30000 }, "modelAliases": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Model Aliases to allow easier rename of Model" }, "noCache": { "type": "boolean", "description": "Disable default memory cache" }, "targetStore": { "type": "string", "description": "Store to alias" }, "idTemplate": { "type": "string", "description": "Store to alias" }, "openapi": { "type": "object", "additionalProperties": true } }, "required": [ "asyncDelete", "idTemplate", "slowQueryThreshold", "targetStore", "type" ], "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "StoreExposeParameters": { "type": "object", "properties": { "url": { "type": "string", "description": "URL endpoint to use to expose REST Resources API", "default": "service.getName().toLowerCase()" }, "restrict": { "type": "object", "properties": { "create": { "type": "boolean", "description": "Do not expose the POST" }, "update": { "type": "boolean", "description": "Do not expose the PUT and PATCH" }, "get": { "type": "boolean", "description": "Do not expose the GET" }, "delete": { "type": "boolean", "description": "Do not expose the DELETE" }, "query": { "type": "boolean", "description": "Do not expose the query endpoint" } }, "description": "You can restrict any part of the CRUD", "default": {} }, "queryMethod": { "type": "string", "enum": [ "PUT", "GET" ], "description": "For confidentiality sometimes you might prefer to expose query through PUT To avoid GET logging", "default": "GET" } }, "deprecated": "Store should not be exposed directly anymore\nYou should use the DomainService instead" } }, "title": "AliasStore" }, "Webda/AsyncEvents": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the service" }, "url": { "type": "string", "description": "URL on which to serve the content" }, "queues": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Queues to post async events to" }, "sync": { "type": "boolean", "description": "Make the event sending asynchronous" }, "openapi": { "type": "object", "additionalProperties": true } }, "required": [ "type" ], "$schema": "http://json-schema.org/draft-07/schema#", "title": "EventService" }, "Webda/Authentication": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the service" }, "url": { "type": "string", "description": "URL on which to serve the content", "default": "/auth" }, "identModel": { "type": "string", "description": "Idents store for authentication identifiers", "default": "Webda/Ident" }, "userModel": { "type": "string", "description": "User store for authentication users", "default": "Webda/User" }, "email": { "type": "object", "properties": { "mailer": { "type": "string", "description": "Mailer service name" }, "postValidation": { "type": "boolean", "description": "Allow user to create their account without validating their email first" }, "skipEmailValidation": { "type": "boolean", "description": "Do not even validate the email at all" }, "delay": { "type": "number", "description": "Minimal delay between two password recovery or validation email", "default": "3600000 * 4" }, "failedLoginBeforeDelay": { "type": "number", "description": "When a delay is added between two attempt to authenticate", "default": 3 } }, "required": [ "postValidation", "skipEmailValidation", "delay", "failedLoginBeforeDelay" ], "description": "Enable the email authentication" }, "password": { "type": "object", "properties": { "verifier": { "type": "string", "description": "Password verifier Service name" }, "regexp": { "type": "string", "description": "Regexp that password must check", "default": "{8,}" } } }, "salt": { "type": "string", "description": "Number of salt iteration for bcrypt.hashSync" }, "failureRedirect": { "type": "string", "description": "Redirect to this page when email validation failed" }, "successRedirect": { "type": "string", "description": "Redirect to this page when email validation succeed" }, "registerRedirect": { "type": "string", "description": "Redirect to this page once email is validate to finish the registration process" }, "openapi": { "type": "object", "additionalProperties": true } }, "required": [ "failureRedirect", "password", "registerRedirect", "salt", "successRedirect", "type" ], "$schema": "http://json-schema.org/draft-07/schema#", "title": "Authentication" }, "Webda/Binary": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the service" }, "url": { "type": "string", "description": "URL on which to serve the content" }, "map": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "description": "Define the map to Object collection\n\nkey is a Store name the string[] represent all valids attributes to store files in", "deprecated": true }, "models": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "description": "Define the map of models\n* indicates all models\n\nkey is a Store name the string[] represent all valids attributes to store files in * indicates all attributes" }, "expose": { "type": "object", "properties": { "url": { "type": "string", "description": "URL to expose the service to" }, "restrict": { "type": "object", "properties": { "get": { "type": "boolean", "description": "Restrict GET" }, "create": { "type": "boolean", "description": "Restrict POST" }, "delete": { "type": "boolean", "description": "Restrict DELETE" }, "metadata": { "type": "boolean", "description": "Restrict update of metadata" } }, "description": "Restrict some APIs" } }, "required": [ "url" ], "description": "Expose the service to http", "deprecated": "will be removed in 4.0" }, "openapi": { "type": "object", "additionalProperties": true } }, "required": [ "map", "models", "type" ], "$schema": "http://json-schema.org/draft-07/schema#", "title": "BinaryService" }, "Webda/BinaryFile": { "type": "object", "properties": { "hash": { "type": "string", "description": "Will be computed by the service\n\nhash of the content" }, "challenge": { "type": "string", "description": "Will be computed by the service\n\nhash of the content prefixed by 'WEBDA'" }, "size": { "type": "number", "description": "Size of the binary" }, "name": { "type": "string", "description": "Current name" }, "mimetype": { "type": "string", "description": "Mimetype of the binary" }, "metadata": { "description": "Metadatas stored along with the binary" }, "originalname": { "type": "string", "description": "Original name" } }, "required": [ "mimetype", "name", "size" ], "description": "Represent a file to store", "$schema": "http://json-schema.org/draft-07/schema#", "title": "BinaryFile" }, "Webda/ConfigurationService": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the service" }, "url": { "type": "string", "description": "URL on which to serve the content" }, "checkInterval": { "type": "number", "description": "Check configuration every {checkInterval} seconds" }, "source": { "type": "string", "description": "Format sourceServiceName:sourceId" }, "default": { "description": "Default configuration to use" }, "openapi": { "type": "object", "additionalProperties": true } }, "required": [ "default", "source", "type" ], "$schema": "http://json-schema.org/draft-07/schema#", "title": "ConfigurationService" }, "Webda/ConsoleLogger": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the service" }, "url": { "type": "string", "description": "URL on which to serve the content" }, "logLevel": { "$ref": "#/definitions/WorkerLogLevel", "description": "Specify the log level of this service" }, "format": { "type": "string" }, "openapi": { "type": "object", "additionalProperties": true } }, "required": [ "logLevel", "type" ], "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "WorkerLogLevel": { "type": "string", "enum": [ "ERROR", "WARN", "INFO", "DEBUG", "TRACE" ], "description": "LogLevel as intersection to compare with integer values" } }, "title": "ConsoleLoggerService" }, "Webda/CookieSessionManager": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the service" }, "url": { "type": "string", "description": "URL on which to serve the content" }, "jwt": { "type": "object", "properties": { "secretOrPublicKey": { "anyOf": [ { "type": "string" }, { "type": "object", "properties": { "BYTES_PER_ELEMENT": { "type": "number" }, "buffer": { "$ref": "#/definitions/ArrayBufferLike" }, "byteLength": { "type": "number" }, "byteOffset": { "type": "number" }, "length": { "type": "number" } }, "required": [ "BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length" ] }, { "type": "object", "properties": { "key": { "type": "string" }, "passphrase": { "type": "string" } }, "required": [ "key", "passphrase" ] } ], "description": "Secret to use with JWT" }, "algorithm": { "type": "string", "enum": [ "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" ], "description": "Algorithm for JWT token", "default": "HS256" }, "expiresIn": { "type": [ "number", "string" ], "description": "expressed in seconds or a string describing a time span zeit/ms.\n\nEg: 60, \"2 days\", \"10h\", \"7d\". A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default (\"120\" is equal to \"120ms\")." }, "audience": { "type": "string", "description": "Audience for the jwt" }, "issuer": { "type": "string", "description": "Issuer of the token" }, "subject": { "type": "string", "description": "Subject for JWT" }, "keyid": {} }, "description": "Options for issue JWT token" }, "cookie": { "type": "object", "properties": { "encode": { "type": "object", "properties": {}, "description": "Specifies a function that will be used to encode a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1). Since value of a cookie has a limited character set (and must be a simple string), this function can be used to encode a value into a string suited for a cookie's value, and should mirror `decode` when parsing.", "default": "encodeURIComponent" }, "maxAge": { "type": "number", "description": "Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.2).\n\nThe [cookie storage model specification](https://tools.ietf.org/html/rfc6265#section-5.3) states that if both `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this, so if both are set, they should point to the same date and time.", "minimum": 1, "default": "86400 * 7" }, "expires": { "type": "string" }, "path": { "type": "string", "description": "Specifies the value for the [`Path` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.4). When no path is set, the path is considered the [\"default path\"](https://tools.ietf.org/html/rfc6265#section-5.1.4).", "default": "/" }, "httpOnly": { "type": "boolean", "description": "Enables the [`HttpOnly` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.6). When enabled, clients will not allow client-side JavaScript to see the cookie in `document.cookie`.", "default": true }, "secure": { "type": "boolean", "description": "If not set will be true if https request and false otherwise If defined it will be set to the value" }, "partitioned": { "type": "boolean" }, "priority": { "anyOf": [ { "type": "object", "properties": {} }, { "type": "object", "properties": {} }, { "type": "object", "properties": {} } ] }, "sameSite": { "type": "string", "enum": [ "none", "strict", "lax" ], "description": "Specifies the value for the [`SameSite` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7).\n\n- `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement.\n- `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement.\n- `'none'` will set the `SameSite` attribute to `None` for an explicit cross-site cookie.\n- `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement.\n\nMore information about enforcement levels can be found in [the specification](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7).", "default": "lax" }, "domain": { "type": "boolean", "enum": [ true ], "description": "if true domain will be set to the request hostname if undefined no domain will be output (browser will use the current domain and only this one) if a string is provided it will be used as the domain\n\nWhen provided a domain is setting the cookie to be available to all subdomains" }, "name": { "type": "string", "description": "Name of the cookie" } }, "description": "Cookie configuration for session" }, "openapi": { "type": "object", "additionalProperties": true } }, "required": [ "type" ], "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "ArrayBufferLike": { "anyOf": [ { "type": "object", "properties": { "byteLength": { "type": "number" } }, "required": [ "byteLength" ] }, {} ] } }, "title": "CookieSessionManager" }, "Webda/CoreModel": { "type": "object", "properties": { "_creationDate": { "type": "string", "format": "date-time", "description": "Creation date", "readOnly": true }, "_lastUpdate": { "type": "string", "format": "date-time", "description": "Last update date", "readOnly": true } }, "description": "Basic Object in Webda\n\nIt is used to define a data stored Any variable starting with _ can only be set by the server Any variable starting with __ won't be exported outside of the server", "$schema": "http://json-schema.org/draft-07/schema#", "title": "CoreModel" }, "Webda/CronService": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the service" }, "url": { "type": "string", "description": "URL on which to serve the content" }, "openapi": { "type": "object", "additionalProperties": true } }, "required": [ "type" ], "description": "Interface to specify the Service parameters", "$schema": "http://json-schema.org/draft-07/schema#", "title": "ModelsOperationsService" }, "Webda/CryptoService": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the service" }, "url": { "type": "string", "description": "To expose JWKS" }, "keyActiveLifespan": { "type": "number", "description": "Number of hours a key should be used for encryption\n\nif auto-rotate is not set this" }, "keyLifespan": { "type": "number", "description": "Number of hours allowed to decrypt data encrypted with this key" }, "autoRotate": { "type": "number", "description": "Try to rotate keys when they expire in days" }, "autoCreate": { "type": "boolean", "description": "Create first set of key if does not exist" }, "asymetricType": { "type": "string", "enum": [ "rsa", "dsa", "ec", "ed25519", "ed448", "x25519", "x448", "dh" ], "description": "Type of asymetric key\n\nhttps://nodejs.org/api/crypto.html#cryptogeneratekeypairsynctype-options https://nodejs.org/docs/latest-v14.x/api/crypto.html#crypto_crypto_generatekeypairsync_type_options" }, "asymetricOptions": { "type": "object", "properties": { "modulusLength": { "type": "number", "default": 2048 }, "namedCurve": { "type": "string", "description": "Only if asymetricType \"ec\"" }, "publicKeyEncoding": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "spki", "pkcs1" ], "default": "spki" }, "format": { "type": "string", "const": "pem" } } }, "privateKeyEncoding": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "pkcs1", "pkcs8", "sec1" ], "description": "https://nodejs.org/docs/latest-v14.x/api/crypto.html#crypto_keyobject_export_options", "default": "pkcs8" }, "format": { "type": "string", "const": "pem" }, "cipher": { "type": "string" }, "passphrase": { "type": "string" } } } }, "description": "Options for asymetric generation" }, "symetricKeyLength": { "type": "number", "default": 256 }, "symetricCipher": { "type": "string", "default": "aes-256-ctr" }, "jwt": { "type": "object", "properties": { "secretOrPublicKey": { "anyOf": [ { "type": "string" }, { "type": "object", "properties": { "BYTES_PER_ELEMENT": { "type": "number" }, "buffer": { "$ref": "#/definitions/ArrayBufferLike" }, "byteLength": { "type": "number" }, "byteOffset": { "type": "number" }, "length": { "type": "number" } }, "required": [ "BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length" ] }, { "type": "object", "properties": { "key": { "type": "string" }, "passphrase": { "type": "string" } }, "required": [ "key", "passphrase" ] } ], "description": "Secret to use with JWT" }, "algorithm": { "type": "string", "enum": [ "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" ], "description": "Algorithm for JWT token", "default": "HS256" }, "expiresIn": { "type": [ "number", "string" ], "description": "expressed in seconds or a string describing a time span zeit/ms.\n\nEg: 60, \"2 days\", \"10h\", \"7d\". A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default (\"120\" is equal to \"120ms\")." }, "audience": { "type": "string", "description": "Audience for the jwt" }, "issuer": { "type": "string", "description": "Issuer of the token" }, "subject": { "type": "string", "description": "Subject for JWT" }, "keyid": {} }, "description": "Default JWT options" }, "openapi": { "type": "object", "additionalProperties": true } }, "required": [ "asymetricType", "keyActiveLifespan", "keyLifespan", "type" ], "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "ArrayBufferLike": { "anyOf": [ { "type": "object", "properties": { "byteLength": { "type": "number" } }, "required": [ "byteLength" ] }, {} ] } }, "title": "CryptoService" }, "Webda/DebugMailer": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the service" }, "url": { "type": "string", "description": "URL on which to serve the content" }, "openapi": { "type": "object", "additionalProperties": true } }, "required": [ "type" ], "description": "Interface to specify the Service parameters", "$schema": "http://json-schema.org/draft-07/schema#", "title": "DebugMailer" }, "Webda/FileBinary": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the service" }, "url": { "type": "string", "description": "URL on which to serve the content" }, "map": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "description": "Define the map to Object collection\n\nkey is a Store name the string[] represent all valids attributes to store files in", "deprecated": true }, "models": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "description": "Define the map of models\n* indicates all models\n\nkey is a Store name the string[] represent all valids attributes to store files in * indicates all attributes" }, "expose": { "type": "object", "properties": { "url": { "type": "string", "description": "URL to expose the service to" }, "restrict": { "type": "object", "properties": { "get": { "type": "boolean", "description": "Restrict GET" }, "create": { "type": "boolean", "description": "Restrict POST" }, "delete": { "type": "boolean", "description": "Restrict DELETE" }, "metadata": { "type": "boolean", "description": "Restrict update of metadata" } }, "description": "Restrict some APIs" } }, "required": [ "url" ], "description": "Expose the service to http", "deprecated": "will be removed in 4.0" }, "prefix": { "type": "string" }, "folder": { "type": "string", "description": "Define the folder to store objects in" }, "maxSize": { "type": "number", "description": "Maximum size to handle", "default": "10Mb" }, "openapi": { "type": "object", "additionalProperties": true } }, "required": [ "folder", "map", "models", "type" ], "$schema": "http://json-schema.org/draft-07/schema#", "title": "FileBinary" }, "Webda/FileConfiguration": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the service" }, "url": { "type": "string", "description": "URL on which to serve the content" }, "checkInterval": { "type": "number", "description": "Check configuration every {checkInterval} seconds" }, "source": { "type": "string", "description": "Format sourceServiceName:sourceId" }, "default": { "description": "Default configuration to use" }, "openapi": { "type": "object", "additionalProperties": true } }, "required": [ "default", "source", "type" ], "$schema": "http://json-schema.org/draft-07/schema#", "title": "FileConfigurationService" }, "Webda/FileLogger": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the service" }, "url": { "type": "string", "description": "URL on which to serve the content" }, "logLevel": { "$ref": "#/definitions/WorkerLogLevel", "description": "Specify the log level of this service" }, "format": { "type": "string" }, "file": { "type": "string" }, "sizeLimit": { "type": "number" }, "openapi": { "type": "object", "additionalProperties": true } }, "required": [ "file", "logLevel", "type" ], "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "WorkerLogLevel": { "type": "string", "enum": [ "ERROR", "WARN", "INFO", "DEBUG", "TRACE" ], "description": "LogLevel as intersection to compare with integer values" } }, "title": "FileLoggerService" }, "Webda/FileQueue": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the service" }, "url": { "type": "string", "description": "URL on which to serve the content" }, "workerDelayer": { "type": "object", "properties": { "interval": { "type": "number", "description": "Interval" }, "type": { "type": "string", "description": "Type of delayer registered in WaitDelayerFactoryRegistry" } }, "required": [ "interval", "type" ], "description": "Delayer between two failed attempts to process messages" }, "workerParallelism": { "type": "boolean", "description": "Define if worker should process multi message received in //", "default": true }, "maxConsumers": { "type": "number", "description": "Max number of queue consumers Queue will auto increase to this max number if queue is loaded and it will decrease to just one consumer if no messages are available", "default": 10 }, "expire": { "type": "number", "description": "Number of seconds before droping message", "default": 30 }, "folder": { "type": "string", "description": "Where to store the queue" }, "openapi": { "type": "object", "additionalProperties": true } }, "required": [ "folder", "maxConsumers", "type" ], "$schema": "http://json-schema.org/draft-07/schema#", "title": "FileQueue" }, "Webda/FileStore": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the service" }, "url": { "type": "string", "description": "URL on which to serve the content" }, "model": { "type": "string", "description": "Webda model to use within the Store", "default": "Webda/CoreModel" }, "additionalModels": { "type": "array", "items": { "type": "string" }, "description": "Additional models\n\nAllow this store to manage other models", "default": [] }, "asyncDelete": { "type": "boolean", "description": "async delete" }, "expose": { "$ref": "#/definitions/StoreExposeParameters", "description": "Expose the service to an urls", "deprecated": "will probably be removed in 4.0 in favor of Expose annotation" }, "strict": { "type": "boolean", "description": "Allow to load object that does not have the type data\n\nIf set to true, then the Store will only managed the defined _model and no model extending this one", "default": false }, "defaultModel": { "type": "boolean", "description": "When __type model not found, use the model If strict is setup this parameter is not used", "default": true }, "forceModel": { "type": "boolean", "description": "If set, Store will ignore the __type", "default": false }, "slowQueryThreshold": { "type": "number", "description": "Slow query threshold", "default": 30000 }, "modelAliases": { "type": "object", "additionalProperties": {