DataPlugin.

Classes

DataPlugableClass

Extends PlugableClass.

new DataPlugableClass(): DataPlugableClass

Returns DataPlugableClass. Inherited from PlugableClass.constructor.

PropertyType
delete(args: DeleteQuery, opts: JobOptions) => Promise<DataOrError<Identified[]>>
functionsFunctionRecord
insert<ARGS>(args: ARGS, opts: JobOptions) => Promise<DataOrError<RowTypeFromTable<ARGS>>>
optionsStringRecord
request<ARGS>(args: ARGS, opts: JobOptions) => Promise<DataOrError<ResourceInsertResponse>>
select<ARGS>(args: ARGS, opts: JobOptions) => Promise<DataOrError<RowTypeFromTable<ARGS>[]>>
update<ARGS>(args: ARGS, opts: JobOptions) => Promise<DataOrError<RowTypeFromTable<ARGS>>>

Methods

install(definition, …ids): void | Errored

ParameterTypeDescription
definitionstring | Function | StringTuple
idsstring[]

Returns void | Errored. Inherited from PlugableClass.install.

toString(): string

Returns string. Inherited from PlugableClass.toString.

Interfaces

AssociationQuery

Extends TableDescription.IdsQuery.

PropertyTypeDescription
column?OrArray<string>columns to select, defaults to ’*‘
idColumn?stringcolumn that ids are in
idsOrArray<string>ids to search for within idColumn
range?number[]-
sort?SearchSortOptions[]-
tablestringtable to search in
users?OrArray<string>ids to search for within user_id column

ContentRow

Extends Labeled.Typed.Sourced.DataRow. Extended by MediaRow and ResourceRow.

PropertyType
created_atundefined | string
idstring
label?string
project_id?string
sourcestring
typestring
updated_at?string
user_idundefined | string

Data<T>

Extended by StringData.

Type ParameterDefault type
T extends PrimitivePrimitive
PropertyType
dataT
error?undefined

DataGetOptions

PropertyType
id?string
progress?ServerProgress

DataListArgs

Extends AssetParams. Extended by DataListOptions.

PropertyType
descending?boolean
order?string
partial?boolean
sources?OrArray<string>
terms?OrArray<string>
types?OrArray<MediaType>

DataListOptions

Extends DataListArgs.

PropertyType
descending?boolean
order?string
partial?boolean
progress?ServerProgress
sources?OrArray<string>
terms?OrArray<string>
types?OrArray<MediaType>

DataPutOptions

PropertyType
assetMedia
progress?ServerProgress

DataRow

Extends Identified.Partial<Record<CoreColumn, string>>. Extended by ContentRow.

Indexable

[key: string]: Value | undefined

PropertyType
created_atundefined | string
idstring
user_idundefined | string

DeleteQuery

Extends Tabled.IdsQuery.

PropertyTypeDescription
idColumn?stringcolumn that ids are in
idsOrArray<string>ids to search for within idColumn
tablestringtable to search in
user_idstringowner of rows

IdQuery

Extends Tabled.Identified.

PropertyTypeDescription
column?OrArray<string>columns to select, defaults to ’*‘
idstring-
includeShared?booleanwhen true, returned row can include shared
tablestringtable to search in

IdsQuery

Extended by AssociationQuery and DeleteQuery.

PropertyTypeDescription
idColumn?stringcolumn that ids are in
idsOrArray<string>ids to search for within idColumn

InsertQuery

Extends Tabled.

PropertyTypeDescription
tablestringtable to search in
valuesPartial<ValueRecord>record with columns for keys and unescaped values

MashMediaRow

PropertyType
created_atstring
idstring
mash_media_idstring
media_idstring
user_idstring

MediaRow

Extends ContentRow.Partial<Record<MediaColumn, string>>.

PropertyType
created_atundefined | string
idstring
label?string
project_id?string
restundefined | string
sourcestring
typestring
updated_at?string
user_idundefined | string

NormalizedSearchRequest

PropertyType
columnstring[]
rangenumber[]
sortSearchSortOptions[]
sourcestring[]
termstring[]
typestring[]

RequestQuery

Extends Tabled.

PropertyTypeDescription
idstringid to retrieve requests for
tablestringtable to search in

ResourceData

Extends ResourceObject.

PropertyType
bytes?number
createdAt?string
decoded?UnknownRecord
idstring
label?string
projectId?string
requestEndpointObject
sourcestring
typeResourceType
updatedAt?string
uploadedAt?string

ResourceRow

Extends ContentRow.Partial<Record<ResourceColumn, string>>.

PropertyType
bytesundefined | string
created_atundefined | string
endpointundefined | string
idstring
label?string
project_id?string
restundefined | string
sourcestring
typestring
updated_at?string
uploaded_atundefined | string
user_idundefined | string

ResourceSearchExtendedResponse

PropertyType
caching?Caching
dataStoredResource[]

