UNPKG

@nekofar/warpcast

Version:

TypeScript client for interacting with Warpcast APIs

21 lines (19 loc) 578 B
type AuthToken = string | undefined; interface Auth { /** * Which part of the request do we use to send the auth? * * @default 'header' */ in?: "header" | "query" | "cookie"; /** * Header or query parameter name. * * @default 'Authorization' */ name?: string; scheme?: "basic" | "bearer"; type: "apiKey" | "http"; } declare const getAuthToken: (auth: Auth, callback: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken) => Promise<string | undefined>; export { type Auth, type AuthToken, getAuthToken };