@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.
@@ -2,10 +2,9 @@ import { GetDefaultWishlistRequest as GetDefaultWishlistRequest$1, GetDefaultWis
2
2
  import '@wix/sdk-types';
3
3
 
4
4
  /**
5
- * A Wishlist is a collection of catalog items saved by a site member.
6
- * Items are embedded (capped at 100) and identified by a CatalogReference
7
- * (catalog_item_id + app_id + options), so different variants are distinct. See:
8
- * https://dev.wix.com/docs/rest/business-solutions/e-commerce/catalog-service-plugin/handle-item-variants
5
+ * A wishlist is a collection of catalog items that a site member saves to return to later.
6
+ *
7
+ * 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).
9
8
  */
10
9
  interface Wishlist {
11
10
  /**
@@ -15,13 +14,13 @@ interface Wishlist {
15
14
  */
16
15
  id?: string | null;
17
16
  /**
18
- * The ID of the wishlist owner.
17
+ * ID of the member who owns the wishlist.
19
18
  * @readonly
20
19
  * @format GUID
21
20
  */
22
- memberId?: string;
21
+ memberId?: string | null;
23
22
  /**
24
- * Saved items. Managed via AddItem / RemoveItem.
23
+ * Items saved in the wishlist. Add or remove items with [Add Item](TODO: Add link) and [Remove Item](TODO: Add link).
25
24
  * @maxSize 100
26
25
  * @readonly
27
26
  */
@@ -36,20 +35,21 @@ interface Wishlist {
36
35
  * @readonly
37
36
  */
38
37
  updatedDate?: Date | null;
39
- /** Data Extensions */
38
+ /**
39
+ * Custom field data for the wishlist.
40
+ *
41
+ * [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.
42
+ */
40
43
  extendedFields?: ExtendedFields;
41
- /** Tags */
44
+ /** Tags assigned to the wishlist, organized into public and private tags. */
42
45
  tags?: Tags;
43
46
  }
44
- /**
45
- * A single item saved in a wishlist.
46
- * Managed via Wishlists.AddItem / RemoveItem.
47
- */
47
+ /** A single item saved in a wishlist. */
48
48
  interface WishlistItem {
49
- /** Catalog reference identifying the saved item (the uniqueness key within a wishlist). */
49
+ /** Reference to the catalog item that was saved. Identifies the item within the wishlist, so different variants of the same product are distinct items. */
50
50
  catalogReference?: CatalogReference;
51
51
  /**
52
- * When the item was added to the wishlist.
52
+ * Date and time the item was added to the wishlist.
53
53
  * @readonly
54
54
  */
55
55
  addedDate?: Date | null;
@@ -132,84 +132,104 @@ interface TagList {
132
132
  */
133
133
  tagIds?: string[];
134
134
  }
135
- /** Payload for the WishlistItemAdded ACTION domain event. */
135
+ /** Event payload sent when an item is added to a wishlist. */
136
136
  interface WishlistItemAdded {
137
137
  /**
138
138
  * ID of the wishlist the item was added to.
139
139
  * @format GUID
140
140
  */
141
141
  wishlistId?: string;
142
- /** The item that was added. */
142
+ /** Item that was added. */
143
143
  item?: WishlistItem;
144
144
  }
145
- /** Payload for the WishlistItemRemoved ACTION domain event. */
145
+ /** Event payload sent when an item is removed from a wishlist. */
146
146
  interface WishlistItemRemoved {
147
147
  /**
148
148
  * ID of the wishlist the item was removed from.
149
149
  * @format GUID
150
150
  */
151
151
  wishlistId?: string;
152
- /** The item that was removed. */
152
+ /** Item that was removed. */
153
153
  item?: WishlistItem;
154
154
  }
155
- /** Payload for the WishlistTagsModified ACTION domain event. */
155
+ /** Event payload sent when a wishlist's tags change. */
156
156
  interface WishlistTagsModified {
157
- /** The wishlist whose tags changed. */
157
+ /** Wishlist whose tags changed. */
158
158
  wishlist?: Wishlist;
159
- /** Tags assigned in this change. */
159
+ /** Tags that were assigned. */
160
160
  assignedTags?: Tags;
161
- /** Tags unassigned in this change. */
161
+ /** Tags that were unassigned. */
162
162
  unassignedTags?: Tags;
163
163
  }
164
- /** Empty — resolves the caller's wishlist from request context. */
165
164
  interface GetDefaultWishlistRequest {
165
+ /**
166
+ * Optional. Filters the returned items to only those whose `catalogReference.appId` matches this value.
167
+ * When omitted, all items in the member's wishlist are returned.
168
+ * @format GUID
169
+ */
170
+ appId?: string | null;
166
171
  }
167
172
  interface GetDefaultWishlistResponse {
168
- /** The caller's wishlist (empty representation if none exists). */
173
+ /** Retrieved wishlist. Empty if the member doesn't have a wishlist yet. */
169
174
  wishlist?: Wishlist;
170
175
  }
171
176
  interface AddItemRequest {
172
- /** Item to add. Already present items (full three-field equality) are silently skipped. */
177
+ /** Reference to the catalog item to add. */
173
178
  catalogReference: CatalogReference;
174
- /** Whether to return the updated wishlist in the response. */
179
+ /**
180
+ * Whether to return the updated wishlist in the response.
181
+ *
182
+ * Default: `false`
183
+ */
175
184
  returnEntity?: boolean;
176
185
  }
177
186
  interface AddItemResponse {
178
- /** The updated wishlist. */
187
+ /**
188
+ * Updated wishlist.
189
+ *
190
+ * Returned only when `returnEntity` is `true`.
191
+ */
179
192
  wishlist?: Wishlist;
180
193
  }
181
194
  interface RemoveItemRequest {
182
- /** Item to remove. Absent items are silently skipped. */
195
+ /** Reference to the catalog item to remove. */
183
196
  catalogReference: CatalogReference;
184
- /** Whether to return the updated wishlist in the response. */
197
+ /**
198
+ * Whether to return the updated wishlist in the response.
199
+ *
200
+ * Default: `false`
201
+ */
185
202
  returnEntity?: boolean;
186
203
  }
187
204
  interface RemoveItemResponse {
188
- /** The updated wishlist. */
205
+ /**
206
+ * Updated wishlist.
207
+ *
208
+ * Returned only when `returnEntity` is `true`.
209
+ */
189
210
  wishlist?: Wishlist;
190
211
  }
191
- /** Tags by wishlist ID. assign_tags or unassign_tags (or both) must be non-empty. */
192
212
  interface BulkUpdateWishlistTagsRequest {
193
213
  /**
194
- * Wishlist IDs to update (1–100).
214
+ * IDs of the wishlists to update.
195
215
  * @minSize 1
196
216
  * @maxSize 100
197
217
  * @format GUID
198
218
  */
199
219
  wishlistIds: string[];
200
- /** Tags to assign. A tag present in both lists is assigned. */
220
+ /** Tags to assign to each wishlist. */
201
221
  assignTags?: Tags;
202
- /** Tags to unassign. */
222
+ /** Tags to unassign from each wishlist. */
203
223
  unassignTags?: Tags;
204
224
  }
205
225
  interface BulkUpdateWishlistTagsResponse {
206
226
  /**
207
- * Per-wishlist results.
227
+ * Results for each wishlist, in the same order as the request.
208
228
  * @minSize 1
209
229
  * @maxSize 100
210
230
  */
211
231
  results?: BulkUpdateWishlistTagsResult[];
212
- /** Aggregate metadata for the bulk action. */
232
+ /** Metadata about the bulk action as a whole. */
213
233
  bulkActionMetadata?: BulkActionMetadata;
214
234
  }
215
235
  interface ItemMetadata {
@@ -234,7 +254,7 @@ interface ApplicationError {
234
254
  data?: Record<string, any> | null;
235
255
  }
236
256
  interface BulkUpdateWishlistTagsResult {
237
- /** Per-item result metadata (success/failure). */
257
+ /** Metadata about the update for a single wishlist, including whether it succeeded. */
238
258
  itemMetadata?: ItemMetadata;
239
259
  }
240
260
  interface BulkActionMetadata {
@@ -245,21 +265,21 @@ interface BulkActionMetadata {
245
265
  /** Number of failures without details because detailed failure threshold was exceeded. */
246
266
  undetailedFailures?: number;
247
267
  }
248
- /**
249
- * Tags by filter (empty filter = all wishlists belonging to the site_member_id).
250
- * assign_tags or unassign_tags (or both) must be non-empty.
251
- */
252
268
  interface BulkUpdateWishlistTagsByFilterRequest {
253
- /** WQL filter selecting wishlists (empty = all belonging to the site_member_id). */
269
+ /**
270
+ * Filter object. An empty filter matches all of the current member's wishlists.
271
+ *
272
+ * 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.
273
+ */
254
274
  filter: Record<string, any> | null;
255
- /** Tags to assign. A tag present in both lists is assigned. */
275
+ /** Tags to assign to each matching wishlist. */
256
276
  assignTags?: Tags;
257
- /** Tags to unassign. */
277
+ /** Tags to unassign from each matching wishlist. */
258
278
  unassignTags?: Tags;
259
279
  }
260
280
  interface BulkUpdateWishlistTagsByFilterResponse {
261
281
  /**
262
- * Async job ID for tracking the operation.
282
+ * 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.
263
283
  * @format GUID
264
284
  */
265
285
  jobId?: string;
@@ -293,7 +313,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
293
313
  /** If present, indicates the action that triggered the event. */
294
314
  originatedFrom?: string | null;
295
315
  /**
296
- * 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.
316
+ * 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.
297
317
  * 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.
298
318
  */
299
319
  entityEventSequence?: string | null;
@@ -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.mjs';
2
+ import { GetDefaultWishlistOptions, GetDefaultWishlistResponse, CatalogReference, AddItemOptions, AddItemResponse, AddItemApplicationErrors, RemoveItemOptions, RemoveItemResponse, BulkUpdateWishlistTagsOptions, BulkUpdateWishlistTagsResponse, BulkUpdateWishlistTagsApplicationErrors, BulkUpdateWishlistTagsByFilterOptions, BulkUpdateWishlistTagsByFilterResponse, BulkUpdateWishlistTagsByFilterApplicationErrors } from './index.typings.mjs';
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.mjs';
4
4
 
5
5
  /** @internal */
6
6
  declare function getDefaultWishlist$1(httpClient: HttpClient): GetDefaultWishlistSignature;
7
7
  interface GetDefaultWishlistSignature {
8
8
  /**
9
- * Returns the caller's default wishlist. Empty representation if none exists.
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.memberId` | `wishlist.items` | `wishlist.items.${number}.catalogReference.catalogItemId` | `wishlist.items.${number}.catalogReference.appId` | `wishlist.tags.privateTags.tagIds`, 6>>;
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 items to the caller's wishlist (auto-created on first use). Duplicates are skipped;
18
- * exceeding the 100-item cap returns WISHLIST_ITEMS_LIMIT_EXCEEDED.
19
- * @param - Item to add. Already present items (full three-field equality) are silently skipped.
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`, 2>, options?: AddItemOptions): Promise<NonNullablePaths<AddItemResponse, `wishlist.memberId` | `wishlist.items` | `wishlist.items.${number}.catalogReference.catalogItemId` | `wishlist.items.${number}.catalogReference.appId` | `wishlist.tags.privateTags.tagIds`, 6> & {
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 caller's wishlist. Absent item / no wishlist is a silent no-op.
30
- * @param - Item to remove. Absent items are silently skipped.
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`, 2>, options?: RemoveItemOptions): Promise<NonNullablePaths<RemoveItemResponse, `wishlist.memberId` | `wishlist.items` | `wishlist.items.${number}.catalogReference.catalogItemId` | `wishlist.items.${number}.catalogReference.appId` | `wishlist.tags.privateTags.tagIds`, 6>>;
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
- * Synchronously assigns/unassigns tags on wishlists by ID.
39
- * @param - Wishlist IDs to update (1–100).
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`, 6> & {
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 assigns/unassigns tags on wishlists matching a filter
50
- * (empty filter = all wishlists belonging to the site_member_id). Returns a job_id.
51
- * @param - WQL filter selecting wishlists (empty = all belonging to the site_member_id).
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`, 2> & {
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 };