UNPKG

lml-main

Version:

This is now a mono repository published into many standalone packages.

55 lines (54 loc) 2.33 kB
import { RxHttpActionTypes, RxHttpRequestAction } from 'redux-rx-http'; import { BookingModel } from '@lml/cosmo-ts-data'; import { PostBookingTimeslotRequest, PostBookingAsapRequest } from '../interfaces'; export declare const SEARCH_BOOKINGS: RxHttpActionTypes; export declare const FETCH_BOOKING_BY_ID: RxHttpActionTypes; export declare const POST_BOOKING: RxHttpActionTypes; export declare const POST_BOOKING_ASAP: RxHttpActionTypes; export declare const SET_BOOKING_BY_ID = "SET_BOOKING_BY_ID"; export declare const SET_BOOKINGS_BY_ID_BATCH = "SET_BOOKINGS_BY_ID_BATCH"; export declare const SET_BOOKINGS_SEARCH = "SET_BOOKINGS_SEARCH"; export interface SetBookingByIdAction { type: 'SET_BOOKING_BY_ID'; booking: BookingModel; } export interface SetBookingsByIdBatchAction { type: 'SET_BOOKINGS_BY_ID_BATCH'; bookings: BookingModel[]; } export interface SetBookingsSearchAction { type: 'SET_BOOKINGS_SEARCH'; bookings: BookingModel[]; } export declare type BookingApiDataAction = SetBookingByIdAction | SetBookingsByIdBatchAction | SetBookingsSearchAction; export interface SearchBookingsRequest { collectionPlaceId: string[]; deliveryPostcode?: string[]; radius: number; sortDirection: string; offset: number; length: number; createdAt: { from: string; to: string; }; collectedBy?: { from: string; to: string; }; deliveredBy?: { from: string; to: string; }; coordinates?: { longitude: number; latitude: number; }; } export declare const searchBookings: (partnerId: string, query: SearchBookingsRequest, args?: any) => RxHttpRequestAction; export declare const fetchBookingById: (partnerId: string, orderId: string, args?: any) => RxHttpRequestAction; export declare const postBooking: (partnerId: string, data: PostBookingTimeslotRequest, args?: any) => RxHttpRequestAction; export declare const postBookingAsap: (partnerId: string, data: PostBookingAsapRequest, args?: any) => RxHttpRequestAction; export declare const setBookingById: (booking: BookingModel) => SetBookingByIdAction; export declare const setBookingsByIdBatch: (bookings: BookingModel[]) => SetBookingsByIdBatchAction; export declare const setBookingsSearch: (bookings: BookingModel[]) => SetBookingsSearchAction;