@wix/metro 1.0.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +24 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +24 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/src/metroinspector-v1-product.http.d.ts +10 -0
- package/build/cjs/src/metroinspector-v1-product.http.js +308 -0
- package/build/cjs/src/metroinspector-v1-product.http.js.map +1 -0
- package/build/cjs/src/metroinspector-v1-product.public.d.ts +13 -0
- package/build/cjs/src/metroinspector-v1-product.public.js +45 -0
- package/build/cjs/src/metroinspector-v1-product.public.js.map +1 -0
- package/build/cjs/src/metroinspector-v1-product.types.d.ts +286 -0
- package/build/cjs/src/metroinspector-v1-product.types.js +25 -0
- package/build/cjs/src/metroinspector-v1-product.types.js.map +1 -0
- package/build/cjs/src/metroinspector-v1-product.universal.d.ts +348 -0
- package/build/cjs/src/metroinspector-v1-product.universal.js +446 -0
- package/build/cjs/src/metroinspector-v1-product.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/src/metroinspector-v1-product.http.d.ts +10 -0
- package/build/es/src/metroinspector-v1-product.http.js +299 -0
- package/build/es/src/metroinspector-v1-product.http.js.map +1 -0
- package/build/es/src/metroinspector-v1-product.public.d.ts +13 -0
- package/build/es/src/metroinspector-v1-product.public.js +34 -0
- package/build/es/src/metroinspector-v1-product.public.js.map +1 -0
- package/build/es/src/metroinspector-v1-product.types.d.ts +286 -0
- package/build/es/src/metroinspector-v1-product.types.js +22 -0
- package/build/es/src/metroinspector-v1-product.types.js.map +1 -0
- package/build/es/src/metroinspector-v1-product.universal.d.ts +348 -0
- package/build/es/src/metroinspector-v1-product.universal.js +418 -0
- package/build/es/src/metroinspector-v1-product.universal.js.map +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.queryProducts = exports.getProductsStartWith = exports.getProduct = exports.updateProduct = exports.deleteProduct = exports.createProduct = exports.SortOrder = exports.SubdivisionType = exports.__debug = void 0;
|
|
32
|
+
const velo_1 = require("@wix/metro-runtime/velo");
|
|
33
|
+
const ambassadorWixMetroinspectorV1Product = __importStar(require("./metroinspector-v1-product.http"));
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
const motion_edm_autogen_query_wrapper_1 = require("@wix/motion-edm-autogen-query-wrapper");
|
|
36
|
+
let __verbose = false;
|
|
37
|
+
function __log(...args) {
|
|
38
|
+
__verbose && console.log(...args);
|
|
39
|
+
}
|
|
40
|
+
function __inspect(obj) {
|
|
41
|
+
return obj;
|
|
42
|
+
}
|
|
43
|
+
exports.__debug = {
|
|
44
|
+
verboseLogging: {
|
|
45
|
+
on: () => (__verbose = true),
|
|
46
|
+
off: () => (__verbose = false),
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
const _toVeloEntity = {
|
|
50
|
+
_id: '$.id',
|
|
51
|
+
name: '$.title',
|
|
52
|
+
collectionId: '$.collectionId',
|
|
53
|
+
_createdDate: '$.createdDate',
|
|
54
|
+
modifiedDate: '$.modifiedDate',
|
|
55
|
+
image: '$.image',
|
|
56
|
+
address: '$.address',
|
|
57
|
+
document: '$.document',
|
|
58
|
+
video: '$.video',
|
|
59
|
+
pageLink: '$.pageLink',
|
|
60
|
+
audio: '$.audio',
|
|
61
|
+
color: '$.color',
|
|
62
|
+
localDate: '$.localDate',
|
|
63
|
+
localTime: '$.localTime',
|
|
64
|
+
localDateTime: '$.localDateTime',
|
|
65
|
+
variants: '$.variants',
|
|
66
|
+
mainVariant: '$.mainVariant',
|
|
67
|
+
customAddress: '$.customAddress',
|
|
68
|
+
guid: '$.guid',
|
|
69
|
+
};
|
|
70
|
+
const _fromVeloEntity = {
|
|
71
|
+
id: '$._id',
|
|
72
|
+
title: '$.name',
|
|
73
|
+
collectionId: '$.collectionId',
|
|
74
|
+
createdDate: '$._createdDate',
|
|
75
|
+
modifiedDate: '$.modifiedDate',
|
|
76
|
+
image: '$.image',
|
|
77
|
+
address: '$.address',
|
|
78
|
+
document: '$.document',
|
|
79
|
+
video: '$.video',
|
|
80
|
+
pageLink: '$.pageLink',
|
|
81
|
+
audio: '$.audio',
|
|
82
|
+
color: '$.color',
|
|
83
|
+
localDate: '$.localDate',
|
|
84
|
+
localTime: '$.localTime',
|
|
85
|
+
localDateTime: '$.localDateTime',
|
|
86
|
+
variants: '$.variants',
|
|
87
|
+
mainVariant: '$.mainVariant',
|
|
88
|
+
customAddress: '$.customAddress',
|
|
89
|
+
guid: '$.guid',
|
|
90
|
+
};
|
|
91
|
+
var SubdivisionType;
|
|
92
|
+
(function (SubdivisionType) {
|
|
93
|
+
SubdivisionType["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
|
|
94
|
+
/** State */
|
|
95
|
+
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
|
|
96
|
+
/** County */
|
|
97
|
+
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
|
|
98
|
+
/** City/town */
|
|
99
|
+
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
|
|
100
|
+
/** Neighborhood/quarter */
|
|
101
|
+
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
|
|
102
|
+
/** Street/block */
|
|
103
|
+
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
|
|
104
|
+
/** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
|
|
105
|
+
SubdivisionType["COUNTRY"] = "COUNTRY";
|
|
106
|
+
})(SubdivisionType = exports.SubdivisionType || (exports.SubdivisionType = {}));
|
|
107
|
+
var SortOrder;
|
|
108
|
+
(function (SortOrder) {
|
|
109
|
+
SortOrder["ASC"] = "ASC";
|
|
110
|
+
SortOrder["DESC"] = "DESC";
|
|
111
|
+
})(SortOrder = exports.SortOrder || (exports.SortOrder = {}));
|
|
112
|
+
const _createProductRequest = { product: '_product' };
|
|
113
|
+
const _createProductResponse = { product: '_product' };
|
|
114
|
+
const _deleteProductRequest = {};
|
|
115
|
+
const _deleteProductResponse = {};
|
|
116
|
+
const _getProductRequest = {};
|
|
117
|
+
const _getProductResponse = { product: '_product' };
|
|
118
|
+
const _getProductsStartWithRequest = {};
|
|
119
|
+
const _getProductsStartWithResponse = { products: '_product' };
|
|
120
|
+
const _product = {
|
|
121
|
+
image: 'wix.common.Image',
|
|
122
|
+
address: 'wix.common.Address',
|
|
123
|
+
document: 'wix.common.Document',
|
|
124
|
+
video: 'wix.common.VideoV2',
|
|
125
|
+
audio: 'wix.common.Audio',
|
|
126
|
+
customAddress: 'wix.common.Address',
|
|
127
|
+
variants: '_variant',
|
|
128
|
+
mainVariant: '_variant',
|
|
129
|
+
};
|
|
130
|
+
const _queryProductsRequest = {};
|
|
131
|
+
const _queryProductsResponse = { products: '_product' };
|
|
132
|
+
const _updateProductRequest = { product: '_product' };
|
|
133
|
+
const _updateProductResponse = { product: '_product' };
|
|
134
|
+
const _variant = { image: 'wix.common.Image' };
|
|
135
|
+
/**
|
|
136
|
+
* Creating a product
|
|
137
|
+
* @public
|
|
138
|
+
* @documentationMaturity preview
|
|
139
|
+
* @requiredField options.product.title
|
|
140
|
+
*/
|
|
141
|
+
function createProduct(options) {
|
|
142
|
+
var _a, _b, _c;
|
|
143
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
144
|
+
const requestTransformation = { product: '$[0].product' };
|
|
145
|
+
const responseTransformation = '$.product';
|
|
146
|
+
// @ts-ignore
|
|
147
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
148
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
149
|
+
rootSchema: _createProductRequest,
|
|
150
|
+
depSchemas: { _product, _variant },
|
|
151
|
+
fqdnTransformation: {
|
|
152
|
+
paths: [...['product']],
|
|
153
|
+
transformation: _fromVeloEntity,
|
|
154
|
+
},
|
|
155
|
+
customTransformation: requestTransformation,
|
|
156
|
+
});
|
|
157
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
158
|
+
rootSchema: _createProductResponse,
|
|
159
|
+
depSchemas: { _product, _variant },
|
|
160
|
+
fqdnTransformation: {
|
|
161
|
+
paths: [...['product']],
|
|
162
|
+
transformation: _toVeloEntity,
|
|
163
|
+
},
|
|
164
|
+
customTransformation: responseTransformation,
|
|
165
|
+
});
|
|
166
|
+
const payload = toAmbassadorRequest([options]);
|
|
167
|
+
const reqOpts = ambassadorWixMetroinspectorV1Product.createProduct(payload);
|
|
168
|
+
__log(`"CreateProduct" sending request with: ${__inspect(reqOpts)}`);
|
|
169
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
170
|
+
try {
|
|
171
|
+
const result = yield httpClient.request(reqOpts);
|
|
172
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
173
|
+
return fromJSON(result.data);
|
|
174
|
+
}
|
|
175
|
+
catch (err) {
|
|
176
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
177
|
+
'options',
|
|
178
|
+
]);
|
|
179
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
180
|
+
throw transformedError;
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
exports.createProduct = createProduct;
|
|
185
|
+
/** @public
|
|
186
|
+
* @documentationMaturity preview
|
|
187
|
+
* @requiredField productId
|
|
188
|
+
*/
|
|
189
|
+
function deleteProduct(productId) {
|
|
190
|
+
var _a, _b, _c;
|
|
191
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
192
|
+
const requestTransformation = { productId: '$[0]' };
|
|
193
|
+
const responseTransformation = '$';
|
|
194
|
+
// @ts-ignore
|
|
195
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
196
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
197
|
+
rootSchema: _deleteProductRequest,
|
|
198
|
+
depSchemas: {},
|
|
199
|
+
fqdnTransformation: {
|
|
200
|
+
paths: [],
|
|
201
|
+
transformation: _fromVeloEntity,
|
|
202
|
+
},
|
|
203
|
+
customTransformation: requestTransformation,
|
|
204
|
+
});
|
|
205
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
206
|
+
rootSchema: _deleteProductResponse,
|
|
207
|
+
depSchemas: {},
|
|
208
|
+
fqdnTransformation: {
|
|
209
|
+
paths: [],
|
|
210
|
+
transformation: _toVeloEntity,
|
|
211
|
+
},
|
|
212
|
+
customTransformation: responseTransformation,
|
|
213
|
+
});
|
|
214
|
+
const payload = toAmbassadorRequest([productId]);
|
|
215
|
+
const reqOpts = ambassadorWixMetroinspectorV1Product.deleteProduct(payload);
|
|
216
|
+
__log(`"DeleteProduct" sending request with: ${__inspect(reqOpts)}`);
|
|
217
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
218
|
+
try {
|
|
219
|
+
const result = yield httpClient.request(reqOpts);
|
|
220
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
221
|
+
return fromJSON(result.data);
|
|
222
|
+
}
|
|
223
|
+
catch (err) {
|
|
224
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
225
|
+
'productId',
|
|
226
|
+
]);
|
|
227
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
228
|
+
throw transformedError;
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
exports.deleteProduct = deleteProduct;
|
|
233
|
+
/** @public
|
|
234
|
+
* @documentationMaturity preview
|
|
235
|
+
* @requiredField options.product._id
|
|
236
|
+
* @requiredField productId
|
|
237
|
+
*/
|
|
238
|
+
function updateProduct(productId, options) {
|
|
239
|
+
var _a, _b, _c;
|
|
240
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
241
|
+
const requestTransformation = {
|
|
242
|
+
productId: '$[0]',
|
|
243
|
+
product: '$[1].product',
|
|
244
|
+
mask: '$[1].mask',
|
|
245
|
+
};
|
|
246
|
+
const responseTransformation = '$.product';
|
|
247
|
+
// @ts-ignore
|
|
248
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
249
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
250
|
+
rootSchema: _updateProductRequest,
|
|
251
|
+
depSchemas: { _product, _variant },
|
|
252
|
+
fqdnTransformation: {
|
|
253
|
+
paths: [...['product']],
|
|
254
|
+
transformation: _fromVeloEntity,
|
|
255
|
+
},
|
|
256
|
+
customTransformation: requestTransformation,
|
|
257
|
+
});
|
|
258
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
259
|
+
rootSchema: _updateProductResponse,
|
|
260
|
+
depSchemas: { _product, _variant },
|
|
261
|
+
fqdnTransformation: {
|
|
262
|
+
paths: [...['product']],
|
|
263
|
+
transformation: _toVeloEntity,
|
|
264
|
+
},
|
|
265
|
+
customTransformation: responseTransformation,
|
|
266
|
+
});
|
|
267
|
+
const payload = toAmbassadorRequest([productId, options]);
|
|
268
|
+
const reqOpts = ambassadorWixMetroinspectorV1Product.updateProduct(payload);
|
|
269
|
+
__log(`"UpdateProduct" sending request with: ${__inspect(reqOpts)}`);
|
|
270
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
271
|
+
try {
|
|
272
|
+
const result = yield httpClient.request(reqOpts);
|
|
273
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
274
|
+
return fromJSON(result.data);
|
|
275
|
+
}
|
|
276
|
+
catch (err) {
|
|
277
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
278
|
+
'productId',
|
|
279
|
+
'options',
|
|
280
|
+
]);
|
|
281
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
282
|
+
throw transformedError;
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
exports.updateProduct = updateProduct;
|
|
287
|
+
/**
|
|
288
|
+
* override description
|
|
289
|
+
* @public
|
|
290
|
+
* @documentationMaturity preview
|
|
291
|
+
* @requiredField productId
|
|
292
|
+
* @param arg1 - ## new override param 1
|
|
293
|
+
* @returns ## override return
|
|
294
|
+
*/
|
|
295
|
+
function getProduct(productId) {
|
|
296
|
+
var _a, _b, _c;
|
|
297
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
298
|
+
const requestTransformation = { productId: '$[0]' };
|
|
299
|
+
const responseTransformation = '$.product';
|
|
300
|
+
// @ts-ignore
|
|
301
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
302
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
303
|
+
rootSchema: _getProductRequest,
|
|
304
|
+
depSchemas: {},
|
|
305
|
+
fqdnTransformation: {
|
|
306
|
+
paths: [],
|
|
307
|
+
transformation: _fromVeloEntity,
|
|
308
|
+
},
|
|
309
|
+
customTransformation: requestTransformation,
|
|
310
|
+
});
|
|
311
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
312
|
+
rootSchema: _getProductResponse,
|
|
313
|
+
depSchemas: { _product, _variant },
|
|
314
|
+
fqdnTransformation: {
|
|
315
|
+
paths: [...['product']],
|
|
316
|
+
transformation: _toVeloEntity,
|
|
317
|
+
},
|
|
318
|
+
customTransformation: responseTransformation,
|
|
319
|
+
});
|
|
320
|
+
const payload = toAmbassadorRequest([productId]);
|
|
321
|
+
const reqOpts = ambassadorWixMetroinspectorV1Product.getProduct(payload);
|
|
322
|
+
__log(`"GetProduct" sending request with: ${__inspect(reqOpts)}`);
|
|
323
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
324
|
+
try {
|
|
325
|
+
const result = yield httpClient.request(reqOpts);
|
|
326
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
327
|
+
return fromJSON(result.data);
|
|
328
|
+
}
|
|
329
|
+
catch (err) {
|
|
330
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
331
|
+
'productId',
|
|
332
|
+
]);
|
|
333
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
334
|
+
throw transformedError;
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
exports.getProduct = getProduct;
|
|
339
|
+
/** @public
|
|
340
|
+
* @documentationMaturity preview
|
|
341
|
+
* @requiredField title
|
|
342
|
+
*/
|
|
343
|
+
function getProductsStartWith(title, options) {
|
|
344
|
+
var _a, _b, _c;
|
|
345
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
346
|
+
const requestTransformation = {
|
|
347
|
+
title: '$[0]',
|
|
348
|
+
addressLine2: '$[1].addressLine2',
|
|
349
|
+
};
|
|
350
|
+
const responseTransformation = '$';
|
|
351
|
+
// @ts-ignore
|
|
352
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
353
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
354
|
+
rootSchema: _getProductsStartWithRequest,
|
|
355
|
+
depSchemas: {},
|
|
356
|
+
fqdnTransformation: {
|
|
357
|
+
paths: [],
|
|
358
|
+
transformation: _fromVeloEntity,
|
|
359
|
+
},
|
|
360
|
+
customTransformation: requestTransformation,
|
|
361
|
+
});
|
|
362
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
363
|
+
rootSchema: _getProductsStartWithResponse,
|
|
364
|
+
depSchemas: { _product, _variant },
|
|
365
|
+
fqdnTransformation: {
|
|
366
|
+
paths: [...['Array#products']],
|
|
367
|
+
transformation: _toVeloEntity,
|
|
368
|
+
},
|
|
369
|
+
customTransformation: responseTransformation,
|
|
370
|
+
});
|
|
371
|
+
const payload = toAmbassadorRequest([title, options]);
|
|
372
|
+
const reqOpts = ambassadorWixMetroinspectorV1Product.getProductsStartWith(payload);
|
|
373
|
+
__log(`"GetProductsStartWith" sending request with: ${__inspect(reqOpts)}`);
|
|
374
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
375
|
+
try {
|
|
376
|
+
const result = yield httpClient.request(reqOpts);
|
|
377
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
378
|
+
return fromJSON(result.data);
|
|
379
|
+
}
|
|
380
|
+
catch (err) {
|
|
381
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
382
|
+
'title',
|
|
383
|
+
'options',
|
|
384
|
+
]);
|
|
385
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
386
|
+
throw transformedError;
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
exports.getProductsStartWith = getProductsStartWith;
|
|
391
|
+
/** @public
|
|
392
|
+
* @documentationMaturity preview
|
|
393
|
+
*/
|
|
394
|
+
function queryProducts(options) {
|
|
395
|
+
const requestTransformation = { '*': '$[1]', query: '$[0]' };
|
|
396
|
+
const responseTransformation = {
|
|
397
|
+
items: '$.products',
|
|
398
|
+
pagingMetadata: '$.metadata',
|
|
399
|
+
};
|
|
400
|
+
// @ts-ignore
|
|
401
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
402
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
403
|
+
rootSchema: _queryProductsRequest,
|
|
404
|
+
depSchemas: {},
|
|
405
|
+
fqdnTransformation: {
|
|
406
|
+
paths: [],
|
|
407
|
+
transformation: _fromVeloEntity,
|
|
408
|
+
},
|
|
409
|
+
customTransformation: requestTransformation,
|
|
410
|
+
});
|
|
411
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
412
|
+
rootSchema: _queryProductsResponse,
|
|
413
|
+
depSchemas: { _product, _variant },
|
|
414
|
+
fqdnTransformation: {
|
|
415
|
+
paths: [...['Array#products']],
|
|
416
|
+
transformation: _toVeloEntity,
|
|
417
|
+
},
|
|
418
|
+
customTransformation: responseTransformation,
|
|
419
|
+
});
|
|
420
|
+
return (0, motion_edm_autogen_query_wrapper_1.wrapWithQueryBuilder)({
|
|
421
|
+
func: (payload) => __awaiter(this, void 0, void 0, function* () {
|
|
422
|
+
var _a, _b, _c;
|
|
423
|
+
const reqOpts = ambassadorWixMetroinspectorV1Product.queryProducts(Object.assign(Object.assign({}, payload), (options !== null && options !== void 0 ? options : {})));
|
|
424
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
425
|
+
try {
|
|
426
|
+
const result = yield httpClient.request(reqOpts);
|
|
427
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
428
|
+
return result;
|
|
429
|
+
}
|
|
430
|
+
catch (err) {
|
|
431
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
432
|
+
throw err;
|
|
433
|
+
}
|
|
434
|
+
}),
|
|
435
|
+
requestTransformer: (...args) => toAmbassadorRequest(args),
|
|
436
|
+
responseTransformer: ({ data }) => fromJSON(data),
|
|
437
|
+
errorTransformer: (err) => {
|
|
438
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation);
|
|
439
|
+
throw transformedError;
|
|
440
|
+
},
|
|
441
|
+
pagingMethod: 'CURSOR',
|
|
442
|
+
transformationPaths: (0, velo_1.resolveQueryFieldsTransformationPaths)(_toVeloEntity),
|
|
443
|
+
})({ cursorWithEmptyFilterAndSort: true });
|
|
444
|
+
}
|
|
445
|
+
exports.queryProducts = queryProducts;
|
|
446
|
+
//# sourceMappingURL=metroinspector-v1-product.universal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metroinspector-v1-product.universal.js","sourceRoot":"","sources":["../../../src/metroinspector-v1-product.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAIiC;AAEjC,uGAAyF;AACzF,aAAa;AACb,4FAA6E;AAE7E,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,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AAgB,GAAG,IAAA,qBAAc,EAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;YAEpE,MAAM,gBAAgB,CAAC;QACzB,CAAC;QACD,YAAY,EAAE,QAAQ;QACtB,mBAAmB,EAAE,IAAA,4CAAqC,EAAC,aAAa,CAAC;KAC1E,CAAC,CAAC,EAAE,4BAA4B,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7C,CAAC;AA9DD,sCA8DC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as products from './src/metroinspector-v1-product.public';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,wCAAwC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as products from './src/metroinspector-v1-product.universal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,2CAA2C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
import { CreateProductRequest, CreateProductResponse, DeleteProductRequest, DeleteProductResponse, GetProductRequest, GetProductResponse, GetProductsStartWithRequest, GetProductsStartWithResponse, QueryProductsRequest, QueryProductsResponse, UpdateProductRequest, UpdateProductResponse } from './metroinspector-v1-product.types';
|
|
3
|
+
/** Creating a product */
|
|
4
|
+
export declare function createProduct(payload: CreateProductRequest): RequestOptionsFactory<CreateProductResponse>;
|
|
5
|
+
export declare function deleteProduct(payload: DeleteProductRequest): RequestOptionsFactory<DeleteProductResponse>;
|
|
6
|
+
export declare function updateProduct(payload: UpdateProductRequest): RequestOptionsFactory<UpdateProductResponse>;
|
|
7
|
+
/** override description */
|
|
8
|
+
export declare function getProduct(payload: GetProductRequest): RequestOptionsFactory<GetProductResponse>;
|
|
9
|
+
export declare function getProductsStartWith(payload: GetProductsStartWithRequest): RequestOptionsFactory<GetProductsStartWithResponse>;
|
|
10
|
+
export declare function queryProducts(payload: QueryProductsRequest): RequestOptionsFactory<QueryProductsResponse>;
|