Database schema

Edit diagram:

  1. Visit https://azimutt.app/new

  2. Import project (using the JSON provided below👇)


 

Object schemas

Journal object

{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://example.com/table-journal.schema.json", "title": "Table record journal", "description": "Auditable journal of record changes", "type": "array", "items": { "type": "object", "properties": { "at": { "type": "string", "format": "date-time", "description": "ISO 8601 formatted date-time string designating when a change event of the journaled object took place." }, "by": { "not": { "type": ["object", "boolean"] }, "description": "Name of the authorized person or system making the change event." }, "action": { "type": "string", "enum": ["CREATED", "MODIFIED"], "description": "Value designating which action, either creation of a new or modification of an existing record was undertaken." } }, "required": ["at", "by", "action"] }, "minItems": 1 }

Rooms configuration object

{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://example.com/rooms-configuration.schema.json", "title": "Room configuration", "description": "Configuration settings of a room", "type": "object", "properties": { "messageExpiration": { "type": ["integer", "null"], "description": "Duration in milliseconds after which messages should expire. If set to 'null', messages never expire." }, "deliveryDelay": { "type": "integer", "minimum": 1, "description": "Duration in milliseconds for delay between message delivery attempts for PUSH configuration. Can be overridden by subscriptions." }, "deliveryDelayMultiplier": { "type": "number", "minimum": 1.01 "description": "Multiplier by which delivery delay is increased exponentially between delivery attempts for PUSH configuration. Always rounded up with millisecond accuracy. Can be overridden by subscriptions." }, "deliveryAttempts": { "type": "integer", "minimum": 1, "description": "Maximum number of delivery attempts for a message in PUSH configuration. Can be overridden by subscriptions." } }, "required": ["messageExpiration", "deliveryDelay", "deliveryDelayMultiplier", "deliveryAttempts"] }

Subscription parameters object

{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://example.com/create-member-subscription-request-schema.json", "title": "Create XRoad subscription request", "description": "Data for creating a XRoad subscription", "type": "object", "properties": { "eventType": { "type": "string", "description": "Identifies event type" }, "method": { "type": "string", "enum": ["PUSH", "PULL"], "description": "Identifies subscription type as either being PULL or PUSH" }, "pushUrl": { "type": "string", "description": "Path to the listening endpoint in the subsystem for the callback to push messages. NOT the full path. Required for PUSH configuration, ignored for PULL." }, "deliveryDelay": { "type": "integer", "minimum": 1, "description": "Duration in milliseconds for delay between message delivery attempts. Optional and will override room default value in PUSH configuration, ignored for PULL." }, "deliveryDelayMultiplier": { "type": "number", "minimum": 1.01, "description": "Multiplier by which delivery delay is increased exponentially between delivery attempts. Optional and will override room default value in PUSH configuration, ignored for PULL." }, "deliveryAttempts": { "type": "integer", "minimum": 0, "description": "Maximum number of delivery attempts. Optional and will override room default value in PUSH configuration, ignored for PULL." } }, "required": ["eventType", "method"], "dependencies": { "method": { "oneOf": [ { "properties": { "method": { "enum": ["PUSH"] }, "pushUrl": { "type": "string" } }, "required": ["pushUrl"] }, { "properties": { "method": { "enum": ["PULL"] } } } ] } } }

Event type version JSON schema object

When defining the schema for the event type, it is mandatory that the schema is encapsulated within a field named "content".

The "content" field should be of type object. This encapsulation ensures a consistent structure for event processing. Any deviation from this structure, such as using a different type for the "content" field, will result in schema validation failure, and creation of the event type will fail.

Here is a snippet demonstrating the correct structure:

Ensure that the event-specific properties and requirements are accurately defined within the "content" field, adhering to the JSON schema standards.