@wix/stores 1.0.134 → 1.0.136
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/context.d.ts +5 -5
- package/build/cjs/context.js +5 -5
- package/build/cjs/context.js.map +1 -1
- package/build/cjs/index.d.ts +5 -6
- package/build/cjs/index.js +6 -7
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +5 -6
- package/build/cjs/meta.js +6 -7
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +5 -5
- package/build/es/context.js +5 -5
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +5 -6
- package/build/es/index.js +5 -6
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +5 -6
- package/build/es/meta.js +5 -6
- package/build/es/meta.js.map +1 -1
- package/package.json +15 -9
- package/build/cjs/index.typings.d.ts +0 -6
- package/build/cjs/index.typings.js +0 -33
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/platform-v1-wishlist.context.d.ts +0 -3
- package/build/cjs/src/platform-v1-wishlist.context.js +0 -22
- package/build/cjs/src/platform-v1-wishlist.context.js.map +0 -1
- package/build/cjs/src/platform-v1-wishlist.http.d.ts +0 -3
- package/build/cjs/src/platform-v1-wishlist.http.js +0 -91
- package/build/cjs/src/platform-v1-wishlist.http.js.map +0 -1
- package/build/cjs/src/platform-v1-wishlist.meta.d.ts +0 -13
- package/build/cjs/src/platform-v1-wishlist.meta.js +0 -47
- package/build/cjs/src/platform-v1-wishlist.meta.js.map +0 -1
- package/build/cjs/src/platform-v1-wishlist.public.d.ts +0 -15
- package/build/cjs/src/platform-v1-wishlist.public.js +0 -12
- package/build/cjs/src/platform-v1-wishlist.public.js.map +0 -1
- package/build/cjs/src/platform-v1-wishlist.types.d.ts +0 -104
- package/build/cjs/src/platform-v1-wishlist.types.js +0 -3
- package/build/cjs/src/platform-v1-wishlist.types.js.map +0 -1
- package/build/cjs/src/platform-v1-wishlist.universal.d.ts +0 -121
- package/build/cjs/src/platform-v1-wishlist.universal.js +0 -106
- package/build/cjs/src/platform-v1-wishlist.universal.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-collection.context.d.ts +0 -5
- package/build/cjs/src/stores-catalog-v1-collection.context.js +0 -56
- package/build/cjs/src/stores-catalog-v1-collection.context.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-collection.http.d.ts +0 -10
- package/build/cjs/src/stores-catalog-v1-collection.http.js +0 -110
- package/build/cjs/src/stores-catalog-v1-collection.http.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-collection.meta.d.ts +0 -19
- package/build/cjs/src/stores-catalog-v1-collection.meta.js +0 -85
- package/build/cjs/src/stores-catalog-v1-collection.meta.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-collection.public.d.ts +0 -59
- package/build/cjs/src/stores-catalog-v1-collection.public.js +0 -27
- package/build/cjs/src/stores-catalog-v1-collection.public.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-collection.types.d.ts +0 -414
- package/build/cjs/src/stores-catalog-v1-collection.types.js +0 -18
- package/build/cjs/src/stores-catalog-v1-collection.types.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-collection.universal.d.ts +0 -452
- package/build/cjs/src/stores-catalog-v1-collection.universal.js +0 -225
- package/build/cjs/src/stores-catalog-v1-collection.universal.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-product.context.d.ts +0 -35
- package/build/cjs/src/stores-catalog-v1-product.context.js +0 -566
- package/build/cjs/src/stores-catalog-v1-product.context.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-product.http.d.ts +0 -89
- package/build/cjs/src/stores-catalog-v1-product.http.js +0 -1716
- package/build/cjs/src/stores-catalog-v1-product.http.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-product.meta.d.ts +0 -95
- package/build/cjs/src/stores-catalog-v1-product.meta.js +0 -655
- package/build/cjs/src/stores-catalog-v1-product.meta.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-product.public.d.ts +0 -1216
- package/build/cjs/src/stores-catalog-v1-product.public.js +0 -221
- package/build/cjs/src/stores-catalog-v1-product.public.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-product.types.d.ts +0 -4235
- package/build/cjs/src/stores-catalog-v1-product.types.js +0 -78
- package/build/cjs/src/stores-catalog-v1-product.types.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-product.universal.d.ts +0 -5074
- package/build/cjs/src/stores-catalog-v1-product.universal.js +0 -2220
- package/build/cjs/src/stores-catalog-v1-product.universal.js.map +0 -1
- package/build/cjs/src/stores-v1-abandoned-cart.http.d.ts +0 -6
- package/build/cjs/src/stores-v1-abandoned-cart.http.js +0 -103
- package/build/cjs/src/stores-v1-abandoned-cart.http.js.map +0 -1
- package/build/cjs/src/stores-v1-abandoned-cart.meta.d.ts +0 -16
- package/build/cjs/src/stores-v1-abandoned-cart.meta.js +0 -66
- package/build/cjs/src/stores-v1-abandoned-cart.meta.js.map +0 -1
- package/build/cjs/src/stores-v1-abandoned-cart.public.d.ts +0 -19
- package/build/cjs/src/stores-v1-abandoned-cart.public.js +0 -22
- package/build/cjs/src/stores-v1-abandoned-cart.public.js.map +0 -1
- package/build/cjs/src/stores-v1-abandoned-cart.types.d.ts +0 -216
- package/build/cjs/src/stores-v1-abandoned-cart.types.js +0 -30
- package/build/cjs/src/stores-v1-abandoned-cart.types.js.map +0 -1
- package/build/cjs/src/stores-v1-abandoned-cart.universal.d.ts +0 -246
- package/build/cjs/src/stores-v1-abandoned-cart.universal.js +0 -189
- package/build/cjs/src/stores-v1-abandoned-cart.universal.js.map +0 -1
- package/build/cjs/src/stores-v1-subscription-option.context.d.ts +0 -14
- package/build/cjs/src/stores-v1-subscription-option.context.js +0 -209
- package/build/cjs/src/stores-v1-subscription-option.context.js.map +0 -1
- package/build/cjs/src/stores-v1-subscription-option.http.d.ts +0 -128
- package/build/cjs/src/stores-v1-subscription-option.http.js +0 -466
- package/build/cjs/src/stores-v1-subscription-option.http.js.map +0 -1
- package/build/cjs/src/stores-v1-subscription-option.meta.d.ts +0 -40
- package/build/cjs/src/stores-v1-subscription-option.meta.js +0 -258
- package/build/cjs/src/stores-v1-subscription-option.meta.js.map +0 -1
- package/build/cjs/src/stores-v1-subscription-option.public.d.ts +0 -46
- package/build/cjs/src/stores-v1-subscription-option.public.js +0 -81
- package/build/cjs/src/stores-v1-subscription-option.public.js.map +0 -1
- package/build/cjs/src/stores-v1-subscription-option.types.d.ts +0 -351
- package/build/cjs/src/stores-v1-subscription-option.types.js +0 -20
- package/build/cjs/src/stores-v1-subscription-option.types.js.map +0 -1
- package/build/cjs/src/stores-v1-subscription-option.universal.d.ts +0 -646
- package/build/cjs/src/stores-v1-subscription-option.universal.js +0 -893
- package/build/cjs/src/stores-v1-subscription-option.universal.js.map +0 -1
- package/build/cjs/src/stores-v2-inventory.context.d.ts +0 -7
- package/build/cjs/src/stores-v2-inventory.context.js +0 -90
- package/build/cjs/src/stores-v2-inventory.context.js.map +0 -1
- package/build/cjs/src/stores-v2-inventory.http.d.ts +0 -31
- package/build/cjs/src/stores-v2-inventory.http.js +0 -289
- package/build/cjs/src/stores-v2-inventory.http.js.map +0 -1
- package/build/cjs/src/stores-v2-inventory.meta.d.ts +0 -21
- package/build/cjs/src/stores-v2-inventory.meta.js +0 -125
- package/build/cjs/src/stores-v2-inventory.meta.js.map +0 -1
- package/build/cjs/src/stores-v2-inventory.public.d.ts +0 -13
- package/build/cjs/src/stores-v2-inventory.public.js +0 -41
- package/build/cjs/src/stores-v2-inventory.public.js.map +0 -1
- package/build/cjs/src/stores-v2-inventory.types.d.ts +0 -283
- package/build/cjs/src/stores-v2-inventory.types.js +0 -11
- package/build/cjs/src/stores-v2-inventory.types.js.map +0 -1
- package/build/cjs/src/stores-v2-inventory.universal.d.ts +0 -425
- package/build/cjs/src/stores-v2-inventory.universal.js +0 -382
- package/build/cjs/src/stores-v2-inventory.universal.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -6
- package/build/es/index.typings.js +0 -7
- package/build/es/index.typings.js.map +0 -1
- package/build/es/src/platform-v1-wishlist.context.d.ts +0 -3
- package/build/es/src/platform-v1-wishlist.context.js +0 -18
- package/build/es/src/platform-v1-wishlist.context.js.map +0 -1
- package/build/es/src/platform-v1-wishlist.http.d.ts +0 -3
- package/build/es/src/platform-v1-wishlist.http.js +0 -87
- package/build/es/src/platform-v1-wishlist.http.js.map +0 -1
- package/build/es/src/platform-v1-wishlist.meta.d.ts +0 -13
- package/build/es/src/platform-v1-wishlist.meta.js +0 -20
- package/build/es/src/platform-v1-wishlist.meta.js.map +0 -1
- package/build/es/src/platform-v1-wishlist.public.d.ts +0 -15
- package/build/es/src/platform-v1-wishlist.public.js +0 -8
- package/build/es/src/platform-v1-wishlist.public.js.map +0 -1
- package/build/es/src/platform-v1-wishlist.types.d.ts +0 -104
- package/build/es/src/platform-v1-wishlist.types.js +0 -2
- package/build/es/src/platform-v1-wishlist.types.js.map +0 -1
- package/build/es/src/platform-v1-wishlist.universal.d.ts +0 -121
- package/build/es/src/platform-v1-wishlist.universal.js +0 -79
- package/build/es/src/platform-v1-wishlist.universal.js.map +0 -1
- package/build/es/src/stores-catalog-v1-collection.context.d.ts +0 -5
- package/build/es/src/stores-catalog-v1-collection.context.js +0 -50
- package/build/es/src/stores-catalog-v1-collection.context.js.map +0 -1
- package/build/es/src/stores-catalog-v1-collection.http.d.ts +0 -10
- package/build/es/src/stores-catalog-v1-collection.http.js +0 -104
- package/build/es/src/stores-catalog-v1-collection.http.js.map +0 -1
- package/build/es/src/stores-catalog-v1-collection.meta.d.ts +0 -19
- package/build/es/src/stores-catalog-v1-collection.meta.js +0 -56
- package/build/es/src/stores-catalog-v1-collection.meta.js.map +0 -1
- package/build/es/src/stores-catalog-v1-collection.public.d.ts +0 -59
- package/build/es/src/stores-catalog-v1-collection.public.js +0 -19
- package/build/es/src/stores-catalog-v1-collection.public.js.map +0 -1
- package/build/es/src/stores-catalog-v1-collection.types.d.ts +0 -414
- package/build/es/src/stores-catalog-v1-collection.types.js +0 -15
- package/build/es/src/stores-catalog-v1-collection.types.js.map +0 -1
- package/build/es/src/stores-catalog-v1-collection.universal.d.ts +0 -452
- package/build/es/src/stores-catalog-v1-collection.universal.js +0 -196
- package/build/es/src/stores-catalog-v1-collection.universal.js.map +0 -1
- package/build/es/src/stores-catalog-v1-product.context.d.ts +0 -35
- package/build/es/src/stores-catalog-v1-product.context.js +0 -530
- package/build/es/src/stores-catalog-v1-product.context.js.map +0 -1
- package/build/es/src/stores-catalog-v1-product.http.d.ts +0 -89
- package/build/es/src/stores-catalog-v1-product.http.js +0 -1680
- package/build/es/src/stores-catalog-v1-product.http.js.map +0 -1
- package/build/es/src/stores-catalog-v1-product.meta.d.ts +0 -95
- package/build/es/src/stores-catalog-v1-product.meta.js +0 -596
- package/build/es/src/stores-catalog-v1-product.meta.js.map +0 -1
- package/build/es/src/stores-catalog-v1-product.public.d.ts +0 -1216
- package/build/es/src/stores-catalog-v1-product.public.js +0 -170
- package/build/es/src/stores-catalog-v1-product.public.js.map +0 -1
- package/build/es/src/stores-catalog-v1-product.types.d.ts +0 -4235
- package/build/es/src/stores-catalog-v1-product.types.js +0 -75
- package/build/es/src/stores-catalog-v1-product.types.js.map +0 -1
- package/build/es/src/stores-catalog-v1-product.universal.d.ts +0 -5074
- package/build/es/src/stores-catalog-v1-product.universal.js +0 -2161
- package/build/es/src/stores-catalog-v1-product.universal.js.map +0 -1
- package/build/es/src/stores-v1-abandoned-cart.http.d.ts +0 -6
- package/build/es/src/stores-v1-abandoned-cart.http.js +0 -98
- package/build/es/src/stores-v1-abandoned-cart.http.js.map +0 -1
- package/build/es/src/stores-v1-abandoned-cart.meta.d.ts +0 -16
- package/build/es/src/stores-v1-abandoned-cart.meta.js +0 -38
- package/build/es/src/stores-v1-abandoned-cart.meta.js.map +0 -1
- package/build/es/src/stores-v1-abandoned-cart.public.d.ts +0 -19
- package/build/es/src/stores-v1-abandoned-cart.public.js +0 -14
- package/build/es/src/stores-v1-abandoned-cart.public.js.map +0 -1
- package/build/es/src/stores-v1-abandoned-cart.types.d.ts +0 -216
- package/build/es/src/stores-v1-abandoned-cart.types.js +0 -27
- package/build/es/src/stores-v1-abandoned-cart.types.js.map +0 -1
- package/build/es/src/stores-v1-abandoned-cart.universal.d.ts +0 -246
- package/build/es/src/stores-v1-abandoned-cart.universal.js +0 -161
- package/build/es/src/stores-v1-abandoned-cart.universal.js.map +0 -1
- package/build/es/src/stores-v1-subscription-option.context.d.ts +0 -14
- package/build/es/src/stores-v1-subscription-option.context.js +0 -194
- package/build/es/src/stores-v1-subscription-option.context.js.map +0 -1
- package/build/es/src/stores-v1-subscription-option.http.d.ts +0 -128
- package/build/es/src/stores-v1-subscription-option.http.js +0 -451
- package/build/es/src/stores-v1-subscription-option.http.js.map +0 -1
- package/build/es/src/stores-v1-subscription-option.meta.d.ts +0 -40
- package/build/es/src/stores-v1-subscription-option.meta.js +0 -220
- package/build/es/src/stores-v1-subscription-option.meta.js.map +0 -1
- package/build/es/src/stores-v1-subscription-option.public.d.ts +0 -46
- package/build/es/src/stores-v1-subscription-option.public.js +0 -64
- package/build/es/src/stores-v1-subscription-option.public.js.map +0 -1
- package/build/es/src/stores-v1-subscription-option.types.d.ts +0 -351
- package/build/es/src/stores-v1-subscription-option.types.js +0 -17
- package/build/es/src/stores-v1-subscription-option.types.js.map +0 -1
- package/build/es/src/stores-v1-subscription-option.universal.d.ts +0 -646
- package/build/es/src/stores-v1-subscription-option.universal.js +0 -855
- package/build/es/src/stores-v1-subscription-option.universal.js.map +0 -1
- package/build/es/src/stores-v2-inventory.context.d.ts +0 -7
- package/build/es/src/stores-v2-inventory.context.js +0 -82
- package/build/es/src/stores-v2-inventory.context.js.map +0 -1
- package/build/es/src/stores-v2-inventory.http.d.ts +0 -31
- package/build/es/src/stores-v2-inventory.http.js +0 -281
- package/build/es/src/stores-v2-inventory.http.js.map +0 -1
- package/build/es/src/stores-v2-inventory.meta.d.ts +0 -21
- package/build/es/src/stores-v2-inventory.meta.js +0 -94
- package/build/es/src/stores-v2-inventory.meta.js.map +0 -1
- package/build/es/src/stores-v2-inventory.public.d.ts +0 -13
- package/build/es/src/stores-v2-inventory.public.js +0 -30
- package/build/es/src/stores-v2-inventory.public.js.map +0 -1
- package/build/es/src/stores-v2-inventory.types.d.ts +0 -283
- package/build/es/src/stores-v2-inventory.types.js +0 -8
- package/build/es/src/stores-v2-inventory.types.js.map +0 -1
- package/build/es/src/stores-v2-inventory.universal.d.ts +0 -425
- package/build/es/src/stores-v2-inventory.universal.js +0 -351
- package/build/es/src/stores-v2-inventory.universal.js.map +0 -1
|
@@ -1,452 +0,0 @@
|
|
|
1
|
-
export interface Collection {
|
|
2
|
-
/**
|
|
3
|
-
* Collection ID (generated automatically by the catalog).
|
|
4
|
-
* @readonly
|
|
5
|
-
*/
|
|
6
|
-
_id?: string | null;
|
|
7
|
-
/** Collection name. */
|
|
8
|
-
name?: string | null;
|
|
9
|
-
/**
|
|
10
|
-
* Media items (images, videos etc) associated with this collection. Read only.
|
|
11
|
-
* @readonly
|
|
12
|
-
*/
|
|
13
|
-
media?: Media;
|
|
14
|
-
/**
|
|
15
|
-
* Number of products in the collection. Read only.
|
|
16
|
-
* @readonly
|
|
17
|
-
*/
|
|
18
|
-
numberOfProducts?: number;
|
|
19
|
-
/** Collection description. */
|
|
20
|
-
description?: string | null;
|
|
21
|
-
/** Collection slug. */
|
|
22
|
-
slug?: string | null;
|
|
23
|
-
/** Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`. */
|
|
24
|
-
visible?: boolean | null;
|
|
25
|
-
}
|
|
26
|
-
export interface Media {
|
|
27
|
-
/** Primary media (image, video etc) associated with this product. */
|
|
28
|
-
mainMedia?: MediaItem;
|
|
29
|
-
/** Media (images, videos etc) associated with this product. */
|
|
30
|
-
items?: MediaItem[];
|
|
31
|
-
}
|
|
32
|
-
export interface MediaItem extends MediaItemItemOneOf {
|
|
33
|
-
/** Image data (URL, size). */
|
|
34
|
-
image?: MediaItemUrlAndSize;
|
|
35
|
-
/** Video data (URL, size). */
|
|
36
|
-
video?: MediaItemVideo;
|
|
37
|
-
/** Media item thumbnail details. */
|
|
38
|
-
thumbnail?: MediaItemUrlAndSize;
|
|
39
|
-
/** Media item type (image, video, etc.). */
|
|
40
|
-
mediaType?: MediaItemType;
|
|
41
|
-
/** Media item title. */
|
|
42
|
-
title?: string;
|
|
43
|
-
/** Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`). */
|
|
44
|
-
_id?: string;
|
|
45
|
-
}
|
|
46
|
-
/** @oneof */
|
|
47
|
-
export interface MediaItemItemOneOf {
|
|
48
|
-
/** Image data (URL, size). */
|
|
49
|
-
image?: MediaItemUrlAndSize;
|
|
50
|
-
/** Video data (URL, size). */
|
|
51
|
-
video?: MediaItemVideo;
|
|
52
|
-
}
|
|
53
|
-
export interface MediaItemUrlAndSize {
|
|
54
|
-
/** Media item URL. */
|
|
55
|
-
url?: string;
|
|
56
|
-
/** Media item width. */
|
|
57
|
-
width?: number;
|
|
58
|
-
/** Media item height. */
|
|
59
|
-
height?: number;
|
|
60
|
-
/** Media format (mp4, png, etc.). */
|
|
61
|
-
format?: string | null;
|
|
62
|
-
/** Alt text. This text will be shown in case the image is not available. */
|
|
63
|
-
altText?: string | null;
|
|
64
|
-
}
|
|
65
|
-
export declare enum MediaItemType {
|
|
66
|
-
unspecified_media_item_type = "unspecified_media_item_type",
|
|
67
|
-
image = "image",
|
|
68
|
-
video = "video",
|
|
69
|
-
audio = "audio",
|
|
70
|
-
document = "document",
|
|
71
|
-
zip = "zip"
|
|
72
|
-
}
|
|
73
|
-
export interface MediaItemVideo {
|
|
74
|
-
/** Data (URL, size) about each resolution for which this video is available. */
|
|
75
|
-
files?: MediaItemUrlAndSize[];
|
|
76
|
-
/** ID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`. */
|
|
77
|
-
stillFrameMediaId?: string;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
|
|
81
|
-
* The search engines use this information for ranking purposes, or to display snippets in the search results.
|
|
82
|
-
* This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
|
|
83
|
-
*/
|
|
84
|
-
export interface SeoSchema {
|
|
85
|
-
/** SEO tag information. */
|
|
86
|
-
tags?: Tag[];
|
|
87
|
-
/** SEO general settings. */
|
|
88
|
-
settings?: Settings;
|
|
89
|
-
}
|
|
90
|
-
export interface Keyword {
|
|
91
|
-
/** Keyword value. */
|
|
92
|
-
term?: string;
|
|
93
|
-
/** Whether the keyword is the main focus keyword. */
|
|
94
|
-
isMain?: boolean;
|
|
95
|
-
}
|
|
96
|
-
export interface Tag {
|
|
97
|
-
/**
|
|
98
|
-
* SEO tag type.
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* Supported values: `title`, `meta`, `script`, `link`.
|
|
102
|
-
*/
|
|
103
|
-
type?: string;
|
|
104
|
-
/**
|
|
105
|
-
* A `{'key':'value'}` pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value.
|
|
106
|
-
* For example: `{'name': 'description', 'content': 'the description itself'}`.
|
|
107
|
-
*/
|
|
108
|
-
props?: Record<string, any> | null;
|
|
109
|
-
/** SEO tag meta data. For example, `{height: 300, width: 240}`. */
|
|
110
|
-
meta?: Record<string, any> | null;
|
|
111
|
-
/** SEO tag inner content. For example, `<title> inner content </title>`. */
|
|
112
|
-
children?: string;
|
|
113
|
-
/** Whether the tag is a custom tag. */
|
|
114
|
-
custom?: boolean;
|
|
115
|
-
/** Whether the tag is disabled. */
|
|
116
|
-
disabled?: boolean;
|
|
117
|
-
}
|
|
118
|
-
export interface Settings {
|
|
119
|
-
/**
|
|
120
|
-
* Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* Default: `false` (Auto Redirect is enabled.)
|
|
124
|
-
*/
|
|
125
|
-
preventAutoRedirect?: boolean;
|
|
126
|
-
/** User-selected keyword terms for a specific page. */
|
|
127
|
-
keywords?: Keyword[];
|
|
128
|
-
}
|
|
129
|
-
export interface QueryCollectionsRequest {
|
|
130
|
-
query?: PlatformQuery;
|
|
131
|
-
}
|
|
132
|
-
export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
|
|
133
|
-
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
134
|
-
paging?: PlatformPaging;
|
|
135
|
-
/** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
|
|
136
|
-
cursorPaging?: CursorPaging;
|
|
137
|
-
/** Filter object. */
|
|
138
|
-
filter?: Record<string, any> | null;
|
|
139
|
-
/** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */
|
|
140
|
-
sort?: Sorting[];
|
|
141
|
-
}
|
|
142
|
-
/** @oneof */
|
|
143
|
-
export interface PlatformQueryPagingMethodOneOf {
|
|
144
|
-
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
145
|
-
paging?: PlatformPaging;
|
|
146
|
-
/** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
|
|
147
|
-
cursorPaging?: CursorPaging;
|
|
148
|
-
}
|
|
149
|
-
export interface Sorting {
|
|
150
|
-
/** Name of the field to sort by. */
|
|
151
|
-
fieldName?: string;
|
|
152
|
-
/** Sort order. */
|
|
153
|
-
order?: SortOrder;
|
|
154
|
-
}
|
|
155
|
-
export declare enum SortOrder {
|
|
156
|
-
ASC = "ASC",
|
|
157
|
-
DESC = "DESC"
|
|
158
|
-
}
|
|
159
|
-
export interface PlatformPaging {
|
|
160
|
-
/** Number of items to load. */
|
|
161
|
-
limit?: number | null;
|
|
162
|
-
/** Number of items to skip in the current sort order. */
|
|
163
|
-
offset?: number | null;
|
|
164
|
-
}
|
|
165
|
-
export interface CursorPaging {
|
|
166
|
-
/** Maximum number of items to return in the results. */
|
|
167
|
-
limit?: number | null;
|
|
168
|
-
/**
|
|
169
|
-
* Pointer to the next or previous page in the list of results.
|
|
170
|
-
*
|
|
171
|
-
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
172
|
-
* Not relevant for the first request.
|
|
173
|
-
*/
|
|
174
|
-
cursor?: string | null;
|
|
175
|
-
}
|
|
176
|
-
export interface QueryCollectionsResponse {
|
|
177
|
-
collections?: Collection[];
|
|
178
|
-
metadata?: PlatformPagingMetadata;
|
|
179
|
-
}
|
|
180
|
-
export interface PlatformPagingMetadata {
|
|
181
|
-
/** The number of items returned in this response. */
|
|
182
|
-
count?: number | null;
|
|
183
|
-
/** The offset which was requested. Returned if offset paging was used. */
|
|
184
|
-
offset?: number | null;
|
|
185
|
-
/** The total number of items that match the query. Returned if offset paging was used. */
|
|
186
|
-
total?: number | null;
|
|
187
|
-
/** Cursors to navigate through result pages. Returned if cursor paging was used. */
|
|
188
|
-
cursors?: Cursors;
|
|
189
|
-
}
|
|
190
|
-
export interface Cursors {
|
|
191
|
-
/** Cursor string pointing to the next page in the list of results. */
|
|
192
|
-
next?: string | null;
|
|
193
|
-
/** Cursor pointing to the previous page in the list of results. */
|
|
194
|
-
prev?: string | null;
|
|
195
|
-
}
|
|
196
|
-
export interface GetCollectionRequest {
|
|
197
|
-
/** Requested collection ID. */
|
|
198
|
-
_id: string;
|
|
199
|
-
}
|
|
200
|
-
export interface GetCollectionResponse {
|
|
201
|
-
collection?: Collection;
|
|
202
|
-
}
|
|
203
|
-
export interface GetCollectionBySlugRequest {
|
|
204
|
-
/** Slug of the collection to retrieve. */
|
|
205
|
-
slug: string;
|
|
206
|
-
}
|
|
207
|
-
export interface GetCollectionBySlugResponse {
|
|
208
|
-
/** The requested collection. */
|
|
209
|
-
collection?: Collection;
|
|
210
|
-
}
|
|
211
|
-
export interface QueryCollectionsResponseNonNullableFields {
|
|
212
|
-
collections: {
|
|
213
|
-
media?: {
|
|
214
|
-
mainMedia?: {
|
|
215
|
-
image?: {
|
|
216
|
-
url: string;
|
|
217
|
-
width: number;
|
|
218
|
-
height: number;
|
|
219
|
-
};
|
|
220
|
-
video?: {
|
|
221
|
-
files: {
|
|
222
|
-
url: string;
|
|
223
|
-
width: number;
|
|
224
|
-
height: number;
|
|
225
|
-
}[];
|
|
226
|
-
stillFrameMediaId: string;
|
|
227
|
-
};
|
|
228
|
-
thumbnail?: {
|
|
229
|
-
url: string;
|
|
230
|
-
width: number;
|
|
231
|
-
height: number;
|
|
232
|
-
};
|
|
233
|
-
mediaType: MediaItemType;
|
|
234
|
-
title: string;
|
|
235
|
-
_id: string;
|
|
236
|
-
};
|
|
237
|
-
items: {
|
|
238
|
-
image?: {
|
|
239
|
-
url: string;
|
|
240
|
-
width: number;
|
|
241
|
-
height: number;
|
|
242
|
-
};
|
|
243
|
-
video?: {
|
|
244
|
-
files: {
|
|
245
|
-
url: string;
|
|
246
|
-
width: number;
|
|
247
|
-
height: number;
|
|
248
|
-
}[];
|
|
249
|
-
stillFrameMediaId: string;
|
|
250
|
-
};
|
|
251
|
-
thumbnail?: {
|
|
252
|
-
url: string;
|
|
253
|
-
width: number;
|
|
254
|
-
height: number;
|
|
255
|
-
};
|
|
256
|
-
mediaType: MediaItemType;
|
|
257
|
-
title: string;
|
|
258
|
-
_id: string;
|
|
259
|
-
}[];
|
|
260
|
-
};
|
|
261
|
-
numberOfProducts: number;
|
|
262
|
-
}[];
|
|
263
|
-
}
|
|
264
|
-
export interface GetCollectionResponseNonNullableFields {
|
|
265
|
-
collection?: {
|
|
266
|
-
media?: {
|
|
267
|
-
mainMedia?: {
|
|
268
|
-
image?: {
|
|
269
|
-
url: string;
|
|
270
|
-
width: number;
|
|
271
|
-
height: number;
|
|
272
|
-
};
|
|
273
|
-
video?: {
|
|
274
|
-
files: {
|
|
275
|
-
url: string;
|
|
276
|
-
width: number;
|
|
277
|
-
height: number;
|
|
278
|
-
}[];
|
|
279
|
-
stillFrameMediaId: string;
|
|
280
|
-
};
|
|
281
|
-
thumbnail?: {
|
|
282
|
-
url: string;
|
|
283
|
-
width: number;
|
|
284
|
-
height: number;
|
|
285
|
-
};
|
|
286
|
-
mediaType: MediaItemType;
|
|
287
|
-
title: string;
|
|
288
|
-
_id: string;
|
|
289
|
-
};
|
|
290
|
-
items: {
|
|
291
|
-
image?: {
|
|
292
|
-
url: string;
|
|
293
|
-
width: number;
|
|
294
|
-
height: number;
|
|
295
|
-
};
|
|
296
|
-
video?: {
|
|
297
|
-
files: {
|
|
298
|
-
url: string;
|
|
299
|
-
width: number;
|
|
300
|
-
height: number;
|
|
301
|
-
}[];
|
|
302
|
-
stillFrameMediaId: string;
|
|
303
|
-
};
|
|
304
|
-
thumbnail?: {
|
|
305
|
-
url: string;
|
|
306
|
-
width: number;
|
|
307
|
-
height: number;
|
|
308
|
-
};
|
|
309
|
-
mediaType: MediaItemType;
|
|
310
|
-
title: string;
|
|
311
|
-
_id: string;
|
|
312
|
-
}[];
|
|
313
|
-
};
|
|
314
|
-
numberOfProducts: number;
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
export interface GetCollectionBySlugResponseNonNullableFields {
|
|
318
|
-
collection?: {
|
|
319
|
-
media?: {
|
|
320
|
-
mainMedia?: {
|
|
321
|
-
image?: {
|
|
322
|
-
url: string;
|
|
323
|
-
width: number;
|
|
324
|
-
height: number;
|
|
325
|
-
};
|
|
326
|
-
video?: {
|
|
327
|
-
files: {
|
|
328
|
-
url: string;
|
|
329
|
-
width: number;
|
|
330
|
-
height: number;
|
|
331
|
-
}[];
|
|
332
|
-
stillFrameMediaId: string;
|
|
333
|
-
};
|
|
334
|
-
thumbnail?: {
|
|
335
|
-
url: string;
|
|
336
|
-
width: number;
|
|
337
|
-
height: number;
|
|
338
|
-
};
|
|
339
|
-
mediaType: MediaItemType;
|
|
340
|
-
title: string;
|
|
341
|
-
_id: string;
|
|
342
|
-
};
|
|
343
|
-
items: {
|
|
344
|
-
image?: {
|
|
345
|
-
url: string;
|
|
346
|
-
width: number;
|
|
347
|
-
height: number;
|
|
348
|
-
};
|
|
349
|
-
video?: {
|
|
350
|
-
files: {
|
|
351
|
-
url: string;
|
|
352
|
-
width: number;
|
|
353
|
-
height: number;
|
|
354
|
-
}[];
|
|
355
|
-
stillFrameMediaId: string;
|
|
356
|
-
};
|
|
357
|
-
thumbnail?: {
|
|
358
|
-
url: string;
|
|
359
|
-
width: number;
|
|
360
|
-
height: number;
|
|
361
|
-
};
|
|
362
|
-
mediaType: MediaItemType;
|
|
363
|
-
title: string;
|
|
364
|
-
_id: string;
|
|
365
|
-
}[];
|
|
366
|
-
};
|
|
367
|
-
numberOfProducts: number;
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
* Retrieves a list of up to 100 collections, given the provided paging, sorting and filtering.
|
|
372
|
-
* See [Stores Pagination](https://dev.wix.com/api/rest/wix-stores/pagination) for more information.
|
|
373
|
-
* @public
|
|
374
|
-
* @documentationMaturity preview
|
|
375
|
-
*/
|
|
376
|
-
export declare function queryCollections(): CollectionsQueryBuilder;
|
|
377
|
-
interface QueryOffsetResult {
|
|
378
|
-
currentPage: number | undefined;
|
|
379
|
-
totalPages: number | undefined;
|
|
380
|
-
totalCount: number | undefined;
|
|
381
|
-
hasNext: () => boolean;
|
|
382
|
-
hasPrev: () => boolean;
|
|
383
|
-
length: number;
|
|
384
|
-
pageSize: number;
|
|
385
|
-
}
|
|
386
|
-
export interface CollectionsQueryResult extends QueryOffsetResult {
|
|
387
|
-
items: Collection[];
|
|
388
|
-
query: CollectionsQueryBuilder;
|
|
389
|
-
next: () => Promise<CollectionsQueryResult>;
|
|
390
|
-
prev: () => Promise<CollectionsQueryResult>;
|
|
391
|
-
}
|
|
392
|
-
export interface CollectionsQueryBuilder {
|
|
393
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
394
|
-
* @param value - Value to compare against.
|
|
395
|
-
* @documentationMaturity preview
|
|
396
|
-
*/
|
|
397
|
-
eq: (propertyName: '_id' | 'name', value: any) => CollectionsQueryBuilder;
|
|
398
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
399
|
-
* @param value - Value to compare against.
|
|
400
|
-
* @documentationMaturity preview
|
|
401
|
-
*/
|
|
402
|
-
ne: (propertyName: '_id' | 'name', value: any) => CollectionsQueryBuilder;
|
|
403
|
-
/** @param propertyName - Property whose value is compared with `string`.
|
|
404
|
-
* @param string - String to compare against. Case-insensitive.
|
|
405
|
-
* @documentationMaturity preview
|
|
406
|
-
*/
|
|
407
|
-
startsWith: (propertyName: '_id' | 'name', value: string) => CollectionsQueryBuilder;
|
|
408
|
-
/** @param propertyName - Property whose value is compared with `values`.
|
|
409
|
-
* @param values - List of values to compare against.
|
|
410
|
-
* @documentationMaturity preview
|
|
411
|
-
*/
|
|
412
|
-
hasSome: (propertyName: '_id' | 'name', value: any[]) => CollectionsQueryBuilder;
|
|
413
|
-
/** @documentationMaturity preview */
|
|
414
|
-
in: (propertyName: '_id' | 'name', value: any) => CollectionsQueryBuilder;
|
|
415
|
-
/** @documentationMaturity preview */
|
|
416
|
-
exists: (propertyName: '_id' | 'name', value: boolean) => CollectionsQueryBuilder;
|
|
417
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
418
|
-
* @documentationMaturity preview
|
|
419
|
-
*/
|
|
420
|
-
ascending: (...propertyNames: Array<'_id' | 'name'>) => CollectionsQueryBuilder;
|
|
421
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
422
|
-
* @documentationMaturity preview
|
|
423
|
-
*/
|
|
424
|
-
descending: (...propertyNames: Array<'_id' | 'name'>) => CollectionsQueryBuilder;
|
|
425
|
-
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
426
|
-
* @documentationMaturity preview
|
|
427
|
-
*/
|
|
428
|
-
limit: (limit: number) => CollectionsQueryBuilder;
|
|
429
|
-
/** @param skip - Number of items to skip in the query results before returning the results.
|
|
430
|
-
* @documentationMaturity preview
|
|
431
|
-
*/
|
|
432
|
-
skip: (skip: number) => CollectionsQueryBuilder;
|
|
433
|
-
/** @documentationMaturity preview */
|
|
434
|
-
find: () => Promise<CollectionsQueryResult>;
|
|
435
|
-
}
|
|
436
|
-
/**
|
|
437
|
-
* Retrieves a collection with the provided ID.
|
|
438
|
-
* @param _id - Requested collection ID.
|
|
439
|
-
* @public
|
|
440
|
-
* @documentationMaturity preview
|
|
441
|
-
* @requiredField _id
|
|
442
|
-
*/
|
|
443
|
-
export declare function getCollection(_id: string): Promise<Collection & NonNullable<GetCollectionResponseNonNullableFields>['collection']>;
|
|
444
|
-
/**
|
|
445
|
-
* Retrieves a collection with the provided slug.
|
|
446
|
-
* @param slug - Slug of the collection to retrieve.
|
|
447
|
-
* @public
|
|
448
|
-
* @documentationMaturity preview
|
|
449
|
-
* @requiredField slug
|
|
450
|
-
*/
|
|
451
|
-
export declare function getCollectionBySlug(slug: string): Promise<GetCollectionBySlugResponse & GetCollectionBySlugResponseNonNullableFields>;
|
|
452
|
-
export {};
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.getCollectionBySlug = exports.getCollection = exports.queryCollections = exports.SortOrder = exports.MediaItemType = void 0;
|
|
36
|
-
const velo_1 = require("@wix/metro-runtime/velo");
|
|
37
|
-
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
38
|
-
const ambassadorWixStoresCatalogV1Collection = __importStar(require("./stores-catalog-v1-collection.http"));
|
|
39
|
-
// @ts-ignore
|
|
40
|
-
const motion_edm_autogen_query_wrapper_1 = require("@wix/motion-edm-autogen-query-wrapper");
|
|
41
|
-
const _toVeloEntity = '$';
|
|
42
|
-
const _fromVeloEntity = '$';
|
|
43
|
-
var MediaItemType;
|
|
44
|
-
(function (MediaItemType) {
|
|
45
|
-
MediaItemType["unspecified_media_item_type"] = "unspecified_media_item_type";
|
|
46
|
-
MediaItemType["image"] = "image";
|
|
47
|
-
MediaItemType["video"] = "video";
|
|
48
|
-
MediaItemType["audio"] = "audio";
|
|
49
|
-
MediaItemType["document"] = "document";
|
|
50
|
-
MediaItemType["zip"] = "zip";
|
|
51
|
-
})(MediaItemType || (exports.MediaItemType = MediaItemType = {}));
|
|
52
|
-
var SortOrder;
|
|
53
|
-
(function (SortOrder) {
|
|
54
|
-
SortOrder["ASC"] = "ASC";
|
|
55
|
-
SortOrder["DESC"] = "DESC";
|
|
56
|
-
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
57
|
-
const _getCollectionBySlugRequest = {};
|
|
58
|
-
const _getCollectionBySlugResponse = {};
|
|
59
|
-
const _getCollectionRequest = {};
|
|
60
|
-
const _getCollectionResponse = {};
|
|
61
|
-
const _queryCollectionsRequest = {};
|
|
62
|
-
const _queryCollectionsResponse = {};
|
|
63
|
-
/**
|
|
64
|
-
* Retrieves a list of up to 100 collections, given the provided paging, sorting and filtering.
|
|
65
|
-
* See [Stores Pagination](https://dev.wix.com/api/rest/wix-stores/pagination) for more information.
|
|
66
|
-
* @public
|
|
67
|
-
* @documentationMaturity preview
|
|
68
|
-
*/
|
|
69
|
-
function queryCollections() {
|
|
70
|
-
const requestTransformation = { '*': '$[1]', query: '$[0]' };
|
|
71
|
-
const responseTransformation = {
|
|
72
|
-
items: '$.collections',
|
|
73
|
-
pagingMetadata: '$.metadata',
|
|
74
|
-
};
|
|
75
|
-
// @ts-ignore
|
|
76
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
77
|
-
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
78
|
-
rootSchema: _queryCollectionsRequest,
|
|
79
|
-
depSchemas: {},
|
|
80
|
-
fqdnTransformation: {
|
|
81
|
-
paths: [],
|
|
82
|
-
transformation: _fromVeloEntity,
|
|
83
|
-
},
|
|
84
|
-
customTransformation: requestTransformation,
|
|
85
|
-
});
|
|
86
|
-
const { fromJSON } = (0, velo_1.serializer)({
|
|
87
|
-
rootSchema: _queryCollectionsResponse,
|
|
88
|
-
depSchemas: {},
|
|
89
|
-
fqdnTransformation: {
|
|
90
|
-
paths: [...['Array#collections']],
|
|
91
|
-
transformation: _toVeloEntity,
|
|
92
|
-
},
|
|
93
|
-
customTransformation: responseTransformation,
|
|
94
|
-
});
|
|
95
|
-
return (0, motion_edm_autogen_query_wrapper_1.wrapWithQueryBuilder)({
|
|
96
|
-
func: (payload) => __awaiter(this, void 0, void 0, function* () {
|
|
97
|
-
var _a, _b, _c;
|
|
98
|
-
const reqOpts = ambassadorWixStoresCatalogV1Collection.queryCollections(payload);
|
|
99
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
100
|
-
try {
|
|
101
|
-
const result = yield httpClient.request(reqOpts);
|
|
102
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
103
|
-
return result;
|
|
104
|
-
}
|
|
105
|
-
catch (err) {
|
|
106
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
107
|
-
throw err;
|
|
108
|
-
}
|
|
109
|
-
}),
|
|
110
|
-
requestTransformer: (...args) => toAmbassadorRequest(args),
|
|
111
|
-
responseTransformer: ({ data }) => fromJSON(data),
|
|
112
|
-
errorTransformer: (err) => {
|
|
113
|
-
const transformedError = (0, velo_1.transformError)(err, requestTransformation);
|
|
114
|
-
throw transformedError;
|
|
115
|
-
},
|
|
116
|
-
pagingMethod: 'OFFSET',
|
|
117
|
-
transformationPaths: (0, velo_1.resolveQueryFieldsTransformationPaths)(_toVeloEntity),
|
|
118
|
-
})({ cursorWithEmptyFilterAndSort: true });
|
|
119
|
-
}
|
|
120
|
-
exports.queryCollections = queryCollections;
|
|
121
|
-
/**
|
|
122
|
-
* Retrieves a collection with the provided ID.
|
|
123
|
-
* @param _id - Requested collection ID.
|
|
124
|
-
* @public
|
|
125
|
-
* @documentationMaturity preview
|
|
126
|
-
* @requiredField _id
|
|
127
|
-
*/
|
|
128
|
-
function getCollection(_id) {
|
|
129
|
-
var _a, _b, _c;
|
|
130
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
131
|
-
const requestTransformation = { id: '$[0]' };
|
|
132
|
-
const responseTransformation = '$.collection';
|
|
133
|
-
// @ts-ignore
|
|
134
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
135
|
-
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
136
|
-
rootSchema: _getCollectionRequest,
|
|
137
|
-
depSchemas: {},
|
|
138
|
-
fqdnTransformation: {
|
|
139
|
-
paths: [],
|
|
140
|
-
transformation: _fromVeloEntity,
|
|
141
|
-
},
|
|
142
|
-
customTransformation: requestTransformation,
|
|
143
|
-
});
|
|
144
|
-
const { fromJSON } = (0, velo_1.serializer)({
|
|
145
|
-
rootSchema: _getCollectionResponse,
|
|
146
|
-
depSchemas: {},
|
|
147
|
-
fqdnTransformation: {
|
|
148
|
-
paths: [...['collection']],
|
|
149
|
-
transformation: _toVeloEntity,
|
|
150
|
-
},
|
|
151
|
-
customTransformation: responseTransformation,
|
|
152
|
-
});
|
|
153
|
-
const payload = toAmbassadorRequest([_id]);
|
|
154
|
-
const reqOpts = ambassadorWixStoresCatalogV1Collection.getCollection(payload);
|
|
155
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
156
|
-
try {
|
|
157
|
-
const result = yield httpClient.request(reqOpts);
|
|
158
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
159
|
-
return fromJSON(result.data);
|
|
160
|
-
}
|
|
161
|
-
catch (err) {
|
|
162
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
163
|
-
spreadPathsToArguments: {},
|
|
164
|
-
explicitPathsToArguments: { id: '$[0]' },
|
|
165
|
-
singleArgumentUnchanged: false,
|
|
166
|
-
}, ['_id']);
|
|
167
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
168
|
-
throw transformedError;
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
exports.getCollection = getCollection;
|
|
173
|
-
/**
|
|
174
|
-
* Retrieves a collection with the provided slug.
|
|
175
|
-
* @param slug - Slug of the collection to retrieve.
|
|
176
|
-
* @public
|
|
177
|
-
* @documentationMaturity preview
|
|
178
|
-
* @requiredField slug
|
|
179
|
-
*/
|
|
180
|
-
function getCollectionBySlug(slug) {
|
|
181
|
-
var _a, _b, _c;
|
|
182
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
183
|
-
const requestTransformation = { slug: '$[0]' };
|
|
184
|
-
const responseTransformation = '$';
|
|
185
|
-
// @ts-ignore
|
|
186
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
187
|
-
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
188
|
-
rootSchema: _getCollectionBySlugRequest,
|
|
189
|
-
depSchemas: {},
|
|
190
|
-
fqdnTransformation: {
|
|
191
|
-
paths: [],
|
|
192
|
-
transformation: _fromVeloEntity,
|
|
193
|
-
},
|
|
194
|
-
customTransformation: requestTransformation,
|
|
195
|
-
});
|
|
196
|
-
const { fromJSON } = (0, velo_1.serializer)({
|
|
197
|
-
rootSchema: _getCollectionBySlugResponse,
|
|
198
|
-
depSchemas: {},
|
|
199
|
-
fqdnTransformation: {
|
|
200
|
-
paths: [...['collection']],
|
|
201
|
-
transformation: _toVeloEntity,
|
|
202
|
-
},
|
|
203
|
-
customTransformation: responseTransformation,
|
|
204
|
-
});
|
|
205
|
-
const payload = toAmbassadorRequest([slug]);
|
|
206
|
-
const reqOpts = ambassadorWixStoresCatalogV1Collection.getCollectionBySlug(payload);
|
|
207
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
208
|
-
try {
|
|
209
|
-
const result = yield httpClient.request(reqOpts);
|
|
210
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
211
|
-
return fromJSON(result.data);
|
|
212
|
-
}
|
|
213
|
-
catch (err) {
|
|
214
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
215
|
-
spreadPathsToArguments: {},
|
|
216
|
-
explicitPathsToArguments: { slug: '$[0]' },
|
|
217
|
-
singleArgumentUnchanged: false,
|
|
218
|
-
}, ['slug']);
|
|
219
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
220
|
-
throw transformedError;
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
exports.getCollectionBySlug = getCollectionBySlug;
|
|
225
|
-
//# sourceMappingURL=stores-catalog-v1-collection.universal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stores-catalog-v1-collection.universal.js","sourceRoot":"","sources":["../../../src/stores-catalog-v1-collection.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAIiC;AACjC,sEAAuF;AAEvF,4GAA8F;AAC9F,aAAa;AACb,4FAA6E;AAE7E,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AAuE5B,IAAY,aAOX;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