Skip to main content

Variable: documentSchema

const documentSchema: object

Defined in: src/lib/document/schema.ts:142

JSON schema for a document file

Type Declaration​

@type​

readonly @type: "PaintCanvas/Document" = DOCUMENT_TYPE

$id​

readonly $id: string

$schema​

readonly $schema: "https://json-schema.org/draft/2020-12/schema" = SCHEMA_DIALECT

additionalProperties​

readonly additionalProperties: false = false

properties​

readonly properties: object

properties.@type​

readonly @type: object

properties.@type.const​

readonly const: "PaintCanvas/Document" = DOCUMENT_TYPE

properties.$schema​

readonly $schema: object = fileSchemaUrlSchema

properties.$schema.maxLength​

readonly maxLength: 2048 = MAX_URL_LENGTH

properties.$schema.minLength​

readonly minLength: 1 = 1

properties.$schema.type​

readonly type: "string" = "string"

properties.activeLayer​

readonly activeLayer: object

properties.activeLayer.maxLength​

readonly maxLength: 100 = 100

properties.activeLayer.minLength​

readonly minLength: 1 = 1

properties.activeLayer.type​

readonly type: "string" = "string"

properties.author​

readonly author: object

properties.author.items​

readonly items: object = authorDetailsSchema

properties.author.items.additionalProperties​

readonly additionalProperties: false = false

properties.author.items.properties​

readonly properties: object

properties.author.items.properties.did​

readonly did: object

properties.author.items.properties.did.maxLength​

readonly maxLength: 2048 = MAX_URL_LENGTH

properties.author.items.properties.did.pattern​

readonly pattern: "^did:[a-z]+:[a-zA-Z0-9._:%-]+$" = DID_PATTERN

properties.author.items.properties.did.type​

readonly type: "string" = "string"

properties.author.items.properties.email​

readonly email: object

properties.author.items.properties.email.maxLength​

readonly maxLength: 254 = 254

properties.author.items.properties.email.type​

readonly type: "string" = "string"

properties.author.items.properties.handle​

readonly handle: object = authorText

properties.author.items.properties.handle.maxLength​

readonly maxLength: 100 = MAX_AUTHOR_TEXT_LENGTH

properties.author.items.properties.handle.minLength​

readonly minLength: 1 = 1

properties.author.items.properties.handle.type​

readonly type: "string" = "string"

properties.author.items.properties.homepage​

readonly homepage: object

properties.author.items.properties.homepage.maxLength​

readonly maxLength: 2048 = MAX_URL_LENGTH

properties.author.items.properties.homepage.type​

readonly type: "string" = "string"

properties.author.items.properties.name​

readonly name: object = authorText

properties.author.items.properties.name.maxLength​

readonly maxLength: 100 = MAX_AUTHOR_TEXT_LENGTH

properties.author.items.properties.name.minLength​

readonly minLength: 1 = 1

properties.author.items.properties.name.type​

readonly type: "string" = "string"

properties.author.items.required​

readonly required: readonly ["name"]

properties.author.items.type​

readonly type: "object" = "object"

properties.author.maxItems​

readonly maxItems: 100 = MAX_DOCUMENT_AUTHORS

properties.author.type​

readonly type: "array" = "array"

properties.dateCreated​

readonly dateCreated: object = date

properties.dateCreated.pattern​

readonly pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$" = DATE_TIME_PATTERN

properties.dateCreated.type​

readonly type: "string" = "string"

properties.dateOpened​

readonly dateOpened: object = date

properties.dateOpened.pattern​

readonly pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$" = DATE_TIME_PATTERN

properties.dateOpened.type​

readonly type: "string" = "string"

properties.external​

readonly external: object

properties.external.items​

readonly items: object

properties.external.items.additionalProperties​

readonly additionalProperties: false = false

properties.external.items.properties​

readonly properties: object

properties.external.items.properties.content​

readonly content: object = image

properties.external.items.properties.content.maxLength​

readonly maxLength: number = MAX_DOCUMENT_IMAGE_LENGTH

properties.external.items.properties.content.pattern​

readonly pattern: "^data:image/png;base64,[A-Za-z0-9+/]*={0,2}$" = "^data:image/png;base64,[A-Za-z0-9+/]*={0,2}$"

properties.external.items.properties.content.type​

readonly type: "string" = "string"

properties.external.items.properties.source​

readonly source: object

properties.external.items.properties.source.maxLength​

readonly maxLength: 2048 = 2048

properties.external.items.properties.source.minLength​

readonly minLength: 1 = 1

properties.external.items.properties.source.type​

readonly type: "string" = "string"

properties.external.items.required​

readonly required: readonly ["source", "content"]

properties.external.items.type​

readonly type: "object" = "object"

properties.external.maxItems​

readonly maxItems: 100 = MAX_DOCUMENT_SHEETS

properties.external.type​

readonly type: "array" = "array"

properties.height​

readonly height: object = size

properties.height.maximum​

readonly maximum: 10000 = MAX_DOCUMENT_SIZE

properties.height.minimum​

readonly minimum: 1 = 1

properties.height.type​

readonly type: "integer" = "integer"

properties.id​

readonly id: object

properties.id.pattern​

readonly pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" = UUID_PATTERN

