culqi-node
Version:
Typescript wrapper for Culqi web services developed for Node.js with 0 runtime dependencies
35 lines (34 loc) • 905 B
TypeScript
import { HttpRequestOptions } from './request';
export type Event = {
object: string;
type: string;
data: Record<string, unknown>;
};
export type GetEventRequest = {
id: string;
};
export type GetEventsRequest = {
type?: string;
creation_date?: string;
creation_date_from?: string;
creation_date_to?: string;
limit?: string;
before?: string;
after?: string;
};
export type GetEventsResponse = {
data: Event[];
paging: {
previous: string;
next: string;
cursors: {
before: string;
after: string;
};
remaining_items: number;
};
};
export declare const events: {
getEvent: (req: GetEventRequest, extraHttpOptions?: Partial<HttpRequestOptions>) => Promise<Event>;
getEvents: (req?: GetEventsRequest, extraHttpOptions?: Partial<HttpRequestOptions>) => Promise<GetEventsResponse>;
};