# Worterbuch client messages schema # # Copyright (C) 2024 Michael Bachmann # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . title: ClientMessage type: object properties: authorizationRequest: description: A message sent by a client to acquire authorization from the server type: object properties: authToken: type: string additionalProperties: false required: - authToken get: description: A message sent by a client to request the value of the provided key from the server type: object properties: transactionId: description: A unique transaction ID type: integer format: u64 key: type: string additionalProperties: false required: - transactionId - key pGet: description: A message sent by a client to request the values of all keys matching the provided pattern from the server type: object properties: transactionId: description: A unique transaction ID type: integer format: u64 requestPattern: type: string additionalProperties: false required: - transactionId - requestPattern set: description: A message sent by a client to set a new value for a key type: object properties: transactionId: description: A unique transaction ID type: integer format: u64 key: description: The key for which to set the value type: string value: description: The new value for the key additionalProperties: false required: - transactionId - key - value sPubInit: description: A message sent by a client to initiate a new publish stream type: object properties: transactionId: description: A unique transaction ID type: integer format: u64 key: description: The key to be used in this pub stream type: string additionalProperties: false required: - transactionId - key sPub: description: A message sent by a client to publish to an existing pub stream type: object properties: transactionId: description: The transaction ID of the pub stream to publish to type: integer format: u64 value: description: The new value to be published additionalProperties: false required: - transactionId - value publish: description: A message sent by a client to publish a new value for a key. The value will not be persisted on the server type: object properties: transactionId: description: A unique transaction ID type: integer format: u64 key: description: The key for which to publish the value type: string value: description: The value to be published for the key additionalProperties: false required: - transactionId - key - value subscribe: description: A message sent by a client to subscribe to values of the provided key type: object properties: transactionId: description: A unique transaction ID type: integer format: u64 key: description: The key to subscribe to type: string unique: description: Indicate whether all or only unique values should be received type: boolean liveOnly: description: Indicate whether there should be a callback for data already stored on the broker (false) or only for live events (true) type: boolean additionalProperties: false required: - transactionId - key - unique pSubscribe: description: A message sent by a client to subscribe to values of all keys matching the provided pattern type: object properties: transactionId: description: A unique transaction ID type: integer format: u64 requestPattern: description: The pattern to subscribe to type: string unique: description: Indicate whether all or only unique values should be received type: boolean liveOnly: description: Indicate whether there should be a callback for data already stored on the broker (false) or only for live events (true) type: boolean aggregateEvents: description: Optionally aggregate events for the given number of milliseconds before sending them to the client to reduce network traffic type: integer format: u64 additionalProperties: false required: - transactionId - requestPattern - unique unsubscribe: description: A message sent by a client to request the cancellation of the subscription type: object properties: transactionId: description: The transaction ID of the subscription to be cancelled type: integer format: u64 additionalProperties: false required: - transactionId delete: description: A message sent by a client to request the deletion of the value of the provided key type: object properties: transactionId: description: A unique transaction ID type: integer format: u64 key: description: The key to subscribe to type: string additionalProperties: false required: - transactionId - key pDelete: description: A message sent by a client to request the deletion of the values of all keys matching the provided pattern type: object properties: transactionId: description: A unique transaction ID type: integer format: u64 requestPattern: description: The deletion pattern type: string quiet: description: If true, the server will not send the deleted values back to the client type: boolean additionalProperties: false required: - transactionId - requestPattern ls: description: A message sent by a client to list all direct sub-key segments of the provided partial key type: object properties: transactionId: description: A unique transaction ID type: integer format: u64 parent: description: The parent partial key for which to list sub-key segments type: - "null" - string additionalProperties: false required: - transactionId - parent subscribeLs: description: A message sent by a client to request a subscription to all direct sub-key segments of the provided partial key type: object properties: transactionId: description: A unique transaction ID type: integer format: u64 parent: description: The parent partial key for which to list sub-key segments type: - "null" - string additionalProperties: false required: - transactionId - parent pLs: description: A message sent by a client to list all direct sub-key segments of all partial keys matching the provided pattern type: object properties: transactionId: description: A unique transaction ID type: integer format: u64 parentPattern: description: A pattern describing the parent partial keys for which to list sub-key segments type: - "null" - string additionalProperties: false required: - transactionId - parentPattern # pSubscribeLs: # description: A message sent by a client to request a subscription to all direct sub-key segments of all partial keys matching the provided pattern # type: object # properties: # transactionId: # description: A unique transaction ID # type: integer # format: u64 # parentPattern: # description: A pattern describing the parent partial keys for which to list sub-key segments # type: # - "null" # - string # additionalProperties: false # required: # - transactionId # - parentPattern unsubscribeLs: description: A message sent by a client to request the cancellation of an ls subscription type: object properties: transactionId: description: The transaction ID of the ls subscription to be cancelled type: integer format: u64 additionalProperties: false required: - transactionId # transform: # description: A message sent by the client to set up a server-internal state transformer # type: object # properties: # transactionId: # description: A unique transaction ID # type: integer # format: u64 # key: # description: The key under which the transformed state will be stored # type: string # template: # description: A JSON object describing the structure of the transformed state. The template contains placeholder keys that will be replaced with the actual value of those keys # type: object # additionalProperties: false # required: # - transactionId additionalProperties: false oneOf: - required: - authorizationRequest - required: - get - required: - pGet - required: - set - required: - sPubInit - required: - sPub - required: - publish - required: - subscribe - required: - pSubscribe - required: - unsubscribe - required: - delete - required: - pDelete - required: - ls - required: - pLs - required: - subscribeLs # - required: # - pSubscribeLs - required: - unsubscribeLs # - required: # - transform components: schemas: ProtocolVersion: description: A protocol version with a major and minor version tag type: object properties: major: description: The protocol's major version tag type: integer format: u16 minor: description: The protocol's minor version tag type: integer format: u16 additionalProperties: false required: - major - minor KeyValuePair: description: A key/value pair where the key is always a string and the value can be anything type: object properties: key: description: The key type: string value: description: The value additionalProperties: false required: - key - value