@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.
- package/build/index.d.mts +34 -0
- package/build/index.d.ts +34 -0
- package/build/index.js +328 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +300 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/index.d.mts +34 -0
- package/build/internal/index.d.ts +34 -0
- package/build/internal/index.js +328 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +300 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/{es/src/stores-catalog-v1-collection-collections.types.d.ts → internal/meta.d.mts} +45 -81
- package/build/internal/{cjs/src/stores-catalog-v1-collection-collections.types.d.ts → meta.d.ts} +45 -81
- package/build/internal/meta.js +241 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +212 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/internal/{cjs/src/stores-catalog-v1-collection-collections.universal.d.ts → stores-catalog-v1-collection-collections.universal-BdGGTv5j.d.mts} +31 -57
- package/build/internal/{es/src/stores-catalog-v1-collection-collections.universal.d.ts → stores-catalog-v1-collection-collections.universal-BdGGTv5j.d.ts} +31 -57
- package/build/{cjs/src/stores-catalog-v1-collection-collections.types.d.ts → meta.d.mts} +45 -81
- package/build/{internal/es/src/stores-catalog-v1-collection-collections.types.d.ts → meta.d.ts} +45 -81
- package/build/meta.js +241 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +212 -0
- package/build/meta.mjs.map +1 -0
- package/build/{cjs/src/stores-catalog-v1-collection-collections.universal.d.ts → stores-catalog-v1-collection-collections.universal-DXVGSHC4.d.mts} +31 -57
- package/build/{es/src/stores-catalog-v1-collection-collections.universal.d.ts → stores-catalog-v1-collection-collections.universal-DXVGSHC4.d.ts} +31 -57
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-collection-collections.context.d.ts +0 -7
- package/build/cjs/src/stores-catalog-v1-collection-collections.context.js +0 -12
- package/build/cjs/src/stores-catalog-v1-collection-collections.context.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-collection-collections.http.d.ts +0 -10
- package/build/cjs/src/stores-catalog-v1-collection-collections.http.js +0 -162
- package/build/cjs/src/stores-catalog-v1-collection-collections.http.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-collection-collections.meta.d.ts +0 -19
- package/build/cjs/src/stores-catalog-v1-collection-collections.meta.js +0 -85
- package/build/cjs/src/stores-catalog-v1-collection-collections.meta.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-collection-collections.public.d.ts +0 -30
- package/build/cjs/src/stores-catalog-v1-collection-collections.public.js +0 -27
- package/build/cjs/src/stores-catalog-v1-collection-collections.public.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-collection-collections.types.js +0 -23
- package/build/cjs/src/stores-catalog-v1-collection-collections.types.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-collection-collections.universal.js +0 -160
- package/build/cjs/src/stores-catalog-v1-collection-collections.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/stores-catalog-v1-collection-collections.context.d.ts +0 -7
- package/build/es/src/stores-catalog-v1-collection-collections.context.js +0 -7
- package/build/es/src/stores-catalog-v1-collection-collections.context.js.map +0 -1
- package/build/es/src/stores-catalog-v1-collection-collections.http.d.ts +0 -10
- package/build/es/src/stores-catalog-v1-collection-collections.http.js +0 -156
- package/build/es/src/stores-catalog-v1-collection-collections.http.js.map +0 -1
- package/build/es/src/stores-catalog-v1-collection-collections.meta.d.ts +0 -19
- package/build/es/src/stores-catalog-v1-collection-collections.meta.js +0 -56
- package/build/es/src/stores-catalog-v1-collection-collections.meta.js.map +0 -1
- package/build/es/src/stores-catalog-v1-collection-collections.public.d.ts +0 -30
- package/build/es/src/stores-catalog-v1-collection-collections.public.js +0 -19
- package/build/es/src/stores-catalog-v1-collection-collections.public.js.map +0 -1
- package/build/es/src/stores-catalog-v1-collection-collections.types.js +0 -20
- package/build/es/src/stores-catalog-v1-collection-collections.types.js.map +0 -1
- package/build/es/src/stores-catalog-v1-collection-collections.universal.js +0 -131
- package/build/es/src/stores-catalog-v1-collection-collections.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.context.d.ts +0 -7
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.context.js +0 -12
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.context.js.map +0 -1
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.http.d.ts +0 -10
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.http.js +0 -162
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.http.js.map +0 -1
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.meta.d.ts +0 -19
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.meta.js +0 -85
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.meta.js.map +0 -1
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.public.d.ts +0 -30
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.public.js +0 -27
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.public.js.map +0 -1
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.types.js +0 -23
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.types.js.map +0 -1
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.universal.js +0 -160
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/stores-catalog-v1-collection-collections.context.d.ts +0 -7
- package/build/internal/es/src/stores-catalog-v1-collection-collections.context.js +0 -7
- package/build/internal/es/src/stores-catalog-v1-collection-collections.context.js.map +0 -1
- package/build/internal/es/src/stores-catalog-v1-collection-collections.http.d.ts +0 -10
- package/build/internal/es/src/stores-catalog-v1-collection-collections.http.js +0 -156
- package/build/internal/es/src/stores-catalog-v1-collection-collections.http.js.map +0 -1
- package/build/internal/es/src/stores-catalog-v1-collection-collections.meta.d.ts +0 -19
- package/build/internal/es/src/stores-catalog-v1-collection-collections.meta.js +0 -56
- package/build/internal/es/src/stores-catalog-v1-collection-collections.meta.js.map +0 -1
- package/build/internal/es/src/stores-catalog-v1-collection-collections.public.d.ts +0 -30
- package/build/internal/es/src/stores-catalog-v1-collection-collections.public.js +0 -19
- package/build/internal/es/src/stores-catalog-v1-collection-collections.public.js.map +0 -1
- package/build/internal/es/src/stores-catalog-v1-collection-collections.types.js +0 -20
- package/build/internal/es/src/stores-catalog-v1-collection-collections.types.js.map +0 -1
- package/build/internal/es/src/stores-catalog-v1-collection-collections.universal.js +0 -131
- package/build/internal/es/src/stores-catalog-v1-collection-collections.universal.js.map +0 -1
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
// src/stores-catalog-v1-collection-collections.http.ts
|
|
2
|
+
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
3
|
+
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
4
|
+
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
5
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
6
|
+
function resolveWixCatalogApiV2CollectionReadApiUrl(opts) {
|
|
7
|
+
const domainToMappings = {
|
|
8
|
+
"api._api_base_domain_": [
|
|
9
|
+
{
|
|
10
|
+
srcPath: "/wix-ecommerce-catalog-reader-web",
|
|
11
|
+
destPath: ""
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"manage._base_domain_": [
|
|
15
|
+
{
|
|
16
|
+
srcPath: "/wix-ecommerce-catalog-reader-web",
|
|
17
|
+
destPath: ""
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"www.wixapis.com": [
|
|
21
|
+
{
|
|
22
|
+
srcPath: "/stores-reader/v2/collections",
|
|
23
|
+
destPath: "/v2/collections"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
srcPath: "/stores-reader/v2/inventoryItems",
|
|
27
|
+
destPath: "/v2/inventoryItems"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"www._base_domain_": [
|
|
31
|
+
{
|
|
32
|
+
srcPath: "/wix-ecommerce-catalog-reader-web",
|
|
33
|
+
destPath: ""
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"editor._base_domain_": [
|
|
37
|
+
{
|
|
38
|
+
srcPath: "/_api/wix-ecommerce-catalog-reader-web",
|
|
39
|
+
destPath: ""
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"blocks._base_domain_": [
|
|
43
|
+
{
|
|
44
|
+
srcPath: "/_api/wix-ecommerce-catalog-reader-web",
|
|
45
|
+
destPath: ""
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"create.editorx": [
|
|
49
|
+
{
|
|
50
|
+
srcPath: "/_api/wix-ecommerce-catalog-reader-web",
|
|
51
|
+
destPath: ""
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
_: [
|
|
55
|
+
{
|
|
56
|
+
srcPath: "/stores-reader/v2/inventoryItems",
|
|
57
|
+
destPath: "/v2/inventoryItems"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
srcPath: "/stores-reader/v2/collections",
|
|
61
|
+
destPath: "/v2/collections"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
};
|
|
65
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
66
|
+
}
|
|
67
|
+
var PACKAGE_NAME = "@wix/auto_sdk_stores_collections";
|
|
68
|
+
function queryCollections(payload) {
|
|
69
|
+
function __queryCollections({ host }) {
|
|
70
|
+
const metadata = {
|
|
71
|
+
entityFqdn: "wix.stores.catalog.v1.collection",
|
|
72
|
+
method: "POST",
|
|
73
|
+
methodFqn: "wix.catalog.api.v2.CollectionReadApi.QueryCollections",
|
|
74
|
+
packageName: PACKAGE_NAME,
|
|
75
|
+
url: resolveWixCatalogApiV2CollectionReadApiUrl({
|
|
76
|
+
protoPath: "/v2/collections/query",
|
|
77
|
+
data: payload,
|
|
78
|
+
host
|
|
79
|
+
}),
|
|
80
|
+
data: payload,
|
|
81
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
82
|
+
{
|
|
83
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
84
|
+
paths: [{ path: "collections.lastUpdated" }]
|
|
85
|
+
}
|
|
86
|
+
]),
|
|
87
|
+
fallback: [
|
|
88
|
+
{
|
|
89
|
+
method: "POST",
|
|
90
|
+
url: resolveWixCatalogApiV2CollectionReadApiUrl({
|
|
91
|
+
protoPath: "/v2/collections/query",
|
|
92
|
+
data: payload,
|
|
93
|
+
host
|
|
94
|
+
}),
|
|
95
|
+
data: payload
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
};
|
|
99
|
+
return metadata;
|
|
100
|
+
}
|
|
101
|
+
return __queryCollections;
|
|
102
|
+
}
|
|
103
|
+
function getCollection(payload) {
|
|
104
|
+
function __getCollection({ host }) {
|
|
105
|
+
const metadata = {
|
|
106
|
+
entityFqdn: "wix.stores.catalog.v1.collection",
|
|
107
|
+
method: "GET",
|
|
108
|
+
methodFqn: "wix.catalog.api.v2.CollectionReadApi.GetCollection",
|
|
109
|
+
packageName: PACKAGE_NAME,
|
|
110
|
+
url: resolveWixCatalogApiV2CollectionReadApiUrl({
|
|
111
|
+
protoPath: "/v2/collections/{id}",
|
|
112
|
+
data: payload,
|
|
113
|
+
host
|
|
114
|
+
}),
|
|
115
|
+
params: toURLSearchParams(payload),
|
|
116
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
117
|
+
{
|
|
118
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
119
|
+
paths: [{ path: "collection.lastUpdated" }]
|
|
120
|
+
}
|
|
121
|
+
])
|
|
122
|
+
};
|
|
123
|
+
return metadata;
|
|
124
|
+
}
|
|
125
|
+
return __getCollection;
|
|
126
|
+
}
|
|
127
|
+
function getCollectionBySlug(payload) {
|
|
128
|
+
function __getCollectionBySlug({ host }) {
|
|
129
|
+
const metadata = {
|
|
130
|
+
entityFqdn: "wix.stores.catalog.v1.collection",
|
|
131
|
+
method: "GET",
|
|
132
|
+
methodFqn: "wix.catalog.api.v2.CollectionReadApi.GetCollectionBySlug",
|
|
133
|
+
packageName: PACKAGE_NAME,
|
|
134
|
+
url: resolveWixCatalogApiV2CollectionReadApiUrl({
|
|
135
|
+
protoPath: "/v2/collections/slug/{slug}",
|
|
136
|
+
data: payload,
|
|
137
|
+
host
|
|
138
|
+
}),
|
|
139
|
+
params: toURLSearchParams(payload),
|
|
140
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
141
|
+
{
|
|
142
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
143
|
+
paths: [{ path: "collection.lastUpdated" }]
|
|
144
|
+
}
|
|
145
|
+
])
|
|
146
|
+
};
|
|
147
|
+
return metadata;
|
|
148
|
+
}
|
|
149
|
+
return __getCollectionBySlug;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// src/stores-catalog-v1-collection-collections.meta.ts
|
|
153
|
+
function queryCollections2() {
|
|
154
|
+
const payload = {};
|
|
155
|
+
const getRequestOptions = queryCollections(payload);
|
|
156
|
+
const getUrl = (context) => {
|
|
157
|
+
const { url } = getRequestOptions(context);
|
|
158
|
+
return url;
|
|
159
|
+
};
|
|
160
|
+
return {
|
|
161
|
+
getUrl,
|
|
162
|
+
httpMethod: "GET",
|
|
163
|
+
path: "/v2/collections/query",
|
|
164
|
+
pathParams: {},
|
|
165
|
+
__requestType: null,
|
|
166
|
+
__originalRequestType: null,
|
|
167
|
+
__responseType: null,
|
|
168
|
+
__originalResponseType: null
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function getCollection2() {
|
|
172
|
+
const payload = { id: ":id" };
|
|
173
|
+
const getRequestOptions = getCollection(payload);
|
|
174
|
+
const getUrl = (context) => {
|
|
175
|
+
const { url } = getRequestOptions(context);
|
|
176
|
+
return url;
|
|
177
|
+
};
|
|
178
|
+
return {
|
|
179
|
+
getUrl,
|
|
180
|
+
httpMethod: "GET",
|
|
181
|
+
path: "/v2/collections/{id}",
|
|
182
|
+
pathParams: { id: "id" },
|
|
183
|
+
__requestType: null,
|
|
184
|
+
__originalRequestType: null,
|
|
185
|
+
__responseType: null,
|
|
186
|
+
__originalResponseType: null
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
function getCollectionBySlug2() {
|
|
190
|
+
const payload = { slug: ":slug" };
|
|
191
|
+
const getRequestOptions = getCollectionBySlug(payload);
|
|
192
|
+
const getUrl = (context) => {
|
|
193
|
+
const { url } = getRequestOptions(context);
|
|
194
|
+
return url;
|
|
195
|
+
};
|
|
196
|
+
return {
|
|
197
|
+
getUrl,
|
|
198
|
+
httpMethod: "GET",
|
|
199
|
+
path: "/v2/collections/slug/{slug}",
|
|
200
|
+
pathParams: { slug: "slug" },
|
|
201
|
+
__requestType: null,
|
|
202
|
+
__originalRequestType: null,
|
|
203
|
+
__responseType: null,
|
|
204
|
+
__originalResponseType: null
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
export {
|
|
208
|
+
getCollection2 as getCollection,
|
|
209
|
+
getCollectionBySlug2 as getCollectionBySlug,
|
|
210
|
+
queryCollections2 as queryCollections
|
|
211
|
+
};
|
|
212
|
+
//# sourceMappingURL=meta.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/stores-catalog-v1-collection-collections.http.ts","../../src/stores-catalog-v1-collection-collections.meta.ts"],"sourcesContent":["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":"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","names":["payload","queryCollections","getCollection","getCollectionBySlug"]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export interface Collection {
|
|
1
|
+
interface Collection {
|
|
3
2
|
/**
|
|
4
3
|
* Collection ID (generated automatically by the catalog).
|
|
5
4
|
* @minLength 35
|
|
@@ -43,13 +42,13 @@ export interface Collection {
|
|
|
43
42
|
*/
|
|
44
43
|
lastUpdated?: Date | null;
|
|
45
44
|
}
|
|
46
|
-
|
|
45
|
+
interface Media {
|
|
47
46
|
/** Primary media (image, video etc) associated with this product. */
|
|
48
47
|
mainMedia?: MediaItem;
|
|
49
48
|
/** Media (images, videos etc) associated with this product. */
|
|
50
49
|
items?: MediaItem[];
|
|
51
50
|
}
|
|
52
|
-
|
|
51
|
+
interface MediaItem extends MediaItemItemOneOf {
|
|
53
52
|
/** Image data (URL, size). */
|
|
54
53
|
image?: MediaItemUrlAndSize;
|
|
55
54
|
/** Video data (URL, size). */
|
|
@@ -64,13 +63,13 @@ export interface MediaItem extends MediaItemItemOneOf {
|
|
|
64
63
|
_id?: string;
|
|
65
64
|
}
|
|
66
65
|
/** @oneof */
|
|
67
|
-
|
|
66
|
+
interface MediaItemItemOneOf {
|
|
68
67
|
/** Image data (URL, size). */
|
|
69
68
|
image?: MediaItemUrlAndSize;
|
|
70
69
|
/** Video data (URL, size). */
|
|
71
70
|
video?: MediaItemVideo;
|
|
72
71
|
}
|
|
73
|
-
|
|
72
|
+
interface MediaItemUrlAndSize {
|
|
74
73
|
/**
|
|
75
74
|
* Media item URL.
|
|
76
75
|
* @format WEB_URL
|
|
@@ -85,7 +84,7 @@ export interface MediaItemUrlAndSize {
|
|
|
85
84
|
/** Alt text. This text will be shown in case the image is not available. */
|
|
86
85
|
altText?: string | null;
|
|
87
86
|
}
|
|
88
|
-
|
|
87
|
+
declare enum MediaItemType {
|
|
89
88
|
unspecified_media_item_type = "unspecified_media_item_type",
|
|
90
89
|
/** Image media type. */
|
|
91
90
|
image = "image",
|
|
@@ -99,8 +98,8 @@ export declare enum MediaItemType {
|
|
|
99
98
|
zip = "zip"
|
|
100
99
|
}
|
|
101
100
|
/** @enumType */
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
type MediaItemTypeWithLiterals = MediaItemType | 'unspecified_media_item_type' | 'image' | 'video' | 'audio' | 'document' | 'zip';
|
|
102
|
+
interface MediaItemVideo {
|
|
104
103
|
/** Data (URL, size) about each resolution for which this video is available. */
|
|
105
104
|
files?: MediaItemUrlAndSize[];
|
|
106
105
|
/** 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"`. */
|
|
@@ -111,13 +110,13 @@ export interface MediaItemVideo {
|
|
|
111
110
|
* The search engines use this information for ranking purposes, or to display snippets in the search results.
|
|
112
111
|
* 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.
|
|
113
112
|
*/
|
|
114
|
-
|
|
113
|
+
interface SeoSchema {
|
|
115
114
|
/** SEO tag information. */
|
|
116
115
|
tags?: Tag[];
|
|
117
116
|
/** SEO general settings. */
|
|
118
117
|
settings?: Settings;
|
|
119
118
|
}
|
|
120
|
-
|
|
119
|
+
interface Keyword {
|
|
121
120
|
/** Keyword value. */
|
|
122
121
|
term?: string;
|
|
123
122
|
/** Whether the keyword is the main focus keyword. */
|
|
@@ -128,7 +127,7 @@ export interface Keyword {
|
|
|
128
127
|
*/
|
|
129
128
|
origin?: string | null;
|
|
130
129
|
}
|
|
131
|
-
|
|
130
|
+
interface Tag {
|
|
132
131
|
/**
|
|
133
132
|
* SEO tag type.
|
|
134
133
|
*
|
|
@@ -150,7 +149,7 @@ export interface Tag {
|
|
|
150
149
|
/** Whether the tag is disabled. */
|
|
151
150
|
disabled?: boolean;
|
|
152
151
|
}
|
|
153
|
-
|
|
152
|
+
interface Settings {
|
|
154
153
|
/**
|
|
155
154
|
* Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.
|
|
156
155
|
*
|
|
@@ -164,10 +163,10 @@ export interface Settings {
|
|
|
164
163
|
*/
|
|
165
164
|
keywords?: Keyword[];
|
|
166
165
|
}
|
|
167
|
-
|
|
166
|
+
interface QueryCollectionsRequest {
|
|
168
167
|
query?: PlatformQuery;
|
|
169
168
|
}
|
|
170
|
-
|
|
169
|
+
interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
|
|
171
170
|
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
172
171
|
paging?: PlatformPaging;
|
|
173
172
|
/** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
|
|
@@ -178,13 +177,13 @@ export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
|
|
|
178
177
|
sort?: Sorting[];
|
|
179
178
|
}
|
|
180
179
|
/** @oneof */
|
|
181
|
-
|
|
180
|
+
interface PlatformQueryPagingMethodOneOf {
|
|
182
181
|
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
183
182
|
paging?: PlatformPaging;
|
|
184
183
|
/** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
|
|
185
184
|
cursorPaging?: CursorPaging;
|
|
186
185
|
}
|
|
187
|
-
|
|
186
|
+
interface Sorting {
|
|
188
187
|
/**
|
|
189
188
|
* Name of the field to sort by.
|
|
190
189
|
* @maxLength 512
|
|
@@ -193,13 +192,13 @@ export interface Sorting {
|
|
|
193
192
|
/** Sort order. */
|
|
194
193
|
order?: SortOrderWithLiterals;
|
|
195
194
|
}
|
|
196
|
-
|
|
195
|
+
declare enum SortOrder {
|
|
197
196
|
ASC = "ASC",
|
|
198
197
|
DESC = "DESC"
|
|
199
198
|
}
|
|
200
199
|
/** @enumType */
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
201
|
+
interface PlatformPaging {
|
|
203
202
|
/**
|
|
204
203
|
* Number of items to load.
|
|
205
204
|
* @max 100
|
|
@@ -208,7 +207,7 @@ export interface PlatformPaging {
|
|
|
208
207
|
/** Number of items to skip in the current sort order. */
|
|
209
208
|
offset?: number | null;
|
|
210
209
|
}
|
|
211
|
-
|
|
210
|
+
interface CursorPaging {
|
|
212
211
|
/**
|
|
213
212
|
* Maximum number of items to return in the results.
|
|
214
213
|
* @max 100
|
|
@@ -223,12 +222,12 @@ export interface CursorPaging {
|
|
|
223
222
|
*/
|
|
224
223
|
cursor?: string | null;
|
|
225
224
|
}
|
|
226
|
-
|
|
225
|
+
interface QueryCollectionsResponse {
|
|
227
226
|
/** @maxSize 100 */
|
|
228
227
|
collections?: Collection[];
|
|
229
228
|
metadata?: PlatformPagingMetadata;
|
|
230
229
|
}
|
|
231
|
-
|
|
230
|
+
interface PlatformPagingMetadata {
|
|
232
231
|
/** The number of items returned in this response. */
|
|
233
232
|
count?: number | null;
|
|
234
233
|
/** The offset which was requested. Returned if offset paging was used. */
|
|
@@ -238,7 +237,7 @@ export interface PlatformPagingMetadata {
|
|
|
238
237
|
/** Cursors to navigate through result pages. Returned if cursor paging was used. */
|
|
239
238
|
cursors?: Cursors;
|
|
240
239
|
}
|
|
241
|
-
|
|
240
|
+
interface Cursors {
|
|
242
241
|
/**
|
|
243
242
|
* Cursor string pointing to the next page in the list of results.
|
|
244
243
|
* @maxLength 16000
|
|
@@ -250,14 +249,14 @@ export interface Cursors {
|
|
|
250
249
|
*/
|
|
251
250
|
prev?: string | null;
|
|
252
251
|
}
|
|
253
|
-
|
|
252
|
+
interface GetCollectionRequest {
|
|
254
253
|
/** Requested collection ID. */
|
|
255
254
|
_id: string;
|
|
256
255
|
}
|
|
257
|
-
|
|
256
|
+
interface GetCollectionResponse {
|
|
258
257
|
collection?: Collection;
|
|
259
258
|
}
|
|
260
|
-
|
|
259
|
+
interface GetCollectionBySlugRequest {
|
|
261
260
|
/**
|
|
262
261
|
* Slug of the collection to retrieve.
|
|
263
262
|
* @minLength 1
|
|
@@ -265,18 +264,10 @@ export interface GetCollectionBySlugRequest {
|
|
|
265
264
|
*/
|
|
266
265
|
slug: string;
|
|
267
266
|
}
|
|
268
|
-
|
|
267
|
+
interface GetCollectionBySlugResponse {
|
|
269
268
|
/** The requested collection. */
|
|
270
269
|
collection?: Collection;
|
|
271
270
|
}
|
|
272
|
-
type CollectionNonNullablePaths = `media.mainMedia.image.url` | `media.mainMedia.image.width` | `media.mainMedia.image.height` | `media.mainMedia.video.files` | `media.mainMedia.video.stillFrameMediaId` | `media.mainMedia.mediaType` | `media.mainMedia.title` | `media.mainMedia._id` | `media.items` | `numberOfProducts`;
|
|
273
|
-
/**
|
|
274
|
-
* Retrieves a list of up to 100 collections, given the provided paging, sorting and filtering.
|
|
275
|
-
* See [Stores Pagination](https://dev.wix.com/api/rest/wix-stores/pagination) for more information.
|
|
276
|
-
* @public
|
|
277
|
-
* @fqn wix.catalog.api.v2.CollectionReadApi.QueryCollections
|
|
278
|
-
*/
|
|
279
|
-
export declare function queryCollections(): CollectionsQueryBuilder;
|
|
280
271
|
interface QueryOffsetResult {
|
|
281
272
|
currentPage: number | undefined;
|
|
282
273
|
totalPages: number | undefined;
|
|
@@ -286,13 +277,13 @@ interface QueryOffsetResult {
|
|
|
286
277
|
length: number;
|
|
287
278
|
pageSize: number;
|
|
288
279
|
}
|
|
289
|
-
|
|
280
|
+
interface CollectionsQueryResult extends QueryOffsetResult {
|
|
290
281
|
items: Collection[];
|
|
291
282
|
query: CollectionsQueryBuilder;
|
|
292
283
|
next: () => Promise<CollectionsQueryResult>;
|
|
293
284
|
prev: () => Promise<CollectionsQueryResult>;
|
|
294
285
|
}
|
|
295
|
-
|
|
286
|
+
interface CollectionsQueryBuilder {
|
|
296
287
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
297
288
|
* @param value - Value to compare against.
|
|
298
289
|
*/
|
|
@@ -337,22 +328,5 @@ export interface CollectionsQueryBuilder {
|
|
|
337
328
|
skip: (skip: number) => CollectionsQueryBuilder;
|
|
338
329
|
find: () => Promise<CollectionsQueryResult>;
|
|
339
330
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
* @param _id - Requested collection ID.
|
|
343
|
-
* @public
|
|
344
|
-
* @requiredField _id
|
|
345
|
-
* @fqn wix.catalog.api.v2.CollectionReadApi.GetCollection
|
|
346
|
-
*/
|
|
347
|
-
export declare function getCollection(_id: string): Promise<NonNullablePaths<Collection, CollectionNonNullablePaths>>;
|
|
348
|
-
/**
|
|
349
|
-
* Retrieves a collection with the provided slug.
|
|
350
|
-
* @param slug - Slug of the collection to retrieve.
|
|
351
|
-
* @public
|
|
352
|
-
* @requiredField slug
|
|
353
|
-
* @fqn wix.catalog.api.v2.CollectionReadApi.GetCollectionBySlug
|
|
354
|
-
*/
|
|
355
|
-
export declare function getCollectionBySlug(slug: string): Promise<NonNullablePaths<GetCollectionBySlugResponse, {
|
|
356
|
-
[P in CollectionNonNullablePaths]: `collection.${P}`;
|
|
357
|
-
}[CollectionNonNullablePaths]>>;
|
|
358
|
-
export {};
|
|
331
|
+
|
|
332
|
+
export { type CollectionsQueryBuilder as C, type GetCollectionBySlugResponse as G, type Keyword as K, MediaItemType as M, type PlatformQuery as P, type QueryCollectionsRequest as Q, SortOrder as S, type Tag as T, type Collection as a, type Media as b, type MediaItem as c, type MediaItemItemOneOf as d, type MediaItemUrlAndSize as e, type MediaItemVideo as f, type SeoSchema as g, type Settings as h, type PlatformQueryPagingMethodOneOf as i, type Sorting as j, type PlatformPaging as k, type CursorPaging as l, type QueryCollectionsResponse as m, type PlatformPagingMetadata as n, type Cursors as o, type GetCollectionRequest as p, type GetCollectionResponse as q, type GetCollectionBySlugRequest as r, type CollectionsQueryResult as s };
|