ApiSchemasVariables
Variable: file
const file: object & Typed<{
alt?: string;
blob?: {
hash: string;
key?: string;
mime: string;
name?: string;
salt?: string;
size: number;
};
captions?: {
hash: string;
key?: string;
mime: string;
name?: string;
salt?: string;
size: number;
};
duration?: number;
height?: number;
mime: string;
name: string;
place?: {
address?: {
country?: string;
locality?: string;
postcode?: string;
region?: string;
street?: string;
};
cells?: readonly string[];
lat?: number;
lon?: number;
name?: string;
};
size?: number;
takenAt?: string;
thumbnail?: {
hash: string;
key?: string;
mime: string;
name?: string;
salt?: string;
size: number;
};
url?: string;
width?: number;
}>;Defined in: packages/core/src/schemas/library/media.ts:72
A file kept in the space, or one kept elsewhere at url: the one record for
every file, whatever app shares it. A photo, a video or a song's audio is a
file with the fields that suit it. about is the record it was shared on or
attached to, like a message or a task; a file shared on its own has none.
Groups of files (folders, albums, categories) are std.lists with an item
about each file, so one file can be in many.
Type Declaration
description
readonly description: "Any file people share: a document, photo, video or recording, on its own or attached to a record (about). The only collection for files: a photo or video is a std.file too. For a folder, album or category of files, use std.list with a std.list-item about each file." = 'Any file people share: a document, photo, video or recording, on its own or attached to a record (about). The only collection for files: a photo or video is a std.file too. For a folder, album or category of files, use std.list with a std.list-item about each file.';links
readonly links: object;links.about
readonly about: LinkDeclaration;name
readonly name: "std.file" = 'std.file';schema
readonly schema: object;schema.properties
readonly properties: object;schema.properties.alt
readonly alt: object;schema.properties.alt.maxLength
maxLength: number = max;schema.properties.alt.minLength?
minLength?: number = min;schema.properties.alt.type
type: "string";schema.properties.blob
readonly blob: object & object;Type Declaration
properties
properties: object;properties.hash
hash: object;properties.hash.maxLength
maxLength: number = 64;properties.hash.minLength
minLength: number = 64;properties.hash.type
type: "string";properties.key
key: object;properties.key.maxLength
maxLength: number = 22;properties.key.minLength
minLength: number = 22;properties.key.type
type: "string";properties.mime
mime: object;properties.mime.maxLength
maxLength: number = max;properties.mime.minLength?
minLength?: number = min;properties.mime.type
type: "string";properties.name
name: object;properties.name.maxLength
maxLength: number = max;properties.name.minLength?
minLength?: number = min;properties.name.type
type: "string";properties.salt
salt: object;properties.salt.maxLength
maxLength: number = 22;properties.salt.minLength
minLength: number = 22;properties.salt.type
type: "string";properties.size
size: object;properties.size.minimum
minimum: number = 0;properties.size.type
type: "integer";required
required: readonly ["hash", "size", "mime"];type
type: "object";x-kind
readonly "x-kind": "file";schema.properties.captions
readonly captions: object & object;Type Declaration
properties
properties: object;properties.hash
hash: object;properties.hash.maxLength
maxLength: number = 64;properties.hash.minLength
minLength: number = 64;properties.hash.type
type: "string";properties.key
key: object;properties.key.maxLength
maxLength: number = 22;properties.key.minLength
minLength: number = 22;properties.key.type
type: "string";properties.mime
mime: object;properties.mime.maxLength
maxLength: number = max;properties.mime.minLength?
minLength?: number = min;properties.mime.type
type: "string";properties.name
name: object;properties.name.maxLength
maxLength: number = max;properties.name.minLength?
minLength?: number = min;properties.name.type
type: "string";properties.salt
salt: object;properties.salt.maxLength
maxLength: number = 22;properties.salt.minLength
minLength: number = 22;properties.salt.type
type: "string";properties.size
size: object;properties.size.minimum
minimum: number = 0;properties.size.type
type: "integer";required
required: readonly ["hash", "size", "mime"];type
type: "object";x-kind
readonly "x-kind": "file";schema.properties.duration
readonly duration: object;schema.properties.duration.description
readonly description: "Seconds, for a video or a sound" = 'Seconds, for a video or a sound';schema.properties.duration.minimum
readonly minimum: 0 = 0;schema.properties.duration.type
readonly type: "number" = 'number';schema.properties.height
readonly height: object;schema.properties.height.maximum?
maximum?: number = max;schema.properties.height.minimum
minimum: number = min;schema.properties.height.type
type: "integer";schema.properties.mime
readonly mime: object;schema.properties.mime.maxLength
readonly maxLength: 255 = 255;schema.properties.mime.minLength
readonly minLength: 1 = 1;schema.properties.mime.type
readonly type: "string" = 'string';schema.properties.name
readonly name: object;schema.properties.name.maxLength
maxLength: number = max;schema.properties.name.minLength?
minLength?: number = min;schema.properties.name.type
type: "string";schema.properties.place
readonly place: object;schema.properties.place.properties
properties: object;schema.properties.place.properties.address
address: object;schema.properties.place.properties.address.properties
properties: object;schema.properties.place.properties.address.properties.country
country: object;schema.properties.place.properties.address.properties.country.maxLength
maxLength: number = max;schema.properties.place.properties.address.properties.country.minLength?
minLength?: number = min;schema.properties.place.properties.address.properties.country.type
type: "string";schema.properties.place.properties.address.properties.locality
locality: object;schema.properties.place.properties.address.properties.locality.maxLength
maxLength: number = max;schema.properties.place.properties.address.properties.locality.minLength?
minLength?: number = min;schema.properties.place.properties.address.properties.locality.type
type: "string";schema.properties.place.properties.address.properties.postcode
postcode: object;schema.properties.place.properties.address.properties.postcode.maxLength
maxLength: number = max;schema.properties.place.properties.address.properties.postcode.minLength?
minLength?: number = min;schema.properties.place.properties.address.properties.postcode.type
type: "string";schema.properties.place.properties.address.properties.region
region: object;schema.properties.place.properties.address.properties.region.maxLength
maxLength: number = max;schema.properties.place.properties.address.properties.region.minLength?
minLength?: number = min;schema.properties.place.properties.address.properties.region.type
type: "string";schema.properties.place.properties.address.properties.street
street: object;schema.properties.place.properties.address.properties.street.maxLength
maxLength: number = max;schema.properties.place.properties.address.properties.street.minLength?
minLength?: number = min;schema.properties.place.properties.address.properties.street.type
type: "string";schema.properties.place.properties.address.type
type: "object";schema.properties.place.properties.cells
cells: object;schema.properties.place.properties.cells.description
description: string = 'The geohash cells lat and lon are in, coarsest first: precisions 3, 4, 5 and 6';schema.properties.place.properties.cells.items
items: object;schema.properties.place.properties.cells.items.maxLength
maxLength: number = max;schema.properties.place.properties.cells.items.minLength?
minLength?: number = min;schema.properties.place.properties.cells.items.type
type: "string";schema.properties.place.properties.cells.maxItems
maxItems: number = 8;schema.properties.place.properties.cells.type
type: "array";schema.properties.place.properties.lat
lat: object;schema.properties.place.properties.lat.maximum
maximum: number = 90;schema.properties.place.properties.lat.minimum
minimum: number = -90;schema.properties.place.properties.lat.type
type: "number";schema.properties.place.properties.lon
lon: object;schema.properties.place.properties.lon.maximum
maximum: number = 180;schema.properties.place.properties.lon.minimum
minimum: number = -180;schema.properties.place.properties.lon.type
type: "number";schema.properties.place.properties.name
name: object;schema.properties.place.properties.name.maxLength
maxLength: number = max;schema.properties.place.properties.name.minLength?
minLength?: number = min;schema.properties.place.properties.name.type
type: "string";schema.properties.place.type
type: "object";schema.properties.size
readonly size: object;schema.properties.size.maximum?
maximum?: number = max;schema.properties.size.minimum
minimum: number = min;schema.properties.size.type
type: "integer";schema.properties.takenAt
readonly takenAt: object & object;Type Declaration
maxLength
maxLength: number = max;minLength?
minLength?: number = min;type
type: "string";x-kind
readonly "x-kind": "when";schema.properties.thumbnail
readonly thumbnail: object & object;Type Declaration
properties
properties: object;properties.hash
hash: object;properties.hash.maxLength
maxLength: number = 64;properties.hash.minLength
minLength: number = 64;properties.hash.type
type: "string";properties.key
key: object;properties.key.maxLength
maxLength: number = 22;properties.key.minLength
minLength: number = 22;properties.key.type
type: "string";properties.mime
mime: object;properties.mime.maxLength
maxLength: number = max;properties.mime.minLength?
minLength?: number = min;properties.mime.type
type: "string";properties.name
name: object;properties.name.maxLength
maxLength: number = max;properties.name.minLength?
minLength?: number = min;properties.name.type
type: "string";properties.salt
salt: object;properties.salt.maxLength
maxLength: number = 22;properties.salt.minLength
minLength: number = 22;properties.salt.type
type: "string";properties.size
size: object;properties.size.minimum
minimum: number = 0;properties.size.type
type: "integer";required
required: readonly ["hash", "size", "mime"];type
type: "object";x-kind
readonly "x-kind": "file";schema.properties.url
readonly url: object & object;Type Declaration
maxLength
maxLength: number = max;minLength?
minLength?: number = min;type
type: "string";x-kind
readonly "x-kind": "url";schema.properties.width
readonly width: object;schema.properties.width.maximum?
maximum?: number = max;schema.properties.width.minimum
minimum: number = min;schema.properties.width.type
type: "integer";schema.required
readonly required: readonly ["name", "mime"];schema.type
readonly type: "object" = 'object';title
readonly title: "File" = 'File';