Skip to main content

Interface: SubmissionRepo

Defined in: contract.ts:45

@rasd/storage — the public entry point.

This package owns three things and nothing else: the frozen StorageAdapter contract, a reference implementation of it, and the suite that proves any other implementation matches. It deliberately has no dependency on @rasd/license — that is what makes export() available in every licence state a property of the module graph rather than a promise (docs/09 §10).

Methods​

count()​

count(query?): Promise<number>;

Defined in: contract.ts:51

Parameters​

ParameterType
query?SubmissionQuery

Returns​

Promise<number>


delete()​

delete(id): Promise<void>;

Defined in: contract.ts:52

Parameters​

ParameterType
idstring

Returns​

Promise<void>


get()​

get(id): Promise<Submission | undefined>;

Defined in: contract.ts:46

Parameters​

ParameterType
idstring

Returns​

Promise<Submission | undefined>


list()​

list(query?): Promise<SubmissionPage>;

Defined in: contract.ts:50

Parameters​

ParameterType
query?SubmissionQuery

Returns​

Promise<SubmissionPage>


patch()​

patch(
id,
partial,
opts?
): Promise<Submission>;

Defined in: contract.ts:49

Shallow merge; bumpRev increments clientRev and stamps updatedAt.

Parameters​

ParameterType
idstring
partialPartial<Submission>
opts?{ bumpRev?: boolean; }
opts.bumpRev?boolean

Returns​

Promise<Submission>


put()​

put(sub): Promise<void>;

Defined in: contract.ts:47

Parameters​

ParameterType
subSubmission

Returns​

Promise<void>