export interface ICircularRegion { latitude: number; longitude: number; radius: number; } export interface INotificationInfo { title: string; message: string; data: any; } export interface IOrder { id: number; state: string; customerState: CustomerState; partnerIdentifier?: string; pickupWindow?: [string]; pickupType?: string; etaAt?: string; redeemedAt?: string; redemptionCode?: string; customerRating?: string; customerComment?: string; createdAt?: string; siteID: number; siteName?: string; sitePhone?: string; siteFullAddress?: string; siteLongitude?: string; siteLatitude?: string; siteInstructions?: string; siteDescription?: string; siteCoverPhotoURL?: string; customerID?: string; customerName?: string; customerCarType?: string; customerCarColor?: string; customerLicensePlate?: string; spotIdentifier?: string; spotIdentifierEntryEnabled?: boolean; spotIdentifierInputType?: string; } export interface ISite { id: number; name?: string; phone?: string; streetAddress?: string | null; fullAddress?: string | null; locality?: string | null; region?: string | null; country?: string | null; postalCode?: string | null; latitude?: string | null; longitude?: string | null; coverPhotoUrl?: string | null; iconUrl?: string | null; instructions?: string | null; description?: string | null; partnerIdentifier?: string | null; } export interface IPickupTypeConfig { pickupType: string; pickupTypeLocalizedString: string; requireVehicleInfo: boolean; showVehicleInfoFields: boolean; } export interface IPickupConfig { accentColor: string; accentTextColor: string; askToAskImageURL?: string; availablePickupTypes: IPickupTypeConfig[]; customerNameEditingEnabled: boolean; id: number; pickupTypeSelectionEnabled: boolean; privacyPolicyURL?: string; termsOfServiceURL?: string; type: string; } export interface ICustomerInfo { name: string; carType: string; carColor: string; licensePlate: string; phone?: string; } export interface ICustomer { token: string; emailAddress?: string; info: ICustomerInfo; } type CreateOrderWithSitePartnerIdentifier = { sitePartnerIdentifier: string; orderPid: string; customerInfo: ICustomerInfo; pickupWindow?: PickupWindow; orderState?: OrderStateType; pickupType?: PickupType; }; type CreateOrderWithSiteId = { siteId: number; pid: string; customerInfo: ICustomerInfo; pickupWindow?: PickupWindow; orderState?: OrderStateType; pickupType?: PickupType; }; type CreateOrderParamsType = Partial & Partial; type PickupWindow = { start: string; end: string; }; export declare enum CustomerState { CREATED = "created", EN_ROUTE = "en_route", NEARBY = "nearby", ARRIVED = "arrived", WAITING = "waiting", DEPARTED = "departed", COMPLETED = "completed" } export declare enum OrderStateType { CREATED = "created", READY = "ready", DELAYED = "delayed", DELIVERY_DISPATCHED = "delivery_dispatched", DRIVER_ASSIGNED = "driver_assigned", DELIVERY_FAILED = "delivery_failed", PICKED_UP = "picked_up", OUT_FOR_DELIVERY = "out_for_delivery", UNDELIVERABLE = "undeliverable", CANCELLED = "cancelled", COMPLETED = "completed" } export declare enum PickupType { CURBSIDE = "curbside", PICKUP = "pickup", DELIVERY = "delivery" } type Orders = { fetchOrders(): Promise<[IOrder]>; /** * This function supports two type of create order * * 1. Create Order using Site ID, the siteId and pid is a mandatory for this * * 2. Create Order using Site Partner Identifier, the sitePartnerIdentifier and orderPid is a mandatory for this * * * @param params Object based on CreateOrderParamsType */ createOrder(params: CreateOrderParamsType): Promise; claimOrder(redeemCode: string, customerInfo: ICustomerInfo, pickupType?: PickupType): Promise; fetchOrderByRedemptionCode(redemCode: string): Promise; updateOrderState(orderId: number, state: OrderStateType): Promise; updateOrderCustomerState(orderId: number, state: CustomerState): Promise; updateOrderCustomerStateWithSpot(orderId: number, state: CustomerState, spot: string): Promise; rateOrder(orderId: number, rating: number, comments: string): Promise; }; type Customer = { loginWithToken(code: string): Promise; login(email: string, password: string): Promise; logout(): Promise; signUp(email: string, password: string): Promise; createCustomer(customerInfo: ICustomerInfo): Promise; updateCustomer(customerInfo: ICustomerInfo): Promise; getCurrentCustomer(): Promise; }; type Sites = { fetchAllSites(): Promise<[ISite]>; fetchSitesByQuery(params: { query: string; page: number; }): Promise<[ISite]>; fetchSitesByRegion(params: { per: number; page: number; region: ICircularRegion; }): Promise<[ISite]>; fetchSiteByPartnerIdentifier(params: { partnerIdentifier: string; }): Promise; }; type Notify = { configure(bgTaskIdentifier?: string): Promise; clearNotifications(): Promise; createForSitesInRegion(region: ICircularRegion, notification: INotificationInfo): Promise; createForSites(sites: ISite[], notification: INotificationInfo): Promise; sync(force: Boolean): Promise; onPermissionChanged(): void; }; type Presence = { configure(presenceUUID: string): void; startLocatorWithIdentifier(presenceId: string, payload: string): Promise; stopLocator(): Promise; }; type Pickup = { configure(): void; onPermissionChanged(): void; }; type LiveStatus = { configure(iconName?: string): void; }; type FlyBuyType = { Pickup: Pickup; Notify: Notify; Presence: Presence; LiveStatus: LiveStatus; Core: { configure(token: string): void; updatePushToken(token: string): void; handleRemoteNotification(data: any): void; Orders: Orders; Customer: Customer; Sites: Sites; }; eventEmitter: any; }; declare const _default: FlyBuyType; export default _default; //# sourceMappingURL=index.d.ts.map