npm install --save @types/ebay-oauth-nodejs-client
This package contains type definitions for ebay-oauth-nodejs-client (https://github.com/eBay/ebay-oauth-nodejs-client).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ebay-oauth-nodejs-client.
type EbayEnvironment = "SANDBOX" | "PRODUCTION";
type EbayAuthTokenOptions =
| {
filePath: string;
}
| {
clientId: string;
clientSecret: string;
env?: EbayEnvironment;
baseUrl?: string;
redirectUri?: string;
scope?: string[] | string;
};
declare class EbayAuthToken {
constructor(options: Readonly<EbayAuthTokenOptions>);
getApplicationToken(environment: EbayEnvironment, scopes?: readonly string[] | string): Promise<string>;
generateUserAuthorizationUrl(
environment: EbayEnvironment,
scopes: string[] | string,
options?: {
prompt?: "login" | "consent";
state?: string;
},
): string;
exchangeCodeForAccessToken(environment: EbayEnvironment, code: string): Promise<string>;
getAccessToken(
environment: EbayEnvironment,
refreshToken: string,
scopes: readonly string[] | string,
): Promise<string>;
setRefreshToken(refreshToken: string): void;
getRefreshToken(): string;
}
export = EbayAuthToken;
- Last updated: Mon, 20 Nov 2023 23:36:24 GMT
- Dependencies: none
These definitions were written by Jeremy Möglich.