Skip to content

T extends NumberType

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1385

Extends

Type Parameters

T

T extends NumberType

Implements

Constructors

Constructor

new ClaimBuilderDoc<T>(data): ClaimBuilderDoc<T>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1419

Parameters

data

iClaimBuilderDoc<T>

Returns

ClaimBuilderDoc<T>

Overrides

BaseNumberTypeClass.constructor

Properties

_docId

_docId: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1386

A unique stringified document ID

Implementation of

iClaimBuilderDoc._docId


_id?

optional _id?: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1387

A unique document ID (Mongo DB ObjectID)

Implementation of

iClaimBuilderDoc._id


action

action: object

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1399

Details for the action to perform if the criteria is correct

seedCode?

optional seedCode?: string

siwbbClaim?

optional siwbbClaim?: boolean

Implementation of

iClaimBuilderDoc.action


approach?

optional approach?: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1394

The expected approach for the claim. This is for display purposes for the frontend.

Available options:

  • in-site: The claim is expected to be completed in-site.
  • api: The claim is expected to be completed via an API call.
  • zapier: The claim is expected to be completed via Zapier auto-completion.

Implementation of

iClaimBuilderDoc.approach


assignMethod?

optional assignMethod?: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1407

Algorithm to determine the claaim number indices

Implementation of

iClaimBuilderDoc.assignMethod


cachePolicy?

optional cachePolicy?: ClaimCachePolicy<T>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1417

For on-demand claims, we cache the result per user for a short period.

To help optimize performance, please provide a cache policy.

This is only applicable to on-demand claims.

Implementation of

iClaimBuilderDoc.cachePolicy


categories?

optional categories?: string[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1414

The categories of the claim

Implementation of

iClaimBuilderDoc.categories


cid

cid: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1388

The CID (content ID) of the document. This is used behind the scenes to handle off-chain vs on-chain data races.

Implementation of

iClaimBuilderDoc.cid


collectionId

collectionId: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1392

The collection ID of the document

Implementation of

iClaimBuilderDoc.collectionId


createdAt

createdAt: T

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1406

Implementation of

iClaimBuilderDoc.createdAt


createdBy

createdBy: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1389

The BitBadges address of the user who created this password

Implementation of

iClaimBuilderDoc.createdBy


deletedAt?

optional deletedAt?: T

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1393

Deleted at timestamp

Implementation of

iClaimBuilderDoc.deletedAt


docClaimed

docClaimed: boolean

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1391

True if the document is claimed by the collection

Implementation of

iClaimBuilderDoc.docClaimed


estimatedCost?

optional estimatedCost?: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1411

Estimated cost for the user

Implementation of

iClaimBuilderDoc.estimatedCost


estimatedTime?

optional estimatedTime?: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1415

Estimated time to satisfy the claim's requirements

Implementation of

iClaimBuilderDoc.estimatedTime


lastUpdated

lastUpdated: T

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1405

Implementation of

iClaimBuilderDoc.lastUpdated


managedBy

managedBy: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1390

The BitBadges address of the user who is currently managing this

Implementation of

iClaimBuilderDoc.managedBy


manualDistribution?

optional manualDistribution?: boolean

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1395

If true, the claim codes are to be distributed manually. This doc will only be used for storage purposes. Only in use for legacy on-chain claims.

Deprecated

Implementation of

iClaimBuilderDoc.manualDistribution


metadata?

optional metadata?: Metadata<T>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1404

Metadata for the claim

Implementation of

iClaimBuilderDoc.metadata


pluginIds?

optional pluginIds?: string[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1397

For query purposes, the plugin IDs

Implementation of

iClaimBuilderDoc.pluginIds


plugins

plugins: IntegrationPluginParams<string>[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1396

Dynamic checks to run in the form of plugins

Implementation of

iClaimBuilderDoc.plugins


rewards?

optional rewards?: ClaimReward<T>[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1410

Rewards to be shown upon a successful claim. If you need further gating, you can do this in two-steps.

Implementation of

iClaimBuilderDoc.rewards


satisfyMethod?

optional satisfyMethod?: SatisfyMethod

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1416

Custom success logic. If not provided, we will default to AND logic with all plugins.

Implementation of

iClaimBuilderDoc.satisfyMethod


showInSearchResults?

optional showInSearchResults?: boolean

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1413

If true, the claim will be shown in search results

Implementation of

iClaimBuilderDoc.showInSearchResults


state

state: object

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1398

The current state of each plugin

Index Signature

[pluginId: string]: any

Implementation of

iClaimBuilderDoc.state


testOnly?

optional testOnly?: boolean

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1409

Implementation of

iClaimBuilderDoc.testOnly


trackerDetails?

optional trackerDetails?: ChallengeTrackerIdDetails<T>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1403

Which challenge tracker is it tied to

Implementation of

iClaimBuilderDoc.trackerDetails


version

version: T

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1408

Implementation of

iClaimBuilderDoc.version

Methods

clone()

clone(): ClaimBuilderDoc

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:151

Deep copies the object and returns a new instance.

Returns

ClaimBuilderDoc

Inherited from

BaseNumberTypeClass.clone


convert()

convert<U>(convertFunction, options?): ClaimBuilderDoc<U>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1458

Converts the object to a different NumberType equivalent.

Type Parameters

U

U extends NumberType

Parameters

convertFunction

(item) => U

options?

ConvertOptions

Returns

ClaimBuilderDoc<U>

Overrides

BaseNumberTypeClass.convert


equals()

equals<U>(other, normalizeNumberTypes?): boolean

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:147

Compares this object's fields to another object's fields for equality. Equality is determined by comparing the JSON representations of the objects.

If normalizeNumberTypes is true, then all number types will be compared as strings (i.e. "1n" === "1" === 1). Else, they will be compared as their native types (i.e. 1n !== 1 !== "1").

Type Parameters

U

U extends CustomType<U>

Parameters

other

CustomType<U> | null | undefined

normalizeNumberTypes?

boolean

Returns

boolean

Inherited from

BaseNumberTypeClass.equals


getNumberFieldNames()

getNumberFieldNames(): string[]

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/docs-types/docs.ts:1454

Internal helper method to convert the number fields of the object to a different NumberType equivalent.

Returns

string[]

Overrides

BaseNumberTypeClass.getNumberFieldNames


hasNumberFields()

hasNumberFields(): boolean

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:161

Checks if the object has number fields.

Returns

boolean

Inherited from

BaseNumberTypeClass.hasNumberFields


toJson()

toJson(): JsonObject

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:139

Converts the object to a JSON object with all primitive types.

Returns

JsonObject

Inherited from

BaseNumberTypeClass.toJson


toJsonString()

toJsonString(): string

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:143

Converts the object to a JSON string.

Returns

string

Inherited from

BaseNumberTypeClass.toJsonString

Edit this page on GitHub