ResourceSearchRequest

Extends SearchRequest.

PropertyType
column?OrArray<string>
range?OrArray<number>
sort?OrArray<SearchSort>
source?OrArray<string>
term?OrArray<string>
type?OrArray<MediaType>

SearchRequest

Extended by MediaSearchRequest and ResourceSearchRequest.

PropertyType
column?OrArray<string>
range?OrArray<number>
sort?OrArray<SearchSort>
source?OrArray<string>
term?OrArray<string>
type?OrArray<MediaType>

SearchSortOptions

PropertyType
descending?boolean
propertystring

SelectQuery

Extends TableDescription.

PropertyTypeDescription
column?OrArray<string>columns to select, defaults to ’*‘
includeShared?booleanwhen true, returned data includes shared rows
queryRecord<string, OrArray<string>>record with columns for keys and unescaped values
range?number[]-
sort?SearchSortOptions[]-
tablestringtable to search in

StringData

Extends Data<string>.

PropertyType
datastring
error?undefined

TableDescription

Extends Tabled. Extended by SelectQuery and AssociationQuery.

PropertyTypeDescription
column?OrArray<string>columns to select, defaults to ’*‘
range?number[]-
sort?SearchSortOptions[]-
tablestringtable to search in

Tabled

Extended by TableDescription, IdQuery, DeleteQuery, RequestQuery, InsertQuery, and UpdateQuery.

PropertyTypeDescription
tablestringtable to search in

UpdateQuery

Extends Tabled.

PropertyTypeDescription
tablestringtable to search in
valuesPartial<ValueRecord>record with columns for keys and unescaped values

VideoData

Extends StoredMedia.VideoProperties.

PropertyType
createdAt?string
idstring
label?string
projectId?string
resources?StoredResource[]
sourcestring
typeMediaType
updatedAt?string

Type Aliases

CoreColumn

CoreColumn: "created_at" | "user_id"

DataOrError<T>

DataOrError<T>: Data<T> | Errored

Type ParameterDefault type
T extends PrimitivePrimitive

DataType

DataType: string | ScalarType

MediaColumn

MediaColumn: "rest"

ResourceColumn

ResourceColumn: "bytes" | "endpoint" | "uploaded_at" | "rest"

ResourceSearchResponse

ResourceSearchResponse: StoredResource[] | ResourceSearchExtendedResponse

RowTypeFromTable<T>

RowTypeFromTable<T>: T["table"] extends _media ? MediaRow : T["table"] extends _resources ? ResourceRow : T["table"] extends _media_resources ? MediaResourcesRow : T["table"] extends _mash_media ? MashMediaRow : DataRow

Type ParameterDefault type
T extends TabledTabled

SearchSort

SearchSort: string | SearchSortOptions

Variables

DataPlugin

const DataPlugin: DataPlugableClass

Functions

assertData

assertData<T>(value): asserts value is Data<T>

Type ParameterDescription
T extends Primitive
ParameterTypeDescription
valueany

Returns asserts value is Data<T>.

assertDatasetElement

assertDatasetElement(value, name?): asserts value is HTMLElement | SVGElement

ParameterTypeDescription
valueany
name?string

Returns asserts value is HTMLElement | SVGElement.

deleteSqliteDataPlug

deleteSqliteDataPlug(deleteQuery, opts?): Promise<DataOrError<Identified[]>>

ParameterType
deleteQueryDeleteQuery
opts?JobOptions

Returns Promise<DataOrError<Identified[]>>.

dragData

dragData(dataTransfer?, type?): object

ParameterType
dataTransfer?DataTransfer
type?`${string}/x-masher`

Returns object.

insertSqliteDataPlug

insertSqliteDataPlug<ARGS>(args, opts?): Promise<DataOrError<RowTypeFromTable<ARGS>>>

Type ParameterDescription
ARGS extends InsertQuery
ParameterTypeDescription
argsARGS
opts?JobOptions

Returns Promise<DataOrError<RowTypeFromTable<ARGS>>>.

isData

isData<T>(value): value is Data<T>

Type Parameter
T extends Primitive
ParameterType
valueany

Returns value is Data<T>.

isDatasetElement

isDatasetElement(value): value is HTMLElement | SVGElement

ParameterType
valueany

Returns value is HTMLElement | SVGElement.

isResourceData

isResourceData(value): value is ResourceData

ParameterType
valueany

Returns value is ResourceData.

mediaSearchKey

mediaSearchKey(params): string

ParameterType
paramsMediaSearchRequest

Returns string.

normalizeColumns

normalizeColumns(columns, orUndefined?): string[]

ParameterType
columnsstring[]
orUndefined?boolean

Returns string[].

normalizedMediaSearch

normalizedMediaSearch(args): DataOrError<NormalizedSearchRequest>

ParameterType
argsMediaSearchRequest

Returns DataOrError<NormalizedSearchRequest>.

