@sdg.la/wishlist-stack-sdk 0.9.2 → 0.9.4
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 +6 -4
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ import { createWishlistStackClient } from '@sdg.la/wishlist-stack-sdk';
|
|
|
92
92
|
|
|
93
93
|
const client = createWishlistStackClient({
|
|
94
94
|
apiKey: 'YOUR_API_KEY',
|
|
95
|
-
baseUrl: 'https://wishlist
|
|
95
|
+
baseUrl: 'https://wishlist.devteam.run', // optional default
|
|
96
96
|
customerAccessToken: '...optional...',
|
|
97
97
|
});
|
|
98
98
|
|
|
@@ -221,13 +221,15 @@ await client.lists.getById('list-id', { page: 1, pageSize: 25 });
|
|
|
221
221
|
{ page?: number; pageSize?: number }
|
|
222
222
|
|
|
223
223
|
// Create/Update body
|
|
224
|
-
{ name?: string; description?: string }
|
|
224
|
+
{ name?: string; description?: string, groupId?: string }
|
|
225
225
|
|
|
226
226
|
// Add items body
|
|
227
|
-
{ items: Array<{ variantId: string; quantity?: number; note?: string }> }
|
|
227
|
+
{ items: Array<{ variantId: string; quantity?: number; note?: string; properties?: object }> }
|
|
228
|
+
// properties: optional custom key-value data for the item (plain JSON object)
|
|
228
229
|
|
|
229
230
|
// Update item body
|
|
230
|
-
{ quantity?: number; note?: string }
|
|
231
|
+
{ quantity?: number; note?: string; position?: number; properties?: object }
|
|
232
|
+
// properties: optional JSON object to store custom data on the item
|
|
231
233
|
```
|
|
232
234
|
|
|
233
235
|
### Shared
|
package/dist/index.d.cts
CHANGED
|
@@ -42,19 +42,21 @@ type CreateListBody = {
|
|
|
42
42
|
type UpdateListBody = {
|
|
43
43
|
name?: string;
|
|
44
44
|
description?: string;
|
|
45
|
-
|
|
45
|
+
groupId?: string;
|
|
46
46
|
};
|
|
47
47
|
type AddItemsToListBody = {
|
|
48
48
|
items?: Array<{
|
|
49
49
|
variantId?: string;
|
|
50
50
|
quantity?: number;
|
|
51
51
|
note?: string;
|
|
52
|
+
properties?: Record<string, unknown> | null;
|
|
52
53
|
}>;
|
|
53
54
|
};
|
|
54
55
|
type UpdateListItemBody = {
|
|
55
56
|
quantity?: number;
|
|
56
57
|
note?: string;
|
|
57
|
-
|
|
58
|
+
position?: number;
|
|
59
|
+
properties?: Record<string, unknown> | null;
|
|
58
60
|
};
|
|
59
61
|
|
|
60
62
|
type OkResponse = {
|
|
@@ -121,6 +123,7 @@ type HydratedWishlistItem = {
|
|
|
121
123
|
quantity: number;
|
|
122
124
|
position: number;
|
|
123
125
|
product: HydratedProduct;
|
|
126
|
+
properties?: Record<string, unknown> | null;
|
|
124
127
|
};
|
|
125
128
|
type ListSummary = {
|
|
126
129
|
id: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -42,19 +42,21 @@ type CreateListBody = {
|
|
|
42
42
|
type UpdateListBody = {
|
|
43
43
|
name?: string;
|
|
44
44
|
description?: string;
|
|
45
|
-
|
|
45
|
+
groupId?: string;
|
|
46
46
|
};
|
|
47
47
|
type AddItemsToListBody = {
|
|
48
48
|
items?: Array<{
|
|
49
49
|
variantId?: string;
|
|
50
50
|
quantity?: number;
|
|
51
51
|
note?: string;
|
|
52
|
+
properties?: Record<string, unknown> | null;
|
|
52
53
|
}>;
|
|
53
54
|
};
|
|
54
55
|
type UpdateListItemBody = {
|
|
55
56
|
quantity?: number;
|
|
56
57
|
note?: string;
|
|
57
|
-
|
|
58
|
+
position?: number;
|
|
59
|
+
properties?: Record<string, unknown> | null;
|
|
58
60
|
};
|
|
59
61
|
|
|
60
62
|
type OkResponse = {
|
|
@@ -121,6 +123,7 @@ type HydratedWishlistItem = {
|
|
|
121
123
|
quantity: number;
|
|
122
124
|
position: number;
|
|
123
125
|
product: HydratedProduct;
|
|
126
|
+
properties?: Record<string, unknown> | null;
|
|
124
127
|
};
|
|
125
128
|
type ListSummary = {
|
|
126
129
|
id: string;
|