UNPKG

kolibri-constants

Version:

A package that exposes constants commonly used across the Kolibri Ecosystem

112 lines (109 loc) 2.87 kB
// -*- 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": { "id": { "type": "string", "description": "The ID of the topic content node on Studio" }, "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/id" }, "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/id" }, "title": { "$ref": "#/definitions/title" }, "description": { "$ref": "#/definitions/description" }, "language": { "$ref": "#/definitions/language" }, "ancestors": { "$ref": "#/definitions/ancestors" } }, "required": [ "id", "title", "description" ] } }, "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"] };