@keystrokehq/shopify 0.0.15 → 0.0.16-integration-id-canonicalization.1

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 (53) hide show
  1. package/README.md +14 -153
  2. package/dist/{schemas.d.mts → common-C2s35du9.d.mts} +3 -2
  3. package/dist/{schemas.mjs → common-JZyHdK6p.mjs} +3 -3
  4. package/dist/credential-sets/index.d.mts +2 -0
  5. package/dist/credential-sets/index.mjs +4 -0
  6. package/dist/index.d.mts +4 -1
  7. package/dist/index.mjs +6 -1
  8. package/dist/operations/index.d.mts +2 -0
  9. package/dist/operations/index.mjs +3 -0
  10. package/dist/schemas/index.d.mts +2 -0
  11. package/dist/schemas/index.mjs +3 -0
  12. package/dist/shopify-app.credential-set-M3vKwTji.mjs +17 -0
  13. package/dist/shopify-app.credential-set-gdNuCDtd.d.mts +39 -0
  14. package/dist/shopify.credential-set-C_SrMLjT.mjs +53 -0
  15. package/dist/update-shopify-product.operation-CtjraWjR.d.mts +1724 -0
  16. package/dist/update-shopify-product.operation-DsAjcvO8.mjs +1972 -0
  17. package/package.json +13 -69
  18. package/dist/_official/index.d.mts +0 -33
  19. package/dist/_official/index.mjs +0 -3
  20. package/dist/_runtime/index.d.mts +0 -56
  21. package/dist/_runtime/index.mjs +0 -150
  22. package/dist/articles.d.mts +0 -158
  23. package/dist/articles.mjs +0 -252
  24. package/dist/blogs.d.mts +0 -97
  25. package/dist/blogs.mjs +0 -174
  26. package/dist/client.d.mts +0 -22
  27. package/dist/client.mjs +0 -90
  28. package/dist/collections.d.mts +0 -121
  29. package/dist/collections.mjs +0 -209
  30. package/dist/connection.d.mts +0 -2
  31. package/dist/connection.mjs +0 -3
  32. package/dist/customers.d.mts +0 -142
  33. package/dist/customers.mjs +0 -225
  34. package/dist/events.d.mts +0 -181
  35. package/dist/events.mjs +0 -67
  36. package/dist/factory-DwZJl9JC.mjs +0 -8
  37. package/dist/fulfillments.d.mts +0 -89
  38. package/dist/fulfillments.mjs +0 -167
  39. package/dist/integration-B5LK_0eR.mjs +0 -63
  40. package/dist/integration-DrHCkXco.d.mts +0 -27
  41. package/dist/inventory.d.mts +0 -90
  42. package/dist/inventory.mjs +0 -182
  43. package/dist/locations.d.mts +0 -40
  44. package/dist/locations.mjs +0 -81
  45. package/dist/messaging.d.mts +0 -1
  46. package/dist/messaging.mjs +0 -1
  47. package/dist/operation-helpers-CKEDIx0o.mjs +0 -21
  48. package/dist/orders.d.mts +0 -213
  49. package/dist/orders.mjs +0 -271
  50. package/dist/products.d.mts +0 -139
  51. package/dist/products.mjs +0 -171
  52. package/dist/shop.d.mts +0 -16
  53. package/dist/shop.mjs +0 -31
package/README.md CHANGED
@@ -1,35 +1,25 @@
1
1
  # @keystrokehq/shopify
2
2
 
3
- Shopify Admin API integration for Keystroke workflows.
3
+ Shopify Admin API integration for Keystroke workflows. The package follows the canonical Playbook 18 **strict** shape: credential sets and operations are discovered from source primitives, while `src/provider-apps/` retains the platform provider-app seed descriptor.
4
4
 
5
- The package root is intentionally non-canonical. Import from explicit subpaths.
5
+ Per-store `SHOPIFY_STORE_DOMAIN` and `SHOPIFY_ACCESS_TOKEN` fields are required on the user credential set. OAuth uses shop-domain templating via `src/utils/oauth-connection.ts`. Webhook subscription helpers live in `src/utils/webhook-management.ts` (not catalog operations).
6
6
 
7
7
  ## Public Subpaths
8
8
 
9
- - `@keystrokehq/shopify/connection`
10
- - `@keystrokehq/shopify/client`
9
+ - `@keystrokehq/shopify` — root barrel (`credential-sets`, `operations`, `schemas`)
10
+ - `@keystrokehq/shopify/credential-sets`
11
+ - `@keystrokehq/shopify/operations`
11
12
  - `@keystrokehq/shopify/schemas`
12
- - `@keystrokehq/shopify/events`
13
- - `@keystrokehq/shopify/shop`
14
- - `@keystrokehq/shopify/products`
15
- - `@keystrokehq/shopify/collections`
16
- - `@keystrokehq/shopify/orders`
17
- - `@keystrokehq/shopify/customers`
18
- - `@keystrokehq/shopify/blogs`
19
- - `@keystrokehq/shopify/articles`
20
- - `@keystrokehq/shopify/locations`
21
- - `@keystrokehq/shopify/inventory`
22
- - `@keystrokehq/shopify/fulfillments`
23
- - `@keystrokehq/shopify/triggers`
13
+ - `catalog discovery via `src/provider-apps/`` — provider seed descriptor only
24
14
 
25
15
  ## Read Store Data
26
16
 
