@nacelle/interphase-node

Utility for interacting with Shopify's Storefront Metafield Visibilities

Usage no npm install needed!

<script type="module">
  import nacelleInterphaseNode from 'https://cdn.skypack.dev/@nacelle/interphase-node';
</script>

README

Interphase Node

Interphase is Node abstraction of the Shopify Admin App (Interphase). This utility can be used in one of scripts or other Javascript/Typescript projects.

Table of Contents

  1. Built With
  2. Installation
  3. Directory Structure
  4. Serverless and Plugins
  5. Test Suite
  6. Deployment

Built With

Hail Frequency makes use of the following technology:

  1. Node.js
  2. TypeScript
  3. Mocha

Installation

Pre-Requisites

  1. TypeScript with TSC version Version 3.5.3 or greater
  2. Node with Version 10.15.3 or greater

Installation

  1. npm install @nacelle/interphase-node --save

Usage

Init

import { Interphase } from '@nacelle/interphase-node'

const store = 'starship-furniture' // Shopify Store Name
const accessToken = 'xxxxxxxxxxxxxxxxxxxx'  // Shopify GraphQL Admin API

const interphase = new Interphase(store, accessToken)

Create

const response = interphase.create({
  input: {
    namespace: 'test_namespace',
    key: 'test_key',
    ownerType: 'PRODUCT'
  }
})

Get

const response = interphase.get()

Delete

const response = interphase.delete({
  id: node.id
})

Recharge (creates all recharge metafieldVisibilities)

const response = interphase.Recharge.createAll()

Development

  1. Clone repo
  2. Run npm install via terminal inside the project directory
  3. Run npm run start (will watch for changes in ./src)

Test Suite

This project uses Mocha and Chai. To run tests run npm run test in your terminal.

This project expects a TDD workflow.

Contributions

  1. Original Author - Caleb Bodtorf