@wix/auto_sdk_stores_collections 1.0.10 → 1.0.12

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 (119) hide show
  1. package/build/cjs/index.d.ts +34 -1
  2. package/build/cjs/index.js +325 -15
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/meta.d.ts +228 -1
  5. package/build/cjs/meta.js +238 -15
  6. package/build/cjs/meta.js.map +1 -1
  7. package/build/cjs/{src/stores-catalog-v1-collection-collections.universal.d.ts → stores-catalog-v1-collection-collections.universal-DXVGSHC4.d.ts} +31 -57
  8. package/build/es/index.d.mts +34 -0
  9. package/build/es/index.mjs +300 -0
  10. package/build/es/index.mjs.map +1 -0
  11. package/build/es/{src/stores-catalog-v1-collection-collections.types.d.ts → meta.d.mts} +45 -81
  12. package/build/es/meta.mjs +212 -0
  13. package/build/es/meta.mjs.map +1 -0
  14. package/build/es/{src/stores-catalog-v1-collection-collections.universal.d.ts → stores-catalog-v1-collection-collections.universal-DXVGSHC4.d.mts} +31 -57
  15. package/build/internal/cjs/index.d.ts +34 -1
  16. package/build/internal/cjs/index.js +325 -15
  17. package/build/internal/cjs/index.js.map +1 -1
  18. package/build/internal/cjs/meta.d.ts +228 -1
  19. package/build/internal/cjs/meta.js +238 -15
  20. package/build/internal/cjs/meta.js.map +1 -1
  21. package/build/internal/cjs/{src/stores-catalog-v1-collection-collections.universal.d.ts → stores-catalog-v1-collection-collections.universal-BdGGTv5j.d.ts} +31 -57
  22. package/build/internal/es/index.d.mts +34 -0
  23. package/build/internal/es/index.mjs +300 -0
  24. package/build/internal/es/index.mjs.map +1 -0
  25. package/build/{cjs/src/stores-catalog-v1-collection-collections.types.d.ts → internal/es/meta.d.mts} +45 -81
  26. package/build/internal/es/meta.mjs +212 -0
  27. package/build/internal/es/meta.mjs.map +1 -0
  28. package/build/internal/es/{src/stores-catalog-v1-collection-collections.universal.d.ts → stores-catalog-v1-collection-collections.universal-BdGGTv5j.d.mts} +31 -57
  29. package/package.json +9 -8
  30. package/build/cjs/index.typings.d.ts +0 -1
  31. package/build/cjs/index.typings.js +0 -18
  32. package/build/cjs/index.typings.js.map +0 -1
  33. package/build/cjs/src/stores-catalog-v1-collection-collections.context.d.ts +0 -7
  34. package/build/cjs/src/stores-catalog-v1-collection-collections.context.js +0 -12
  35. package/build/cjs/src/stores-catalog-v1-collection-collections.context.js.map +0 -1
  36. package/build/cjs/src/stores-catalog-v1-collection-collections.http.d.ts +0 -10
  37. package/build/cjs/src/stores-catalog-v1-collection-collections.http.js +0 -162
  38. package/build/cjs/src/stores-catalog-v1-collection-collections.http.js.map +0 -1
  39. package/build/cjs/src/stores-catalog-v1-collection-collections.meta.d.ts +0 -19
  40. package/build/cjs/src/stores-catalog-v1-collection-collections.meta.js +0 -85
  41. package/build/cjs/src/stores-catalog-v1-collection-collections.meta.js.map +0 -1
  42. package/build/cjs/src/stores-catalog-v1-collection-collections.public.d.ts +0 -30
  43. package/build/cjs/src/stores-catalog-v1-collection-collections.public.js +0 -27
  44. package/build/cjs/src/stores-catalog-v1-collection-collections.public.js.map +0 -1
  45. package/build/cjs/src/stores-catalog-v1-collection-collections.types.js +0 -23
  46. package/build/cjs/src/stores-catalog-v1-collection-collections.types.js.map +0 -1
  47. package/build/cjs/src/stores-catalog-v1-collection-collections.universal.js +0 -160
  48. package/build/cjs/src/stores-catalog-v1-collection-collections.universal.js.map +0 -1
  49. package/build/es/index.d.ts +0 -1
  50. package/build/es/index.js +0 -2
  51. package/build/es/index.js.map +0 -1
  52. package/build/es/index.typings.d.ts +0 -1
  53. package/build/es/index.typings.js +0 -2
  54. package/build/es/index.typings.js.map +0 -1
  55. package/build/es/meta.d.ts +0 -1
  56. package/build/es/meta.js +0 -2
  57. package/build/es/meta.js.map +0 -1
  58. package/build/es/src/stores-catalog-v1-collection-collections.context.d.ts +0 -7
  59. package/build/es/src/stores-catalog-v1-collection-collections.context.js +0 -7
  60. package/build/es/src/stores-catalog-v1-collection-collections.context.js.map +0 -1
  61. package/build/es/src/stores-catalog-v1-collection-collections.http.d.ts +0 -10
  62. package/build/es/src/stores-catalog-v1-collection-collections.http.js +0 -156
  63. package/build/es/src/stores-catalog-v1-collection-collections.http.js.map +0 -1
  64. package/build/es/src/stores-catalog-v1-collection-collections.meta.d.ts +0 -19
  65. package/build/es/src/stores-catalog-v1-collection-collections.meta.js +0 -56
  66. package/build/es/src/stores-catalog-v1-collection-collections.meta.js.map +0 -1
  67. package/build/es/src/stores-catalog-v1-collection-collections.public.d.ts +0 -30
  68. package/build/es/src/stores-catalog-v1-collection-collections.public.js +0 -19
  69. package/build/es/src/stores-catalog-v1-collection-collections.public.js.map +0 -1
  70. package/build/es/src/stores-catalog-v1-collection-collections.types.js +0 -20
  71. package/build/es/src/stores-catalog-v1-collection-collections.types.js.map +0 -1
  72. package/build/es/src/stores-catalog-v1-collection-collections.universal.js +0 -131
  73. package/build/es/src/stores-catalog-v1-collection-collections.universal.js.map +0 -1
  74. package/build/internal/cjs/index.typings.d.ts +0 -1
  75. package/build/internal/cjs/index.typings.js +0 -18
  76. package/build/internal/cjs/index.typings.js.map +0 -1
  77. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.context.d.ts +0 -7
  78. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.context.js +0 -12
  79. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.context.js.map +0 -1
  80. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.http.d.ts +0 -10
  81. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.http.js +0 -162
  82. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.http.js.map +0 -1
  83. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.meta.d.ts +0 -19
  84. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.meta.js +0 -85
  85. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.meta.js.map +0 -1
  86. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.public.d.ts +0 -30
  87. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.public.js +0 -27
  88. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.public.js.map +0 -1
  89. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.types.d.ts +0 -264
  90. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.types.js +0 -23
  91. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.types.js.map +0 -1
  92. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.universal.js +0 -160
  93. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.universal.js.map +0 -1
  94. package/build/internal/es/index.d.ts +0 -1
  95. package/build/internal/es/index.js +0 -2
  96. package/build/internal/es/index.js.map +0 -1
  97. package/build/internal/es/index.typings.d.ts +0 -1
  98. package/build/internal/es/index.typings.js +0 -2
  99. package/build/internal/es/index.typings.js.map +0 -1
  100. package/build/internal/es/meta.d.ts +0 -1
  101. package/build/internal/es/meta.js +0 -2
  102. package/build/internal/es/meta.js.map +0 -1
  103. package/build/internal/es/src/stores-catalog-v1-collection-collections.context.d.ts +0 -7
  104. package/build/internal/es/src/stores-catalog-v1-collection-collections.context.js +0 -7
  105. package/build/internal/es/src/stores-catalog-v1-collection-collections.context.js.map +0 -1
  106. package/build/internal/es/src/stores-catalog-v1-collection-collections.http.d.ts +0 -10
  107. package/build/internal/es/src/stores-catalog-v1-collection-collections.http.js +0 -156
  108. package/build/internal/es/src/stores-catalog-v1-collection-collections.http.js.map +0 -1
  109. package/build/internal/es/src/stores-catalog-v1-collection-collections.meta.d.ts +0 -19
  110. package/build/internal/es/src/stores-catalog-v1-collection-collections.meta.js +0 -56
  111. package/build/internal/es/src/stores-catalog-v1-collection-collections.meta.js.map +0 -1
  112. package/build/internal/es/src/stores-catalog-v1-collection-collections.public.d.ts +0 -30
  113. package/build/internal/es/src/stores-catalog-v1-collection-collections.public.js +0 -19
  114. package/build/internal/es/src/stores-catalog-v1-collection-collections.public.js.map +0 -1
  115. package/build/internal/es/src/stores-catalog-v1-collection-collections.types.d.ts +0 -264
  116. package/build/internal/es/src/stores-catalog-v1-collection-collections.types.js +0 -20
  117. package/build/internal/es/src/stores-catalog-v1-collection-collections.types.js.map +0 -1
  118. package/build/internal/es/src/stores-catalog-v1-collection-collections.universal.js +0 -131
  119. package/build/internal/es/src/stores-catalog-v1-collection-collections.universal.js.map +0 -1
