0.0.28 • Published 14 days ago

@purple-dot/browser v0.0.28

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
14 days ago

@purple-dot/browser

This package is a toolbox for connecting your headless ecommerce application to Purple Dot. It provides all the features necessary for your integration, including APIs, cart & checkout functionality, and interceptors.

Please read http://bit.ly/47JtIk0 to learn how to integrate Purple Dot into your headless Shopify storefront.

API

import { init } from '@purple-dot/browser';
import { ShopifyAJAXCart } from '@purple-dot/browser/shopify-ajax-cart';

init({
  apiKey: 'xxx',
  cartAdapter: new ShopifyAJAXCart(),
});

Purple Dot API

import * as api from '@purple-dot/browser/api';

await api.fetchProductsPreorderState('test-product');

await api.fetchVariantsPreorderState(12345);

Cart

import { cartHasPreorderItem } from '@purple-dot/browser/cart';

await cartHasPreorderItem();

Purple Dot Checkout

import * as checkout from '@purple-dot/browser/checkout';

await checkout.open();

Shopify AJAX Cart Interceptors

import * as interceptors from '@purple-dot/browser/shopify-ajax-interceptors';

interceptors.start();
0.0.28

14 days ago

0.0.27

9 months ago

0.0.26

9 months ago

0.0.25

9 months ago

0.0.24

9 months ago

0.0.23

9 months ago

0.0.22

9 months ago

0.0.21

9 months ago

0.0.20

9 months ago

0.0.19

9 months ago

0.0.18

10 months ago

0.0.17

10 months ago

0.0.16

10 months ago

0.0.15

10 months ago

0.0.14

10 months ago

0.0.13

10 months ago

0.0.12

10 months ago

0.0.11

10 months ago

0.0.10

10 months ago

0.0.9

10 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago