@wix/motion 1.0.0

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 (79) hide show
  1. package/build/cjs/index.d.ts +3 -0
  2. package/build/cjs/index.js +26 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/src/alarm-v1-alarm.http.d.ts +4 -0
  5. package/build/cjs/src/alarm-v1-alarm.http.js +75 -0
  6. package/build/cjs/src/alarm-v1-alarm.http.js.map +1 -0
  7. package/build/cjs/src/alarm-v1-alarm.public.d.ts +4 -0
  8. package/build/cjs/src/alarm-v1-alarm.public.js +11 -0
  9. package/build/cjs/src/alarm-v1-alarm.public.js.map +1 -0
  10. package/build/cjs/src/alarm-v1-alarm.types.d.ts +14 -0
  11. package/build/cjs/src/alarm-v1-alarm.types.js +3 -0
  12. package/build/cjs/src/alarm-v1-alarm.types.js.map +1 -0
  13. package/build/cjs/src/alarm-v1-alarm.universal.d.ts +29 -0
  14. package/build/cjs/src/alarm-v1-alarm.universal.js +100 -0
  15. package/build/cjs/src/alarm-v1-alarm.universal.js.map +1 -0
  16. package/build/cjs/src/metroinspector-v1-echo.http.d.ts +4 -0
  17. package/build/cjs/src/metroinspector-v1-echo.http.js +75 -0
  18. package/build/cjs/src/metroinspector-v1-echo.http.js.map +1 -0
  19. package/build/cjs/src/metroinspector-v1-echo.public.d.ts +4 -0
  20. package/build/cjs/src/metroinspector-v1-echo.public.js +11 -0
  21. package/build/cjs/src/metroinspector-v1-echo.public.js.map +1 -0
  22. package/build/cjs/src/metroinspector-v1-echo.types.d.ts +31 -0
  23. package/build/cjs/src/metroinspector-v1-echo.types.js +3 -0
  24. package/build/cjs/src/metroinspector-v1-echo.types.js.map +1 -0
  25. package/build/cjs/src/metroinspector-v1-echo.universal.d.ts +51 -0
  26. package/build/cjs/src/metroinspector-v1-echo.universal.js +106 -0
  27. package/build/cjs/src/metroinspector-v1-echo.universal.js.map +1 -0
  28. package/build/cjs/src/metroinspector-v1-product.http.d.ts +8 -0
  29. package/build/cjs/src/metroinspector-v1-product.http.js +257 -0
  30. package/build/cjs/src/metroinspector-v1-product.http.js.map +1 -0
  31. package/build/cjs/src/metroinspector-v1-product.public.d.ts +9 -0
  32. package/build/cjs/src/metroinspector-v1-product.public.js +38 -0
  33. package/build/cjs/src/metroinspector-v1-product.public.js.map +1 -0
  34. package/build/cjs/src/metroinspector-v1-product.types.d.ts +280 -0
  35. package/build/cjs/src/metroinspector-v1-product.types.js +25 -0
  36. package/build/cjs/src/metroinspector-v1-product.types.js.map +1 -0
  37. package/build/cjs/src/metroinspector-v1-product.universal.d.ts +296 -0
  38. package/build/cjs/src/metroinspector-v1-product.universal.js +352 -0
  39. package/build/cjs/src/metroinspector-v1-product.universal.js.map +1 -0
  40. package/build/es/index.d.ts +3 -0
  41. package/build/es/index.js +4 -0
  42. package/build/es/index.js.map +1 -0
  43. package/build/es/src/alarm-v1-alarm.http.d.ts +4 -0
  44. package/build/es/src/alarm-v1-alarm.http.js +71 -0
  45. package/build/es/src/alarm-v1-alarm.http.js.map +1 -0
  46. package/build/es/src/alarm-v1-alarm.public.d.ts +4 -0
  47. package/build/es/src/alarm-v1-alarm.public.js +7 -0
  48. package/build/es/src/alarm-v1-alarm.public.js.map +1 -0
  49. package/build/es/src/alarm-v1-alarm.types.d.ts +14 -0
  50. package/build/es/src/alarm-v1-alarm.types.js +2 -0
  51. package/build/es/src/alarm-v1-alarm.types.js.map +1 -0
  52. package/build/es/src/alarm-v1-alarm.universal.d.ts +29 -0
  53. package/build/es/src/alarm-v1-alarm.universal.js +77 -0
  54. package/build/es/src/alarm-v1-alarm.universal.js.map +1 -0
  55. package/build/es/src/metroinspector-v1-echo.http.d.ts +4 -0
  56. package/build/es/src/metroinspector-v1-echo.http.js +71 -0
  57. package/build/es/src/metroinspector-v1-echo.http.js.map +1 -0
  58. package/build/es/src/metroinspector-v1-echo.public.d.ts +4 -0
  59. package/build/es/src/metroinspector-v1-echo.public.js +7 -0
  60. package/build/es/src/metroinspector-v1-echo.public.js.map +1 -0
  61. package/build/es/src/metroinspector-v1-echo.types.d.ts +31 -0
  62. package/build/es/src/metroinspector-v1-echo.types.js +2 -0
  63. package/build/es/src/metroinspector-v1-echo.types.js.map +1 -0
  64. package/build/es/src/metroinspector-v1-echo.universal.d.ts +51 -0
  65. package/build/es/src/metroinspector-v1-echo.universal.js +83 -0
  66. package/build/es/src/metroinspector-v1-echo.universal.js.map +1 -0
  67. package/build/es/src/metroinspector-v1-product.http.d.ts +8 -0
  68. package/build/es/src/metroinspector-v1-product.http.js +249 -0
  69. package/build/es/src/metroinspector-v1-product.http.js.map +1 -0
  70. package/build/es/src/metroinspector-v1-product.public.d.ts +9 -0
  71. package/build/es/src/metroinspector-v1-product.public.js +28 -0
  72. package/build/es/src/metroinspector-v1-product.public.js.map +1 -0
  73. package/build/es/src/metroinspector-v1-product.types.d.ts +280 -0
  74. package/build/es/src/metroinspector-v1-product.types.js +22 -0
  75. package/build/es/src/metroinspector-v1-product.types.js.map +1 -0
  76. package/build/es/src/metroinspector-v1-product.universal.d.ts +296 -0
  77. package/build/es/src/metroinspector-v1-product.universal.js +325 -0
  78. package/build/es/src/metroinspector-v1-product.universal.js.map +1 -0
  79. package/package.json +37 -0
