ebay-api
Version:
eBay API for Node and Browser
41 lines (40 loc) • 1.12 kB
TypeScript
import { AxiosRequestConfig } from 'axios';
import { ContentLanguage, MarketplaceId } from '../enums/index.js';
export type Scope = string[];
export type Keyset = {
appId: string;
certId: string;
devId?: string;
};
export type RestConfig = {
marketplaceId?: MarketplaceId;
endUserCtx?: string;
contentLanguage?: ContentLanguage;
acceptLanguage?: string;
};
export type TraditionalConfig = {
siteId?: number;
authToken?: string | null;
};
export type Cipher = 'sha256' | 'sha512';
export type Signature = {
cipher?: Cipher;
jwe: string;
privateKey: string;
};
export type eBayConfig = Keyset & {
sandbox: boolean;
ruName?: string;
scope?: Scope;
signature?: Signature | null;
} & TraditionalConfig & RestConfig;
export type ApiConfig = {
autoRefreshToken?: boolean;
axiosConfig?: AxiosRequestConfig;
};
export type Headers = Record<string, string | number | undefined>;
export type ApiRequestConfig = {
headers?: Headers;
returnResponse?: boolean;
};
export type AppConfig = eBayConfig & ApiConfig;