@shopify/app-bridge-host
Version:
App Bridge Host contains components and middleware to be consumed by the app's host, as well as the host itself. The middleware and `Frame` component are responsible for facilitating communication between the client and host, and used to act on actions se
30 lines (26 loc) • 733 B
JavaScript
;
var Actions = require('@shopify/app-bridge-core/actions');
/**
* Returns update user action payload
* @public
*/
function setUser(user) {
return { group: Actions.Group.Pos, type: Actions.Pos.Action.USER_UPDATE, payload: user };
}
/**
* Returns update location action payload
* @public
*/
function setLocation(location) {
return { group: Actions.Group.Pos, type: Actions.Pos.Action.LOCATION_UPDATE, payload: location };
}
/**
* Returns update device action payload
* @public
*/
function setDevice(device) {
return { group: Actions.Group.Pos, type: Actions.Pos.Action.DEVICE_UPDATE, payload: device };
}
exports.setDevice = setDevice;
exports.setLocation = setLocation;
exports.setUser = setUser;