@pintahub/shopify-next 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +5 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -27,7 +27,7 @@ SHOPIFY_GATEWAY_URL=http://shopify-gateway.internal:6100
27
27
  ```ts
28
28
  import {ShopifyClient, SearchMenusCommand, GetMenuCommand} from '@pintahub/shopify-next'
29
29
 
30
- const client = new ShopifyClient({storeId: '6543abc...'})
30
+ const client = new ShopifyClient('6543abc...')
31
31
 
32
32
  // Query
33
33
  const {items, pageInfo} = await client.send(new SearchMenusCommand({first: 50}))
@@ -78,8 +78,7 @@ const loggingMiddleware: Middleware = (next) => async (command) => {
78
78
  }
79
79
  }
80
80
 
81
- const client = new ShopifyClient({
82
- storeId,
81
+ const client = new ShopifyClient(storeId, {
83
82
  middleware: [loggingMiddleware],
84
83
  })
85
84
  ```
@@ -87,8 +86,8 @@ const client = new ShopifyClient({
87
86
  ## Override API version
88
87
 
89
88
  ```ts
90
- const beta = new ShopifyClient({storeId, apiVersion: 'unstable'})
91
- const stable = new ShopifyClient({storeId, apiVersion: '2026-01'}) // pin an older version
89
+ const beta = new ShopifyClient(storeId, {apiVersion: 'unstable'})
90
+ const stable = new ShopifyClient(storeId, {apiVersion: '2026-01'}) // pin an older version
92
91
  ```
93
92
 
94
93
  ## API surface
@@ -130,7 +129,7 @@ Full checklist: see the "Checklist when adding a new Command" section in `CLAUDE
130
129
  Services using `@pintahub/shopify-api` should migrate as two PRs each:
131
130
 
132
131
  1. Refactor v1 → v2 signature in the service code (still using the old dependency).
133
- 2. Swap `@pintahub/shopify-api` → `@pintahub/shopify-next`, replace `new AdminAPI(...)` → `new ShopifyClient({storeId})` and `admin.x.y(...)` → `client.send(new YCommand(...))`.
132
+ 2. Swap `@pintahub/shopify-api` → `@pintahub/shopify-next`, replace `new AdminAPI(...)` → `new ShopifyClient(storeId)` and `admin.x.y(...)` → `client.send(new YCommand(...))`.
134
133
 
135
134
  **Important**: three v1 mutations were removed by Shopify in 2026-04 — there is no `*LegacyCommand` shim, services must refactor:
136
135
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pintahub/shopify-next",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Shopify Admin GraphQL client for pintahub services via shopify-gateway",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",