UNPKG

@paritydeals/node-sdk

Version:

Node.js SDK for interacting with the ParityDeals API.

42 lines 1.66 kB
import { AxiosInstance, AxiosRequestConfig, Method } from 'axios'; import { ReportingOperations } from './reporting'; import { CheckoutOperations } from './checkout'; import { EntitlementsOperations } from './entitlements'; import { CustomersOperations } from './customers'; import { SubscriptionOperations } from './subscription'; export interface Logger { debug: (...args: any[]) => void; info: (...args: any[]) => void; warn: (...args: any[]) => void; error: (...args: any[]) => void; } export interface ParityDealsClientOptions { accessToken: string; environment?: 'production' | 'sandbox'; baseUrl?: string; apiVersion?: string; edgeApiUrl?: string; timeout?: number; logger?: Logger | false; adapter?: AxiosRequestConfig['adapter']; } export declare class ParityDeals { private readonly accessToken; readonly defaultBaseUrl: string; readonly edgeApiUrl: string; private readonly apiVersion; readonly httpClient: AxiosInstance; readonly logger: Logger; readonly reporting: ReportingOperations; readonly checkout: CheckoutOperations; readonly entitlements: EntitlementsOperations; readonly customers: CustomersOperations; readonly subscription: SubscriptionOperations; constructor(options: ParityDealsClientOptions); private _getHeaders; /** @internal */ _prepareUrl(endpointModulePath: string, useEdgeUrl?: boolean): string; /** @internal */ _request<TResponse>(method: Method, endpointModulePath: string, payload?: any, queryParams?: Record<string, any>, useEdgeUrl?: boolean): Promise<TResponse>; } //# sourceMappingURL=client.d.ts.map