UNPKG

breathe-api

Version:

Model Context Protocol server for Breathe HR APIs with Swagger/OpenAPI support - also works with custom APIs

36 lines 1.64 kB
declare const brand: unique symbol; export type Brand<T, TBrand> = T & { [brand]: TBrand; }; export type ApiToken = Brand<string, 'ApiToken'>; export type Password = Brand<string, 'Password'>; export type BasicAuthHeader = Brand<string, 'BasicAuthHeader'>; export type BearerToken = Brand<string, 'BearerToken'>; export type ApiKey = Brand<string, 'ApiKey'>; export declare function isApiToken(value: string): value is ApiToken; export declare function isPassword(value: string): value is Password; export declare function isBasicAuthHeader(value: string): value is BasicAuthHeader; export declare function isBearerToken(value: string): value is BearerToken; export declare function isApiKey(value: string): value is ApiKey; export declare function createApiToken(value: string): ApiToken; export declare function createPassword(value: string): Password; export declare function createBasicAuthHeader(username: string, password: Password): BasicAuthHeader; export declare function createBearerToken(token: string): BearerToken; export declare function createApiKey(value: string): ApiKey; export declare function sanitizeForLogging(value: ApiToken | Password | BasicAuthHeader | BearerToken | ApiKey): string; export interface SecureAuthConfig { type: 'none' | 'basic' | 'bearer' | 'api-key'; credentials?: { username?: string; password?: Password; token?: ApiToken; apiKey?: ApiKey; }; } export interface SecureHeaders { Authorization?: BasicAuthHeader | BearerToken; 'X-API-Key'?: ApiKey; [key: string]: string | undefined; } export {}; //# sourceMappingURL=security.d.ts.map