@picked/shopify 0.0.101-next.2 → 0.0.101

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 +43 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # @picked/shopify
2
+
3
+ Connects the Picked client to a Shopify storefront: Shopify page predicates, Picked data on
4
+ the cart, and helpers for the storefront APIs.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ npm install picked @picked/shopify
10
+ ```
11
+
12
+ Add `@shopify/storefront-api-client` only if you use `@picked/shopify/storefront-api`.
13
+
14
+ ## Usage
15
+
16
+ ```typescript
17
+ import { createClient } from 'picked'
18
+ import { shopifyPlugin } from '@picked/shopify/plugins/shopify'
19
+
20
+ export const picked = createClient({
21
+ projectId: 'your-project-id',
22
+ plugins: [shopifyPlugin()],
23
+ })
24
+ ```
25
+
26
+ The plugin registers predicates such as `shopify-is-product-page` and `shopify-is-cart-page`,
27
+ and writes `picked.id`, `picked.is_user` and `picked.features.<feature ID>` to the cart
28
+ attributes. It reads `window.pickedConfig`, which the Picked Shopify app adds to your theme.
29
+
30
+ | Import | Gives you |
31
+ | --------------------------------- | ------------------------------------------------------------- |
32
+ | `@picked/shopify/plugins/shopify` | `shopifyPlugin`, and readers for `window.pickedConfig` |
33
+ | `@picked/shopify/ajax-api` | Cart and product calls to the Shopify AJAX API |
34
+ | `@picked/shopify/json-api` | Collection calls to the Shopify JSON API |
35
+ | `@picked/shopify/storefront-api` | A Storefront API client |
36
+ | `@picked/shopify/picked-app` | Product and collection metafields from the Picked Shopify app |
37
+
38
+ ## Docs
39
+
40
+ - **Web:** [Shopify](https://docs.picked.app/reference/sdk/plugins/shopify)
41
+ - **Local:** `node_modules/picked/docs/reference/sdk/plugins/shopify.md`. The `picked` package carries every page under `node_modules/picked/docs/`.
42
+ - **CLI:** `npx picked docs read /reference/sdk/plugins/shopify`. `npx picked docs list [words]` lists the pages.
43
+ - **MCP:** call `read_picked_doc` with `{ "path": "/reference/sdk/plugins/shopify" }`; `list_picked_docs` lists the pages. Add the server with `claude mcp add --transport http picked https://api.picked.app/mcp`, or see [How to connect the MCP server](https://docs.picked.app/how-to/connect-the-mcp-server) for other tools.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@picked/shopify",
3
3
  "description": "Shopify plugin for @picked/client",
4
- "version": "0.0.101-next.2",
4
+ "version": "0.0.101",
5
5
  "devDependencies": {
6
6
  "@picked/client": "workspace:*",
7
7
  "@repo/eslint-config": "workspace:*",
@@ -83,7 +83,7 @@
83
83
  "main": "./dist/cjs/index.js",
84
84
  "module": "./dist/esm/index.js",
85
85
  "peerDependencies": {
86
- "@picked/client": "0.0.101-next.2",
86
+ "@picked/client": "0.0.101",
87
87
  "@shopify/storefront-api-client": "^1.0.10",
88
88
  "effector": "^23.4.4"
89
89
  },