tickethead-sdk
Version:
SDK for the Tickethead API
41 lines • 1.17 kB
TypeScript
import { AxiosInstance } from 'axios';
import { HealthStatus, IdParam } from '../common/types';
import { ListOffersQuery, Offer, OrderInfo, CreateOrderRequest } from './types';
/**
* Service class for orderbook API calls. Requires an organizer to be set (call to `useOrganizer`)
*/
export declare class OrderbookService {
readonly client: AxiosInstance;
readonly version: string;
constructor(client: AxiosInstance, version: string);
/**
* Returns true if the service is reachable
* Currently the
*
* @returns Services' online status
*/
health(): Promise<HealthStatus>;
/**
* Returns all available offers
*
* @returns
*/
listOffers(req?: ListOffersQuery): Promise<Offer[]>;
/**
* Creates a new order
*/
createOrder(orderData: CreateOrderRequest): Promise<OrderInfo>;
/**
* Returns all offers which belong to the current user
*
* @returns
*/
getMine(): Promise<Offer[]>;
/**
* Delete the given offer from the orderbook
*
* @param offerId
*/
deleteOffer(offerId: IdParam): Promise<void>;
}
//# sourceMappingURL=service.d.ts.map