Interface IntegrationPluginDetails<T>

interface IntegrationPluginDetails<T> {
    instanceId: string;
    metadata?: {
        description: string;
        name: string;
    };
    newState?: ClaimIntegrationPublicStateType<T>;
    onlyUpdateProvidedNewState?: boolean;
    pluginId: T;
    privateParams: ClaimIntegrationPrivateParamsType<T>;
    privateState?: ClaimIntegrationPrivateStateType<T>;
    publicParams: ClaimIntegrationPublicParamsType<T>;
    publicState: ClaimIntegrationPublicStateType<T>;
    resetState?: boolean;
}

Type Parameters

Hierarchy (view full)

Properties

instanceId: string

The ID of the plugin instance. This is a unique identifier for referencing this instance of the plugin within this claim (e.g. differentiate between duplicates of the same plugin type).

This is different from the pluginId, which is a unique identifier for the plugin itself. All instances of the same plugin will have the same pluginId.

metadata?: {
    description: string;
    name: string;
}

Custom display metadata for the plugin

Type declaration

  • description: string
  • name: string

If newState is present, we will set the state to the new state. Incompatible with resetState. Can be used alongside onlyUpdateProvidedNewState. By default, we will overwrite the whole state. If onlyUpdateProvidedNewState is true, we will only update the specific provided fields.

Warning: This is an advanced feature and should be used with caution. Misconfiguring this can lead to unexpected behavior of this plugin.

onlyUpdateProvidedNewState?: boolean

If true, we will only update the specific fields provided in newState. If falsy, we will overwrite the whole state with newState.

Only applicable if newState is present.

Note that we do this on a recursive level. If you have nested objects, we will only update the specific fields provided for those nested objects and leave all else as-is.

pluginId: T

The type of the plugin

The parameters of the plugin that are not visible to the public

The private state of the plugin

The parameters of the plugin that are visible to the public

The current state of the plugin

resetState?: boolean

If resetState = true, we will reset the state of the plugin back to default. If false, we will keep the current state. Incompatible with newState.