diff --git a/package.json b/package.json index 735e71093ff8dfdb318615f2e2a67d3106296664..45538e348353f383a6b56f787115ee40ae787c41 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "@epoc/epoc-specs", - "version": "2.0.0-beta-2", + "version": "2.0.0-beta-3", "description": "ePoc (Electronic Pocket Open Course) types specifications", "main": "dist/index.ts", "types": "dist/index.d.ts", "scripts": { - "publish": "tsc && npm publish --access=public" + "p": "tsc && npm publish --access=public" }, "repository": { "type": "git", diff --git a/src/v1/content.ts b/src/v1/content.ts index e64415b2abda9b39d675788d37d2308f5bb9e2c8..f026d0fd474ea8a1d5299e331bdbc8defe31e3eb 100644 --- a/src/v1/content.ts +++ b/src/v1/content.ts @@ -1,7 +1,7 @@ import {html, uid} from './types'; export interface Content { - type: 'html' | 'assessment' | 'video' | 'simple-question' | 'choice'; + type: string; title: string; subtitle?: string; conditional?: boolean; @@ -9,6 +9,7 @@ export interface Content { } export interface Video extends Content { + type: 'video' source: string; summary: html; subtitles: {label: string, lang: string, src: string}[]; @@ -17,16 +18,19 @@ export interface Video extends Content { } export interface Html extends Content { + type: 'html' html: html; } export interface Assessment extends Content { + type: 'assessment' summary?: string; questions?: uid[]; time?: number; } export interface SimpleQuestion extends Content { + type: 'simple-question' question: uid; }