@wix/auto_sdk_stores_read-only-variants-v-3 1.0.10 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/build/{cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.d.ts → index.d.mts} +410 -528
  2. package/build/{es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.d.ts → index.d.ts} +410 -528
  3. package/build/index.js +923 -0
  4. package/build/index.js.map +1 -0
  5. package/build/index.mjs +831 -0
  6. package/build/index.mjs.map +1 -0
  7. package/build/internal/index.d.mts +35 -0
  8. package/build/internal/index.d.ts +35 -0
  9. package/build/internal/index.js +923 -0
  10. package/build/internal/index.js.map +1 -0
  11. package/build/internal/index.mjs +831 -0
  12. package/build/internal/index.mjs.map +1 -0
  13. package/build/internal/meta.d.mts +1271 -0
  14. package/build/internal/meta.d.ts +1271 -0
  15. package/build/internal/meta.js +209 -0
  16. package/build/internal/meta.js.map +1 -0
  17. package/build/internal/meta.mjs +181 -0
  18. package/build/internal/meta.mjs.map +1 -0
  19. package/build/internal/{cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.d.ts → stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-Co7RmbZM.d.mts} +412 -516
  20. package/build/internal/{es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.d.ts → stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-Co7RmbZM.d.ts} +412 -516
  21. package/build/meta.d.mts +1271 -0
  22. package/build/meta.d.ts +1271 -0
  23. package/build/meta.js +209 -0
  24. package/build/meta.js.map +1 -0
  25. package/build/meta.mjs +181 -0
  26. package/build/meta.mjs.map +1 -0
  27. package/package.json +12 -11
  28. package/build/cjs/index.d.ts +0 -1
  29. package/build/cjs/index.js +0 -18
  30. package/build/cjs/index.js.map +0 -1
  31. package/build/cjs/index.typings.d.ts +0 -3
  32. package/build/cjs/index.typings.js +0 -18
  33. package/build/cjs/index.typings.js.map +0 -1
  34. package/build/cjs/meta.d.ts +0 -1
  35. package/build/cjs/meta.js +0 -18
  36. package/build/cjs/meta.js.map +0 -1
  37. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.d.ts +0 -2
  38. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js +0 -79
  39. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js.map +0 -1
  40. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.d.ts +0 -16
  41. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js +0 -152
  42. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js.map +0 -1
  43. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.d.ts +0 -14
  44. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js +0 -66
  45. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js.map +0 -1
  46. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.d.ts +0 -4
  47. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js +0 -89
  48. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js.map +0 -1
  49. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.types.d.ts +0 -4698
  50. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.types.js +0 -695
  51. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.types.js.map +0 -1
  52. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js +0 -910
  53. package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js.map +0 -1
  54. package/build/es/index.d.ts +0 -1
  55. package/build/es/index.js +0 -2
  56. package/build/es/index.js.map +0 -1
  57. package/build/es/index.typings.d.ts +0 -3
  58. package/build/es/index.typings.js +0 -2
  59. package/build/es/index.typings.js.map +0 -1
  60. package/build/es/meta.d.ts +0 -1
  61. package/build/es/meta.js +0 -2
  62. package/build/es/meta.js.map +0 -1
  63. package/build/es/package.json +0 -3
  64. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.d.ts +0 -2
  65. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js +0 -8
  66. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js.map +0 -1
  67. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.d.ts +0 -16
  68. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js +0 -147
  69. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js.map +0 -1
  70. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.d.ts +0 -14
  71. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js +0 -38
  72. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js.map +0 -1
  73. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.d.ts +0 -4
  74. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js +0 -16
  75. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js.map +0 -1
  76. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.types.d.ts +0 -4698
  77. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.types.js +0 -691
  78. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.types.js.map +0 -1
  79. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js +0 -881
  80. package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js.map +0 -1
  81. package/build/internal/cjs/index.d.ts +0 -1
  82. package/build/internal/cjs/index.js +0 -18
  83. package/build/internal/cjs/index.js.map +0 -1
  84. package/build/internal/cjs/index.typings.d.ts +0 -54
  85. package/build/internal/cjs/index.typings.js +0 -18
  86. package/build/internal/cjs/index.typings.js.map +0 -1
  87. package/build/internal/cjs/meta.d.ts +0 -1
  88. package/build/internal/cjs/meta.js +0 -18
  89. package/build/internal/cjs/meta.js.map +0 -1
  90. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.d.ts +0 -8
  91. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js +0 -79
  92. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js.map +0 -1
  93. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.d.ts +0 -16
  94. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js +0 -152
  95. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js.map +0 -1
  96. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.d.ts +0 -14
  97. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js +0 -66
  98. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js.map +0 -1
  99. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.d.ts +0 -30
  100. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js +0 -89
  101. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js.map +0 -1
  102. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.types.d.ts +0 -4698
  103. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.types.js +0 -695
  104. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.types.js.map +0 -1
  105. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js +0 -910
  106. package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js.map +0 -1
  107. package/build/internal/es/index.d.ts +0 -1
  108. package/build/internal/es/index.js +0 -2
  109. package/build/internal/es/index.js.map +0 -1
  110. package/build/internal/es/index.typings.d.ts +0 -54
  111. package/build/internal/es/index.typings.js +0 -2
  112. package/build/internal/es/index.typings.js.map +0 -1
  113. package/build/internal/es/meta.d.ts +0 -1
  114. package/build/internal/es/meta.js +0 -2
  115. package/build/internal/es/meta.js.map +0 -1
  116. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.d.ts +0 -8
  117. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js +0 -8
  118. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js.map +0 -1
  119. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.d.ts +0 -16
  120. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js +0 -147
  121. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js.map +0 -1
  122. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.d.ts +0 -14
  123. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js +0 -38
  124. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js.map +0 -1
  125. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.d.ts +0 -30
  126. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js +0 -16
  127. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js.map +0 -1
  128. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.types.d.ts +0 -4698
  129. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.types.js +0 -691
  130. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.types.js.map +0 -1
  131. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js +0 -881
  132. package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js.map +0 -1
