@wix/auto_sdk_stores_read-only-variants-v-3 1.0.15 → 1.0.17

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 (33) hide show
  1. package/build/cjs/index.d.ts +23 -4727
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/index.typings.d.ts +27 -0
  4. package/build/cjs/index.typings.js +913 -0
  5. package/build/cjs/index.typings.js.map +1 -0
  6. package/build/cjs/meta.d.ts +187 -81
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/{internal/cjs/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-Ba22Ko-1.d.ts → cjs/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-BvjIOy5Y.d.ts} +221 -98
  9. package/build/es/index.d.mts +23 -4727
  10. package/build/es/index.mjs.map +1 -1
  11. package/build/es/index.typings.d.mts +27 -0
  12. package/build/es/index.typings.mjs +821 -0
  13. package/build/es/index.typings.mjs.map +1 -0
  14. package/build/es/meta.d.mts +187 -81
  15. package/build/es/meta.mjs.map +1 -1
  16. package/build/{internal/es/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-Ba22Ko-1.d.mts → es/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-BvjIOy5Y.d.mts} +221 -98
  17. package/build/internal/cjs/index.d.ts +16 -16
  18. package/build/internal/cjs/index.js.map +1 -1
  19. package/build/internal/cjs/index.typings.d.ts +27 -0
  20. package/build/internal/cjs/index.typings.js +913 -0
  21. package/build/internal/cjs/index.typings.js.map +1 -0
  22. package/build/internal/cjs/meta.d.ts +187 -81
  23. package/build/internal/cjs/meta.js.map +1 -1
  24. package/build/internal/cjs/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-DwK-NZst.d.ts +4990 -0
  25. package/build/internal/es/index.d.mts +16 -16
  26. package/build/internal/es/index.mjs.map +1 -1
  27. package/build/internal/es/index.typings.d.mts +27 -0
  28. package/build/internal/es/index.typings.mjs +821 -0
  29. package/build/internal/es/index.typings.mjs.map +1 -0
  30. package/build/internal/es/meta.d.mts +187 -81
  31. package/build/internal/es/meta.mjs.map +1 -1
  32. package/build/internal/es/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-DwK-NZst.d.mts +4990 -0
  33. package/package.json +2 -2
@@ -1,4739 +1,35 @@
1
- import { SearchSpec } from '@wix/sdk-types';
1
+ import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { Q as QueryVariantsOptions, V as VariantsQueryBuilder, R as ReadOnlyVariantSearch, S as SearchVariantsOptions, a as SearchVariantsResponse } from './stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-BvjIOy5Y.mjs';
3
+ export { eq as ActionEvent, aU as Aggregation, b5 as AggregationData, bC as AggregationDateHistogramAggregation, aV as AggregationKindOneOf, bF as AggregationNestedAggregation, bA as AggregationRangeAggregation, bo as AggregationResults, bp as AggregationResultsResultOneOf, bc as AggregationResultsScalarResult, bB as AggregationScalarAggregation, A as AggregationType, by as AggregationValueAggregation, bz as AggregationValueAggregationOptionsOneOf, y as Alignment, cO as AnchorData, cU as AppEmbedData, cV as AppEmbedDataAppDataOneOf, a1 as AppType, d7 as AudioData, aa as AvailabilityStatus, cE as Background, cF as BackgroundBackgroundOneOf, _ as BackgroundType, da as BlockquoteData, cW as BookingData, bU as Border, d5 as BorderColors, dE as Brand, dU as BreadCrumb, dT as BreadcrumbsInfo, d9 as BulletedListData, bT as ButtonData, db as CaptionData, d4 as CellStyle, a8 as ChoiceType, du as ChoicesSettings, c3 as CodeBlockData, d0 as CollapsibleListData, cP as ColorData, bV as Colors, bu as CommonAggregation, bv as CommonAggregationKindOneOf, q as CommonAggregationType, o as CommonScalarType, bI as CommonSearchDetails, C as CommonSortOrder, bt as CommonSorting, at as CommonVideoResolution, dy as ConnectedModifier, dC as ConnectedModifierChoice, dD as ConnectedModifierChoiceValueOneOf, dz as ConnectedModifierModifierSettingsOneOf, ds as ConnectedOption, dv as ConnectedOptionChoice, dw as ConnectedOptionChoiceValueOneOf, dt as ConnectedOptionOptionSettingsOneOf, E as Crop, aN as CursorPaging, aP as CursorPagingMetadata, aK as CursorQuery, aL as CursorQueryPagingMethodOneOf, aS as CursorSearch, aT as CursorSearchPagingMethodOneOf, aQ as Cursors, b0 as DateHistogramAggregation, D as DateHistogramAggregationInterval, bk as DateHistogramResult, bm as DateHistogramResults, cM as Decoration, cN as DecorationDataOneOf, $ as DecorationType, bq as DeprecatedSearchVariantsWithOffsetRequest, bK as DeprecatedSearchVariantsWithOffsetResponse, cK as Design, d2 as Dimensions, a3 as Direction, ag as DiscountType, c5 as DividerData, de as DocumentStyle, ek as DomainEvent, el as DomainEventBodyOneOf, c_ as EmbedData, er as Empty, em as EntityCreatedEvent, ep as EntityDeletedEvent, eo as EntityUpdatedEvent, cX as EventData, e9 as ExtendedFields, c6 as FileData, c7 as FileSource, c8 as FileSourceDataOneOf, ae as FileType, dL as FixedMonetaryAmount, cS as FontSizeData, a0 as FontType, dA as FreeTextSettings, cl as GIF, ck as GIFData, G as GIFType, ca as GalleryData, cg as GalleryOptions, cD as Gradient, bG as GroupByAggregation, bH as GroupByAggregationKindOneOf, bl as GroupByValueResults, cn as HTMLData, co as HTMLDataDataOneOf, cm as HeadingData, b_ as Height, et as IdentificationData, eu as IdentificationDataIdOneOf, cc as Image, cp as ImageData, cr as ImageDataStyles, aX as IncludeMissingValuesOptions, dF as InfoSection, a2 as InitialExpandedItems, aI as InternalMetadata, I as InternalRowState, j as Interval, dM as Inventory, e8 as InventoryStatus, ce as Item, cf as ItemDataOneOf, ci as ItemStyle, dp as Keyword, ch as Layout, dc as LayoutCellData, B as LayoutType, L as LineStyle, c0 as Link, cQ as LinkData, c1 as LinkDataOneOf, cs as LinkPreviewData, ct as LinkPreviewDataStyles, d6 as ListValue, cu as MapData, cv as MapSettings, K as MapType, M as MeasurementUnit, dg as Media, dm as MediaItemsInfo, a6 as MediaType, cR as MentionData, es as MessageEnvelope, dd as Metadata, bM as MigrateProductVariantsRequest, eh as MigrateProductVariantsResponse, eg as MinVariantPriceInfo, h as MissingValues, k as Mode, dB as ModifierChoicesSettings, a9 as ModifierRenderType, dx as MultipleColors, b3 as NestedAggregation, b1 as NestedAggregationItem, b2 as NestedAggregationItemKindOneOf, bD as NestedAggregationNestedAggregationItem, bE as NestedAggregationNestedAggregationItemKindOneOf, p as NestedAggregationNestedAggregationType, b8 as NestedAggregationResults, b9 as NestedAggregationResultsResultOneOf, N as NestedAggregationType, bh as NestedResultValue, bi as NestedResultValueResultOneOf, bn as NestedResults, bd as NestedValueAggregationResult, bQ as Node, bR as NodeDataOneOf, bS as NodeStyle, s as NodeType, a5 as NullValue, c$ as Oembed, cz as Option, dY as OptionChoice, dZ as OptionChoiceIds, d_ as OptionChoiceNames, cH as OptionDesign, cC as OptionLayout, d8 as OrderedListData, O as Orientation, c9 as PDFSettings, bL as PagingMetadata, cw as ParagraphData, cy as Permissions, dN as PhysicalProperties, br as PlatformOffsetSearch, bs as PlatformOffsetSearchPagingMethodOneOf, bJ as PlatformPaging, cZ as PlaybackOptions, bW as PluginContainerData, u as PluginContainerDataAlignment, bX as PluginContainerDataWidth, bY as PluginContainerDataWidthDataOneOf, cI as Poll, cx as PollData, cJ as PollDataLayout, cG as PollDesign, cB as PollLayout, Z as PollLayoutDirection, Y as PollLayoutType, cA as PollSettings, J as Position, ab as PreorderStatus, d$ as PriceInfo, e2 as PricePerUnit, dQ as PricePerUnitRange, dR as PricePerUnitRangePricePerUnit, dO as PricePerUnitSettings, dK as PriceRange, bN as Product, dH as ProductCategoriesInfo, dI as ProductCategory, dJ as ProductCategoryIdsInfo, aE as ProductFields, aF as ProductFieldsTypedPropertiesOneOf, dh as ProductMedia, dj as ProductMediaMediaOneOf, P as ProductMediaMediaType, di as ProductMediaSetByOneOf, a7 as ProductOptionRenderType, ac as ProductPreorderAvailability, ad as ProductType, bO as ProductTypedPropertiesOneOf, aJ as QueryVariantsRequest, aO as QueryVariantsResponse, a_ as RangeAggregation, bw as RangeAggregationRangeBucket, b7 as RangeAggregationResult, aW as RangeBucket, bf as RangeResult, bb as RangeResults, ai as ReadOnlyVariant, ew as ReadOnlyVariantSearchSpec, aj as ReadOnlyVariantTypedPropertiesOneOf, ei as RecoverProductVariantsRequest, ej as RecoverProductVariantsResponse, c2 as Rel, e as RequestedFields, en as RestoreInfo, bj as Results, e0 as RevenueDetails, dG as Ribbon, bP as RichContent, a$ as ScalarAggregation, bg as ScalarResult, i as ScalarType, b4 as SearchDetails, r as SearchDetailsMode, aR as SearchVariantsRequest, e4 as SecuredMedia, b as SecuredMediaFileType, dn as SeoSchema, dr as Settings, g as SortDirection, d as SortOrder, f as SortType, aM as Sorting, H as Source, bZ as Spoiler, cT as SpoilerData, b$ as Styles, cq as StylesBorder, eb as Subscription, ec as SubscriptionCyclesOneOf, ea as SubscriptionDetails, ed as SubscriptionDiscount, ee as SubscriptionDiscountDiscountOneOf, af as SubscriptionFrequency, e6 as SubscriptionPrice, e7 as SubscriptionPricePerUnit, e5 as SubscriptionPricesInfo, d3 as TableCellData, d1 as TableData, dq as Tag, v as Target, w as TextAlignment, cL as TextData, df as TextNodeStyle, c4 as TextStyle, dl as Thumbnail, cj as Thumbnails, F as ThumbnailsAlignment, T as Type, cb as V1Media, ao as V3FixedMonetaryAmount, aD as V3InventoryStatus, ak as V3OptionChoice, al as V3OptionChoiceIds, am as V3OptionChoiceNames, aG as V3PhysicalProperties, an as V3PriceInfo, aw as V3PricePerUnit, ax as V3PricePerUnitSettings, aq as V3ProductMedia, as as V3ProductMediaMediaOneOf, ar as V3ProductMediaSetByOneOf, c as V3ProductType, ap as V3RevenueDetails, az as V3SecuredMedia, aB as V3SubscriptionPrice, aC as V3SubscriptionPricePerUnit, aA as V3SubscriptionPricesInfo, au as V3Thumbnail, ay as V3VariantDigitalProperties, av as V3VariantPhysicalProperties, aH as V3WeightMeasurementUnitInfo, aY as ValueAggregation, bx as ValueAggregationIncludeMissingValuesOptions, n as ValueAggregationMissingValues, aZ as ValueAggregationOptionsOneOf, b6 as ValueAggregationResult, m as ValueAggregationSortDirection, l as ValueAggregationSortType, be as ValueResult, ba as ValueResults, dW as Variant, e3 as VariantDigitalProperties, e1 as VariantPhysicalProperties, ef as VariantSummary, dX as VariantTypedPropertiesOneOf, dV as VariantsInfo, ev as VariantsQueryResult, a4 as VerticalAlignment, cd as Video, cY as VideoData, dk as VideoResolution, z as ViewMode, U as ViewRole, X as VoteRole, ah as WebhookIdentityType, dS as WeightMeasurementUnitInfo, dP as WeightRange, W as WeightUnit, x as Width, t as WidthType } from './stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-BvjIOy5Y.mjs';
2
4
 
