@types/ebay-oauth-nodejs-client
TypeScript icon, indicating that this package has built-in type declarations

1.2.4 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/ebay-oauth-nodejs-client

Weekly Downloads

2,090

Version

1.2.4

License

MIT

Unpacked Size

4.86 kB

Total Files

5

Last publish

Collaborators

  • types