Interface: FormRepo
Defined in: contract.ts:22
@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
delete()
delete(id, version?): Promise<void>;
Defined in: contract.ts:29
Parameters
| Parameter | Type |
|---|---|
id | string |
version? | string |
Returns
Promise<void>
get()
get(id, version?): Promise<FormDefinition | undefined>;
Defined in: contract.ts:24
Latest published version when version is omitted.
Parameters
| Parameter | Type |
|---|---|
id | string |
version? | string |
Returns
Promise<FormDefinition | undefined>
listLatest()
listLatest(): Promise<FormDefinition[]>;
Defined in: contract.ts:25
Returns
Promise<FormDefinition[]>
listVersions()
listVersions(id): Promise<string[]>;
Defined in: contract.ts:26
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<string[]>
put()
put(def): Promise<void>;
Defined in: contract.ts:28
Published versions are immutable: re-putting an existing (id, version) with different content rejects.
Parameters
| Parameter | Type |
|---|---|
def | FormDefinition |
Returns
Promise<void>