properties.id.type​

readonly type: "string" = "string"

properties.layers​

readonly layers: object

properties.layers.items​

readonly items: object

properties.layers.items.additionalProperties​

readonly additionalProperties: false = false

properties.layers.items.properties​

readonly properties: object

properties.layers.items.properties.alphaLock​

readonly alphaLock: object

properties.layers.items.properties.alphaLock.type​

readonly type: "boolean" = "boolean"

properties.layers.items.properties.blendingMode​

readonly blendingMode: object

properties.layers.items.properties.blendingMode.enum​

readonly enum: readonly ["source-over", "screen", "lighten", "multiply", "darken", "overlay"] = DOCUMENT_BLEND_MODES

properties.layers.items.properties.content​

readonly content: object = image

properties.layers.items.properties.content.maxLength​

readonly maxLength: number = MAX_DOCUMENT_IMAGE_LENGTH

properties.layers.items.properties.content.pattern​

readonly pattern: "^data:image/png;base64,[A-Za-z0-9+/]*={0,2}$" = "^data:image/png;base64,[A-Za-z0-9+/]*={0,2}$"

properties.layers.items.properties.content.type​

readonly type: "string" = "string"

properties.layers.items.properties.id​

readonly id: object

properties.layers.items.properties.id.maxLength​

readonly maxLength: 100 = 100

properties.layers.items.properties.id.minLength​

readonly minLength: 1 = 1

properties.layers.items.properties.id.type​

readonly type: "string" = "string"

properties.layers.items.properties.name​

readonly name: object

properties.layers.items.properties.name.maxLength​

readonly maxLength: 64 = 64

properties.layers.items.properties.name.minLength​

readonly minLength: 1 = 1

properties.layers.items.properties.name.pattern​

readonly pattern: "\\S" = "\\S"

properties.layers.items.properties.name.type​

readonly type: "string" = "string"

properties.layers.items.properties.opacity​

readonly opacity: object

properties.layers.items.properties.opacity.maximum​

readonly maximum: 1 = 1

properties.layers.items.properties.opacity.minimum​

readonly minimum: 0 = 0

properties.layers.items.properties.opacity.type​

readonly type: "number" = "number"

properties.layers.items.properties.visible​

readonly visible: object

properties.layers.items.properties.visible.type​

readonly type: "boolean" = "boolean"

properties.layers.items.required​

readonly required: readonly ["id", "name", "visible", "opacity", "blendingMode", "alphaLock", "content"]

properties.layers.items.type​

readonly type: "object" = "object"

properties.layers.maxItems​

readonly maxItems: 100 = MAX_DOCUMENT_LAYERS

properties.layers.minItems​

readonly minItems: 1 = 1

properties.layers.type​

readonly type: "array" = "array"

properties.name​

name: object

properties.name.maxLength​

readonly maxLength: 100 = MAX_DOCUMENT_NAME_LENGTH

properties.name.minLength​

readonly minLength: 1 = 1

properties.name.pattern​

readonly pattern: "\\S" = "\\S"

properties.name.type​

readonly type: "string" = "string"

properties.thumbnail​

readonly thumbnail: object

properties.thumbnail.additionalProperties​

readonly additionalProperties: false = false

properties.thumbnail.properties​

readonly properties: object

properties.thumbnail.properties.content​

readonly content: object = image

properties.thumbnail.properties.content.maxLength​

readonly maxLength: number = MAX_DOCUMENT_IMAGE_LENGTH

properties.thumbnail.properties.content.pattern​

readonly pattern: "^data:image/png;base64,[A-Za-z0-9+/]*={0,2}$" = "^data:image/png;base64,[A-Za-z0-9+/]*={0,2}$"

properties.thumbnail.properties.content.type​

readonly type: "string" = "string"

properties.thumbnail.properties.height​

readonly height: object

properties.thumbnail.properties.height.maximum​

readonly maximum: 200 = THUMBNAIL_SIZE

properties.thumbnail.properties.height.minimum​

readonly minimum: 1 = 1

properties.thumbnail.properties.height.type​

readonly type: "integer" = "integer"

properties.thumbnail.properties.width​

readonly width: object

properties.thumbnail.properties.width.maximum​

readonly maximum: 200 = THUMBNAIL_SIZE

properties.thumbnail.properties.width.minimum​

readonly minimum: 1 = 1

properties.thumbnail.properties.width.type​

readonly type: "integer" = "integer"

properties.thumbnail.required​

readonly required: readonly ["width", "height", "content"]

properties.thumbnail.type​

readonly type: "object" = "object"

properties.updatedAt​

readonly updatedAt: object = date

properties.updatedAt.pattern​

readonly pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$" = DATE_TIME_PATTERN

properties.updatedAt.type​

readonly type: "string" = "string"

properties.width​

readonly width: object = size

properties.width.maximum​

readonly maximum: 10000 = MAX_DOCUMENT_SIZE

properties.width.minimum​

readonly minimum: 1 = 1

properties.width.type​

readonly type: "integer" = "integer"

required​

readonly required: readonly ["$schema", "@type", "id", "name", "author", "dateCreated", "dateOpened", "width", "height", "layers", "activeLayer", "external"]

type​

readonly type: "object" = "object"