import CitiReward from './reward'; import CitiCards from './cards'; import CitiOnboarding from './onboarding'; interface ILogger { warn: (...args: any[]) => void; log: (...args: any[]) => void; info: (...args: any[]) => void; error: (...args: any[]) => void; } interface IAccessToken { access_token: string; created_at: number; expires_in: number; refresh_token?: string; scope: string; token_type?: string; consented_on?: number; refresh_token_expires_in?: number; } export declare class AccessToken implements IAccessToken { readonly access_token: string; readonly created_at: number; readonly expires_in: number; readonly refresh_token?: string; readonly scope: string; readonly token_type: string | undefined; readonly consented_on: number | undefined; readonly refresh_token_expires_in?: number; constructor(data: IAccessToken); isValid(): boolean; } export default class CitiOAuth { Reward: CitiReward; readonly getToken: (openId?: string) => any; readonly appId: string; private readonly appSecret; readonly saveToken: (openid: string, token: object) => void; private readonly store; private logger; private readonly redirectUri; endpoint: string; Cards: CitiCards; Onboarding: CitiOnboarding; constructor(appId: string, appSecret: string, redirectUri: string, saveToken?: (openid: string, token: object) => Promise, getToken?: (openId?: string) => Promise, logger?: ILogger); getAuthorizeURL(state?: string, scope?: string, countryCode?: string): string; getAccessToken(code: string, countryCode?: string): Promise; getClientAccessToken(countryCode?: string, scope?: string): Promise; refreshAccessToken(refreshToken: string): Promise; getUserByAccessToken(accessToken: string): Promise; getUserByCode(code: string, countryCode?: string): Promise; private processAccessToken; wrap(requestFunc: (url: string, data?: any, options?: any) => Promise): (url: string, data?: any, options?: any) => Promise; makeClientAuthRequest(url: string, qs?: any, options?: { accessToken?: string; countryCode?: string; method: string; }): Promise; } export {};