normalizedResourceSearch

normalizedResourceSearch(args): DataOrError<NormalizedSearchRequest>

ParameterType
argsResourceSearchRequest

Returns DataOrError<NormalizedSearchRequest>.

normalizedSearch

normalizedSearch(args): DataOrError<NormalizedSearchRequest>

ParameterType
argsSearchRequest

Returns DataOrError<NormalizedSearchRequest>.

queryDeleteMedia

queryDeleteMedia<ARGS>(args, opts?): Promise<DataOrError<IfArray<ARGS, Identified>>>

Type ParameterDescription
ARGS extends OrArray<Identified>
ParameterTypeDescription
argsARGS
opts?JobOptions

Returns Promise<DataOrError<IfArray<ARGS, Identified>>>.

queryDeleteResource

queryDeleteResource<ARGS>(args, opts?): Promise<DataOrError<IfArray<ARGS, Identified>>>

Type ParameterDescription
ARGS extends OrArray<Identified>
ParameterTypeDescription
argsARGS
opts?JobOptions

Returns Promise<DataOrError<IfArray<ARGS, Identified>>>.

queryInsertMedia

queryInsertMedia<ARGS>(args, opts?): Promise<DataOrError<IfArray<ARGS, Identified>>>

Type ParameterDescription
ARGS extends OrArray<StorableMedia>
ParameterTypeDescription
argsARGS
opts?JobOptions

Returns Promise<DataOrError<IfArray<ARGS, Identified>>>.

queryInsertResource

queryInsertResource<ARGS>(args, opts?): Promise<DataOrError<IfArray<ARGS, ResourceInsertResponse>>>

Type ParameterDescription
ARGS extends OrArray<StorableResource>
ParameterTypeDescription
argsARGS
opts?JobOptions

Returns Promise<DataOrError<IfArray<ARGS, ResourceInsertResponse>>>.

queryRowMedia

queryRowMedia(args, opts?): Promise<DataOrError<StoredMedia>>

ParameterTypeDescription
argsIdentified
opts?JobOptions

Returns Promise<DataOrError<StoredMedia>>.

queryRowResource

queryRowResource(args, opts?): Promise<DataOrError<StoredResource>>

ParameterTypeDescription
argsIdentified
opts?JobOptions

Returns Promise<DataOrError<StoredResource>>.

querySelectMedia

querySelectMedia(args, opts?): Promise<DataOrError<MediaSearchResponse>>

ParameterTypeDescription
argsMediaSearchRequest
opts?JobOptions

Returns Promise<DataOrError<MediaSearchResponse>>.

querySelectResource

querySelectResource(args, opts?): Promise<DataOrError<ResourceSearchResponse>>

ParameterTypeDescription
argsResourceSearchRequest
opts?JobOptions

Returns Promise<DataOrError<ResourceSearchResponse>>.

queryUpdateMedia

queryUpdateMedia<ARGS>(args, opts?): Promise<DataOrError<IfArray<ARGS, Identified>>>

Type ParameterDescription
ARGS extends OrArray<StoredMedia>
ParameterTypeDescription
argsARGS
opts?JobOptions

Returns Promise<DataOrError<IfArray<ARGS, Identified>>>.

queryUpdateResource

queryUpdateResource<ARGS>(args, opts?): Promise<DataOrError<IfArray<ARGS, StoredResource>>>

Type ParameterDescription
ARGS extends OrArray<StoredResource>
ParameterTypeDescription
argsARGS
opts?JobOptions

Returns Promise<DataOrError<IfArray<ARGS, StoredResource>>>.

requestSqliteDataPlug

requestSqliteDataPlug<ARGS>(args, opts): Promise<DataOrError<ResourceInsertResponse>>

Type Parameter
ARGS extends StoredResource
ParameterType
argsARGS
optsJobOptions

Returns Promise<DataOrError<ResourceInsertResponse>>.

selectSqliteDataPlug

selectSqliteDataPlug<ARGS>(args, opts): Promise<DataOrError<RowTypeFromTable<ARGS>[]>>

Type Parameter
ARGS extends SelectQuery
ParameterType
argsARGS
optsJobOptions

Returns Promise<DataOrError<RowTypeFromTable<ARGS>[]>>.

setTransferData

setTransferData(dataTransfer, type, data): void

ParameterType
dataTransferDataTransfer
typestring
dataany

Returns void.

unnormalizeColumns

unnormalizeColumns(columns, orUndefined?): string[]

ParameterType
columnsstring[]
orUndefined?boolean

Returns string[].

updateSqliteDataPlug

updateSqliteDataPlug<ARGS>(args, opts?): Promise<DataOrError<RowTypeFromTable<ARGS>>>

Type ParameterDescription
ARGS extends UpdateQuery
ParameterTypeDescription
argsARGS
opts?JobOptions

Returns Promise<DataOrError<RowTypeFromTable<ARGS>>>.