OpenreSessionEndResult openre.session-end-result@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- openre
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/openre/session-end-result.v1.json
openre.session-end-result@1: the answer of POST /api/v1/sessions/:id/end on OpenRe.Stream (openre.session.end): 202 { requested: true, state } when the owning worker was asked to disconnect the encoder, 409 { requested: false, state } when the session could not be ended (already ending or over).
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
requested | boolean | yes | ||
state | string | yes |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: requested
{
"requested": true,
"state": "live"
}Rejected: partial
{
"requested": "yes"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('openre.session-end-result@1', value); // { valid, errors: [{ path, message }] }