Interface iClaimBuilderDoc<T>

interface iClaimBuilderDoc<T extends NumberType> {
    _docId: string;
    _id?: string;
    action: {
        balancesToSet?: iPredeterminedBalances<T>;
        listId?: string;
        seedCode?: string;
        siwbbClaim?: boolean;
    };
    approach?: string;
    assignMethod?: string;
    cachePolicy?: iClaimCachePolicy<T>;
    categories?: string[];
    cid: string;
    collectionId: T;
    createdAt: T;
    createdBy: string;
    deletedAt?: T;
    docClaimed: boolean;
    estimatedCost?: string;
    estimatedTime?: string;
    lastUpdated: T;
    managedBy: string;
    manualDistribution?: boolean;
    metadata?: iMetadata<T>;
    pluginIds?: string[];
    plugins: IntegrationPluginParams<string>[];
    rewards?: iClaimReward<T>[];
    satisfyMethod?: iSatisfyMethod;
    showInSearchResults?: boolean;
    state: { [pluginId: string]: any };
    testOnly?: boolean;
    trackerDetails?: iChallengeTrackerIdDetails<T>;
    version: T;
}

Type Parameters

Hierarchy (View Summary, Expand)

  • Doc
    • iClaimBuilderDoc

Implemented by

Properties

_docId: string

A unique stringified document ID

_id?: string

A unique document ID (Mongo DB ObjectID)

action: {
    balancesToSet?: iPredeterminedBalances<T>;
    listId?: string;
    seedCode?: string;
    siwbbClaim?: boolean;
}

Details for the action to perform if the criteria is correct

approach?: string

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.
assignMethod?: string

Algorithm to determine the claaim number indices

cachePolicy?: iClaimCachePolicy<T>

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.

categories?: string[]

The categories of the claim

cid: string

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

collectionId: T

The collection ID of the document

createdAt: T
createdBy: string

The BitBadges address of the user who created this password

deletedAt?: T

Deleted at timestamp

docClaimed: boolean

True if the document is claimed by the collection

estimatedCost?: string

Estimated cost for the user

estimatedTime?: string

Estimated time to satisfy the claim's requirements

lastUpdated: T
managedBy: string

The BitBadges address of the user who is currently managing this

manualDistribution?: boolean

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.

metadata?: iMetadata<T>

Metadata for the claim

pluginIds?: string[]

For query purposes, the plugin IDs

plugins: IntegrationPluginParams<string>[]

Dynamic checks to run in the form of plugins

rewards?: iClaimReward<T>[]

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

satisfyMethod?: iSatisfyMethod

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

showInSearchResults?: boolean

If true, the claim will be shown in search results

state: { [pluginId: string]: any }

The current state of each plugin

testOnly?: boolean
trackerDetails?: iChallengeTrackerIdDetails<T>

Which challenge tracker is it tied to

version: T
MMNEPVFCICPMFPCPTTAAATR