UNPKG

@tableau/taco-toolkit

Version:
31 lines (30 loc) 808 B
/** * Represents authentication tokens containing an access token and additional headers. * * @typedef {Object} AuthTokens * @property {string} accessToken - The access token for authorization. * @property {Object.<string, string>} headers - Additional headers to include in the request. * * @example * ```ts * const authTokens: AuthTokens = { * accessToken: 'your_access_token', * headers: { * 'Custom-Header': 'value', * // other headers... * }, * } * * // Usage in an HTTP request * const requestOptions: RequestOptions = { * headers: { ...authTokens.headers, Authorization: `Bearer ${authTokens.accessToken}` }, * // other request options... * } * ``` */ export type AuthTokens = { accessToken: string; headers: { [key: string]: string; }; };