import {JSONSchema7} from 'json-schema'; /** * This schema defines a card collection template for rendering cards in a list * style format. It provides an optional add button and configurable sections. */ export default { $id: 'https://schemas.coastapp.com/card/v2/list.json', $schema: 'http://json-schema.org/draft-07/schema', title: 'Card Collection List Template V2', type: 'object', additionalProperties: false, properties: { version: {type: 'string', enum: ['v2']}, slug: {type: 'string'}, title: {type: 'string', default: '{channel.name}'}, context: {type: 'string', enum: ['list']}, statuses: { type: 'array', items: {$ref: 'https://schemas.coastapp.com/card/v1/cardStatus.json'}, }, emptyState: {$ref: 'https://schemas.coastapp.com/card/v1/emptyState.json'}, cardBlocks: {$ref: 'https://schemas.coastapp.com/card/v1/blocks.json'}, sortBy: { type: 'array', items: {$ref: 'https://schemas.coastapp.com/card/v1/sortBy.json'}, }, selector: { $ref: 'https://schemas.coastapp.com/card/v1/selector.json', }, groupBy: {$ref: 'https://schemas.coastapp.com/card/v1/groupBy.json'}, quickCreate: {$ref: 'https://schemas.coastapp.com/card/v1/quickCreate.json'}, taskOptions: {$ref: '#/definitions/taskOptions'}, }, required: ['version', 'cardBlocks', 'context', 'title'], definitions: { taskOptions: { title: 'Task List Options V2', type: 'object', additionalProperties: false, properties: { tagName: {type: 'string'}, completedTagSlug: {type: 'string'}, openTagSlug: {type: 'string'}, }, required: ['tagName', 'completedTagSlug', 'openTagSlug'], }, }, } as JSONSchema7;