@openframe-org/criteria-set-protocol
v2.0.14
Published
A protocol and tools for defining and working with criteria sets
Downloads
2,923
Readme
Criteria Set Protocol
TypeScript library
This is a TypeScript library with types and implementations of the Criteria Set Protocol. It is published
publicly on npmjs as @openframe-org/criteria-set-protocol
.
Installation
npm install --save @openframe-org/criteria-set-protocol
Contents
The library contains a service to work with protocol versions, and an interface to interact with this service.
Protocol v1
The library contains the types defined in the protocol v1 specification, and a service that implements this specification.
Types
| Type | Remarks |
| -------------------------- | --------------------------------------------------- |
| Metadata types | |
| Metadata
| |
| Theme
| |
| ThemeStyle
| |
| Color
| |
| Task tree types | |
| CriteriaTree
| |
| Theme
| |
| Criterion
| |
| TaskGroup
| |
| Task
| |
| TaskItem
| |
| TaskItem value types | |
| SelectSingleType
| |
| SelectMultipleType
| |
| NumberType
| |
| BooleanType
| |
| PointOption
| Used by SelectSingleType
and SelectMultipleType
|
| TaskItemValue
| The raw value of a TaskItem, which can be an array |
| TaskItemScalarValue
| The raw value of a TaskItem |
| Express types | |
| MetadataResponse
| Metadata endpoint response body |
| TreeAndMatrixRequestBody
| Request body for the matrix streaming endpoints |
| StreamMatrixResponse
| Matrix streaming endpoints response body |
Schemas
Validation schemas are provided for validating the endpoints of the protocol v1 specification.
| Schema | Remarks |
| -------------------------- | ---------------------------------------------------------------- |
| TreeAndMatrixBodySchema
| Validates the request body for the tree and matrix endpoints |
| criteriaSetIdParamSchema
| Validates the criteriaSetId parameter for endpoints which use it |
| versionParamSchema
| Validates the version parameter for endpoints which use it |
Services
The IProtocolV1Service
interface defines a service which implements the v1 protocol.