@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 +1,228 @@
1
- export * from './src/stores-catalog-v1-collection-collections.meta.js';
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-DXVGSHC4.js';
2
+
3
+ interface Collection {
4
+ /**
5
+ * Collection ID (generated automatically by the catalog).
6
+ * @minLength 35
7
+ * @maxLength 36
8
+ * @readonly
9
+ */
10
+ id?: string | null;
11
+ /**
12
+ * Collection name.
13
+ * @minLength 1
14
+ * @maxLength 50
15
+ */
16
+ name?: string | null;
17
+ /**
18
+ * Media items (images, videos etc) associated with this collection. Read only.
19
+ * @readonly
20
+ */
21
+ media?: Media;
22
+ /**
23
+ * Number of products in the collection. Read only.
24
+ * @readonly
25
+ */
26
+ numberOfProducts?: number;
27
+ /**
28
+ * Collection description.
29
+ * @maxLength 600
30
+ */
31
+ description?: string | null;
32
+ /**
33
+ * Collection slug.
34
+ * @minLength 1
35
+ * @maxLength 100
36
+ */
37
+ slug?: string | null;
38
+ /** Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`. */
39
+ visible?: boolean | null;
40
+ }
41
+ interface Media {
42
+ /** Primary media (image, video etc) associated with this product. */
43
+ mainMedia?: MediaItem;
44
+ /** Media (images, videos etc) associated with this product. */
45
+ items?: MediaItem[];
46
+ }
47
+ interface MediaItem extends MediaItemItemOneOf {
48
+ /** Image data (URL, size). */
49
+ image?: MediaItemUrlAndSize;
50
+ /** Video data (URL, size). */
51
+ video?: MediaItemVideo;
52
+ /** Media item thumbnail details. */
53
+ thumbnail?: MediaItemUrlAndSize;
54
+ /** Media item type (image, video, etc.). */
55
+ mediaType?: MediaItemTypeWithLiterals;
56
+ /** Media item title. */
57
+ title?: string;
58
+ /** Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`). */
59
+ id?: string;
60
+ }
61
+ /** @oneof */
62
+ interface MediaItemItemOneOf {
63
+ /** Image data (URL, size). */
64
+ image?: MediaItemUrlAndSize;
65
+ /** Video data (URL, size). */
66
+ video?: MediaItemVideo;
67
+ }
68
+ interface MediaItemUrlAndSize {
69
+ /**
70
+ * Media item URL.
71
+ * @format WEB_URL
72
+ */
73
+ url?: string;
74
+ /** Media item width. */
75
+ width?: number;
76
+ /** Media item height. */
77
+ height?: number;
78
+ /** Media format (mp4, png, etc.). */
79
+ format?: string | null;
80
+ /** Alt text. This text will be shown in case the image is not available. */
81
+ altText?: string | null;
82
+ }
83
+ declare enum MediaItemType {
84
+ unspecified_media_item_type = "unspecified_media_item_type",
85
+ /** Image media type. */
86
+ image = "image",
87
+ /** Video media type. */
88
+ video = "video",
89
+ /** Audio media type. */
90
+ audio = "audio",
91
+ /** Document media type. */
92
+ document = "document",
93
+ /** Zip media type. */
94
+ zip = "zip"
95
+ }
96
+ /** @enumType */
97
+ type MediaItemTypeWithLiterals = MediaItemType | 'unspecified_media_item_type' | 'image' | 'video' | 'audio' | 'document' | 'zip';
98
+ interface MediaItemVideo {
99
+ /** Data (URL, size) about each resolution for which this video is available. */
100
+ files?: MediaItemUrlAndSize[];
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"`. */
102
+ stillFrameMediaId?: string;
103
+ }
104
+ interface QueryCollectionsRequest {
105
+ query?: PlatformQuery;
106
+ }
107
+ interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
108
+ /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
109
+ paging?: PlatformPaging;
110
+ /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
111
+ cursorPaging?: CursorPaging;
112
+ /** Filter object. */
113
+ filter?: Record<string, any> | null;
114
+ /** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */
115
+ sort?: Sorting[];
116
+ }
117
+ /** @oneof */
118
+ interface PlatformQueryPagingMethodOneOf {
119
+ /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
120
+ paging?: PlatformPaging;
121
+ /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
122
+ cursorPaging?: CursorPaging;
123
+ }
124
+ interface Sorting {
125
+ /**
126
+ * Name of the field to sort by.
127
+ * @maxLength 512
128
+ */
129
+ fieldName?: string;
130
+ /** Sort order. */
131
+ order?: SortOrderWithLiterals;
132
+ }
133
+ declare enum SortOrder {
134
+ ASC = "ASC",
135
+ DESC = "DESC"
136
+ }
137
+ /** @enumType */
138
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
139
+ interface PlatformPaging {
140
+ /**
141
+ * Number of items to load.
142
+ * @max 100
143
+ */
144
+ limit?: number | null;
145
+ /** Number of items to skip in the current sort order. */
146
+ offset?: number | null;
147
+ }
148
+ interface CursorPaging {
149
+ /**
150
+ * Maximum number of items to return in the results.
151
+ * @max 100
152
+ */
153
+ limit?: number | null;
154
+ /**
155
+ * Pointer to the next or previous page in the list of results.
156
+ *
157
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
158
+ * Not relevant for the first request.
159
+ * @maxLength 16000
160
+ */
161
+ cursor?: string | null;
162
+ }
163
+ interface QueryCollectionsResponse {
164
+ /** @maxSize 100 */
165
+ collections?: Collection[];
166
+ metadata?: PlatformPagingMetadata;
167
+ }
168
+ interface PlatformPagingMetadata {
169
+ /** The number of items returned in this response. */
170
+ count?: number | null;
171
+ /** The offset which was requested. Returned if offset paging was used. */
172
+ offset?: number | null;
173
+ /** The total number of items that match the query. Returned if offset paging was used. */
174
+ total?: number | null;
175
+ /** Cursors to navigate through result pages. Returned if cursor paging was used. */
176
+ cursors?: Cursors;
177
+ }
178
+ interface Cursors {
179
+ /**
180
+ * Cursor string pointing to the next page in the list of results.
181
+ * @maxLength 16000
182
+ */
183
+ next?: string | null;
184
+ /**
185
+ * Cursor pointing to the previous page in the list of results.
186
+ * @maxLength 16000
187
+ */
188
+ prev?: string | null;
189
+ }
190
+ interface GetCollectionRequest {
191
+ /** Requested collection ID. */
192
+ id: string;
193
+ }
194
+ interface GetCollectionResponse {
195
+ collection?: Collection;
196
+ }
197
+ interface GetCollectionBySlugRequest {
198
+ /**
199
+ * Slug of the collection to retrieve.
200
+ * @minLength 1
201
+ * @maxLength 100
202
+ */
203
+ slug: string;
204
+ }
205
+ interface GetCollectionBySlugResponse {
206
+ /** The requested collection. */
207
+ collection?: Collection;
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 };
package/build/cjs/meta.js CHANGED
@@ -1,18 +1,241 @@
1
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
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 });
15
9
  };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/stores-catalog-v1-collection-collections.meta.js"), exports);
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
+ });
18
241
  //# sourceMappingURL=meta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yFAAuE"}
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,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAMd,SAAS,iBAAiB,SAA6C;AAC5E,WA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AO;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"]}