UNPKG

expresscheckout-nodejs

Version:

Juspay's official expresscheckout-nodejs sdk

51 lines (50 loc) 1.36 kB
/// <reference types="node" /> export interface RequestEntity { [key: string]: any; } export interface RequestHeaders { /** * To use active active feature */ 'x-customerid'?: string; /** * To send merchant-id header * Please note, that will be auto filled by Juspay instance, please tell use your use case here support@juspay.in * or raise issue in sdk repo */ 'x-merchantid'?: string; [key: string]: any; } export type BaseResponseHttp = { headers: Record<string, any>; statusCode: number; url: string | undefined; method: string | undefined; httpVersion: string; httpVersionMajor: number; httpVersionMinor: number; rawHeaders: string[]; statusMessage: string | undefined; headersDistinct: NodeJS.Dict<string[]>; }; export interface BaseHttpResponse { http: BaseResponseHttp; [key: string]: any; } export type HttpResponseWithType<T> = BaseHttpResponse & T; export type HttpResponse = HttpResponseWithType<unknown>; export type ErrorInfoType = { code?: string; category?: string; href?: string; request_id?: string; user_message?: string; developer_message?: string; fields?: ErrorFieldsType; [key: string]: any; }; export type ErrorFieldsType = { field_name?: string; reason?: string; [key: string]: any; }[];