minca
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.';
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';

On this page

Type Declarationdescriptionlinkslinks.aboutnameschemaschema.propertiesschema.properties.altschema.properties.alt.maxLengthschema.properties.alt.minLength?schema.properties.alt.typeschema.properties.blobType Declarationpropertiesproperties.hashproperties.hash.maxLengthproperties.hash.minLengthproperties.hash.typeproperties.keyproperties.key.maxLengthproperties.key.minLengthproperties.key.typeproperties.mimeproperties.mime.maxLengthproperties.mime.minLength?properties.mime.typeproperties.nameproperties.name.maxLengthproperties.name.minLength?properties.name.typeproperties.saltproperties.salt.maxLengthproperties.salt.minLengthproperties.salt.typeproperties.sizeproperties.size.minimumproperties.size.typerequiredtypex-kindschema.properties.captionsType Declarationpropertiesproperties.hashproperties.hash.maxLengthproperties.hash.minLengthproperties.hash.typeproperties.keyproperties.key.maxLengthproperties.key.minLengthproperties.key.typeproperties.mimeproperties.mime.maxLengthproperties.mime.minLength?properties.mime.typeproperties.nameproperties.name.maxLengthproperties.name.minLength?properties.name.typeproperties.saltproperties.salt.maxLengthproperties.salt.minLengthproperties.salt.typeproperties.sizeproperties.size.minimumproperties.size.typerequiredtypex-kindschema.properties.durationschema.properties.duration.descriptionschema.properties.duration.minimumschema.properties.duration.typeschema.properties.heightschema.properties.height.maximum?schema.properties.height.minimumschema.properties.height.typeschema.properties.mimeschema.properties.mime.maxLengthschema.properties.mime.minLengthschema.properties.mime.typeschema.properties.nameschema.properties.name.maxLengthschema.properties.name.minLength?schema.properties.name.typeschema.properties.placeschema.properties.place.propertiesschema.properties.place.properties.addressschema.properties.place.properties.address.propertiesschema.properties.place.properties.address.properties.countryschema.properties.place.properties.address.properties.country.maxLengthschema.properties.place.properties.address.properties.country.minLength?schema.properties.place.properties.address.properties.country.typeschema.properties.place.properties.address.properties.localityschema.properties.place.properties.address.properties.locality.maxLengthschema.properties.place.properties.address.properties.locality.minLength?schema.properties.place.properties.address.properties.locality.typeschema.properties.place.properties.address.properties.postcodeschema.properties.place.properties.address.properties.postcode.maxLengthschema.properties.place.properties.address.properties.postcode.minLength?schema.properties.place.properties.address.properties.postcode.typeschema.properties.place.properties.address.properties.regionschema.properties.place.properties.address.properties.region.maxLengthschema.properties.place.properties.address.properties.region.minLength?schema.properties.place.properties.address.properties.region.typeschema.properties.place.properties.address.properties.streetschema.properties.place.properties.address.properties.street.maxLengthschema.properties.place.properties.address.properties.street.minLength?schema.properties.place.properties.address.properties.street.typeschema.properties.place.properties.address.typeschema.properties.place.properties.cellsschema.properties.place.properties.cells.descriptionschema.properties.place.properties.cells.itemsschema.properties.place.properties.cells.items.maxLengthschema.properties.place.properties.cells.items.minLength?schema.properties.place.properties.cells.items.typeschema.properties.place.properties.cells.maxItemsschema.properties.place.properties.cells.typeschema.properties.place.properties.latschema.properties.place.properties.lat.maximumschema.properties.place.properties.lat.minimumschema.properties.place.properties.lat.typeschema.properties.place.properties.lonschema.properties.place.properties.lon.maximumschema.properties.place.properties.lon.minimumschema.properties.place.properties.lon.typeschema.properties.place.properties.nameschema.properties.place.properties.name.maxLengthschema.properties.place.properties.name.minLength?schema.properties.place.properties.name.typeschema.properties.place.typeschema.properties.sizeschema.properties.size.maximum?schema.properties.size.minimumschema.properties.size.typeschema.properties.takenAtType DeclarationmaxLengthminLength?typex-kindschema.properties.thumbnailType Declarationpropertiesproperties.hashproperties.hash.maxLengthproperties.hash.minLengthproperties.hash.typeproperties.keyproperties.key.maxLengthproperties.key.minLengthproperties.key.typeproperties.mimeproperties.mime.maxLengthproperties.mime.minLength?properties.mime.typeproperties.nameproperties.name.maxLengthproperties.name.minLength?properties.name.typeproperties.saltproperties.salt.maxLengthproperties.salt.minLengthproperties.salt.typeproperties.sizeproperties.size.minimumproperties.size.typerequiredtypex-kindschema.properties.urlType DeclarationmaxLengthminLength?typex-kindschema.properties.widthschema.properties.width.maximum?schema.properties.width.minimumschema.properties.width.typeschema.requiredschema.typetitle