@wix/auto_sdk_ecom_wishlists 1.0.0

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.
Files changed (39) hide show
  1. package/build/cjs/index.d.ts +456 -0
  2. package/build/cjs/index.js +391 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +343 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +456 -0
  8. package/build/cjs/meta.js +288 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/index.d.mts +456 -0
  11. package/build/es/index.mjs +362 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/index.typings.d.mts +1 -0
  14. package/build/es/index.typings.mjs +314 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +456 -0
  17. package/build/es/meta.mjs +256 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/es/package.json +3 -0
  20. package/build/internal/cjs/index.d.ts +69 -0
  21. package/build/internal/cjs/index.js +391 -0
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/cjs/index.typings.d.ts +518 -0
  24. package/build/internal/cjs/index.typings.js +343 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/internal/cjs/meta.d.ts +457 -0
  27. package/build/internal/cjs/meta.js +288 -0
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/internal/es/index.d.mts +69 -0
  30. package/build/internal/es/index.mjs +362 -0
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/es/index.typings.d.mts +518 -0
  33. package/build/internal/es/index.typings.mjs +314 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/internal/es/meta.d.mts +457 -0
  36. package/build/internal/es/meta.mjs +256 -0
  37. package/build/internal/es/meta.mjs.map +1 -0
  38. package/meta/package.json +3 -0
  39. package/package.json +55 -0
