@wix/auto_sdk_metro_products 1.0.1 → 1.0.3

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 (123) hide show
  1. package/build/cjs/index.d.ts +81 -1
  2. package/build/cjs/index.js +1514 -15
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +574 -1
  5. package/build/cjs/index.typings.js +1425 -15
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +447 -1
  8. package/build/cjs/meta.js +940 -15
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +81 -0
  11. package/build/es/index.mjs +1481 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/{src/metroinspector-v1-product-products.universal.d.ts → index.typings.d.mts} +138 -212
  14. package/build/es/index.typings.mjs +1392 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/{src/metroinspector-v1-product-products.types.d.ts → meta.d.mts} +92 -259
  17. package/build/es/meta.mjs +907 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/internal/cjs/index.d.ts +81 -1
  20. package/build/internal/cjs/index.js +1514 -15
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +574 -1
  23. package/build/internal/cjs/index.typings.js +1425 -15
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +447 -1
  26. package/build/internal/cjs/meta.js +940 -15
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +81 -0
  29. package/build/internal/es/index.mjs +1481 -0
  30. package/build/internal/es/index.mjs.map +1 -0
  31. package/build/internal/{cjs/src/metroinspector-v1-product-products.universal.d.ts → es/index.typings.d.mts} +138 -212
  32. package/build/internal/es/index.typings.mjs +1392 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -0
  34. package/build/{cjs/src/metroinspector-v1-product-products.types.d.ts → internal/es/meta.d.mts} +92 -259
  35. package/build/internal/es/meta.mjs +907 -0
  36. package/build/internal/es/meta.mjs.map +1 -0
  37. package/package.json +12 -10
  38. package/build/cjs/src/metroinspector-v1-product-products.context.d.ts +0 -14
  39. package/build/cjs/src/metroinspector-v1-product-products.context.js +0 -22
  40. package/build/cjs/src/metroinspector-v1-product-products.context.js.map +0 -1
  41. package/build/cjs/src/metroinspector-v1-product-products.http.d.ts +0 -16
  42. package/build/cjs/src/metroinspector-v1-product-products.http.js +0 -728
  43. package/build/cjs/src/metroinspector-v1-product-products.http.js.map +0 -1
  44. package/build/cjs/src/metroinspector-v1-product-products.meta.d.ts +0 -30
  45. package/build/cjs/src/metroinspector-v1-product-products.meta.js +0 -218
  46. package/build/cjs/src/metroinspector-v1-product-products.meta.js.map +0 -1
  47. package/build/cjs/src/metroinspector-v1-product-products.public.d.ts +0 -68
  48. package/build/cjs/src/metroinspector-v1-product-products.public.js +0 -72
  49. package/build/cjs/src/metroinspector-v1-product-products.public.js.map +0 -1
  50. package/build/cjs/src/metroinspector-v1-product-products.types.js +0 -61
  51. package/build/cjs/src/metroinspector-v1-product-products.types.js.map +0 -1
  52. package/build/cjs/src/metroinspector-v1-product-products.universal.d.ts +0 -648
  53. package/build/cjs/src/metroinspector-v1-product-products.universal.js +0 -739
  54. package/build/cjs/src/metroinspector-v1-product-products.universal.js.map +0 -1
  55. package/build/es/index.d.ts +0 -1
  56. package/build/es/index.js +0 -2
  57. package/build/es/index.js.map +0 -1
  58. package/build/es/index.typings.d.ts +0 -1
  59. package/build/es/index.typings.js +0 -2
  60. package/build/es/index.typings.js.map +0 -1
  61. package/build/es/meta.d.ts +0 -1
  62. package/build/es/meta.js +0 -2
  63. package/build/es/meta.js.map +0 -1
  64. package/build/es/src/metroinspector-v1-product-products.context.d.ts +0 -14
  65. package/build/es/src/metroinspector-v1-product-products.context.js +0 -14
  66. package/build/es/src/metroinspector-v1-product-products.context.js.map +0 -1
  67. package/build/es/src/metroinspector-v1-product-products.http.d.ts +0 -16
  68. package/build/es/src/metroinspector-v1-product-products.http.js +0 -715
  69. package/build/es/src/metroinspector-v1-product-products.http.js.map +0 -1
  70. package/build/es/src/metroinspector-v1-product-products.meta.d.ts +0 -30
  71. package/build/es/src/metroinspector-v1-product-products.meta.js +0 -182
  72. package/build/es/src/metroinspector-v1-product-products.meta.js.map +0 -1
  73. package/build/es/src/metroinspector-v1-product-products.public.d.ts +0 -68
  74. package/build/es/src/metroinspector-v1-product-products.public.js +0 -54
  75. package/build/es/src/metroinspector-v1-product-products.public.js.map +0 -1
  76. package/build/es/src/metroinspector-v1-product-products.types.js +0 -58
  77. package/build/es/src/metroinspector-v1-product-products.types.js.map +0 -1
  78. package/build/es/src/metroinspector-v1-product-products.universal.js +0 -703
  79. package/build/es/src/metroinspector-v1-product-products.universal.js.map +0 -1
  80. package/build/internal/cjs/src/metroinspector-v1-product-products.context.d.ts +0 -14
  81. package/build/internal/cjs/src/metroinspector-v1-product-products.context.js +0 -22
  82. package/build/internal/cjs/src/metroinspector-v1-product-products.context.js.map +0 -1
  83. package/build/internal/cjs/src/metroinspector-v1-product-products.http.d.ts +0 -16
  84. package/build/internal/cjs/src/metroinspector-v1-product-products.http.js +0 -728
  85. package/build/internal/cjs/src/metroinspector-v1-product-products.http.js.map +0 -1
  86. package/build/internal/cjs/src/metroinspector-v1-product-products.meta.d.ts +0 -30
  87. package/build/internal/cjs/src/metroinspector-v1-product-products.meta.js +0 -218
  88. package/build/internal/cjs/src/metroinspector-v1-product-products.meta.js.map +0 -1
  89. package/build/internal/cjs/src/metroinspector-v1-product-products.public.d.ts +0 -68
  90. package/build/internal/cjs/src/metroinspector-v1-product-products.public.js +0 -72
  91. package/build/internal/cjs/src/metroinspector-v1-product-products.public.js.map +0 -1
  92. package/build/internal/cjs/src/metroinspector-v1-product-products.types.d.ts +0 -614
  93. package/build/internal/cjs/src/metroinspector-v1-product-products.types.js +0 -61
  94. package/build/internal/cjs/src/metroinspector-v1-product-products.types.js.map +0 -1
  95. package/build/internal/cjs/src/metroinspector-v1-product-products.universal.js +0 -739
  96. package/build/internal/cjs/src/metroinspector-v1-product-products.universal.js.map +0 -1
  97. package/build/internal/es/index.d.ts +0 -1
  98. package/build/internal/es/index.js +0 -2
  99. package/build/internal/es/index.js.map +0 -1
  100. package/build/internal/es/index.typings.d.ts +0 -1
  101. package/build/internal/es/index.typings.js +0 -2
  102. package/build/internal/es/index.typings.js.map +0 -1
  103. package/build/internal/es/meta.d.ts +0 -1
  104. package/build/internal/es/meta.js +0 -2
  105. package/build/internal/es/meta.js.map +0 -1
  106. package/build/internal/es/src/metroinspector-v1-product-products.context.d.ts +0 -14
  107. package/build/internal/es/src/metroinspector-v1-product-products.context.js +0 -14
  108. package/build/internal/es/src/metroinspector-v1-product-products.context.js.map +0 -1
  109. package/build/internal/es/src/metroinspector-v1-product-products.http.d.ts +0 -16
  110. package/build/internal/es/src/metroinspector-v1-product-products.http.js +0 -715
  111. package/build/internal/es/src/metroinspector-v1-product-products.http.js.map +0 -1
  112. package/build/internal/es/src/metroinspector-v1-product-products.meta.d.ts +0 -30
  113. package/build/internal/es/src/metroinspector-v1-product-products.meta.js +0 -182
  114. package/build/internal/es/src/metroinspector-v1-product-products.meta.js.map +0 -1
  115. package/build/internal/es/src/metroinspector-v1-product-products.public.d.ts +0 -68
  116. package/build/internal/es/src/metroinspector-v1-product-products.public.js +0 -54
  117. package/build/internal/es/src/metroinspector-v1-product-products.public.js.map +0 -1
  118. package/build/internal/es/src/metroinspector-v1-product-products.types.d.ts +0 -614
  119. package/build/internal/es/src/metroinspector-v1-product-products.types.js +0 -58
  120. package/build/internal/es/src/metroinspector-v1-product-products.types.js.map +0 -1
  121. package/build/internal/es/src/metroinspector-v1-product-products.universal.d.ts +0 -648
  122. package/build/internal/es/src/metroinspector-v1-product-products.universal.js +0 -703
  123. package/build/internal/es/src/metroinspector-v1-product-products.universal.js.map +0 -1