3
- interface ReadOnlyVariant extends ReadOnlyVariantTypedPropertiesOneOf {
4
- /** Physical properties. Must be passed when `productType: PHYSICAL` */
5
- physicalProperties?: V3VariantPhysicalProperties;
6
- /** Digital properties. Must be passed when `productType: DIGITAL` */
7
- digitalProperties?: V3VariantDigitalProperties;
5
+ declare function queryVariants$1(httpClient: HttpClient): QueryVariantsSignature;
6
+ interface QueryVariantsSignature {
8
7
  /**
9
- * Variant ID.
10
- * @format GUID
11
- * @readonly
12
- */
13
- _id?: string;
14
- /**
15
- * Whether the variant is visible to site visitors.
16
- *
17
- * Default: `true`
18
- * @readonly
19
- */
20
- visible?: boolean | null;
21
- /**
22
- * Variant SKU (stock keeping unit).
23
- * @minLength 1
24
- * @maxLength 40
25
- * @readonly
26
- */
27
- sku?: string | null;
28
- /**
29
- * Variant barcode.
30
- * @minLength 1
31
- * @maxLength 40
32
- * @readonly
33
- */
34
- barcode?: string | null;
35
- /**
36
- * List of option choices
37
- * In case this list is empty, this is the default variant of an unmanaged product. - check if bridges need more than ids
38
- * @maxSize 6
39
- * @readonly
40
- */
41
- optionChoices?: V3OptionChoice[];
42
- /**
43
- * Variant price.
44
- * @readonly
45
- */
46
- price?: V3PriceInfo;
47
- /**
48
- * Variant revenue details.
49
- *
50
- * > **Note:** Returned only when the following conditions are met:
51
- * > + You pass `"MERCHANT_DATA"` to the `fields` array in Products API requests.
52
- * > + Your app has the required `SCOPE.STORES.PRODUCT_READ_ADMIN` permission scope.
53
- * @readonly
54
- */
55
- revenueDetails?: V3RevenueDetails;
56
- /**
57
- * Variant media.
58
- * @readonly
59
- */
60
- media?: V3ProductMedia;
61
- /**
62
- * Subscription prices calculated by applying subscription discount to the variant `price.actualPrice`.
63
- * > **Note:** Returned only when you pass `"SUBSCRIPTION_PRICES_INFO"` to the `fields` array in Products API requests.
64
- * @readonly
65
- */
66
- subscriptionPricesInfo?: V3SubscriptionPricesInfo;
67
- /**
68
- * Variant inventory status.
69
- * @readonly
70
- */
71
- inventoryStatus?: V3InventoryStatus;
72
- /**
73
- * Product fields
74
- * @readonly
75
- */
76
- productData?: ProductFields;
77
- }
78
- /** @oneof */
79
- interface ReadOnlyVariantTypedPropertiesOneOf {
80
- /** Physical properties. Must be passed when `productType: PHYSICAL` */
81
- physicalProperties?: V3VariantPhysicalProperties;
82
- /** Digital properties. Must be passed when `productType: DIGITAL` */
83
- digitalProperties?: V3VariantDigitalProperties;
84
- }
85
- interface V3OptionChoice {
86
- /**
87
- * Option and choice IDs.
88
- * @readonly
89
- */
90
- optionChoiceIds?: V3OptionChoiceIds;
91
- /**
92
- * Option and choice names.
93
- * @readonly
94
- */
95
- optionChoiceNames?: V3OptionChoiceNames;
96
- }
97
- interface V3OptionChoiceIds {
98
- /**
99
- * Option ID.
100
- * @minLength 1
101
- * @maxLength 36
102
- * @readonly
103
- */
104
- optionId?: string;
105
- /**
106
- * Choice ID.
107
- * @format GUID
108
- * @readonly
109
- */
110
- choiceId?: string;
111
- }
112
- interface V3OptionChoiceNames {
113
- /**
114
- * Option name.
115
- * @minLength 1
116
- * @maxLength 50
117
- * @readonly
118
- */
119
- optionName?: string;
120
- /**
121
- * Choice name.
122
- * @minLength 1
123
- * @maxLength 50
124
- * @readonly
125
- */
126
- choiceName?: string;
127
- /**
128
- * Render type.
129
- * @readonly
130
- * @maxLength 50
131
- */
132
- renderType?: string;
133
- }
134
- interface V3PriceInfo {
135
- /**
136
- * Variant price.
137
- * @readonly
138
- */
139
- actualPrice?: V3FixedMonetaryAmount;
140
- /**
141
- * The compare-at-price represents the original price of a product before any discount.
142
- * @readonly
143
- */
144
- compareAtPrice?: V3FixedMonetaryAmount;
145
- }
146
- interface V3FixedMonetaryAmount {
147
- /**
148
- * Monetary amount. For example, `"3.99"`, or `"-4.99"` for a negative amount.
149
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
150
- * @readonly
151
- */
152
- amount?: string;
153
- /**
154
- * Formatted monetary amount. For example, `"$3.99"`.
155
- * @readonly
156
- * @maxLength 20
157
- */
158
- formattedAmount?: string | null;
159
- }
160
- interface V3RevenueDetails {
161
- /**
162
- * Item cost.
163
- * @readonly
164
- */
165
- cost?: V3FixedMonetaryAmount;
166
- /**
167
- * Profit. Calculated by reducing `cost` from `discountedPrice`.
168
- * @readonly
169
- */
170
- profit?: V3FixedMonetaryAmount;
171
- /**
172
- * Profit Margin. Calculated by dividing `profit` by `discountedPrice`.
173
- * The result is rounded to 4 decimal places.
174
- * @readonly
175
- * @max 1
176
- */
177
- profitMargin?: number;
178
- }
179
- interface V3ProductMedia extends V3ProductMediaSetByOneOf, V3ProductMediaMediaOneOf {
180
- /**
181
- * ID of existing media from Wix Media Manager.
182
- * @minLength 1
183
- * @maxLength 200
184
- * @readonly
185
- */
186
- _id?: string;
187
- /**
188
- * Media URL.
189
- * @format WEB_URL
190
- * @readonly
191
- */
192
- url?: string;
193
- /**
194
- * Product image.
195
- * @readonly
196
- */
197
- image?: string;
198
- /**
199
- * Product video.
200
- * @readonly
201
- */
202
- video?: string;
203
- /**
204
- * Image alt text.
205
- * @minLength 1
206
- * @maxLength 1000
207
- * @readonly
208
- */
209
- altText?: string | null;
210
- /**
211
- * Media display name.
212
- * Allows to override the default media name. Can be passed only when `setBy: url`.
213
- * @maxLength 80
214
- * @readonly
215
- */
216
- displayName?: string | null;
217
- /**
218
- * Media type.
219
- * @readonly
220
- */
221
- mediaType?: ProductMediaMediaTypeWithLiterals;
222
- /**
223
- * Media thumbnail.
224
- * @readonly
225
- */
226
- thumbnail?: V3Thumbnail;
227
- /**
228
- * ID used to upload media to Wix Media Manager.
229
- * @readonly
230
- * @format GUID
231
- */
232
- uploadId?: string;
233
- }
234
- /** @oneof */
235
- interface V3ProductMediaSetByOneOf {
236
- /**
237
- * ID of existing media from Wix Media Manager.
238
- * @minLength 1
239
- * @maxLength 200
240
- * @readonly
241
- */
242
- _id?: string;
243
- /**
244
- * Media URL.
245
- * @format WEB_URL
246
- * @readonly
247
- */
248
- url?: string;
249
- }
250
- /** @oneof */
251
- interface V3ProductMediaMediaOneOf {
252
- /**
253
- * Product image.
254
- * @readonly
255
- */
256
- image?: string;
257
- /**
258
- * Product video.
259
- * @readonly
260
- */
261
- video?: string;
262
- }
263
- interface CommonVideoResolution {
264
- /**
265
- * Video URL.
266
- * @format WEB_URL
267
- */
268
- url?: string;
269
- /** Video height. */
270
- height?: number;
271
- /** Video width. */
272
- width?: number;
273
- /**
274
- * Video format for example, mp4, hls.
275
- * @maxLength 200
276
- */
277
- format?: string;
278
- }
279
- declare enum ProductMediaMediaType {
280
- UNKNOWN_MEDIA_TYPE = "UNKNOWN_MEDIA_TYPE",
281
- /** Image media type. */
282
- IMAGE = "IMAGE",
283
- /** Video media type. */
284
- VIDEO = "VIDEO"
285
- }
286
- /** @enumType */
287
- type ProductMediaMediaTypeWithLiterals = ProductMediaMediaType | 'UNKNOWN_MEDIA_TYPE' | 'IMAGE' | 'VIDEO';
288
- interface V3Thumbnail {
289
- /**
290
- * Thumbnail url.
291
- * @format WEB_URL
292
- * @readonly
293
- */
294
- url?: string;
295
- /**
296
- * Thumbnail height.
297
- * @readonly
298
- */
299
- height?: number;
300
- /**
301
- * Thumbnail width.
302
- * @readonly
303
- */
304
- width?: number;
305
- /**
306
- * Thumbnail alt text.
307
- * @minLength 1
308
- * @maxLength 1000
309
- * @readonly
310
- */
311
- altText?: string | null;
312
- }
313
- interface V3VariantPhysicalProperties {
314
- /**
315
- * Variant shipping weight.
316
- * @max 999999999.99
317
- * @readonly
318
- */
319
- weight?: number | null;
320
- /**
321
- * Price per unit info, in order to show price per unit on the product page.
322
- * For example if one sells cheese and defines 100g here then we know that buying this variant buyer receives 100g of cheese.
323
- * But on product page price will be displayed for units defined on product level. See `pricePerUnit.value` to understand how it's calculated.
324
- * @readonly
325
- */
326
- pricePerUnit?: V3PricePerUnit;
327
- }
328
- interface V3PricePerUnit {
329
- /**
330
- * Price per unit data for this variant.
331
- * `measurementUnit` value must correspond to the measurement unit set on the product.
332
- * @readonly
333
- */
334
- settings?: V3PricePerUnitSettings;
335
- /**
336
- * Calculated value of price per unit. Takes into account `pricePerUnit` settings of parent product, of this variant, and discounted price of variant.
337
- * 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$).
338
- * @readonly
339
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
340
- */
341
- value?: string;
342
- /**
343
- * Price per unit description.
344
- * @readonly
345
- * @maxLength 100
346
- */
347
- description?: string | null;
348
- }
349
- interface V3PricePerUnitSettings {
350
- /**
351
- * Quantity.
352
- * For example, to define price per per 100 grams, set this field to `100`.
353
- * @min 0.01
354
- * @max 999999999.99
355
- * @readonly
356
- */
357
- quantity?: number;
358
- /**
359
- * Measurement unit.
360
- * For example, to define price per 100 grams, set this field to "G".
361
- * @readonly
362
- */
363
- measurementUnit?: MeasurementUnitWithLiterals;
364
- }
365
- declare enum MeasurementUnit {
366
- UNSPECIFIED = "UNSPECIFIED",
367
- ML = "ML",
368
- CL = "CL",
369
- L = "L",
370
- CBM = "CBM",
371
- MG = "MG",
372
- G = "G",
373
- KG = "KG",
374
- MM = "MM",
375
- CM = "CM",
376
- M = "M",
377
- SQM = "SQM",
378
- OZ = "OZ",
379
- LB = "LB",
380
- FLOZ = "FLOZ",
381
- PT = "PT",
382
- QT = "QT",
383
- GAL = "GAL",
384
- IN = "IN",
385
- FT = "FT",
386
- YD = "YD",
387
- SQFT = "SQFT"
388
- }
389
- /** @enumType */
390
- 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';
391
- interface V3VariantDigitalProperties {
392
- /**
393
- * Digital file which will be downloaded by customer after successful purchase.
394
- * @readonly
395
- */
396
- digitalFile?: V3SecuredMedia;
397
- }
398
- interface V3SecuredMedia {
399
- /**
400
- * Media ID in media manager.
401
- * @minLength 1
402
- * @maxLength 100
403
- * @readonly
404
- */
405
- _id?: string;
406
- /**
407
- * Original file name.
408
- * @minLength 1
409
- * @maxLength 1000
410
- * @readonly
411
- */
412
- fileName?: string;
413
- /**
414
- * Original file size.
415
- * @minLength 1
416
- * @maxLength 1000
417
- * @readonly
418
- * @format DECIMAL_VALUE
419
- * @decimalValue options { maxScale:0 }
420
- */
421
- fileSize?: string | null;
422
- /**
423
- * File type.
424
- * @readonly
425
- */
426
- fileType?: SecuredMediaFileTypeWithLiterals;
427
- }
428
- declare enum SecuredMediaFileType {
429
- /** Unspecified file type. */
430
- UNSPECIFIED = "UNSPECIFIED",
431
- /** Secure picture file. */
432
- SECURE_PICTURE = "SECURE_PICTURE",
433
- /** Secure video file. */
434
- SECURE_VIDEO = "SECURE_VIDEO",
435
- /** Secure document file. */
436
- SECURE_DOCUMENT = "SECURE_DOCUMENT",
437
- /** Secure music file. */
438
- SECURE_MUSIC = "SECURE_MUSIC",
439
- /** Secure archive file. */
440
- SECURE_ARCHIVE = "SECURE_ARCHIVE"
441
- }
442
- /** @enumType */
443
- type SecuredMediaFileTypeWithLiterals = SecuredMediaFileType | 'UNSPECIFIED' | 'SECURE_PICTURE' | 'SECURE_VIDEO' | 'SECURE_DOCUMENT' | 'SECURE_MUSIC' | 'SECURE_ARCHIVE';
444
- interface V3SubscriptionPricesInfo {
445
- /**
446
- * Subscription prices.
447
- * @maxSize 6
448
- * @readonly
449
- */
450
- subscriptionPrices?: V3SubscriptionPrice[];
451
- }
452
- interface V3SubscriptionPrice {
453
- /**
454
- * Subscription ID.
455
- * @format GUID
456
- * @readonly
457
- */
458
- subscriptionId?: string;
459
- /**
460
- * Subscription price calculated by applying subscription discount to the variant `price.salePrice`
461
- * @readonly
462
- */
463
- price?: V3FixedMonetaryAmount;
464
- /**
465
- * Price per unit info.
466
- * @readonly
467
- */
468
- pricePerUnit?: V3SubscriptionPricePerUnit;
469
- }
470
- interface V3SubscriptionPricePerUnit {
471
- /**
472
- * Calculated value of price per unit. Takes into account `pricePerUnit` settings of parent product, `pricePerUnit` settings of this variant, and the variant subscription price.
473
- * @readonly
474
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
475
- */
476
- value?: string;
477
- /**
478
- * Price per unit description.
479
- * @readonly
480
- * @maxLength 20
481
- */
482
- description?: string | null;
483
- }
484
- interface V3InventoryStatus {
485
- /**
486
- * Whether the variant is in stock.
487
- * @readonly
488
- */
489
- inStock?: boolean;
490
- /**
491
- * Whether preorder is enabled for this variant.
492
- * @readonly
493
- */
494
- preorderEnabled?: boolean;
495
- }
496
- interface ProductFields extends ProductFieldsTypedPropertiesOneOf {
497
- /**
498
- * Physical properties.
499
- *
500
- * Required when `productType: PHYSICAL`.
501
- */
502
- physicalProperties?: V3PhysicalProperties;
503
- /**
504
- * product id
505
- * @minLength 1
506
- * @maxLength 36
507
- * @readonly
508
- */
509
- productId?: string;
510
- /**
511
- * Product name.
512
- * @minLength 1
513
- * @maxLength 80
514
- * @readonly
515
- */
516
- name?: string | null;
517
- /**
518
- * product type
519
- * @readonly
520
- */
521
- productType?: V3ProductTypeWithLiterals;
522
- /**
523
- * Product slug.
524
- * @format URL_SLUG
525
- * @readonly
526
- */
527
- slug?: string | null;
528
- /**
529
- * Whether the product is visible to site visitors on the site.
530
- *
531
- * Default: `true`
532
- * @readonly
533
- */
534
- visible?: boolean | null;
535
- /**
536
- * Whether the product is visible in POS (point of sale).
537
- *
538
- * Default: `true`
539
- * > **Note:** Always `false` for `productType: DIGITAL`.
540
- * @readonly
541
- */
542
- visibleInPos?: boolean | null;
543
- /**
544
- * Main category ID.
545
- * @format GUID
546
- * @readonly
547
- */
548
- mainCategoryId?: string | null;
549
- /**
550
- * 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.
551
- *
552
- * Defaults to the currency defined in the site settings, unless specified in `x-wix-currency` header.
553
- * > **Note:** Returned only when you pass `"CURRENCY"` to the `fields` array in Products API requests.
554
- * @format CURRENCY
555
- * @readonly
556
- */
557
- currency?: string | null;
558
- /**
559
- * Product entity revision.
560
- * @readonly
561
- */
562
- revision?: string | null;
563
- }
564
- /** @oneof */
565
- interface ProductFieldsTypedPropertiesOneOf {
566
- /**
567
- * Physical properties.
568
- *
569
- * Required when `productType: PHYSICAL`.
570
- */
571
- physicalProperties?: V3PhysicalProperties;
572
- }
573
- declare enum V3ProductType {
574
- /** Not implemented. */
575
- UNKNOWN_PRODUCT_TYPE = "UNKNOWN_PRODUCT_TYPE",
576
- /** Physical product. */
577
- PHYSICAL = "PHYSICAL",
578
- /** Digital product. */
579
- DIGITAL = "DIGITAL"
580
- }
581
- /** @enumType */
582
- type V3ProductTypeWithLiterals = V3ProductType | 'UNKNOWN_PRODUCT_TYPE' | 'PHYSICAL' | 'DIGITAL';
583
- interface V3PhysicalProperties {
584
- /**
585
- * Weight measurement unit.
586
- * > **Note:** Returned only when you pass `"WEIGHT_MEASUREMENT_UNIT_INFO"` to the `fields` array in Products API requests.
587
- * @readonly
588
- */
589
- weightMeasurementUnitInfo?: V3WeightMeasurementUnitInfo;
590
- }
591
- interface V3WeightMeasurementUnitInfo {
592
- /**
593
- * Weight measurement unit.
594
- * @readonly
595
- */
596
- weightMeasurementUnit?: WeightUnitWithLiterals;
597
- }
598
- declare enum WeightUnit {
599
- /** Weight unit can't be classified due to an error. */
600
- UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
601
- /** Kilograms. */
602
- KG = "KG",
603
- /** Pounds. */
604
- LB = "LB"
605
- }
606
- /** @enumType */
607
- type WeightUnitWithLiterals = WeightUnit | 'UNSPECIFIED_WEIGHT_UNIT' | 'KG' | 'LB';
608
- interface InternalMetadata {
609
- }
610
- declare enum InternalRowState {
611
- /** Not implemented. */
612
- UNKNOWN_ROW_STATE = "UNKNOWN_ROW_STATE",
613
- /** Variant is ready to be read. */
614
- READY = "READY",
615
- /** Variant is being processed. */
616
- IN_PROCESS = "IN_PROCESS",
617
- /** Variant is soft deleted. */
618
- SOFT_DELETED = "SOFT_DELETED",
619
- /** Variant is permanently deleted. */
620
- PERMANENTLY_DELETED = "PERMANENTLY_DELETED"
621
- }
622
- interface QueryVariantsRequest {
623
- /** WQL expression. */
624
- query?: CursorQuery;
625
- /**
626
- * A list of requested fields to be included in the response.
627
- * @maxSize 100
628
- */
629
- fields?: RequestedFieldsWithLiterals[];
630
- }
631
- interface CursorQuery extends CursorQueryPagingMethodOneOf {
632
- /** 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`. */
633
- cursorPaging?: CursorPaging;
634
- /**
635
- * Filter object in the following format:
636
- * `"filter" : {
637
- * "fieldName1": "value1",
638
- * "fieldName2":{"$operator":"value2"}
639
- * }`
640
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
641
- */
642
- filter?: Record<string, any> | null;
643
- /**
644
- * Sort object in the following format:
645
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
646
- * @maxSize 5
647
- */
648
- sort?: Sorting[];
649
- }
650
- /** @oneof */
651
- interface CursorQueryPagingMethodOneOf {
652
- /** 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`. */
653
- cursorPaging?: CursorPaging;
654
- }
655
- interface Sorting {
656
- /**
657
- * Name of the field to sort by.
658
- * @maxLength 512
659
- */
660
- fieldName?: string;
661
- /** Sort order. */
662
- order?: SortOrderWithLiterals;
663
- }
664
- declare enum SortOrder {
665
- ASC = "ASC",
666
- DESC = "DESC"
667
- }
668
- /** @enumType */
669
- type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
670
- interface CursorPaging {
671
- /**
672
- * Maximum number of items to return in the results.
673
- * @max 1000
674
- */
675
- limit?: number | null;
676
- /**
677
- * Pointer to the next or previous page in the list of results.
678
- *
679
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
680
- * Not relevant for the first request.
681
- * @maxLength 16000
682
- */
683
- cursor?: string | null;
684
- }
685
- declare enum RequestedFields {
686
- /** Not implemented. */
687
- UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
688
- CURRENCY = "CURRENCY",
689
- /** You can request merchant data only if you have the `SCOPE.STORES.PRODUCT_READ_ADMIN` permission scope. */
690
- MERCHANT_DATA = "MERCHANT_DATA",
691
- SUBSCRIPTION_PRICES_INFO = "SUBSCRIPTION_PRICES_INFO",
692
- WEIGHT_MEASUREMENT_UNIT_INFO = "WEIGHT_MEASUREMENT_UNIT_INFO"
693
- }
694
- /** @enumType */
695
- type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'CURRENCY' | 'MERCHANT_DATA' | 'SUBSCRIPTION_PRICES_INFO' | 'WEIGHT_MEASUREMENT_UNIT_INFO';
696
- interface QueryVariantsResponse {
697
- /** List of ReadOnlyVariants. */
698
- variants?: ReadOnlyVariant[];
699
- /** Paging metadata */
700
- pagingMetadata?: CursorPagingMetadata;
701
- }
702
- interface CursorPagingMetadata {
703
- /** Number of items returned in the response. */
704
- count?: number | null;
705
- /** Cursor strings that point to the next page, previous page, or both. */
706
- cursors?: Cursors;
707
- /**
708
- * Whether there are more pages to retrieve following the current page.
709
- *
710
- * + `true`: Another page of results can be retrieved.
711
- * + `false`: This is the last page.
712
- */
713
- hasNext?: boolean | null;
714
- }
715
- interface Cursors {
716
- /**
717
- * Cursor string pointing to the next page in the list of results.
718
- * @maxLength 16000
719
- */
720
- next?: string | null;
721
- /**
722
- * Cursor pointing to the previous page in the list of results.
723
- * @maxLength 16000
724
- */
725
- prev?: string | null;
726
- }
727
- interface SearchVariantsRequest {
728
- /** WQL expression */
729
- search?: CursorSearch;
730
- /**
731
- * A list of requested fields to be included in the response.
732
- * @maxSize 100
733
- */
734
- fields?: RequestedFieldsWithLiterals[];
735
- }
736
- interface CursorSearch extends CursorSearchPagingMethodOneOf {
737
- /**
738
- * Cursor pointing to page of results.
739
- * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
740
- */
741
- cursorPaging?: CursorPaging;
742
- /** 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) */
743
- filter?: Record<string, any> | null;
744
- /**
745
- * Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]
746
- * @maxSize 10
747
- */
748
- sort?: Sorting[];
749
- /**
750
- * 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.
751
- * @maxSize 10
752
- */
753
- aggregations?: Aggregation[];
754
- /** Free text to match in searchable fields */
755
- search?: SearchDetails;
756
- /**
757
- * UTC offset or IANA time zone. Valid values are
758
- * ISO 8601 UTC offsets, such as +02:00 or -06:00,
759
- * and IANA time zone IDs, such as Europe/Rome
760
- *
761
- * Affects all filters and aggregations returned values.
762
- * You may override this behavior in a specific filter by providing
763
- * timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"`
764
- * @maxLength 50
765
- */
766
- timeZone?: string | null;
767
- }
768
- /** @oneof */
769
- interface CursorSearchPagingMethodOneOf {
770
- /**
771
- * Cursor pointing to page of results.
772
- * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
773
- */
774
- cursorPaging?: CursorPaging;
775
- }
776
- interface Aggregation extends AggregationKindOneOf {
777
- /** Value aggregation */
778
- value?: ValueAggregation;
779
- /** Range aggregation */
780
- range?: RangeAggregation;
781
- /** Scalar aggregation */
782
- scalar?: ScalarAggregation;
783
- /** Date histogram aggregation */
784
- dateHistogram?: DateHistogramAggregation;
785
- /** Nested aggregation */
786
- nested?: NestedAggregation;
787
- /**
788
- * User-defined name of aggregation, should be unique, will appear in aggregation results
789
- * @maxLength 100
790
- */
791
- name?: string | null;
792
- /** Type of aggregation, client must provide matching aggregation field below */
793
- type?: AggregationTypeWithLiterals;
794
- /**
795
- * Field to aggregate by, use dot notation to specify json path
796
- * @maxLength 200
797
- */
798
- fieldPath?: string;
799
- }
800
- /** @oneof */
801
- interface AggregationKindOneOf {
802
- /** Value aggregation */
803
- value?: ValueAggregation;
804
- /** Range aggregation */
805
- range?: RangeAggregation;
806
- /** Scalar aggregation */
807
- scalar?: ScalarAggregation;
808
- /** Date histogram aggregation */
809
- dateHistogram?: DateHistogramAggregation;
810
- /** Nested aggregation */
811
- nested?: NestedAggregation;
812
- }
813
- interface RangeBucket {
814
- /** Inclusive lower bound of the range. Required if to is not given */
815
- from?: number | null;
816
- /** Exclusive upper bound of the range. Required if from is not given */
817
- to?: number | null;
818
- }
819
- declare enum SortType {
820
- /** Should sort by number of matches */
821
- COUNT = "COUNT",
822
- /** Should sort by value of the field alphabetically */
823
- VALUE = "VALUE"
824
- }
825
- /** @enumType */
826
- type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';
827
- declare enum SortDirection {
828
- /** Should sort in descending order */
829
- DESC = "DESC",
830
- /** Should sort in ascending order */
831
- ASC = "ASC"
832
- }
833
- /** @enumType */
834
- type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';
835
- declare enum MissingValues {
836
- /** Should missing values be excluded from the aggregation results */
837
- EXCLUDE = "EXCLUDE",
838
- /** Should missing values be included in the aggregation results */
839
- INCLUDE = "INCLUDE"
840
- }
841
- /** @enumType */
842
- type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';
843
- interface IncludeMissingValuesOptions {
844
- /**
845
- * Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
846
- * @maxLength 20
847
- */
848
- addToBucket?: string;
849
- }
850
- declare enum ScalarType {
851
- UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
852
- /** Count of distinct values */
853
- COUNT_DISTINCT = "COUNT_DISTINCT",
854
- /** Minimum value */
855
- MIN = "MIN",
856
- /** Maximum value */
857
- MAX = "MAX"
858
- }
859
- /** @enumType */
860
- type ScalarTypeWithLiterals = ScalarType | 'UNKNOWN_SCALAR_TYPE' | 'COUNT_DISTINCT' | 'MIN' | 'MAX';
861
- interface ValueAggregation extends ValueAggregationOptionsOneOf {
862
- /** Options for including missing values */
863
- includeOptions?: IncludeMissingValuesOptions;
864
- /** Should sort by number of matches or value of the field */
865
- sortType?: SortTypeWithLiterals;
866
- /** Should sort in ascending or descending order */
867
- sortDirection?: SortDirectionWithLiterals;
868
- /** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
869
- limit?: number | null;
870
- /** Should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
871
- missingValues?: MissingValuesWithLiterals;
872
- }
873
- /** @oneof */
874
- interface ValueAggregationOptionsOneOf {
875
- /** Options for including missing values */
876
- includeOptions?: IncludeMissingValuesOptions;
877
- }
878
- declare enum NestedAggregationType {
879
- UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
880
- /** An aggregation where result buckets are dynamically built - one per unique value */
881
- VALUE = "VALUE",
882
- /** An aggregation, where user can define set of ranges - each representing a bucket */
883
- RANGE = "RANGE",
884
- /** A single-value metric aggregation - e.g. min, max, sum, avg */
885
- SCALAR = "SCALAR",
886
- /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
887
- DATE_HISTOGRAM = "DATE_HISTOGRAM"
888
- }
889
- /** @enumType */
890
- type NestedAggregationTypeWithLiterals = NestedAggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM';
891
- interface RangeAggregation {
892
- /**
893
- * 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
894
- * @maxSize 50
895
- */
896
- buckets?: RangeBucket[];
897
- }
898
- interface ScalarAggregation {
899
- /** Define the operator for the scalar aggregation */
900
- type?: ScalarTypeWithLiterals;
901
- }
902
- interface DateHistogramAggregation {
903
- /** Interval for date histogram aggregation */
904
- interval?: IntervalWithLiterals;
905
- }
906
- declare enum Interval {
907
- UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
908
- /** Yearly interval */
909
- YEAR = "YEAR",
910
- /** Monthly interval */
911
- MONTH = "MONTH",
912
- /** Weekly interval */
913
- WEEK = "WEEK",
914
- /** Daily interval */
915
- DAY = "DAY",
916
- /** Hourly interval */
917
- HOUR = "HOUR",
918
- /** Minute interval */
919
- MINUTE = "MINUTE",
920
- /** Second interval */
921
- SECOND = "SECOND"
922
- }
923
- /** @enumType */
924
- type IntervalWithLiterals = Interval | 'UNKNOWN_INTERVAL' | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
925
- interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
926
- /** Value aggregation */
927
- value?: ValueAggregation;
928
- /** Range aggregation */
929
- range?: RangeAggregation;
930
- /** Scalar aggregation */
931
- scalar?: ScalarAggregation;
932
- /** Date histogram aggregation */
933
- dateHistogram?: DateHistogramAggregation;
934
- /**
935
- * User-defined name of aggregation, should be unique, will appear in aggregation results
936
- * @maxLength 100
937
- */
938
- name?: string | null;
939
- /** Type of aggregation, client must provide matching aggregation field below */
940
- type?: NestedAggregationTypeWithLiterals;
941
- /**
942
- * Field to aggregate by, use dont notation to specify json path
943
- * @maxLength 200
944
- */
945
- fieldPath?: string;
946
- }
947
- /** @oneof */
948
- interface NestedAggregationItemKindOneOf {
949
- /** Value aggregation */
950
- value?: ValueAggregation;
951
- /** Range aggregation */
952
- range?: RangeAggregation;
953
- /** Scalar aggregation */
954
- scalar?: ScalarAggregation;
955
- /** Date histogram aggregation */
956
- dateHistogram?: DateHistogramAggregation;
957
- }
958
- declare enum AggregationType {
959
- UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
960
- /** An aggregation where result buckets are dynamically built - one per unique value */
961
- VALUE = "VALUE",
962
- /** An aggregation, where user can define set of ranges - each representing a bucket */
963
- RANGE = "RANGE",
964
- /** A single-value metric aggregation - e.g. min, max, sum, avg */
965
- SCALAR = "SCALAR",
966
- /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
967
- DATE_HISTOGRAM = "DATE_HISTOGRAM",
968
- /** Multi-level aggregation, where each next aggregation is nested within previous one */
969
- NESTED = "NESTED"
970
- }
971
- /** @enumType */
972
- type AggregationTypeWithLiterals = AggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED';
973
- /** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
974
- interface NestedAggregation {
975
- /**
976
- * Flattened list of aggregations, where each next aggregation is nested within previous one
977
- * @minSize 2
978
- * @maxSize 3
979
- */
980
- nestedAggregations?: NestedAggregationItem[];
981
- }
982
- interface SearchDetails {
983
- /** Defines how separate search terms in `expression` are combined */
984
- mode?: ModeWithLiterals;
985
- /**
986
- * Search term or expression
987
- * @maxLength 100
988
- */
989
- expression?: string | null;
990
- /**
991
- * Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path
992
- * @maxLength 200
993
- * @maxSize 20
994
- */
995
- fields?: string[];
996
- /** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
997
- fuzzy?: boolean;
998
- }
999
- declare enum Mode {
1000
- /** Any of the search terms must be present */
1001
- OR = "OR",
1002
- /** All search terms must be present */
1003
- AND = "AND"
1004
- }
1005
- /** @enumType */
1006
- type ModeWithLiterals = Mode | 'OR' | 'AND';
1007
- interface SearchVariantsResponse {
1008
- /** Variants which satisfy the provided query. */
1009
- variants?: ReadOnlyVariant[];
1010
- /** Paging metadata. Contains cursor which can be used in next query. */
1011
- pagingMetadata?: CursorPagingMetadata;
1012
- /** Aggregation data. */
1013
- aggregationData?: AggregationData;
1014
- }
1015
- interface AggregationData {
1016
- /**
1017
- * key = aggregation name (as derived from search request)
1018
- * @maxSize 10000
1019
- */
1020
- results?: AggregationResults[];
1021
- }
1022
- interface ValueAggregationResult {
1023
- /**
1024
- * Value of the field
1025
- * @maxLength 100
1026
- */
1027
- value?: string;
1028
- /** Count of entities with this value */
1029
- count?: number;
1030
- }
1031
- interface RangeAggregationResult {
1032
- /** Inclusive lower bound of the range */
1033
- from?: number | null;
1034
- /** Exclusive upper bound of the range */
1035
- to?: number | null;
1036
- /** Count of entities in this range */
1037
- count?: number;
1038
- }
1039
- interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
1040
- /** Value aggregation results */
1041
- values?: ValueResults;
1042
- /** Range aggregation results */
1043
- ranges?: RangeResults;
1044
- /** Scalar aggregation results */
1045
- scalar?: AggregationResultsScalarResult;
1046
- /**
1047
- * User-defined name of aggregation, matches the one provided in request
1048
- * @maxLength 100
1049
- */
1050
- name?: string;
1051
- /** Type of aggregation that matches result */
1052
- type?: AggregationTypeWithLiterals;
1053
- /**
1054
- * Field to aggregate by, matches the one provided in request
1055
- * @maxLength 200
1056
- */
1057
- fieldPath?: string;
1058
- }
1059
- /** @oneof */
1060
- interface NestedAggregationResultsResultOneOf {
1061
- /** Value aggregation results */
1062
- values?: ValueResults;
1063
- /** Range aggregation results */
1064
- ranges?: RangeResults;
1065
- /** Scalar aggregation results */
1066
- scalar?: AggregationResultsScalarResult;
1067
- }
1068
- interface ValueResults {
1069
- /**
1070
- * List of value aggregations
1071
- * @maxSize 250
1072
- */
1073
- results?: ValueAggregationResult[];
1074
- }
1075
- interface RangeResults {
1076
- /**
1077
- * List of ranges returned in same order as requested
1078
- * @maxSize 50
1079
- */
1080
- results?: RangeAggregationResult[];
1081
- }
1082
- interface AggregationResultsScalarResult {
1083
- /** Type of scalar aggregation */
1084
- type?: ScalarTypeWithLiterals;
1085
- /** Value of the scalar aggregation */
1086
- value?: number;
1087
- }
1088
- interface NestedValueAggregationResult {
1089
- /**
1090
- * Value of the field
1091
- * @maxLength 1000
1092
- */
1093
- value?: string;
1094
- /** Nested aggregations */
1095
- nestedResults?: NestedAggregationResults;
1096
- }
1097
- interface ValueResult {
1098
- /**
1099
- * Value of the field
1100
- * @maxLength 1000
1101
- */
1102
- value?: string;
1103
- /** Count of entities with this value */
1104
- count?: number | null;
1105
- }
1106
- interface RangeResult {
1107
- /** Inclusive lower bound of the range */
1108
- from?: number | null;
1109
- /** Exclusive upper bound of the range */
1110
- to?: number | null;
1111
- /** Count of entities in this range */
1112
- count?: number | null;
1113
- }
1114
- interface ScalarResult {
1115
- /** Value of the scalar aggregation */
1116
- value?: number;
1117
- }
1118
- interface NestedResultValue extends NestedResultValueResultOneOf {
1119
- /** Value aggregation result */
1120
- value?: ValueResult;
1121
- /** Range aggregation result */
1122
- range?: RangeResult;
1123
- /** Scalar aggregation result */
1124
- scalar?: ScalarResult;
1125
- /** Date histogram aggregation result */
1126
- dateHistogram?: ValueResult;
1127
- }
1128
- /** @oneof */
1129
- interface NestedResultValueResultOneOf {
1130
- /** Value aggregation result */
1131
- value?: ValueResult;
1132
- /** Range aggregation result */
1133
- range?: RangeResult;
1134
- /** Scalar aggregation result */
1135
- scalar?: ScalarResult;
1136
- /** Date histogram aggregation result */
1137
- dateHistogram?: ValueResult;
1138
- }
1139
- interface Results {
1140
- /** List of nested aggregations */
1141
- results?: Record<string, NestedResultValue>;
1142
- }
1143
- interface DateHistogramResult {
1144
- /**
1145
- * Date in ISO 8601 format
1146
- * @maxLength 100
1147
- */
1148
- value?: string;
1149
- /** Count of documents in the bucket */
1150
- count?: number;
1151
- }
1152
- interface GroupByValueResults {
1153
- /**
1154
- * List of value aggregations
1155
- * @maxSize 1000
1156
- */
1157
- results?: NestedValueAggregationResult[];
1158
- }
1159
- interface DateHistogramResults {
1160
- /**
1161
- * List of date histogram aggregations
1162
- * @maxSize 200
1163
- */
1164
- results?: DateHistogramResult[];
1165
- }
1166
- /**
1167
- * Results of `NESTED` aggregation type in a flattened form
1168
- * aggregations in resulting array are keyed by requested aggregation `name`.
1169
- */
1170
- interface NestedResults {
1171
- /**
1172
- * List of nested aggregations
1173
- * @maxSize 1000
1174
- */
1175
- results?: Results[];
1176
- }
1177
- interface AggregationResults extends AggregationResultsResultOneOf {
1178
- /** Value aggregation results */
1179
- values?: ValueResults;
1180
- /** Range aggregation results */
1181
- ranges?: RangeResults;
1182
- /** Scalar aggregation results */
1183
- scalar?: AggregationResultsScalarResult;
1184
- /** Group by value aggregation results */
1185
- groupedByValue?: GroupByValueResults;
1186
- /** Date histogram aggregation results */
1187
- dateHistogram?: DateHistogramResults;
1188
- /** Nested aggregation results */
1189
- nested?: NestedResults;
1190
- /**
1191
- * User-defined name of aggregation as derived from search request
1192
- * @maxLength 100
1193
- */
1194
- name?: string;
1195
- /** Type of aggregation that must match provided kind as derived from search request */
1196
- type?: AggregationTypeWithLiterals;
1197
- /**
1198
- * Field to aggregate by as derived from search request
1199
- * @maxLength 200
1200
- */
1201
- fieldPath?: string;
1202
- }
1203
- /** @oneof */
1204
- interface AggregationResultsResultOneOf {
1205
- /** Value aggregation results */
1206
- values?: ValueResults;
1207
- /** Range aggregation results */
1208
- ranges?: RangeResults;
1209
- /** Scalar aggregation results */
1210
- scalar?: AggregationResultsScalarResult;
1211
- /** Group by value aggregation results */
1212
- groupedByValue?: GroupByValueResults;
1213
- /** Date histogram aggregation results */
1214
- dateHistogram?: DateHistogramResults;
1215
- /** Nested aggregation results */
1216
- nested?: NestedResults;
1217
- }
1218
- interface DeprecatedSearchVariantsWithOffsetRequest {
1219
- /** Filter and sort with limit/offset based paging */
1220
- search?: PlatformOffsetSearch;
1221
- /**
1222
- * A list of requested fields to be included in the response.
1223
- * @maxSize 100
1224
- */
1225
- fields?: RequestedFieldsWithLiterals[];
1226
- }
1227
- interface PlatformOffsetSearch extends PlatformOffsetSearchPagingMethodOneOf {
1228
- /** Pointer to page of results using offset. Can not be used together with 'cursor_paging' */
1229
- paging?: PlatformPaging;
1230
- /** A filter object. Learn more about [API query language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
1231
- filter?: Record<string, any> | null;
1232
- /** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
1233
- sort?: CommonSorting[];
1234
- /** 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. */
1235
- aggregations?: CommonAggregation[];
1236
- /** free text to match in searchable fields */
1237
- search?: CommonSearchDetails;
1238
- }
1239
- /** @oneof */
1240
- interface PlatformOffsetSearchPagingMethodOneOf {
1241
- /** Pointer to page of results using offset. Can not be used together with 'cursor_paging' */
1242
- paging?: PlatformPaging;
1243
- }
1244
- interface CommonSorting {
1245
- /**
1246
- * Name of the field to sort by.
1247
- * @maxLength 512
1248
- */
1249
- fieldName?: string;
1250
- /** Sort order. */
1251
- order?: CommonSortOrderWithLiterals;
1252
- }
1253
- declare enum CommonSortOrder {
1254
- ASC = "ASC",
1255
- DESC = "DESC"
1256
- }
1257
- /** @enumType */
1258
- type CommonSortOrderWithLiterals = CommonSortOrder | 'ASC' | 'DESC';
1259
- interface CommonAggregation extends CommonAggregationKindOneOf {
1260
- /** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number (count) of products for each price listed in the store. */
1261
- value?: AggregationValueAggregation;
1262
- /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */
1263
- range?: AggregationRangeAggregation;
1264
- /** A scalar aggregation calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */
1265
- scalar?: AggregationScalarAggregation;
1266
- /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */
1267
- dateHistogram?: AggregationDateHistogramAggregation;
1268
- /** A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on `discountedPriceNumeric`, and a second value aggregation on `inStock`. */
1269
- nested?: AggregationNestedAggregation;
1270
- /**
1271
- * Aggregation name, returned in `aggregations.results.name`.
1272
- * @maxLength 100
1273
- */
1274
- name?: string | null;
1275
- /** Type of aggregation to perform. Must align with the corresponding aggregation field. */
1276
- type?: CommonAggregationTypeWithLiterals;
1277
- /**
1278
- * Field to aggregate by. Use dot notation to specify a JSON path. For example, `order.address.streetName`.
1279
- * @maxLength 200
1280
- */
1281
- fieldPath?: string;
1282
- /**
1283
- * Deprecated. Use `nested` instead.
1284
- * @deprecated Deprecated. Use `nested` instead.
1285
- * @replacedBy kind.nested
1286
- * @targetRemovalDate 2024-03-30
1287
- */
1288
- groupBy?: GroupByAggregation;
1289
- }
1290
- /** @oneof */
1291
- interface CommonAggregationKindOneOf {
1292
- /** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number (count) of products for each price listed in the store. */
1293
- value?: AggregationValueAggregation;
1294
- /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */
1295
- range?: AggregationRangeAggregation;
1296
- /** A scalar aggregation calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */
1297
- scalar?: AggregationScalarAggregation;
1298
- /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */
1299
- dateHistogram?: AggregationDateHistogramAggregation;
1300
- /** A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on `discountedPriceNumeric`, and a second value aggregation on `inStock`. */
1301
- nested?: AggregationNestedAggregation;
1302
- }
1303
- interface RangeAggregationRangeBucket {
1304
- /** Inclusive lower bound of the range. Required if `to` is not provided. */
1305
- from?: number | null;
1306
- /** Exclusive upper bound of the range. Required if `from` is not provided. */
1307
- to?: number | null;
1308
- }
1309
- declare enum ValueAggregationSortType {
1310
- /** Number of matches in the results. */
1311
- COUNT = "COUNT",
1312
- /** Alphabetically by the field value. */
1313
- VALUE = "VALUE"
1314
- }
1315
- /** @enumType */
1316
- type ValueAggregationSortTypeWithLiterals = ValueAggregationSortType | 'COUNT' | 'VALUE';
1317
- declare enum ValueAggregationSortDirection {
1318
- /** Descending order. */
1319
- DESC = "DESC",
1320
- /** Ascending order. */
1321
- ASC = "ASC"
1322
- }
1323
- /** @enumType */
1324
- type ValueAggregationSortDirectionWithLiterals = ValueAggregationSortDirection | 'DESC' | 'ASC';
1325
- declare enum ValueAggregationMissingValues {
1326
- /** Exclude missing values from the aggregation results. */
1327
- EXCLUDE = "EXCLUDE",
1328
- /** Include missing values in the aggregation results. */
1329
- INCLUDE = "INCLUDE"
1330
- }
1331
- /** @enumType */
1332
- type ValueAggregationMissingValuesWithLiterals = ValueAggregationMissingValues | 'EXCLUDE' | 'INCLUDE';
1333
- interface ValueAggregationIncludeMissingValuesOptions {
1334
- /**
1335
- * Specify a custom name for the bucket containing the missing values. Defaults are `"N/A"` for strings, `0` for integers, and `false` for booleans.
1336
- * @maxLength 20
1337
- */
1338
- addToBucket?: string;
1339
- }
1340
- declare enum CommonScalarType {
1341
- UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
1342
- /** Total number of distinct values. */
1343
- COUNT_DISTINCT = "COUNT_DISTINCT",
1344
- /** Minimum value. */
1345
- MIN = "MIN",
1346
- /** Maximum value. */
1347
- MAX = "MAX"
1348
- }
1349
- /** @enumType */
1350
- type CommonScalarTypeWithLiterals = CommonScalarType | 'UNKNOWN_SCALAR_TYPE' | 'COUNT_DISTINCT' | 'MIN' | 'MAX';
1351
- interface AggregationValueAggregation extends AggregationValueAggregationOptionsOneOf {
1352
- /** Options for including missing values in results. */
1353
- includeOptions?: ValueAggregationIncludeMissingValuesOptions;
1354
- /** Sort type. */
1355
- sortType?: ValueAggregationSortTypeWithLiterals;
1356
- /** Sort direction. */
1357
- sortDirection?: ValueAggregationSortDirectionWithLiterals;
1358
- /**
1359
- * Number of aggregation results to return.
1360
- * Min: `1`
1361
- * Max: `250`
1362
- * Default: `10`
1363
- */
1364
- limit?: number | null;
1365
- /**
1366
- * Whether to include or exclude missing values in the aggregation results.
1367
- * Default: `EXCLUDE`.
1368
- */
1369
- missingValues?: ValueAggregationMissingValuesWithLiterals;
1370
- }
1371
- /** @oneof */
1372
- interface AggregationValueAggregationOptionsOneOf {
1373
- /** Options for including missing values in results. */
1374
- includeOptions?: ValueAggregationIncludeMissingValuesOptions;
1375
- }
1376
- declare enum NestedAggregationNestedAggregationType {
1377
- UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
1378
- /** Calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. */
1379
- VALUE = "VALUE",
1380
- /** Calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. */
1381
- RANGE = "RANGE",
1382
- /** Calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */
1383
- SCALAR = "SCALAR",
1384
- /** Calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). */
1385
- DATE_HISTOGRAM = "DATE_HISTOGRAM"
1386
- }
1387
- /** @enumType */
1388
- type NestedAggregationNestedAggregationTypeWithLiterals = NestedAggregationNestedAggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM';
1389
- interface AggregationRangeAggregation {
1390
- /**
1391
- * List of range buckets. During aggregation each entity is placed in the first bucket its value falls into, based on the provided range bounds.
1392
- * @maxSize 50
1393
- */
1394
- buckets?: RangeAggregationRangeBucket[];
1395
- }
1396
- interface AggregationScalarAggregation {
1397
- /** Operator type for the scalar aggregation. */
1398
- type?: CommonScalarTypeWithLiterals;
1399
- }
1400
- interface AggregationDateHistogramAggregation {
1401
- /** Interval for date histogram aggregation. */
1402
- interval?: DateHistogramAggregationIntervalWithLiterals;
1403
- }
1404
- declare enum DateHistogramAggregationInterval {
1405
- UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
1406
- YEAR = "YEAR",
1407
- MONTH = "MONTH",
1408
- WEEK = "WEEK",
1409
- DAY = "DAY",
1410
- HOUR = "HOUR",
1411
- MINUTE = "MINUTE",
1412
- SECOND = "SECOND"
1413
- }
1414
- /** @enumType */
1415
- type DateHistogramAggregationIntervalWithLiterals = DateHistogramAggregationInterval | 'UNKNOWN_INTERVAL' | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
1416
- interface NestedAggregationNestedAggregationItem extends NestedAggregationNestedAggregationItemKindOneOf {
1417
- /** A value aggregation calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number (count) of orders for each order status. */
1418
- value?: AggregationValueAggregation;
1419
- /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. If ranges overlap, a record that fits more than one range will only be counted in the first range that matches the criteria. */
1420
- range?: AggregationRangeAggregation;
1421
- /** A scalar aggregation calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */
1422
- scalar?: AggregationScalarAggregation;
1423
- /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). For example, use a date histogram to determine how many reservations have been made at a restaurant each week. If ranges overlap, a record that fits more than one range will only be counted in the first range that matches the criteria. */
1424
- dateHistogram?: AggregationDateHistogramAggregation;
1425
- /**
1426
- * Unique, caller-defined aggregation name, returned in `aggregations.results`.
1427
- * @maxLength 100
1428
- */
1429
- name?: string | null;
1430
- /** Type of aggregation to perform. The matching aggregation field must be passed. */
1431
- type?: NestedAggregationNestedAggregationTypeWithLiterals;
1432
- /**
1433
- * Field to aggregate by. Use dot notation to specify a JSON path. For example, `order.address.streetName`.
1434
- * @maxLength 200
1435
- */
1436
- fieldPath?: string;
1437
- }
1438
- /** @oneof */
1439
- interface NestedAggregationNestedAggregationItemKindOneOf {
1440
- /** A value aggregation calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number (count) of orders for each order status. */
1441
- value?: AggregationValueAggregation;
1442
- /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. If ranges overlap, a record that fits more than one range will only be counted in the first range that matches the criteria. */
1443
- range?: AggregationRangeAggregation;
1444
- /** A scalar aggregation calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */
1445
- scalar?: AggregationScalarAggregation;
1446
- /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). For example, use a date histogram to determine how many reservations have been made at a restaurant each week. If ranges overlap, a record that fits more than one range will only be counted in the first range that matches the criteria. */
1447
- dateHistogram?: AggregationDateHistogramAggregation;
1448
- }
1449
- declare enum CommonAggregationType {
1450
- UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
1451
- /** Calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. */
1452
- VALUE = "VALUE",
1453
- /** Calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. */
1454
- RANGE = "RANGE",
1455
- /** Calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */
1456
- SCALAR = "SCALAR",
1457
- /** Calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). */
1458
- DATE_HISTOGRAM = "DATE_HISTOGRAM",
1459
- /** Flattened list of aggregations, where each aggregation is nested within previous one. */
1460
- NESTED = "NESTED"
1461
- }
1462
- /** @enumType */
1463
- type CommonAggregationTypeWithLiterals = CommonAggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED';
1464
- /** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one. */
1465
- interface AggregationNestedAggregation {
1466
- /**
1467
- * Flattened list of aggregations, where each aggregation is nested within previous one.
1468
- * @minSize 2
1469
- * @maxSize 3
1470
- */
1471
- nestedAggregations?: NestedAggregationNestedAggregationItem[];
1472
- }
1473
- interface GroupByAggregation extends GroupByAggregationKindOneOf {
1474
- /** Value aggregation configuration. */
1475
- value?: AggregationValueAggregation;
1476
- /**
1477
- * Unique, caller-defined aggregation name, returned in `aggregations.results`.
1478
- * @maxLength 100
1479
- */
1480
- name?: string | null;
1481
- /**
1482
- * Field to aggregate by.
1483
- * @maxLength 200
1484
- */
1485
- fieldPath?: string;
1486
- }
1487
- /** @oneof */
1488
- interface GroupByAggregationKindOneOf {
1489
- /** Value aggregation configuration. */
1490
- value?: AggregationValueAggregation;
1491
- }
1492
- interface CommonSearchDetails {
1493
- /** Search mode. Defines the search logic for combining multiple terms in the `expression`. */
1494
- mode?: SearchDetailsModeWithLiterals;
1495
- /**
1496
- * Search term or expression.
1497
- * @maxLength 100
1498
- */
1499
- expression?: string | null;
1500
- /**
1501
- * Fields to search in. If the array is empty, all searchable fields are searched. Use dot notation to specify a JSON path. For example, For example, `order.address.streetName`.
1502
- * @maxLength 200
1503
- * @maxSize 20
1504
- */
1505
- fields?: string[];
1506
- /** Whether to enable the search function to use an algorithm to automatically find results that are close to the search expression, such as typos and declensions. */
1507
- fuzzy?: boolean;
1508
- }
1509
- declare enum SearchDetailsMode {
1510
- /** At least one of the search terms must be present. */
1511
- OR = "OR",
1512
- /** All search terms must be present. */
1513
- AND = "AND"
1514
- }
1515
- /** @enumType */
1516
- type SearchDetailsModeWithLiterals = SearchDetailsMode | 'OR' | 'AND';
1517
- interface PlatformPaging {
1518
- /**
1519
- * Number of items to load.
1520
- * @max 100
1521
- */
1522
- limit?: number | null;
1523
- /** Number of items to skip in the current sort order. */
1524
- offset?: number | null;
1525
- }
1526
- interface DeprecatedSearchVariantsWithOffsetResponse {
1527
- /** Products which satisfy the provided query. */
1528
- variants?: ReadOnlyVariant[];
1529
- /** Paging metadata. */
1530
- pagingMetadata?: PagingMetadata;
1531
- /** Aggregation data. */
1532
- aggregationData?: Aggregation;
1533
- }
1534
- interface PagingMetadata {
1535
- /** Number of items returned in the response. */
1536
- count?: number | null;
1537
- /** Offset that was requested. */
1538
- offset?: number | null;
1539
- /** Total number of items that match the query. */
1540
- total?: number | null;
1541
- /** Flag that indicates the server failed to calculate the `total` field. */
1542
- tooManyToCount?: boolean | null;
1543
- }
1544
- interface MigrateProductVariantsRequest {
1545
- /** The product */
1546
- product?: Product;
1547
- /** The event sequence number of the product. */
1548
- eventSequence?: string | null;
1549
- }
1550
- interface Product extends ProductTypedPropertiesOneOf {
1551
- /**
1552
- * Physical properties.
1553
- *
1554
- * Required when `productType: PHYSICAL`.
1555
- */
1556
- physicalProperties?: PhysicalProperties;
1557
- /**
1558
- * Product ID.
1559
- * @minLength 1
1560
- * @maxLength 36
1561
- * @immutable
1562
- * @readonly
1563
- */
1564
- _id?: string | null;
1565
- /**
1566
- * Revision number, which increments by 1 each time the product is updated.
1567
- * To prevent conflicting changes,
1568
- * the current revision must be passed when updating the product.
1569
- *
1570
- * Ignored when creating a product.
1571
- * @readonly
1572
- */
1573
- revision?: string | null;
1574
- /**
1575
- * Date and time the product was created.
1576
- * @readonly
1577
- */
1578
- _createdDate?: Date | null;
1579
- /**
1580
- * Date and time the product was updated.
1581
- * @readonly
1582
- */
1583
- _updatedDate?: Date | null;
1584
- /**
1585
- * Product name. Translatable.
1586
- * @minLength 1
1587
- * @maxLength 80
1588
- */
1589
- name?: string | null;
1590
- /**
1591
- * Product slug.
1592
- *
1593
- * If not provided, the slug is autogenerated based on the product name.
1594
- * @format URL_SLUG
1595
- */
1596
- slug?: string | null;
1597
- /**
1598
- * URL to the site's product page.
1599
- *
1600
- * > **Note:** Returned only when you pass `"URL"` to the `fields` array in Products API requests.
1601
- * @readonly
1602
- */
1603
- url?: string;
1604
- /**
1605
- * Product description using rich content.
1606
- * > **Note:** Returned only when you pass `"DESCRIPTION"` to the `fields` array in Products API requests.
1607
- *
1608
- * <widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="indent.emoji.divider.codeBlock.file.gallery.giphy.image.table.link.textHighlight.textColor" exampleid="7dc9240e-d548-417a-abcf-0291b68b4303">
1609
- * <a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>
1610
- * </widget>
1611
- */
1612
- description?: RichContent;
1613
- /**
1614
- * Product description in HTML.
1615
- *
1616
- * + When provided on create/update, this string must be a valid HTML. It will then be converted to rich content.
1617
- * + `plainDescription` is ignored when value is also passed to the `description` field.
1618
- * > **Note:** Returned only when you pass `"PLAIN_DESCRIPTION"` to the `fields` array in Products API requests.
1619
- * @maxLength 16000
1620
- */
1621
- plainDescription?: string | null;
1622
- /**
1623
- * Whether the product is visible to site visitors on the site.
1624
- *
1625
- * Default: `true`
1626
- */
1627
- visible?: boolean | null;
1628
- /**
1629
- * Whether the product is visible in POS (point of sale).
1630
- *
1631
- * Default: `true`
1632
- * > **Note:** Always `false` for `productType: DIGITAL`.
1633
- */
1634
- visibleInPos?: boolean | null;
1635
- /** Product media items. */
1636
- media?: Media;
1637
- /** Product SEO data. */
1638
- seoData?: SeoSchema;
1639
- /**
1640
- * Tax group ID.
1641
- * @format GUID
1642
- */
1643
- taxGroupId?: string | null;
1644
- /**
1645
- * Product options. Allows the customer to customize the product. For example, selecting color, size, and more.
1646
- *
1647
- * Always generates variants: every variant must have exactly one choice related to each option.
1648
- * Since options and variants tightly coupled and rely on each other they usually should be provided together in all operations.
1649
- * @maxSize 6
1650
- */
1651
- options?: ConnectedOption[];
1652
- /**
1653
- * Product modifiers.
1654
- *
1655
- * Allows the customer to customize product, e.g. select Color, Size and so on similarly to `options` but with one main difference - `modifiers` never generate any variants.
1656
- * @maxSize 10
1657
- */
1658
- modifiers?: ConnectedModifier[];
1659
- /**
1660
- * Product brand.
1661
- *
1662
- * + Pass `brand.name` to add a new brand while creating a product.
1663
- * + Pass an existing brand's `id` to assign that brand to the product.
1664
- */
1665
- brand?: Brand;
1666
- /**
1667
- * Product info section.
1668
- *
1669
- * + Pass `infoSection.uniqueName`, `infoSection.title`, and `infoSection.description` to add a new info section while creating a product.
1670
- * + Pass an existing info section's `id` or `uniqueName` to assign that info section to the product.
1671
- * @maxSize 10
1672
- */
1673
- infoSections?: InfoSection[];
1674
- /**
1675
- * Product ribbon.
1676
- *
1677
- * + Pass `ribbon.name` to add a new ribbon while creating a product.
1678
- * + Pass an existing ribbon's `id` or `name` to assign that ribbon to the product.
1679
- */
1680
- ribbon?: Ribbon;
1681
- /**
1682
- * List of categories that directly contain this product.
1683
- *
1684
- * Updated automatically when a product is added/removed from a category, when an item is moved within a category, or when a category is deleted.
1685
- * > **Note:** Returned only when you pass `"DIRECT_CATEGORIES_INFO"` to the `fields` array in Products API requests.
1686
- * @readonly
1687
- */
1688
- directCategoriesInfo?: ProductCategoriesInfo;
1689
- /**
1690
- * List of categories that directly contain this product, as well as their parent categories.
1691
- * > **Note:** Returned only when you pass `"ALL_CATEGORIES_INFO"` to the `fields` array in Products API requests.
1692
- * @readonly
1693
- */
1694
- allCategoriesInfo?: ProductCategoriesInfo;
1695
- /**
1696
- * Main category ID.
1697
- * @format GUID
1698
- */
1699
- mainCategoryId?: string | null;
1700
- /**
1701
- * Product cost range - minimum and maximum costs of all product variants.
1702
- *
1703
- * > **Note:** Returned only when the following conditions are met:
1704
- * > + You pass `"MERCHANT_DATA"` to the `fields` array in Products API requests.
1705
- * > + Your app has the required `SCOPE.STORES.PRODUCT_READ_ADMIN` permission scope.
1706
- * @readonly
1707
- */
1708
- costRange?: PriceRange;
1709
- /**
1710
- * Product inventory info.
1711
- * @readonly
1712
- */
1713
- inventory?: Inventory;
1714
- /**
1715
- * Product type.
1716
- *
1717
- * When passing `productType: PHYSICAL`, you must also pass `physicalProperties`.
1718
- * @immutable
1719
- */
1720
- productType?: ProductTypeWithLiterals;
1721
- /**
1722
- * A unique human-friendly identifier for the product.
1723
- * Unlike the product ID, the handle can be set by the user to ensure consistency across multiple platforms.
1724
- * In case handle wasn't given, the handle will be automatically generated.
1725
- * @minLength 1
1726
- * @maxLength 100
1727
- * @readonly
1728
- */
1729
- handle?: string | null;
1730
- /**
1731
- * 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.
1732
- *
1733
- * Defaults to the currency defined in the site settings, unless specified in `x-wix-currency` header.
1734
- * > **Note:** Returned only when you pass `"CURRENCY"` to the `fields` array in Products API requests.
1735
- * @format CURRENCY
1736
- * @readonly
1737
- */
1738
- currency?: string | null;
1739
- /**
1740
- * Breadcrumbs of the `mainCategoryId`. Used to navigate to parent categories.
1741
- * > **Note:** Returned only when you pass `"BREADCRUMBS_INFO"` to the `fields` array in Products API requests.
1742
- * @readonly
1743
- */
1744
- breadcrumbsInfo?: BreadcrumbsInfo;
1745
- /**
1746
- * Product actualPrice range - minimum and maximum prices of all product variants.
1747
- * @readonly
1748
- */
1749
- actualPriceRange?: PriceRange;
1750
- /**
1751
- * Product compareAtPrice range - minimum and maximum compare at prices of all product variants.
1752
- * @readonly
1753
- */
1754
- compareAtPriceRange?: PriceRange;
1755
- /**
1756
- * Product variants. Each variant must reference all product options via its `choices` array.
1757
- * Each choice references an option using `optionChoiceNames` for all requests.
1758
- */
1759
- variantsInfo?: VariantsInfo;
1760
- /**
1761
- * Custom extended fields for the product object.
1762
- *
1763
- * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
1764
- */
1765
- extendedFields?: ExtendedFields;
1766
- /** Product subscriptions. */
1767
- subscriptionDetails?: SubscriptionDetails;
1768
- /**
1769
- * The total number of variants for the product.
1770
- * @readonly
1771
- */
1772
- variantSummary?: VariantSummary;
1773
- }
1774
- /** @oneof */
1775
- interface ProductTypedPropertiesOneOf {
1776
- /**
1777
- * Physical properties.
1778
- *
1779
- * Required when `productType: PHYSICAL`.
1780
- */
1781
- physicalProperties?: PhysicalProperties;
1782
- }
1783
- interface RichContent {
1784
- /** Node objects representing a rich content document. */
1785
- nodes?: Node[];
1786
- /** Object metadata. */
1787
- metadata?: Metadata;
1788
- /** Global styling for header, paragraph, block quote, and code block nodes in the object. */
1789
- documentStyle?: DocumentStyle;
1790
- }
1791
- interface Node extends NodeDataOneOf {
1792
- /** Data for a button node. */
1793
- buttonData?: ButtonData;
1794
- /** Data for a code block node. */
1795
- codeBlockData?: CodeBlockData;
1796
- /** Data for a divider node. */
1797
- dividerData?: DividerData;
1798
- /** Data for a file node. */
1799
- fileData?: FileData;
1800
- /** Data for a gallery node. */
1801
- galleryData?: GalleryData;
1802
- /** Data for a GIF node. */
1803
- gifData?: GIFData;
1804
- /** Data for a heading node. */
1805
- headingData?: HeadingData;
1806
- /** Data for an embedded HTML node. */
1807
- htmlData?: HTMLData;
1808
- /** Data for an image node. */
1809
- imageData?: ImageData;
1810
- /** Data for a link preview node. */
1811
- linkPreviewData?: LinkPreviewData;
1812
- /** @deprecated */
1813
- mapData?: MapData;
1814
- /** Data for a paragraph node. */
1815
- paragraphData?: ParagraphData;
1816
- /** Data for a poll node. */
1817
- pollData?: PollData;
1818
- /** Data for a text node. Used to apply decorations to text. */
1819
- textData?: TextData;
1820
- /** Data for an app embed node. */
1821
- appEmbedData?: AppEmbedData;
1822
- /** Data for a video node. */
1823
- videoData?: VideoData;
1824
- /** Data for an oEmbed node. */
1825
- embedData?: EmbedData;
1826
- /** Data for a collapsible list node. */
1827
- collapsibleListData?: CollapsibleListData;
1828
- /** Data for a table node. */
1829
- tableData?: TableData;
1830
- /** Data for a table cell node. */
1831
- tableCellData?: TableCellData;
1832
- /** Data for a custom external node. */
1833
- externalData?: Record<string, any> | null;
1834
- /** Data for an audio node. */
1835
- audioData?: AudioData;
1836
- /** Data for an ordered list node. */
1837
- orderedListData?: OrderedListData;
1838
- /** Data for a bulleted list node. */
1839
- bulletedListData?: BulletedListData;
1840
- /** Data for a block quote node. */
1841
- blockquoteData?: BlockquoteData;
1842
- /** Data for a caption node. */
1843
- captionData?: CaptionData;
1844
- /** LayoutData layout_data = 31; // Data for a layout node. Reserved for future use. */
1845
- layoutCellData?: LayoutCellData;
1846
- /** Node type. Use `APP_EMBED` for nodes that embed content from other Wix apps. Use `EMBED` to embed content in [oEmbed](https://oembed.com/) format. */
1847
- type?: NodeTypeWithLiterals;
1848
- /** Node ID. */
1849
- id?: string;
1850
- /** A list of child nodes. */
1851
- nodes?: Node[];
1852
- /** Padding and background color styling for the node. */
1853
- style?: NodeStyle;
1854
- }
1855
- /** @oneof */
1856
- interface NodeDataOneOf {
1857
- /** Data for a button node. */
1858
- buttonData?: ButtonData;
1859
- /** Data for a code block node. */
1860
- codeBlockData?: CodeBlockData;
1861
- /** Data for a divider node. */
1862
- dividerData?: DividerData;
1863
- /** Data for a file node. */
1864
- fileData?: FileData;
1865
- /** Data for a gallery node. */
1866
- galleryData?: GalleryData;
1867
- /** Data for a GIF node. */
1868
- gifData?: GIFData;
1869
- /** Data for a heading node. */
1870
- headingData?: HeadingData;
1871
- /** Data for an embedded HTML node. */
1872
- htmlData?: HTMLData;
1873
- /** Data for an image node. */
1874
- imageData?: ImageData;
1875
- /** Data for a link preview node. */
1876
- linkPreviewData?: LinkPreviewData;
1877
- /** @deprecated */
1878
- mapData?: MapData;
1879
- /** Data for a paragraph node. */
1880
- paragraphData?: ParagraphData;
1881
- /** Data for a poll node. */
1882
- pollData?: PollData;
1883
- /** Data for a text node. Used to apply decorations to text. */
1884
- textData?: TextData;
1885
- /** Data for an app embed node. */
1886
- appEmbedData?: AppEmbedData;
1887
- /** Data for a video node. */
1888
- videoData?: VideoData;
1889
- /** Data for an oEmbed node. */
1890
- embedData?: EmbedData;
1891
- /** Data for a collapsible list node. */
1892
- collapsibleListData?: CollapsibleListData;
1893
- /** Data for a table node. */
1894
- tableData?: TableData;
1895
- /** Data for a table cell node. */
1896
- tableCellData?: TableCellData;
1897
- /** Data for a custom external node. */
1898
- externalData?: Record<string, any> | null;
1899
- /** Data for an audio node. */
1900
- audioData?: AudioData;
1901
- /** Data for an ordered list node. */
1902
- orderedListData?: OrderedListData;
1903
- /** Data for a bulleted list node. */
1904
- bulletedListData?: BulletedListData;
1905
- /** Data for a block quote node. */
1906
- blockquoteData?: BlockquoteData;
1907
- /** Data for a caption node. */
1908
- captionData?: CaptionData;
1909
- /** LayoutData layout_data = 31; // Data for a layout node. Reserved for future use. */
1910
- layoutCellData?: LayoutCellData;
1911
- }
1912
- declare enum NodeType {
1913
- PARAGRAPH = "PARAGRAPH",
1914
- TEXT = "TEXT",
1915
- HEADING = "HEADING",
1916
- BULLETED_LIST = "BULLETED_LIST",
1917
- ORDERED_LIST = "ORDERED_LIST",
1918
- LIST_ITEM = "LIST_ITEM",
1919
- BLOCKQUOTE = "BLOCKQUOTE",
1920
- CODE_BLOCK = "CODE_BLOCK",
1921
- VIDEO = "VIDEO",
1922
- DIVIDER = "DIVIDER",
1923
- FILE = "FILE",
1924
- GALLERY = "GALLERY",
1925
- GIF = "GIF",
1926
- HTML = "HTML",
1927
- IMAGE = "IMAGE",
1928
- LINK_PREVIEW = "LINK_PREVIEW",
1929
- /** @deprecated */
1930
- MAP = "MAP",
1931
- POLL = "POLL",
1932
- APP_EMBED = "APP_EMBED",
1933
- BUTTON = "BUTTON",
1934
- COLLAPSIBLE_LIST = "COLLAPSIBLE_LIST",
1935
- TABLE = "TABLE",
1936
- EMBED = "EMBED",
1937
- COLLAPSIBLE_ITEM = "COLLAPSIBLE_ITEM",
1938
- COLLAPSIBLE_ITEM_TITLE = "COLLAPSIBLE_ITEM_TITLE",
1939
- COLLAPSIBLE_ITEM_BODY = "COLLAPSIBLE_ITEM_BODY",
1940
- TABLE_CELL = "TABLE_CELL",
1941
- TABLE_ROW = "TABLE_ROW",
1942
- EXTERNAL = "EXTERNAL",
1943
- AUDIO = "AUDIO",
1944
- CAPTION = "CAPTION",
1945
- LAYOUT = "LAYOUT",
1946
- LAYOUT_CELL = "LAYOUT_CELL"
1947
- }
1948
- /** @enumType */
1949
- type NodeTypeWithLiterals = NodeType | 'PARAGRAPH' | 'TEXT' | 'HEADING' | 'BULLETED_LIST' | 'ORDERED_LIST' | 'LIST_ITEM' | 'BLOCKQUOTE' | 'CODE_BLOCK' | 'VIDEO' | 'DIVIDER' | 'FILE' | 'GALLERY' | 'GIF' | 'HTML' | 'IMAGE' | 'LINK_PREVIEW' | 'MAP' | 'POLL' | 'APP_EMBED' | 'BUTTON' | 'COLLAPSIBLE_LIST' | 'TABLE' | 'EMBED' | 'COLLAPSIBLE_ITEM' | 'COLLAPSIBLE_ITEM_TITLE' | 'COLLAPSIBLE_ITEM_BODY' | 'TABLE_CELL' | 'TABLE_ROW' | 'EXTERNAL' | 'AUDIO' | 'CAPTION' | 'LAYOUT' | 'LAYOUT_CELL';
1950
- interface NodeStyle {
1951
- /** The top padding value in pixels. */
1952
- paddingTop?: string | null;
1953
- /** The bottom padding value in pixels. */
1954
- paddingBottom?: string | null;
1955
- /** The background color as a hexadecimal value. */
1956
- backgroundColor?: string | null;
1957
- }
1958
- interface ButtonData {
1959
- /** Styling for the button's container. */
1960
- containerData?: PluginContainerData;
1961
- /** The button type. */
1962
- type?: TypeWithLiterals;
1963
- /** Styling for the button. */
1964
- styles?: Styles;
1965
- /** The text to display on the button. */
1966
- text?: string | null;
1967
- /** Button link details. */
1968
- link?: Link;
1969
- }
1970
- interface Border {
1971
- /**
1972
- * Deprecated: Use `borderWidth` in `styles` instead.
1973
- * @deprecated
1974
- */
1975
- width?: number | null;
1976
- /**
1977
- * Deprecated: Use `borderRadius` in `styles` instead.
1978
- * @deprecated
1979
- */
1980
- radius?: number | null;
1981
- }
1982
- interface Colors {
1983
- /**
1984
- * Deprecated: Use `textColor` in `styles` instead.
1985
- * @deprecated
1986
- */
1987
- text?: string | null;
1988
- /**
1989
- * Deprecated: Use `borderColor` in `styles` instead.
1990
- * @deprecated
1991
- */
1992
- border?: string | null;
1993
- /**
1994
- * Deprecated: Use `backgroundColor` in `styles` instead.
1995
- * @deprecated
1996
- */
1997
- background?: string | null;
1998
- }
1999
- interface PluginContainerData {
2000
- /** The width of the node when it's displayed. */
2001
- width?: PluginContainerDataWidth;
2002
- /** The node's alignment within its container. */
2003
- alignment?: PluginContainerDataAlignmentWithLiterals;
2004
- /** Spoiler cover settings for the node. */
2005
- spoiler?: Spoiler;
2006
- /** The height of the node when it's displayed. */
2007
- height?: Height;
2008
- /** Sets whether text should wrap around this node when it's displayed. If `textWrap` is `false`, the node takes up the width of its container. Defaults to `true` for all node types except 'DIVIVDER' where it defaults to `false`. */
2009
- textWrap?: boolean | null;
2010
- }
2011
- declare enum WidthType {
2012
- /** Width matches the content width */
2013
- CONTENT = "CONTENT",
2014
- /** Small Width */
2015
- SMALL = "SMALL",
2016
- /** Width will match the original asset width */
2017
- ORIGINAL = "ORIGINAL",
2018
- /** coast-to-coast display */
2019
- FULL_WIDTH = "FULL_WIDTH"
2020
- }
2021
- /** @enumType */
2022
- type WidthTypeWithLiterals = WidthType | 'CONTENT' | 'SMALL' | 'ORIGINAL' | 'FULL_WIDTH';
2023
- interface PluginContainerDataWidth extends PluginContainerDataWidthDataOneOf {
2024
- /**
2025
- * One of the following predefined width options:
2026
- * `CONTENT`: The width of the container matches the content width.
2027
- * `SMALL`: A small width.
2028
- * `ORIGINAL`: For `imageData` containers only. The width of the container matches the original image width.
2029
- * `FULL_WIDTH`: For `imageData` containers only. The image container takes up the full width of the screen.
2030
- */
2031
- size?: WidthTypeWithLiterals;
2032
- /** A custom width value in pixels. */
2033
- custom?: string | null;
2034
- }
2035
- /** @oneof */
2036
- interface PluginContainerDataWidthDataOneOf {
2037
- /**
2038
- * One of the following predefined width options:
2039
- * `CONTENT`: The width of the container matches the content width.
2040
- * `SMALL`: A small width.
2041
- * `ORIGINAL`: For `imageData` containers only. The width of the container matches the original image width.
2042
- * `FULL_WIDTH`: For `imageData` containers only. The image container takes up the full width of the screen.
2043
- */
2044
- size?: WidthTypeWithLiterals;
2045
- /** A custom width value in pixels. */
2046
- custom?: string | null;
2047
- }
2048
- declare enum PluginContainerDataAlignment {
2049
- /** Center Alignment */
2050
- CENTER = "CENTER",
2051
- /** Left Alignment */
2052
- LEFT = "LEFT",
2053
- /** Right Alignment */
2054
- RIGHT = "RIGHT"
2055
- }
2056
- /** @enumType */
2057
- type PluginContainerDataAlignmentWithLiterals = PluginContainerDataAlignment | 'CENTER' | 'LEFT' | 'RIGHT';
2058
- interface Spoiler {
2059
- /** Sets whether the spoiler cover is enabled for this node. Defaults to `false`. */
2060
- enabled?: boolean | null;
2061
- /** The description displayed on top of the spoiler cover. */
2062
- description?: string | null;
2063
- /** The text for the button used to remove the spoiler cover. */
2064
- buttonText?: string | null;
2065
- }
2066
- interface Height {
2067
- /** A custom height value in pixels. */
2068
- custom?: string | null;
2069
- }
2070
- declare enum Type {
2071
- /** Regular link button */
2072
- LINK = "LINK",
2073
- /** Triggers custom action that is defined in plugin configuration by the consumer */
2074
- ACTION = "ACTION"
2075
- }
2076
- /** @enumType */
2077
- type TypeWithLiterals = Type | 'LINK' | 'ACTION';
2078
- interface Styles {
2079
- /**
2080
- * Deprecated: Use `borderWidth` and `borderRadius` instead.
2081
- * @deprecated
2082
- */
2083
- border?: Border;
2084
- /**
2085
- * Deprecated: Use `textColor`, `borderColor` and `backgroundColor` instead.
2086
- * @deprecated
2087
- */
2088
- colors?: Colors;
2089
- /** Border width in pixels. */
2090
- borderWidth?: number | null;
2091
- /**
2092
- * Deprecated: Use `borderWidth` for normal/hover states instead.
2093
- * @deprecated
2094
- */
2095
- borderWidthHover?: number | null;
2096
- /** Border radius in pixels. */
2097
- borderRadius?: number | null;
2098
- /**
2099
- * Border color as a hexadecimal value.
2100
- * @format COLOR_HEX
2101
- */
2102
- borderColor?: string | null;
2103
- /**
2104
- * Border color as a hexadecimal value (hover state).
2105
- * @format COLOR_HEX
2106
- */
2107
- borderColorHover?: string | null;
2108
- /**
2109
- * Text color as a hexadecimal value.
2110
- * @format COLOR_HEX
2111
- */
2112
- textColor?: string | null;
2113
- /**
2114
- * Text color as a hexadecimal value (hover state).
2115
- * @format COLOR_HEX
2116
- */
2117
- textColorHover?: string | null;
2118
- /**
2119
- * Background color as a hexadecimal value.
2120
- * @format COLOR_HEX
2121
- */
2122
- backgroundColor?: string | null;
2123
- /**
2124
- * Background color as a hexadecimal value (hover state).
2125
- * @format COLOR_HEX
2126
- */
2127
- backgroundColorHover?: string | null;
2128
- /** Button size option, one of `SMALL`, `MEDIUM` or `LARGE`. Defaults to `MEDIUM`. */
2129
- buttonSize?: string | null;
2130
- }
2131
- interface Link extends LinkDataOneOf {
2132
- /** The absolute URL for the linked document. */
2133
- url?: string;
2134
- /** The target node's ID. Used for linking to another node in this object. */
2135
- anchor?: string;
2136
- /**
2137
- * he HTML `target` attribute value for the link. This property defines where the linked document opens as follows:
2138
- * `SELF` - Default. Opens the linked document in the same frame as the link.
2139
- * `BLANK` - Opens the linked document in a new browser tab or window.
2140
- * `PARENT` - Opens the linked document in the link's parent frame.
2141
- * `TOP` - Opens the linked document in the full body of the link's browser tab or window.
2142
- */
2143
- target?: TargetWithLiterals;
2144
- /** The HTML `rel` attribute value for the link. This object specifies the relationship between the current document and the linked document. */
2145
- rel?: Rel;
2146
- /** A serialized object used for a custom or external link panel. */
2147
- customData?: string | null;
2148
- }
2149
- /** @oneof */
2150
- interface LinkDataOneOf {
2151
- /** The absolute URL for the linked document. */
2152
- url?: string;
2153
- /** The target node's ID. Used for linking to another node in this object. */
2154
- anchor?: string;
2155
- }
2156
- declare enum Target {
2157
- /** Opens the linked document in the same frame as it was clicked (this is default) */
2158
- SELF = "SELF",
2159
- /** Opens the linked document in a new window or tab */
2160
- BLANK = "BLANK",
2161
- /** Opens the linked document in the parent frame */
2162
- PARENT = "PARENT",
2163
- /** Opens the linked document in the full body of the window */
2164
- TOP = "TOP"
2165
- }
2166
- /** @enumType */
2167
- type TargetWithLiterals = Target | 'SELF' | 'BLANK' | 'PARENT' | 'TOP';
2168
- interface Rel {
2169
- /** Indicates to search engine crawlers not to follow the link. Defaults to `false`. */
2170
- nofollow?: boolean | null;
2171
- /** Indicates to search engine crawlers that the link is a paid placement such as sponsored content or an advertisement. Defaults to `false`. */
2172
- sponsored?: boolean | null;
2173
- /** Indicates that this link is user-generated content and isn't necessarily trusted or endorsed by the page’s author. For example, a link in a fourm post. Defaults to `false`. */
2174
- ugc?: boolean | null;
2175
- /** Indicates that this link protect referral information from being passed to the target website. */
2176
- noreferrer?: boolean | null;
2177
- }
2178
- interface CodeBlockData {
2179
- /** Styling for the code block's text. */
2180
- textStyle?: TextStyle;
2181
- }
2182
- interface TextStyle {
2183
- /** Text alignment. Defaults to `AUTO`. */
2184
- textAlignment?: TextAlignmentWithLiterals;
2185
- /** A CSS `line-height` value for the text expressed as a ratio relative to the font size. For example, if the font size is 20px, a `lineHeight` value of `'1.5'`` results in a line height of 30px. */
2186
- lineHeight?: string | null;
2187
- }
2188
- declare enum TextAlignment {
2189
- /** browser default, eqivalent to `initial` */
2190
- AUTO = "AUTO",
2191
- /** Left align */
2192
- LEFT = "LEFT",
2193
- /** Right align */
2194
- RIGHT = "RIGHT",
2195
- /** Center align */
2196
- CENTER = "CENTER",
2197
- /** Text is spaced to line up its left and right edges to the left and right edges of the line box, except for the last line */
2198
- JUSTIFY = "JUSTIFY"
2199
- }
2200
- /** @enumType */
2201
- type TextAlignmentWithLiterals = TextAlignment | 'AUTO' | 'LEFT' | 'RIGHT' | 'CENTER' | 'JUSTIFY';
2202
- interface DividerData {
2203
- /** Styling for the divider's container. */
2204
- containerData?: PluginContainerData;
2205
- /** Divider line style. */
2206
- lineStyle?: LineStyleWithLiterals;
2207
- /** Divider width. */
2208
- width?: WidthWithLiterals;
2209
- /** Divider alignment. */
2210
- alignment?: AlignmentWithLiterals;
2211
- }
2212
- declare enum LineStyle {
2213
- /** Single Line */
2214
- SINGLE = "SINGLE",
2215
- /** Double Line */
2216
- DOUBLE = "DOUBLE",
2217
- /** Dashed Line */
2218
- DASHED = "DASHED",
2219
- /** Dotted Line */
2220
- DOTTED = "DOTTED"
2221
- }
2222
- /** @enumType */
2223
- type LineStyleWithLiterals = LineStyle | 'SINGLE' | 'DOUBLE' | 'DASHED' | 'DOTTED';
2224
- declare enum Width {
2225
- /** Large line */
2226
- LARGE = "LARGE",
2227
- /** Medium line */
2228
- MEDIUM = "MEDIUM",
2229
- /** Small line */
2230
- SMALL = "SMALL"
2231
- }
2232
- /** @enumType */
2233
- type WidthWithLiterals = Width | 'LARGE' | 'MEDIUM' | 'SMALL';
2234
- declare enum Alignment {
2235
- /** Center alignment */
2236
- CENTER = "CENTER",
2237
- /** Left alignment */
2238
- LEFT = "LEFT",
2239
- /** Right alignment */
2240
- RIGHT = "RIGHT"
2241
- }
2242
- /** @enumType */
2243
- type AlignmentWithLiterals = Alignment | 'CENTER' | 'LEFT' | 'RIGHT';
2244
- interface FileData {
2245
- /** Styling for the file's container. */
2246
- containerData?: PluginContainerData;
2247
- /** The source for the file's data. */
2248
- src?: FileSource;
2249
- /** File name. */
2250
- name?: string | null;
2251
- /** File type. */
2252
- type?: string | null;
2253
- /**
2254
- * Use `sizeInKb` instead.
2255
- * @deprecated
2256
- */
2257
- size?: number | null;
2258
- /** Settings for PDF files. */
2259
- pdfSettings?: PDFSettings;
2260
- /** File MIME type. */
2261
- mimeType?: string | null;
2262
- /** File path. */
2263
- path?: string | null;
2264
- /** File size in KB. */
2265
- sizeInKb?: string | null;
2266
- }
2267
- declare enum ViewMode {
2268
- /** No PDF view */
2269
- NONE = "NONE",
2270
- /** Full PDF view */
2271
- FULL = "FULL",
2272
- /** Mini PDF view */
2273
- MINI = "MINI"
2274
- }
2275
- /** @enumType */
2276
- type ViewModeWithLiterals = ViewMode | 'NONE' | 'FULL' | 'MINI';
2277
- interface FileSource extends FileSourceDataOneOf {
2278
- /** The absolute URL for the file's source. */
2279
- url?: string | null;
2280
- /**
2281
- * Custom ID. Use `id` instead.
2282
- * @deprecated
2283
- */
2284
- custom?: string | null;
2285
- /** An ID that's resolved to a URL by a resolver function. */
2286
- id?: string | null;
2287
- /** Indicates whether the file's source is private. Defaults to `false`. */
2288
- private?: boolean | null;
2289
- }
2290
- /** @oneof */
2291
- interface FileSourceDataOneOf {
2292
- /** The absolute URL for the file's source. */
2293
- url?: string | null;
2294
- /**
2295
- * Custom ID. Use `id` instead.
2296
- * @deprecated
2297
- */
2298
- custom?: string | null;
2299
- /** An ID that's resolved to a URL by a resolver function. */
2300
- id?: string | null;
2301
- }
2302
- interface PDFSettings {
2303
- /**
2304
- * PDF view mode. One of the following:
2305
- * `NONE` : The PDF isn't displayed.
2306
- * `FULL` : A full page view of the PDF is displayed.
2307
- * `MINI` : A mini view of the PDF is displayed.
2308
- */
2309
- viewMode?: ViewModeWithLiterals;
2310
- /** Sets whether the PDF download button is disabled. Defaults to `false`. */
2311
- disableDownload?: boolean | null;
2312
- /** Sets whether the PDF print button is disabled. Defaults to `false`. */
2313
- disablePrint?: boolean | null;
2314
- }
2315
- interface GalleryData {
2316
- /** Styling for the gallery's container. */
2317
- containerData?: PluginContainerData;
2318
- /** The items in the gallery. */
2319
- items?: Item[];
2320
- /** Options for defining the gallery's appearance. */
2321
- options?: GalleryOptions;
2322
- /** Sets whether the gallery's expand button is disabled. Defaults to `false`. */
2323
- disableExpand?: boolean | null;
2324
- /** Sets whether the gallery's download button is disabled. Defaults to `false`. */
2325
- disableDownload?: boolean | null;
2326
- }
2327
- interface V1Media {
2328
- /** The source for the media's data. */
2329
- src?: FileSource;
2330
- /** Media width in pixels. */
2331
- width?: number | null;
2332
- /** Media height in pixels. */
2333
- height?: number | null;
2334
- /** Media duration in seconds. Only relevant for audio and video files. */
2335
- duration?: number | null;
2336
- }
2337
- interface Image {
2338
- /** Image file details. */
2339
- media?: V1Media;
2340
- /** Link details for images that are links. */
2341
- link?: Link;
2342
- }
2343
- interface Video {
2344
- /** Video file details. */
2345
- media?: V1Media;
2346
- /** Video thumbnail file details. */
2347
- thumbnail?: V1Media;
2348
- }
2349
- interface Item extends ItemDataOneOf {
2350
- /** An image item. */
2351
- image?: Image;
2352
- /** A video item. */
2353
- video?: Video;
2354
- /** Item title. */
2355
- title?: string | null;
2356
- /** Item's alternative text. */
2357
- altText?: string | null;
2358
- }
2359
- /** @oneof */
2360
- interface ItemDataOneOf {
2361
- /** An image item. */
2362
- image?: Image;
2363
- /** A video item. */
2364
- video?: Video;
2365
- }
2366
- interface GalleryOptions {
2367
- /** Gallery layout. */
2368
- layout?: Layout;
2369
- /** Styling for gallery items. */
2370
- item?: ItemStyle;
2371
- /** Styling for gallery thumbnail images. */
2372
- thumbnails?: Thumbnails;
2373
- }
2374
- declare enum LayoutType {
2375
- /** Collage type */
2376
- COLLAGE = "COLLAGE",
2377
- /** Masonry type */
2378
- MASONRY = "MASONRY",
2379
- /** Grid type */
2380
- GRID = "GRID",
2381
- /** Thumbnail type */
2382
- THUMBNAIL = "THUMBNAIL",
2383
- /** Slider type */
2384
- SLIDER = "SLIDER",
2385
- /** Slideshow type */
2386
- SLIDESHOW = "SLIDESHOW",
2387
- /** Panorama type */
2388
- PANORAMA = "PANORAMA",
2389
- /** Column type */
2390
- COLUMN = "COLUMN",
2391
- /** Magic type */
2392
- MAGIC = "MAGIC",
2393
- /** Fullsize images type */
2394
- FULLSIZE = "FULLSIZE"
2395
- }
2396
- /** @enumType */
2397
- type LayoutTypeWithLiterals = LayoutType | 'COLLAGE' | 'MASONRY' | 'GRID' | 'THUMBNAIL' | 'SLIDER' | 'SLIDESHOW' | 'PANORAMA' | 'COLUMN' | 'MAGIC' | 'FULLSIZE';
2398
- declare enum Orientation {
2399
- /** Rows Orientation */
2400
- ROWS = "ROWS",
2401
- /** Columns Orientation */
2402
- COLUMNS = "COLUMNS"
2403
- }
2404
- /** @enumType */
2405
- type OrientationWithLiterals = Orientation | 'ROWS' | 'COLUMNS';
2406
- declare enum Crop {
2407
- /** Crop to fill */
2408
- FILL = "FILL",
2409
- /** Crop to fit */
2410
- FIT = "FIT"
2411
- }
2412
- /** @enumType */
2413
- type CropWithLiterals = Crop | 'FILL' | 'FIT';
2414
- declare enum ThumbnailsAlignment {
2415
- /** Top alignment */
2416
- TOP = "TOP",
2417
- /** Right alignment */
2418
- RIGHT = "RIGHT",
2419
- /** Bottom alignment */
2420
- BOTTOM = "BOTTOM",
2421
- /** Left alignment */
2422
- LEFT = "LEFT",
2423
- /** No thumbnail */
2424
- NONE = "NONE"
2425
- }
2426
- /** @enumType */
2427
- type ThumbnailsAlignmentWithLiterals = ThumbnailsAlignment | 'TOP' | 'RIGHT' | 'BOTTOM' | 'LEFT' | 'NONE';
2428
- interface Layout {
2429
- /** Gallery layout type. */
2430
- type?: LayoutTypeWithLiterals;
2431
- /** Sets whether horizontal scroll is enabled. Defaults to `true` unless the layout `type` is set to `GRID` or `COLLAGE`. */
2432
- horizontalScroll?: boolean | null;
2433
- /** Gallery orientation. */
2434
- orientation?: OrientationWithLiterals;
2435
- /** The number of columns to display on full size screens. */
2436
- numberOfColumns?: number | null;
2437
- /** The number of columns to display on mobile screens. */
2438
- mobileNumberOfColumns?: number | null;
2439
- }
2440
- interface ItemStyle {
2441
- /** Desirable dimension for each item in pixels (behvaior changes according to gallery type) */
2442
- targetSize?: number | null;
2443
- /** Item ratio */
2444
- ratio?: number | null;
2445
- /** Sets how item images are cropped. */
2446
- crop?: CropWithLiterals;
2447
- /** The spacing between items in pixels. */
2448
- spacing?: number | null;
2449
- }
2450
- interface Thumbnails {
2451
- /** Thumbnail alignment. */
2452
- placement?: ThumbnailsAlignmentWithLiterals;
2453
- /** Spacing between thumbnails in pixels. */
2454
- spacing?: number | null;
2455
- }
2456
- interface GIFData {
2457
- /** Styling for the GIF's container. */
2458
- containerData?: PluginContainerData;
2459
- /** The source of the full size GIF. */
2460
- original?: GIF;
2461
- /** The source of the downsized GIF. */
2462
- downsized?: GIF;
2463
- /** Height in pixels. */
2464
- height?: number;
2465
- /** Width in pixels. */
2466
- width?: number;
2467
- /** Type of GIF (Sticker or NORMAL). Defaults to `NORMAL`. */
2468
- gifType?: GIFTypeWithLiterals;
2469
- }
2470
- interface GIF {
2471
- /**
2472
- * GIF format URL.
2473
- * @format WEB_URL
2474
- */
2475
- gif?: string | null;
2476
- /**
2477
- * MP4 format URL.
2478
- * @format WEB_URL
2479
- */
2480
- mp4?: string | null;
2481
- /**
2482
- * Thumbnail URL.
2483
- * @format WEB_URL
2484
- */
2485
- still?: string | null;
2486
- }
2487
- declare enum GIFType {
2488
- NORMAL = "NORMAL",
2489
- STICKER = "STICKER"
2490
- }
2491
- /** @enumType */
2492
- type GIFTypeWithLiterals = GIFType | 'NORMAL' | 'STICKER';
2493
- interface HeadingData {
2494
- /** Heading level from 1-6. */
2495
- level?: number;
2496
- /** Styling for the heading text. */
2497
- textStyle?: TextStyle;
2498
- /** Indentation level from 1-4. */
2499
- indentation?: number | null;
2500
- }
2501
- interface HTMLData extends HTMLDataDataOneOf {
2502
- /** The URL for the HTML code for the node. */
2503
- url?: string;
2504
- /** The HTML code for the node. */
2505
- html?: string;
2506
- /**
2507
- * Whether this is an AdSense element. Use `source` instead.
2508
- * @deprecated
2509
- */
2510
- isAdsense?: boolean | null;
2511
- /** Styling for the HTML node's container. Height property is irrelevant for HTML embeds when autoHeight is set to `true`. */
2512
- containerData?: PluginContainerData;
2513
- /** The type of HTML code. */
2514
- source?: SourceWithLiterals;
2515
- /** If container height is aligned with its content height. Defaults to `true`. */
2516
- autoHeight?: boolean | null;
2517
- }
2518
- /** @oneof */
2519
- interface HTMLDataDataOneOf {
2520
- /** The URL for the HTML code for the node. */
2521
- url?: string;
2522
- /** The HTML code for the node. */
2523
- html?: string;
2524
- /**
2525
- * Whether this is an AdSense element. Use `source` instead.
2526
- * @deprecated
2527
- */
2528
- isAdsense?: boolean | null;
2529
- }
2530
- declare enum Source {
2531
- HTML = "HTML",
2532
- ADSENSE = "ADSENSE"
2533
- }
2534
- /** @enumType */
2535
- type SourceWithLiterals = Source | 'HTML' | 'ADSENSE';
2536
- interface ImageData {
2537
- /** Styling for the image's container. */
2538
- containerData?: PluginContainerData;
2539
- /** Image file details. */
2540
- image?: V1Media;
2541
- /** Link details for images that are links. */
2542
- link?: Link;
2543
- /** Sets whether the image expands to full screen when clicked. Defaults to `false`. */
2544
- disableExpand?: boolean | null;
2545
- /** Image's alternative text. */
2546
- altText?: string | null;
2547
- /**
2548
- * Deprecated: use Caption node instead.
2549
- * @deprecated
2550
- */
2551
- caption?: string | null;
2552
- /** Sets whether the image's download button is disabled. Defaults to `false`. */
2553
- disableDownload?: boolean | null;
2554
- /** Sets whether the image is decorative and does not need an explanation. Defaults to `false`. */
2555
- decorative?: boolean | null;
2556
- /** Styling for the image. */
2557
- styles?: ImageDataStyles;
2558
- }
2559
- interface StylesBorder {
2560
- /** Border width in pixels. */
2561
- width?: number | null;
2562
- /**
2563
- * Border color as a hexadecimal value.
2564
- * @format COLOR_HEX
2565
- */
2566
- color?: string | null;
2567
- /** Border radius in pixels. */
2568
- radius?: number | null;
2569
- }
2570
- interface ImageDataStyles {
2571
- /** Border attributes. */
2572
- border?: StylesBorder;
2573
- }
2574
- interface LinkPreviewData {
2575
- /** Styling for the link preview's container. */
2576
- containerData?: PluginContainerData;
2577
- /** Link details. */
2578
- link?: Link;
2579
- /** Preview title. */
2580
- title?: string | null;
2581
- /** Preview thumbnail URL. */
2582
- thumbnailUrl?: string | null;
2583
- /** Preview description. */
2584
- description?: string | null;
2585
- /** The preview content as HTML. */
2586
- html?: string | null;
2587
- /** Styling for the link preview. */
2588
- styles?: LinkPreviewDataStyles;
2589
- }
2590
- declare enum Position {
2591
- /** Thumbnail positioned at the start (left in LTR layouts, right in RTL layouts) */
2592
- START = "START",
2593
- /** Thumbnail positioned at the end (right in LTR layouts, left in RTL layouts) */
2594
- END = "END",
2595
- /** Thumbnail positioned at the top */
2596
- TOP = "TOP",
2597
- /** Thumbnail hidden and not displayed */
2598
- HIDDEN = "HIDDEN"
2599
- }
2600
- /** @enumType */
2601
- type PositionWithLiterals = Position | 'START' | 'END' | 'TOP' | 'HIDDEN';
2602
- interface LinkPreviewDataStyles {
2603
- /**
2604
- * Background color as a hexadecimal value.
2605
- * @format COLOR_HEX
2606
- */
2607
- backgroundColor?: string | null;
2608
- /**
2609
- * Title color as a hexadecimal value.
2610
- * @format COLOR_HEX
2611
- */
2612
- titleColor?: string | null;
2613
- /**
2614
- * Subtitle color as a hexadecimal value.
2615
- * @format COLOR_HEX
2616
- */
2617
- subtitleColor?: string | null;
2618
- /**
2619
- * Link color as a hexadecimal value.
2620
- * @format COLOR_HEX
2621
- */
2622
- linkColor?: string | null;
2623
- /** Border width in pixels. */
2624
- borderWidth?: number | null;
2625
- /** Border radius in pixels. */
2626
- borderRadius?: number | null;
2627
- /**
2628
- * Border color as a hexadecimal value.
2629
- * @format COLOR_HEX
2630
- */
2631
- borderColor?: string | null;
2632
- /** Position of thumbnail. Defaults to `START`. */
2633
- thumbnailPosition?: PositionWithLiterals;
2634
- }
2635
- interface MapData {
2636
- /** Styling for the map's container. */
2637
- containerData?: PluginContainerData;
2638
- /** Map settings. */
2639
- mapSettings?: MapSettings;
2640
- }
2641
- interface MapSettings {
2642
- /** The address to display on the map. */
2643
- address?: string | null;
2644
- /** Sets whether the map is draggable. */
2645
- draggable?: boolean | null;
2646
- /** Sets whether the location marker is visible. */
2647
- marker?: boolean | null;
2648
- /** Sets whether street view control is enabled. */
2649
- streetViewControl?: boolean | null;
2650
- /** Sets whether zoom control is enabled. */
2651
- zoomControl?: boolean | null;
2652
- /** Location latitude. */
2653
- lat?: number | null;
2654
- /** Location longitude. */
2655
- lng?: number | null;
2656
- /** Location name. */
2657
- locationName?: string | null;
2658
- /** Sets whether view mode control is enabled. */
2659
- viewModeControl?: boolean | null;
2660
- /** Initial zoom value. */
2661
- initialZoom?: number | null;
2662
- /** Map type. `HYBRID` is a combination of the `ROADMAP` and `SATELLITE` map types. */
2663
- mapType?: MapTypeWithLiterals;
2664
- }
2665
- declare enum MapType {
2666
- /** Roadmap map type */
2667
- ROADMAP = "ROADMAP",
2668
- /** Satellite map type */
2669
- SATELITE = "SATELITE",
2670
- /** Hybrid map type */
2671
- HYBRID = "HYBRID",
2672
- /** Terrain map type */
2673
- TERRAIN = "TERRAIN"
2674
- }
2675
- /** @enumType */
2676
- type MapTypeWithLiterals = MapType | 'ROADMAP' | 'SATELITE' | 'HYBRID' | 'TERRAIN';
2677
- interface ParagraphData {
2678
- /** Styling for the paragraph text. */
2679
- textStyle?: TextStyle;
2680
- /** Indentation level from 1-4. */
2681
- indentation?: number | null;
2682
- /** Paragraph level */
2683
- level?: number | null;
2684
- }
2685
- interface PollData {
2686
- /** Styling for the poll's container. */
2687
- containerData?: PluginContainerData;
2688
- /** Poll data. */
2689
- poll?: Poll;
2690
- /** Layout settings for the poll and voting options. */
2691
- layout?: PollDataLayout;
2692
- /** Styling for the poll and voting options. */
2693
- design?: Design;
2694
- }
2695
- declare enum ViewRole {
2696
- /** Only Poll creator can view the results */
2697
- CREATOR = "CREATOR",
2698
- /** Anyone who voted can see the results */
2699
- VOTERS = "VOTERS",
2700
- /** Anyone can see the results, even if one didn't vote */
2701
- EVERYONE = "EVERYONE"
2702
- }
2703
- /** @enumType */
2704
- type ViewRoleWithLiterals = ViewRole | 'CREATOR' | 'VOTERS' | 'EVERYONE';
2705
- declare enum VoteRole {
2706
- /** Logged in member */
2707
- SITE_MEMBERS = "SITE_MEMBERS",
2708
- /** Anyone */
2709
- ALL = "ALL"
2710
- }
2711
- /** @enumType */
2712
- type VoteRoleWithLiterals = VoteRole | 'SITE_MEMBERS' | 'ALL';
2713
- interface Permissions {
2714
- /** Sets who can view the poll results. */
2715
- view?: ViewRoleWithLiterals;
2716
- /** Sets who can vote. */
2717
- vote?: VoteRoleWithLiterals;
2718
- /** Sets whether one voter can vote multiple times. Defaults to `false`. */
2719
- allowMultipleVotes?: boolean | null;
2720
- }
2721
- interface Option {
2722
- /** Option ID. */
2723
- id?: string | null;
2724
- /** Option title. */
2725
- title?: string | null;
2726
- /** The image displayed with the option. */
2727
- image?: V1Media;
2728
- }
2729
- interface PollSettings {
2730
- /** Permissions settings for voting. */
2731
- permissions?: Permissions;
2732
- /** Sets whether voters are displayed in the vote results. Defaults to `true`. */
2733
- showVoters?: boolean | null;
2734
- /** Sets whether the vote count is displayed. Defaults to `true`. */
2735
- showVotesCount?: boolean | null;
2736
- }
2737
- declare enum PollLayoutType {
2738
- /** List */
2739
- LIST = "LIST",
2740
- /** Grid */
2741
- GRID = "GRID"
2742
- }
2743
- /** @enumType */
2744
- type PollLayoutTypeWithLiterals = PollLayoutType | 'LIST' | 'GRID';
2745
- declare enum PollLayoutDirection {
2746
- /** Left-to-right */
2747
- LTR = "LTR",
2748
- /** Right-to-left */
2749
- RTL = "RTL"
2750
- }
2751
- /** @enumType */
2752
- type PollLayoutDirectionWithLiterals = PollLayoutDirection | 'LTR' | 'RTL';
2753
- interface PollLayout {
2754
- /** The layout for displaying the voting options. */
2755
- type?: PollLayoutTypeWithLiterals;
2756
- /** The direction of the text displayed in the voting options. Text can be displayed either right-to-left or left-to-right. */
2757
- direction?: PollLayoutDirectionWithLiterals;
2758
- /** Sets whether to display the main poll image. Defaults to `false`. */
2759
- enableImage?: boolean | null;
2760
- }
2761
- interface OptionLayout {
2762
- /** Sets whether to display option images. Defaults to `false`. */
2763
- enableImage?: boolean | null;
2764
- }
2765
- declare enum BackgroundType {
2766
- /** Color background type */
2767
- COLOR = "COLOR",
2768
- /** Image background type */
2769
- IMAGE = "IMAGE",
2770
- /** Gradiant background type */
2771
- GRADIENT = "GRADIENT"
2772
- }
2773
- /** @enumType */
2774
- type BackgroundTypeWithLiterals = BackgroundType | 'COLOR' | 'IMAGE' | 'GRADIENT';
2775
- interface Gradient {
2776
- /** The gradient angle in degrees. */
2777
- angle?: number | null;
2778
- /**
2779
- * The start color as a hexademical value.
2780
- * @format COLOR_HEX
2781
- */
2782
- startColor?: string | null;
2783
- /**
2784
- * The end color as a hexademical value.
2785
- * @format COLOR_HEX
2786
- */
2787
- lastColor?: string | null;
2788
- }
2789
- interface Background extends BackgroundBackgroundOneOf {
2790
- /**
2791
- * The background color as a hexademical value.
2792
- * @format COLOR_HEX
2793
- */
2794
- color?: string | null;
2795
- /** An image to use for the background. */
2796
- image?: V1Media;
2797
- /** Details for a gradient background. */
2798
- gradient?: Gradient;
2799
- /** Background type. For each option, include the relevant details. */
2800
- type?: BackgroundTypeWithLiterals;
2801
- }
2802
- /** @oneof */
2803
- interface BackgroundBackgroundOneOf {
2804
- /**
2805
- * The background color as a hexademical value.
2806
- * @format COLOR_HEX
2807
- */
2808
- color?: string | null;
2809
- /** An image to use for the background. */
2810
- image?: V1Media;
2811
- /** Details for a gradient background. */
2812
- gradient?: Gradient;
2813
- }
2814
- interface PollDesign {
2815
- /** Background styling. */
2816
- background?: Background;
2817
- /** Border radius in pixels. */
2818
- borderRadius?: number | null;
2819
- }
2820
- interface OptionDesign {
2821
- /** Border radius in pixels. */
2822
- borderRadius?: number | null;
2823
- }
2824
- interface Poll {
2825
- /** Poll ID. */
2826
- id?: string | null;
2827
- /** Poll title. */
2828
- title?: string | null;
2829
- /** Poll creator ID. */
2830
- creatorId?: string | null;
2831
- /** Main poll image. */
2832
- image?: V1Media;
2833
- /** Voting options. */
2834
- options?: Option[];
2835
- /** The poll's permissions and display settings. */
2836
- settings?: PollSettings;
2837
- }
2838
- interface PollDataLayout {
2839
- /** Poll layout settings. */
2840
- poll?: PollLayout;
2841
- /** Voting otpions layout settings. */
2842
- options?: OptionLayout;
2843
- }
2844
- interface Design {
2845
- /** Styling for the poll. */
2846
- poll?: PollDesign;
2847
- /** Styling for voting options. */
2848
- options?: OptionDesign;
2849
- }
2850
- interface TextData {
2851
- /** The text to apply decorations to. */
2852
- text?: string;
2853
- /** The decorations to apply. */
2854
- decorations?: Decoration[];
2855
- }
2856
- /** Adds appearence changes to text */
2857
- interface Decoration extends DecorationDataOneOf {
2858
- /** Data for an anchor link decoration. */
2859
- anchorData?: AnchorData;
2860
- /** Data for a color decoration. */
2861
- colorData?: ColorData;
2862
- /** Data for an external link decoration. */
2863
- linkData?: LinkData;
2864
- /** Data for a mention decoration. */
2865
- mentionData?: MentionData;
2866
- /** Data for a font size decoration. */
2867
- fontSizeData?: FontSizeData;
2868
- /** Font weight for a bold decoration. */
2869
- fontWeightValue?: number | null;
2870
- /** Data for an italic decoration. Defaults to `true`. */
2871
- italicData?: boolean | null;
2872
- /** Data for an underline decoration. Defaults to `true`. */
2873
- underlineData?: boolean | null;
2874
- /** Data for a spoiler decoration. */
2875
- spoilerData?: SpoilerData;
2876
- /** Data for a strikethrough decoration. Defaults to `true`. */
2877
- strikethroughData?: boolean | null;
2878
- /** Data for a superscript decoration. Defaults to `true`. */
2879
- superscriptData?: boolean | null;
2880
- /** Data for a subscript decoration. Defaults to `true`. */
2881
- subscriptData?: boolean | null;
2882
- /** The type of decoration to apply. */
2883
- type?: DecorationTypeWithLiterals;
2884
- }
2885
- /** @oneof */
2886
- interface DecorationDataOneOf {
2887
- /** Data for an anchor link decoration. */
2888
- anchorData?: AnchorData;
2889
- /** Data for a color decoration. */
2890
- colorData?: ColorData;
2891
- /** Data for an external link decoration. */
2892
- linkData?: LinkData;
2893
- /** Data for a mention decoration. */
2894
- mentionData?: MentionData;
2895
- /** Data for a font size decoration. */
2896
- fontSizeData?: FontSizeData;
2897
- /** Font weight for a bold decoration. */
2898
- fontWeightValue?: number | null;
2899
- /** Data for an italic decoration. Defaults to `true`. */
2900
- italicData?: boolean | null;
2901
- /** Data for an underline decoration. Defaults to `true`. */
2902
- underlineData?: boolean | null;
2903
- /** Data for a spoiler decoration. */
2904
- spoilerData?: SpoilerData;
2905
- /** Data for a strikethrough decoration. Defaults to `true`. */
2906
- strikethroughData?: boolean | null;
2907
- /** Data for a superscript decoration. Defaults to `true`. */
2908
- superscriptData?: boolean | null;
2909
- /** Data for a subscript decoration. Defaults to `true`. */
2910
- subscriptData?: boolean | null;
2911
- }
2912
- declare enum DecorationType {
2913
- BOLD = "BOLD",
2914
- ITALIC = "ITALIC",
2915
- UNDERLINE = "UNDERLINE",
2916
- SPOILER = "SPOILER",
2917
- ANCHOR = "ANCHOR",
2918
- MENTION = "MENTION",
2919
- LINK = "LINK",
2920
- COLOR = "COLOR",
2921
- FONT_SIZE = "FONT_SIZE",
2922
- EXTERNAL = "EXTERNAL",
2923
- STRIKETHROUGH = "STRIKETHROUGH",
2924
- SUPERSCRIPT = "SUPERSCRIPT",
2925
- SUBSCRIPT = "SUBSCRIPT"
2926
- }
2927
- /** @enumType */
2928
- type DecorationTypeWithLiterals = DecorationType | 'BOLD' | 'ITALIC' | 'UNDERLINE' | 'SPOILER' | 'ANCHOR' | 'MENTION' | 'LINK' | 'COLOR' | 'FONT_SIZE' | 'EXTERNAL' | 'STRIKETHROUGH' | 'SUPERSCRIPT' | 'SUBSCRIPT';
2929
- interface AnchorData {
2930
- /** The target node's ID. */
2931
- anchor?: string;
2932
- }
2933
- interface ColorData {
2934
- /** The text's background color as a hexadecimal value. */
2935
- background?: string | null;
2936
- /** The text's foreground color as a hexadecimal value. */
2937
- foreground?: string | null;
2938
- }
2939
- interface LinkData {
2940
- /** Link details. */
2941
- link?: Link;
2942
- }
2943
- interface MentionData {
2944
- /** The mentioned user's name. */
2945
- name?: string;
2946
- /** The version of the user's name that appears after the `@` character in the mention. */
2947
- slug?: string;
2948
- /** Mentioned user's ID. */
2949
- id?: string | null;
2950
- }
2951
- interface FontSizeData {
2952
- /** The units used for the font size. */
2953
- unit?: FontTypeWithLiterals;
2954
- /** Font size value. */
2955
- value?: number | null;
2956
- }
2957
- declare enum FontType {
2958
- PX = "PX",
2959
- EM = "EM"
2960
- }
2961
- /** @enumType */
2962
- type FontTypeWithLiterals = FontType | 'PX' | 'EM';
2963
- interface SpoilerData {
2964
- /** Spoiler ID. */
2965
- id?: string | null;
2966
- }
2967
- interface AppEmbedData extends AppEmbedDataAppDataOneOf {
2968
- /** Data for embedded Wix Bookings content. */
2969
- bookingData?: BookingData;
2970
- /** Data for embedded Wix Events content. */
2971
- eventData?: EventData;
2972
- /** The type of Wix App content being embedded. */
2973
- type?: AppTypeWithLiterals;
2974
- /** The ID of the embedded content. */
2975
- itemId?: string | null;
2976
- /** The name of the embedded content. */
2977
- name?: string | null;
2978
- /**
2979
- * Deprecated: Use `image` instead.
2980
- * @deprecated
2981
- */
2982
- imageSrc?: string | null;
2983
- /** The URL for the embedded content. */
2984
- url?: string | null;
2985
- /** An image for the embedded content. */
2986
- image?: V1Media;
2987
- }
2988
- /** @oneof */
2989
- interface AppEmbedDataAppDataOneOf {
2990
- /** Data for embedded Wix Bookings content. */
2991
- bookingData?: BookingData;
2992
- /** Data for embedded Wix Events content. */
2993
- eventData?: EventData;
2994
- }
2995
- declare enum AppType {
2996
- PRODUCT = "PRODUCT",
2997
- EVENT = "EVENT",
2998
- BOOKING = "BOOKING"
2999
- }
3000
- /** @enumType */
3001
- type AppTypeWithLiterals = AppType | 'PRODUCT' | 'EVENT' | 'BOOKING';
3002
- interface BookingData {
3003
- /** Booking duration in minutes. */
3004
- durations?: string | null;
3005
- }
3006
- interface EventData {
3007
- /** Event schedule. */
3008
- scheduling?: string | null;
3009
- /** Event location. */
3010
- location?: string | null;
3011
- }
3012
- interface VideoData {
3013
- /** Styling for the video's container. */
3014
- containerData?: PluginContainerData;
3015
- /** Video details. */
3016
- video?: V1Media;
3017
- /** Video thumbnail details. */
3018
- thumbnail?: V1Media;
3019
- /** Sets whether the video's download button is disabled. Defaults to `false`. */
3020
- disableDownload?: boolean | null;
3021
- /** Video title. */
3022
- title?: string | null;
3023
- /** Video options. */
3024
- options?: PlaybackOptions;
3025
- }
3026
- interface PlaybackOptions {
3027
- /** Sets whether the media will automatically start playing. */
3028
- autoPlay?: boolean | null;
3029
- /** Sets whether media's will be looped. */
3030
- playInLoop?: boolean | null;
3031
- /** Sets whether media's controls will be shown. */
3032
- showControls?: boolean | null;
3033
- }
3034
- interface EmbedData {
3035
- /** Styling for the oEmbed node's container. */
3036
- containerData?: PluginContainerData;
3037
- /** An [oEmbed](https://www.oembed.com) object. */
3038
- oembed?: Oembed;
3039
- /** Origin asset source. */
3040
- src?: string | null;
3041
- }
3042
- interface Oembed {
3043
- /** The resource type. */
3044
- type?: string | null;
3045
- /** The width of the resource specified in the `url` property in pixels. */
3046
- width?: number | null;
3047
- /** The height of the resource specified in the `url` property in pixels. */
3048
- height?: number | null;
3049
- /** Resource title. */
3050
- title?: string | null;
3051
- /** The source URL for the resource. */
3052
- url?: string | null;
3053
- /** HTML for embedding a video player. The HTML should have no padding or margins. */
3054
- html?: string | null;
3055
- /** The name of the author or owner of the resource. */
3056
- authorName?: string | null;
3057
- /** The URL for the author or owner of the resource. */
3058
- authorUrl?: string | null;
3059
- /** The name of the resource provider. */
3060
- providerName?: string | null;
3061
- /** The URL for the resource provider. */
3062
- providerUrl?: string | null;
3063
- /** The URL for a thumbnail image for the resource. If this property is defined, `thumbnailWidth` and `thumbnailHeight` must also be defined. */
3064
- thumbnailUrl?: string | null;
3065
- /** The width of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailHeight` must also be defined. */
3066
- thumbnailWidth?: string | null;
3067
- /** The height of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailWidth`must also be defined. */
3068
- thumbnailHeight?: string | null;
3069
- /** The URL for an embedded viedo. */
3070
- videoUrl?: string | null;
3071
- /** The oEmbed version number. This value must be `1.0`. */
3072
- version?: string | null;
3073
- }
3074
- interface CollapsibleListData {
3075
- /** Styling for the collapsible list's container. */
3076
- containerData?: PluginContainerData;
3077
- /** If `true`, only one item can be expanded at a time. Defaults to `false`. */
3078
- expandOnlyOne?: boolean | null;
3079
- /** Sets which items are expanded when the page loads. */
3080
- initialExpandedItems?: InitialExpandedItemsWithLiterals;
3081
- /** The direction of the text in the list. Either left-to-right or right-to-left. */
3082
- direction?: DirectionWithLiterals;
3083
- /** If `true`, The collapsible item will appear in search results as an FAQ. */
3084
- isQapageData?: boolean | null;
3085
- }
3086
- declare enum InitialExpandedItems {
3087
- /** First item will be expended initally */
3088
- FIRST = "FIRST",
3089
- /** All items will expended initally */
3090
- ALL = "ALL",
3091
- /** All items collapsed initally */
3092
- NONE = "NONE"
3093
- }
3094
- /** @enumType */
3095
- type InitialExpandedItemsWithLiterals = InitialExpandedItems | 'FIRST' | 'ALL' | 'NONE';
3096
- declare enum Direction {
3097
- /** Left-to-right */
3098
- LTR = "LTR",
3099
- /** Right-to-left */
3100
- RTL = "RTL"
3101
- }
3102
- /** @enumType */
3103
- type DirectionWithLiterals = Direction | 'LTR' | 'RTL';
3104
- interface TableData {
3105
- /** Styling for the table's container. */
3106
- containerData?: PluginContainerData;
3107
- /** The table's dimensions. */
3108
- dimensions?: Dimensions;
3109
- /**
3110
- * Deprecated: Use `rowHeader` and `columnHeader` instead.
3111
- * @deprecated
3112
- */
3113
- header?: boolean | null;
3114
- /** Sets whether the table's first row is a header. Defaults to `false`. */
3115
- rowHeader?: boolean | null;
3116
- /** Sets whether the table's first column is a header. Defaults to `false`. */
3117
- columnHeader?: boolean | null;
3118
- }
3119
- interface Dimensions {
3120
- /** An array representing relative width of each column in relation to the other columns. */
3121
- colsWidthRatio?: number[];
3122
- /** An array representing the height of each row in pixels. */
3123
- rowsHeight?: number[];
3124
- /** An array representing the minimum width of each column in pixels. */
3125
- colsMinWidth?: number[];
3126
- }
3127
- interface TableCellData {
3128
- /** Styling for the cell's background color and text alignment. */
3129
- cellStyle?: CellStyle;
3130
- /** The cell's border colors. */
3131
- borderColors?: BorderColors;
3132
- }
3133
- declare enum VerticalAlignment {
3134
- /** Top alignment */
3135
- TOP = "TOP",
3136
- /** Middle alignment */
3137
- MIDDLE = "MIDDLE",
3138
- /** Bottom alignment */
3139
- BOTTOM = "BOTTOM"
3140
- }
3141
- /** @enumType */
3142
- type VerticalAlignmentWithLiterals = VerticalAlignment | 'TOP' | 'MIDDLE' | 'BOTTOM';
3143
- interface CellStyle {
3144
- /** Vertical alignment for the cell's text. */
3145
- verticalAlignment?: VerticalAlignmentWithLiterals;
3146
- /**
3147
- * Cell background color as a hexadecimal value.
3148
- * @format COLOR_HEX
3149
- */
3150
- backgroundColor?: string | null;
3151
- }
3152
- interface BorderColors {
3153
- /**
3154
- * Left border color as a hexadecimal value.
3155
- * @format COLOR_HEX
3156
- */
3157
- left?: string | null;
3158
- /**
3159
- * Right border color as a hexadecimal value.
3160
- * @format COLOR_HEX
3161
- */
3162
- right?: string | null;
3163
- /**
3164
- * Top border color as a hexadecimal value.
3165
- * @format COLOR_HEX
3166
- */
3167
- top?: string | null;
3168
- /**
3169
- * Bottom border color as a hexadecimal value.
3170
- * @format COLOR_HEX
3171
- */
3172
- bottom?: string | null;
3173
- }
3174
- /**
3175
- * `NullValue` is a singleton enumeration to represent the null value for the
3176
- * `Value` type union.
3177
- *
3178
- * The JSON representation for `NullValue` is JSON `null`.
3179
- */
3180
- declare enum NullValue {
3181
- /** Null value. */
3182
- NULL_VALUE = "NULL_VALUE"
3183
- }
3184
- /**
3185
- * `ListValue` is a wrapper around a repeated field of values.
3186
- *
3187
- * The JSON representation for `ListValue` is JSON array.
3188
- */
3189
- interface ListValue {
3190
- /** Repeated field of dynamically typed values. */
3191
- values?: any[];
3192
- }
3193
- interface AudioData {
3194
- /** Styling for the audio node's container. */
3195
- containerData?: PluginContainerData;
3196
- /** Audio file details. */
3197
- audio?: V1Media;
3198
- /** Sets whether the audio node's download button is disabled. Defaults to `false`. */
3199
- disableDownload?: boolean | null;
3200
- /** Cover image. */
3201
- coverImage?: V1Media;
3202
- /** Track name. */
3203
- name?: string | null;
3204
- /** Author name. */
3205
- authorName?: string | null;
3206
- /** An HTML version of the audio node. */
3207
- html?: string | null;
3208
- }
3209
- interface OrderedListData {
3210
- /** Indentation level from 0-4. */
3211
- indentation?: number;
3212
- /** Offset level from 0-4. */
3213
- offset?: number | null;
3214
- /** List start number. */
3215
- start?: number | null;
3216
- }
3217
- interface BulletedListData {
3218
- /** Indentation level from 0-4. */
3219
- indentation?: number;
3220
- /** Offset level from 0-4. */
3221
- offset?: number | null;
3222
- }
3223
- interface BlockquoteData {
3224
- /** Indentation level from 1-4. */
3225
- indentation?: number;
3226
- }
3227
- interface CaptionData {
3228
- textStyle?: TextStyle;
3229
- }
3230
- interface LayoutCellData {
3231
- /** Size of the cell in 12 columns grid. */
3232
- colSpan?: number | null;
3233
- }
3234
- interface Metadata {
3235
- /** Schema version. */
3236
- version?: number;
3237
- /**
3238
- * When the object was created.
3239
- * @readonly
3240
- * @deprecated
3241
- */
3242
- createdTimestamp?: Date | null;
3243
- /**
3244
- * When the object was most recently updated.
3245
- * @deprecated
3246
- */
3247
- updatedTimestamp?: Date | null;
3248
- /** Object ID. */
3249
- _id?: string | null;
3250
- }
3251
- interface DocumentStyle {
3252
- /** Styling for H1 nodes. */
3253
- headerOne?: TextNodeStyle;
3254
- /** Styling for H2 nodes. */
3255
- headerTwo?: TextNodeStyle;
3256
- /** Styling for H3 nodes. */
3257
- headerThree?: TextNodeStyle;
3258
- /** Styling for H4 nodes. */
3259
- headerFour?: TextNodeStyle;
3260
- /** Styling for H5 nodes. */
3261
- headerFive?: TextNodeStyle;
3262
- /** Styling for H6 nodes. */
3263
- headerSix?: TextNodeStyle;
3264
- /** Styling for paragraph nodes. */
3265
- paragraph?: TextNodeStyle;
3266
- /** Styling for block quote nodes. */
3267
- blockquote?: TextNodeStyle;
3268
- /** Styling for code block nodes. */
3269
- codeBlock?: TextNodeStyle;
3270
- }
3271
- interface TextNodeStyle {
3272
- /** The decorations to apply to the node. */
3273
- decorations?: Decoration[];
3274
- /** Padding and background color for the node. */
3275
- nodeStyle?: NodeStyle;
3276
- /** Line height for text in the node. */
3277
- lineHeight?: string | null;
3278
- }
3279
- interface Media {
3280
- /**
3281
- * Main media (image, video, etc.) associated with this product.
3282
- * @readonly
3283
- */
3284
- main?: ProductMedia;
3285
- /**
3286
- * All media items.
3287
- * > **Note:** Returned only when you pass `"MEDIA_ITEMS_INFO"` to the `fields` array in Products API requests.
3288
- */
3289
- itemsInfo?: MediaItemsInfo;
3290
- }
3291
- interface ProductMedia extends ProductMediaSetByOneOf, ProductMediaMediaOneOf {
3292
- /**
3293
- * Set media by ID of an existing file in Wix Media Manager.
3294
- * @minLength 1
3295
- * @maxLength 200
3296
- */
3297
- _id?: string;
3298
- /**
3299
- * Set media using an external media URL.
3300
- * @format WEB_URL
3301
- */
3302
- url?: string;
3303
- /**
3304
- * Product image.
3305
- * @readonly
3306
- */
3307
- image?: string;
3308
- /**
3309
- * Product video.
3310
- * @readonly
3311
- */
3312
- video?: string;
3313
- /**
3314
- * Image alt text.
3315
- * @minLength 1
3316
- * @maxLength 1000
3317
- */
3318
- altText?: string | null;
3319
- /**
3320
- * Media display name.
3321
- * Allows to override the default media name. Can be passed only when `setBy: url`.
3322
- * @maxLength 80
3323
- */
3324
- displayName?: string | null;
3325
- /**
3326
- * Media type.
3327
- * @readonly
3328
- */
3329
- mediaType?: MediaTypeWithLiterals;
3330
- /**
3331
- * Media thumbnail.
3332
- * > **Note:** Returned only when you pass `"THUMBNAIL"` to the `fields` array in Products API requests.
3333
- */
3334
- thumbnail?: Thumbnail;
3335
- /**
3336
- * ID used to upload media to Wix Media Manager.
3337
- * @readonly
3338
- * @format GUID
3339
- */
3340
- uploadId?: string;
3341
- }
3342
- /** @oneof */
3343
- interface ProductMediaSetByOneOf {
3344
- /**
3345
- * Set media by ID of an existing file in Wix Media Manager.
3346
- * @minLength 1
3347
- * @maxLength 200
3348
- */
3349
- _id?: string;
3350
- /**
3351
- * Set media using an external media URL.
3352
- * @format WEB_URL
3353
- */
3354
- url?: string;
3355
- }
3356
- /** @oneof */
3357
- interface ProductMediaMediaOneOf {
3358
- /**
3359
- * Product image.
3360
- * @readonly
3361
- */
3362
- image?: string;
3363
- /**
3364
- * Product video.
3365
- * @readonly
3366
- */
3367
- video?: string;
3368
- }
3369
- interface VideoResolution {
3370
- /**
3371
- * Video URL.
3372
- * @format WEB_URL
3373
- */
3374
- url?: string;
3375
- /** Video height. */
3376
- height?: number;
3377
- /** Video width. */
3378
- width?: number;
3379
- /**
3380
- * Video format for example, mp4, hls.
3381
- * @maxLength 200
3382
- */
3383
- format?: string;
3384
- }
3385
- declare enum MediaType {
3386
- UNKNOWN_MEDIA_TYPE = "UNKNOWN_MEDIA_TYPE",
3387
- /** Image media type. */
3388
- IMAGE = "IMAGE",
3389
- /** Video media type. */
3390
- VIDEO = "VIDEO"
3391
- }
3392
- /** @enumType */
3393
- type MediaTypeWithLiterals = MediaType | 'UNKNOWN_MEDIA_TYPE' | 'IMAGE' | 'VIDEO';
3394
- interface Thumbnail {
3395
- /**
3396
- * Thumbnail url.
3397
- * @format WEB_URL
3398
- */
3399
- url?: string;
3400
- /** Thumbnail height. */
3401
- height?: number;
3402
- /** Thumbnail width. */
3403
- width?: number;
3404
- /**
3405
- * Thumbnail alt text.
3406
- * @minLength 1
3407
- * @maxLength 1000
3408
- */
3409
- altText?: string | null;
3410
- }
3411
- interface MediaItemsInfo {
3412
- /**
3413
- * All media items (images, videos etc) associated with this product.
3414
- * @maxSize 15
3415
- */
3416
- items?: ProductMedia[];
3417
- }
3418
- /**
3419
- * The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
3420
- * The search engines use this information for ranking purposes, or to display snippets in the search results.
3421
- * This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
3422
- */
3423
- interface SeoSchema {
3424
- /** SEO tag information. */
3425
- tags?: Tag[];
3426
- /** SEO general settings. */
3427
- settings?: Settings;
3428
- }
3429
- interface Keyword {
3430
- /** Keyword value. */
3431
- term?: string;
3432
- /** Whether the keyword is the main focus keyword. */
3433
- isMain?: boolean;
3434
- /**
3435
- * The source that added the keyword terms to the SEO settings.
3436
- * @maxLength 1000
3437
- */
3438
- origin?: string | null;
3439
- }
3440
- interface Tag {
3441
- /**
3442
- * SEO tag type.
3443
- *
3444
- *
3445
- * Supported values: `title`, `meta`, `script`, `link`.
3446
- */
3447
- type?: string;
3448
- /**
3449
- * A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.
3450
- * For example: `{"name": "description", "content": "the description itself"}`.
3451
- */
3452
- props?: Record<string, any> | null;
3453
- /** SEO tag meta data. For example, `{"height": 300, "width": 240}`. */
3454
- meta?: Record<string, any> | null;
3455
- /** SEO tag inner content. For example, `<title> inner content </title>`. */
3456
- children?: string;
3457
- /** Whether the tag is a custom tag. */
3458
- custom?: boolean;
3459
- /** Whether the tag is disabled. */
3460
- disabled?: boolean;
3461
- }
3462
- interface Settings {
3463
- /**
3464
- * Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.
3465
- *
3466
- *
3467
- * Default: `false` (Auto Redirect is enabled.)
3468
- */
3469
- preventAutoRedirect?: boolean;
3470
- /**
3471
- * User-selected keyword terms for a specific page.
3472
- * @maxSize 5
3473
- */
3474
- keywords?: Keyword[];
3475
- }
3476
- interface ConnectedOption extends ConnectedOptionOptionSettingsOneOf {
3477
- /** Choices settings. */
3478
- choicesSettings?: ChoicesSettings;
3479
- /**
3480
- * ID of a customization with `customizationType: PRODUCT_OPTION`.
3481
- * @minLength 1
3482
- * @maxLength 36
3483
- */
3484
- _id?: string | null;
3485
- /**
3486
- * Option name.
3487
- * @minLength 1
3488
- * @maxLength 50
3489
- */
3490
- name?: string | null;
3491
- /** Option render type. */
3492
- optionRenderType?: ProductOptionRenderTypeWithLiterals;
3493
- }
3494
- /** @oneof */
3495
- interface ConnectedOptionOptionSettingsOneOf {
3496
- /** Choices settings. */
3497
- choicesSettings?: ChoicesSettings;
3498
- }
3499
- declare enum ProductOptionRenderType {
3500
- /** Not implemented. */
3501
- UNKNOWN_OPTION_RENDER_TYPE = "UNKNOWN_OPTION_RENDER_TYPE",
3502
- /** Text choices. */
3503
- TEXT_CHOICES = "TEXT_CHOICES",
3504
- /** Swatch choices. */
3505
- SWATCH_CHOICES = "SWATCH_CHOICES"
3506
- }
3507
- /** @enumType */
3508
- type ProductOptionRenderTypeWithLiterals = ProductOptionRenderType | 'UNKNOWN_OPTION_RENDER_TYPE' | 'TEXT_CHOICES' | 'SWATCH_CHOICES';
3509
- interface ChoicesSettings {
3510
- /**
3511
- * List of available choices for the option.
3512
- * @minSize 1
3513
- * @maxSize 100
3514
- * @immutable
3515
- */
3516
- choices?: ConnectedOptionChoice[];
3517
- }
3518
- interface ConnectedOptionChoice extends ConnectedOptionChoiceValueOneOf {
3519
- /**
3520
- * Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color).
3521
- * @minLength 3
3522
- * @maxLength 20
3523
- */
3524
- colorCode?: string;
3525
- /**
3526
- * The id of the choice.
3527
- * @format GUID
3528
- */
3529
- choiceId?: string | null;
3530
- /**
3531
- * Product media overrides. When not empty only these images will be shown when such choices selected by customer. Otherwise all images of product.
3532
- * When several choices from different options selected only media filter present in `media_overrides` of ALL choices will be shown.
3533
- * For example if Color:red has images 1,2,3 and Material:Silk has images 2,3,5 then only images 2,3 will be shown when both of them selected.
3534
- * @maxSize 100
3535
- */
3536
- linkedMedia?: ProductMedia[];
3537
- /** The type of this choice. */
3538
- choiceType?: ChoiceTypeWithLiterals;
3539
- /**
3540
- * Choice name.
3541
- * @minLength 1
3542
- * @maxLength 50
3543
- */
3544
- name?: string | null;
3545
- /**
3546
- * A flag that indicates if at least one variant with this choice is in stock in the default store's location.
3547
- * For example, a product with 'Color' and 'Size' options with variants: [Blue, Small] which is out of stock and [Red Large] which is in stock. For choice 'Blue' ths flag will be 'false' and for 'Red' the flag will be true
3548
- * @readonly
3549
- */
3550
- inStock?: boolean;
3551
- /**
3552
- * Whether at least one variant with this choice is visible.
3553
- *
3554
- * Default: `false`
3555
- * @readonly
3556
- */
3557
- visible?: boolean;
3558
- }
3559
- /** @oneof */
3560
- interface ConnectedOptionChoiceValueOneOf {
3561
- /**
3562
- * Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color).
3563
- * @minLength 3
3564
- * @maxLength 20
3565
- */
3566
- colorCode?: string;
3567
- }
3568
- declare enum ChoiceType {
3569
- UNKNOWN_CHOICE_TYPE = "UNKNOWN_CHOICE_TYPE",
3570
- /** Text choice. */
3571
- CHOICE_TEXT = "CHOICE_TEXT",
3572
- /** Single color choice. */
3573
- ONE_COLOR = "ONE_COLOR",
3574
- /** Multiple colors choice. */
3575
- MULTIPLE_COLORS = "MULTIPLE_COLORS",
3576
- /** Image choice. */
3577
- IMAGE = "IMAGE"
3578
- }
3579
- /** @enumType */
3580
- type ChoiceTypeWithLiterals = ChoiceType | 'UNKNOWN_CHOICE_TYPE' | 'CHOICE_TEXT' | 'ONE_COLOR' | 'MULTIPLE_COLORS' | 'IMAGE';
3581
- interface MultipleColors {
3582
- /**
3583
- * List of color codes.
3584
- * @minLength 3
3585
- * @maxLength 20
3586
- * @minSize 2
3587
- * @maxSize 2
3588
- */
3589
- colorCodes?: string[];
3590
- }
3591
- interface ConnectedModifier extends ConnectedModifierModifierSettingsOneOf {
3592
- /** Free text modifier settings. */
3593
- freeTextSettings?: FreeTextSettings;
3594
- /** Choice settings. */
3595
- choicesSettings?: ModifierChoicesSettings;
3596
- /**
3597
- * ID of a customization with `customizationType: MODIFIER`.
3598
- * @minLength 1
3599
- * @maxLength 36
3600
- */
3601
- _id?: string | null;
3602
- /**
3603
- * Modifier title.
3604
- * @minLength 1
3605
- * @maxLength 50
3606
- */
3607
- name?: string | null;
3608
- /** Modifier render type. */
3609
- modifierRenderType?: ModifierRenderTypeWithLiterals;
3610
- /** Whether customer input is required for this modifier. */
3611
- mandatory?: boolean;
3612
- }
3613
- /** @oneof */
3614
- interface ConnectedModifierModifierSettingsOneOf {
3615
- /** Free text modifier settings. */
3616
- freeTextSettings?: FreeTextSettings;
3617
- /** Choice settings. */
3618
- choicesSettings?: ModifierChoicesSettings;
3619
- }
3620
- declare enum ModifierRenderType {
3621
- /** Not implemented. */
3622
- UNKNOWN_MODIFIER_RENDER_TYPE = "UNKNOWN_MODIFIER_RENDER_TYPE",
3623
- /** Free text. */
3624
- FREE_TEXT = "FREE_TEXT",
3625
- /** Text choices. */
3626
- TEXT_CHOICES = "TEXT_CHOICES",
3627
- /** Swatch choices. */
3628
- SWATCH_CHOICES = "SWATCH_CHOICES"
3629
- }
3630
- /** @enumType */
3631
- type ModifierRenderTypeWithLiterals = ModifierRenderType | 'UNKNOWN_MODIFIER_RENDER_TYPE' | 'FREE_TEXT' | 'TEXT_CHOICES' | 'SWATCH_CHOICES';
3632
- interface FreeTextSettings {
3633
- /** Minimum number of characters. */
3634
- minCharCount?: number;
3635
- /**
3636
- * Maximum number of characters.
3637
- * @max 500
3638
- */
3639
- maxCharCount?: number;
3640
- /**
3641
- * Default amount to be added to the product's price.
3642
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
3643
- */
3644
- defaultAddedPrice?: string | null;
3645
- /**
3646
- * Title of the text to be input by the customer.
3647
- * @minLength 1
3648
- * @maxLength 150
3649
- */
3650
- title?: string;
3651
- }
3652
- interface ModifierChoicesSettings {
3653
- /**
3654
- * List of modifier choices.
3655
- * @minSize 1
3656
- * @maxSize 100
3657
- * @immutable
3658
- */
3659
- choices?: ConnectedModifierChoice[];
3660
- }
3661
- interface ConnectedModifierChoice extends ConnectedModifierChoiceValueOneOf {
3662
- /**
3663
- * Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color).
3664
- * @minLength 3
3665
- * @maxLength 20
3666
- */
3667
- colorCode?: string;
3668
- /**
3669
- * Choice ID.
3670
- * @format GUID
3671
- */
3672
- choiceId?: string | null;
3673
- /**
3674
- * Product media.
3675
- * @maxSize 100
3676
- */
3677
- linkedMedia?: ProductMedia[];
3678
- /** Choice type. */
3679
- choiceType?: ChoiceTypeWithLiterals;
3680
- /**
3681
- * Modifier key. Used for eCommerce integration.
3682
- * @readonly
3683
- * @minLength 1
3684
- * @maxLength 50
3685
- */
3686
- key?: string;
3687
- /**
3688
- * Choice name.
3689
- * @minLength 1
3690
- * @maxLength 50
3691
- */
3692
- name?: string | null;
3693
- /**
3694
- * Added price.
3695
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
3696
- */
3697
- addedPrice?: string | null;
3698
- }
3699
- /** @oneof */
3700
- interface ConnectedModifierChoiceValueOneOf {
3701
- /**
3702
- * Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color).
3703
- * @minLength 3
3704
- * @maxLength 20
3705
- */
3706
- colorCode?: string;
3707
- }
3708
- interface Brand {
3709
- /**
3710
- * Brand ID.
3711
- * @format GUID
3712
- */
3713
- _id?: string | null;
3714
- /**
3715
- * Brand name.
3716
- * @maxLength 50
3717
- */
3718
- name?: string | null;
3719
- }
3720
- interface InfoSection {
3721
- /**
3722
- * Info section ID.
3723
- * @format GUID
3724
- */
3725
- _id?: string | null;
3726
- /**
3727
- * Info section unique name.
3728
- * > **Note:** Returned only when you pass `"INFO_SECTION"` to the `fields` array in Products API requests.
3729
- * @maxLength 100
3730
- */
3731
- uniqueName?: string | null;
3732
- /**
3733
- * Info section title.
3734
- * > **Note:** Returned only when you pass `"INFO_SECTION"` to the `fields` array in Products API requests.
3735
- * @minLength 1
3736
- * @maxLength 50
3737
- * @readonly
3738
- */
3739
- title?: string | null;
3740
- /**
3741
- * Info section description using rich content.
3742
- * > **Note:** Returned only when you pass `"INFO_SECTION_DESCRIPTION"` to the `fields` array in Products API requests.
3743
- *
3744
- * <widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="indent.emoji.divider.codeBlock.file.gallery.giphy.image.table.link.textHighlight.textColor" exampleid="7dc9240e-d548-417a-abcf-0291b68b4303">
3745
- * <a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>
3746
- * </widget>
3747
- * @readonly
3748
- */
3749
- description?: RichContent;
3750
- /**
3751
- * Info section description in HTML.
3752
- *
3753
- * When provided on create/update, this string must be a valid HTML. It will then be converted to rich content.
3754
- * `plainDescription` is ignored when value is also passed to the `description` field.
3755
- * > **Note:** Returned only when you pass `"INFO_SECTION_PLAIN_DESCRIPTION"` to the `fields` array in Products API requests.
3756
- * @maxLength 16000
3757
- */
3758
- plainDescription?: string | null;
3759
- }
3760
- interface Ribbon {
3761
- /**
3762
- * Ribbon ID.
3763
- * @minLength 1
3764
- * @maxLength 36
3765
- */
3766
- _id?: string | null;
3767
- /**
3768
- * Ribbon name.
3769
- * @maxLength 30
3770
- */
3771
- name?: string | null;
3772
- }
3773
- interface ProductCategoriesInfo {
3774
- /**
3775
- * A list of categories related to product.
3776
- * @readonly
3777
- * @maxSize 2000
3778
- */
3779
- categories?: ProductCategory[];
3780
- }
3781
- interface ProductCategory {
3782
- /**
3783
- * Category ID.
3784
- * @format GUID
3785
- */
3786
- _id?: string;
3787
- /**
3788
- * Index location of the product within the category, which can be utilized for sorting products in a specific category. For detailed instructions on how to set this up, refer to the [Add and arrange products in category](https://dev.wix.com/docs/rest/business-solutions/stores/catalog-v3/products-v3/sample-use-cases-and-flows#add-and-arrange-products-in-category) sample flow.
3789
- * @max 200
3790
- */
3791
- index?: number | null;
3792
- }
3793
- interface ProductCategoryIdsInfo {
3794
- /**
3795
- * A list of category ids related to product.
3796
- * @readonly
3797
- * @maxSize 2000
3798
- * @format GUID
3799
- */
3800
- categoryIds?: string[];
3801
- }
3802
- interface PriceRange {
3803
- /** Minimum value. */
3804
- minValue?: FixedMonetaryAmount;
3805
- /** Maximum value. */
3806
- maxValue?: FixedMonetaryAmount;
3807
- }
3808
- interface FixedMonetaryAmount {
3809
- /**
3810
- * Monetary amount. For example, `"3.99"`, or `"-4.99"` for a negative amount.
3811
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
3812
- */
3813
- amount?: string;
3814
- /**
3815
- * Formatted monetary amount. For example, `"$3.99"`.
3816
- * > **Note:** Returned only when you pass `"CURRENCY"` to the `fields` array in Products API requests.
3817
- * @readonly
3818
- * @maxLength 20
3819
- */
3820
- formattedAmount?: string | null;
3821
- }
3822
- interface Inventory {
3823
- /**
3824
- * Current availability status.
3825
- * @readonly
3826
- */
3827
- availabilityStatus?: AvailabilityStatusWithLiterals;
3828
- /**
3829
- * Current preorder status.
3830
- * @readonly
3831
- */
3832
- preorderStatus?: PreorderStatusWithLiterals;
3833
- /**
3834
- * Preorder availability status.
3835
- * @readonly
3836
- */
3837
- preorderAvailability?: ProductPreorderAvailabilityWithLiterals;
3838
- }
3839
- declare enum AvailabilityStatus {
3840
- UNKNOWN_AVAILABILITY_STATUS = "UNKNOWN_AVAILABILITY_STATUS",
3841
- /** All variants are in stock and available for purchase. */
3842
- IN_STOCK = "IN_STOCK",
3843
- /** All variants are out of stock. */
3844
- OUT_OF_STOCK = "OUT_OF_STOCK",
3845
- /** Some variants are out of stock and some are in stock and available for purchase. */
3846
- PARTIALLY_OUT_OF_STOCK = "PARTIALLY_OUT_OF_STOCK"
3847
- }
3848
- /** @enumType */
3849
- type AvailabilityStatusWithLiterals = AvailabilityStatus | 'UNKNOWN_AVAILABILITY_STATUS' | 'IN_STOCK' | 'OUT_OF_STOCK' | 'PARTIALLY_OUT_OF_STOCK';
3850
- declare enum PreorderStatus {
3851
- UNKNOWN_PREORDER_STATUS = "UNKNOWN_PREORDER_STATUS",
3852
- /** All variants are enabled for preorder. */
3853
- ENABLED = "ENABLED",
3854
- /** All variants are disabled for preorder. */
3855
- DISABLED = "DISABLED",
3856
- /** Some variants are disabled and some are enabled for preorder. */
3857
- PARTIALLY_ENABLED = "PARTIALLY_ENABLED"
3858
- }
3859
- /** @enumType */
3860
- type PreorderStatusWithLiterals = PreorderStatus | 'UNKNOWN_PREORDER_STATUS' | 'ENABLED' | 'DISABLED' | 'PARTIALLY_ENABLED';
3861
- declare enum ProductPreorderAvailability {
3862
- UNKNOWN_PREORDER_AVAILABILITY_STATUS = "UNKNOWN_PREORDER_AVAILABILITY_STATUS",
3863
- /** All the product variants are available for preorder. */
3864
- ALL_VARIANTS = "ALL_VARIANTS",
3865
- /** None of the product variants are available for preorder. */
3866
- NO_VARIANTS = "NO_VARIANTS",
3867
- /** Some of the product variants are available for preorder. */
3868
- SOME_VARIANTS = "SOME_VARIANTS"
3869
- }
3870
- /** @enumType */
3871
- type ProductPreorderAvailabilityWithLiterals = ProductPreorderAvailability | 'UNKNOWN_PREORDER_AVAILABILITY_STATUS' | 'ALL_VARIANTS' | 'NO_VARIANTS' | 'SOME_VARIANTS';
3872
- declare enum ProductType {
3873
- /** Not implemented. */
3874
- UNKNOWN_PRODUCT_TYPE = "UNKNOWN_PRODUCT_TYPE",
3875
- /** Physical product. */
3876
- PHYSICAL = "PHYSICAL",
3877
- /** Digital product. */
3878
- DIGITAL = "DIGITAL"
3879
- }
3880
- /** @enumType */
3881
- type ProductTypeWithLiterals = ProductType | 'UNKNOWN_PRODUCT_TYPE' | 'PHYSICAL' | 'DIGITAL';
3882
- interface PhysicalProperties {
3883
- /**
3884
- * Price per unit settings.
3885
- * > **Note:** Use this field only when relevant. For example, for products that are sold by weight, volume, or length.
3886
- */
3887
- pricePerUnit?: PricePerUnitSettings;
3888
- /**
3889
- * Fulfiller ID.
3890
- * @format GUID
3891
- */
3892
- fulfillerId?: string | null;
3893
- /**
3894
- * Product shipping weight range - Calculated from the lightest and heaviest variant shipping weights.
3895
- * @readonly
3896
- */
3897
- shippingWeightRange?: WeightRange;
3898
- /**
3899
- * Product price per unit range. The minimum and maximum price per unit of all the variants.
3900
- * @readonly
3901
- */
3902
- pricePerUnitRange?: PricePerUnitRange;
3903
- /**
3904
- * Weight measurement unit.
3905
- * > **Note:** Returned only when you pass `"WEIGHT_MEASUREMENT_UNIT_INFO"` to the `fields` array in Products API requests.
3906
- * @readonly
3907
- */
3908
- weightMeasurementUnitInfo?: WeightMeasurementUnitInfo;
3909
- /**
3910
- * Delivery profile ID.
3911
- * @format GUID
3912
- */
3913
- deliveryProfileId?: string | null;
3914
- }
3915
- interface PricePerUnitSettings {
3916
- /**
3917
- * Quantity.
3918
- * For example, to define price per per 100 grams, set this field to `100`.
3919
- * @min 0.01
3920
- * @max 999999999.99
3921
- */
3922
- quantity?: number;
3923
- /**
3924
- * Measurement unit.
3925
- * For example, to define price per 100 grams, set this field to "G".
3926
- */
3927
- measurementUnit?: MeasurementUnitWithLiterals;
3928
- }
3929
- interface WeightRange {
3930
- /**
3931
- * Minimum weight across all variants associated with this product.
3932
- * @max 999999999.99
3933
- */
3934
- minValue?: number;
3935
- /**
3936
- * Maximum weight across all variants associated with this product.
3937
- * @max 999999999.99
3938
- */
3939
- maxValue?: number;
3940
- }
3941
- interface PricePerUnitRange {
3942
- /** Minimum price per unit across all variants. */
3943
- minValue?: PricePerUnitRangePricePerUnit;
3944
- /** Maximum price per unit across all variants. */
3945
- maxValue?: PricePerUnitRangePricePerUnit;
3946
- }
3947
- interface PricePerUnitRangePricePerUnit {
3948
- /**
3949
- * Calculated value of price per unit. Takes into account pricePerUnit settings of product and variants and price of variants.
3950
- * 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$).
3951
- * @readonly
3952
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
3953
- */
3954
- value?: string;
3955
- /**
3956
- * Price per unit info in the format of variant specific data / product setting, for example €4.00 / 1 Kg.
3957
- * > **Note:** This field is returned by the API only when you pass `fields: "CURRENCY"` in a request.
3958
- * @readonly
3959
- * @maxLength 100
3960
- */
3961
- description?: string | null;
3962
- }
3963
- interface WeightMeasurementUnitInfo {
3964
- /**
3965
- * Weight measurement unit.
3966
- * @readonly
3967
- */
3968
- weightMeasurementUnit?: WeightUnitWithLiterals;
3969
- }
3970
- interface BreadcrumbsInfo {
3971
- /**
3972
- * Breadcrumbs.
3973
- * @readonly
3974
- * @maxSize 5
3975
- */
3976
- breadcrumbs?: BreadCrumb[];
3977
- }
3978
- interface BreadCrumb {
3979
- /**
3980
- * Category ID.
3981
- * @format GUID
3982
- */
3983
- categoryId?: string;
3984
- /**
3985
- * Category name.
3986
- * @minLength 1
3987
- * @maxLength 80
3988
- */
3989
- categoryName?: string;
3990
- /**
3991
- * Category slug.
3992
- * @minLength 1
3993
- * @maxLength 100
3994
- */
3995
- categorySlug?: string;
3996
- }
3997
- interface VariantsInfo {
3998
- /**
3999
- * List of related variants.
4000
- * @minSize 1
4001
- * @maxSize 1000
4002
- */
4003
- variants?: Variant[];
4004
- }
4005
- interface Variant extends VariantTypedPropertiesOneOf {
4006
- /** Physical properties. Must be passed when `productType: PHYSICAL` */
4007
- physicalProperties?: VariantPhysicalProperties;
4008
- /** Digital properties. Must be passed when `productType: DIGITAL` */
4009
- digitalProperties?: VariantDigitalProperties;
4010
- /**
4011
- * Variant ID.
4012
- * @format GUID
4013
- * @immutable
4014
- */
4015
- _id?: string | null;
4016
- /**
4017
- * Whether the variant is visible to site visitors.
4018
- *
4019
- * Default: `true`
4020
- */
4021
- visible?: boolean | null;
4022
- /**
4023
- * Variant SKU (stock keeping unit).
4024
- * @minLength 1
4025
- * @maxLength 40
4026
- */
4027
- sku?: string | null;
4028
- /**
4029
- * Variant barcode.
4030
- * @minLength 1
4031
- * @maxLength 40
4032
- */
4033
- barcode?: string | null;
4034
- /**
4035
- * List of choices that define the product's variant, which requires exactly one choice per product option.
4036
- * Must use `optionChoiceNames` in all requests this field is required.
4037
- * Empty only for default variants of unmanaged products.
4038
- * @maxSize 6
4039
- * @immutable
4040
- */
4041
- choices?: OptionChoice[];
4042
- /** Variant price. */
4043
- price?: PriceInfo;
4044
- /**
4045
- * Variant revenue details.
4046
- *
4047
- * > **Note:** Returned only when the following conditions are met:
4048
- * > + You pass `"MERCHANT_DATA"` to the `fields` array in Products API requests.
4049
- * > + Your app has the required `SCOPE.STORES.PRODUCT_READ_ADMIN` permission scope.
4050
- */
4051
- revenueDetails?: RevenueDetails;
4052
- /**
4053
- * Variant media.
4054
- * @readonly
4055
- */
4056
- media?: ProductMedia;
4057
- /**
4058
- * Subscription prices calculated by applying subscription discount to the variant `price.actual_price`.
4059
- * > **Note:** Returned only when you pass `"SUBSCRIPTION_PRICES_INFO"` to the `fields` array in Products API requests.
4060
- * @readonly
4061
- */
4062
- subscriptionPricesInfo?: SubscriptionPricesInfo;
4063
- /**
4064
- * Variant inventory status.
4065
- * @readonly
4066
- */
4067
- inventoryStatus?: InventoryStatus;
4068
- }
4069
- /** @oneof */
4070
- interface VariantTypedPropertiesOneOf {
4071
- /** Physical properties. Must be passed when `productType: PHYSICAL` */
4072
- physicalProperties?: VariantPhysicalProperties;
4073
- /** Digital properties. Must be passed when `productType: DIGITAL` */
4074
- digitalProperties?: VariantDigitalProperties;
4075
- }
4076
- interface OptionChoice {
4077
- /** Option and choice IDs. These match the IDs of the option and choice from the product's options field. */
4078
- optionChoiceIds?: OptionChoiceIds;
4079
- /**
4080
- * Option and choice names.
4081
- * This needs to be used in all requests `OptionChoice` is needed, and all `OptionChoiceNames` fields are required.
4082
- * > **Note:** Returned only when you pass `"VARIANT_OPTION_CHOICE_NAMES"` to the `fields` array in Products API requests.
4083
- */
4084
- optionChoiceNames?: OptionChoiceNames;
4085
- }
4086
- interface OptionChoiceIds {
4087
- /**
4088
- * Option ID.
4089
- * @minLength 1
4090
- * @maxLength 36
4091
- * @immutable
4092
- */
4093
- optionId?: string;
4094
- /**
4095
- * Choice ID.
4096
- * @format GUID
4097
- * @immutable
4098
- */
4099
- choiceId?: string;
4100
- }
4101
- interface OptionChoiceNames {
4102
- /**
4103
- * Option name.
4104
- * @minLength 1
4105
- */
4106
- optionName?: string;
4107
- /**
4108
- * Choice name.
4109
- * @minLength 1
4110
- */
4111
- choiceName?: string;
4112
- /** Render type. */
4113
- renderType?: ProductOptionRenderTypeWithLiterals;
4114
- }
4115
- interface PriceInfo {
4116
- /** Variant price. Must be greater or equal to 0. */
4117
- actualPrice?: FixedMonetaryAmount;
4118
- /** The compare-at-price represents the original price of a product before any discount. It is optional and should only be set if a discount applies. When set, it must be higher than the current price to reflect accurate savings. */
4119
- compareAtPrice?: FixedMonetaryAmount;
4120
- }
4121
- interface RevenueDetails {
4122
- /** Item cost. */
4123
- cost?: FixedMonetaryAmount;
4124
- /**
4125
- * Profit. Calculated by reducing `cost` from `discountedPrice`.
4126
- * @readonly
4127
- */
4128
- profit?: FixedMonetaryAmount;
4129
- /**
4130
- * Profit Margin. Calculated by dividing `profit` by `discountedPrice`.
4131
- * The result is rounded to 4 decimal places.
4132
- * @readonly
4133
- * @max 1
4134
- */
4135
- profitMargin?: number;
4136
- }
4137
- interface VariantPhysicalProperties {
4138
- /**
4139
- * Variant shipping weight.
4140
- * product.physicalProperties.shipping_weight_range values are taken from here.
4141
- * @max 999999999.99
4142
- */
4143
- weight?: number | null;
4144
- /**
4145
- * Price per unit info, in order to show price per unit on the product page.
4146
- * For example if one sells cheese and defines 100g here then we know that buying this variant buyer receives 100g of cheese.
4147
- * But on product page price will be displayed for units defined on product level. See `pricePerUnit.value` to understand how it's calculated.
4148
- */
4149
- pricePerUnit?: PricePerUnit;
4150
- }
4151
- interface PricePerUnit {
4152
- /**
4153
- * Price per unit data for this variant.
4154
- * `measurementUnit` value must correspond to the measurement unit set on the product.
4155
- */
4156
- settings?: PricePerUnitSettings;
4157
- /**
4158
- * Calculated value of price per unit. Takes into account `pricePerUnit` settings of parent product, of this variant, and discounted price of variant.
4159
- * 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$).
4160
- * @readonly
4161
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
4162
- */
4163
- value?: string;
4164
- /**
4165
- * Price per unit description.
4166
- * > **Note:** Returned only when you pass `"CURRENCY"` to the `fields` array in Products API requests.
4167
- * @readonly
4168
- * @maxLength 100
4169
- */
4170
- description?: string | null;
4171
- }
4172
- interface VariantDigitalProperties {
4173
- /** Digital file which will be downloaded by customer after successful purchase. */
4174
- digitalFile?: SecuredMedia;
4175
- }
4176
- interface SecuredMedia {
4177
- /**
4178
- * Media ID in media manager.
4179
- * @minLength 1
4180
- * @maxLength 100
4181
- */
4182
- _id?: string;
4183
- /**
4184
- * Original file name.
4185
- * @minLength 1
4186
- * @maxLength 1000
4187
- * @readonly
4188
- */
4189
- fileName?: string;
4190
- /**
4191
- * Original file size.
4192
- * @minLength 1
4193
- * @maxLength 1000
4194
- * @readonly
4195
- * @format DECIMAL_VALUE
4196
- * @decimalValue options { maxScale:0 }
4197
- */
4198
- fileSize?: string | null;
4199
- /**
4200
- * File type.
4201
- * @readonly
4202
- */
4203
- fileType?: FileTypeWithLiterals;
4204
- }
4205
- declare enum FileType {
4206
- /** Unspecified file type. */
4207
- UNSPECIFIED = "UNSPECIFIED",
4208
- /** Secure picture file. */
4209
- SECURE_PICTURE = "SECURE_PICTURE",
4210
- /** Secure video file. */
4211
- SECURE_VIDEO = "SECURE_VIDEO",
4212
- /** Secure document file. */
4213
- SECURE_DOCUMENT = "SECURE_DOCUMENT",
4214
- /** Secure music file. */
4215
- SECURE_MUSIC = "SECURE_MUSIC",
4216
- /** Secure archive file. */
4217
- SECURE_ARCHIVE = "SECURE_ARCHIVE"
4218
- }
4219
- /** @enumType */
4220
- type FileTypeWithLiterals = FileType | 'UNSPECIFIED' | 'SECURE_PICTURE' | 'SECURE_VIDEO' | 'SECURE_DOCUMENT' | 'SECURE_MUSIC' | 'SECURE_ARCHIVE';
4221
- interface SubscriptionPricesInfo {
4222
- /**
4223
- * Subscription prices.
4224
- * @maxSize 6
4225
- */
4226
- subscriptionPrices?: SubscriptionPrice[];
4227
- }
4228
- interface SubscriptionPrice {
4229
- /**
4230
- * Subscription ID.
4231
- * @format GUID
4232
- * @readonly
4233
- */
4234
- subscriptionId?: string;
4235
- /**
4236
- * Subscription price calculated by applying subscription discount to the variant `price.actual_price`
4237
- * @readonly
4238
- */
4239
- price?: FixedMonetaryAmount;
4240
- /**
4241
- * Price per unit info.
4242
- * @readonly
4243
- */
4244
- pricePerUnit?: SubscriptionPricePerUnit;
4245
- }
4246
- interface SubscriptionPricePerUnit {
4247
- /**
4248
- * Calculated value of price per unit. Takes into account `pricePerUnit` settings of parent product, `pricePerUnit` settings of this variant, and the variant subscription price.
4249
- * @readonly
4250
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
4251
- */
4252
- value?: string;
4253
- /**
4254
- * Price per unit description.
4255
- * > **Note:** Returned only when you pass `"CURRENCY"` to the `fields` array in Products API requests.
4256
- * @readonly
4257
- * @maxLength 20
4258
- */
4259
- description?: string | null;
4260
- }
4261
- interface InventoryStatus {
4262
- /** Whether the variant is in stock. */
4263
- inStock?: boolean;
4264
- /** Whether preorder is enabled for this variant. */
4265
- preorderEnabled?: boolean;
4266
- }
4267
- interface ExtendedFields {
4268
- /**
4269
- * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
4270
- * The value of each key is structured according to the schema defined when the extended fields were configured.
4271
- *
4272
- * You can only access fields for which you have the appropriate permissions.
8
+ * Retrieve product variants using structured queries with cursor-based pagination.
4273
9
  *
4274
- * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
4275
- */
4276
- namespaces?: Record<string, Record<string, any>>;
4277
- }
4278
- interface SubscriptionDetails {
4279
- /**
4280
- * Subscriptions.
4281
- * @minSize 1
4282
- * @maxSize 6
4283
- */
4284
- subscriptions?: Subscription[];
4285
- /**
4286
- * Whether to allow one-time purchases in addition to subscription-based purchases.
10
+ * Use this endpoint for simple filtering operations on `id` and `productId`.
11
+ * For complex queries with free-text search and aggregations, use Search Variants instead.
4287
12
  *
4288
- * Default: `false`
13
+ * Up to 1,000 variants can be returned per request.
4289
14
  */
4290
- allowOneTimePurchases?: boolean | null;
15
+ (options?: QueryVariantsOptions | undefined): VariantsQueryBuilder;
4291
16
  }