27
17
  ```ts
28
18
  import { Workflow } from '@keystrokehq/core';
29
19
  import { z } from 'zod';
30
- import { shopify } from '@keystrokehq/shopify/connection';
31
- import { getShop } from '@keystrokehq/shopify/shop';
32
- import { listProducts } from '@keystrokehq/shopify/products';
20
+ import { shopifyCredentialSet } from '@keystrokehq/shopify/credential-sets';
21
+ import { getShopOperation } from '@keystrokehq/shopify/operations';
22
+ import { listProductsOperation } from '@keystrokehq/shopify/operations';
33
23
 
34
24
  export const syncCatalog = new Workflow({
35
25
  id: 'sync-shopify-catalog',
@@ -40,139 +30,10 @@ export const syncCatalog = new Workflow({
40
30
  storeName: z.string(),
41
31
  productCount: z.number(),
42
32
  }),
43
- run: async () => {
44
- const store = await getShop.run({});
45
- const products = await listProducts.run({
46
- first: 25,
47
- query: 'status:active',
48
- });
49
-
50
- return {
51
- credentialSetId: shopify.resolvedCredentialSetId,
52
- storeName: store.name,
53
- productCount: products.nodes.length,
54
- };
55
- },
56
- });
57
- ```
58
-
59
- ## Create Orders And Adjust Inventory
60
-
61
- ```ts
62
- import { Workflow } from '@keystrokehq/core';
63
- import { z } from 'zod';
64
- import { createOrder } from '@keystrokehq/shopify/orders';
65
- import { adjustInventoryQuantities } from '@keystrokehq/shopify/inventory';
66
-
67
- export const backofficeWriteFlow = new Workflow({
68
- id: 'shopify-backoffice-write-flow',
69
- name: 'Shopify Backoffice Write Flow',
70
- input: z.object({ variantId: z.string(), inventoryItemId: z.string(), locationId: z.string() }),
71
- output: z.object({ queued: z.boolean() }),
72
- run: async (input) => {
73
- await createOrder.run({
74
- currency: 'USD',
75
- email: 'buyer@example.com',
76
- lineItems: [
77
- {
78
- variantId: input.variantId,
79
- quantity: 1,
80
- },
81
- ],
82
- });
83
-
84
- await adjustInventoryQuantities.run({
85
- reason: 'correction',
86
- referenceDocumentUri: 'gid://keystroke/inventory-adjustment/docs-example',
87
- changes: [
88
- {
89
- inventoryItemId: input.inventoryItemId,
90
- locationId: input.locationId,
91
- delta: -1,
92
- },
93
- ],
94
- });
95
-
96
- return { queued: true };
97
- },
33
+ steps: [
34
+ getShopOperation.asStep('shop'),
35
+ listProductsOperation.asStep('products'),
36
+ ],
37
+ credentialSets: [shopifyCredentialSet],
98
38
  });
99
39
  ```
100
-
101
- ## Bind Webhook Triggers
102
-
103
- ```ts
104
- import { Workflow } from '@keystrokehq/core';
105
- import { z } from 'zod';
106
- import { webhooks } from '@keystrokehq/shopify/triggers';
107
-
108
- const orderCreated = webhooks.orderCreated({
109
- name: 'Shopify Order Created',
110
- transform: (event) => ({
111
- orderId: event.resourceId ?? event.payload.admin_graphql_api_id ?? '',
112
- topic: event.topic,
113
- }),
114
- });
115
-
116
- export const onNewShopifyOrder = new Workflow({
117
- id: 'on-new-shopify-order',
118
- name: 'On New Shopify Order',
119
- input: z.object({
120
- orderId: z.string(),
121
- topic: z.literal('orders/create'),
122
- }),
123
- output: z.object({ ok: z.boolean() }),
124
- triggers: [orderCreated],
125
- run: async () => ({ ok: true }),
126
- });
127
- ```
128
-
129
- ## Notes
130
-
131
- - Mutating operations are marked with `needsApproval: true`.
132
- - Shopify webhook helpers are direct-binding surfaces under `@keystrokehq/shopify/triggers`.
133
- - Hidden `_official` and `_runtime` exports are for repo internals, not workflow authoring.
134
-
135
- ## Live Test Runbook
136
-
137
- The Shopify package now has dedicated `test:int` coverage for every exported operation plus live webhook subscription management:
138
-
139
- - `shop.int.test.ts`
140
- - `products.int.test.ts`
141
- - `collections.int.test.ts`
142
- - `customers.int.test.ts`
143
- - `blogs.int.test.ts`
144
- - `articles.int.test.ts`
145
- - `orders.int.test.ts`
146
- - `inventory.int.test.ts`
147
- - `locations.int.test.ts`
148
- - `fulfillments.int.test.ts`
149
- - `webhook-management.int.test.ts`
150
-
151
- Set up `.env.test` with at least:
152
-
153
- - `RUN_LIVE_INT=true`
154
- - `SHOPIFY_LIVE_STORE_DOMAIN`
155
- - `SHOPIFY_LIVE_ACCESS_TOKEN`
156
- - `SHOPIFY_LIVE_REFRESH_TOKEN` for control-plane refresh coverage
157
- - `PUBLIC_SERVER_URL` for webhook subscription coverage
158
- - `KEYSTROKE_OFFICIAL_SHOPIFY_APP_ID`
159
- - `KEYSTROKE_OFFICIAL_SHOPIFY_CLIENT_ID`
160
- - `KEYSTROKE_OFFICIAL_SHOPIFY_CLIENT_SECRET`
161
- - `KEYSTROKE_OFFICIAL_SHOPIFY_WEBHOOK_SECRET`
162
-
163
- Recommended execution flow:
164
-
165
- ```bash
166
- pnpm test:int:wiring
167
- pnpm --filter @keystrokehq/shopify test:int
168
- pnpm --filter @keystroke/server test:int
169
- pnpm --filter @keystroke/control-plane test:int
170
- ```
171
-
172
- Operational guidance:
173
-
174
- - Use a dedicated disposable dev store. `orders`, `inventory`, `fulfillments`, and webhook tests are destructive by design.
175
- - Keep `PUBLIC_SERVER_URL` pointed at a real public tunnel or staging URL when exercising webhook subscription or OAuth callback flows.
176
- - The package test helpers try to clean up created products, collections, blogs, articles, and order-free customers automatically.
177
- - Orders with fulfillment history and customers with placed orders should be treated as disposable-store artifacts rather than shared-environment fixtures.
178
- - Shopify webhook subscription management requires `read_webhooks` and `write_webhooks` scopes in addition to the Admin API scopes used by the operation surface.
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
 