@@ -0,0 +1,1271 @@
1
+ import { aJ as QueryVariantsRequest$1, aO as QueryVariantsResponse$1, aR as SearchVariantsRequest$1, a as SearchVariantsResponse$1 } from './stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-Co7RmbZM.mjs';
2
+ import '@wix/sdk-types';
3
+
4
+ interface ReadOnlyVariant extends ReadOnlyVariantTypedPropertiesOneOf {
5
+ /** Physical properties. Must be passed when `productType: PHYSICAL` */
6
+ physicalProperties?: V3VariantPhysicalProperties;
7
+ /** Digital properties. Must be passed when `productType: DIGITAL` */
8
+ digitalProperties?: V3VariantDigitalProperties;
9
+ /**
10
+ * Variant ID.
11
+ * @format GUID
12
+ * @readonly
13
+ */
14
+ id?: string;
15
+ /**
16
+ * Whether the variant is visible to site visitors.
17
+ *
18
+ * Default: `true`
19
+ * @readonly
20
+ */
21
+ visible?: boolean | null;
22
+ /**
23
+ * Variant SKU (stock keeping unit).
24
+ * @minLength 1
25
+ * @maxLength 40
26
+ * @readonly
27
+ */
28
+ sku?: string | null;
29
+ /**
30
+ * Variant barcode.
31
+ * @minLength 1
32
+ * @maxLength 40
33
+ * @readonly
34
+ */
35
+ barcode?: string | null;
36
+ /**
37
+ * List of option choices
38
+ * In case this list is empty, this is the default variant of an unmanaged product. - check if bridges need more than ids
39
+ * @maxSize 6
40
+ * @readonly
41
+ */
42
+ optionChoices?: V3OptionChoice[];
43
+ /**
44
+ * Variant price.
45
+ * @readonly
46
+ */
47
+ price?: V3PriceInfo;
48
+ /**
49
+ * Variant revenue details.
50
+ *
51
+ * > **Note:** Returned only when the following conditions are met:
52
+ * > + You pass `"MERCHANT_DATA"` to the `fields` array in Products API requests.
53
+ * > + Your app has the required `SCOPE.STORES.PRODUCT_READ_ADMIN` permission scope.
54
+ * @readonly
55
+ */
56
+ revenueDetails?: V3RevenueDetails;
57
+ /**
58
+ * Variant media.
59
+ * @readonly
60
+ */
61
+ media?: V3ProductMedia;
62
+ /**
63
+ * Subscription prices calculated by applying subscription discount to the variant `price.actualPrice`.
64
+ * > **Note:** Returned only when you pass `"SUBSCRIPTION_PRICES_INFO"` to the `fields` array in Products API requests.
65
+ * @readonly
66
+ */
67
+ subscriptionPricesInfo?: V3SubscriptionPricesInfo;
68
+ /**
69
+ * Variant inventory status.
70
+ * @readonly
71
+ */
72
+ inventoryStatus?: V3InventoryStatus;
73
+ /**
74
+ * Product fields
75
+ * @readonly
76
+ */
77
+ productData?: ProductFields;
78
+ }
79
+ /** @oneof */
80
+ interface ReadOnlyVariantTypedPropertiesOneOf {
81
+ /** Physical properties. Must be passed when `productType: PHYSICAL` */
82
+ physicalProperties?: V3VariantPhysicalProperties;
83
+ /** Digital properties. Must be passed when `productType: DIGITAL` */
84
+ digitalProperties?: V3VariantDigitalProperties;
85
+ }
86
+ interface V3OptionChoice {
87
+ /**
88
+ * Option and choice IDs.
89
+ * @readonly
90
+ */
91
+ optionChoiceIds?: V3OptionChoiceIds;
92
+ /**
93
+ * Option and choice names.
94
+ * @readonly
95
+ */
96
+ optionChoiceNames?: V3OptionChoiceNames;
97
+ }
98
+ interface V3OptionChoiceIds {
99
+ /**
100
+ * Option ID.
101
+ * @minLength 1
102
+ * @maxLength 36
103
+ * @readonly
104
+ */
105
+ optionId?: string;
106
+ /**
107
+ * Choice ID.
108
+ * @format GUID
109
+ * @readonly
110
+ */
111
+ choiceId?: string;
112
+ }
113
+ interface V3OptionChoiceNames {
114
+ /**
115
+ * Option name.
116
+ * @minLength 1
117
+ * @maxLength 50
118
+ * @readonly
119
+ */
120
+ optionName?: string;
121
+ /**
122
+ * Choice name.
123
+ * @minLength 1
124
+ * @maxLength 50
125
+ * @readonly
126
+ */
127
+ choiceName?: string;
128
+ /**
129
+ * Render type.
130
+ * @readonly
131
+ * @maxLength 50
132
+ */
133
+ renderType?: string;
134
+ }
135
+ interface V3PriceInfo {
136
+ /**
137
+ * Variant price.
138
+ * @readonly
139
+ */
140
+ actualPrice?: V3FixedMonetaryAmount;
141
+ /**
142
+ * The compare-at-price represents the original price of a product before any discount.
143
+ * @readonly
144
+ */
145
+ compareAtPrice?: V3FixedMonetaryAmount;
146
+ }
147
+ interface V3FixedMonetaryAmount {
148
+ /**
149
+ * Monetary amount. For example, `"3.99"`, or `"-4.99"` for a negative amount.
150
+ * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
151
+ * @readonly
152
+ */
153
+ amount?: string;
154
+ /**
155
+ * Formatted monetary amount. For example, `"$3.99"`.
156
+ * @readonly
157
+ * @maxLength 20
158
+ */
159
+ formattedAmount?: string | null;
160
+ }
161
+ interface V3RevenueDetails {
162
+ /**
163
+ * Item cost.
164
+ * @readonly
165
+ */
166
+ cost?: V3FixedMonetaryAmount;
167
+ /**
168
+ * Profit. Calculated by reducing `cost` from `discountedPrice`.
169
+ * @readonly
170
+ */
171
+ profit?: V3FixedMonetaryAmount;
172
+ /**
173
+ * Profit Margin. Calculated by dividing `profit` by `discountedPrice`.
174
+ * The result is rounded to 4 decimal places.
175
+ * @readonly
176
+ * @max 1
177
+ */
178
+ profitMargin?: number;
179
+ }
180
+ interface V3ProductMedia extends V3ProductMediaSetByOneOf, V3ProductMediaMediaOneOf {
181
+ /**
182
+ * ID of existing media from Wix Media Manager.
183
+ * @minLength 1
184
+ * @maxLength 200
185
+ * @readonly
186
+ */
187
+ id?: string;
188
+ /**
189
+ * Media URL.
190
+ * @format WEB_URL
191
+ * @readonly
192
+ */
193
+ url?: string;
194
+ /**
195
+ * Product image.
196
+ * @readonly
197
+ */
198
+ image?: CommonImage;
199
+ /**
200
+ * Product video.
201
+ * @readonly
202
+ */
203
+ video?: CommonVideoV2;
204
+ /**
205
+ * Image alt text.
206
+ * @minLength 1
207
+ * @maxLength 1000
208
+ * @readonly
209
+ */
210
+ altText?: string | null;
211
+ /**
212
+ * Media display name.
213
+ * Allows to override the default media name. Can be passed only when `setBy: url`.
214
+ * @maxLength 80
215
+ * @readonly
216
+ */
217
+ displayName?: string | null;
218
+ /**
219
+ * Media type.
220
+ * @readonly
221
+ */
222
+ mediaType?: ProductMediaMediaTypeWithLiterals;
223
+ /**
224
+ * Media thumbnail.
225
+ * @readonly
226
+ */
227
+ thumbnail?: V3Thumbnail;
228
+ /**
229
+ * ID used to upload media to Wix Media Manager.
230
+ * @readonly
231
+ * @format GUID
232
+ */
233
+ uploadId?: string;
234
+ }
235
+ /** @oneof */
236
+ interface V3ProductMediaSetByOneOf {
237
+ /**
238
+ * ID of existing media from Wix Media Manager.
239
+ * @minLength 1
240
+ * @maxLength 200
241
+ * @readonly
242
+ */
243
+ id?: string;
244
+ /**
245
+ * Media URL.
246
+ * @format WEB_URL
247
+ * @readonly
248
+ */
249
+ url?: string;
250
+ }
251
+ /** @oneof */
252
+ interface V3ProductMediaMediaOneOf {
253
+ /**
254
+ * Product image.
255
+ * @readonly
256
+ */
257
+ image?: CommonImage;
258
+ /**
259
+ * Product video.
260
+ * @readonly
261
+ */
262
+ video?: CommonVideoV2;
263
+ }
264
+ interface CommonImage {
265
+ /**
266
+ * WixMedia image ID.
267
+ * @maxLength 400
268
+ */
269
+ id?: string;
270
+ /**
271
+ * Image URL.
272
+ * @format WEB_URL
273
+ */
274
+ url?: string;
275
+ /**
276
+ * Original image height.
277
+ * @readonly
278
+ */
279
+ height?: number;
280
+ /**
281
+ * Original image width.
282
+ * @readonly
283
+ */
284
+ width?: number;
285
+ /**
286
+ * Image alt text.
287
+ * @maxLength 200
288
+ */
289
+ altText?: string | null;
290
+ /**
291
+ * Image filename.
292
+ * @readonly
293
+ * @maxLength 200
294
+ */
295
+ filename?: string | null;
296
+ }
297
+ interface CommonVideoV2 {
298
+ /**
299
+ * WixMedia ID.
300
+ * @maxLength 400
301
+ */
302
+ id?: string;
303
+ /**
304
+ * Available resolutions for the video, starting with the optimal resolution.
305
+ * @readonly
306
+ * @maxSize 100
307
+ */
308
+ resolutions?: CommonVideoResolution[];
309
+ /**
310
+ * Video filename.
311
+ * @readonly
312
+ * @maxLength 200
313
+ */
314
+ filename?: string | null;
315
+ }
316
+ interface CommonVideoResolution {
317
+ /**
318
+ * Video URL.
319
+ * @format WEB_URL
320
+ */
321
+ url?: string;
322
+ /** Video height. */
323
+ height?: number;
324
+ /** Video width. */
325
+ width?: number;
326
+ /**
327
+ * Video format for example, mp4, hls.
328
+ * @maxLength 200
329
+ */
330
+ format?: string;
331
+ }
332
+ declare enum ProductMediaMediaType {
333
+ UNKNOWN_MEDIA_TYPE = "UNKNOWN_MEDIA_TYPE",
334
+ /** Image media type. */
335
+ IMAGE = "IMAGE",
336
+ /** Video media type. */
337
+ VIDEO = "VIDEO"
338
+ }
339
+ /** @enumType */
340
+ type ProductMediaMediaTypeWithLiterals = ProductMediaMediaType | 'UNKNOWN_MEDIA_TYPE' | 'IMAGE' | 'VIDEO';
341
+ interface V3Thumbnail {
342
+ /**
343
+ * Thumbnail url.
344
+ * @format WEB_URL
345
+ * @readonly
346
+ */
347
+ url?: string;
348
+ /**
349
+ * Thumbnail height.
350
+ * @readonly
351
+ */
352
+ height?: number;
353
+ /**
354
+ * Thumbnail width.
355
+ * @readonly
356
+ */
357
+ width?: number;
358
+ /**
359
+ * Thumbnail alt text.
360
+ * @minLength 1
361
+ * @maxLength 1000
362
+ * @readonly
363
+ */
364
+ altText?: string | null;
365
+ }
366
+ interface V3VariantPhysicalProperties {
367
+ /**
368
+ * Variant shipping weight.
369
+ * @max 999999999.99
370
+ * @readonly
371
+ */
372
+ weight?: number | null;
373
+ /**
374
+ * Price per unit info, in order to show price per unit on the product page.
375
+ * For example if one sells cheese and defines 100g here then we know that buying this variant buyer receives 100g of cheese.
376
+ * But on product page price will be displayed for units defined on product level. See `pricePerUnit.value` to understand how it's calculated.
377
+ * @readonly
378
+ */
379
+ pricePerUnit?: V3PricePerUnit;
380
+ }
381
+ interface V3PricePerUnit {
382
+ /**
383
+ * Price per unit data for this variant.
384
+ * `measurementUnit` value must correspond to the measurement unit set on the product.
385
+ * @readonly
386
+ */
387
+ settings?: V3PricePerUnitSettings;
388
+ /**
389
+ * Calculated value of price per unit. Takes into account `pricePerUnit` settings of parent product, of this variant, and discounted price of variant.
390
+ * For example if discounted price is 2$, product's price per unit setting is 1 Kg, variant price per unit setting is 0.5 Kg then this value is 4$ (means variant weight is 0.5 Kg and it costs 2$ but we want to show price per 1 Kg so we show 4$).
391
+ * @readonly
392
+ * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
393
+ */
394
+ value?: string;
395
+ /**
396
+ * Price per unit description.
397
+ * @readonly
398
+ * @maxLength 100
399
+ */
400
+ description?: string | null;
401
+ }
402
+ interface V3PricePerUnitSettings {
403
+ /**
404
+ * Quantity.
405
+ * For example, to define price per per 100 grams, set this field to `100`.
406
+ * @min 0.01
407
+ * @max 999999999.99
408
+ * @readonly
409
+ */
410
+ quantity?: number;
411
+ /**
412
+ * Measurement unit.
413
+ * For example, to define price per 100 grams, set this field to "G".
414
+ * @readonly
415
+ */
416
+ measurementUnit?: MeasurementUnitWithLiterals;
417
+ }
418
+ declare enum MeasurementUnit {
419
+ UNSPECIFIED = "UNSPECIFIED",
420
+ ML = "ML",
421
+ CL = "CL",
422
+ L = "L",
423
+ CBM = "CBM",
424
+ MG = "MG",
425
+ G = "G",
426
+ KG = "KG",
427
+ MM = "MM",
428
+ CM = "CM",
429
+ M = "M",
430
+ SQM = "SQM",
431
+ OZ = "OZ",
432
+ LB = "LB",
433
+ FLOZ = "FLOZ",
434
+ PT = "PT",
435
+ QT = "QT",
436
+ GAL = "GAL",
437
+ IN = "IN",
438
+ FT = "FT",
439
+ YD = "YD",
440
+ SQFT = "SQFT"
441
+ }
442
+ /** @enumType */
443
+ type MeasurementUnitWithLiterals = MeasurementUnit | 'UNSPECIFIED' | 'ML' | 'CL' | 'L' | 'CBM' | 'MG' | 'G' | 'KG' | 'MM' | 'CM' | 'M' | 'SQM' | 'OZ' | 'LB' | 'FLOZ' | 'PT' | 'QT' | 'GAL' | 'IN' | 'FT' | 'YD' | 'SQFT';
444
+ interface V3VariantDigitalProperties {
445
+ /**
446
+ * Digital file which will be downloaded by customer after successful purchase.
447
+ * @readonly
448
+ */
449
+ digitalFile?: V3SecuredMedia;
450
+ }
451
+ interface V3SecuredMedia {
452
+ /**
453
+ * Media ID in media manager.
454
+ * @minLength 1
455
+ * @maxLength 100
456
+ * @readonly
457
+ */
458
+ id?: string;
459
+ /**
460
+ * Original file name.
461
+ * @minLength 1
462
+ * @maxLength 1000
463
+ * @readonly
464
+ */
465
+ fileName?: string;
466
+ /**
467
+ * Original file size.
468
+ * @minLength 1
469
+ * @maxLength 1000
470
+ * @readonly
471
+ * @format DECIMAL_VALUE
472
+ * @decimalValue options { maxScale:0 }
473
+ */
474
+ fileSize?: string | null;
475
+ /**
476
+ * File type.
477
+ * @readonly
478
+ */
479
+ fileType?: SecuredMediaFileTypeWithLiterals;
480
+ }
481
+ declare enum SecuredMediaFileType {
482
+ /** Unspecified file type. */
483
+ UNSPECIFIED = "UNSPECIFIED",
484
+ /** Secure picture file. */
485
+ SECURE_PICTURE = "SECURE_PICTURE",
486
+ /** Secure video file. */
487
+ SECURE_VIDEO = "SECURE_VIDEO",
488
+ /** Secure document file. */
489
+ SECURE_DOCUMENT = "SECURE_DOCUMENT",
490
+ /** Secure music file. */
491
+ SECURE_MUSIC = "SECURE_MUSIC",
492
+ /** Secure archive file. */
493
+ SECURE_ARCHIVE = "SECURE_ARCHIVE"
494
+ }
495
+ /** @enumType */
496
+ type SecuredMediaFileTypeWithLiterals = SecuredMediaFileType | 'UNSPECIFIED' | 'SECURE_PICTURE' | 'SECURE_VIDEO' | 'SECURE_DOCUMENT' | 'SECURE_MUSIC' | 'SECURE_ARCHIVE';
497
+ interface V3SubscriptionPricesInfo {
498
+ /**
499
+ * Subscription prices.
500
+ * @maxSize 6
501
+ * @readonly
502
+ */
503
+ subscriptionPrices?: V3SubscriptionPrice[];
504
+ }
505
+ interface V3SubscriptionPrice {
506
+ /**
507
+ * Subscription ID.
508
+ * @format GUID
509
+ * @readonly
510
+ */
511
+ subscriptionId?: string;
512
+ /**
513
+ * Subscription price calculated by applying subscription discount to the variant `price.salePrice`
514
+ * @readonly
515
+ */
516
+ price?: V3FixedMonetaryAmount;
517
+ /**
518
+ * Price per unit info.
519
+ * @readonly
520
+ */
521
+ pricePerUnit?: V3SubscriptionPricePerUnit;
522
+ }
523
+ interface V3SubscriptionPricePerUnit {
524
+ /**
525
+ * Calculated value of price per unit. Takes into account `pricePerUnit` settings of parent product, `pricePerUnit` settings of this variant, and the variant subscription price.
526
+ * @readonly
527
+ * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
528
+ */
529
+ value?: string;
530
+ /**
531
+ * Price per unit description.
532
+ * @readonly
533
+ * @maxLength 20
534
+ */
535
+ description?: string | null;
536
+ }
537
+ interface V3InventoryStatus {
538
+ /**
539
+ * Whether the variant is in stock.
540
+ * @readonly
541
+ */
542
+ inStock?: boolean;
543
+ /**
544
+ * Whether preorder is enabled for this variant.
545
+ * @readonly
546
+ */
547
+ preorderEnabled?: boolean;
548
+ }
549
+ interface ProductFields extends ProductFieldsTypedPropertiesOneOf {
550
+ /**
551
+ * Physical properties.
552
+ *
553
+ * Required when `productType: PHYSICAL`.
554
+ */
555
+ physicalProperties?: V3PhysicalProperties;
556
+ /**
557
+ * product id
558
+ * @minLength 1
559
+ * @maxLength 36
560
+ * @readonly
561
+ */
562
+ productId?: string;
563
+ /**
564
+ * Product name.
565
+ * @minLength 1
566
+ * @maxLength 80
567
+ * @readonly
568
+ */
569
+ name?: string | null;
570
+ /**
571
+ * product type
572
+ * @readonly
573
+ */
574
+ productType?: V3ProductTypeWithLiterals;
575
+ /**
576
+ * Product slug.
577
+ * @format URL_SLUG
578
+ * @readonly
579
+ */
580
+ slug?: string | null;
581
+ /**
582
+ * Whether the product is visible to site visitors on the site.
583
+ *
584
+ * Default: `true`
585
+ * @readonly
586
+ */
587
+ visible?: boolean | null;
588
+ /**
589
+ * Whether the product is visible in POS (point of sale).
590
+ *
591
+ * Default: `true`
592
+ * > **Note:** Always `false` for `productType: DIGITAL`.
593
+ * @readonly
594
+ */
595
+ visibleInPos?: boolean | null;
596
+ /**
597
+ * Main category ID.
598
+ * @format GUID
599
+ * @readonly
600
+ */
601
+ mainCategoryId?: string | null;
602
+ /**
603
+ * Currency used for the pricing of this product, in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format.
604
+ *
605
+ * Defaults to the currency defined in the site settings, unless specified in `x-wix-currency` header.
606
+ * > **Note:** Returned only when you pass `"CURRENCY"` to the `fields` array in Products API requests.
607
+ * @format CURRENCY
608
+ * @readonly
609
+ */
610
+ currency?: string | null;
611
+ /**
612
+ * Product entity revision.
613
+ * @readonly
614
+ */
615
+ revision?: string | null;
616
+ }
617
+ /** @oneof */
618
+ interface ProductFieldsTypedPropertiesOneOf {
619
+ /**
620
+ * Physical properties.
621
+ *
622
+ * Required when `productType: PHYSICAL`.
623
+ */
624
+ physicalProperties?: V3PhysicalProperties;
625
+ }
626
+ declare enum V3ProductType {
627
+ /** Not implemented. */
628
+ UNKNOWN_PRODUCT_TYPE = "UNKNOWN_PRODUCT_TYPE",
629
+ /** Physical product. */
630
+ PHYSICAL = "PHYSICAL",
631
+ /** Digital product. */
632
+ DIGITAL = "DIGITAL"
633
+ }
634
+ /** @enumType */
635
+ type V3ProductTypeWithLiterals = V3ProductType | 'UNKNOWN_PRODUCT_TYPE' | 'PHYSICAL' | 'DIGITAL';
636
+ interface V3PhysicalProperties {
637
+ /**
638
+ * Weight measurement unit.
639
+ * > **Note:** Returned only when you pass `"WEIGHT_MEASUREMENT_UNIT_INFO"` to the `fields` array in Products API requests.
640
+ * @readonly
641
+ */
642
+ weightMeasurementUnitInfo?: V3WeightMeasurementUnitInfo;
643
+ }
644
+ interface V3WeightMeasurementUnitInfo {
645
+ /**
646
+ * Weight measurement unit.
647
+ * @readonly
648
+ */
649
+ weightMeasurementUnit?: WeightUnitWithLiterals;
650
+ }
651
+ declare enum WeightUnit {
652
+ /** Weight unit can't be classified due to an error. */
653
+ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
654
+ /** Kilograms. */
655
+ KG = "KG",
656
+ /** Pounds. */
657
+ LB = "LB"
658
+ }
659
+ /** @enumType */
660
+ type WeightUnitWithLiterals = WeightUnit | 'UNSPECIFIED_WEIGHT_UNIT' | 'KG' | 'LB';
661
+ interface QueryVariantsRequest {
662
+ /** WQL expression. */
663
+ query?: CursorQuery;
664
+ /**
665
+ * A list of requested fields to be included in the response.
666
+ * @maxSize 100
667
+ */
668
+ fields?: RequestedFieldsWithLiterals[];
669
+ }
670
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
671
+ /** 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`. */
672
+ cursorPaging?: CursorPaging;
673
+ /**
674
+ * Filter object in the following format:
675
+ * `"filter" : {
676
+ * "fieldName1": "value1",
677
+ * "fieldName2":{"$operator":"value2"}
678
+ * }`
679
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
680
+ */
681
+ filter?: Record<string, any> | null;
682
+ /**
683
+ * Sort object in the following format:
684
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
685
+ * @maxSize 5
686
+ */
687
+ sort?: Sorting[];
688
+ }
689
+ /** @oneof */
690
+ interface CursorQueryPagingMethodOneOf {
691
+ /** 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`. */
692
+ cursorPaging?: CursorPaging;
693
+ }
694
+ interface Sorting {
695
+ /**
696
+ * Name of the field to sort by.
697
+ * @maxLength 512
698
+ */
699
+ fieldName?: string;
700
+ /** Sort order. */
701
+ order?: SortOrderWithLiterals;
702
+ }
703
+ declare enum SortOrder {
704
+ ASC = "ASC",
705
+ DESC = "DESC"
706
+ }
707
+ /** @enumType */
708
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
709
+ interface CursorPaging {
710
+ /**
711
+ * Maximum number of items to return in the results.
712
+ * @max 1000
713
+ */
714
+ limit?: number | null;
715
+ /**
716
+ * Pointer to the next or previous page in the list of results.
717
+ *
718
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
719
+ * Not relevant for the first request.
720
+ * @maxLength 16000
721
+ */
722
+ cursor?: string | null;
723
+ }
724
+ declare enum RequestedFields {
725
+ /** Not implemented. */
726
+ UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
727
+ CURRENCY = "CURRENCY",
728
+ /** You can request merchant data only if you have the `SCOPE.STORES.PRODUCT_READ_ADMIN` permission scope. */
729
+ MERCHANT_DATA = "MERCHANT_DATA",
730
+ SUBSCRIPTION_PRICES_INFO = "SUBSCRIPTION_PRICES_INFO",
731
+ WEIGHT_MEASUREMENT_UNIT_INFO = "WEIGHT_MEASUREMENT_UNIT_INFO"
732
+ }
733
+ /** @enumType */
734
+ type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'CURRENCY' | 'MERCHANT_DATA' | 'SUBSCRIPTION_PRICES_INFO' | 'WEIGHT_MEASUREMENT_UNIT_INFO';
735
+ interface QueryVariantsResponse {
736
+ /** List of ReadOnlyVariants. */
737
+ variants?: ReadOnlyVariant[];
738
+ /** Paging metadata */
739
+ pagingMetadata?: CursorPagingMetadata;
740
+ }
741
+ interface CursorPagingMetadata {
742
+ /** Number of items returned in the response. */
743
+ count?: number | null;
744
+ /** Cursor strings that point to the next page, previous page, or both. */
745
+ cursors?: Cursors;
746
+ /**
747
+ * Whether there are more pages to retrieve following the current page.
748
+ *
749
+ * + `true`: Another page of results can be retrieved.
750
+ * + `false`: This is the last page.
751
+ */
752
+ hasNext?: boolean | null;
753
+ }
754
+ interface Cursors {
755
+ /**
756
+ * Cursor string pointing to the next page in the list of results.
757
+ * @maxLength 16000
758
+ */
759
+ next?: string | null;
760
+ /**
761
+ * Cursor pointing to the previous page in the list of results.
762
+ * @maxLength 16000
763
+ */
764
+ prev?: string | null;
765
+ }
766
+ interface SearchVariantsRequest {
767
+ /** WQL expression */
768
+ search?: CursorSearch;
769
+ /**
770
+ * A list of requested fields to be included in the response.
771
+ * @maxSize 100
772
+ */
773
+ fields?: RequestedFieldsWithLiterals[];
774
+ }
775
+ interface CursorSearch extends CursorSearchPagingMethodOneOf {
776
+ /**
777
+ * Cursor pointing to page of results.
778
+ * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
779
+ */
780
+ cursorPaging?: CursorPaging;
781
+ /** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */
782
+ filter?: Record<string, any> | null;
783
+ /**
784
+ * Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]
785
+ * @maxSize 10
786
+ */
787
+ sort?: Sorting[];
788
+ /**
789
+ * Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition.
790
+ * @maxSize 10
791
+ */
792
+ aggregations?: Aggregation[];
793
+ /** Free text to match in searchable fields */
794
+ search?: SearchDetails;
795
+ /**
796
+ * UTC offset or IANA time zone. Valid values are
797
+ * ISO 8601 UTC offsets, such as +02:00 or -06:00,
798
+ * and IANA time zone IDs, such as Europe/Rome
799
+ *
800
+ * Affects all filters and aggregations returned values.
801
+ * You may override this behavior in a specific filter by providing
802
+ * timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"`
803
+ * @maxLength 50
804
+ */
805
+ timeZone?: string | null;
806
+ }
807
+ /** @oneof */
808
+ interface CursorSearchPagingMethodOneOf {
809
+ /**
810
+ * Cursor pointing to page of results.
811
+ * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
812
+ */
813
+ cursorPaging?: CursorPaging;
814
+ }
815
+ interface Aggregation extends AggregationKindOneOf {
816
+ /** Value aggregation */
817
+ value?: ValueAggregation;
818
+ /** Range aggregation */
819
+ range?: RangeAggregation;
820
+ /** Scalar aggregation */
821
+ scalar?: ScalarAggregation;
822
+ /** Date histogram aggregation */
823
+ dateHistogram?: DateHistogramAggregation;
824
+ /** Nested aggregation */
825
+ nested?: NestedAggregation;
826
+ /**
827
+ * User-defined name of aggregation, should be unique, will appear in aggregation results
828
+ * @maxLength 100
829
+ */
830
+ name?: string | null;
831
+ /** Type of aggregation, client must provide matching aggregation field below */
832
+ type?: AggregationTypeWithLiterals;
833
+ /**
834
+ * Field to aggregate by, use dot notation to specify json path
835
+ * @maxLength 200
836
+ */
837
+ fieldPath?: string;
838
+ }
839
+ /** @oneof */
840
+ interface AggregationKindOneOf {
841
+ /** Value aggregation */
842
+ value?: ValueAggregation;
843
+ /** Range aggregation */
844
+ range?: RangeAggregation;
845
+ /** Scalar aggregation */
846
+ scalar?: ScalarAggregation;
847
+ /** Date histogram aggregation */
848
+ dateHistogram?: DateHistogramAggregation;
849
+ /** Nested aggregation */
850
+ nested?: NestedAggregation;
851
+ }
852
+ interface RangeBucket {
853
+ /** Inclusive lower bound of the range. Required if to is not given */
854
+ from?: number | null;
855
+ /** Exclusive upper bound of the range. Required if from is not given */
856
+ to?: number | null;
857
+ }
858
+ declare enum SortType {
859
+ /** Should sort by number of matches */
860
+ COUNT = "COUNT",
861
+ /** Should sort by value of the field alphabetically */
862
+ VALUE = "VALUE"
863
+ }
864
+ /** @enumType */
865
+ type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';
866
+ declare enum SortDirection {
867
+ /** Should sort in descending order */
868
+ DESC = "DESC",
869
+ /** Should sort in ascending order */
870
+ ASC = "ASC"
871
+ }
872
+ /** @enumType */
873
+ type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';
874
+ declare enum MissingValues {
875
+ /** Should missing values be excluded from the aggregation results */
876
+ EXCLUDE = "EXCLUDE",
877
+ /** Should missing values be included in the aggregation results */
878
+ INCLUDE = "INCLUDE"
879
+ }
880
+ /** @enumType */
881
+ type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';
882
+ interface IncludeMissingValuesOptions {
883
+ /**
884
+ * Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
885
+ * @maxLength 20
886
+ */
887
+ addToBucket?: string;
888
+ }
889
+ declare enum ScalarType {
890
+ UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
891
+ /** Count of distinct values */
892
+ COUNT_DISTINCT = "COUNT_DISTINCT",
893
+ /** Minimum value */
894
+ MIN = "MIN",
895
+ /** Maximum value */
896
+ MAX = "MAX"
897
+ }
898
+ /** @enumType */
899
+ type ScalarTypeWithLiterals = ScalarType | 'UNKNOWN_SCALAR_TYPE' | 'COUNT_DISTINCT' | 'MIN' | 'MAX';
900
+ interface ValueAggregation extends ValueAggregationOptionsOneOf {
901
+ /** Options for including missing values */
902
+ includeOptions?: IncludeMissingValuesOptions;
903
+ /** Should sort by number of matches or value of the field */
904
+ sortType?: SortTypeWithLiterals;
905
+ /** Should sort in ascending or descending order */
906
+ sortDirection?: SortDirectionWithLiterals;
907
+ /** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
908
+ limit?: number | null;
909
+ /** Should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
910
+ missingValues?: MissingValuesWithLiterals;
911
+ }
912
+ /** @oneof */
913
+ interface ValueAggregationOptionsOneOf {
914
+ /** Options for including missing values */
915
+ includeOptions?: IncludeMissingValuesOptions;
916
+ }
917
+ declare enum NestedAggregationType {
918
+ UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
919
+ /** An aggregation where result buckets are dynamically built - one per unique value */
920
+ VALUE = "VALUE",
921
+ /** An aggregation, where user can define set of ranges - each representing a bucket */
922
+ RANGE = "RANGE",
923
+ /** A single-value metric aggregation - e.g. min, max, sum, avg */
924
+ SCALAR = "SCALAR",
925
+ /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
926
+ DATE_HISTOGRAM = "DATE_HISTOGRAM"
927
+ }
928
+ /** @enumType */
929
+ type NestedAggregationTypeWithLiterals = NestedAggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM';
930
+ interface RangeAggregation {
931
+ /**
932
+ * List of range buckets, where during aggregation each entity will be placed in the first bucket where its value falls into based on provided range bounds
933
+ * @maxSize 50
934
+ */
935
+ buckets?: RangeBucket[];
936
+ }
937
+ interface ScalarAggregation {
938
+ /** Define the operator for the scalar aggregation */
939
+ type?: ScalarTypeWithLiterals;
940
+ }
941
+ interface DateHistogramAggregation {
942
+ /** Interval for date histogram aggregation */
943
+ interval?: IntervalWithLiterals;
944
+ }
945
+ declare enum Interval {
946
+ UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
947
+ /** Yearly interval */
948
+ YEAR = "YEAR",
949
+ /** Monthly interval */
950
+ MONTH = "MONTH",
951
+ /** Weekly interval */
952
+ WEEK = "WEEK",
953
+ /** Daily interval */
954
+ DAY = "DAY",
955
+ /** Hourly interval */
956
+ HOUR = "HOUR",
957
+ /** Minute interval */
958
+ MINUTE = "MINUTE",
959
+ /** Second interval */
960
+ SECOND = "SECOND"
961
+ }
962
+ /** @enumType */
963
+ type IntervalWithLiterals = Interval | 'UNKNOWN_INTERVAL' | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
964
+ interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
965
+ /** Value aggregation */
966
+ value?: ValueAggregation;
967
+ /** Range aggregation */
968
+ range?: RangeAggregation;
969
+ /** Scalar aggregation */
970
+ scalar?: ScalarAggregation;
971
+ /** Date histogram aggregation */
972
+ dateHistogram?: DateHistogramAggregation;
973
+ /**
974
+ * User-defined name of aggregation, should be unique, will appear in aggregation results
975
+ * @maxLength 100
976
+ */
977
+ name?: string | null;
978
+ /** Type of aggregation, client must provide matching aggregation field below */
979
+ type?: NestedAggregationTypeWithLiterals;
980
+ /**
981
+ * Field to aggregate by, use dont notation to specify json path
982
+ * @maxLength 200
983
+ */
984
+ fieldPath?: string;
985
+ }
986
+ /** @oneof */
987
+ interface NestedAggregationItemKindOneOf {
988
+ /** Value aggregation */
989
+ value?: ValueAggregation;
990
+ /** Range aggregation */
991
+ range?: RangeAggregation;
992
+ /** Scalar aggregation */
993
+ scalar?: ScalarAggregation;
994
+ /** Date histogram aggregation */
995
+ dateHistogram?: DateHistogramAggregation;
996
+ }
997
+ declare enum AggregationType {
998
+ UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
999
+ /** An aggregation where result buckets are dynamically built - one per unique value */
1000
+ VALUE = "VALUE",
1001
+ /** An aggregation, where user can define set of ranges - each representing a bucket */
1002
+ RANGE = "RANGE",
1003
+ /** A single-value metric aggregation - e.g. min, max, sum, avg */
1004
+ SCALAR = "SCALAR",
1005
+ /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
1006
+ DATE_HISTOGRAM = "DATE_HISTOGRAM",
1007
+ /** Multi-level aggregation, where each next aggregation is nested within previous one */
1008
+ NESTED = "NESTED"
1009
+ }
1010
+ /** @enumType */
1011
+ type AggregationTypeWithLiterals = AggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED';
1012
+ /** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
1013
+ interface NestedAggregation {
1014
+ /**
1015
+ * Flattened list of aggregations, where each next aggregation is nested within previous one
1016
+ * @minSize 2
1017
+ * @maxSize 3
1018
+ */
1019
+ nestedAggregations?: NestedAggregationItem[];
1020
+ }
1021
+ interface SearchDetails {
1022
+ /** Defines how separate search terms in `expression` are combined */
1023
+ mode?: ModeWithLiterals;
1024
+ /**
1025
+ * Search term or expression
1026
+ * @maxLength 100
1027
+ */
1028
+ expression?: string | null;
1029
+ /**
1030
+ * Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path
1031
+ * @maxLength 200
1032
+ * @maxSize 20
1033
+ */
1034
+ fields?: string[];
1035
+ /** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
1036
+ fuzzy?: boolean;
1037
+ }
1038
+ declare enum Mode {
1039
+ /** Any of the search terms must be present */
1040
+ OR = "OR",
1041
+ /** All search terms must be present */
1042
+ AND = "AND"
1043
+ }
1044
+ /** @enumType */
1045
+ type ModeWithLiterals = Mode | 'OR' | 'AND';
1046
+ interface SearchVariantsResponse {
1047
+ /** Variants which satisfy the provided query. */
1048
+ variants?: ReadOnlyVariant[];
1049
+ /** Paging metadata. Contains cursor which can be used in next query. */
1050
+ pagingMetadata?: CursorPagingMetadata;
1051
+ /** Aggregation data. */
1052
+ aggregationData?: AggregationData;
1053
+ }
1054
+ interface AggregationData {
1055
+ /**
1056
+ * key = aggregation name (as derived from search request)
1057
+ * @maxSize 10000
1058
+ */
1059
+ results?: AggregationResults[];
1060
+ }
1061
+ interface ValueAggregationResult {
1062
+ /**
1063
+ * Value of the field
1064
+ * @maxLength 100
1065
+ */
1066
+ value?: string;
1067
+ /** Count of entities with this value */
1068
+ count?: number;
1069
+ }
1070
+ interface RangeAggregationResult {
1071
+ /** Inclusive lower bound of the range */
1072
+ from?: number | null;
1073
+ /** Exclusive upper bound of the range */
1074
+ to?: number | null;
1075
+ /** Count of entities in this range */
1076
+ count?: number;
1077
+ }
1078
+ interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
1079
+ /** Value aggregation results */
1080
+ values?: ValueResults;
1081
+ /** Range aggregation results */
1082
+ ranges?: RangeResults;
1083
+ /** Scalar aggregation results */
1084
+ scalar?: AggregationResultsScalarResult;
1085
+ /**
1086
+ * User-defined name of aggregation, matches the one provided in request
1087
+ * @maxLength 100
1088
+ */
1089
+ name?: string;
1090
+ /** Type of aggregation that matches result */
1091
+ type?: AggregationTypeWithLiterals;
1092
+ /**
1093
+ * Field to aggregate by, matches the one provided in request
1094
+ * @maxLength 200
1095
+ */
1096
+ fieldPath?: string;
1097
+ }
1098
+ /** @oneof */
1099
+ interface NestedAggregationResultsResultOneOf {
1100
+ /** Value aggregation results */
1101
+ values?: ValueResults;
1102
+ /** Range aggregation results */
1103
+ ranges?: RangeResults;
1104
+ /** Scalar aggregation results */
1105
+ scalar?: AggregationResultsScalarResult;
1106
+ }
1107
+ interface ValueResults {
1108
+ /**
1109
+ * List of value aggregations
1110
+ * @maxSize 250
1111
+ */
1112
+ results?: ValueAggregationResult[];
1113
+ }
1114
+ interface RangeResults {
1115
+ /**
1116
+ * List of ranges returned in same order as requested
1117
+ * @maxSize 50
1118
+ */
1119
+ results?: RangeAggregationResult[];
1120
+ }
1121
+ interface AggregationResultsScalarResult {
1122
+ /** Type of scalar aggregation */
1123
+ type?: ScalarTypeWithLiterals;
1124
+ /** Value of the scalar aggregation */
1125
+ value?: number;
1126
+ }
1127
+ interface NestedValueAggregationResult {
1128
+ /**
1129
+ * Value of the field
1130
+ * @maxLength 1000
1131
+ */
1132
+ value?: string;
1133
+ /** Nested aggregations */
1134
+ nestedResults?: NestedAggregationResults;
1135
+ }
1136
+ interface ValueResult {
1137
+ /**
1138
+ * Value of the field
1139
+ * @maxLength 1000
1140
+ */
1141
+ value?: string;
1142
+ /** Count of entities with this value */
1143
+ count?: number | null;
1144
+ }
1145
+ interface RangeResult {
1146
+ /** Inclusive lower bound of the range */
1147
+ from?: number | null;
1148
+ /** Exclusive upper bound of the range */
1149
+ to?: number | null;
1150
+ /** Count of entities in this range */
1151
+ count?: number | null;
1152
+ }
1153
+ interface ScalarResult {
1154
+ /** Value of the scalar aggregation */
1155
+ value?: number;
1156
+ }
1157
+ interface NestedResultValue extends NestedResultValueResultOneOf {
1158
+ /** Value aggregation result */
1159
+ value?: ValueResult;
1160
+ /** Range aggregation result */
1161
+ range?: RangeResult;
1162
+ /** Scalar aggregation result */
1163
+ scalar?: ScalarResult;
1164
+ /** Date histogram aggregation result */
1165
+ dateHistogram?: ValueResult;
1166
+ }
1167
+ /** @oneof */
1168
+ interface NestedResultValueResultOneOf {
1169
+ /** Value aggregation result */
1170
+ value?: ValueResult;
1171
+ /** Range aggregation result */
1172
+ range?: RangeResult;
1173
+ /** Scalar aggregation result */
1174
+ scalar?: ScalarResult;
1175
+ /** Date histogram aggregation result */
1176
+ dateHistogram?: ValueResult;
1177
+ }
1178
+ interface Results {
1179
+ /** List of nested aggregations */
1180
+ results?: Record<string, NestedResultValue>;
1181
+ }
1182
+ interface DateHistogramResult {
1183
+ /**
1184
+ * Date in ISO 8601 format
1185
+ * @maxLength 100
1186
+ */
1187
+ value?: string;
1188
+ /** Count of documents in the bucket */
1189
+ count?: number;
1190
+ }
1191
+ interface GroupByValueResults {
1192
+ /**
1193
+ * List of value aggregations
1194
+ * @maxSize 1000
1195
+ */
1196
+ results?: NestedValueAggregationResult[];
1197
+ }
1198
+ interface DateHistogramResults {
1199
+ /**
1200
+ * List of date histogram aggregations
1201
+ * @maxSize 200
1202
+ */
1203
+ results?: DateHistogramResult[];
1204
+ }
1205
+ /**
1206
+ * Results of `NESTED` aggregation type in a flattened form
1207
+ * aggregations in resulting array are keyed by requested aggregation `name`.
1208
+ */
1209
+ interface NestedResults {
1210
+ /**
1211
+ * List of nested aggregations
1212
+ * @maxSize 1000
1213
+ */
1214
+ results?: Results[];
1215
+ }
1216
+ interface AggregationResults extends AggregationResultsResultOneOf {
1217
+ /** Value aggregation results */
1218
+ values?: ValueResults;
1219
+ /** Range aggregation results */
1220
+ ranges?: RangeResults;
1221
+ /** Scalar aggregation results */
1222
+ scalar?: AggregationResultsScalarResult;
1223
+ /** Group by value aggregation results */
1224
+ groupedByValue?: GroupByValueResults;
1225
+ /** Date histogram aggregation results */
1226
+ dateHistogram?: DateHistogramResults;
1227
+ /** Nested aggregation results */
1228
+ nested?: NestedResults;
1229
+ /**
1230
+ * User-defined name of aggregation as derived from search request
1231
+ * @maxLength 100
1232
+ */
1233
+ name?: string;
1234
+ /** Type of aggregation that must match provided kind as derived from search request */
1235
+ type?: AggregationTypeWithLiterals;
1236
+ /**
1237
+ * Field to aggregate by as derived from search request
1238
+ * @maxLength 200
1239
+ */
1240
+ fieldPath?: string;
1241
+ }
1242
+ /** @oneof */
1243
+ interface AggregationResultsResultOneOf {
1244
+ /** Value aggregation results */
1245
+ values?: ValueResults;
1246
+ /** Range aggregation results */
1247
+ ranges?: RangeResults;
1248
+ /** Scalar aggregation results */
1249
+ scalar?: AggregationResultsScalarResult;
1250
+ /** Group by value aggregation results */
1251
+ groupedByValue?: GroupByValueResults;
1252
+ /** Date histogram aggregation results */
1253
+ dateHistogram?: DateHistogramResults;
1254
+ /** Nested aggregation results */
1255
+ nested?: NestedResults;
1256
+ }
1257
+
1258
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
1259
+ getUrl: (context: any) => string;
1260
+ httpMethod: K;
1261
+ path: string;
1262
+ pathParams: M;
1263
+ __requestType: T;
1264
+ __originalRequestType: S;
1265
+ __responseType: Q;
1266
+ __originalResponseType: R;
1267
+ };
1268
+ declare function queryVariants(): __PublicMethodMetaInfo<'POST', {}, QueryVariantsRequest$1, QueryVariantsRequest, QueryVariantsResponse$1, QueryVariantsResponse>;
1269
+ declare function searchVariants(): __PublicMethodMetaInfo<'POST', {}, SearchVariantsRequest$1, SearchVariantsRequest, SearchVariantsResponse$1, SearchVariantsResponse>;
1270
+
1271
+ export { type __PublicMethodMetaInfo, queryVariants, searchVariants };