@wix/auto_sdk_ecom_wishlists 1.0.4 → 1.0.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/build/cjs/index.d.ts +90 -54
- package/build/cjs/index.js +9 -6
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +7 -5
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +67 -47
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +90 -54
- package/build/es/index.mjs +9 -6
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +7 -5
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +67 -47
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +30 -18
- package/build/internal/cjs/index.typings.d.ts +121 -70
- package/build/internal/cjs/meta.d.ts +67 -47
- package/build/internal/es/index.d.mts +30 -18
- package/build/internal/es/index.typings.d.mts +121 -70
- package/build/internal/es/meta.d.mts +67 -47
- package/package.json +2 -2
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { GetDefaultWishlistResponse, CatalogReference, AddItemOptions, AddItemResponse, AddItemApplicationErrors, RemoveItemOptions, RemoveItemResponse, BulkUpdateWishlistTagsOptions, BulkUpdateWishlistTagsResponse, BulkUpdateWishlistTagsApplicationErrors, BulkUpdateWishlistTagsByFilterOptions, BulkUpdateWishlistTagsByFilterResponse, BulkUpdateWishlistTagsByFilterApplicationErrors } from './index.typings.js';
|
|
2
|
+
import { GetDefaultWishlistOptions, GetDefaultWishlistResponse, CatalogReference, AddItemOptions, AddItemResponse, AddItemApplicationErrors, RemoveItemOptions, RemoveItemResponse, BulkUpdateWishlistTagsOptions, BulkUpdateWishlistTagsResponse, BulkUpdateWishlistTagsApplicationErrors, BulkUpdateWishlistTagsByFilterOptions, BulkUpdateWishlistTagsByFilterResponse, BulkUpdateWishlistTagsByFilterApplicationErrors } from './index.typings.js';
|
|
3
3
|
export { AccountInfo, ActionEvent, AddItemRequest, ApplicationError, BulkActionMetadata, BulkUpdateWishlistTagsByFilterRequest, BulkUpdateWishlistTagsRequest, BulkUpdateWishlistTagsResult, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, GetDefaultWishlistRequest, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, MessageEnvelope, RemoveItemRequest, RestoreInfo, TagList, Tags, WebhookIdentityType, WebhookIdentityTypeWithLiterals, Wishlist, WishlistItem, WishlistItemAdded, WishlistItemRemoved, WishlistTagsModified } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
/** @internal */
|
|
6
6
|
declare function getDefaultWishlist$1(httpClient: HttpClient): GetDefaultWishlistSignature;
|
|
7
7
|
interface GetDefaultWishlistSignature {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Retrieves the current member's default wishlist.
|
|
10
|
+
*
|
|
11
|
+
* If `appId` is provided, only items whose `catalogReference.appId` matches are returned. If omitted, all items are returned. If the member doesn't have a wishlist yet, an empty wishlist is returned.
|
|
10
12
|
*/
|
|
11
|
-
(): Promise<NonNullablePaths<GetDefaultWishlistResponse, `wishlist.
|
|
13
|
+
(options?: GetDefaultWishlistOptions): Promise<NonNullablePaths<GetDefaultWishlistResponse, `wishlist.items` | `wishlist.items.${number}.catalogReference.catalogItemId` | `wishlist.items.${number}.catalogReference.appId` | `wishlist.tags.privateTags.tagIds`, 4>>;
|
|
12
14
|
}
|
|
13
15
|
/** @internal */
|
|
14
16
|
declare function addItem$1(httpClient: HttpClient): AddItemSignature;
|
|
15
17
|
interface AddItemSignature {
|
|
16
18
|
/**
|
|
17
|
-
* Adds
|
|
18
|
-
*
|
|
19
|
-
*
|
|
19
|
+
* Adds an item to the member's wishlist.
|
|
20
|
+
*
|
|
21
|
+
* The wishlist is created automatically on first use. If the item is already in the wishlist, the request is ignored. A wishlist can hold up to 100 items.
|
|
22
|
+
* @param - Reference to the catalog item to add.
|
|
20
23
|
*/
|
|
21
|
-
(catalogReference: NonNullablePaths<CatalogReference, `appId` | `catalogItemId`,
|
|
24
|
+
(catalogReference: NonNullablePaths<CatalogReference, `appId` | `catalogItemId`, 0>, options?: AddItemOptions): Promise<NonNullablePaths<AddItemResponse, `wishlist.items` | `wishlist.items.${number}.catalogReference.catalogItemId` | `wishlist.items.${number}.catalogReference.appId` | `wishlist.tags.privateTags.tagIds`, 4> & {
|
|
22
25
|
__applicationErrorsType?: AddItemApplicationErrors;
|
|
23
26
|
}>;
|
|
24
27
|
}
|
|
@@ -26,19 +29,23 @@ interface AddItemSignature {
|
|
|
26
29
|
declare function removeItem$1(httpClient: HttpClient): RemoveItemSignature;
|
|
27
30
|
interface RemoveItemSignature {
|
|
28
31
|
/**
|
|
29
|
-
* Removes an item from the
|
|
30
|
-
*
|
|
32
|
+
* Removes an item from the member's wishlist.
|
|
33
|
+
*
|
|
34
|
+
* If the item isn't in the wishlist, or the member has no wishlist yet, the request is ignored.
|
|
35
|
+
* @param - Reference to the catalog item to remove.
|
|
31
36
|
*/
|
|
32
|
-
(catalogReference: NonNullablePaths<CatalogReference, `appId` | `catalogItemId`,
|
|
37
|
+
(catalogReference: NonNullablePaths<CatalogReference, `appId` | `catalogItemId`, 0>, options?: RemoveItemOptions): Promise<NonNullablePaths<RemoveItemResponse, `wishlist.items` | `wishlist.items.${number}.catalogReference.catalogItemId` | `wishlist.items.${number}.catalogReference.appId` | `wishlist.tags.privateTags.tagIds`, 4>>;
|
|
33
38
|
}
|
|
34
39
|
/** @internal */
|
|
35
40
|
declare function bulkUpdateWishlistTags$1(httpClient: HttpClient): BulkUpdateWishlistTagsSignature;
|
|
36
41
|
interface BulkUpdateWishlistTagsSignature {
|
|
37
42
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
43
|
+
* Adds or removes tags on multiple wishlists.
|
|
44
|
+
*
|
|
45
|
+
* Specify which tags to assign and which tags to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. Tags that don't exist are ignored.
|
|
46
|
+
* @param - IDs of the wishlists to update.
|
|
40
47
|
*/
|
|
41
|
-
(wishlistIds: string[], options?: BulkUpdateWishlistTagsOptions): Promise<NonNullablePaths<BulkUpdateWishlistTagsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`,
|
|
48
|
+
(wishlistIds: string[], options?: BulkUpdateWishlistTagsOptions): Promise<NonNullablePaths<BulkUpdateWishlistTagsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4> & {
|
|
42
49
|
__applicationErrorsType?: BulkUpdateWishlistTagsApplicationErrors;
|
|
43
50
|
}>;
|
|
44
51
|
}
|
|
@@ -46,11 +53,16 @@ interface BulkUpdateWishlistTagsSignature {
|
|
|
46
53
|
declare function bulkUpdateWishlistTagsByFilter$1(httpClient: HttpClient): BulkUpdateWishlistTagsByFilterSignature;
|
|
47
54
|
interface BulkUpdateWishlistTagsByFilterSignature {
|
|
48
55
|
/**
|
|
49
|
-
* Asynchronously
|
|
50
|
-
*
|
|
51
|
-
*
|
|
56
|
+
* Asynchronously updates tags on multiple wishlists that match the provided filter.
|
|
57
|
+
*
|
|
58
|
+
* An empty filter matches all of the current member's wishlists.
|
|
59
|
+
*
|
|
60
|
+
* To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).
|
|
61
|
+
* @param - Filter object. An empty filter matches all of the current member's wishlists.
|
|
62
|
+
*
|
|
63
|
+
* See [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) for more information.
|
|
52
64
|
*/
|
|
53
|
-
(filter: Record<string, any>, options?: BulkUpdateWishlistTagsByFilterOptions): Promise<NonNullablePaths<BulkUpdateWishlistTagsByFilterResponse, `jobId`,
|
|
65
|
+
(filter: Record<string, any>, options?: BulkUpdateWishlistTagsByFilterOptions): Promise<NonNullablePaths<BulkUpdateWishlistTagsByFilterResponse, `jobId`, 0> & {
|
|
54
66
|
__applicationErrorsType?: BulkUpdateWishlistTagsByFilterApplicationErrors;
|
|
55
67
|
}>;
|
|
56
68
|
}
|
|
@@ -66,4 +78,4 @@ declare const bulkUpdateWishlistTags: MaybeContext<BuildRESTFunction<typeof bulk
|
|
|
66
78
|
/** @internal */
|
|
67
79
|
declare const bulkUpdateWishlistTagsByFilter: MaybeContext<BuildRESTFunction<typeof bulkUpdateWishlistTagsByFilter$1> & typeof bulkUpdateWishlistTagsByFilter$1>;
|
|
68
80
|
|
|
69
|
-
export { AddItemApplicationErrors, AddItemOptions, AddItemResponse, BulkUpdateWishlistTagsApplicationErrors, BulkUpdateWishlistTagsByFilterApplicationErrors, BulkUpdateWishlistTagsByFilterOptions, BulkUpdateWishlistTagsByFilterResponse, BulkUpdateWishlistTagsOptions, BulkUpdateWishlistTagsResponse, CatalogReference, GetDefaultWishlistResponse, RemoveItemOptions, RemoveItemResponse, addItem, bulkUpdateWishlistTags, bulkUpdateWishlistTagsByFilter, getDefaultWishlist, removeItem };
|
|
81
|
+
export { AddItemApplicationErrors, AddItemOptions, AddItemResponse, BulkUpdateWishlistTagsApplicationErrors, BulkUpdateWishlistTagsByFilterApplicationErrors, BulkUpdateWishlistTagsByFilterOptions, BulkUpdateWishlistTagsByFilterResponse, BulkUpdateWishlistTagsOptions, BulkUpdateWishlistTagsResponse, CatalogReference, GetDefaultWishlistOptions, GetDefaultWishlistResponse, RemoveItemOptions, RemoveItemResponse, addItem, bulkUpdateWishlistTags, bulkUpdateWishlistTagsByFilter, getDefaultWishlist, removeItem };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* A
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* https://dev.wix.com/docs/rest/business-solutions/e-commerce/catalog-service-plugin/handle-item-variants
|
|
4
|
+
* A wishlist is a collection of catalog items that a site member saves to return to later.
|
|
5
|
+
*
|
|
6
|
+
* Each member has one default wishlist that can hold items from any catalog app. A wishlist holds up to 100 items. Each item is identified by its catalog reference, so different variants of the same product are saved as distinct items. Learn more about [handling item variants](https://dev.wix.com/docs/rest/business-solutions/e-commerce/catalog-service-plugin/handle-item-variants).
|
|
8
7
|
*/
|
|
9
8
|
interface Wishlist {
|
|
10
9
|
/**
|
|
@@ -14,13 +13,13 @@ interface Wishlist {
|
|
|
14
13
|
*/
|
|
15
14
|
_id?: string | null;
|
|
16
15
|
/**
|
|
17
|
-
*
|
|
16
|
+
* ID of the member who owns the wishlist.
|
|
18
17
|
* @readonly
|
|
19
18
|
* @format GUID
|
|
20
19
|
*/
|
|
21
|
-
memberId?: string;
|
|
20
|
+
memberId?: string | null;
|
|
22
21
|
/**
|
|
23
|
-
*
|
|
22
|
+
* Items saved in the wishlist. Add or remove items with [Add Item](TODO: Add link) and [Remove Item](TODO: Add link).
|
|
24
23
|
* @maxSize 100
|
|
25
24
|
* @readonly
|
|
26
25
|
*/
|
|
@@ -35,20 +34,21 @@ interface Wishlist {
|
|
|
35
34
|
* @readonly
|
|
36
35
|
*/
|
|
37
36
|
_updatedDate?: Date | null;
|
|
38
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Custom field data for the wishlist.
|
|
39
|
+
*
|
|
40
|
+
* [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.
|
|
41
|
+
*/
|
|
39
42
|
extendedFields?: ExtendedFields;
|
|
40
|
-
/** Tags */
|
|
43
|
+
/** Tags assigned to the wishlist, organized into public and private tags. */
|
|
41
44
|
tags?: Tags;
|
|
42
45
|
}
|
|
43
|
-
/**
|
|
44
|
-
* A single item saved in a wishlist.
|
|
45
|
-
* Managed via Wishlists.AddItem / RemoveItem.
|
|
46
|
-
*/
|
|
46
|
+
/** A single item saved in a wishlist. */
|
|
47
47
|
interface WishlistItem {
|
|
48
|
-
/**
|
|
48
|
+
/** Reference to the catalog item that was saved. Identifies the item within the wishlist, so different variants of the same product are distinct items. */
|
|
49
49
|
catalogReference?: CatalogReference;
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* Date and time the item was added to the wishlist.
|
|
52
52
|
* @readonly
|
|
53
53
|
*/
|
|
54
54
|
addedDate?: Date | null;
|
|
@@ -131,84 +131,104 @@ interface TagList {
|
|
|
131
131
|
*/
|
|
132
132
|
tagIds?: string[];
|
|
133
133
|
}
|
|
134
|
-
/**
|
|
134
|
+
/** Event payload sent when an item is added to a wishlist. */
|
|
135
135
|
interface WishlistItemAdded {
|
|
136
136
|
/**
|
|
137
137
|
* ID of the wishlist the item was added to.
|
|
138
138
|
* @format GUID
|
|
139
139
|
*/
|
|
140
140
|
wishlistId?: string;
|
|
141
|
-
/**
|
|
141
|
+
/** Item that was added. */
|
|
142
142
|
item?: WishlistItem;
|
|
143
143
|
}
|
|
144
|
-
/**
|
|
144
|
+
/** Event payload sent when an item is removed from a wishlist. */
|
|
145
145
|
interface WishlistItemRemoved {
|
|
146
146
|
/**
|
|
147
147
|
* ID of the wishlist the item was removed from.
|
|
148
148
|
* @format GUID
|
|
149
149
|
*/
|
|
150
150
|
wishlistId?: string;
|
|
151
|
-
/**
|
|
151
|
+
/** Item that was removed. */
|
|
152
152
|
item?: WishlistItem;
|
|
153
153
|
}
|
|
154
|
-
/**
|
|
154
|
+
/** Event payload sent when a wishlist's tags change. */
|
|
155
155
|
interface WishlistTagsModified {
|
|
156
|
-
/**
|
|
156
|
+
/** Wishlist whose tags changed. */
|
|
157
157
|
wishlist?: Wishlist;
|
|
158
|
-
/** Tags
|
|
158
|
+
/** Tags that were assigned. */
|
|
159
159
|
assignedTags?: Tags;
|
|
160
|
-
/** Tags
|
|
160
|
+
/** Tags that were unassigned. */
|
|
161
161
|
unassignedTags?: Tags;
|
|
162
162
|
}
|
|
163
|
-
/** Empty — resolves the caller's wishlist from request context. */
|
|
164
163
|
interface GetDefaultWishlistRequest {
|
|
164
|
+
/**
|
|
165
|
+
* Optional. Filters the returned items to only those whose `catalogReference.appId` matches this value.
|
|
166
|
+
* When omitted, all items in the member's wishlist are returned.
|
|
167
|
+
* @format GUID
|
|
168
|
+
*/
|
|
169
|
+
appId?: string | null;
|
|
165
170
|
}
|
|
166
171
|
interface GetDefaultWishlistResponse {
|
|
167
|
-
/**
|
|
172
|
+
/** Retrieved wishlist. Empty if the member doesn't have a wishlist yet. */
|
|
168
173
|
wishlist?: Wishlist;
|
|
169
174
|
}
|
|
170
175
|
interface AddItemRequest {
|
|
171
|
-
/**
|
|
176
|
+
/** Reference to the catalog item to add. */
|
|
172
177
|
catalogReference: CatalogReference;
|
|
173
|
-
/**
|
|
178
|
+
/**
|
|
179
|
+
* Whether to return the updated wishlist in the response.
|
|
180
|
+
*
|
|
181
|
+
* Default: `false`
|
|
182
|
+
*/
|
|
174
183
|
returnEntity?: boolean;
|
|
175
184
|
}
|
|
176
185
|
interface AddItemResponse {
|
|
177
|
-
/**
|
|
186
|
+
/**
|
|
187
|
+
* Updated wishlist.
|
|
188
|
+
*
|
|
189
|
+
* Returned only when `returnEntity` is `true`.
|
|
190
|
+
*/
|
|
178
191
|
wishlist?: Wishlist;
|
|
179
192
|
}
|
|
180
193
|
interface RemoveItemRequest {
|
|
181
|
-
/**
|
|
194
|
+
/** Reference to the catalog item to remove. */
|
|
182
195
|
catalogReference: CatalogReference;
|
|
183
|
-
/**
|
|
196
|
+
/**
|
|
197
|
+
* Whether to return the updated wishlist in the response.
|
|
198
|
+
*
|
|
199
|
+
* Default: `false`
|
|
200
|
+
*/
|
|
184
201
|
returnEntity?: boolean;
|
|
185
202
|
}
|
|
186
203
|
interface RemoveItemResponse {
|
|
187
|
-
/**
|
|
204
|
+
/**
|
|
205
|
+
* Updated wishlist.
|
|
206
|
+
*
|
|
207
|
+
* Returned only when `returnEntity` is `true`.
|
|
208
|
+
*/
|
|
188
209
|
wishlist?: Wishlist;
|
|
189
210
|
}
|
|
190
|
-
/** Tags by wishlist ID. assign_tags or unassign_tags (or both) must be non-empty. */
|
|
191
211
|
interface BulkUpdateWishlistTagsRequest {
|
|
192
212
|
/**
|
|
193
|
-
*
|
|
213
|
+
* IDs of the wishlists to update.
|
|
194
214
|
* @minSize 1
|
|
195
215
|
* @maxSize 100
|
|
196
216
|
* @format GUID
|
|
197
217
|
*/
|
|
198
218
|
wishlistIds: string[];
|
|
199
|
-
/** Tags to assign
|
|
219
|
+
/** Tags to assign to each wishlist. */
|
|
200
220
|
assignTags?: Tags;
|
|
201
|
-
/** Tags to unassign. */
|
|
221
|
+
/** Tags to unassign from each wishlist. */
|
|
202
222
|
unassignTags?: Tags;
|
|
203
223
|
}
|
|
204
224
|
interface BulkUpdateWishlistTagsResponse {
|
|
205
225
|
/**
|
|
206
|
-
*
|
|
226
|
+
* Results for each wishlist, in the same order as the request.
|
|
207
227
|
* @minSize 1
|
|
208
228
|
* @maxSize 100
|
|
209
229
|
*/
|
|
210
230
|
results?: BulkUpdateWishlistTagsResult[];
|
|
211
|
-
/**
|
|
231
|
+
/** Metadata about the bulk action as a whole. */
|
|
212
232
|
bulkActionMetadata?: BulkActionMetadata;
|
|
213
233
|
}
|
|
214
234
|
interface ItemMetadata {
|
|
@@ -233,7 +253,7 @@ interface ApplicationError {
|
|
|
233
253
|
data?: Record<string, any> | null;
|
|
234
254
|
}
|
|
235
255
|
interface BulkUpdateWishlistTagsResult {
|
|
236
|
-
/**
|
|
256
|
+
/** Metadata about the update for a single wishlist, including whether it succeeded. */
|
|
237
257
|
itemMetadata?: ItemMetadata;
|
|
238
258
|
}
|
|
239
259
|
interface BulkActionMetadata {
|
|
@@ -244,21 +264,21 @@ interface BulkActionMetadata {
|
|
|
244
264
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
245
265
|
undetailedFailures?: number;
|
|
246
266
|
}
|
|
247
|
-
/**
|
|
248
|
-
* Tags by filter (empty filter = all wishlists belonging to the site_member_id).
|
|
249
|
-
* assign_tags or unassign_tags (or both) must be non-empty.
|
|
250
|
-
*/
|
|
251
267
|
interface BulkUpdateWishlistTagsByFilterRequest {
|
|
252
|
-
/**
|
|
268
|
+
/**
|
|
269
|
+
* Filter object. An empty filter matches all of the current member's wishlists.
|
|
270
|
+
*
|
|
271
|
+
* See [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) for more information.
|
|
272
|
+
*/
|
|
253
273
|
filter: Record<string, any> | null;
|
|
254
|
-
/** Tags to assign
|
|
274
|
+
/** Tags to assign to each matching wishlist. */
|
|
255
275
|
assignTags?: Tags;
|
|
256
|
-
/** Tags to unassign. */
|
|
276
|
+
/** Tags to unassign from each matching wishlist. */
|
|
257
277
|
unassignTags?: Tags;
|
|
258
278
|
}
|
|
259
279
|
interface BulkUpdateWishlistTagsByFilterResponse {
|
|
260
280
|
/**
|
|
261
|
-
* Async job
|
|
281
|
+
* Job ID. Pass this ID to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job) to retrieve the status of the asynchronous operation.
|
|
262
282
|
* @format GUID
|
|
263
283
|
*/
|
|
264
284
|
jobId?: string;
|
|
@@ -292,7 +312,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
292
312
|
/** If present, indicates the action that triggered the event. */
|
|
293
313
|
originatedFrom?: string | null;
|
|
294
314
|
/**
|
|
295
|
-
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01
|
|
315
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
|
|
296
316
|
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
297
317
|
*/
|
|
298
318
|
entityEventSequence?: string | null;
|
|
@@ -435,84 +455,115 @@ type BulkUpdateWishlistTagsByFilterApplicationErrors = {
|
|
|
435
455
|
data?: Record<string, any>;
|
|
436
456
|
};
|
|
437
457
|
/**
|
|
438
|
-
*
|
|
458
|
+
* Retrieves the current member's default wishlist.
|
|
459
|
+
*
|
|
460
|
+
* If `appId` is provided, only items whose `catalogReference.appId` matches are returned. If omitted, all items are returned. If the member doesn't have a wishlist yet, an empty wishlist is returned.
|
|
439
461
|
* @internal
|
|
440
462
|
* @documentationMaturity preview
|
|
441
463
|
* @permissionId ecom:v1:wishlist:get_default_wishlist
|
|
464
|
+
* @applicableIdentity MEMBER
|
|
442
465
|
* @fqn wix.ecom.wishlist.v1.Wishlists.GetDefaultWishlist
|
|
443
466
|
*/
|
|
444
|
-
declare function getDefaultWishlist(): Promise<NonNullablePaths<GetDefaultWishlistResponse, `wishlist.
|
|
467
|
+
declare function getDefaultWishlist(options?: GetDefaultWishlistOptions): Promise<NonNullablePaths<GetDefaultWishlistResponse, `wishlist.items` | `wishlist.items.${number}.catalogReference.catalogItemId` | `wishlist.items.${number}.catalogReference.appId` | `wishlist.tags.privateTags.tagIds`, 4>>;
|
|
468
|
+
interface GetDefaultWishlistOptions {
|
|
469
|
+
/**
|
|
470
|
+
* Optional. Filters the returned items to only those whose `catalogReference.appId` matches this value.
|
|
471
|
+
* When omitted, all items in the member's wishlist are returned.
|
|
472
|
+
* @format GUID
|
|
473
|
+
*/
|
|
474
|
+
appId?: string | null;
|
|
475
|
+
}
|
|
445
476
|
/**
|
|
446
|
-
* Adds
|
|
447
|
-
*
|
|
448
|
-
*
|
|
477
|
+
* Adds an item to the member's wishlist.
|
|
478
|
+
*
|
|
479
|
+
* The wishlist is created automatically on first use. If the item is already in the wishlist, the request is ignored. A wishlist can hold up to 100 items.
|
|
480
|
+
* @param catalogReference - Reference to the catalog item to add.
|
|
449
481
|
* @internal
|
|
450
482
|
* @documentationMaturity preview
|
|
451
483
|
* @requiredField catalogReference
|
|
452
484
|
* @requiredField catalogReference.appId
|
|
453
485
|
* @requiredField catalogReference.catalogItemId
|
|
454
486
|
* @permissionId ecom:v1:wishlist:add_item
|
|
487
|
+
* @applicableIdentity MEMBER
|
|
455
488
|
* @fqn wix.ecom.wishlist.v1.Wishlists.AddItem
|
|
456
489
|
*/
|
|
457
|
-
declare function addItem(catalogReference: NonNullablePaths<CatalogReference, `appId` | `catalogItemId`,
|
|
490
|
+
declare function addItem(catalogReference: NonNullablePaths<CatalogReference, `appId` | `catalogItemId`, 0>, options?: AddItemOptions): Promise<NonNullablePaths<AddItemResponse, `wishlist.items` | `wishlist.items.${number}.catalogReference.catalogItemId` | `wishlist.items.${number}.catalogReference.appId` | `wishlist.tags.privateTags.tagIds`, 4> & {
|
|
458
491
|
__applicationErrorsType?: AddItemApplicationErrors;
|
|
459
492
|
}>;
|
|
460
493
|
interface AddItemOptions {
|
|
461
|
-
/**
|
|
494
|
+
/**
|
|
495
|
+
* Whether to return the updated wishlist in the response.
|
|
496
|
+
*
|
|
497
|
+
* Default: `false`
|
|
498
|
+
*/
|
|
462
499
|
returnEntity?: boolean;
|
|
463
500
|
}
|
|
464
501
|
/**
|
|
465
|
-
* Removes an item from the
|
|
466
|
-
*
|
|
502
|
+
* Removes an item from the member's wishlist.
|
|
503
|
+
*
|
|
504
|
+
* If the item isn't in the wishlist, or the member has no wishlist yet, the request is ignored.
|
|
505
|
+
* @param catalogReference - Reference to the catalog item to remove.
|
|
467
506
|
* @internal
|
|
468
507
|
* @documentationMaturity preview
|
|
469
508
|
* @requiredField catalogReference
|
|
470
509
|
* @requiredField catalogReference.appId
|
|
471
510
|
* @requiredField catalogReference.catalogItemId
|
|
472
511
|
* @permissionId ecom:v1:wishlist:remove_item
|
|
512
|
+
* @applicableIdentity MEMBER
|
|
473
513
|
* @fqn wix.ecom.wishlist.v1.Wishlists.RemoveItem
|
|
474
514
|
*/
|
|
475
|
-
declare function removeItem(catalogReference: NonNullablePaths<CatalogReference, `appId` | `catalogItemId`,
|
|
515
|
+
declare function removeItem(catalogReference: NonNullablePaths<CatalogReference, `appId` | `catalogItemId`, 0>, options?: RemoveItemOptions): Promise<NonNullablePaths<RemoveItemResponse, `wishlist.items` | `wishlist.items.${number}.catalogReference.catalogItemId` | `wishlist.items.${number}.catalogReference.appId` | `wishlist.tags.privateTags.tagIds`, 4>>;
|
|
476
516
|
interface RemoveItemOptions {
|
|
477
|
-
/**
|
|
517
|
+
/**
|
|
518
|
+
* Whether to return the updated wishlist in the response.
|
|
519
|
+
*
|
|
520
|
+
* Default: `false`
|
|
521
|
+
*/
|
|
478
522
|
returnEntity?: boolean;
|
|
479
523
|
}
|
|
480
524
|
/**
|
|
481
|
-
*
|
|
482
|
-
*
|
|
525
|
+
* Adds or removes tags on multiple wishlists.
|
|
526
|
+
*
|
|
527
|
+
* Specify which tags to assign and which tags to unassign. A tag that appears in both the list to assign and the list to unassign is assigned. Tags that don't exist are ignored.
|
|
528
|
+
* @param wishlistIds - IDs of the wishlists to update.
|
|
483
529
|
* @internal
|
|
484
530
|
* @documentationMaturity preview
|
|
485
531
|
* @requiredField wishlistIds
|
|
486
532
|
* @permissionId ecom:v1:wishlist:bulk_update_wishlist_tags
|
|
487
533
|
* @fqn wix.ecom.wishlist.v1.Wishlists.BulkUpdateWishlistTags
|
|
488
534
|
*/
|
|
489
|
-
declare function bulkUpdateWishlistTags(wishlistIds: string[], options?: BulkUpdateWishlistTagsOptions): Promise<NonNullablePaths<BulkUpdateWishlistTagsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`,
|
|
535
|
+
declare function bulkUpdateWishlistTags(wishlistIds: string[], options?: BulkUpdateWishlistTagsOptions): Promise<NonNullablePaths<BulkUpdateWishlistTagsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4> & {
|
|
490
536
|
__applicationErrorsType?: BulkUpdateWishlistTagsApplicationErrors;
|
|
491
537
|
}>;
|
|
492
538
|
interface BulkUpdateWishlistTagsOptions {
|
|
493
|
-
/** Tags to assign
|
|
539
|
+
/** Tags to assign to each wishlist. */
|
|
494
540
|
assignTags?: Tags;
|
|
495
|
-
/** Tags to unassign. */
|
|
541
|
+
/** Tags to unassign from each wishlist. */
|
|
496
542
|
unassignTags?: Tags;
|
|
497
543
|
}
|
|
498
544
|
/**
|
|
499
|
-
* Asynchronously
|
|
500
|
-
*
|
|
501
|
-
*
|
|
545
|
+
* Asynchronously updates tags on multiple wishlists that match the provided filter.
|
|
546
|
+
*
|
|
547
|
+
* An empty filter matches all of the current member's wishlists.
|
|
548
|
+
*
|
|
549
|
+
* To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).
|
|
550
|
+
* @param filter - Filter object. An empty filter matches all of the current member's wishlists.
|
|
551
|
+
*
|
|
552
|
+
* See [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) for more information.
|
|
502
553
|
* @internal
|
|
503
554
|
* @documentationMaturity preview
|
|
504
555
|
* @requiredField filter
|
|
505
556
|
* @permissionId ecom:v1:wishlist:bulk_update_wishlist_tags_by_filter
|
|
506
557
|
* @fqn wix.ecom.wishlist.v1.Wishlists.BulkUpdateWishlistTagsByFilter
|
|
507
558
|
*/
|
|
508
|
-
declare function bulkUpdateWishlistTagsByFilter(filter: Record<string, any>, options?: BulkUpdateWishlistTagsByFilterOptions): Promise<NonNullablePaths<BulkUpdateWishlistTagsByFilterResponse, `jobId`,
|
|
559
|
+
declare function bulkUpdateWishlistTagsByFilter(filter: Record<string, any>, options?: BulkUpdateWishlistTagsByFilterOptions): Promise<NonNullablePaths<BulkUpdateWishlistTagsByFilterResponse, `jobId`, 0> & {
|
|
509
560
|
__applicationErrorsType?: BulkUpdateWishlistTagsByFilterApplicationErrors;
|
|
510
561
|
}>;
|
|
511
562
|
interface BulkUpdateWishlistTagsByFilterOptions {
|
|
512
|
-
/** Tags to assign
|
|
563
|
+
/** Tags to assign to each matching wishlist. */
|
|
513
564
|
assignTags?: Tags;
|
|
514
|
-
/** Tags to unassign. */
|
|
565
|
+
/** Tags to unassign from each matching wishlist. */
|
|
515
566
|
unassignTags?: Tags;
|
|
516
567
|
}
|
|
517
568
|
|
|
518
|
-
export { type AccountInfo, type ActionEvent, type AddItemApplicationErrors, type AddItemOptions, type AddItemRequest, type AddItemResponse, type ApplicationError, type BulkActionMetadata, type BulkUpdateWishlistTagsApplicationErrors, type BulkUpdateWishlistTagsByFilterApplicationErrors, type BulkUpdateWishlistTagsByFilterOptions, type BulkUpdateWishlistTagsByFilterRequest, type BulkUpdateWishlistTagsByFilterResponse, type BulkUpdateWishlistTagsOptions, type BulkUpdateWishlistTagsRequest, type BulkUpdateWishlistTagsResponse, type BulkUpdateWishlistTagsResult, type CatalogReference, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type GetDefaultWishlistRequest, type GetDefaultWishlistResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MessageEnvelope, type RemoveItemOptions, type RemoveItemRequest, type RemoveItemResponse, type RestoreInfo, type TagList, type Tags, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type Wishlist, type WishlistItem, type WishlistItemAdded, type WishlistItemRemoved, type WishlistTagsModified, addItem, bulkUpdateWishlistTags, bulkUpdateWishlistTagsByFilter, getDefaultWishlist, removeItem };
|
|
569
|
+
export { type AccountInfo, type ActionEvent, type AddItemApplicationErrors, type AddItemOptions, type AddItemRequest, type AddItemResponse, type ApplicationError, type BulkActionMetadata, type BulkUpdateWishlistTagsApplicationErrors, type BulkUpdateWishlistTagsByFilterApplicationErrors, type BulkUpdateWishlistTagsByFilterOptions, type BulkUpdateWishlistTagsByFilterRequest, type BulkUpdateWishlistTagsByFilterResponse, type BulkUpdateWishlistTagsOptions, type BulkUpdateWishlistTagsRequest, type BulkUpdateWishlistTagsResponse, type BulkUpdateWishlistTagsResult, type CatalogReference, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type GetDefaultWishlistOptions, type GetDefaultWishlistRequest, type GetDefaultWishlistResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MessageEnvelope, type RemoveItemOptions, type RemoveItemRequest, type RemoveItemResponse, type RestoreInfo, type TagList, type Tags, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type Wishlist, type WishlistItem, type WishlistItemAdded, type WishlistItemRemoved, type WishlistTagsModified, addItem, bulkUpdateWishlistTags, bulkUpdateWishlistTagsByFilter, getDefaultWishlist, removeItem };
|