Installation
npm install --save @types/ebay-oauth-nodejs-client
Summary
This package contains type definitions for ebay-oauth-nodejs-client (https://github.com/eBay/ebay-oauth-nodejs-client).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ebay-oauth-nodejs-client.
index.d.ts
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;
Additional Details
- Last updated: Mon, 20 Nov 2023 23:36:24 GMT
- Dependencies: none
Credits
These definitions were written by Jeremy Möglich.