UNPKG

lml-main

Version:

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

58 lines (57 loc) 1.69 kB
import { RxHttpActionTypes, RxHttpRequestAction } from 'redux-rx-http'; import { PlaceModel } from '@lml/cosmo-ts-data'; export declare const FETCH_PLACES: RxHttpActionTypes; export declare const FETCH_PLACE_BY_ID: RxHttpActionTypes; export declare const POST_PLACE: RxHttpActionTypes; export declare const PUT_PLACE: RxHttpActionTypes; export declare const SET_PLACES = "SET_PLACES"; export declare const SET_PLACE_BY_ID = "SET_PLACE_BY_ID"; export interface SetPlacesAction { type: 'SET_PLACES'; places: { [placeId: string]: PlaceModel; }; } export interface SetPlaceByIdAction { type: 'SET_PLACE_BY_ID'; place: PlaceModel; } export declare type PlaceDataAction = SetPlacesAction | SetPlaceByIdAction; /** * Update the store with a list of places * * @param places */ export declare const setPlaces: (places: { [refId: string]: PlaceModel; }) => SetPlacesAction; /** * Update the store with a single place by id * * @param place */ export declare const setPlaceById: (place: PlaceModel) => SetPlaceByIdAction; /** * Fetch list of places * * @param partnerId */ export declare const fetchPlaces: (partnerId: string, args?: any) => RxHttpRequestAction; /** * Fetch a single place by placeId * * @param partnerId * @param placeId */ export declare const fetchPlaceById: (partnerId: string, placeId: string, args?: any) => RxHttpRequestAction; /** * Post a place * * @param partnerId * @param place */ export declare const postPlace: (partnerId: string, place: PlaceModel, args?: any) => RxHttpRequestAction; /** * Edit a place */ export declare const putPlace: (partnerId: string, place: PlaceModel, args?: any) => RxHttpRequestAction;