kolibri-constants
Version:
A package that exposes constants commonly used across the Kolibri Ecosystem
121 lines (118 loc) • 3.3 kB
JavaScript
// -*- coding: utf-8 -*-
// Generated by scripts/generate_from_specs.py
// EmbedTopicsRequest
export const SCHEMA = {
"$id": "/schemas/embed_topics_request",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "Schema for embed topics requests received by RayServe",
"additionalProperties": false,
"definitions": {
"uuid": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
"description": "A unique identifier in the form of a UUID"
},
"title": {
"type": "string",
"description": "The title of the topic"
},
"description": {
"type": "string",
"description": "The description of the topic"
},
"language": {
"type": "string",
"description": "Language code from https://github.com/learningequality/le-utils/blob/main/le_utils/resources/languagelookup.json",
"pattern": "^[a-z]{2,3}(?:-[a-zA-Z]+)*$"
},
"level": {
"type": "integer",
"description": "The level of the ancestor, where the root is 0 and the parent is the highest level"
},
"ancestor": {
"type": "object",
"description": "An ancestor in the tree structure",
"additionalProperties": false,
"properties": {
"id": {
"$ref": "#/definitions/uuid",
"description": "The ID of the topic content node on Studio"
},
"title": {
"$ref": "#/definitions/title"
},
"description": {
"$ref": "#/definitions/description"
},
"language": {
"$ref": "#/definitions/language"
},
"level": {
"$ref": "#/definitions/level"
}
},
"required": [
"id",
"title",
"description",
"level"
]
},
"ancestors": {
"type": "array",
"description": "The ancestors of the topic. Please see 'level' in the ancestor schema for more information",
"items": {
"$ref": "#/definitions/ancestor"
}
},
"topic": {
"type": "object",
"description": "A topic in the tree structure",
"additionalProperties": false,
"properties": {
"id": {
"$ref": "#/definitions/uuid",
"description": "The ID of the topic content node on Studio"
},
"channel_id": {
"$ref": "#/definitions/uuid",
"description": "The UUID of the channel that the topic belongs to"
},
"title": {
"$ref": "#/definitions/title"
},
"description": {
"$ref": "#/definitions/description"
},
"language": {
"$ref": "#/definitions/language"
},
"ancestors": {
"$ref": "#/definitions/ancestors"
}
},
"required": [
"id",
"channel_id",
"title",
"description",
"language"
]
}
},
"properties": {
"topics": {
"type": "array",
"description": "A list of topics to embed",
"items": {
"$ref": "#/definitions/topic"
}
},
"metadata": {
"type": "object",
"description": "The metadata of the channel for logging purposes"
}
},
"required": ["topics"]
};