@@ -1 +1,574 @@
1
- export * from './src/metroinspector-v1-product-products.universal.js';
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
3
+ interface Product {
4
+ title?: string | null;
5
+ _id?: string;
6
+ collectionId?: string;
7
+ _createdDate?: Date | null;
8
+ modifiedDate?: Date | null;
9
+ image?: string;
10
+ address?: Address;
11
+ document?: string;
12
+ video?: string;
13
+ pageLink?: PageLink;
14
+ audio?: string;
15
+ /** @format COLOR_HEX */
16
+ color?: string | null;
17
+ /** @format LOCAL_DATE */
18
+ localDate?: string | null;
19
+ /** @format LOCAL_TIME */
20
+ localTime?: string | null;
21
+ /** @format LOCAL_DATE_TIME */
22
+ localDateTime?: string | null;
23
+ variants?: Variant[];
24
+ mainVariant?: Variant;
25
+ customAddress?: MyAddress;
26
+ /**
27
+ * @readonly
28
+ * @format GUID
29
+ */
30
+ guid?: string;
31
+ }
32
+ interface FocalPoint {
33
+ /** X-coordinate of the focal point. */
34
+ x?: number;
35
+ /** Y-coordinate of the focal point. */
36
+ y?: number;
37
+ /** crop by height */
38
+ height?: number | null;
39
+ /** crop by width */
40
+ width?: number | null;
41
+ }
42
+ /** Physical address */
43
+ interface Address extends AddressStreetOneOf {
44
+ /** Street name and number. */
45
+ streetAddress?: StreetAddress;
46
+ /** Main address line, usually street and number as free text. */
47
+ addressLine1?: string | null;
48
+ /**
49
+ * Country code.
50
+ * @format COUNTRY
51
+ */
52
+ country?: string | null;
53
+ /** Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. e.g. NY */
54
+ subdivision?: string | null;
55
+ /** City name. */
56
+ city?: string | null;
57
+ /** Zip/postal code. */
58
+ postalCode?: string | null;
59
+ /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
60
+ addressLine2?: string | null;
61
+ }
62
+ /** @oneof */
63
+ interface AddressStreetOneOf {
64
+ /** Street name and number. */
65
+ streetAddress?: StreetAddress;
66
+ /** Main address line, usually street and number as free text. */
67
+ addressLine?: string | null;
68
+ }
69
+ interface StreetAddress {
70
+ /** Street number. */
71
+ number?: string;
72
+ /** Street name. */
73
+ name?: string;
74
+ }
75
+ interface AddressLocation {
76
+ /** Address latitude. */
77
+ latitude?: number | null;
78
+ /** Address longitude. */
79
+ longitude?: number | null;
80
+ }
81
+ interface Subdivision {
82
+ /** Short subdivision code. */
83
+ code?: string;
84
+ /** Subdivision full name. */
85
+ name?: string;
86
+ }
87
+ declare enum SubdivisionType {
88
+ UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
89
+ /** State */
90
+ ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
91
+ /** County */
92
+ ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
93
+ /** City/town */
94
+ ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
95
+ /** Neighborhood/quarter */
96
+ ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
97
+ /** Street/block */
98
+ ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
99
+ /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
100
+ COUNTRY = "COUNTRY"
101
+ }
102
+ /** @enumType */
103
+ type SubdivisionTypeWithLiterals = SubdivisionType | 'UNKNOWN_SUBDIVISION_TYPE' | 'ADMINISTRATIVE_AREA_LEVEL_1' | 'ADMINISTRATIVE_AREA_LEVEL_2' | 'ADMINISTRATIVE_AREA_LEVEL_3' | 'ADMINISTRATIVE_AREA_LEVEL_4' | 'ADMINISTRATIVE_AREA_LEVEL_5' | 'COUNTRY';
104
+ /** Subdivision Concordance values */
105
+ interface StandardDetails {
106
+ /**
107
+ * subdivision iso-3166-2 code according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). e.g. US-NY, GB-SCT, NO-30
108
+ * @maxLength 20
109
+ */
110
+ iso31662?: string | null;
111
+ }
112
+ interface VideoResolution {
113
+ /** Video URL. */
114
+ url?: string;
115
+ /** Video height. */
116
+ height?: number;
117
+ /** Video width. */
118
+ width?: number;
119
+ /** Video format for example, mp4, hls. */
120
+ format?: string;
121
+ }
122
+ interface PageLink {
123
+ /** The page id we want from the site */
124
+ pageId?: string;
125
+ /** Where this link should open, supports _self and _blank or any name the user chooses. _self means same page, _blank means new page. */
126
+ target?: string | null;
127
+ /**
128
+ * rel of link
129
+ * @maxSize 20
130
+ */
131
+ rel?: LinkRelWithLiterals[];
132
+ }
133
+ /**
134
+ * The 'rel' attribute of the link. The rel attribute defines the relationship between a linked resource and the current document.
135
+ * Further reading (also about different possible rel types): https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel
136
+ * Following are the accepted 'rel' types by Wix applications.
137
+ */
138
+ declare enum LinkRel {
139
+ /** default (not implemented) */
140
+ unknown_link_rel = "unknown_link_rel",
141
+ /** Indicates that the current document's original author or publisher does not endorse the referenced document. */
142
+ nofollow = "nofollow",
143
+ /** Instructs the browser to navigate to the target resource without granting the new browsing context access to the document that opened it. */
144
+ noopener = "noopener",
145
+ /** No Referer header will be included. Additionally, has the same effect as noopener. */
146
+ noreferrer = "noreferrer",
147
+ /** Indicates a link that resulted from advertisements or paid placements. */
148
+ sponsored = "sponsored"
149
+ }
150
+ /** @enumType */
151
+ type LinkRelWithLiterals = LinkRel | 'unknown_link_rel' | 'nofollow' | 'noopener' | 'noreferrer' | 'sponsored';
152
+ interface Variant {
153
+ name?: string;
154
+ value?: string;
155
+ image?: string;
156
+ }
157
+ interface MyAddress {
158
+ /** @format COUNTRY */
159
+ country?: string | null;
160
+ subdivision?: string | null;
161
+ city?: string | null;
162
+ postalCode?: string | null;
163
+ streetAddress?: StreetAddress;
164
+ }
165
+ interface CreateProductRequest {
166
+ product?: Product;
167
+ }
168
+ interface CreateProductResponse {
169
+ product?: Product;
170
+ }
171
+ interface DeleteProductRequest {
172
+ productId: string;
173
+ }
174
+ interface DeleteProductResponse {
175
+ }
176
+ interface UpdateProductRequest {
177
+ productId: string;
178
+ product?: Product;
179
+ /** Explicit list of fields to update. */
180
+ mask?: string[];
181
+ }
182
+ interface UpdateProductResponse {
183
+ product?: Product;
184
+ }
185
+ interface GetProductRequest {
186
+ productId: string;
187
+ }
188
+ interface GetProductResponse {
189
+ product?: Product;
190
+ }
191
+ interface CountProductsRequest {
192
+ filter?: Record<string, any> | null;
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
+ interface CountProductsResponse {
201
+ count?: number;
202
+ }
203
+ interface GetProductsStartWithRequest {
204
+ title: string;
205
+ addressLine2?: string | null;
206
+ }
207
+ interface GetProductsStartWithResponse {
208
+ products?: Product[];
209
+ }
210
+ interface QueryProductsRequest {
211
+ query?: QueryV2;
212
+ /** Whether variants should be included in the response. */
213
+ includeVariants?: boolean;
214
+ /** Whether hidden products should be included in the response. Requires permissions to manage products. */
215
+ includeHiddenProducts?: boolean;
216
+ /** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
217
+ includeMerchantSpecificData?: boolean;
218
+ }
219
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
220
+ /** Paging options to limit and offset the number of items. */
221
+ paging?: Paging;
222
+ /** 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`. */
223
+ cursorPaging?: CursorPaging;
224
+ /**
225
+ * Filter object.
226
+ *
227
+ * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
228
+ */
229
+ filter?: Record<string, any> | null;
230
+ /**
231
+ * Sort object.
232
+ *
233
+ * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
234
+ */
235
+ sort?: Sorting[];
236
+ /** 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. */
237
+ fields?: string[];
238
+ /** 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. */
239
+ fieldsets?: string[];
240
+ }
241
+ /** @oneof */
242
+ interface QueryV2PagingMethodOneOf {
243
+ /** Paging options to limit and offset the number of items. */
244
+ paging?: Paging;
245
+ /** 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`. */
246
+ cursorPaging?: CursorPaging;
247
+ }
248
+ interface Sorting {
249
+ /**
250
+ * Name of the field to sort by.
251
+ * @maxLength 512
252
+ */
253
+ fieldName?: string;
254
+ /** Sort order. */
255
+ order?: SortOrderWithLiterals;
256
+ }
257
+ declare enum SortOrder {
258
+ ASC = "ASC",
259
+ DESC = "DESC"
260
+ }
261
+ /** @enumType */
262
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
263
+ interface Paging {
264
+ /** Number of items to load. */
265
+ limit?: number | null;
266
+ /** Number of items to skip in the current sort order. */
267
+ offset?: number | null;
268
+ }
269
+ interface CursorPaging {
270
+ /**
271
+ * Maximum number of items to return in the results.
272
+ * @max 100
273
+ */
274
+ limit?: number | null;
275
+ /**
276
+ * Pointer to the next or previous page in the list of results.
277
+ *
278
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
279
+ * Not relevant for the first request.
280
+ * @maxLength 16000
281
+ */
282
+ cursor?: string | null;
283
+ }
284
+ interface QueryProductsResponse {
285
+ products?: Product[];
286
+ metadata?: PagingMetadataV2;
287
+ }
288
+ interface PagingMetadataV2 {
289
+ /** Number of items returned in the response. */
290
+ count?: number | null;
291
+ /** Offset that was requested. */
292
+ offset?: number | null;
293
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
294
+ total?: number | null;
295
+ /** Flag that indicates the server failed to calculate the `total` field. */
296
+ tooManyToCount?: boolean | null;
297
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
298
+ cursors?: Cursors;
299
+ }
300
+ interface Cursors {
301
+ /**
302
+ * Cursor string pointing to the next page in the list of results.
303
+ * @maxLength 16000
304
+ */
305
+ next?: string | null;
306
+ /**
307
+ * Cursor pointing to the previous page in the list of results.
308
+ * @maxLength 16000
309
+ */
310
+ prev?: string | null;
311
+ }
312
+ interface BulkCreateProductsRequest {
313
+ /**
314
+ * @minSize 1
315
+ * @maxSize 100
316
+ */
317
+ products: Product[];
318
+ /** set to `true` if you wish to receive back the created products in the response */
319
+ returnEntity?: boolean;
320
+ }
321
+ interface BulkCreateProductsResponse {
322
+ /**
323
+ * @minSize 1
324
+ * @maxSize 100
325
+ */
326
+ results?: BulkProductResult[];
327
+ bulkActionMetadata?: BulkActionMetadata;
328
+ }
329
+ interface ItemMetadata {
330
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
331
+ _id?: string | null;
332
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
333
+ originalIndex?: number;
334
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
335
+ success?: boolean;
336
+ /** Details about the error in case of failure. */
337
+ error?: ApplicationError;
338
+ }
339
+ interface ApplicationError {
340
+ /** Error code. */
341
+ code?: string;
342
+ /** Description of the error. */
343
+ description?: string;
344
+ /** Data related to the error. */
345
+ data?: Record<string, any> | null;
346
+ }
347
+ interface BulkProductResult {
348
+ /** Defined in wix.commons */
349
+ itemMetadata?: ItemMetadata;
350
+ /** Only exists if `returnEntity` was set to true in the request */
351
+ item?: Product;
352
+ }
353
+ interface BulkActionMetadata {
354
+ /** Number of items that were successfully processed. */
355
+ totalSuccesses?: number;
356
+ /** Number of items that couldn't be processed. */
357
+ totalFailures?: number;
358
+ /** Number of failures without details because detailed failure threshold was exceeded. */
359
+ undetailedFailures?: number;
360
+ }
361
+ interface BulkUpdateProductsRequest {
362
+ /**
363
+ * @minSize 1
364
+ * @maxSize 100
365
+ */
366
+ products: MaskedProduct[];
367
+ /** set to `true` if you wish to receive back the updated products in the response */
368
+ returnEntity?: boolean;
369
+ }
370
+ interface MaskedProduct {
371
+ /** Product to be updated, may be partial */
372
+ product?: Product;
373
+ }
374
+ interface BulkUpdateProductsResponse {
375
+ /**
376
+ * @minSize 1
377
+ * @maxSize 100
378
+ */
379
+ results?: BulkUpdateProductsResponseBulkProductResult[];
380
+ bulkActionMetadata?: BulkActionMetadata;
381
+ }
382
+ interface BulkUpdateProductsResponseBulkProductResult {
383
+ itemMetadata?: ItemMetadata;
384
+ /** Only exists if `returnEntity` was set to true in the request */
385
+ item?: Product;
386
+ }
387
+ interface BulkDeleteProductsRequest {
388
+ /**
389
+ * @minSize 1
390
+ * @maxSize 100
391
+ * @format GUID
392
+ */
393
+ productIds: string[];
394
+ }
395
+ interface BulkDeleteProductsResponse {
396
+ /**
397
+ * @minSize 1
398
+ * @maxSize 100
399
+ */
400
+ results?: BulkDeleteProductsResponseBulkProductResult[];
401
+ bulkActionMetadata?: BulkActionMetadata;
402
+ }
403
+ interface BulkDeleteProductsResponseBulkProductResult {
404
+ itemMetadata?: ItemMetadata;
405
+ }
406
+ interface ResetProductsDbRequest {
407
+ }
408
+ interface ResetProductsDbResponse {
409
+ }
410
+ /** @docsIgnore */
411
+ type CreateProductApplicationErrors = {
412
+ code?: 'PRODUCT_EXISTS';
413
+ description?: string;
414
+ data?: Record<string, any>;
415
+ };
416
+ /**
417
+ * Creating a product
418
+ * @public
419
+ * @requiredField options.product.title
420
+ * @fqn wix.coreservices.metroinspector.v1.products.ProductsService.CreateProduct
421
+ */
422
+ declare function createProduct(options?: NonNullablePaths<CreateProductOptions, `product.title`, 3>): Promise<NonNullablePaths<Product, `_id` | `collectionId` | `address.streetAddress.number` | `address.streetAddress.name` | `pageLink.pageId` | `pageLink.rel` | `variants` | `variants.${number}.name` | `variants.${number}.value` | `guid`, 4> & {
423
+ __applicationErrorsType?: CreateProductApplicationErrors;
424
+ }>;
425
+ interface CreateProductOptions {
426
+ product?: Product;
427
+ }
428
+ /** @public
429
+ * @requiredField productId
430
+ * @fqn wix.coreservices.metroinspector.v1.products.ProductsService.DeleteProduct
431
+ */
432
+ declare function deleteProduct(productId: string): Promise<void>;
433
+ /** @public
434
+ * @requiredField options.product._id
435
+ * @requiredField productId
436
+ * @fqn wix.coreservices.metroinspector.v1.products.ProductsService.UpdateProduct
437
+ */
438
+ declare function updateProduct(productId: string, options?: NonNullablePaths<UpdateProductOptions, `product._id`, 3>): Promise<NonNullablePaths<Product, `_id` | `collectionId` | `address.streetAddress.number` | `address.streetAddress.name` | `pageLink.pageId` | `pageLink.rel` | `variants` | `variants.${number}.name` | `variants.${number}.value` | `guid`, 4>>;
439
+ interface UpdateProductOptions {
440
+ product?: Product;
441
+ /** Explicit list of fields to update. */
442
+ mask?: string[];
443
+ }
444
+ /**
445
+ * override description
446
+ * @public
447
+ * @requiredField productId
448
+ * @param arg1 - ## new override param 1
449
+ * @returns ## override return
450
+ * @fqn wix.coreservices.metroinspector.v1.products.ProductsService.GetProduct
451
+ */
452
+ declare function getProduct(productId: string): Promise<NonNullablePaths<Product, `_id` | `collectionId` | `address.streetAddress.number` | `address.streetAddress.name` | `pageLink.pageId` | `pageLink.rel` | `variants` | `variants.${number}.name` | `variants.${number}.value` | `guid`, 4>>;
453
+ /** @public
454
+ * @fqn wix.coreservices.metroinspector.v1.products.ProductsService.CountProducts
455
+ */
456
+ declare function countProducts(options?: CountProductsOptions): Promise<NonNullablePaths<CountProductsResponse, `count`, 2>>;
457
+ interface CountProductsOptions {
458
+ filter?: Record<string, any> | null;
459
+ /** Whether variants should be included in the response. */
460
+ includeVariants?: boolean;
461
+ /** Whether hidden products should be included in the response. Requires permissions to manage products. */
462
+ includeHiddenProducts?: boolean;
463
+ /** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
464
+ includeMerchantSpecificData?: boolean;
465
+ }
466
+ /** @public
467
+ * @requiredField title
468
+ * @fqn wix.coreservices.metroinspector.v1.products.ProductsService.GetProductsStartWith
469
+ */
470
+ declare function getProductsStartWith(title: string, options?: GetProductsStartWithOptions): Promise<NonNullablePaths<GetProductsStartWithResponse, `products` | `products.${number}._id` | `products.${number}.collectionId` | `products.${number}.address.streetAddress.number` | `products.${number}.address.streetAddress.name` | `products.${number}.pageLink.pageId` | `products.${number}.guid`, 6>>;
471
+ interface GetProductsStartWithOptions {
472
+ addressLine2?: string | null;
473
+ }
474
+ /** @public
475
+ * @fqn wix.coreservices.metroinspector.v1.products.ProductsService.QueryProducts
476
+ */
477
+ declare function queryProducts(options?: QueryProductsOptions): ProductsQueryBuilder;
478
+ interface QueryProductsOptions {
479
+ /** Whether variants should be included in the response. */
480
+ includeVariants?: boolean | undefined;
481
+ /** Whether hidden products should be included in the response. Requires permissions to manage products. */
482
+ includeHiddenProducts?: boolean | undefined;
483
+ /** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
484
+ includeMerchantSpecificData?: boolean | undefined;
485
+ }
486
+ interface QueryCursorResult {
487
+ cursors: Cursors;
488
+ hasNext: () => boolean;
489
+ hasPrev: () => boolean;
490
+ length: number;
491
+ pageSize: number;
492
+ }
493
+ interface ProductsQueryResult extends QueryCursorResult {
494
+ items: Product[];
495
+ query: ProductsQueryBuilder;
496
+ next: () => Promise<ProductsQueryResult>;
497
+ prev: () => Promise<ProductsQueryResult>;
498
+ }
499
+ interface ProductsQueryBuilder {
500
+ /** @param propertyName - Property whose value is compared with `value`.
501
+ * @param value - Value to compare against.
502
+ */
503
+ eq: (propertyName: 'title' | 'collectionId' | 'guid', value: any) => ProductsQueryBuilder;
504
+ /** @param propertyName - Property whose value is compared with `value`.
505
+ * @param value - Value to compare against.
506
+ */
507
+ ne: (propertyName: 'title' | 'guid', value: any) => ProductsQueryBuilder;
508
+ /** @param propertyName - Property whose value is compared with `value`.
509
+ * @param value - Value to compare against.
510
+ */
511
+ ge: (propertyName: 'title' | 'guid', value: any) => ProductsQueryBuilder;
512
+ /** @param propertyName - Property whose value is compared with `value`.
513
+ * @param value - Value to compare against.
514
+ */
515
+ gt: (propertyName: 'title' | 'guid', value: any) => ProductsQueryBuilder;
516
+ /** @param propertyName - Property whose value is compared with `value`.
517
+ * @param value - Value to compare against.
518
+ */
519
+ le: (propertyName: 'title' | 'guid', value: any) => ProductsQueryBuilder;
520
+ /** @param propertyName - Property whose value is compared with `value`.
521
+ * @param value - Value to compare against.
522
+ */
523
+ lt: (propertyName: 'title' | 'guid', value: any) => ProductsQueryBuilder;
524
+ /** @param propertyName - Property whose value is compared with `string`.
525
+ * @param string - String to compare against. Case-insensitive.
526
+ */
527
+ startsWith: (propertyName: 'title' | 'guid', value: string) => ProductsQueryBuilder;
528
+ /** @param propertyName - Property whose value is compared with `values`.
529
+ * @param values - List of values to compare against.
530
+ */
531
+ hasSome: (propertyName: 'title' | 'guid', value: any[]) => ProductsQueryBuilder;
532
+ in: (propertyName: 'title' | 'guid', value: any) => ProductsQueryBuilder;
533
+ exists: (propertyName: 'title' | 'guid', value: boolean) => ProductsQueryBuilder;
534
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
535
+ ascending: (...propertyNames: Array<'title' | 'collectionId' | 'guid'>) => ProductsQueryBuilder;
536
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
537
+ descending: (...propertyNames: Array<'title' | 'collectionId' | 'guid'>) => ProductsQueryBuilder;
538
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
539
+ limit: (limit: number) => ProductsQueryBuilder;
540
+ /** @param cursor - A pointer to specific record */
541
+ skipTo: (cursor: string) => ProductsQueryBuilder;
542
+ find: () => Promise<ProductsQueryResult>;
543
+ }
544
+ /**
545
+ * create multiple products in a single request. Works synchronously
546
+ * @public
547
+ * @requiredField products
548
+ * @fqn wix.coreservices.metroinspector.v1.products.ProductsService.BulkCreateProducts
549
+ */
550
+ declare function bulkCreateProducts(products: Product[], options?: BulkCreateProductsOptions): Promise<NonNullablePaths<BulkCreateProductsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item._id` | `results.${number}.item.collectionId` | `results.${number}.item.pageLink.pageId` | `results.${number}.item.guid` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
551
+ interface BulkCreateProductsOptions {
552
+ /** set to `true` if you wish to receive back the created products in the response */
553
+ returnEntity?: boolean;
554
+ }
555
+ /**
556
+ * update multiple products in a single request. Works synchronously.
557
+ * @public
558
+ * @requiredField products
559
+ * @fqn wix.coreservices.metroinspector.v1.products.ProductsService.BulkUpdateProducts
560
+ */
561
+ declare function bulkUpdateProducts(products: MaskedProduct[], options?: BulkUpdateProductsOptions): Promise<NonNullablePaths<BulkUpdateProductsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item._id` | `results.${number}.item.collectionId` | `results.${number}.item.pageLink.pageId` | `results.${number}.item.guid` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
562
+ interface BulkUpdateProductsOptions {
563
+ /** set to `true` if you wish to receive back the updated products in the response */
564
+ returnEntity?: boolean;
565
+ }
566
+ /**
567
+ * deletes multiple products in a single request. Works synchronously.
568
+ * @public
569
+ * @requiredField productIds
570
+ * @fqn wix.coreservices.metroinspector.v1.products.ProductsService.BulkDeleteProducts
571
+ */
572
+ declare function bulkDeleteProducts(productIds: string[]): Promise<NonNullablePaths<BulkDeleteProductsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
573
+
574
+ export { type Address, type AddressLocation, type AddressStreetOneOf, type ApplicationError, type BulkActionMetadata, type BulkCreateProductsOptions, type BulkCreateProductsRequest, type BulkCreateProductsResponse, type BulkDeleteProductsRequest, type BulkDeleteProductsResponse, type BulkDeleteProductsResponseBulkProductResult, type BulkProductResult, type BulkUpdateProductsOptions, type BulkUpdateProductsRequest, type BulkUpdateProductsResponse, type BulkUpdateProductsResponseBulkProductResult, type CountProductsOptions, type CountProductsRequest, type CountProductsResponse, type CreateProductApplicationErrors, type CreateProductOptions, type CreateProductRequest, type CreateProductResponse, type CursorPaging, type Cursors, type DeleteProductRequest, type DeleteProductResponse, type FocalPoint, type GetProductRequest, type GetProductResponse, type GetProductsStartWithOptions, type GetProductsStartWithRequest, type GetProductsStartWithResponse, type ItemMetadata, LinkRel, type LinkRelWithLiterals, type MaskedProduct, type MyAddress, type PageLink, type Paging, type PagingMetadataV2, type Product, type ProductsQueryBuilder, type ProductsQueryResult, type QueryProductsOptions, type QueryProductsRequest, type QueryProductsResponse, type QueryV2, type QueryV2PagingMethodOneOf, type ResetProductsDbRequest, type ResetProductsDbResponse, SortOrder, type SortOrderWithLiterals, type Sorting, type StandardDetails, type StreetAddress, type Subdivision, SubdivisionType, type SubdivisionTypeWithLiterals, type UpdateProductOptions, type UpdateProductRequest, type UpdateProductResponse, type Variant, type VideoResolution, bulkCreateProducts, bulkDeleteProducts, bulkUpdateProducts, countProducts, createProduct, deleteProduct, getProduct, getProductsStartWith, queryProducts, updateProduct };