4292
- interface Subscription extends SubscriptionCyclesOneOf {
4293
- /** Whether subscription is renewed automatically at the end of each period. Cannot be `false`, instead set `billingCycles`. */
4294
- autoRenewal?: boolean;
4295
- /**
4296
- * Number of billing cycles before subscription ends.
4297
- * @min 2
4298
- * @max 999
4299
- */
4300
- billingCycles?: number;
4301
- /**
4302
- * Subscription ID.
4303
- * @format GUID
4304
- * @immutable
4305
- */
4306
- _id?: string | null;
4307
- /**
4308
- * Subscription title.
4309
- * @minLength 1
4310
- * @maxLength 20
4311
- */
4312
- title?: string;
4313
- /**
4314
- * Subscription description.
4315
- * @maxLength 60
4316
- */
4317
- description?: string | null;
17
+ declare function searchVariants$1(httpClient: HttpClient): SearchVariantsSignature;
18
+ interface SearchVariantsSignature {
4318
19
  /**
4319
- * Whether the subscription is visible to site visitors.
20
+ * Search product variants using free-text search with advanced query capabilities.
4320
21
  *
4321
- * Default: `true`
4322
- */
4323
- visible?: boolean | null;
4324
- /**
4325
- * Frequency of recurring payment.
4326
- * For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months.
4327
- */
4328
- frequency?: SubscriptionFrequencyWithLiterals;
4329
- /**
4330
- * Interval of recurring payment. Default: `1`. For example, if `frequency: MONTH`, `billingCycles: 3` and `interval: 2`; payment will be made every 2 months for a total of 6 months.
4331
- * @min 1
4332
- * @max 50
4333
- */
4334
- interval?: number | null;
4335
- /**
4336
- * Discount info (optional).
4337
- * For example, a $20 discount would be `amount: 20`, `type: AMOUNT`.
4338
- */
4339
- discount?: SubscriptionDiscount;
4340
- }
4341
- /** @oneof */
4342
- interface SubscriptionCyclesOneOf {
4343
- /** Whether subscription is renewed automatically at the end of each period. Cannot be `false`, instead set `billingCycles`. */
4344
- autoRenewal?: boolean;
4345
- /**
4346
- * Number of billing cycles before subscription ends.
4347
- * @min 2
4348
- * @max 999
4349
- */
4350
- billingCycles?: number;
4351
- }
4352
- /** Frequency unit of recurring payment */
4353
- declare enum SubscriptionFrequency {
4354
- UNDEFINED = "UNDEFINED",
4355
- DAY = "DAY",
4356
- WEEK = "WEEK",
4357
- MONTH = "MONTH",
4358
- YEAR = "YEAR"
4359
- }
4360
- /** @enumType */
4361
- type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
4362
- interface SubscriptionDiscount extends SubscriptionDiscountDiscountOneOf {
4363
- /**
4364
- * Amount to discount from the variant discounted_price.
4365
- * @decimalValue options { gt:0, lte:999999999, maxScale:3 }
4366
- */
4367
- amountOff?: string;
4368
- /**
4369
- * Percentage to discount from variant discounted_price.
4370
- * @min 0.1
4371
- * @max 99.9
4372
- */
4373
- percentOff?: number;
4374
- /** Discount type. */
4375
- type?: DiscountTypeWithLiterals;
4376
- }
4377
- /** @oneof */
4378
- interface SubscriptionDiscountDiscountOneOf {
4379
- /**
4380
- * Amount to discount from the variant discounted_price.
4381
- * @decimalValue options { gt:0, lte:999999999, maxScale:3 }
4382
- */
4383
- amountOff?: string;
4384
- /**
4385
- * Percentage to discount from variant discounted_price.
4386
- * @min 0.1
4387
- * @max 99.9
4388
- */
4389
- percentOff?: number;
4390
- }
4391
- declare enum DiscountType {
4392
- UNKNOWN_DISCOUNT = "UNKNOWN_DISCOUNT",
4393
- /** Discount by a specific amount. */
4394
- AMOUNT = "AMOUNT",
4395
- /** Discount by a percentage. */
4396
- PERCENT = "PERCENT"
4397
- }
4398
- /** @enumType */
4399
- type DiscountTypeWithLiterals = DiscountType | 'UNKNOWN_DISCOUNT' | 'AMOUNT' | 'PERCENT';
4400
- interface VariantSummary {
4401
- /**
4402
- * The total number of variants for the product.
4403
- * @readonly
4404
- */
4405
- variantCount?: number;
4406
- }
4407
- interface MinVariantPriceInfo {
4408
- /**
4409
- * Subscription price calculated by applying subscription discount to the variant `price.actualPrice`
4410
- * @readonly
4411
- */
4412
- minSubscriptionPrice?: FixedMonetaryAmount;
4413
- /**
4414
- * Subscription price per unit calculated value of price per unit.
4415
- * Takes into account `pricePerUnit` settings of parent product, `pricePerUnit` settings of this variant, and the variant subscription price.
4416
- * @readonly
4417
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
4418
- */
4419
- minSubscriptionPricePerUnit?: string | null;
4420
- /**
4421
- * Variant price per unit.
4422
- * @readonly
4423
- */
4424
- pricePerUnitData?: PricePerUnit;
4425
- /**
4426
- * Variant SKU (stock keeping unit).
4427
- * @readonly
4428
- * @minLength 1
4429
- * @maxLength 40
4430
- */
4431
- sku?: string | null;
4432
- /**
4433
- * Variant shipping weight.
4434
- * @readonly
4435
- * @max 999999999.99
4436
- */
4437
- weight?: number | null;
4438
- /**
4439
- * Variant revenue details.
22
+ * Use this endpoint for complex queries that include free-text search, aggregations,
23
+ * or when you need faceted search results. For simple filtering, use Query Variants instead.
4440
24
  *
4441
- * > **Note:** Returned only when the following conditions are met:
4442
- * > + You pass `"MERCHANT_DATA"` to the `fields` array in Products API requests.
4443
- * > + Your app has the required `SCOPE.STORES.PRODUCT_READ_ADMIN` permission scope.
4444
- * @readonly
4445
- */
4446
- revenueDetails?: RevenueDetails;
4447
- /** Variant price. Must be greater or equal to 0. */
4448
- actualPrice?: FixedMonetaryAmount;
4449
- /** The compare-at-price represents the original price of a product before any discount. It is optional and should only be set if a discount applies. When set, it must be higher than the current price to reflect accurate savings. */
4450
- compareAtPrice?: FixedMonetaryAmount;
4451
- }
4452
- interface MigrateProductVariantsResponse {
4453
- }
4454
- interface RecoverProductVariantsRequest {
4455
- }
4456
- interface RecoverProductVariantsResponse {
4457
- }
4458
- interface DomainEvent extends DomainEventBodyOneOf {
4459
- createdEvent?: EntityCreatedEvent;
4460
- updatedEvent?: EntityUpdatedEvent;
4461
- deletedEvent?: EntityDeletedEvent;
4462
- actionEvent?: ActionEvent;
4463
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
4464
- _id?: string;
4465
- /**
4466
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
4467
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
4468
- */
4469
- entityFqdn?: string;
4470
- /**
4471
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
4472
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
4473
- */
4474
- slug?: string;
4475
- /** ID of the entity associated with the event. */
4476
- entityId?: string;
4477
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
4478
- eventTime?: Date | null;
4479
- /**
4480
- * Whether the event was triggered as a result of a privacy regulation application
4481
- * (for example, GDPR).
4482
- */
4483
- triggeredByAnonymizeRequest?: boolean | null;
4484
- /** If present, indicates the action that triggered the event. */
4485
- originatedFrom?: string | null;
4486
- /**
4487
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
4488
- * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
4489
- */
4490
- entityEventSequence?: string | null;
4491
- }
4492
- /** @oneof */
4493
- interface DomainEventBodyOneOf {
4494
- createdEvent?: EntityCreatedEvent;
4495
- updatedEvent?: EntityUpdatedEvent;
4496
- deletedEvent?: EntityDeletedEvent;
4497
- actionEvent?: ActionEvent;
4498
- }
4499
- interface EntityCreatedEvent {
4500
- entity?: string;
4501
- }
4502
- interface RestoreInfo {
4503
- deletedDate?: Date | null;
4504
- }
4505
- interface EntityUpdatedEvent {
4506
- /**
4507
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
4508
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
4509
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
4510
- */
4511
- currentEntity?: string;
4512
- }
4513
- interface EntityDeletedEvent {
4514
- /** Entity that was deleted. */
4515
- deletedEntity?: string | null;
4516
- }
4517
- interface ActionEvent {
4518
- body?: string;
4519
- }
4520
- interface Empty {
4521
- }
4522
- interface MessageEnvelope {
4523
- /**
4524
- * App instance ID.
4525
- * @format GUID
4526
- */
4527
- instanceId?: string | null;
4528
- /**
4529
- * Event type.
4530
- * @maxLength 150
4531
- */
4532
- eventType?: string;
4533
- /** The identification type and identity data. */
4534
- identity?: IdentificationData;
4535
- /** Stringify payload. */
4536
- data?: string;
4537
- }
4538
- interface IdentificationData extends IdentificationDataIdOneOf {
4539
- /**
4540
- * ID of a site visitor that has not logged in to the site.
4541
- * @format GUID
4542
- */
4543
- anonymousVisitorId?: string;
4544
- /**
4545
- * ID of a site visitor that has logged in to the site.
4546
- * @format GUID
4547
- */
4548
- memberId?: string;
4549
- /**
4550
- * ID of a Wix user (site owner, contributor, etc.).
4551
- * @format GUID
4552
- */
4553
- wixUserId?: string;
4554
- /**
4555
- * ID of an app.
4556
- * @format GUID
4557
- */
4558
- appId?: string;
4559
- /** @readonly */
4560
- identityType?: WebhookIdentityTypeWithLiterals;
4561
- }
4562
- /** @oneof */
4563
- interface IdentificationDataIdOneOf {
4564
- /**
4565
- * ID of a site visitor that has not logged in to the site.
4566
- * @format GUID
4567
- */
4568
- anonymousVisitorId?: string;
4569
- /**
4570
- * ID of a site visitor that has logged in to the site.
4571
- * @format GUID
4572
- */
4573
- memberId?: string;
4574
- /**
4575
- * ID of a Wix user (site owner, contributor, etc.).
4576
- * @format GUID
4577
- */
4578
- wixUserId?: string;
4579
- /**
4580
- * ID of an app.
4581
- * @format GUID
4582
- */
4583
- appId?: string;
4584
- }
4585
- declare enum WebhookIdentityType {
4586
- UNKNOWN = "UNKNOWN",
4587
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
4588
- MEMBER = "MEMBER",
4589
- WIX_USER = "WIX_USER",
4590
- APP = "APP"
4591
- }
4592
- /** @enumType */
4593
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
4594
- interface QueryVariantsOptions {
4595
- /**
4596
- * A list of requested fields to be included in the response.
4597
- * @maxSize 100
4598
- */
4599
- fields?: RequestedFieldsWithLiterals[] | undefined;
4600
- }
4601
- interface QueryCursorResult {
4602
- cursors: Cursors;
4603
- hasNext: () => boolean;
4604
- hasPrev: () => boolean;
4605
- length: number;
4606
- pageSize: number;
4607
- }
4608
- interface VariantsQueryResult extends QueryCursorResult {
4609
- items: ReadOnlyVariant[];
4610
- query: VariantsQueryBuilder;
4611
- next: () => Promise<VariantsQueryResult>;
4612
- prev: () => Promise<VariantsQueryResult>;
4613
- }
4614
- interface VariantsQueryBuilder {
4615
- /** @param propertyName - Property whose value is compared with `value`.
4616
- * @param value - Value to compare against.
4617
- * @documentationMaturity preview
25
+ * Supports Wix Query Language (WQL) for structured filtering combined with free-text search.
26
+ * > **Note:** Non-visible variants, and variants related to non-visible products are filtered from results if you don't have permissions to read hidden products.
27
+ * @param - WQL expression for searching variants.
4618
28
  */
4619
- eq: (propertyName: '_id' | 'productData.productId', value: any) => VariantsQueryBuilder;
4620
- /** @param propertyName - Property whose value is compared with `value`.
4621
- * @param value - Value to compare against.
4622
- * @documentationMaturity preview
4623
- */
4624
- ne: (propertyName: '_id' | 'productData.productId', value: any) => VariantsQueryBuilder;
4625
- /** @param propertyName - Property whose value is compared with `value`.
4626
- * @param value - Value to compare against.
4627
- * @documentationMaturity preview
4628
- */
4629
- ge: (propertyName: '_id' | 'productData.productId', value: any) => VariantsQueryBuilder;
4630
- /** @param propertyName - Property whose value is compared with `value`.
4631
- * @param value - Value to compare against.
4632
- * @documentationMaturity preview
4633
- */
4634
- gt: (propertyName: '_id' | 'productData.productId', value: any) => VariantsQueryBuilder;
4635
- /** @param propertyName - Property whose value is compared with `value`.
4636
- * @param value - Value to compare against.
4637
- * @documentationMaturity preview
4638
- */
4639
- le: (propertyName: '_id' | 'productData.productId', value: any) => VariantsQueryBuilder;
4640
- /** @param propertyName - Property whose value is compared with `value`.
4641
- * @param value - Value to compare against.
4642
- * @documentationMaturity preview
4643
- */
4644
- lt: (propertyName: '_id' | 'productData.productId', value: any) => VariantsQueryBuilder;
4645
- /** @param propertyName - Property whose value is compared with `string`.
4646
- * @param string - String to compare against. Case-insensitive.
4647
- * @documentationMaturity preview
4648
- */
4649
- startsWith: (propertyName: '_id' | 'productData.productId', value: string) => VariantsQueryBuilder;
4650
- /** @param propertyName - Property whose value is compared with `values`.
4651
- * @param values - List of values to compare against.
4652
- * @documentationMaturity preview
4653
- */
4654
- hasSome: (propertyName: '_id' | 'productData.productId', value: any[]) => VariantsQueryBuilder;
4655
- /** @documentationMaturity preview */
4656
- in: (propertyName: '_id' | 'productData.productId', value: any) => VariantsQueryBuilder;
4657
- /** @documentationMaturity preview */
4658
- exists: (propertyName: '_id' | 'productData.productId', value: boolean) => VariantsQueryBuilder;
4659
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
4660
- * @documentationMaturity preview
4661
- */
4662
- ascending: (...propertyNames: Array<'_id' | 'productData.productId'>) => VariantsQueryBuilder;
4663
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
4664
- * @documentationMaturity preview
4665
- */
4666
- descending: (...propertyNames: Array<'_id' | 'productData.productId'>) => VariantsQueryBuilder;
4667
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
4668
- * @documentationMaturity preview
4669
- */
4670
- limit: (limit: number) => VariantsQueryBuilder;
4671
- /** @param cursor - A pointer to specific record
4672
- * @documentationMaturity preview
4673
- */
4674
- skipTo: (cursor: string) => VariantsQueryBuilder;
4675
- /** @documentationMaturity preview */
4676
- find: () => Promise<VariantsQueryResult>;
4677
- }
4678
- interface SearchVariantsOptions {
4679
- /**
4680
- * A list of requested fields to be included in the response.
4681
- * @maxSize 100
4682
- */
4683
- fields?: RequestedFieldsWithLiterals[];
4684
- }
4685
- interface ReadOnlyVariantSearchSpec extends SearchSpec {
4686
- aggregatable: [
4687
- 'barcode',
4688
- 'internalMetadata.rowState',
4689
- 'inventoryStatus.inStock',
4690
- 'inventoryStatus.preorderEnabled',
4691
- 'optionChoices.optionChoiceIds.choiceId',
4692
- 'optionChoices.optionChoiceIds.optionId',
4693
- 'price.actualPrice.amount',
4694
- 'price.compareAtPrice.amount',
4695
- 'productData.directCategoryIds',
4696
- 'productData.name',
4697
- 'productData.productId',
4698
- 'productData.productType',
4699
- 'productData.slug',
4700
- 'productData.visible',
4701
- 'productData.visibleInPos',
4702
- 'sku',
4703
- 'visible'
4704
- ];
4705
- paging: 'cursor';
4706
- wql: [
4707
- {
4708
- operators: ['$hasAll', '$hasSome'];
4709
- fields: [
4710
- 'optionChoices.optionChoiceIds.choiceId',
4711
- 'optionChoices.optionChoiceIds.optionId'
4712
- ];
4713
- sort: 'NONE';
4714
- },
4715
- {
4716
- operators: '*';
4717
- fields: [
4718
- 'barcode',
4719
- 'internalMetadata.rowState',
4720
- 'inventoryStatus.inStock',
4721
- 'inventoryStatus.preorderEnabled',
4722
- 'price.actualPrice.amount',
4723
- 'price.compareAtPrice.amount',
4724
- 'productData.directCategoryIds',
4725
- 'productData.name',
4726
- 'productData.productId',
4727
- 'productData.productType',
4728
- 'productData.slug',
4729
- 'productData.visible',
4730
- 'productData.visibleInPos',
4731
- 'sku',
4732
- 'visible'
4733
- ];
4734
- sort: 'NONE';
4735
- }
4736
- ];
29
+ (search: ReadOnlyVariantSearch, options?: SearchVariantsOptions | undefined): Promise<SearchVariantsResponse>;
4737
30
  }
4738
31
 
4739
- export { type ActionEvent, type Aggregation, type AggregationData, type AggregationDateHistogramAggregation, type AggregationKindOneOf, type AggregationNestedAggregation, type AggregationRangeAggregation, type AggregationResults, type AggregationResultsResultOneOf, type AggregationResultsScalarResult, type AggregationScalarAggregation, AggregationType, type AggregationValueAggregation, type AggregationValueAggregationOptionsOneOf, Alignment, type AnchorData, type AppEmbedData, type AppEmbedDataAppDataOneOf, AppType, type AudioData, AvailabilityStatus, type Background, type BackgroundBackgroundOneOf, BackgroundType, type BlockquoteData, type BookingData, type Border, type BorderColors, type Brand, type BreadCrumb, type BreadcrumbsInfo, type BulletedListData, type ButtonData, type CaptionData, type CellStyle, ChoiceType, type ChoicesSettings, type CodeBlockData, type CollapsibleListData, type ColorData, type Colors, type CommonAggregation, type CommonAggregationKindOneOf, CommonAggregationType, CommonScalarType, type CommonSearchDetails, CommonSortOrder, type CommonSorting, type CommonVideoResolution, type ConnectedModifier, type ConnectedModifierChoice, type ConnectedModifierChoiceValueOneOf, type ConnectedModifierModifierSettingsOneOf, type ConnectedOption, type ConnectedOptionChoice, type ConnectedOptionChoiceValueOneOf, type ConnectedOptionOptionSettingsOneOf, Crop, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type CursorSearch, type CursorSearchPagingMethodOneOf, type Cursors, type DateHistogramAggregation, DateHistogramAggregationInterval, type DateHistogramResult, type DateHistogramResults, type Decoration, type DecorationDataOneOf, DecorationType, type DeprecatedSearchVariantsWithOffsetRequest, type DeprecatedSearchVariantsWithOffsetResponse, type Design, type Dimensions, Direction, DiscountType, type DividerData, type DocumentStyle, type DomainEvent, type DomainEventBodyOneOf, type EmbedData, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventData, type ExtendedFields, type FileData, type FileSource, type FileSourceDataOneOf, FileType, type FixedMonetaryAmount, type FontSizeData, FontType, type FreeTextSettings, type GIF, type GIFData, GIFType, type GalleryData, type GalleryOptions, type Gradient, type GroupByAggregation, type GroupByAggregationKindOneOf, type GroupByValueResults, type HTMLData, type HTMLDataDataOneOf, type HeadingData, type Height, type IdentificationData, type IdentificationDataIdOneOf, type Image, type ImageData, type ImageDataStyles, type IncludeMissingValuesOptions, type InfoSection, InitialExpandedItems, type InternalMetadata, InternalRowState, Interval, type Inventory, type InventoryStatus, type Item, type ItemDataOneOf, type ItemStyle, type Keyword, type Layout, type LayoutCellData, LayoutType, LineStyle, type Link, type LinkData, type LinkDataOneOf, type LinkPreviewData, type LinkPreviewDataStyles, type ListValue, type MapData, type MapSettings, MapType, MeasurementUnit, type Media, type MediaItemsInfo, MediaType, type MentionData, type MessageEnvelope, type Metadata, type MigrateProductVariantsRequest, type MigrateProductVariantsResponse, type MinVariantPriceInfo, MissingValues, Mode, type ModifierChoicesSettings, ModifierRenderType, type MultipleColors, type NestedAggregation, type NestedAggregationItem, type NestedAggregationItemKindOneOf, type NestedAggregationNestedAggregationItem, type NestedAggregationNestedAggregationItemKindOneOf, NestedAggregationNestedAggregationType, type NestedAggregationResults, type NestedAggregationResultsResultOneOf, NestedAggregationType, type NestedResultValue, type NestedResultValueResultOneOf, type NestedResults, type NestedValueAggregationResult, type Node, type NodeDataOneOf, type NodeStyle, NodeType, NullValue, type Oembed, type Option, type OptionChoice, type OptionChoiceIds, type OptionChoiceNames, type OptionDesign, type OptionLayout, type OrderedListData, Orientation, type PDFSettings, type PagingMetadata, type ParagraphData, type Permissions, type PhysicalProperties, type PlatformOffsetSearch, type PlatformOffsetSearchPagingMethodOneOf, type PlatformPaging, type PlaybackOptions, type PluginContainerData, PluginContainerDataAlignment, type PluginContainerDataWidth, type PluginContainerDataWidthDataOneOf, type Poll, type PollData, type PollDataLayout, type PollDesign, type PollLayout, PollLayoutDirection, PollLayoutType, type PollSettings, Position, PreorderStatus, type PriceInfo, type PricePerUnit, type PricePerUnitRange, type PricePerUnitRangePricePerUnit, type PricePerUnitSettings, type PriceRange, type Product, type ProductCategoriesInfo, type ProductCategory, type ProductCategoryIdsInfo, type ProductFields, type ProductFieldsTypedPropertiesOneOf, type ProductMedia, type ProductMediaMediaOneOf, ProductMediaMediaType, type ProductMediaSetByOneOf, ProductOptionRenderType, ProductPreorderAvailability, ProductType, type ProductTypedPropertiesOneOf, type QueryVariantsOptions, type QueryVariantsRequest, type QueryVariantsResponse, type RangeAggregation, type RangeAggregationRangeBucket, type RangeAggregationResult, type RangeBucket, type RangeResult, type RangeResults, type ReadOnlyVariant, type ReadOnlyVariantSearchSpec, type ReadOnlyVariantTypedPropertiesOneOf, type RecoverProductVariantsRequest, type RecoverProductVariantsResponse, type Rel, RequestedFields, type RestoreInfo, type Results, type RevenueDetails, type Ribbon, type RichContent, type ScalarAggregation, type ScalarResult, ScalarType, type SearchDetails, SearchDetailsMode, type SearchVariantsOptions, type SearchVariantsRequest, type SearchVariantsResponse, type SecuredMedia, SecuredMediaFileType, type SeoSchema, type Settings, SortDirection, SortOrder, SortType, type Sorting, Source, type Spoiler, type SpoilerData, type Styles, type StylesBorder, type Subscription, type SubscriptionCyclesOneOf, type SubscriptionDetails, type SubscriptionDiscount, type SubscriptionDiscountDiscountOneOf, SubscriptionFrequency, type SubscriptionPrice, type SubscriptionPricePerUnit, type SubscriptionPricesInfo, type TableCellData, type TableData, type Tag, Target, TextAlignment, type TextData, type TextNodeStyle, type TextStyle, type Thumbnail, type Thumbnails, ThumbnailsAlignment, Type, type V1Media, type V3FixedMonetaryAmount, type V3InventoryStatus, type V3OptionChoice, type V3OptionChoiceIds, type V3OptionChoiceNames, type V3PhysicalProperties, type V3PriceInfo, type V3PricePerUnit, type V3PricePerUnitSettings, type V3ProductMedia, type V3ProductMediaMediaOneOf, type V3ProductMediaSetByOneOf, V3ProductType, type V3RevenueDetails, type V3SecuredMedia, type V3SubscriptionPrice, type V3SubscriptionPricePerUnit, type V3SubscriptionPricesInfo, type V3Thumbnail, type V3VariantDigitalProperties, type V3VariantPhysicalProperties, type V3WeightMeasurementUnitInfo, type ValueAggregation, type ValueAggregationIncludeMissingValuesOptions, ValueAggregationMissingValues, type ValueAggregationOptionsOneOf, type ValueAggregationResult, ValueAggregationSortDirection, ValueAggregationSortType, type ValueResult, type ValueResults, type Variant, type VariantDigitalProperties, type VariantPhysicalProperties, type VariantSummary, type VariantTypedPropertiesOneOf, type VariantsInfo, type VariantsQueryBuilder, type VariantsQueryResult, VerticalAlignment, type Video, type VideoData, type VideoResolution, ViewMode, ViewRole, VoteRole, WebhookIdentityType, type WeightMeasurementUnitInfo, type WeightRange, WeightUnit, Width, WidthType };
32
+ declare const queryVariants: MaybeContext<BuildRESTFunction<typeof queryVariants$1> & typeof queryVariants$1>;
33
+ declare const searchVariants: MaybeContext<BuildRESTFunction<typeof searchVariants$1> & typeof searchVariants$1>;
34
+
35
+ export { QueryVariantsOptions, SearchVariantsOptions, SearchVariantsResponse, VariantsQueryBuilder, queryVariants, searchVariants };