Home > @theweave/api > AssetServices
AssetServices interface
Signature:
export interface AssetServices
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
(srcWal: WAL, dstWal: WAL, tags?: string[]) => Promise<void> | Adds a new asset relation. This function deliberately returns no value because Tool frontends should subscribe to the AssetStore(s) to update their frontend state. | ||
(wal: WAL, tags: string[]) => Promise<void> | Adds new tags to an asset | ||
(relationHash: EntryHash, tags: string[]) => Promise<void> | Adds new tags to an existing asset relation | ||
(wal: WAL) => Promise<AssetLocationAndInfo | undefined> | Gets information about an entry in any other Applet in We | ||
(wal: WAL) => AssetStore | Returns a Svelte readable store that can be subscribed to in order to get updated about the latest information about this asset (tags and other related assets) | ||
(wal: WAL) => Promise<void> | Adds the specified HRL to the We-internal clipboard | ||
(wal: WAL) => Promise<void> | Communicate that an asset is being dragged | ||
(crossGroup?: boolean) => Promise<string[]> | Get all asset relation tags that have been used so far in the group. Useful for example to display in a tag selection UI element. | ||
(relationHash: EntryHash) => Promise<void> | Removes an asset relation and all its tags. This function deliberately returns no value because Tool frontends should subscribe to the AssetStore(s) to update their frontend state. | ||
(wal: WAL, tags: string[]) => Promise<void> | Removes the given tags from an asset. | ||
(relationHash: EntryHash, tags: string[]) => Promise<void> | Removes the specified tags from an asset relation | ||
(from?: 'search' | 'pocket' | 'create') => Promise<WAL | undefined> | Prompts the user to select an Asset and returns the associated WAL as soon as the user has selected an asset or returns undefined if the user cancels the selection process. By default it will let the user select the Asset from the pocket but other means of selecting the asset can be specified optionally with the "from" argument. | ||
() => Promise<string | undefined> | Prompts the user with a dialog to select an asset relation tag. Returns the associated tag as a string as soon as the user has selected a tag or undefined it the user cancels the selection process. |