Skip to main content
Version: 30.0.x

Class: Documents

Defined in: src/api/entities/Asset/Base/Documents/index.ts:24

Handles all Asset Document related functionality

Extends

Methods

add()

add(args: AddAssetDocumentsParams, opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Asset/Base/Documents/index.ts:57

Add documents to the Asset's existing list of documents

Parameters

ParameterType

args

AddAssetDocumentsParams

opts?

ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

this method is of type ProcedureMethod, which means you can call add.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


get()

get(paginationOpts?: PaginationOptions): Promise<ResultSet<AssetDocumentWithId>>

Defined in: src/api/entities/Asset/Base/Documents/index.ts:70

Retrieve all documents linked to the Asset

Parameters

ParameterType

paginationOpts?

PaginationOptions

Returns

Promise<ResultSet<AssetDocumentWithId>>

Note

supports pagination

Note

returns documents with their on-chain IDs which can be used with the remove method


remove()

remove(args: RemoveAssetDocumentsParams, opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Asset/Base/Documents/index.ts:62

Remove specific documents from the Asset by their IDs

Parameters

ParameterType

args

RemoveAssetDocumentsParams

opts?

ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

this method is of type ProcedureMethod, which means you can call remove.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


set()

set(args: SetAssetDocumentsParams, opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Asset/Base/Documents/index.ts:52

Assign a new list of documents to the Asset by replacing the existing list of documents with the ones passed in the parameters

Parameters

ParameterType

args

SetAssetDocumentsParams

opts?

ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

this removes all existing documents and adds the new ones

Note

this method is of type ProcedureMethod, which means you can call set.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it