@@ -1,264 +0,0 @@
1
- export interface Collection {
2
- /**
3
- * Collection ID (generated automatically by the catalog).
4
- * @minLength 35
5
- * @maxLength 36
6
- * @readonly
7
- */
8
- id?: string | null;
9
- /**
10
- * Collection name.
11
- * @minLength 1
12
- * @maxLength 50
13
- */
14
- name?: string | null;
15
- /**
16
- * Media items (images, videos etc) associated with this collection. Read only.
17
- * @readonly
18
- */
19
- media?: Media;
20
- /**
21
- * Number of products in the collection. Read only.
22
- * @readonly
23
- */
24
- numberOfProducts?: number;
25
- /**
26
- * Collection description.
27
- * @maxLength 600
28
- */
29
- description?: string | null;
30
- /**
31
- * Collection slug.
32
- * @minLength 1
33
- * @maxLength 100
34
- */
35
- slug?: string | null;
36
- /** Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`. */
37
- visible?: boolean | null;
38
- }
39
- export interface Media {
40
- /** Primary media (image, video etc) associated with this product. */
41
- mainMedia?: MediaItem;
42
- /** Media (images, videos etc) associated with this product. */
43
- items?: MediaItem[];
44
- }
45
- export interface MediaItem extends MediaItemItemOneOf {
46
- /** Image data (URL, size). */
47
- image?: MediaItemUrlAndSize;
48
- /** Video data (URL, size). */
49
- video?: MediaItemVideo;
50
- /** Media item thumbnail details. */
51
- thumbnail?: MediaItemUrlAndSize;
52
- /** Media item type (image, video, etc.). */
53
- mediaType?: MediaItemTypeWithLiterals;
54
- /** Media item title. */
55
- title?: string;
56
- /** Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`). */
57
- id?: string;
58
- }
59
- /** @oneof */
60
- export interface MediaItemItemOneOf {
61
- /** Image data (URL, size). */
62
- image?: MediaItemUrlAndSize;
63
- /** Video data (URL, size). */
64
- video?: MediaItemVideo;
65
- }
66
- export interface MediaItemUrlAndSize {
67
- /**
68
- * Media item URL.
69
- * @format WEB_URL
70
- */
71
- url?: string;
72
- /** Media item width. */
73
- width?: number;
74
- /** Media item height. */
75
- height?: number;
76
- /** Media format (mp4, png, etc.). */
77
- format?: string | null;
78
- /** Alt text. This text will be shown in case the image is not available. */
79
- altText?: string | null;
80
- }
81
- export declare enum MediaItemType {
82
- unspecified_media_item_type = "unspecified_media_item_type",
83
- /** Image media type. */
84
- image = "image",
85
- /** Video media type. */
86
- video = "video",
87
- /** Audio media type. */
88
- audio = "audio",
89
- /** Document media type. */
90
- document = "document",
91
- /** Zip media type. */
92
- zip = "zip"
93
- }
94
- /** @enumType */
95
- export type MediaItemTypeWithLiterals = MediaItemType | 'unspecified_media_item_type' | 'image' | 'video' | 'audio' | 'document' | 'zip';
96
- export interface MediaItemVideo {
97
- /** Data (URL, size) about each resolution for which this video is available. */
98
- files?: MediaItemUrlAndSize[];
99
- /** 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"`. */
100
- stillFrameMediaId?: string;
101
- }
102
- /**
103
- * 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.
104
- * The search engines use this information for ranking purposes, or to display snippets in the search results.
105
- * 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.
106
- */
107
- export interface SeoSchema {
108
- /** SEO tag information. */
109
- tags?: Tag[];
110
- /** SEO general settings. */
111
- settings?: Settings;
112
- }
113
- export interface Keyword {
114
- /** Keyword value. */
115
- term?: string;
116
- /** Whether the keyword is the main focus keyword. */
117
- isMain?: boolean;
118
- /**
119
- * The source that added the keyword terms to the SEO settings.
120
- * @maxLength 1000
121
- */
122
- origin?: string | null;
123
- }
124
- export interface Tag {
125
- /**
126
- * SEO tag type.
127
- *
128
- *
129
- * Supported values: `title`, `meta`, `script`, `link`.
130
- */
131
- type?: string;
132
- /**
133
- * A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.
134
- * For example: `{"name": "description", "content": "the description itself"}`.
135
- */
136
- props?: Record<string, any> | null;
137
- /** SEO tag meta data. For example, `{"height": 300, "width": 240}`. */
138
- meta?: Record<string, any> | null;
139
- /** SEO tag inner content. For example, `<title> inner content </title>`. */
140
- children?: string;
141
- /** Whether the tag is a custom tag. */
142
- custom?: boolean;
143
- /** Whether the tag is disabled. */
144
- disabled?: boolean;
145
- }
146
- export interface Settings {
147
- /**
148
- * Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.
149
- *
150
- *
151
- * Default: `false` (Auto Redirect is enabled.)
152
- */
153
- preventAutoRedirect?: boolean;
154
- /**
155
- * User-selected keyword terms for a specific page.
156
- * @maxSize 5
157
- */
158
- keywords?: Keyword[];
159
- }
160
- export interface QueryCollectionsRequest {
161
- query?: PlatformQuery;
162
- }
163
- export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
164
- /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
165
- paging?: PlatformPaging;
166
- /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
167
- cursorPaging?: CursorPaging;
168
- /** Filter object. */
169
- filter?: Record<string, any> | null;
170
- /** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */
171
- sort?: Sorting[];
172
- }
173
- /** @oneof */
174
- export interface PlatformQueryPagingMethodOneOf {
175
- /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
176
- paging?: PlatformPaging;
177
- /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
178
- cursorPaging?: CursorPaging;
179
- }
180
- export interface Sorting {
181
- /**
182
- * Name of the field to sort by.
183
- * @maxLength 512
184
- */
185
- fieldName?: string;
186
- /** Sort order. */
187
- order?: SortOrderWithLiterals;
188
- }
189
- export declare enum SortOrder {
190
- ASC = "ASC",
191
- DESC = "DESC"
192
- }
193
- /** @enumType */
194
- export type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
195
- export interface PlatformPaging {
196
- /**
197
- * Number of items to load.
198
- * @max 100
199
- */
200
- limit?: number | null;
201
- /** Number of items to skip in the current sort order. */
202
- offset?: number | null;
203
- }
204
- export interface CursorPaging {
205
- /**
206
- * Maximum number of items to return in the results.
207
- * @max 100
208
- */
209
- limit?: number | null;
210
- /**
211
- * Pointer to the next or previous page in the list of results.
212
- *
213
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
214
- * Not relevant for the first request.
215
- * @maxLength 16000
216
- */
217
- cursor?: string | null;
218
- }
219
- export interface QueryCollectionsResponse {
220
- /** @maxSize 100 */
221
- collections?: Collection[];
222
- metadata?: PlatformPagingMetadata;
223
- }
224
- export interface PlatformPagingMetadata {
225
- /** The number of items returned in this response. */
226
- count?: number | null;
227
- /** The offset which was requested. Returned if offset paging was used. */
228
- offset?: number | null;
229
- /** The total number of items that match the query. Returned if offset paging was used. */
230
- total?: number | null;
231
- /** Cursors to navigate through result pages. Returned if cursor paging was used. */
232
- cursors?: Cursors;
233
- }
234
- export interface Cursors {
235
- /**
236
- * Cursor string pointing to the next page in the list of results.
237
- * @maxLength 16000
238
- */
239
- next?: string | null;
240
- /**
241
- * Cursor pointing to the previous page in the list of results.
242
- * @maxLength 16000
243
- */
244
- prev?: string | null;
245
- }
246
- export interface GetCollectionRequest {
247
- /** Requested collection ID. */
248
- id: string;
249
- }
250
- export interface GetCollectionResponse {
251
- collection?: Collection;
252
- }
253
- export interface GetCollectionBySlugRequest {
254
- /**
255
- * Slug of the collection to retrieve.
256
- * @minLength 1
257
- * @maxLength 100
258
- */
259
- slug: string;
260
- }
261
- export interface GetCollectionBySlugResponse {
262
- /** The requested collection. */
263
- collection?: Collection;
264
- }
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SortOrder = exports.MediaItemType = void 0;
4
- var MediaItemType;
5
- (function (MediaItemType) {
6
- MediaItemType["unspecified_media_item_type"] = "unspecified_media_item_type";
7
- /** Image media type. */
8
- MediaItemType["image"] = "image";
9
- /** Video media type. */
10
- MediaItemType["video"] = "video";
11
- /** Audio media type. */
12
- MediaItemType["audio"] = "audio";
13
- /** Document media type. */
14
- MediaItemType["document"] = "document";
15
- /** Zip media type. */
16
- MediaItemType["zip"] = "zip";
17
- })(MediaItemType || (exports.MediaItemType = MediaItemType = {}));
18
- var SortOrder;
19
- (function (SortOrder) {
20
- SortOrder["ASC"] = "ASC";
21
- SortOrder["DESC"] = "DESC";
22
- })(SortOrder || (exports.SortOrder = SortOrder = {}));
23
- //# sourceMappingURL=stores-catalog-v1-collection-collections.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stores-catalog-v1-collection-collections.types.js","sourceRoot":"","sources":["../../../../src/stores-catalog-v1-collection-collections.types.ts"],"names":[],"mappings":";;;AAqFA,IAAY,aAYX;AAZD,WAAY,aAAa;IACvB,4EAA2D,CAAA;IAC3D,wBAAwB;IACxB,gCAAe,CAAA;IACf,wBAAwB;IACxB,gCAAe,CAAA;IACf,wBAAwB;IACxB,gCAAe,CAAA;IACf,2BAA2B;IAC3B,sCAAqB,CAAA;IACrB,sBAAsB;IACtB,4BAAW,CAAA;AACb,CAAC,EAZW,aAAa,6BAAb,aAAa,QAYxB;AAkHD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB"}
@@ -1,160 +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
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getCollectionBySlug = exports.getCollection = exports.queryCollections = exports.SortOrder = exports.MediaItemType = void 0;
27
- const transform_error_1 = require("@wix/sdk-runtime/transform-error");
28
- const query_builder_1 = require("@wix/sdk-runtime/query-builder");
29
- const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
30
- const ambassadorWixStoresCatalogV1Collection = __importStar(require("./stores-catalog-v1-collection-collections.http.js"));
31
- // @ts-ignore
32
- const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
33
- var MediaItemType;
34
- (function (MediaItemType) {
35
- MediaItemType["unspecified_media_item_type"] = "unspecified_media_item_type";
36
- /** Image media type. */
37
- MediaItemType["image"] = "image";
38
- /** Video media type. */
39
- MediaItemType["video"] = "video";
40
- /** Audio media type. */
41
- MediaItemType["audio"] = "audio";
42
- /** Document media type. */
43
- MediaItemType["document"] = "document";
44
- /** Zip media type. */
45
- MediaItemType["zip"] = "zip";
46
- })(MediaItemType || (exports.MediaItemType = MediaItemType = {}));
47
- var SortOrder;
48
- (function (SortOrder) {
49
- SortOrder["ASC"] = "ASC";
50
- SortOrder["DESC"] = "DESC";
51
- })(SortOrder || (exports.SortOrder = SortOrder = {}));
52
- /**
53
- * Retrieves a list of up to 100 collections, given the provided paging, sorting and filtering.
54
- * See [Stores Pagination](https://dev.wix.com/api/rest/wix-stores/pagination) for more information.
55
- * @public
56
- * @fqn wix.catalog.api.v2.CollectionReadApi.QueryCollections
57
- */
58
- function queryCollections() {
59
- // @ts-ignore
60
- const { httpClient, sideEffects } = arguments[0];
61
- return (0, query_builder_1.queryBuilder)({
62
- func: async (payload) => {
63
- const reqOpts = ambassadorWixStoresCatalogV1Collection.queryCollections(payload);
64
- sideEffects?.onSiteCall?.();
65
- try {
66
- const result = await httpClient.request(reqOpts);
67
- sideEffects?.onSuccess?.(result);
68
- return result;
69
- }
70
- catch (err) {
71
- sideEffects?.onError?.(err);
72
- throw err;
73
- }
74
- },
75
- requestTransformer: (query) => {
76
- const args = [query, {}];
77
- return (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
78
- ...args?.[1],
79
- query: args?.[0],
80
- });
81
- },
82
- responseTransformer: ({ data }) => {
83
- const transformedData = (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)((0, transform_paths_1.transformPaths)(data, []));
84
- return {
85
- items: transformedData?.collections,
86
- pagingMetadata: transformedData?.metadata,
87
- };
88
- },
89
- errorTransformer: (err) => {
90
- const transformedError = (0, transform_error_1.transformError)(err, {
91
- spreadPathsToArguments: {},
92
- explicitPathsToArguments: { query: '$[0]' },
93
- singleArgumentUnchanged: false,
94
- });
95
- throw transformedError;
96
- },
97
- pagingMethod: 'OFFSET',
98
- transformationPaths: {},
99
- });
100
- }
101
- exports.queryCollections = queryCollections;
102
- /**
103
- * Retrieves a collection with the provided ID.
104
- * @param _id - Requested collection ID.
105
- * @public
106
- * @requiredField _id
107
- * @fqn wix.catalog.api.v2.CollectionReadApi.GetCollection
108
- */
109
- async function getCollection(_id) {
110
- // @ts-ignore
111
- const { httpClient, sideEffects } = arguments[1];
112
- const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
113
- const reqOpts = ambassadorWixStoresCatalogV1Collection.getCollection(payload);
114
- sideEffects?.onSiteCall?.();
115
- try {
116
- const result = await httpClient.request(reqOpts);
117
- sideEffects?.onSuccess?.(result);
118
- return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data)?.collection;
119
- }
120
- catch (err) {
121
- const transformedError = (0, transform_error_1.transformError)(err, {
122
- spreadPathsToArguments: {},
123
- explicitPathsToArguments: { id: '$[0]' },
124
- singleArgumentUnchanged: false,
125
- }, ['_id']);
126
- sideEffects?.onError?.(err);
127
- throw transformedError;
128
- }
129
- }
130
- exports.getCollection = getCollection;
131
- /**
132
- * Retrieves a collection with the provided slug.
133
- * @param slug - Slug of the collection to retrieve.
134
- * @public
135
- * @requiredField slug
136
- * @fqn wix.catalog.api.v2.CollectionReadApi.GetCollectionBySlug
137
- */
138
- async function getCollectionBySlug(slug) {
139
- // @ts-ignore
140
- const { httpClient, sideEffects } = arguments[1];
141
- const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({ slug: slug });
142
- const reqOpts = ambassadorWixStoresCatalogV1Collection.getCollectionBySlug(payload);
143
- sideEffects?.onSiteCall?.();
144
- try {
145
- const result = await httpClient.request(reqOpts);
146
- sideEffects?.onSuccess?.(result);
147
- return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data);
148
- }
149
- catch (err) {
150
- const transformedError = (0, transform_error_1.transformError)(err, {
151
- spreadPathsToArguments: {},
152
- explicitPathsToArguments: { slug: '$[0]' },
153
- singleArgumentUnchanged: false,
154
- }, ['slug']);
155
- sideEffects?.onError?.(err);
156
- throw transformedError;
157
- }
158
- }
159
- exports.getCollectionBySlug = getCollectionBySlug;
160
- //# sourceMappingURL=stores-catalog-v1-collection-collections.universal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stores-catalog-v1-collection-collections.universal.js","sourceRoot":"","sources":["../../../../src/stores-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C1B,wBAAwB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YAC1C,uBAAuB,EAAE,KAAK;SAC/B,EACD,CAAC,MAAM,CAAC,CACT,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC;AAzCD,kDAyCC"}
@@ -1 +0,0 @@
1
- export * from './src/stores-catalog-v1-collection-collections.context.js';
@@ -1,2 +0,0 @@
1
- export * from './src/stores-catalog-v1-collection-collections.context.js';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../index.ts"],"names":[],"mappings":"AAAA,cAAc,2DAA2D,CAAC"}
@@ -1 +0,0 @@
1
- export * from './src/stores-catalog-v1-collection-collections.universal.js';
@@ -1,2 +0,0 @@
1
- export * from './src/stores-catalog-v1-collection-collections.universal.js';
2
- //# sourceMappingURL=index.typings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../../index.typings.ts"],"names":[],"mappings":"AAAA,cAAc,6DAA6D,CAAC"}
@@ -1 +0,0 @@
1
- export * from './src/stores-catalog-v1-collection-collections.meta.js';
@@ -1,2 +0,0 @@
1
- export * from './src/stores-catalog-v1-collection-collections.meta.js';
2
- //# sourceMappingURL=meta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../meta.ts"],"names":[],"mappings":"AAAA,cAAc,wDAAwD,CAAC"}
@@ -1,7 +0,0 @@
1
- import { queryCollections as publicQueryCollections, getCollection as publicGetCollection, getCollectionBySlug as publicGetCollectionBySlug } from './stores-catalog-v1-collection-collections.public.js';
2
- import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
3
- export declare const queryCollections: MaybeContext<BuildRESTFunction<typeof publicQueryCollections> & typeof publicQueryCollections>;
4
- export declare const getCollection: MaybeContext<BuildRESTFunction<typeof publicGetCollection> & typeof publicGetCollection>;
5
- export declare const getCollectionBySlug: MaybeContext<BuildRESTFunction<typeof publicGetCollectionBySlug> & typeof publicGetCollectionBySlug>;
6
- export { MediaItemType, SortOrder, } from './stores-catalog-v1-collection-collections.universal.js';
7
- export { Collection, Media, MediaItem, MediaItemItemOneOf, MediaItemUrlAndSize, MediaItemVideo, SeoSchema, Keyword, Tag, Settings, QueryCollectionsRequest, PlatformQuery, PlatformQueryPagingMethodOneOf, Sorting, PlatformPaging, CursorPaging, QueryCollectionsResponse, PlatformPagingMetadata, Cursors, GetCollectionRequest, GetCollectionResponse, GetCollectionBySlugRequest, GetCollectionBySlugResponse, CollectionsQueryResult, CollectionsQueryBuilder, } from './stores-catalog-v1-collection-collections.universal.js';
@@ -1,7 +0,0 @@
1
- import { queryCollections as publicQueryCollections, getCollection as publicGetCollection, getCollectionBySlug as publicGetCollectionBySlug, } from './stores-catalog-v1-collection-collections.public.js';
2
- import { createRESTModule } from '@wix/sdk-runtime/rest-modules';
3
- export const queryCollections = /*#__PURE__*/ createRESTModule(publicQueryCollections);
4
- export const getCollection = /*#__PURE__*/ createRESTModule(publicGetCollection);
5
- export const getCollectionBySlug = /*#__PURE__*/ createRESTModule(publicGetCollectionBySlug);
6
- export { MediaItemType, SortOrder, } from './stores-catalog-v1-collection-collections.universal.js';
7
- //# sourceMappingURL=stores-catalog-v1-collection-collections.context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stores-catalog-v1-collection-collections.context.js","sourceRoot":"","sources":["../../../../src/stores-catalog-v1-collection-collections.context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,IAAI,sBAAsB,EAC1C,aAAa,IAAI,mBAAmB,EACpC,mBAAmB,IAAI,yBAAyB,GACjD,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,MAAM,CAAC,MAAM,gBAAgB,GAGzB,aAAa,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;AAC3D,MAAM,CAAC,MAAM,aAAa,GAEtB,aAAa,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;AACxD,MAAM,CAAC,MAAM,mBAAmB,GAG5B,aAAa,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC;AAE9D,OAAO,EACL,aAAa,EACb,SAAS,GACV,MAAM,yDAAyD,CAAC"}
@@ -1,10 +0,0 @@
1
- import { RequestOptionsFactory } from '@wix/sdk-types';
2
- /**
3
- * Retrieves a list of up to 100 collections, given the provided paging, sorting and filtering.
4
- * See [Stores Pagination](https://dev.wix.com/api/rest/wix-stores/pagination) for more information.
5
- */
6
- export declare function queryCollections(payload: object): RequestOptionsFactory<any>;
7
- /** Retrieves a collection with the provided ID. */
8
- export declare function getCollection(payload: object): RequestOptionsFactory<any>;
9
- /** Retrieves a collection with the provided slug. */
10
- export declare function getCollectionBySlug(payload: object): RequestOptionsFactory<any>;