@@ -0,0 +1,257 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.queryProducts = exports.getProduct = exports.updateProduct = exports.deleteProduct = exports.createProduct = void 0;
4
+ const metro_runtime_1 = require("@wix/metro-runtime");
5
+ const ambassador_1 = require("@wix/metro-runtime/ambassador");
6
+ const metro_runtime_2 = require("@wix/metro-runtime");
7
+ const _address = { geocode: '_addressLocation' };
8
+ const _addressLocation = {
9
+ latitude: 'google.protobuf.DoubleValue',
10
+ longitude: 'google.protobuf.DoubleValue',
11
+ };
12
+ const _audio = { urlExpirationDate: 'google.protobuf.Timestamp' };
13
+ const _createProductRequest = { product: '_product' };
14
+ const _createProductResponse = { product: '_product' };
15
+ const _deleteProductRequest = {};
16
+ const _deleteProductResponse = {};
17
+ const _document = { urlExpirationDate: 'google.protobuf.Timestamp' };
18
+ const _getProductRequest = {};
19
+ const _getProductResponse = { product: '_product' };
20
+ const _image = { urlExpirationDate: 'google.protobuf.Timestamp' };
21
+ const _product = {
22
+ createdDate: 'google.protobuf.Timestamp',
23
+ modifiedDate: 'google.protobuf.Timestamp',
24
+ image: '_image',
25
+ address: '_address',
26
+ document: '_document',
27
+ video: '_videoV2',
28
+ audio: '_audio',
29
+ variants: '_variant',
30
+ mainVariant: '_variant',
31
+ };
32
+ const _queryProductsRequest = {};
33
+ const _queryProductsResponse = { products: '_product' };
34
+ const _updateProductRequest = { product: '_product' };
35
+ const _updateProductResponse = { product: '_product' };
36
+ const _variant = { image: '_image' };
37
+ const _videoResolution = {
38
+ urlExpirationDate: 'google.protobuf.Timestamp',
39
+ poster: '_image',
40
+ };
41
+ const _videoV2 = {
42
+ urlExpirationDate: 'google.protobuf.Timestamp',
43
+ resolutions: '_videoResolution',
44
+ posters: '_image',
45
+ };
46
+ function resolveWixCoreservicesMetroinspectorV1ProductsProductsServiceUrl(opts) {
47
+ const domainToMappings = {
48
+ 'apps._base_domain_': [
49
+ {
50
+ srcPath: '/_api/metro-inspector',
51
+ destPath: '/api',
52
+ },
53
+ ],
54
+ 'api._api_base_domain_': [
55
+ {
56
+ srcPath: '/metro-inspector',
57
+ destPath: '',
58
+ },
59
+ ],
60
+ _: [
61
+ {
62
+ srcPath: '/metro-inspector',
63
+ destPath: '/api',
64
+ },
65
+ {
66
+ srcPath: '/_api/metro-inspector',
67
+ destPath: '/api',
68
+ },
69
+ ],
70
+ 'www._base_domain_': [
71
+ {
72
+ srcPath: '/metro-inspector',
73
+ destPath: '/api',
74
+ },
75
+ ],
76
+ 'manage._base_domain_': [
77
+ {
78
+ srcPath: '/metro-inspector',
79
+ destPath: '',
80
+ },
81
+ ],
82
+ 'www.wixgateway.com': [
83
+ {
84
+ srcPath: '/_api/metro-inspector',
85
+ destPath: '/api',
86
+ },
87
+ ],
88
+ };
89
+ return metro_runtime_2.resolveUrl(Object.assign(opts, { domainToMappings }));
90
+ }
91
+ /** Creating a product */
92
+ function createProduct(payload) {
93
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_createProductRequest, {
94
+ _address,
95
+ _addressLocation,
96
+ _audio,
97
+ _document,
98
+ _image,
99
+ _product,
100
+ _variant,
101
+ _videoResolution,
102
+ _videoV2,
103
+ });
104
+ const { fromJSON: fromRes } = ambassador_1.serializer(_createProductResponse, {
105
+ _address,
106
+ _addressLocation,
107
+ _audio,
108
+ _document,
109
+ _image,
110
+ _product,
111
+ _variant,
112
+ _videoResolution,
113
+ _videoV2,
114
+ });
115
+ function __createProduct({ host }) {
116
+ const serializedData = toReq(payload);
117
+ const metadata = {
118
+ method: 'POST',
119
+ url: resolveWixCoreservicesMetroinspectorV1ProductsProductsServiceUrl({
120
+ protoPath: '/api/v1/products',
121
+ data: serializedData,
122
+ host,
123
+ }),
124
+ data: serializedData,
125
+ transformResponse: fromRes,
126
+ };
127
+ return metadata;
128
+ }
129
+ __createProduct.fromReq = fromReq;
130
+ return __createProduct;
131
+ }
132
+ exports.createProduct = createProduct;
133
+ function deleteProduct(payload) {
134
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_deleteProductRequest, {});
135
+ const { fromJSON: fromRes } = ambassador_1.serializer(_deleteProductResponse, {});
136
+ function __deleteProduct({ host }) {
137
+ const serializedData = toReq(payload);
138
+ const metadata = {
139
+ method: 'DELETE',
140
+ url: resolveWixCoreservicesMetroinspectorV1ProductsProductsServiceUrl({
141
+ protoPath: '/api/v1/products/{productId}',
142
+ data: serializedData,
143
+ host,
144
+ }),
145
+ params: metro_runtime_1.toURLSearchParams(serializedData),
146
+ transformResponse: fromRes,
147
+ };
148
+ return metadata;
149
+ }
150
+ __deleteProduct.fromReq = fromReq;
151
+ return __deleteProduct;
152
+ }
153
+ exports.deleteProduct = deleteProduct;
154
+ function updateProduct(payload) {
155
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_updateProductRequest, {
156
+ _address,
157
+ _addressLocation,
158
+ _audio,
159
+ _document,
160
+ _image,
161
+ _product,
162
+ _variant,
163
+ _videoResolution,
164
+ _videoV2,
165
+ });
166
+ const { fromJSON: fromRes } = ambassador_1.serializer(_updateProductResponse, {
167
+ _address,
168
+ _addressLocation,
169
+ _audio,
170
+ _document,
171
+ _image,
172
+ _product,
173
+ _variant,
174
+ _videoResolution,
175
+ _videoV2,
176
+ });
177
+ function __updateProduct({ host }) {
178
+ const serializedData = toReq(payload);
179
+ const metadata = {
180
+ method: 'PUT',
181
+ url: resolveWixCoreservicesMetroinspectorV1ProductsProductsServiceUrl({
182
+ protoPath: '/api/v1/products/{productId}',
183
+ data: serializedData,
184
+ host,
185
+ }),
186
+ data: serializedData,
187
+ transformResponse: fromRes,
188
+ };
189
+ return metadata;
190
+ }
191
+ __updateProduct.fromReq = fromReq;
192
+ return __updateProduct;
193
+ }
194
+ exports.updateProduct = updateProduct;
195
+ function getProduct(payload) {
196
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_getProductRequest, {});
197
+ const { fromJSON: fromRes } = ambassador_1.serializer(_getProductResponse, {
198
+ _address,
199
+ _addressLocation,
200
+ _audio,
201
+ _document,
202
+ _image,
203
+ _product,
204
+ _variant,
205
+ _videoResolution,
206
+ _videoV2,
207
+ });
208
+ function __getProduct({ host }) {
209
+ const serializedData = toReq(payload);
210
+ const metadata = {
211
+ method: 'GET',
212
+ url: resolveWixCoreservicesMetroinspectorV1ProductsProductsServiceUrl({
213
+ protoPath: '/api/v1/products/{productId}',
214
+ data: serializedData,
215
+ host,
216
+ }),
217
+ params: metro_runtime_1.toURLSearchParams(serializedData),
218
+ transformResponse: fromRes,
219
+ };
220
+ return metadata;
221
+ }
222
+ __getProduct.fromReq = fromReq;
223
+ return __getProduct;
224
+ }
225
+ exports.getProduct = getProduct;
226
+ function queryProducts(payload) {
227
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_queryProductsRequest, {});
228
+ const { fromJSON: fromRes } = ambassador_1.serializer(_queryProductsResponse, {
229
+ _address,
230
+ _addressLocation,
231
+ _audio,
232
+ _document,
233
+ _image,
234
+ _product,
235
+ _variant,
236
+ _videoResolution,
237
+ _videoV2,
238
+ });
239
+ function __queryProducts({ host }) {
240
+ const serializedData = toReq(payload);
241
+ const metadata = {
242
+ method: 'POST',
243
+ url: resolveWixCoreservicesMetroinspectorV1ProductsProductsServiceUrl({
244
+ protoPath: '/api/v1/query-products',
245
+ data: serializedData,
246
+ host,
247
+ }),
248
+ data: serializedData,
249
+ transformResponse: fromRes,
250
+ };
251
+ return metadata;
252
+ }
253
+ __queryProducts.fromReq = fromReq;
254
+ return __queryProducts;
255
+ }
256
+ exports.queryProducts = queryProducts;
257
+ //# sourceMappingURL=metroinspector-v1-product.http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metroinspector-v1-product.http.js","sourceRoot":"","sources":["../../../src/metroinspector-v1-product.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;AAgBhD,MAAM,QAAQ,GAAG,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AACjD,MAAM,gBAAgB,GAAG;IACvB,QAAQ,EAAE,6BAA6B;IACvC,SAAS,EAAE,6BAA6B;CACzC,CAAC;AACF,MAAM,MAAM,GAAG,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,CAAC;AAClE,MAAM,qBAAqB,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACtD,MAAM,sBAAsB,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACvD,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,SAAS,GAAG,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,CAAC;AACrE,MAAM,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AC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;IAE/B,OAAO,YAAY,CAAC;AACtB,CAAC;AAtCD,gCAsCC;AAED,SAAgB,aAAa,CAC3B,OAA6B;IAE7B,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,uBAAU,CACrD,qBAAqB,EACrB,EAAE,CACH,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,uBAAU,CAAC,sBAAsB,EAAE;QAC/D,QAAQ;QACR,gBAAgB;QAChB,MAAM;QACN,SAAS;QACT,MAAM;QACN,QAAQ;QACR,QAAQ;QACR,gBAAgB;QAChB,QAAQ;KACT,CAAC,CAAC;IAEH,SAAS,eAAe,CAAC,EAAE,IAAI,EAAO;QACpC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,MAAM,EAAE,MAAa;YACrB,GAAG,EAAE,gEAAgE,CAAC;gBACpE,SAAS,EAAE,wBAAwB;gBACnC,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,eAAe,CAAC,OAAO,GAAG,OAAO,CAAC;IAElC,OAAO,eAAe,CAAC;AACzB,CAAC;AAtCD,sCAsCC"}
@@ -0,0 +1,9 @@
1
+ import { HttpClient } from '@wix/sdk-types';
2
+ import { CreateProductOptions, UpdateProductOptions } from './metroinspector-v1-product.universal';
3
+ export declare function createProduct(httpClient: HttpClient): (options?: CreateProductOptions | undefined) => Promise<import("./metroinspector-v1-product.universal").Product>;
4
+ export declare function deleteProduct(httpClient: HttpClient): (productId: string) => Promise<void>;
5
+ export declare function updateProduct(httpClient: HttpClient): (productId: string, options?: UpdateProductOptions | undefined) => Promise<import("./metroinspector-v1-product.universal").Product>;
6
+ export declare function getProduct(httpClient: HttpClient): (productId: string) => Promise<import("./metroinspector-v1-product.universal").Product>;
7
+ export declare function queryProducts(httpClient: HttpClient): () => import("./metroinspector-v1-product.universal").ProductsQueryBuilder;
8
+ export { SubdivisionType, SortOrder, } from './metroinspector-v1-product.universal';
9
+ export { Address, AddressStreetOneOf, StreetAddress, AddressLocation, Subdivision, VideoResolution, PageLink, Variant, MyAddress, CreateProductRequest, CreateProductResponse, ProductExistsError, DeleteProductRequest, DeleteProductResponse, UpdateProductRequest, UpdateProductResponse, GetProductRequest, GetProductResponse, QueryProductsRequest, QueryV2, QueryV2PagingMethodOneOf, Sorting, Paging, CursorPaging, QueryProductsResponse, PagingMetadataV2, Cursors, CreateProductOptions, UpdateProductOptions, ProductsQueryResult, ProductsQueryBuilder, } from './metroinspector-v1-product.universal';
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SortOrder = exports.SubdivisionType = exports.queryProducts = exports.getProduct = exports.updateProduct = exports.deleteProduct = exports.createProduct = void 0;
4
+ const metroinspector_v1_product_universal_1 = require("./metroinspector-v1-product.universal");
5
+ function createProduct(httpClient) {
6
+ return (options) => metroinspector_v1_product_universal_1.createProduct(options,
7
+ // @ts-ignore
8
+ { httpClient });
9
+ }
10
+ exports.createProduct = createProduct;
11
+ function deleteProduct(httpClient) {
12
+ return (productId) => metroinspector_v1_product_universal_1.deleteProduct(productId,
13
+ // @ts-ignore
14
+ { httpClient });
15
+ }
16
+ exports.deleteProduct = deleteProduct;
17
+ function updateProduct(httpClient) {
18
+ return (productId, options) => metroinspector_v1_product_universal_1.updateProduct(productId, options,
19
+ // @ts-ignore
20
+ { httpClient });
21
+ }
22
+ exports.updateProduct = updateProduct;
23
+ function getProduct(httpClient) {
24
+ return (productId) => metroinspector_v1_product_universal_1.getProduct(productId,
25
+ // @ts-ignore
26
+ { httpClient });
27
+ }
28
+ exports.getProduct = getProduct;
29
+ function queryProducts(httpClient) {
30
+ return () => metroinspector_v1_product_universal_1.queryProducts(
31
+ // @ts-ignore
32
+ { httpClient });
33
+ }
34
+ exports.queryProducts = queryProducts;
35
+ var metroinspector_v1_product_universal_2 = require("./metroinspector-v1-product.universal");
36
+ Object.defineProperty(exports, "SubdivisionType", { enumerable: true, get: function () { return metroinspector_v1_product_universal_2.SubdivisionType; } });
37
+ Object.defineProperty(exports, "SortOrder", { enumerable: true, get: function () { return metroinspector_v1_product_universal_2.SortOrder; } });
38
+ //# sourceMappingURL=metroinspector-v1-product.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metroinspector-v1-product.public.js","sourceRoot":"","sources":["../../../src/metroinspector-v1-product.public.ts"],"names":[],"mappings":";;;AACA,+FAQ+C;AAE/C,SAAgB,aAAa,CAAC,UAAsB;IAClD,OAAO,CAAC,OAA8B,EAAE,EAAE,CACxC,mDAAsB,CACpB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,sCAOC;AAED,SAAgB,aAAa,CAAC,UAAsB;IAClD,OAAO,CAAC,SAAiB,EAAE,EAAE,CAC3B,mDAAsB,CACpB,SAAS;IACT,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,sCAOC;AAED,SAAgB,aAAa,CAAC,UAAsB;IAClD,OAAO,CAAC,SAAiB,EAAE,OAA8B,EAAE,EAAE,CAC3D,mDAAsB,CACpB,SAAS,EACT,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,sCAQC;AAED,SAAgB,UAAU,CAAC,UAAsB;IAC/C,OAAO,CAAC,SAAiB,EAAE,EAAE,CAC3B,gDAAmB,CACjB,SAAS;IACT,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,gCAOC;AAED,SAAgB,aAAa,CAAC,UAAsB;IAClD,OAAO,GAAG,EAAE,CACV,mDAAsB;IACpB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAND,sCAMC;AAED,6FAG+C;AAF7C,sIAAA,eAAe,OAAA;AACf,gIAAA,SAAS,OAAA"}
@@ -0,0 +1,280 @@
1
+ export interface Product {
2
+ title?: string;
3
+ id?: string;
4
+ collectionId?: string;
5
+ createdDate?: Date;
6
+ modifiedDate?: Date;
7
+ image?: Image;
8
+ address?: Address;
9
+ document?: Document;
10
+ video?: VideoV2;
11
+ pageLink?: PageLink;
12
+ audio?: Audio;
13
+ color?: string | null;
14
+ localDate?: string | null;
15
+ localTime?: string | null;
16
+ localDateTime?: string | null;
17
+ variants?: Variant[];
18
+ mainVariant?: Variant;
19
+ customAddress?: MyAddress;
20
+ /** @readonly */
21
+ guid?: string;
22
+ }
23
+ export interface Image {
24
+ /** WixMedia image ID. */
25
+ id?: string;
26
+ /** Image URL. */
27
+ url?: string;
28
+ /**
29
+ * Original image height.
30
+ * @readonly
31
+ */
32
+ height?: number;
33
+ /**
34
+ * Original image width.
35
+ * @readonly
36
+ */
37
+ width?: number;
38
+ /** Image alt text. */
39
+ altText?: string | null;
40
+ /**
41
+ * Image filename.
42
+ * @readonly
43
+ */
44
+ filename?: string | null;
45
+ }
46
+ /** Physical address */
47
+ export interface Address extends AddressStreetOneOf {
48
+ /** Country code. */
49
+ country?: string | null;
50
+ /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
51
+ subdivision?: string | null;
52
+ /** City name. */
53
+ city?: string | null;
54
+ /** Zip/postal code. */
55
+ postalCode?: string | null;
56
+ /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
57
+ addressLine2?: string | null;
58
+ /** Street name and number. */
59
+ streetAddress?: StreetAddress;
60
+ /** Main address line, usually street and number as free text. */
61
+ addressLine?: string | null;
62
+ }
63
+ /** @oneof */
64
+ export interface AddressStreetOneOf {
65
+ /** Street name and number. */
66
+ streetAddress?: StreetAddress;
67
+ /** Main address line, usually street and number as free text. */
68
+ addressLine?: string | null;
69
+ }
70
+ export interface StreetAddress {
71
+ /** Street number. */
72
+ number?: string;
73
+ /** Street name. */
74
+ name?: string;
75
+ }
76
+ export interface AddressLocation {
77
+ /** Address latitude. */
78
+ latitude?: number | null;
79
+ /** Address longitude. */
80
+ longitude?: number | null;
81
+ }
82
+ export interface Subdivision {
83
+ /** Short subdivision code. */
84
+ code?: string;
85
+ /** Subdivision full name. */
86
+ name?: string;
87
+ }
88
+ export declare enum SubdivisionType {
89
+ UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
90
+ /** State */
91
+ ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
92
+ /** County */
93
+ ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
94
+ /** City/town */
95
+ ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
96
+ /** Neighborhood/quarter */
97
+ ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
98
+ /** Street/block */
99
+ ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
100
+ /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
101
+ COUNTRY = "COUNTRY"
102
+ }
103
+ export interface Document {
104
+ /** WixMedia ID. */
105
+ id?: string;
106
+ /** Document URL. */
107
+ url?: string;
108
+ /** Document filename. */
109
+ filename?: string | null;
110
+ }
111
+ export interface VideoV2 {
112
+ /** WixMedia ID. */
113
+ id?: string;
114
+ /**
115
+ * Available resolutions for the video, starting with the optimal resolution.
116
+ * @readonly
117
+ */
118
+ resolutions?: VideoResolution[];
119
+ /**
120
+ * Video filename.
121
+ * @readonly
122
+ */
123
+ filename?: string | null;
124
+ }
125
+ export interface VideoResolution {
126
+ /** Video URL. */
127
+ url?: string;
128
+ /** Video height. */
129
+ height?: number;
130
+ /** Video width. */
131
+ width?: number;
132
+ /** Video format for example, mp4, hls. */
133
+ format?: string;
134
+ }
135
+ export interface PageLink {
136
+ /** The page id we want from the site */
137
+ pageId?: string;
138
+ /** Where this link should open, supports _self and _blank or any name the user chooses. _self means same page, _blank means new page. */
139
+ target?: string | null;
140
+ }
141
+ export interface Audio {
142
+ /** WixMedia ID. */
143
+ id?: string;
144
+ /** Audio URL. */
145
+ url?: string;
146
+ /**
147
+ * Audio filename.
148
+ * @readonly
149
+ */
150
+ filename?: string | null;
151
+ }
152
+ export interface Variant {
153
+ name?: string;
154
+ value?: string;
155
+ image?: Image;
156
+ }
157
+ export interface MyAddress {
158
+ country?: string | null;
159
+ subdivision?: string | null;
160
+ city?: string | null;
161
+ postalCode?: string | null;
162
+ streetAddress?: StreetAddress;
163
+ }
164
+ export interface CreateProductRequest {
165
+ product?: Product;
166
+ }
167
+ export interface CreateProductResponse {
168
+ product?: Product;
169
+ }
170
+ export interface ProductExistsError {
171
+ productId?: string;
172
+ }
173
+ export interface DeleteProductRequest {
174
+ productId: string;
175
+ }
176
+ export interface DeleteProductResponse {
177
+ }
178
+ export interface UpdateProductRequest {
179
+ productId: string;
180
+ product?: Product;
181
+ }
182
+ export interface UpdateProductResponse {
183
+ product?: Product;
184
+ }
185
+ export interface GetProductRequest {
186
+ productId: string;
187
+ }
188
+ export interface GetProductResponse {
189
+ product?: Product;
190
+ }
191
+ export interface QueryProductsRequest {
192
+ query?: QueryV2;
193
+ /** Whether variants should be included in the response. */
194
+ includeVariants?: boolean;
195
+ /** Whether hidden products should be included in the response. Requires permissions to manage products. */
196
+ includeHiddenProducts?: boolean;
197
+ /** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
198
+ includeMerchantSpecificData?: boolean;
199
+ }
200
+ export interface QueryV2 extends QueryV2PagingMethodOneOf {
201
+ /**
202
+ * Filter object in the following format:
203
+ * `"filter" : {
204
+ * "fieldName1": "value1",
205
+ * "fieldName2":{"$operator":"value2"}
206
+ * }`
207
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
208
+ */
209
+ filter?: Record<string, any> | null;
210
+ /**
211
+ * Sort object in the following format:
212
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
213
+ */
214
+ sort?: Sorting[];
215
+ /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
216
+ fields?: string[];
217
+ /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
218
+ fieldsets?: string[];
219
+ /** Paging options to limit and skip the number of items. */
220
+ paging?: Paging;
221
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
222
+ cursorPaging?: CursorPaging;
223
+ }
224
+ /** @oneof */
225
+ export interface QueryV2PagingMethodOneOf {
226
+ /** Paging options to limit and skip the number of items. */
227
+ paging?: Paging;
228
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
229
+ cursorPaging?: CursorPaging;
230
+ }
231
+ export interface Sorting {
232
+ /** Name of the field to sort by. */
233
+ fieldName?: string;
234
+ /** Sort order. */
235
+ order?: SortOrder;
236
+ }
237
+ export declare enum SortOrder {
238
+ ASC = "ASC",
239
+ DESC = "DESC"
240
+ }
241
+ export interface Paging {
242
+ /** Number of items to load. */
243
+ limit?: number | null;
244
+ /** Number of items to skip in the current sort order. */
245
+ offset?: number | null;
246
+ }
247
+ export interface CursorPaging {
248
+ /** Number of items to load. */
249
+ limit?: number | null;
250
+ /**
251
+ * Pointer to the next or previous page in the list of results.
252
+ *
253
+ * You can get the relevant cursor token
254
+ * from the `pagingMetadata` object in the previous call's response.
255
+ * Not relevant for the first request.
256
+ */
257
+ cursor?: string | null;
258
+ }
259
+ export interface QueryProductsResponse {
260
+ products?: Product[];
261
+ metadata?: PagingMetadataV2;
262
+ }
263
+ export interface PagingMetadataV2 {
264
+ /** Number of items returned in the response. */
265
+ count?: number | null;
266
+ /** Offset that was requested. */
267
+ offset?: number | null;
268
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
269
+ total?: number | null;
270
+ /** Flag that indicates the server failed to calculate the `total` field. */
271
+ tooManyToCount?: boolean | null;
272
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
273
+ cursors?: Cursors;
274
+ }
275
+ export interface Cursors {
276
+ /** Cursor pointing to next page in the list of results. */
277
+ next?: string | null;
278
+ /** Cursor pointing to previous page in the list of results. */
279
+ prev?: string | null;
280
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SortOrder = exports.SubdivisionType = void 0;
4
+ var SubdivisionType;
5
+ (function (SubdivisionType) {
6
+ SubdivisionType["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
7
+ /** State */
8
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
9
+ /** County */
10
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
11
+ /** City/town */
12
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
13
+ /** Neighborhood/quarter */
14
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
15
+ /** Street/block */
16
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
17
+ /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
18
+ SubdivisionType["COUNTRY"] = "COUNTRY";
19
+ })(SubdivisionType = exports.SubdivisionType || (exports.SubdivisionType = {}));
20
+ var SortOrder;
21
+ (function (SortOrder) {
22
+ SortOrder["ASC"] = "ASC";
23
+ SortOrder["DESC"] = "DESC";
24
+ })(SortOrder = exports.SortOrder || (exports.SortOrder = {}));
25
+ //# sourceMappingURL=metroinspector-v1-product.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metroinspector-v1-product.types.js","sourceRoot":"","sources":["../../../src/metroinspector-v1-product.types.ts"],"names":[],"mappings":";;;AA8FA,IAAY,eAcX;AAdD,WAAY,eAAe;IACzB,wEAAqD,CAAA;IACrD,YAAY;IACZ,8EAA2D,CAAA;IAC3D,aAAa;IACb,8EAA2D,CAAA;IAC3D,gBAAgB;IAChB,8EAA2D,CAAA;IAC3D,2BAA2B;IAC3B,8EAA2D,CAAA;IAC3D,mBAAmB;IACnB,8EAA2D,CAAA;IAC3D,8IAA8I;IAC9I,sCAAmB,CAAA;AACrB,CAAC,EAdW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAc1B;AA2JD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"}