@@ -0,0 +1,456 @@
1
+ /**
2
+ * A Wishlist is a collection of catalog items saved by a site member.
3
+ * Items are embedded (capped at 100) and identified by a CatalogReference
4
+ * (catalog_item_id + app_id + options), so different variants are distinct. See:
5
+ * https://dev.wix.com/docs/rest/business-solutions/e-commerce/catalog-service-plugin/handle-item-variants
6
+ */
7
+ interface Wishlist {
8
+ /**
9
+ * Wishlist ID.
10
+ * @format GUID
11
+ * @readonly
12
+ */
13
+ _id?: string | null;
14
+ /**
15
+ * The ID of the wishlist owner.
16
+ * @readonly
17
+ * @format GUID
18
+ */
19
+ memberId?: string;
20
+ /**
21
+ * Saved items. Managed via AddItem / RemoveItem.
22
+ * @maxSize 100
23
+ * @readonly
24
+ */
25
+ items?: WishlistItem[];
26
+ /**
27
+ * Date and time the wishlist was created.
28
+ * @readonly
29
+ */
30
+ _createdDate?: Date | null;
31
+ /**
32
+ * Date and time the wishlist was last updated.
33
+ * @readonly
34
+ */
35
+ _updatedDate?: Date | null;
36
+ /** Data Extensions */
37
+ extendedFields?: ExtendedFields;
38
+ /** Tags */
39
+ tags?: Tags;
40
+ }
41
+ /**
42
+ * A single item saved in a wishlist.
43
+ * Managed via Wishlists.AddItem / RemoveItem.
44
+ */
45
+ interface WishlistItem {
46
+ /** Catalog reference identifying the saved item (the uniqueness key within a wishlist). */
47
+ catalogReference?: CatalogReference;
48
+ /**
49
+ * When the item was added to the wishlist.
50
+ * @readonly
51
+ */
52
+ addedDate?: Date | null;
53
+ }
54
+ /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
55
+ interface CatalogReference {
56
+ /**
57
+ * ID of the item within the catalog it belongs to.
58
+ * @minLength 1
59
+ * @maxLength 36
60
+ */
61
+ catalogItemId?: string;
62
+ /**
63
+ * ID of the app providing the catalog.
64
+ *
65
+ * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
66
+ *
67
+ * For items from Wix catalogs, the following values always apply:
68
+ * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
69
+ * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
70
+ * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
71
+ * @minLength 1
72
+ */
73
+ appId?: string;
74
+ /**
75
+ * Additional item details in `key:value` pairs.
76
+ *
77
+ * Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.
78
+ *
79
+ * For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)
80
+ * or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction).
81
+ */
82
+ options?: Record<string, any> | null;
83
+ }
84
+ interface ExtendedFields {
85
+ /**
86
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
87
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
88
+ *
89
+ * You can only access fields for which you have the appropriate permissions.
90
+ *
91
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
92
+ */
93
+ namespaces?: Record<string, Record<string, any>>;
94
+ }
95
+ /**
96
+ * Common object for tags.
97
+ * Should be use as in this example:
98
+ * message Foo {
99
+ * option (.wix.api.decomposite_of) = "wix.commons.v2.tags.Foo";
100
+ * string id = 1;
101
+ * ...
102
+ * Tags tags = 5
103
+ * }
104
+ *
105
+ * example of taggable entity
106
+ * {
107
+ * id: "123"
108
+ * tags: {
109
+ * public_tags: {
110
+ * tag_ids:["11","22"]
111
+ * },
112
+ * private_tags: {
113
+ * tag_ids: ["33", "44"]
114
+ * }
115
+ * }
116
+ * }
117
+ */
118
+ interface Tags {
119
+ /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */
120
+ privateTags?: TagList;
121
+ /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */
122
+ publicTags?: TagList;
123
+ }
124
+ interface TagList {
125
+ /**
126
+ * List of tag IDs.
127
+ * @maxSize 100
128
+ * @maxLength 5
129
+ */
130
+ tagIds?: string[];
131
+ }
132
+ /** Payload for the WishlistItemAdded ACTION domain event. */
133
+ interface WishlistItemAdded {
134
+ /**
135
+ * ID of the wishlist the item was added to.
136
+ * @format GUID
137
+ */
138
+ wishlistId?: string;
139
+ /** The item that was added. */
140
+ item?: WishlistItem;
141
+ }
142
+ /** Payload for the WishlistItemRemoved ACTION domain event. */
143
+ interface WishlistItemRemoved {
144
+ /**
145
+ * ID of the wishlist the item was removed from.
146
+ * @format GUID
147
+ */
148
+ wishlistId?: string;
149
+ /** The item that was removed. */
150
+ item?: WishlistItem;
151
+ }
152
+ /** Payload for the WishlistTagsModified ACTION domain event. */
153
+ interface WishlistTagsModified {
154
+ /** The wishlist whose tags changed. */
155
+ wishlist?: Wishlist;
156
+ /** Tags assigned in this change. */
157
+ assignedTags?: Tags;
158
+ /** Tags unassigned in this change. */
159
+ unassignedTags?: Tags;
160
+ }
161
+ /** Empty — resolves the caller's wishlist from request context. */
162
+ interface GetDefaultWishlistRequest {
163
+ }
164
+ interface GetDefaultWishlistResponse {
165
+ /** The caller's wishlist (empty representation if none exists). */
166
+ wishlist?: Wishlist;
167
+ }
168
+ interface AddItemRequest {
169
+ /** Item to add. Already present items (full three-field equality) are silently skipped. */
170
+ catalogReference: CatalogReference;
171
+ /** Whether to return the updated wishlist in the response. */
172
+ returnEntity?: boolean;
173
+ }
174
+ interface AddItemResponse {
175
+ /** The updated wishlist. */
176
+ wishlist?: Wishlist;
177
+ }
178
+ interface RemoveItemRequest {
179
+ /** Item to remove. Absent items are silently skipped. */
180
+ catalogReference: CatalogReference;
181
+ /** Whether to return the updated wishlist in the response. */
182
+ returnEntity?: boolean;
183
+ }
184
+ interface RemoveItemResponse {
185
+ /** The updated wishlist. */
186
+ wishlist?: Wishlist;
187
+ }
188
+ /** Tags by wishlist ID. assign_tags or unassign_tags (or both) must be non-empty. */
189
+ interface BulkUpdateWishlistTagsRequest {
190
+ /**
191
+ * Wishlist IDs to update (1–100).
192
+ * @minSize 1
193
+ * @maxSize 100
194
+ * @format GUID
195
+ */
196
+ wishlistIds: string[];
197
+ /** Tags to assign. A tag present in both lists is assigned. */
198
+ assignTags?: Tags;
199
+ /** Tags to unassign. */
200
+ unassignTags?: Tags;
201
+ }
202
+ interface BulkUpdateWishlistTagsResponse {
203
+ /**
204
+ * Per-wishlist results.
205
+ * @minSize 1
206
+ * @maxSize 100
207
+ */
208
+ results?: BulkUpdateWishlistTagsResult[];
209
+ /** Aggregate metadata for the bulk action. */
210
+ bulkActionMetadata?: BulkActionMetadata;
211
+ }
212
+ interface ItemMetadata {
213
+ /**
214
+ * Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.
215
+ * @format GUID
216
+ */
217
+ _id?: string | null;
218
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
219
+ originalIndex?: number;
220
+ /** Whether the requested action for this item was successful. When `false`, the `error` field is returned. */
221
+ success?: boolean;
222
+ /** Details about the error in case of failure. */
223
+ error?: ApplicationError;
224
+ }
225
+ interface ApplicationError {
226
+ /** Error code. */
227
+ code?: string;
228
+ /** Description of the error. */
229
+ description?: string;
230
+ /** Data related to the error. */
231
+ data?: Record<string, any> | null;
232
+ }
233
+ interface BulkUpdateWishlistTagsResult {
234
+ /** Per-item result metadata (success/failure). */
235
+ itemMetadata?: ItemMetadata;
236
+ }
237
+ interface BulkActionMetadata {
238
+ /** Number of items that were successfully processed. */
239
+ totalSuccesses?: number;
240
+ /** Number of items that couldn't be processed. */
241
+ totalFailures?: number;
242
+ /** Number of failures without details because detailed failure threshold was exceeded. */
243
+ undetailedFailures?: number;
244
+ }
245
+ /**
246
+ * Tags by filter (empty filter = all wishlists belonging to the site_member_id).
247
+ * assign_tags or unassign_tags (or both) must be non-empty.
248
+ */
249
+ interface BulkUpdateWishlistTagsByFilterRequest {
250
+ /** WQL filter selecting wishlists (empty = all belonging to the site_member_id). */
251
+ filter: Record<string, any> | null;
252
+ /** Tags to assign. A tag present in both lists is assigned. */
253
+ assignTags?: Tags;
254
+ /** Tags to unassign. */
255
+ unassignTags?: Tags;
256
+ }
257
+ interface BulkUpdateWishlistTagsByFilterResponse {
258
+ /**
259
+ * Async job ID for tracking the operation.
260
+ * @format GUID
261
+ */
262
+ jobId?: string;
263
+ }
264
+ interface DomainEvent extends DomainEventBodyOneOf {
265
+ createdEvent?: EntityCreatedEvent;
266
+ updatedEvent?: EntityUpdatedEvent;
267
+ deletedEvent?: EntityDeletedEvent;
268
+ actionEvent?: ActionEvent;
269
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
270
+ _id?: string;
271
+ /**
272
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
273
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
274
+ */
275
+ entityFqdn?: string;
276
+ /**
277
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
278
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
279
+ */
280
+ slug?: string;
281
+ /** ID of the entity associated with the event. */
282
+ entityId?: string;
283
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
284
+ eventTime?: Date | null;
285
+ /**
286
+ * Whether the event was triggered as a result of a privacy regulation application
287
+ * (for example, GDPR).
288
+ */
289
+ triggeredByAnonymizeRequest?: boolean | null;
290
+ /** If present, indicates the action that triggered the event. */
291
+ originatedFrom?: string | null;
292
+ /**
293
+ * 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.
294
+ * 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.
295
+ */
296
+ entityEventSequence?: string | null;
297
+ }
298
+ /** @oneof */
299
+ interface DomainEventBodyOneOf {
300
+ createdEvent?: EntityCreatedEvent;
301
+ updatedEvent?: EntityUpdatedEvent;
302
+ deletedEvent?: EntityDeletedEvent;
303
+ actionEvent?: ActionEvent;
304
+ }
305
+ interface EntityCreatedEvent {
306
+ entity?: string;
307
+ }
308
+ interface RestoreInfo {
309
+ deletedDate?: Date | null;
310
+ }
311
+ interface EntityUpdatedEvent {
312
+ /**
313
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
314
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
315
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
316
+ */
317
+ currentEntity?: string;
318
+ }
319
+ interface EntityDeletedEvent {
320
+ /** Entity that was deleted. */
321
+ deletedEntity?: string | null;
322
+ }
323
+ interface ActionEvent {
324
+ body?: string;
325
+ }
326
+ interface MessageEnvelope {
327
+ /**
328
+ * App instance ID.
329
+ * @format GUID
330
+ */
331
+ instanceId?: string | null;
332
+ /**
333
+ * Event type.
334
+ * @maxLength 150
335
+ */
336
+ eventType?: string;
337
+ /** The identification type and identity data. */
338
+ identity?: IdentificationData;
339
+ /** Stringify payload. */
340
+ data?: string;
341
+ /** Details related to the account */
342
+ accountInfo?: AccountInfo;
343
+ }
344
+ interface IdentificationData extends IdentificationDataIdOneOf {
345
+ /**
346
+ * ID of a site visitor that has not logged in to the site.
347
+ * @format GUID
348
+ */
349
+ anonymousVisitorId?: string;
350
+ /**
351
+ * ID of a site visitor that has logged in to the site.
352
+ * @format GUID
353
+ */
354
+ memberId?: string;
355
+ /**
356
+ * ID of a Wix user (site owner, contributor, etc.).
357
+ * @format GUID
358
+ */
359
+ wixUserId?: string;
360
+ /**
361
+ * ID of an app.
362
+ * @format GUID
363
+ */
364
+ appId?: string;
365
+ /** @readonly */
366
+ identityType?: WebhookIdentityTypeWithLiterals;
367
+ }
368
+ /** @oneof */
369
+ interface IdentificationDataIdOneOf {
370
+ /**
371
+ * ID of a site visitor that has not logged in to the site.
372
+ * @format GUID
373
+ */
374
+ anonymousVisitorId?: string;
375
+ /**
376
+ * ID of a site visitor that has logged in to the site.
377
+ * @format GUID
378
+ */
379
+ memberId?: string;
380
+ /**
381
+ * ID of a Wix user (site owner, contributor, etc.).
382
+ * @format GUID
383
+ */
384
+ wixUserId?: string;
385
+ /**
386
+ * ID of an app.
387
+ * @format GUID
388
+ */
389
+ appId?: string;
390
+ }
391
+ declare enum WebhookIdentityType {
392
+ UNKNOWN = "UNKNOWN",
393
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
394
+ MEMBER = "MEMBER",
395
+ WIX_USER = "WIX_USER",
396
+ APP = "APP"
397
+ }
398
+ /** @enumType */
399
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
400
+ interface AccountInfo {
401
+ /**
402
+ * ID of the Wix account associated with the event.
403
+ * @format GUID
404
+ */
405
+ accountId?: string | null;
406
+ /**
407
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
408
+ * @format GUID
409
+ */
410
+ parentAccountId?: string | null;
411
+ /**
412
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
413
+ * @format GUID
414
+ */
415
+ siteId?: string | null;
416
+ }
417
+ /** @docsIgnore */
418
+ type AddItemApplicationErrors = {
419
+ code?: 'WISHLIST_ITEMS_LIMIT_EXCEEDED';
420
+ description?: string;
421
+ data?: Record<string, any>;
422
+ };
423
+ /** @docsIgnore */
424
+ type BulkUpdateWishlistTagsApplicationErrors = {
425
+ code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
426
+ description?: string;
427
+ data?: Record<string, any>;
428
+ };
429
+ /** @docsIgnore */
430
+ type BulkUpdateWishlistTagsByFilterApplicationErrors = {
431
+ code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
432
+ description?: string;
433
+ data?: Record<string, any>;
434
+ };
435
+ interface AddItemOptions {
436
+ /** Whether to return the updated wishlist in the response. */
437
+ returnEntity?: boolean;
438
+ }
439
+ interface RemoveItemOptions {
440
+ /** Whether to return the updated wishlist in the response. */
441
+ returnEntity?: boolean;
442
+ }
443
+ interface BulkUpdateWishlistTagsOptions {
444
+ /** Tags to assign. A tag present in both lists is assigned. */
445
+ assignTags?: Tags;
446
+ /** Tags to unassign. */
447
+ unassignTags?: Tags;
448
+ }
449
+ interface BulkUpdateWishlistTagsByFilterOptions {
450
+ /** Tags to assign. A tag present in both lists is assigned. */
451
+ assignTags?: Tags;
452
+ /** Tags to unassign. */
453
+ unassignTags?: Tags;
454
+ }
455
+
456
+ 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 };