@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 +5 -2
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
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
package/dist/index.d.ts
CHANGED