@sdg.la/wishlist-stack-sdk 0.9.5 → 0.9.6

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.
package/README.md CHANGED
@@ -720,17 +720,20 @@ await client.lists.addItems('list-id', {
720
720
 
721
721
  #### `lists.updateItem(listId, itemId, body)`
722
722
 
723
- Update an item on a list (quantity, note, position, or custom properties).
723
+ Update an item on a list (variant, quantity, note, position, or custom properties). When `variantId` is provided, the item's product data is re-fetched from Shopify to reflect the new variant.
724
724
 
725
725
  - **Endpoint:** `PATCH /api/lists/{listId}/items/{itemId}`
726
726
  - **Parameters:**
727
727
  - `listId` — `string`
728
728
  - `itemId` — `string`
729
- - `body` — `{ quantity?: number; note?: string; position?: number; properties?: Record<string, unknown> | null }`
729
+ - `body` — `{ variantId?: string; quantity?: number; note?: string; position?: number; properties?: Record<string, unknown> | null }`
730
730
  - **Returns:** `Promise<UpdateListItemResponse>` — the updated hydrated item
731
731
 
732
732
  ```ts
733
733
  await client.lists.updateItem('list-id', 'item-id', { quantity: 3, note: 'Updated note' });
734
+
735
+ // Change the variant stored on the item
736
+ await client.lists.updateItem('list-id', 'item-id', { variantId: '46932429275374' });
734
737
  ```
735
738
 
736
739
  <details>
package/dist/index.d.cts CHANGED
@@ -53,6 +53,7 @@ type AddItemsToListBody = {
53
53
  }>;
54
54
  };
55
55
  type UpdateListItemBody = {
56
+ variantId?: string;
56
57
  quantity?: number;
57
58
  note?: string;
58
59
  position?: number;
package/dist/index.d.ts CHANGED
@@ -53,6 +53,7 @@ type AddItemsToListBody = {
53
53
  }>;
54
54
  };
55
55
  type UpdateListItemBody = {
56
+ variantId?: string;
56
57
  quantity?: number;
57
58
  note?: string;
58
59
  position?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdg.la/wishlist-stack-sdk",
3
- "version": "0.9.5",
3
+ "version": "0.9.6",
4
4
  "description": "TypeScript SDK for the Wishlist Stack API",
5
5
  "repository": {
6
6
  "type": "git",