Interface iPluginDoc<T>

interface iPluginDoc<T> {
    _docId: string;
    _id?: string;
    approvedUsers: string[];
    claimCreatorRedirect?: {
        baseUri: string;
    };
    createdAt: T;
    createdBy: string;
    deletedAt?: T;
    duplicatesAllowed: boolean;
    lastUpdated: T;
    metadata: {
        createdBy: string;
        description: string;
        documentation?: string;
        image: string;
        name: string;
        sourceCode?: string;
        supportLink?: string;
    };
    pluginId: string;
    pluginSecret?: string;
    privateParamsSchema: (JsonBodyInputSchema | {
        key: string;
        label: string;
        type: "ownershipRequirements";
    })[];
    publicParamsSchema: (JsonBodyInputSchema | {
        key: string;
        label: string;
        type: "ownershipRequirements";
    })[];
    requiresSessions: boolean;
    requiresUserInputs: boolean;
    reuseForLists: boolean;
    reuseForNonIndexed: boolean;
    reviewCompleted: boolean;
    stateFunctionPreset: PluginPresetType;
    toPublish: boolean;
    userInputRedirect?: {
        baseUri: string;
    };
    userInputsSchema: JsonBodyInputSchema[];
    verificationCall?: {
        hardcodedInputs: JsonBodyInputWithValue[];
        method: "POST" | "GET" | "PUT" | "DELETE";
        passAddress: boolean;
        passDiscord: boolean;
        passEmail: boolean;
        passGithub: boolean;
        passGoogle: boolean;
        passTwitch: boolean;
        passTwitter: boolean;
        uri: string;
    };
}

Type Parameters

Hierarchy (view full)

Implemented by

Properties

_docId: string

A unique stringified document ID

_id?: string

A unique document ID (Mongo DB ObjectID)

approvedUsers: string[]
claimCreatorRedirect?: {
    baseUri: string;
}

Type declaration

  • baseUri: string
createdAt: T
createdBy: string

The Cosmos address who created the plugin doc

deletedAt?: T
duplicatesAllowed: boolean

Whether it makes sense for multiple of this plugin to be allowed

lastUpdated: T
metadata: {
    createdBy: string;
    description: string;
    documentation?: string;
    image: string;
    name: string;
    sourceCode?: string;
    supportLink?: string;
}

Type declaration

  • createdBy: string

    Creator of the plugin

  • description: string

    Description of the plugin

  • Optional documentation?: string

    Documentation for the plugin

  • image: string

    The image of the plugin

  • name: string

    The name of the plugin

  • Optional sourceCode?: string

    Source code for the plugin

  • Optional supportLink?: string

    Support link for the plugin

pluginId: string

The unique plugin ID

pluginSecret?: string

The client secret of the plugin

privateParamsSchema: (JsonBodyInputSchema | {
    key: string;
    label: string;
    type: "ownershipRequirements";
})[]
publicParamsSchema: (JsonBodyInputSchema | {
    key: string;
    label: string;
    type: "ownershipRequirements";
})[]
requiresSessions: boolean

This means that the plugin can be used w/o any session cookies or authentication.

requiresUserInputs: boolean

This is a flag for being compatible with auto-triggered claims, meaning no user interaction is needed.

reuseForLists: boolean

Reuse for address list claims? Address list claims are similar to standard badge claims and supports all features, except order of claims (claim numbers) do not matter.

reuseForNonIndexed: boolean

Reuse for nonindexed balances? Only applicable if is stateless, requires no user inputs, and requires no sessions.

reviewCompleted: boolean

Review process completed

stateFunctionPreset: PluginPresetType

Preset type for how the plugin state is to be maintained.

toPublish: boolean

To publish to directory?

userInputRedirect?: {
    baseUri: string;
}

Type declaration

  • baseUri: string
userInputsSchema: JsonBodyInputSchema[]
verificationCall?: {
    hardcodedInputs: JsonBodyInputWithValue[];
    method: "POST" | "GET" | "PUT" | "DELETE";
    passAddress: boolean;
    passDiscord: boolean;
    passEmail: boolean;
    passGithub: boolean;
    passGoogle: boolean;
    passTwitch: boolean;
    passTwitter: boolean;
    uri: string;
}

The verification URL

Type declaration

  • hardcodedInputs: JsonBodyInputWithValue[]
  • method: "POST" | "GET" | "PUT" | "DELETE"
  • passAddress: boolean
  • passDiscord: boolean
  • passEmail: boolean
  • passGithub: boolean
  • passGoogle: boolean
  • passTwitch: boolean
  • passTwitter: boolean
  • uri: string