From 3a026c8906e9cd764c60afc2817bf294e13c78e7 Mon Sep 17 00:00:00 2001 From: Kevin O'Sullivan Date: Wed, 29 Jun 2022 15:57:27 -0400 Subject: [PATCH] Add LATEST_API_VERSION constant --- CHANGELOG.md | 2 ++ src/base-types.ts | 3 ++- src/index.ts | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aad8cb3f4..2434f8ce0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased +- Add REST resources for July 2022 API version, add `Shopify.LATEST_API_VERSION` constant, remove support and REST resources for July 2021 API version []() + ### Added - Add support for July 2022 API version [#409](https://github.com/Shopify/shopify-node-api/pull/409) diff --git a/src/base-types.ts b/src/base-types.ts index 8b8c1b19c..22d6c9d0d 100644 --- a/src/base-types.ts +++ b/src/base-types.ts @@ -17,7 +17,6 @@ export interface ContextParams { } export enum ApiVersion { - July21 = '2021-07', October21 = '2021-10', January22 = '2022-01', April22 = '2022-04', @@ -25,6 +24,8 @@ export enum ApiVersion { Unstable = 'unstable', } +export const LATEST_API_VERSION = ApiVersion.July22; + export enum ShopifyHeader { AccessToken = 'X-Shopify-Access-Token', StorefrontAccessToken = 'X-Shopify-Storefront-Access-Token', diff --git a/src/index.ts b/src/index.ts index 680838fdf..7886a7bad 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,9 +5,11 @@ import ShopifySession from './auth/session'; import ShopifyClients from './clients'; import ShopifyUtils from './utils'; import ShopifyWebhooks from './webhooks'; +import {LATEST_API_VERSION} from './base-types'; export const Shopify = { Context, + LATEST_API_VERSION, Auth: ShopifyAuth, Session: ShopifySession, Clients: ShopifyClients,