@shopify/app-bridge
Version:
**Shopify is doubling our engineering staff in 2021! [Join our team and work on libraries like this one.](https://smrtr.io/5GGrc)**
51 lines (50 loc) • 1.36 kB
TypeScript
import { ClientApplication } from '../../client/index';
import { ActionSet } from '../helper';
import { Group, MetaAction, SimpleDispatch } from '../types';
/**
* Pos action type enum
* @remarks includes the action prefix and group
*
*/
export declare enum Action {
CLOSE = "APP::POS::CLOSE",
LOCATION_UPDATE = "APP::POS::LOCATION::UPDATE",
USER_UPDATE = "APP::POS::USER::UPDATE",
DEVICE_UPDATE = "APP::POS::DEVICE::UPDATE"
}
export interface Location {
id: number;
active: boolean;
name: string;
locationType?: string;
address1?: string;
address2?: string;
zip?: string;
city?: string;
province?: string;
countryCode?: string;
countryName?: string;
phone?: string;
}
export interface User {
id: number;
firstName: string;
lastName: string;
email: string;
accountOwner: boolean;
userType: string;
}
export interface Device {
name: string;
serialNumber: string;
}
export interface CloseAction extends MetaAction {
readonly group: typeof Group.Pos;
readonly type: typeof Action.CLOSE;
}
export declare function close(): CloseAction;
export declare class Pos extends ActionSet implements SimpleDispatch {
constructor(app: ClientApplication<any>);
dispatch(action: Action): this;
}
export declare function create(app: ClientApplication<any>): Pos;