@shopgate/pwa-webcheckout-shopify
Version:
Webcheckout Shopify library for the Shopgate Connect PWA.
13 lines • 952 B
JavaScript
import{main$}from'@shopgate/pwa-common/streams/main';import{SUCCESS_SHOPIFY_LOGIN,ERROR_SHOPIFY_LOGIN,WEBCHECKOUT_REGISTER_REDIRECT}from"../constants";/**
* Gets triggered on successful Shopify login.
* @type {Observable}
*/export var shopifyDidLogin$=main$.filter(function(_ref){var action=_ref.action;return action.type===SUCCESS_SHOPIFY_LOGIN;});/**
* Gets triggered on failed Shopify login.
* @type {Observable}
*/export var shopifyLoginFailed$=main$.filter(function(_ref2){var action=_ref2.action;return action.type===ERROR_SHOPIFY_LOGIN;});/**
* Gets triggered on any Shopify login response (success or error).
* @type {Observable}
*/export var shopifyDidRespond$=shopifyDidLogin$.merge(shopifyLoginFailed$);/**
* Gets triggered before redirect to we registration
* @type {Observable}
*/export var webCheckoutRegisterRedirect$=main$.filter(function(_ref3){var action=_ref3.action;return action.type===WEBCHECKOUT_REGISTER_REDIRECT;});