@wix/auto_sdk_stores_collections 1.0.9 → 1.0.11

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 (130) hide show
  1. package/build/index.d.mts +34 -0
  2. package/build/index.d.ts +34 -0
  3. package/build/index.js +328 -0
  4. package/build/index.js.map +1 -0
  5. package/build/index.mjs +300 -0
  6. package/build/index.mjs.map +1 -0
  7. package/build/internal/index.d.mts +34 -0
  8. package/build/internal/index.d.ts +34 -0
  9. package/build/internal/index.js +328 -0
  10. package/build/internal/index.js.map +1 -0
  11. package/build/internal/index.mjs +300 -0
  12. package/build/internal/index.mjs.map +1 -0
  13. package/build/{es/src/stores-catalog-v1-collection-collections.types.d.ts → internal/meta.d.mts} +45 -81
  14. package/build/internal/{cjs/src/stores-catalog-v1-collection-collections.types.d.ts → meta.d.ts} +45 -81
  15. package/build/internal/meta.js +241 -0
  16. package/build/internal/meta.js.map +1 -0
  17. package/build/internal/meta.mjs +212 -0
  18. package/build/internal/meta.mjs.map +1 -0
  19. package/build/internal/{cjs/src/stores-catalog-v1-collection-collections.universal.d.ts → stores-catalog-v1-collection-collections.universal-BdGGTv5j.d.mts} +31 -57
  20. package/build/internal/{es/src/stores-catalog-v1-collection-collections.universal.d.ts → stores-catalog-v1-collection-collections.universal-BdGGTv5j.d.ts} +31 -57
  21. package/build/{cjs/src/stores-catalog-v1-collection-collections.types.d.ts → meta.d.mts} +45 -81
  22. package/build/{internal/es/src/stores-catalog-v1-collection-collections.types.d.ts → meta.d.ts} +45 -81
  23. package/build/meta.js +241 -0
  24. package/build/meta.js.map +1 -0
  25. package/build/meta.mjs +212 -0
  26. package/build/meta.mjs.map +1 -0
  27. package/build/{cjs/src/stores-catalog-v1-collection-collections.universal.d.ts → stores-catalog-v1-collection-collections.universal-DXVGSHC4.d.mts} +31 -57
  28. package/build/{es/src/stores-catalog-v1-collection-collections.universal.d.ts → stores-catalog-v1-collection-collections.universal-DXVGSHC4.d.ts} +31 -57
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/stores-catalog-v1-collection-collections.context.d.ts +0 -7
  40. package/build/cjs/src/stores-catalog-v1-collection-collections.context.js +0 -12
  41. package/build/cjs/src/stores-catalog-v1-collection-collections.context.js.map +0 -1
  42. package/build/cjs/src/stores-catalog-v1-collection-collections.http.d.ts +0 -10
  43. package/build/cjs/src/stores-catalog-v1-collection-collections.http.js +0 -162
  44. package/build/cjs/src/stores-catalog-v1-collection-collections.http.js.map +0 -1
  45. package/build/cjs/src/stores-catalog-v1-collection-collections.meta.d.ts +0 -19
  46. package/build/cjs/src/stores-catalog-v1-collection-collections.meta.js +0 -85
  47. package/build/cjs/src/stores-catalog-v1-collection-collections.meta.js.map +0 -1
  48. package/build/cjs/src/stores-catalog-v1-collection-collections.public.d.ts +0 -30
  49. package/build/cjs/src/stores-catalog-v1-collection-collections.public.js +0 -27
  50. package/build/cjs/src/stores-catalog-v1-collection-collections.public.js.map +0 -1
  51. package/build/cjs/src/stores-catalog-v1-collection-collections.types.js +0 -23
  52. package/build/cjs/src/stores-catalog-v1-collection-collections.types.js.map +0 -1
  53. package/build/cjs/src/stores-catalog-v1-collection-collections.universal.js +0 -160
  54. package/build/cjs/src/stores-catalog-v1-collection-collections.universal.js.map +0 -1
  55. package/build/es/index.d.ts +0 -1
  56. package/build/es/index.js +0 -2
  57. package/build/es/index.js.map +0 -1
  58. package/build/es/index.typings.d.ts +0 -1
  59. package/build/es/index.typings.js +0 -2
  60. package/build/es/index.typings.js.map +0 -1
  61. package/build/es/meta.d.ts +0 -1
  62. package/build/es/meta.js +0 -2
  63. package/build/es/meta.js.map +0 -1
  64. package/build/es/package.json +0 -3
  65. package/build/es/src/stores-catalog-v1-collection-collections.context.d.ts +0 -7
  66. package/build/es/src/stores-catalog-v1-collection-collections.context.js +0 -7
  67. package/build/es/src/stores-catalog-v1-collection-collections.context.js.map +0 -1
  68. package/build/es/src/stores-catalog-v1-collection-collections.http.d.ts +0 -10
  69. package/build/es/src/stores-catalog-v1-collection-collections.http.js +0 -156
  70. package/build/es/src/stores-catalog-v1-collection-collections.http.js.map +0 -1
  71. package/build/es/src/stores-catalog-v1-collection-collections.meta.d.ts +0 -19
  72. package/build/es/src/stores-catalog-v1-collection-collections.meta.js +0 -56
  73. package/build/es/src/stores-catalog-v1-collection-collections.meta.js.map +0 -1
  74. package/build/es/src/stores-catalog-v1-collection-collections.public.d.ts +0 -30
  75. package/build/es/src/stores-catalog-v1-collection-collections.public.js +0 -19
  76. package/build/es/src/stores-catalog-v1-collection-collections.public.js.map +0 -1
  77. package/build/es/src/stores-catalog-v1-collection-collections.types.js +0 -20
  78. package/build/es/src/stores-catalog-v1-collection-collections.types.js.map +0 -1
  79. package/build/es/src/stores-catalog-v1-collection-collections.universal.js +0 -131
  80. package/build/es/src/stores-catalog-v1-collection-collections.universal.js.map +0 -1
  81. package/build/internal/cjs/index.d.ts +0 -1
  82. package/build/internal/cjs/index.js +0 -18
  83. package/build/internal/cjs/index.js.map +0 -1
  84. package/build/internal/cjs/index.typings.d.ts +0 -1
  85. package/build/internal/cjs/index.typings.js +0 -18
  86. package/build/internal/cjs/index.typings.js.map +0 -1
  87. package/build/internal/cjs/meta.d.ts +0 -1
  88. package/build/internal/cjs/meta.js +0 -18
  89. package/build/internal/cjs/meta.js.map +0 -1
  90. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.context.d.ts +0 -7
  91. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.context.js +0 -12
  92. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.context.js.map +0 -1
  93. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.http.d.ts +0 -10
  94. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.http.js +0 -162
  95. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.http.js.map +0 -1
  96. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.meta.d.ts +0 -19
  97. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.meta.js +0 -85
  98. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.meta.js.map +0 -1
  99. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.public.d.ts +0 -30
  100. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.public.js +0 -27
  101. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.public.js.map +0 -1
  102. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.types.js +0 -23
  103. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.types.js.map +0 -1
  104. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.universal.js +0 -160
  105. package/build/internal/cjs/src/stores-catalog-v1-collection-collections.universal.js.map +0 -1
  106. package/build/internal/es/index.d.ts +0 -1
  107. package/build/internal/es/index.js +0 -2
  108. package/build/internal/es/index.js.map +0 -1
  109. package/build/internal/es/index.typings.d.ts +0 -1
  110. package/build/internal/es/index.typings.js +0 -2
  111. package/build/internal/es/index.typings.js.map +0 -1
  112. package/build/internal/es/meta.d.ts +0 -1
  113. package/build/internal/es/meta.js +0 -2
  114. package/build/internal/es/meta.js.map +0 -1
  115. package/build/internal/es/src/stores-catalog-v1-collection-collections.context.d.ts +0 -7
  116. package/build/internal/es/src/stores-catalog-v1-collection-collections.context.js +0 -7
  117. package/build/internal/es/src/stores-catalog-v1-collection-collections.context.js.map +0 -1
  118. package/build/internal/es/src/stores-catalog-v1-collection-collections.http.d.ts +0 -10
  119. package/build/internal/es/src/stores-catalog-v1-collection-collections.http.js +0 -156
  120. package/build/internal/es/src/stores-catalog-v1-collection-collections.http.js.map +0 -1
  121. package/build/internal/es/src/stores-catalog-v1-collection-collections.meta.d.ts +0 -19
  122. package/build/internal/es/src/stores-catalog-v1-collection-collections.meta.js +0 -56
  123. package/build/internal/es/src/stores-catalog-v1-collection-collections.meta.js.map +0 -1
  124. package/build/internal/es/src/stores-catalog-v1-collection-collections.public.d.ts +0 -30
  125. package/build/internal/es/src/stores-catalog-v1-collection-collections.public.js +0 -19
  126. package/build/internal/es/src/stores-catalog-v1-collection-collections.public.js.map +0 -1
  127. package/build/internal/es/src/stores-catalog-v1-collection-collections.types.js +0 -20
  128. package/build/internal/es/src/stores-catalog-v1-collection-collections.types.js.map +0 -1
  129. package/build/internal/es/src/stores-catalog-v1-collection-collections.universal.js +0 -131
  130. package/build/internal/es/src/stores-catalog-v1-collection-collections.universal.js.map +0 -1
