# shopify-api-browserified

> Fork of @shopify/shopify-api, browserified for easier use in Cloudflare Workers

Latest version **1.4.0** (published 2021-05-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install shopify-api-browserified
pnpm add shopify-api-browserified
yarn add shopify-api-browserified
bun add shopify-api-browserified
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2021-05-27 |
| First published | 2021-05-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 2.4 MB |
| Known vulnerabilities | 0 (+4 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Shopify Inc. |
| Maintainers | irvinebroque |
| Keywords | shopify, node, jwt, app, graphql, rest, webhook, Admin API, Storefront API |

## Links

- npm: https://www.npmjs.com/package/shopify-api-browserified
- Repository: https://github.com/irvinebroque/shopify-node-api
- Issues: https://github.com/irvinebroque/shopify-node-api/issues
- npm.io page: https://npm.io/package/shopify-api-browserified

## Dependencies (9)

- [uuid](https://npm.io/package/uuid.md) ^8.3.1
- [tslib](https://npm.io/package/tslib.md) ^2.0.3
- [cookies](https://npm.io/package/cookies.md) ^0.8.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.5.1
- [@shopify/network](https://npm.io/package/@shopify/network.md) ^1.5.1
- [@types/supertest](https://npm.io/package/@types/supertest.md) ^2.0.10
- [@types/node-fetch](https://npm.io/package/@types/node-fetch.md) ^2.5.7
- [@types/jsonwebtoken](https://npm.io/package/@types/jsonwebtoken.md) ^8.5.0

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 1.4.0 (latest) — 2021-05-27

## README

# `@shopify/shopify-api`

## Browserified fork for use with Cloudflare Workers, without having to polyfill node at build time

<!-- ![Build Status]() -->
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE.md)
[![npm version](https://badge.fury.io/js/%40shopify%2Fshopify-api.svg)](https://badge.fury.io/js/%40shopify%2Fshopify-api)

This library provides support for TypeScript/JavaScript [Shopify](https://www.shopify.com) apps to access the [Shopify Admin API](https://shopify.dev/docs/admin-api), by making it easier to perform the following actions:

- Creating [online](https://shopify.dev/concepts/about-apis/authentication#online-access) or [offline](https://shopify.dev/concepts/about-apis/authentication#offline-access) access tokens for the Admin API via OAuth
- Making requests to the [REST API](https://shopify.dev/docs/admin-api/rest/reference)
- Making requests to the [GraphQL API](https://shopify.dev/docs/admin-api/graphql/reference)
- Register/process webhooks

Once your app has access to the Admin API, you can also access the [Shopify Storefront API](https://shopify.dev/docs/storefront-api) to run GraphQL queries using the `unauthenticated_*` access scopes.

This library can be used in any application that has a Node.js backend, since it doesn't rely on any specific framework—you can include it alongside your preferred stack and only use the features that you need to build your app.

# Requirements

To follow these usage guides, you will need to:
- have a basic understanding of [Node.js](https://nodejs.org)
- have a Shopify Partner account and development store
- _OR_ have a test store where you can create a private app
- have a private or custom app already set up in your test store or partner account
- use [ngrok](https://ngrok.com), in order to create a secure tunnel to your app running on your localhost
- add the `ngrok` URL and the appropriate redirect for your OAuth callback route to your app settings
- have [yarn](https://yarnpkg.com) installed

<!-- Make sure this section is in sync with docs/README.md -->
# Getting started

You can follow our [getting started guide](docs/), which will provide instructions on how to create an app using plain Node.js code, or the [Express](https://expressjs.com/) framework. Both examples are written in Typescript.

- [Getting started](docs/getting_started.md)
  - [Install dependencies](docs/getting_started.md#install-dependencies)
  - [Set up base files](docs/getting_started.md#set-up-base-files)
  - [Set up environment](docs/getting_started.md#set-up-environment)
  - [Set up Context](docs/getting_started.md#set-up-context)
  - [Running your app](docs/getting_started.md#running-your-app)
- [Performing OAuth](docs/usage/oauth.md)
  - [Add a route to start OAuth](docs/usage/oauth.md#add-a-route-to-start-oauth)
  - [Add your OAuth callback route](docs/usage/oauth.md#add-your-oauth-callback-route)
  - [Fetching sessions](docs/usage/oauth.md#fetching-sessions)
  - [Detecting scope changes](docs/usage/oauth.md#detecting-scope-changes)
- [Make a REST API call](docs/usage/rest.md)
- [Make a GraphQL API call](docs/usage/graphql.md)
- [Make a Storefront API call](docs/usage/storefront.md)
- [Webhooks](docs/usage/webhooks.md)
  - [Register a Webhook](docs/usage/webhooks.md#register-a-webhook)
  - [Process a Webhook](docs/usage/webhooks.md#process-a-webhook)
- [Known issues and caveats](docs/issues.md)
  - [Notes on session handling](docs/issues.md#notes-on-session-handling)

---
_Source: https://npm.io/package/shopify-api-browserified · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
