Class ElementsClient

API client for interacting with the Permit Elements API.

Hierarchy

  • BasePermitApi
    • ElementsClient

Implements

Constructors

  • Creates an instance of the ElementsClient.

    Parameters

    • config: IPermitConfig

      The configuration object for the Permit SDK.

    • logger: Logger<LoggerOptions>

      The logger instance for logging.

    Returns ElementsClient

Methods

  • Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.

    Parameters

    • requiredAccessLevel: ApiKeyLevel

      The required API Key Access level for the endpoint.

    Returns Promise<void>

    Throws

    PermitContextError If the currently set API key access level does not match the required access level.

  • Ensure that the API context matches the required endpoint context.

    Parameters

    • requiredContext: ApiContextLevel

      The required API context level for the endpoint.

    Returns Promise<void>

    Throws

    PermitContextError If the currently set API context level does not match the required context level.

Generated using TypeDoc