@@ -1,4 +1,6 @@
1
- export interface Collection {
1
+ import { Q as QueryCollectionsRequest$1, m as QueryCollectionsResponse$1, p as GetCollectionRequest$1, q as GetCollectionResponse$1, r as GetCollectionBySlugRequest$1, G as GetCollectionBySlugResponse$1 } from './stores-catalog-v1-collection-collections.universal-BdGGTv5j.js';
2
+
3
+ interface Collection {
2
4
  /**
3
5
  * Collection ID (generated automatically by the catalog).
4
6
  * @minLength 35
@@ -36,13 +38,13 @@ export interface Collection {
36
38
  /** Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`. */
37
39
  visible?: boolean | null;
38
40
  }
39
- export interface Media {
41
+ interface Media {
40
42
  /** Primary media (image, video etc) associated with this product. */
41
43
  mainMedia?: MediaItem;
42
44
  /** Media (images, videos etc) associated with this product. */
43
45
  items?: MediaItem[];
44
46
  }
45
- export interface MediaItem extends MediaItemItemOneOf {
47
+ interface MediaItem extends MediaItemItemOneOf {
46
48
  /** Image data (URL, size). */
47
49
  image?: MediaItemUrlAndSize;
48
50
  /** Video data (URL, size). */
@@ -57,13 +59,13 @@ export interface MediaItem extends MediaItemItemOneOf {
57
59
  id?: string;
58
60
  }
59
61
  /** @oneof */
60
- export interface MediaItemItemOneOf {
62
+ interface MediaItemItemOneOf {
61
63
  /** Image data (URL, size). */
62
64
  image?: MediaItemUrlAndSize;
63
65
  /** Video data (URL, size). */
64
66
  video?: MediaItemVideo;
65
67
  }
66
- export interface MediaItemUrlAndSize {
68
+ interface MediaItemUrlAndSize {
67
69
  /**
68
70
  * Media item URL.
69
71
  * @format WEB_URL
@@ -78,7 +80,7 @@ export interface MediaItemUrlAndSize {
78
80
  /** Alt text. This text will be shown in case the image is not available. */
79
81
  altText?: string | null;
80
82
  }
81
- export declare enum MediaItemType {
83
+ declare enum MediaItemType {
82
84
  unspecified_media_item_type = "unspecified_media_item_type",
83
85
  /** Image media type. */
84
86
  image = "image",
@@ -92,75 +94,17 @@ export declare enum MediaItemType {
92
94
  zip = "zip"
93
95
  }
94
96
  /** @enumType */
95
- export type MediaItemTypeWithLiterals = MediaItemType | 'unspecified_media_item_type' | 'image' | 'video' | 'audio' | 'document' | 'zip';
96
- export interface MediaItemVideo {
97
+ type MediaItemTypeWithLiterals = MediaItemType | 'unspecified_media_item_type' | 'image' | 'video' | 'audio' | 'document' | 'zip';
98
+ interface MediaItemVideo {
97
99
  /** Data (URL, size) about each resolution for which this video is available. */
98
100
  files?: MediaItemUrlAndSize[];
99
101
  /** 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
102
  stillFrameMediaId?: string;
101
103
  }
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 {
104
+ interface QueryCollectionsRequest {
161
105
  query?: PlatformQuery;
162
106
  }
163
- export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
107
+ interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
164
108
  /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
165
109
  paging?: PlatformPaging;
166
110
  /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
@@ -171,13 +115,13 @@ export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
171
115
  sort?: Sorting[];
172
116
  }
173
117
  /** @oneof */
174
- export interface PlatformQueryPagingMethodOneOf {
118
+ interface PlatformQueryPagingMethodOneOf {
175
119
  /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
176
120
  paging?: PlatformPaging;
177
121
  /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
178
122
  cursorPaging?: CursorPaging;
179
123
  }
180
- export interface Sorting {
124
+ interface Sorting {
181
125
  /**
182
126
  * Name of the field to sort by.
183
127
  * @maxLength 512
@@ -186,13 +130,13 @@ export interface Sorting {
186
130
  /** Sort order. */
187
131
  order?: SortOrderWithLiterals;
188
132
  }
189
- export declare enum SortOrder {
133
+ declare enum SortOrder {
190
134
  ASC = "ASC",
191
135
  DESC = "DESC"
192
136
  }
193
137
  /** @enumType */
194
- export type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
195
- export interface PlatformPaging {
138
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
139
+ interface PlatformPaging {
196
140
  /**
197
141
  * Number of items to load.
198
142
  * @max 100
@@ -201,7 +145,7 @@ export interface PlatformPaging {
201
145
  /** Number of items to skip in the current sort order. */
202
146
  offset?: number | null;
203
147
  }
204
- export interface CursorPaging {
148
+ interface CursorPaging {
205
149
  /**
206
150
  * Maximum number of items to return in the results.
207
151
  * @max 100
@@ -216,12 +160,12 @@ export interface CursorPaging {
216
160
  */
217
161
  cursor?: string | null;
218
162
  }
219
- export interface QueryCollectionsResponse {
163
+ interface QueryCollectionsResponse {
220
164
  /** @maxSize 100 */
221
165
  collections?: Collection[];
222
166
  metadata?: PlatformPagingMetadata;
223
167
  }
224
- export interface PlatformPagingMetadata {
168
+ interface PlatformPagingMetadata {
225
169
  /** The number of items returned in this response. */
226
170
  count?: number | null;
227
171
  /** The offset which was requested. Returned if offset paging was used. */
@@ -231,7 +175,7 @@ export interface PlatformPagingMetadata {
231
175
  /** Cursors to navigate through result pages. Returned if cursor paging was used. */
232
176
  cursors?: Cursors;
233
177
  }
234
- export interface Cursors {
178
+ interface Cursors {
235
179
  /**
236
180
  * Cursor string pointing to the next page in the list of results.
237
181
  * @maxLength 16000
@@ -243,14 +187,14 @@ export interface Cursors {
243
187
  */
244
188
  prev?: string | null;
245
189
  }
246
- export interface GetCollectionRequest {
190
+ interface GetCollectionRequest {
247
191
  /** Requested collection ID. */
248
192
  id: string;
249
193
  }
250
- export interface GetCollectionResponse {
194
+ interface GetCollectionResponse {
251
195
  collection?: Collection;
252
196
  }
253
- export interface GetCollectionBySlugRequest {
197
+ interface GetCollectionBySlugRequest {
254
198
  /**
255
199
  * Slug of the collection to retrieve.
256
200
  * @minLength 1
@@ -258,7 +202,27 @@ export interface GetCollectionBySlugRequest {
258
202
  */
259
203
  slug: string;
260
204
  }
261
- export interface GetCollectionBySlugResponse {
205
+ interface GetCollectionBySlugResponse {
262
206
  /** The requested collection. */
263
207
  collection?: Collection;
264
208
  }
209
+
210
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
211
+ getUrl: (context: any) => string;
212
+ httpMethod: K;
213
+ path: string;
214
+ pathParams: M;
215
+ __requestType: T;
216
+ __originalRequestType: S;
217
+ __responseType: Q;
218
+ __originalResponseType: R;
219
+ };
220
+ declare function queryCollections(): __PublicMethodMetaInfo<'GET', {}, QueryCollectionsRequest$1, QueryCollectionsRequest, QueryCollectionsResponse$1, QueryCollectionsResponse>;
221
+ declare function getCollection(): __PublicMethodMetaInfo<'GET', {
222
+ id: string;
223
+ }, GetCollectionRequest$1, GetCollectionRequest, GetCollectionResponse$1, GetCollectionResponse>;
224
+ declare function getCollectionBySlug(): __PublicMethodMetaInfo<'GET', {
225
+ slug: string;
226
+ }, GetCollectionBySlugRequest$1, GetCollectionBySlugRequest, GetCollectionBySlugResponse$1, GetCollectionBySlugResponse>;
227
+
228
+ export { type __PublicMethodMetaInfo, getCollection, getCollectionBySlug, queryCollections };
@@ -0,0 +1,241 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // meta.ts
21
+ var meta_exports = {};
22
+ __export(meta_exports, {
23
+ getCollection: () => getCollection2,
24
+ getCollectionBySlug: () => getCollectionBySlug2,
25
+ queryCollections: () => queryCollections2
26
+ });
27
+ module.exports = __toCommonJS(meta_exports);
28
+
29
+ // src/stores-catalog-v1-collection-collections.http.ts
30
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
31
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
32
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
33
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
34
+ function resolveWixCatalogApiV2CollectionReadApiUrl(opts) {
35
+ const domainToMappings = {
36
+ "api._api_base_domain_": [
37
+ {
38
+ srcPath: "/wix-ecommerce-catalog-reader-web",
39
+ destPath: ""
40
+ }
41
+ ],
42
+ "manage._base_domain_": [
43
+ {
44
+ srcPath: "/wix-ecommerce-catalog-reader-web",
45
+ destPath: ""
46
+ }
47
+ ],
48
+ "www.wixapis.com": [
49
+ {
50
+ srcPath: "/stores-reader/v2/collections",
51
+ destPath: "/v2/collections"
52
+ },
53
+ {
54
+ srcPath: "/stores-reader/v2/inventoryItems",
55
+ destPath: "/v2/inventoryItems"
56
+ }
57
+ ],
58
+ "www._base_domain_": [
59
+ {
60
+ srcPath: "/wix-ecommerce-catalog-reader-web",
61
+ destPath: ""
62
+ }
63
+ ],
64
+ "editor._base_domain_": [
65
+ {
66
+ srcPath: "/_api/wix-ecommerce-catalog-reader-web",
67
+ destPath: ""
68
+ }
69
+ ],
70
+ "blocks._base_domain_": [
71
+ {
72
+ srcPath: "/_api/wix-ecommerce-catalog-reader-web",
73
+ destPath: ""
74
+ }
75
+ ],
76
+ "create.editorx": [
77
+ {
78
+ srcPath: "/_api/wix-ecommerce-catalog-reader-web",
79
+ destPath: ""
80
+ }
81
+ ],
82
+ _: [
83
+ {
84
+ srcPath: "/stores-reader/v2/inventoryItems",
85
+ destPath: "/v2/inventoryItems"
86
+ },
87
+ {
88
+ srcPath: "/stores-reader/v2/collections",
89
+ destPath: "/v2/collections"
90
+ }
91
+ ]
92
+ };
93
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
94
+ }
95
+ var PACKAGE_NAME = "@wix/auto_sdk_stores_collections";
96
+ function queryCollections(payload) {
97
+ function __queryCollections({ host }) {
98
+ const metadata = {
99
+ entityFqdn: "wix.stores.catalog.v1.collection",
100
+ method: "POST",
101
+ methodFqn: "wix.catalog.api.v2.CollectionReadApi.QueryCollections",
102
+ packageName: PACKAGE_NAME,
103
+ url: resolveWixCatalogApiV2CollectionReadApiUrl({
104
+ protoPath: "/v2/collections/query",
105
+ data: payload,
106
+ host
107
+ }),
108
+ data: payload,
109
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
110
+ {
111
+ transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
112
+ paths: [{ path: "collections.lastUpdated" }]
113
+ }
114
+ ]),
115
+ fallback: [
116
+ {
117
+ method: "POST",
118
+ url: resolveWixCatalogApiV2CollectionReadApiUrl({
119
+ protoPath: "/v2/collections/query",
120
+ data: payload,
121
+ host
122
+ }),
123
+ data: payload
124
+ }
125
+ ]
126
+ };
127
+ return metadata;
128
+ }
129
+ return __queryCollections;
130
+ }
131
+ function getCollection(payload) {
132
+ function __getCollection({ host }) {
133
+ const metadata = {
134
+ entityFqdn: "wix.stores.catalog.v1.collection",
135
+ method: "GET",
136
+ methodFqn: "wix.catalog.api.v2.CollectionReadApi.GetCollection",
137
+ packageName: PACKAGE_NAME,
138
+ url: resolveWixCatalogApiV2CollectionReadApiUrl({
139
+ protoPath: "/v2/collections/{id}",
140
+ data: payload,
141
+ host
142
+ }),
143
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
144
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
145
+ {
146
+ transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
147
+ paths: [{ path: "collection.lastUpdated" }]
148
+ }
149
+ ])
150
+ };
151
+ return metadata;
152
+ }
153
+ return __getCollection;
154
+ }
155
+ function getCollectionBySlug(payload) {
156
+ function __getCollectionBySlug({ host }) {
157
+ const metadata = {
158
+ entityFqdn: "wix.stores.catalog.v1.collection",
159
+ method: "GET",
160
+ methodFqn: "wix.catalog.api.v2.CollectionReadApi.GetCollectionBySlug",
161
+ packageName: PACKAGE_NAME,
162
+ url: resolveWixCatalogApiV2CollectionReadApiUrl({
163
+ protoPath: "/v2/collections/slug/{slug}",
164
+ data: payload,
165
+ host
166
+ }),
167
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
168
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
169
+ {
170
+ transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
171
+ paths: [{ path: "collection.lastUpdated" }]
172
+ }
173
+ ])
174
+ };
175
+ return metadata;
176
+ }
177
+ return __getCollectionBySlug;
178
+ }
179
+
180
+ // src/stores-catalog-v1-collection-collections.meta.ts
181
+ function queryCollections2() {
182
+ const payload = {};
183
+ const getRequestOptions = queryCollections(payload);
184
+ const getUrl = (context) => {
185
+ const { url } = getRequestOptions(context);
186
+ return url;
187
+ };
188
+ return {
189
+ getUrl,
190
+ httpMethod: "GET",
191
+ path: "/v2/collections/query",
192
+ pathParams: {},
193
+ __requestType: null,
194
+ __originalRequestType: null,
195
+ __responseType: null,
196
+ __originalResponseType: null
197
+ };
198
+ }
199
+ function getCollection2() {
200
+ const payload = { id: ":id" };
201
+ const getRequestOptions = getCollection(payload);
202
+ const getUrl = (context) => {
203
+ const { url } = getRequestOptions(context);
204
+ return url;
205
+ };
206
+ return {
207
+ getUrl,
208
+ httpMethod: "GET",
209
+ path: "/v2/collections/{id}",
210
+ pathParams: { id: "id" },
211
+ __requestType: null,
212
+ __originalRequestType: null,
213
+ __responseType: null,
214
+ __originalResponseType: null
215
+ };
216
+ }
217
+ function getCollectionBySlug2() {
218
+ const payload = { slug: ":slug" };
219
+ const getRequestOptions = getCollectionBySlug(payload);
220
+ const getUrl = (context) => {
221
+ const { url } = getRequestOptions(context);
222
+ return url;
223
+ };
224
+ return {
225
+ getUrl,
226
+ httpMethod: "GET",
227
+ path: "/v2/collections/slug/{slug}",
228
+ pathParams: { slug: "slug" },
229
+ __requestType: null,
230
+ __originalRequestType: null,
231
+ __responseType: null,
232
+ __originalResponseType: null
233
+ };
234
+ }
235
+ // Annotate the CommonJS export names for ESM import in node:
236
+ 0 && (module.exports = {
237
+ getCollection,
238
+ getCollectionBySlug,
239
+ queryCollections
240
+ });
241
+ //# sourceMappingURL=meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../meta.ts","../../src/stores-catalog-v1-collection-collections.http.ts","../../src/stores-catalog-v1-collection-collections.meta.ts"],"sourcesContent":["export * from './src/stores-catalog-v1-collection-collections.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCatalogApiV2CollectionReadApiUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/wix-ecommerce-catalog-reader-web',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/wix-ecommerce-catalog-reader-web',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/stores-reader/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/stores-reader/v2/inventoryItems',\n destPath: '/v2/inventoryItems',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/wix-ecommerce-catalog-reader-web',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/wix-ecommerce-catalog-reader-web',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/wix-ecommerce-catalog-reader-web',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/wix-ecommerce-catalog-reader-web',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/stores-reader/v2/inventoryItems',\n destPath: '/v2/inventoryItems',\n },\n {\n srcPath: '/stores-reader/v2/collections',\n destPath: '/v2/collections',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_stores_collections';\n\n/**\n * Retrieves a list of up to 100 collections, given the provided paging, sorting and filtering.\n * See [Stores Pagination](https://dev.wix.com/api/rest/wix-stores/pagination) for more information.\n */\nexport function queryCollections(payload: object): RequestOptionsFactory<any> {\n function __queryCollections({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.catalog.v1.collection',\n method: 'POST' as any,\n methodFqn: 'wix.catalog.api.v2.CollectionReadApi.QueryCollections',\n packageName: PACKAGE_NAME,\n url: resolveWixCatalogApiV2CollectionReadApiUrl({\n protoPath: '/v2/collections/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'collections.lastUpdated' }],\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixCatalogApiV2CollectionReadApiUrl({\n protoPath: '/v2/collections/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryCollections;\n}\n\n/** Retrieves a collection with the provided ID. */\nexport function getCollection(payload: object): RequestOptionsFactory<any> {\n function __getCollection({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.catalog.v1.collection',\n method: 'GET' as any,\n methodFqn: 'wix.catalog.api.v2.CollectionReadApi.GetCollection',\n packageName: PACKAGE_NAME,\n url: resolveWixCatalogApiV2CollectionReadApiUrl({\n protoPath: '/v2/collections/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'collection.lastUpdated' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCollection;\n}\n\n/** Retrieves a collection with the provided slug. */\nexport function getCollectionBySlug(\n payload: object\n): RequestOptionsFactory<any> {\n function __getCollectionBySlug({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.catalog.v1.collection',\n method: 'GET' as any,\n methodFqn: 'wix.catalog.api.v2.CollectionReadApi.GetCollectionBySlug',\n packageName: PACKAGE_NAME,\n url: resolveWixCatalogApiV2CollectionReadApiUrl({\n protoPath: '/v2/collections/slug/{slug}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'collection.lastUpdated' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCollectionBySlug;\n}\n","import * as ambassadorWixStoresCatalogV1Collection from './stores-catalog-v1-collection-collections.http.js';\nimport * as ambassadorWixStoresCatalogV1CollectionTypes from './stores-catalog-v1-collection-collections.types.js';\nimport * as ambassadorWixStoresCatalogV1CollectionUniversalTypes from './stores-catalog-v1-collection-collections.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function queryCollections(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixStoresCatalogV1CollectionUniversalTypes.QueryCollectionsRequest,\n ambassadorWixStoresCatalogV1CollectionTypes.QueryCollectionsRequest,\n ambassadorWixStoresCatalogV1CollectionUniversalTypes.QueryCollectionsResponse,\n ambassadorWixStoresCatalogV1CollectionTypes.QueryCollectionsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixStoresCatalogV1Collection.queryCollections(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v2/collections/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getCollection(): __PublicMethodMetaInfo<\n 'GET',\n { id: string },\n ambassadorWixStoresCatalogV1CollectionUniversalTypes.GetCollectionRequest,\n ambassadorWixStoresCatalogV1CollectionTypes.GetCollectionRequest,\n ambassadorWixStoresCatalogV1CollectionUniversalTypes.GetCollectionResponse,\n ambassadorWixStoresCatalogV1CollectionTypes.GetCollectionResponse\n> {\n const payload = { id: ':id' } as any;\n\n const getRequestOptions =\n ambassadorWixStoresCatalogV1Collection.getCollection(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v2/collections/{id}',\n pathParams: { id: 'id' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getCollectionBySlug(): __PublicMethodMetaInfo<\n 'GET',\n { slug: string },\n ambassadorWixStoresCatalogV1CollectionUniversalTypes.GetCollectionBySlugRequest,\n ambassadorWixStoresCatalogV1CollectionTypes.GetCollectionBySlugRequest,\n ambassadorWixStoresCatalogV1CollectionUniversalTypes.GetCollectionBySlugResponse,\n ambassadorWixStoresCatalogV1CollectionTypes.GetCollectionBySlugResponse\n> {\n const payload = { slug: ':slug' } as any;\n\n const getRequestOptions =\n ambassadorWixStoresCatalogV1Collection.getCollectionBySlug(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v2/collections/slug/{slug}',\n pathParams: { slug: 'slug' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,uBAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,wBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,2CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IAC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AO;AAE9D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,IAAI,KAAK;AAAA,IACvB,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,uBAOd;AACA,QAAM,UAAU,EAAE,MAAM,QAAQ;AAEhC,QAAM,oBACmC,oBAAoB,OAAO;AAEpE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,MAAM,OAAO;AAAA,IAC3B,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["getCollection","getCollectionBySlug","queryCollections","import_rest_modules","payload","queryCollections","getCollection","getCollectionBySlug"]}