Class PluginDoc<T>

Type Parameters

Hierarchy (view full)

Implements

Constructors

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
  • description: string
  • Optional documentation?: string
  • image: string
  • name: string
  • Optional sourceCode?: string
  • Optional supportLink?: string
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

Methods

  • 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

    Parameters

    • other: undefined | null | CustomType<U>
    • Optional normalizeNumberTypes: boolean

    Returns boolean