3
- //#region src/schemas.d.ts
3
+ //#region src/schemas/common.d.ts
4
+ declare const shopifyStoreDomainSchema: z.ZodString;
4
5
  declare const shopifyCredentialsSchema: z.ZodObject<{
5
6
  SHOPIFY_STORE_DOMAIN: z.ZodString;
6
7
  SHOPIFY_ACCESS_TOKEN: z.ZodString;
@@ -230,4 +231,4 @@ type ShopifyFulfillment = z.infer<typeof shopifyFulfillmentSchema>;
230
231
  type ShopifyBlog = z.infer<typeof shopifyBlogSchema>;
231
232
  type ShopifyArticle = z.infer<typeof shopifyArticleSchema>;
232
233
  //#endregion
233
- export { ShopifyArticle, ShopifyBlog, ShopifyCollection, ShopifyCredentialsShape, ShopifyCustomer, ShopifyFulfillment, ShopifyInventoryLevel, ShopifyJob, ShopifyLocation, ShopifyOrder, ShopifyProduct, ShopifyShop, shopifyArticleSchema, shopifyBlogSchema, shopifyCollectionSchema, shopifyConnectionNodesSchema, shopifyCredentialsSchema, shopifyCustomerSchema, shopifyFulfillmentSchema, shopifyGlobalIdSchema, shopifyGraphqlErrorSchema, shopifyImageSchema, shopifyInventoryItemSchema, shopifyInventoryLevelSchema, shopifyJobSchema, shopifyLocationSchema, shopifyMetafieldSchema, shopifyMoneyBagSchema, shopifyMoneySchema, shopifyOrderSchema, shopifyPageInfoSchema, shopifyProductSchema, shopifySeoSchema, shopifyShopSchema, shopifyUserErrorSchema };
234
+ export { shopifyOrderSchema as A, shopifyInventoryItemSchema as C, shopifyMetafieldSchema as D, shopifyLocationSchema as E, shopifyStoreDomainSchema as F, shopifyUserErrorSchema as I, shopifyProductSchema as M, shopifySeoSchema as N, shopifyMoneyBagSchema as O, shopifyShopSchema as P, shopifyImageSchema as S, shopifyJobSchema as T, shopifyCredentialsSchema as _, ShopifyCustomer as a, shopifyGlobalIdSchema as b, ShopifyJob as c, ShopifyProduct as d, ShopifyShop as f, shopifyConnectionNodesSchema as g, shopifyCollectionSchema as h, ShopifyCredentialsShape as i, shopifyPageInfoSchema as j, shopifyMoneySchema as k, ShopifyLocation as l, shopifyBlogSchema as m, ShopifyBlog as n, ShopifyFulfillment as o, shopifyArticleSchema as p, ShopifyCollection as r, ShopifyInventoryLevel as s, ShopifyArticle as t, ShopifyOrder as u, shopifyCustomerSchema as v, shopifyInventoryLevelSchema as w, shopifyGraphqlErrorSchema as x, shopifyFulfillmentSchema as y };
@@ -1,7 +1,7 @@
1
- import { i as shopifyStoreDomainSchema } from "./integration-B5LK_0eR.mjs";
2
1
  import { z } from "zod";
3
2
 
4
- //#region src/schemas.ts
3
+ //#region src/schemas/common.ts
4
+ const shopifyStoreDomainSchema = z.string().min(1).regex(/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/i, "Shopify store domain must look like \"example.myshopify.com\".");
5
5
  const shopifyCredentialsSchema = z.object({
6
6
  SHOPIFY_STORE_DOMAIN: shopifyStoreDomainSchema,
7
7
  SHOPIFY_ACCESS_TOKEN: z.string().min(1)
@@ -161,4 +161,4 @@ const shopifyArticleSchema = z.object({
161
161
  });
162
162
 
163
163
  //#endregion
164
- export { shopifyArticleSchema, shopifyBlogSchema, shopifyCollectionSchema, shopifyConnectionNodesSchema, shopifyCredentialsSchema, shopifyCustomerSchema, shopifyFulfillmentSchema, shopifyGlobalIdSchema, shopifyGraphqlErrorSchema, shopifyImageSchema, shopifyInventoryItemSchema, shopifyInventoryLevelSchema, shopifyJobSchema, shopifyLocationSchema, shopifyMetafieldSchema, shopifyMoneyBagSchema, shopifyMoneySchema, shopifyOrderSchema, shopifyPageInfoSchema, shopifyProductSchema, shopifySeoSchema, shopifyShopSchema, shopifyUserErrorSchema };
164
+ export { shopifyStoreDomainSchema as C, shopifyShopSchema as S, shopifyMoneySchema as _, shopifyCredentialsSchema as a, shopifyProductSchema as b, shopifyGlobalIdSchema as c, shopifyInventoryItemSchema as d, shopifyInventoryLevelSchema as f, shopifyMoneyBagSchema as g, shopifyMetafieldSchema as h, shopifyConnectionNodesSchema as i, shopifyGraphqlErrorSchema as l, shopifyLocationSchema as m, shopifyBlogSchema as n, shopifyCustomerSchema as o, shopifyJobSchema as p, shopifyCollectionSchema as r, shopifyFulfillmentSchema as s, shopifyArticleSchema as t, shopifyImageSchema as u, shopifyOrderSchema as v, shopifyUserErrorSchema as w, shopifySeoSchema as x, shopifyPageInfoSchema as y };
@@ -0,0 +1,2 @@
1
+ import { i as shopifyCredentialSet, n as shopifyAppCredentialSet, r as ShopifyCredentials, t as ShopifyAppCredentials } from "../shopify-app.credential-set-gdNuCDtd.mjs";
2
+ export { type ShopifyAppCredentials, type ShopifyCredentials, shopifyAppCredentialSet, shopifyCredentialSet };
@@ -0,0 +1,4 @@
1
+ import { t as shopifyCredentialSet } from "../shopify.credential-set-C_SrMLjT.mjs";
2
+ import { t as shopifyAppCredentialSet } from "../shopify-app.credential-set-M3vKwTji.mjs";
3
+
4
+ export { shopifyAppCredentialSet, shopifyCredentialSet };
package/dist/index.d.mts CHANGED
@@ -1 +1,4 @@
1
- export { };
1
+ import { i as shopifyCredentialSet, n as shopifyAppCredentialSet, r as ShopifyCredentials, t as ShopifyAppCredentials } from "./shopify-app.credential-set-gdNuCDtd.mjs";
2
+ import { A as deleteCollectionOperation, B as cancelOrderOperation, C as getCustomerOrdersOperation, D as getArticleOperation, E as getBlogOperation, F as createFulfillmentOperation, H as addProductsToCollectionOperation, I as createCustomerOperation, L as createCollectionOperation, M as deleteArticleOperation, N as createProductOperation, O as deleteProductOperation, P as createOrderOperation, R as createBlogOperation, S as getFulfillmentOperation, T as getCollectionOperation, V as adjustInventoryQuantitiesOperation, _ as getProductOperation, a as updateArticleOperation, b as getInventoryLevelsForItemOperation, c as listOrdersOperation, d as listFulfillmentOrdersForOrderOperation, f as listCustomersOperation, g as getShopOperation, h as listArticlesOperation, i as updateBlogOperation, j as deleteBlogOperation, k as deleteCustomerOperation, l as listLocationsOperation, m as listBlogsOperation, n as updateOrderOperation, o as removeProductsFromCollectionOperation, p as listCollectionsOperation, r as updateCustomerOperation, s as listProductsOperation, t as updateProductOperation, u as listInventoryItemsOperation, v as getOrderOperation, w as getCustomerOperation, x as getInventoryItemOperation, y as getLocationOperation, z as createArticleOperation } from "./update-shopify-product.operation-CtjraWjR.mjs";
3
+ import { A as shopifyOrderSchema, C as shopifyInventoryItemSchema, D as shopifyMetafieldSchema, E as shopifyLocationSchema, F as shopifyStoreDomainSchema, I as shopifyUserErrorSchema, M as shopifyProductSchema, N as shopifySeoSchema, O as shopifyMoneyBagSchema, P as shopifyShopSchema, S as shopifyImageSchema, T as shopifyJobSchema, _ as shopifyCredentialsSchema, a as ShopifyCustomer, b as shopifyGlobalIdSchema, c as ShopifyJob, d as ShopifyProduct, f as ShopifyShop, g as shopifyConnectionNodesSchema, h as shopifyCollectionSchema, i as ShopifyCredentialsShape, j as shopifyPageInfoSchema, k as shopifyMoneySchema, l as ShopifyLocation, m as shopifyBlogSchema, n as ShopifyBlog, o as ShopifyFulfillment, p as shopifyArticleSchema, r as ShopifyCollection, s as ShopifyInventoryLevel, t as ShopifyArticle, u as ShopifyOrder, v as shopifyCustomerSchema, w as shopifyInventoryLevelSchema, x as shopifyGraphqlErrorSchema, y as shopifyFulfillmentSchema } from "./common-C2s35du9.mjs";
4
+ export { ShopifyAppCredentials, ShopifyArticle, ShopifyBlog, ShopifyCollection, ShopifyCredentials, ShopifyCredentialsShape, ShopifyCustomer, ShopifyFulfillment, ShopifyInventoryLevel, ShopifyJob, ShopifyLocation, ShopifyOrder, ShopifyProduct, ShopifyShop, addProductsToCollectionOperation, addProductsToCollectionOperation as addProductsToCollectionTool, adjustInventoryQuantitiesOperation, adjustInventoryQuantitiesOperation as adjustInventoryQuantitiesTool, cancelOrderOperation, cancelOrderOperation as cancelOrderTool, createArticleOperation, createArticleOperation as createArticleTool, createBlogOperation, createBlogOperation as createBlogTool, createCollectionOperation, createCollectionOperation as createCollectionTool, createCustomerOperation, createCustomerOperation as createCustomerTool, createFulfillmentOperation, createFulfillmentOperation as createFulfillmentTool, createOrderOperation, createOrderOperation as createOrderTool, createProductOperation, createProductOperation as createProductTool, deleteArticleOperation, deleteArticleOperation as deleteArticleTool, deleteBlogOperation, deleteBlogOperation as deleteBlogTool, deleteCollectionOperation, deleteCollectionOperation as deleteCollectionTool, deleteCustomerOperation, deleteCustomerOperation as deleteCustomerTool, deleteProductOperation, deleteProductOperation as deleteProductTool, getArticleOperation, getArticleOperation as getArticleTool, getBlogOperation, getBlogOperation as getBlogTool, getCollectionOperation, getCollectionOperation as getCollectionTool, getCustomerOperation, getCustomerOperation as getCustomerTool, getCustomerOrdersOperation, getCustomerOrdersOperation as getCustomerOrdersTool, getFulfillmentOperation, getFulfillmentOperation as getFulfillmentTool, getInventoryItemOperation, getInventoryItemOperation as getInventoryItemTool, getInventoryLevelsForItemOperation, getInventoryLevelsForItemOperation as getInventoryLevelsForItemTool, getLocationOperation, getLocationOperation as getLocationTool, getOrderOperation, getOrderOperation as getOrderTool, getProductOperation, getProductOperation as getProductTool, getShopOperation, getShopOperation as getShopTool, listArticlesOperation, listArticlesOperation as listArticlesTool, listBlogsOperation, listBlogsOperation as listBlogsTool, listCollectionsOperation, listCollectionsOperation as listCollectionsTool, listCustomersOperation, listCustomersOperation as listCustomersTool, listFulfillmentOrdersForOrderOperation, listFulfillmentOrdersForOrderOperation as listFulfillmentOrdersForOrderTool, listInventoryItemsOperation, listInventoryItemsOperation as listInventoryItemsTool, listLocationsOperation, listLocationsOperation as listLocationsTool, listOrdersOperation, listOrdersOperation as listOrdersTool, listProductsOperation, listProductsOperation as listProductsTool, removeProductsFromCollectionOperation, removeProductsFromCollectionOperation as removeProductsFromCollectionTool, shopifyAppCredentialSet, shopifyArticleSchema, shopifyBlogSchema, shopifyCollectionSchema, shopifyConnectionNodesSchema, shopifyCredentialSet, shopifyCredentialsSchema, shopifyCustomerSchema, shopifyFulfillmentSchema, shopifyGlobalIdSchema, shopifyGraphqlErrorSchema, shopifyImageSchema, shopifyInventoryItemSchema, shopifyInventoryLevelSchema, shopifyJobSchema, shopifyLocationSchema, shopifyMetafieldSchema, shopifyMoneyBagSchema, shopifyMoneySchema, shopifyOrderSchema, shopifyPageInfoSchema, shopifyProductSchema, shopifySeoSchema, shopifyShopSchema, shopifyStoreDomainSchema, shopifyUserErrorSchema, updateArticleOperation, updateArticleOperation as updateArticleTool, updateBlogOperation, updateBlogOperation as updateBlogTool, updateCustomerOperation, updateCustomerOperation as updateCustomerTool, updateOrderOperation, updateOrderOperation as updateOrderTool, updateProductOperation, updateProductOperation as updateProductTool };
package/dist/index.mjs CHANGED
@@ -1 +1,6 @@
1
- export { };
1
+ import { C as shopifyStoreDomainSchema, S as shopifyShopSchema, _ as shopifyMoneySchema, a as shopifyCredentialsSchema, b as shopifyProductSchema, c as shopifyGlobalIdSchema, d as shopifyInventoryItemSchema, f as shopifyInventoryLevelSchema, g as shopifyMoneyBagSchema, h as shopifyMetafieldSchema, i as shopifyConnectionNodesSchema, l as shopifyGraphqlErrorSchema, m as shopifyLocationSchema, n as shopifyBlogSchema, o as shopifyCustomerSchema, p as shopifyJobSchema, r as shopifyCollectionSchema, s as shopifyFulfillmentSchema, t as shopifyArticleSchema, u as shopifyImageSchema, v as shopifyOrderSchema, w as shopifyUserErrorSchema, x as shopifySeoSchema, y as shopifyPageInfoSchema } from "./common-JZyHdK6p.mjs";
2
+ import { t as shopifyCredentialSet } from "./shopify.credential-set-C_SrMLjT.mjs";
3
+ import { t as shopifyAppCredentialSet } from "./shopify-app.credential-set-M3vKwTji.mjs";
4
+ import { A as deleteCollectionOperation, B as cancelOrderOperation, C as getCustomerOrdersOperation, D as getArticleOperation, E as getBlogOperation, F as createFulfillmentOperation, H as addProductsToCollectionOperation, I as createCustomerOperation, L as createCollectionOperation, M as deleteArticleOperation, N as createProductOperation, O as deleteProductOperation, P as createOrderOperation, R as createBlogOperation, S as getFulfillmentOperation, T as getCollectionOperation, V as adjustInventoryQuantitiesOperation, _ as getProductOperation, a as updateArticleOperation, b as getInventoryLevelsForItemOperation, c as listOrdersOperation, d as listFulfillmentOrdersForOrderOperation, f as listCustomersOperation, g as getShopOperation, h as listArticlesOperation, i as updateBlogOperation, j as deleteBlogOperation, k as deleteCustomerOperation, l as listLocationsOperation, m as listBlogsOperation, n as updateOrderOperation, o as removeProductsFromCollectionOperation, p as listCollectionsOperation, r as updateCustomerOperation, s as listProductsOperation, t as updateProductOperation, u as listInventoryItemsOperation, v as getOrderOperation, w as getCustomerOperation, x as getInventoryItemOperation, y as getLocationOperation, z as createArticleOperation } from "./update-shopify-product.operation-DsAjcvO8.mjs";
5
+
6
+ export { addProductsToCollectionOperation, addProductsToCollectionOperation as addProductsToCollectionTool, adjustInventoryQuantitiesOperation, adjustInventoryQuantitiesOperation as adjustInventoryQuantitiesTool, cancelOrderOperation, cancelOrderOperation as cancelOrderTool, createArticleOperation, createArticleOperation as createArticleTool, createBlogOperation, createBlogOperation as createBlogTool, createCollectionOperation, createCollectionOperation as createCollectionTool, createCustomerOperation, createCustomerOperation as createCustomerTool, createFulfillmentOperation, createFulfillmentOperation as createFulfillmentTool, createOrderOperation, createOrderOperation as createOrderTool, createProductOperation, createProductOperation as createProductTool, deleteArticleOperation, deleteArticleOperation as deleteArticleTool, deleteBlogOperation, deleteBlogOperation as deleteBlogTool, deleteCollectionOperation, deleteCollectionOperation as deleteCollectionTool, deleteCustomerOperation, deleteCustomerOperation as deleteCustomerTool, deleteProductOperation, deleteProductOperation as deleteProductTool, getArticleOperation, getArticleOperation as getArticleTool, getBlogOperation, getBlogOperation as getBlogTool, getCollectionOperation, getCollectionOperation as getCollectionTool, getCustomerOperation, getCustomerOperation as getCustomerTool, getCustomerOrdersOperation, getCustomerOrdersOperation as getCustomerOrdersTool, getFulfillmentOperation, getFulfillmentOperation as getFulfillmentTool, getInventoryItemOperation, getInventoryItemOperation as getInventoryItemTool, getInventoryLevelsForItemOperation, getInventoryLevelsForItemOperation as getInventoryLevelsForItemTool, getLocationOperation, getLocationOperation as getLocationTool, getOrderOperation, getOrderOperation as getOrderTool, getProductOperation, getProductOperation as getProductTool, getShopOperation, getShopOperation as getShopTool, listArticlesOperation, listArticlesOperation as listArticlesTool, listBlogsOperation, listBlogsOperation as listBlogsTool, listCollectionsOperation, listCollectionsOperation as listCollectionsTool, listCustomersOperation, listCustomersOperation as listCustomersTool, listFulfillmentOrdersForOrderOperation, listFulfillmentOrdersForOrderOperation as listFulfillmentOrdersForOrderTool, listInventoryItemsOperation, listInventoryItemsOperation as listInventoryItemsTool, listLocationsOperation, listLocationsOperation as listLocationsTool, listOrdersOperation, listOrdersOperation as listOrdersTool, listProductsOperation, listProductsOperation as listProductsTool, removeProductsFromCollectionOperation, removeProductsFromCollectionOperation as removeProductsFromCollectionTool, shopifyAppCredentialSet, shopifyArticleSchema, shopifyBlogSchema, shopifyCollectionSchema, shopifyConnectionNodesSchema, shopifyCredentialSet, shopifyCredentialsSchema, shopifyCustomerSchema, shopifyFulfillmentSchema, shopifyGlobalIdSchema, shopifyGraphqlErrorSchema, shopifyImageSchema, shopifyInventoryItemSchema, shopifyInventoryLevelSchema, shopifyJobSchema, shopifyLocationSchema, shopifyMetafieldSchema, shopifyMoneyBagSchema, shopifyMoneySchema, shopifyOrderSchema, shopifyPageInfoSchema, shopifyProductSchema, shopifySeoSchema, shopifyShopSchema, shopifyStoreDomainSchema, shopifyUserErrorSchema, updateArticleOperation, updateArticleOperation as updateArticleTool, updateBlogOperation, updateBlogOperation as updateBlogTool, updateCustomerOperation, updateCustomerOperation as updateCustomerTool, updateOrderOperation, updateOrderOperation as updateOrderTool, updateProductOperation, updateProductOperation as updateProductTool };
@@ -0,0 +1,2 @@
1
+ import { A as deleteCollectionOperation, B as cancelOrderOperation, C as getCustomerOrdersOperation, D as getArticleOperation, E as getBlogOperation, F as createFulfillmentOperation, H as addProductsToCollectionOperation, I as createCustomerOperation, L as createCollectionOperation, M as deleteArticleOperation, N as createProductOperation, O as deleteProductOperation, P as createOrderOperation, R as createBlogOperation, S as getFulfillmentOperation, T as getCollectionOperation, V as adjustInventoryQuantitiesOperation, _ as getProductOperation, a as updateArticleOperation, b as getInventoryLevelsForItemOperation, c as listOrdersOperation, d as listFulfillmentOrdersForOrderOperation, f as listCustomersOperation, g as getShopOperation, h as listArticlesOperation, i as updateBlogOperation, j as deleteBlogOperation, k as deleteCustomerOperation, l as listLocationsOperation, m as listBlogsOperation, n as updateOrderOperation, o as removeProductsFromCollectionOperation, p as listCollectionsOperation, r as updateCustomerOperation, s as listProductsOperation, t as updateProductOperation, u as listInventoryItemsOperation, v as getOrderOperation, w as getCustomerOperation, x as getInventoryItemOperation, y as getLocationOperation, z as createArticleOperation } from "../update-shopify-product.operation-CtjraWjR.mjs";
2
+ export { addProductsToCollectionOperation, addProductsToCollectionOperation as addProductsToCollectionTool, adjustInventoryQuantitiesOperation, adjustInventoryQuantitiesOperation as adjustInventoryQuantitiesTool, cancelOrderOperation, cancelOrderOperation as cancelOrderTool, createArticleOperation, createArticleOperation as createArticleTool, createBlogOperation, createBlogOperation as createBlogTool, createCollectionOperation, createCollectionOperation as createCollectionTool, createCustomerOperation, createCustomerOperation as createCustomerTool, createFulfillmentOperation, createFulfillmentOperation as createFulfillmentTool, createOrderOperation, createOrderOperation as createOrderTool, createProductOperation, createProductOperation as createProductTool, deleteArticleOperation, deleteArticleOperation as deleteArticleTool, deleteBlogOperation, deleteBlogOperation as deleteBlogTool, deleteCollectionOperation, deleteCollectionOperation as deleteCollectionTool, deleteCustomerOperation, deleteCustomerOperation as deleteCustomerTool, deleteProductOperation, deleteProductOperation as deleteProductTool, getArticleOperation, getArticleOperation as getArticleTool, getBlogOperation, getBlogOperation as getBlogTool, getCollectionOperation, getCollectionOperation as getCollectionTool, getCustomerOperation, getCustomerOperation as getCustomerTool, getCustomerOrdersOperation, getCustomerOrdersOperation as getCustomerOrdersTool, getFulfillmentOperation, getFulfillmentOperation as getFulfillmentTool, getInventoryItemOperation, getInventoryItemOperation as getInventoryItemTool, getInventoryLevelsForItemOperation, getInventoryLevelsForItemOperation as getInventoryLevelsForItemTool, getLocationOperation, getLocationOperation as getLocationTool, getOrderOperation, getOrderOperation as getOrderTool, getProductOperation, getProductOperation as getProductTool, getShopOperation, getShopOperation as getShopTool, listArticlesOperation, listArticlesOperation as listArticlesTool, listBlogsOperation, listBlogsOperation as listBlogsTool, listCollectionsOperation, listCollectionsOperation as listCollectionsTool, listCustomersOperation, listCustomersOperation as listCustomersTool, listFulfillmentOrdersForOrderOperation, listFulfillmentOrdersForOrderOperation as listFulfillmentOrdersForOrderTool, listInventoryItemsOperation, listInventoryItemsOperation as listInventoryItemsTool, listLocationsOperation, listLocationsOperation as listLocationsTool, listOrdersOperation, listOrdersOperation as listOrdersTool, listProductsOperation, listProductsOperation as listProductsTool, removeProductsFromCollectionOperation, removeProductsFromCollectionOperation as removeProductsFromCollectionTool, updateArticleOperation, updateArticleOperation as updateArticleTool, updateBlogOperation, updateBlogOperation as updateBlogTool, updateCustomerOperation, updateCustomerOperation as updateCustomerTool, updateOrderOperation, updateOrderOperation as updateOrderTool, updateProductOperation, updateProductOperation as updateProductTool };
@@ -0,0 +1,3 @@
1
+ import { A as deleteCollectionOperation, B as cancelOrderOperation, C as getCustomerOrdersOperation, D as getArticleOperation, E as getBlogOperation, F as createFulfillmentOperation, H as addProductsToCollectionOperation, I as createCustomerOperation, L as createCollectionOperation, M as deleteArticleOperation, N as createProductOperation, O as deleteProductOperation, P as createOrderOperation, R as createBlogOperation, S as getFulfillmentOperation, T as getCollectionOperation, V as adjustInventoryQuantitiesOperation, _ as getProductOperation, a as updateArticleOperation, b as getInventoryLevelsForItemOperation, c as listOrdersOperation, d as listFulfillmentOrdersForOrderOperation, f as listCustomersOperation, g as getShopOperation, h as listArticlesOperation, i as updateBlogOperation, j as deleteBlogOperation, k as deleteCustomerOperation, l as listLocationsOperation, m as listBlogsOperation, n as updateOrderOperation, o as removeProductsFromCollectionOperation, p as listCollectionsOperation, r as updateCustomerOperation, s as listProductsOperation, t as updateProductOperation, u as listInventoryItemsOperation, v as getOrderOperation, w as getCustomerOperation, x as getInventoryItemOperation, y as getLocationOperation, z as createArticleOperation } from "../update-shopify-product.operation-DsAjcvO8.mjs";
2
+
3
+ export { addProductsToCollectionOperation, addProductsToCollectionOperation as addProductsToCollectionTool, adjustInventoryQuantitiesOperation, adjustInventoryQuantitiesOperation as adjustInventoryQuantitiesTool, cancelOrderOperation, cancelOrderOperation as cancelOrderTool, createArticleOperation, createArticleOperation as createArticleTool, createBlogOperation, createBlogOperation as createBlogTool, createCollectionOperation, createCollectionOperation as createCollectionTool, createCustomerOperation, createCustomerOperation as createCustomerTool, createFulfillmentOperation, createFulfillmentOperation as createFulfillmentTool, createOrderOperation, createOrderOperation as createOrderTool, createProductOperation, createProductOperation as createProductTool, deleteArticleOperation, deleteArticleOperation as deleteArticleTool, deleteBlogOperation, deleteBlogOperation as deleteBlogTool, deleteCollectionOperation, deleteCollectionOperation as deleteCollectionTool, deleteCustomerOperation, deleteCustomerOperation as deleteCustomerTool, deleteProductOperation, deleteProductOperation as deleteProductTool, getArticleOperation, getArticleOperation as getArticleTool, getBlogOperation, getBlogOperation as getBlogTool, getCollectionOperation, getCollectionOperation as getCollectionTool, getCustomerOperation, getCustomerOperation as getCustomerTool, getCustomerOrdersOperation, getCustomerOrdersOperation as getCustomerOrdersTool, getFulfillmentOperation, getFulfillmentOperation as getFulfillmentTool, getInventoryItemOperation, getInventoryItemOperation as getInventoryItemTool, getInventoryLevelsForItemOperation, getInventoryLevelsForItemOperation as getInventoryLevelsForItemTool, getLocationOperation, getLocationOperation as getLocationTool, getOrderOperation, getOrderOperation as getOrderTool, getProductOperation, getProductOperation as getProductTool, getShopOperation, getShopOperation as getShopTool, listArticlesOperation, listArticlesOperation as listArticlesTool, listBlogsOperation, listBlogsOperation as listBlogsTool, listCollectionsOperation, listCollectionsOperation as listCollectionsTool, listCustomersOperation, listCustomersOperation as listCustomersTool, listFulfillmentOrdersForOrderOperation, listFulfillmentOrdersForOrderOperation as listFulfillmentOrdersForOrderTool, listInventoryItemsOperation, listInventoryItemsOperation as listInventoryItemsTool, listLocationsOperation, listLocationsOperation as listLocationsTool, listOrdersOperation, listOrdersOperation as listOrdersTool, listProductsOperation, listProductsOperation as listProductsTool, removeProductsFromCollectionOperation, removeProductsFromCollectionOperation as removeProductsFromCollectionTool, updateArticleOperation, updateArticleOperation as updateArticleTool, updateBlogOperation, updateBlogOperation as updateBlogTool, updateCustomerOperation, updateCustomerOperation as updateCustomerTool, updateOrderOperation, updateOrderOperation as updateOrderTool, updateProductOperation, updateProductOperation as updateProductTool };
@@ -0,0 +1,2 @@
1
+ import { A as shopifyOrderSchema, C as shopifyInventoryItemSchema, D as shopifyMetafieldSchema, E as shopifyLocationSchema, F as shopifyStoreDomainSchema, I as shopifyUserErrorSchema, M as shopifyProductSchema, N as shopifySeoSchema, O as shopifyMoneyBagSchema, P as shopifyShopSchema, S as shopifyImageSchema, T as shopifyJobSchema, _ as shopifyCredentialsSchema, a as ShopifyCustomer, b as shopifyGlobalIdSchema, c as ShopifyJob, d as ShopifyProduct, f as ShopifyShop, g as shopifyConnectionNodesSchema, h as shopifyCollectionSchema, i as ShopifyCredentialsShape, j as shopifyPageInfoSchema, k as shopifyMoneySchema, l as ShopifyLocation, m as shopifyBlogSchema, n as ShopifyBlog, o as ShopifyFulfillment, p as shopifyArticleSchema, r as ShopifyCollection, s as ShopifyInventoryLevel, t as ShopifyArticle, u as ShopifyOrder, v as shopifyCustomerSchema, w as shopifyInventoryLevelSchema, x as shopifyGraphqlErrorSchema, y as shopifyFulfillmentSchema } from "../common-C2s35du9.mjs";
2
+ export { ShopifyArticle, ShopifyBlog, ShopifyCollection, ShopifyCredentialsShape, ShopifyCustomer, ShopifyFulfillment, ShopifyInventoryLevel, ShopifyJob, ShopifyLocation, ShopifyOrder, ShopifyProduct, ShopifyShop, shopifyArticleSchema, shopifyBlogSchema, shopifyCollectionSchema, shopifyConnectionNodesSchema, shopifyCredentialsSchema, shopifyCustomerSchema, shopifyFulfillmentSchema, shopifyGlobalIdSchema, shopifyGraphqlErrorSchema, shopifyImageSchema, shopifyInventoryItemSchema, shopifyInventoryLevelSchema, shopifyJobSchema, shopifyLocationSchema, shopifyMetafieldSchema, shopifyMoneyBagSchema, shopifyMoneySchema, shopifyOrderSchema, shopifyPageInfoSchema, shopifyProductSchema, shopifySeoSchema, shopifyShopSchema, shopifyStoreDomainSchema, shopifyUserErrorSchema };
@@ -0,0 +1,3 @@
1
+ import { C as shopifyStoreDomainSchema, S as shopifyShopSchema, _ as shopifyMoneySchema, a as shopifyCredentialsSchema, b as shopifyProductSchema, c as shopifyGlobalIdSchema, d as shopifyInventoryItemSchema, f as shopifyInventoryLevelSchema, g as shopifyMoneyBagSchema, h as shopifyMetafieldSchema, i as shopifyConnectionNodesSchema, l as shopifyGraphqlErrorSchema, m as shopifyLocationSchema, n as shopifyBlogSchema, o as shopifyCustomerSchema, p as shopifyJobSchema, r as shopifyCollectionSchema, s as shopifyFulfillmentSchema, t as shopifyArticleSchema, u as shopifyImageSchema, v as shopifyOrderSchema, w as shopifyUserErrorSchema, x as shopifySeoSchema, y as shopifyPageInfoSchema } from "../common-JZyHdK6p.mjs";
2
+
3
+ export { shopifyArticleSchema, shopifyBlogSchema, shopifyCollectionSchema, shopifyConnectionNodesSchema, shopifyCredentialsSchema, shopifyCustomerSchema, shopifyFulfillmentSchema, shopifyGlobalIdSchema, shopifyGraphqlErrorSchema, shopifyImageSchema, shopifyInventoryItemSchema, shopifyInventoryLevelSchema, shopifyJobSchema, shopifyLocationSchema, shopifyMetafieldSchema, shopifyMoneyBagSchema, shopifyMoneySchema, shopifyOrderSchema, shopifyPageInfoSchema, shopifyProductSchema, shopifySeoSchema, shopifyShopSchema, shopifyStoreDomainSchema, shopifyUserErrorSchema };
@@ -0,0 +1,17 @@
1
+ import { CredentialSet } from "@keystrokehq/core";
2
+ import { z } from "zod";
3
+
4
+ //#region src/credential-sets/shopify-app.credential-set.ts
5
+ const shopifyAppCredentialSet = new CredentialSet({
6
+ id: "shopify-app",
7
+ exposure: "platform-only",
8
+ name: "Shopify App",
9
+ auth: z.object({
10
+ clientId: z.string(),
11
+ clientSecret: z.string(),
12
+ webhookSecret: z.string()
13
+ })
14
+ });
15
+
16
+ //#endregion
17
+ export { shopifyAppCredentialSet as t };
@@ -0,0 +1,39 @@
1
+ import { CredentialSet } from "@keystrokehq/core";
2
+ import { z } from "zod";
3
+ import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
+ import { InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
5
+
6
+ //#region src/credential-sets/shopify.credential-set.d.ts
7
+ declare const shopifyCredentialSet: CredentialSet<"shopify", z.ZodObject<{
8
+ SHOPIFY_STORE_DOMAIN: z.ZodString;
9
+ SHOPIFY_ACCESS_TOKEN: z.ZodString;
10
+ }, z.core.$strip>, {
11
+ kind: "oauth";
12
+ tokenType: "refreshable";
13
+ authUrl: "https://{shop}.myshopify.com/admin/oauth/authorize";
14
+ tokenUrl: "https://{shop}.myshopify.com/admin/oauth/access_token";
15
+ revokeUrl: null;
16
+ scopes: readonly ["read_products", "write_products", "read_orders", "write_orders", "read_customers", "write_customers", "read_inventory", "write_inventory", "read_locations", "read_fulfillments", "write_fulfillments", "read_content", "write_content", "read_webhooks", "write_webhooks"];
17
+ vault: {
18
+ readonly accessToken: "SHOPIFY_ACCESS_TOKEN";
19
+ readonly raw: {
20
+ readonly SHOPIFY_STORE_DOMAIN: "_shopifyShopDomain";
21
+ };
22
+ };
23
+ id: string;
24
+ }[]>;
25
+ type ShopifyCredentials = InferCredentialSetAuth<typeof shopifyCredentialSet>;
26
+ //#endregion
27
+ //#region src/credential-sets/shopify-app.credential-set.d.ts
28
+ declare const shopifyAppCredentialSet: CredentialSet<"shopify-app", z.ZodObject<{
29
+ clientId: z.ZodString;
30
+ clientSecret: z.ZodString;
31
+ webhookSecret: z.ZodString;
32
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
33
+ clientId: z.ZodString;
34
+ clientSecret: z.ZodString;
35
+ webhookSecret: z.ZodString;
36
+ }, z.core.$strip>>[] | undefined>;
37
+ type ShopifyAppCredentials = InferCredentialSetAuth<typeof shopifyAppCredentialSet>;
38
+ //#endregion
39
+ export { shopifyCredentialSet as i, shopifyAppCredentialSet as n, ShopifyCredentials as r, ShopifyAppCredentials as t };
@@ -0,0 +1,53 @@
1
+ import { C as shopifyStoreDomainSchema } from "./common-JZyHdK6p.mjs";
2
+ import { CredentialSet } from "@keystrokehq/core";
3
+ import { z } from "zod";
4
+
5
+ //#region src/utils/oauth-connection.ts
6
+ const shopifyOAuthConnection = {
7
+ kind: "oauth",
8
+ tokenType: "refreshable",
9
+ authUrl: "https://{shop}.myshopify.com/admin/oauth/authorize",
10
+ tokenUrl: "https://{shop}.myshopify.com/admin/oauth/access_token",
11
+ revokeUrl: null,
12
+ scopes: [
13
+ "read_products",
14
+ "write_products",
15
+ "read_orders",
16
+ "write_orders",
17
+ "read_customers",
18
+ "write_customers",
19
+ "read_inventory",
20
+ "write_inventory",
21
+ "read_locations",
22
+ "read_fulfillments",
23
+ "write_fulfillments",
24
+ "read_content",
25
+ "write_content",
26
+ "read_webhooks",
27
+ "write_webhooks"
28
+ ],
29
+ vault: {
30
+ accessToken: "SHOPIFY_ACCESS_TOKEN",
31
+ raw: { SHOPIFY_STORE_DOMAIN: "_shopifyShopDomain" }
32
+ }
33
+ };
34
+
35
+ //#endregion
36
+ //#region src/credential-sets/shopify.credential-set.ts
37
+ const shopifyAuthSchema = z.object({
38
+ SHOPIFY_STORE_DOMAIN: shopifyStoreDomainSchema,
39
+ SHOPIFY_ACCESS_TOKEN: z.string().min(1)
40
+ });
41
+ const shopifyCredentialSet = new CredentialSet({
42
+ id: "shopify",
43
+ name: "Shopify",
44
+ description: "Shopify Admin API — stores, products, orders, customers, and webhooks",
45
+ auth: shopifyAuthSchema,
46
+ connections: [{
47
+ id: "oauth",
48
+ ...shopifyOAuthConnection
49
+ }]
50
+ });
51
+
52
+ //#endregion
53
+ export { shopifyCredentialSet as t };