# shopify-typed-node-api

> Shopify API Typescript Library for Node - accelerate development with support for authentication, graphql proxy, webhooks

Latest version **2.1.1** (published 2024-01-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install shopify-typed-node-api
pnpm add shopify-typed-node-api
yarn add shopify-typed-node-api
bun add shopify-typed-node-api
```

## 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 | 2.1.1 |
| Published | 2024-01-09 |
| First published | 2022-01-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=18.0.0 |
| Dependencies | 8 |
| Unpacked size | 3.9 MB |
| Known vulnerabilities | 0 (+4 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Felix Tellmann |
| Maintainers | felixtellmann |
| Keywords | shopify, node, jwt, app, graphql, rest, webhook, Admin API, Storefront API |

## Links

- npm: https://www.npmjs.com/package/shopify-typed-node-api
- Repository: https://github.com/FelixTellmann/shopify-typed-node-api
- Homepage: https://github.com/FelixTellmann/shopify-typed-node-api#readme
- Issues: https://github.com/FelixTellmann/shopify-typed-node-api/issues
- npm.io page: https://npm.io/package/shopify-typed-node-api

## Dependencies (8)

- [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
- [minimist](https://npm.io/package/minimist.md) ^1.2.6
- [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/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

- 2.1.1 (latest) — 2024-01-09
- 2.1.0 — 2022-12-17
- 2.0.22 — 2022-12-17
- 2.0.21 — 2022-12-17
- 2.0.20 — 2022-09-29
- 2.0.19 — 2022-09-29
- 2.0.18 — 2022-06-14
- 2.0.17 — 2022-04-05
- 2.0.16 — 2022-04-02
- 2.0.15 — 2022-02-15
- 2.0.14 — 2022-02-13
- 2.0.13 — 2022-01-24
- 2.0.12 — 2022-01-21
- 2.0.11 — 2022-01-20
- 2.0.10 — 2022-01-10
- … 9 more at https://npm.io/package/shopify-typed-node-api/versions

## README

# `shopify-typed-node-api`

<!-- ![Build Status]() -->

[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE.md)
[![npm version](https://badge.fury.io/js/shopify-typed-node-api.svg)](https://badge.fury.io/js/shopify-typed-node-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-typed-node-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
