UNPKG

@twin.org/api-tenant-processor

Version:

API Tenant Processor for converting and api key to a tenant id.

23 lines (22 loc) 675 B
import type { IContextIdHandler } from "@twin.org/context"; /** * Context Id handler for testing as a tenant id. */ export declare class TenantIdContextIdHandler implements IContextIdHandler { /** * Runtime name for the class. */ static readonly CLASS_NAME: string; /** * The short form of the tenant id is the same as the full version. * @param value The full context id value. * @returns Short form string. */ short(value: string): string; /** * Guard the value ensuring length. * @param value The value to guard. * @throws GeneralError if the value is too short. */ guard(value: string): void; }