Home Manual Reference Source
import ProofsOwners from '@pageproof/sdk/src/api/ProofsOwners.js'
public class | source

ProofsOwners

Extends:

API → ProofsOwners

Method Summary

Public Methods
public

Add one or more users as owners on a proof.

since v2.0.0-beta.12
public

Remove one or more users as owners on a proof.

since v2.0.0-beta.12

Inherited Summary

From class API
public

Public Methods

public add(proofId: string, userOrUsers: OwnerUserDefinition | Array<OwnerUserDefinition>): Promise since v2.0.0-beta.12 source

Add one or more users as owners on a proof.

Params:

NameTypeAttributeDescription
proofId string

The proof id

userOrUsers OwnerUserDefinition | Array<OwnerUserDefinition>

User or users to add as owners

Return:

Promise

Example:

Adding an owner (by email)
await client.proofs.owners.add(proof.id, { email: 'my-new-owner@example.com' });
Adding an owner (by user id)
await client.proofs.owners.add(proof.id, { id: 'ULVRHSLLP69ACHCT' });
Adding multiple owners (by email and user id)
await client.proofs.owners.add(proof.id, [
  { email: 'my-new-owner@example.com' },
  { id: 'ULVRHSLLP69ACHCT' },
]);

public remove(proofId: string, userOrUsers: OwnerUserDefinition | Array<OwnerUserDefinition>): Promise since v2.0.0-beta.12 source

Remove one or more users as owners on a proof.

Params:

NameTypeAttributeDescription
proofId string

The proof id

userOrUsers OwnerUserDefinition | Array<OwnerUserDefinition>

User or users to remove as owners

Return:

Promise

Example:

Removing an owner (by email)
await client.proofs.owners.remove(proof.id, { email: 'my-new-owner@example.com' });
Removing an owner (by user id)
await client.proofs.owners.remove(proof.id, { id: 'ULVRHSLLP69ACHCT' });
Removing multiple owners (by email and user id)
await client.proofs.owners.remove(proof.id, [
  { email: 'my-new-owner@example.com' },
  { id: 'ULVRHSLLP69ACHCT' },
]);