@wix/ditto-codegen-public 1.0.162 → 1.0.163

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 (66) hide show
  1. package/dist/docs-output/api-docs/bookings-bookings-onBookingCanceled-doc.txt +169 -0
  2. package/dist/docs-output/api-docs/bookings-bookings-onBookingCreated-doc.txt +154 -0
  3. package/dist/docs-output/api-docs/crm-contacts-onContactCreated-doc.txt +87 -171
  4. package/dist/docs-output/api-docs/crm-contacts-onContactDeleted-doc.txt +58 -0
  5. package/dist/docs-output/api-docs/crm-contacts-onContactUpdated-doc.txt +99 -0
  6. package/dist/docs-output/api-docs/data-items-get-doc.txt +95 -54
  7. package/dist/docs-output/api-docs/data-items-insert-doc.txt +235 -43
  8. package/dist/docs-output/api-docs/data-items-onDataItemCreated-doc.txt +61 -0
  9. package/dist/docs-output/api-docs/data-items-onDataItemDeleted-doc.txt +58 -0
  10. package/dist/docs-output/api-docs/data-items-onDataItemUpdated-doc.txt +61 -0
  11. package/dist/docs-output/api-docs/data-items-query-doc.txt +507 -302
  12. package/dist/docs-output/api-docs/data-items-remove-doc.txt +120 -40
  13. package/dist/docs-output/api-docs/data-items-update-doc.txt +425 -46
  14. package/dist/docs-output/api-docs/ecom-cart-addToCart-doc.txt +488 -0
  15. package/dist/docs-output/api-docs/ecom-cart-createCart-doc.txt +518 -0
  16. package/dist/docs-output/api-docs/ecom-cart-createCheckout-doc.txt +155 -0
  17. package/dist/docs-output/api-docs/ecom-cart-deleteCart-doc.txt +92 -0
  18. package/dist/docs-output/api-docs/ecom-cart-getCart-doc.txt +376 -0
  19. package/dist/docs-output/api-docs/ecom-cart-onCartCreated-doc.txt +89 -80
  20. package/dist/docs-output/api-docs/ecom-cart-onCartUpdated-doc.txt +91 -81
  21. package/dist/docs-output/api-docs/ecom-cart-removeLineItemsFromCart-doc.txt +321 -0
  22. package/dist/docs-output/api-docs/ecom-cart-updateCart-doc.txt +539 -0
  23. package/dist/docs-output/api-docs/ecom-checkout-addToCheckout-doc.txt +1005 -0
  24. package/dist/docs-output/api-docs/ecom-checkout-createCheckout-doc.txt +1641 -0
  25. package/dist/docs-output/api-docs/ecom-checkout-getCheckout-doc.txt +1027 -0
  26. package/dist/docs-output/api-docs/ecom-checkout-onCheckoutCompleted-doc.txt +151 -0
  27. package/dist/docs-output/api-docs/ecom-checkout-onCheckoutCreated-doc.txt +150 -0
  28. package/dist/docs-output/api-docs/ecom-checkout-onCheckoutUpdated-doc.txt +150 -0
  29. package/dist/docs-output/api-docs/ecom-checkout-removeLineItemsFromCheckout-doc.txt +879 -0
  30. package/dist/docs-output/api-docs/ecom-checkout-updateCheckout-doc.txt +1011 -0
  31. package/dist/docs-output/api-docs/ecom-currentCart-getCurrentCart-doc.txt +368 -322
  32. package/dist/docs-output/api-docs/ecom-currentCart-updateCurrentCart-doc.txt +506 -321
  33. package/dist/docs-output/api-docs/ecom-orders-bulkUpdateOrders-doc.txt +1040 -0
  34. package/dist/docs-output/api-docs/ecom-orders-cancelOrder-doc.txt +608 -0
  35. package/dist/docs-output/api-docs/ecom-orders-getOrder-doc.txt +926 -0
  36. package/dist/docs-output/api-docs/ecom-orders-onOrderCreated-doc.txt +245 -0
  37. package/dist/docs-output/api-docs/ecom-orders-onOrderUpdated-doc.txt +244 -0
  38. package/dist/docs-output/api-docs/ecom-orders-searchOrders-doc.txt +670 -0
  39. package/dist/docs-output/api-docs/ecom-orders-updateOrder-doc.txt +818 -0
  40. package/dist/docs-output/api-docs/search-wixSiteSearch-search-doc.txt +162 -0
  41. package/dist/docs-output/api-docs/stores-collections-addProductsToCollection-doc.txt +86 -0
  42. package/dist/docs-output/api-docs/stores-collections-createCollection-doc.txt +108 -0
  43. package/dist/docs-output/api-docs/stores-collections-getCollection-doc.txt +102 -0
  44. package/dist/docs-output/api-docs/stores-collections-queryCollections-doc.txt +209 -0
  45. package/dist/docs-output/api-docs/stores-collections-removeProductsFromCollection-doc.txt +86 -0
  46. package/dist/docs-output/api-docs/stores-collections-updateCollection-doc.txt +110 -0
  47. package/dist/docs-output/api-docs/stores-inventory-queryInventory-doc.txt +98 -0
  48. package/dist/docs-output/api-docs/stores-inventory-updateInventoryVariants-doc.txt +249 -0
  49. package/dist/docs-output/api-docs/stores-inventoryItemsV3-queryInventoryItems-doc.txt +236 -0
  50. package/dist/docs-output/api-docs/stores-inventoryItemsV3-updateInventoryItem-doc.txt +139 -0
  51. package/dist/docs-output/api-docs/stores-productsV3-createProduct-doc.txt +1697 -0
  52. package/dist/docs-output/api-docs/stores-productsV3-deleteProduct-doc.txt +73 -0
  53. package/dist/docs-output/api-docs/stores-productsV3-getProduct-doc.txt +933 -0
  54. package/dist/docs-output/api-docs/stores-productsV3-onProductCreated-doc.txt +794 -0
  55. package/dist/docs-output/api-docs/stores-productsV3-onProductDeleted-doc.txt +794 -0
  56. package/dist/docs-output/api-docs/stores-productsV3-onProductUpdated-doc.txt +794 -0
  57. package/dist/docs-output/api-docs/stores-productsV3-queryProducts-doc.txt +1051 -0
  58. package/dist/docs-output/api-docs/stores-productsV3-searchProducts-doc.txt +1144 -0
  59. package/dist/docs-output/api-docs/stores-productsV3-updateProduct-doc.txt +1730 -1600
  60. package/dist/docs-output/api-docs/stores-readOnlyVariantsV3-queryVariants-doc.txt +290 -0
  61. package/dist/docs-output/api-docs/stores-readOnlyVariantsV3-searchVariants-doc.txt +353 -0
  62. package/dist/out.js +929 -79
  63. package/package.json +2 -2
  64. package/dist/docs-output/api-docs/data-items-onDataItemCreated.txt +0 -103
  65. package/dist/docs-output/api-docs/stores-product-onProductCreated-doc.txt +0 -118
  66. package/dist/docs-output/api-docs/stores-productV3-onProductCreated-doc.txt +0 -184
@@ -0,0 +1,353 @@
1
+ <stores_readOnlyVariantsV3_searchVariants>
2
+ <description>
3
+ # Method name:
4
+
5
+ stores.readOnlyVariantsV3.searchVariants(search: CursorSearch, options: SearchVariantsOptions)
6
+
7
+ # Method Link:
8
+
9
+ https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/read-only-variants-v3/search-variants
10
+
11
+ # Method Description:
12
+
13
+ Search product variants using free-text search with advanced query capabilities.
14
+
15
+ Use this endpoint for complex queries that include free-text search, aggregations,
16
+ or when you need faceted search results. For simple filtering, use Query Variants instead.
17
+
18
+ Supports Wix Query Language (WQL) for structured filtering combined with free-text search.
19
+ > **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.
20
+
21
+ | Property | Capabilities | Filters
22
+ |-------|------------|------|
23
+ | `optionChoices.optionChoiceIds.choiceId` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$hasAll`, `$hasSome` |
24
+ | `optionChoices.optionChoiceIds.optionId` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$hasAll`, `$hasSome` |
25
+ | `barcode` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any`, `$begins`, `$gt`, `$lt`, `$lte`, `$gte` |
26
+ | `inventoryStatus.inStock` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any` |
27
+ | `inventoryStatus.preorderEnabled` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any` |
28
+ | `price.actualPrice.amount` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any`, `$begins`, `$gt`, `$lt`, `$lte`, `$gte` |
29
+ | `price.compareAtPrice.amount` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any`, `$begins`, `$gt`, `$lt`, `$lte`, `$gte` |
30
+ | `productData.handle` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any`, `$begins`, `$gt`, `$lt`, `$lte`, `$gte` |
31
+ | `productData.name` | Search: <span style="color: #2e7d32;">✓</span><br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any`, `$begins`, `$gt`, `$lt`, `$lte`, `$gte` |
32
+ | `productData.productId` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any`, `$begins`, `$gt`, `$lt`, `$lte`, `$gte` |
33
+ | `productData.productType` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any` |
34
+ | `productData.slug` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any`, `$begins`, `$gt`, `$lt`, `$lte`, `$gte` |
35
+ | `productData.visible` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any` |
36
+ | `productData.visibleInPos` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any` |
37
+ | `sku` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any`, `$begins`, `$gt`, `$lt`, `$lte`, `$gte` |
38
+ | `visible` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any` |
39
+
40
+
41
+ # Method Permissions:
42
+
43
+ - WIX_STORES.READ_ONLY_VARIANT_READ
44
+ - WIX_STORES.READ_ONLY_VARIANT_READ_HIDDEN
45
+
46
+ # Method Permissions Scopes IDs:
47
+
48
+ undefined
49
+
50
+
51
+
52
+ # Method Code Examples:
53
+
54
+ ## searchVariants
55
+
56
+ ```javascript
57
+ import { readOnlyVariantsV3 } from '@wix/stores';
58
+
59
+ async function searchVariants(search, options) {
60
+ const response = await readOnlyVariantsV3.searchVariants(search, options);
61
+ };
62
+ ```
63
+
64
+ ## searchVariants (with elevated permissions)
65
+
66
+ ```javascript
67
+ import { readOnlyVariantsV3 } from '@wix/stores';
68
+ import { auth } from '@wix/essentials';
69
+
70
+ async function mySearchVariantsMethod(search, options) {
71
+ const elevatedSearchVariants = auth.elevate(readOnlyVariantsV3.searchVariants);
72
+ const response = await elevatedSearchVariants(search, options);
73
+ }
74
+ ```
75
+
76
+
77
+
78
+ ## default
79
+
80
+ ```javascript
81
+ try {
82
+ const result = await readOnlyVariantsV3.searchVariants({
83
+ search: {
84
+ aggregations: [],
85
+ filter: {},
86
+ search: {
87
+ expression: "Future Product",
88
+ fields: ["productData.name"],
89
+ fuzzy: true,
90
+ mode: "OR"
91
+ },
92
+ sort: [],
93
+ timeZone: "+02:00"
94
+ }
95
+ }, {});
96
+ return result;
97
+ } catch (error) {
98
+ console.error(error);
99
+ throw error;
100
+ }
101
+ ```
102
+ </description>
103
+ <type_definition>
104
+ ```
105
+ Method: stores.readOnlyVariantsV3.searchVariants(search, options)
106
+ Description: Search product variants using free-text search with advanced query capabilities. Use this endpoint for complex queries that include free-text search, aggregations, or when you need faceted search results. For simple filtering, use Query Variants instead. Supports Wix Query Language (WQL) for structured filtering combined with free-text search. > **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. | Property | Capabilities | Filters |-------|------------|------| | `optionChoices.optionChoiceIds.choiceId` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$hasAll`, `$hasSome` | | `optionChoices.optionChoiceIds.optionId` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$hasAll`, `$hasSome` | | `barcode` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any`, `$begins`, `$gt`, `$lt`, `$lte`, `$gte` | | `inventoryStatus.inStock` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any` | | `inventoryStatus.preorderEnabled` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any` | | `price.actualPrice.amount` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any`, `$begins`, `$gt`, `$lt`, `$lte`, `$gte` | | `price.compareAtPrice.amount` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any`, `$begins`, `$gt`, `$lt`, `$lte`, `$gte` | | `productData.handle` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any`, `$begins`, `$gt`, `$lt`, `$lte`, `$gte` | | `productData.name` | Search: <span style="color: #2e7d32;">✓</span><br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any`, `$begins`, `$gt`, `$lt`, `$lte`, `$gte` | | `productData.productId` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any`, `$begins`, `$gt`, `$lt`, `$lte`, `$gte` | | `productData.productType` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any` | | `productData.slug` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any`, `$begins`, `$gt`, `$lt`, `$lte`, `$gte` | | `productData.visible` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any` | | `productData.visibleInPos` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any` | | `sku` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any`, `$begins`, `$gt`, `$lt`, `$lte`, `$gte` | | `visible` | Search: ✗<br/> Aggregate: <span style="color: #2e7d32;">✓</span><br/> Sort: `ASC`, `DESC` | `$eq`, `$ne`, `$exists`, `$in`, `$any` |
107
+ Method parameters:
108
+ param name: search | type: CursorSearch | description: WQL expression for searching variants. | required: true
109
+ - name: aggregations | type: Array<Aggregation> | description: 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.
110
+ - name: fieldPath | type: string | description: Field to aggregate by, use dot notation to specify json path
111
+ - name: name | type: string | description: User-defined name of aggregation, should be unique, will appear in aggregation results
112
+ - name: type | type: AggregationType | description: Type of aggregation, client must provide matching aggregation field below
113
+ enum:
114
+ DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.)
115
+ NESTED: Multi-level aggregation, where each next aggregation is nested within previous one
116
+ RANGE: An aggregation, where user can define set of ranges - each representing a bucket
117
+ SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg
118
+ UNKNOWN_AGGREGATION_TYPE, VALUE: An aggregation where result buckets are dynamically built - one per unique value
119
+ - ONE-OF:
120
+ - name: dateHistogram | type: DateHistogramAggregation | description: Date histogram aggregation
121
+ - name: interval | type: Interval | description: Interval for date histogram aggregation
122
+ enum:
123
+ DAY: Daily interval
124
+ HOUR: Hourly interval
125
+ MINUTE: Minute interval
126
+ MONTH: Monthly interval
127
+ SECOND: Second interval
128
+ UNKNOWN_INTERVAL, WEEK: Weekly interval
129
+ YEAR: Yearly interval
130
+ - name: nested | type: NestedAggregation | description: Nested aggregation
131
+ - name: nestedAggregations | type: Array<NestedAggregationItem> | description: Flattened list of aggregations, where each next aggregation is nested within previous one
132
+ - name: fieldPath | type: string | description: Field to aggregate by, use dont notation to specify json path
133
+ - name: name | type: string | description: User-defined name of aggregation, should be unique, will appear in aggregation results
134
+ - name: type | type: NestedAggregationType | description: Type of aggregation, client must provide matching aggregation field below
135
+ enum:
136
+ DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.)
137
+ RANGE: An aggregation, where user can define set of ranges - each representing a bucket
138
+ SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg
139
+ UNKNOWN_AGGREGATION_TYPE, VALUE: An aggregation where result buckets are dynamically built - one per unique value
140
+ - ONE-OF:
141
+ - name: dateHistogram | type: DateHistogramAggregation | description: Date histogram aggregation
142
+ - name: range | type: RangeAggregation | description: Range aggregation
143
+ - name: buckets | type: Array<RangeBucket> | description: 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
144
+ - name: from | type: number | description: Inclusive lower bound of the range. Required if to is not given
145
+ - name: to | type: number | description: Exclusive upper bound of the range. Required if from is not given
146
+ - name: scalar | type: ScalarAggregation | description: Scalar aggregation
147
+ - name: type | type: ScalarType | description: Define the operator for the scalar aggregation
148
+ enum:
149
+ COUNT_DISTINCT: Count of distinct values
150
+ MAX: Maximum value
151
+ MIN: Minimum value
152
+ UNKNOWN_SCALAR_TYPE
153
+ - name: value | type: ValueAggregation | description: Value aggregation
154
+ - name: limit | type: number | description: How many aggregations would you like to return? Can be between 1 and 250. 10 is the default.
155
+ - name: missingValues | type: MissingValues | description: Should missing values be included or excluded from the aggregation results. Default is EXCLUDE
156
+ enum:
157
+ EXCLUDE: Should missing values be excluded from the aggregation results
158
+ INCLUDE: Should missing values be included in the aggregation results
159
+ - name: sortDirection | type: SortDirection | description: Should sort in ascending or descending order
160
+ enum:
161
+ ASC: Should sort in ascending order
162
+ DESC: Should sort in descending order
163
+ - name: sortType | type: SortType | description: Should sort by number of matches or value of the field
164
+ enum:
165
+ COUNT: Should sort by number of matches
166
+ VALUE: Should sort by value of the field alphabetically
167
+ - ONE-OF:
168
+ - name: includeOptions | type: IncludeMissingValuesOptions | description: Options for including missing values
169
+ - name: addToBucket | type: string | description: Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
170
+ - name: range | type: RangeAggregation | description: Range aggregation
171
+ - name: scalar | type: ScalarAggregation | description: Scalar aggregation
172
+ - name: value | type: ValueAggregation | description: Value aggregation
173
+ - name: filter | type: Record<string, any> | description: 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)
174
+ - name: search | type: SearchDetails | description: Free text to match in searchable fields
175
+ - name: expression | type: string | description: Search term or expression
176
+ - name: fields | type: Array<string> | description: Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path
177
+ - name: fuzzy | type: boolean | description: Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm)
178
+ - name: mode | type: Mode | description: Defines how separate search terms in `expression` are combined
179
+ enum:
180
+ AND: All search terms must be present
181
+ OR: Any of the search terms must be present
182
+ - name: sort | type: Array<Sorting> | description: Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]
183
+ - name: fieldName | type: string | description: Name of the field to sort by.
184
+ - name: order | type: SortOrder | description: Sort order.
185
+ enum: ASC, DESC
186
+ - name: timeZone | type: string | description: UTC offset or IANA time zone. Valid values are ISO 8601 UTC offsets, such as +02:00 or -06:00, and IANA time zone GUIDs, such as Europe/Rome Affects all filters and aggregations returned values. You may override this behavior in a specific filter by providing timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"`
187
+ - ONE-OF:
188
+ - name: cursorPaging | type: CursorPaging | description: Cursor pointing to page of results. When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
189
+ - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.
190
+ - name: limit | type: number | description: Maximum number of items to return in the results.
191
+ param name: options | type: SearchVariantsOptions | description: none
192
+ - name: fields | type: Array<RequestedFields> | description: List of additional fields to include in the response. See VariantOps.RequestedFields for available options.
193
+ enum:
194
+ CURRENCY: Include currency information in product data. Returns the currency code (ISO-4217 format) used for pricing this variant. Defaults to the site's currency unless specified in request headers.
195
+ MERCHANT_DATA: Include merchant-specific data such as cost and profit information. Returns revenue details including cost, profit, and profit margin. Requires `SCOPE.STORES.PRODUCT_READ_ADMIN` permission scope.
196
+ SUBSCRIPTION_PRICES_INFO: Include subscription pricing information. Returns calculated prices for different subscription plans with applied discounts. Only relevant for variants that are part of subscription offerings.
197
+ UNKNOWN_REQUESTED_FIELD: Unknown requested field.
198
+ WEIGHT_MEASUREMENT_UNIT_INFO: Include weight measurement unit information. Returns the weight measurement unit (kg, lb, etc.) used for the variant. Useful for shipping calculations and product comparisons.
199
+ Return type: PROMISE<SearchVariantsResponse>
200
+ - name: aggregationData | type: AggregationData | description: Aggregation results for faceted search.
201
+ - name: aggregationData.results | type: Array<AggregationResults> | description: key = aggregation name (as derived from search request)
202
+ - name: aggregationData.results[].fieldPath | type: string | description: Field to aggregate by as derived from search request
203
+ - name: aggregationData.results[].name | type: string | description: User-defined name of aggregation as derived from search request
204
+ - name: aggregationData.results[].type | type: AggregationType | description: Type of aggregation that must match provided kind as derived from search request
205
+ enum:
206
+ DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.)
207
+ NESTED: Multi-level aggregation, where each next aggregation is nested within previous one
208
+ RANGE: An aggregation, where user can define set of ranges - each representing a bucket
209
+ SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg
210
+ UNKNOWN_AGGREGATION_TYPE, VALUE: An aggregation where result buckets are dynamically built - one per unique value
211
+ - ONE-OF:
212
+ - name: aggregationData.results[].dateHistogram | type: DateHistogramResults | description: Date histogram aggregation results
213
+ - name: aggregationData.results[].dateHistogram.results | type: Array<DateHistogramResult> | description: List of date histogram aggregations
214
+ - name: aggregationData.results[].dateHistogram.results[].count | type: number | description: Count of documents in the bucket
215
+ - name: aggregationData.results[].dateHistogram.results[].value | type: string | description: Date in ISO 8601 format
216
+ - name: aggregationData.results[].groupedByValue | type: GroupByValueResults | description: Group by value aggregation results
217
+ - name: aggregationData.results[].groupedByValue.results | type: Array<NestedValueAggregationResult> | description: List of value aggregations
218
+ - name: aggregationData.results[].groupedByValue.results[].nestedResults | type: NestedAggregationResults | description: Nested aggregations
219
+ - name: aggregationData.results[].groupedByValue.results[].nestedResults.fieldPath | type: string | description: Field to aggregate by, matches the one provided in request
220
+ - name: aggregationData.results[].groupedByValue.results[].nestedResults.name | type: string | description: User-defined name of aggregation, matches the one provided in request
221
+ - name: aggregationData.results[].groupedByValue.results[].nestedResults.type | type: AggregationType | description: Type of aggregation that matches result
222
+ - ONE-OF:
223
+ - name: aggregationData.results[].groupedByValue.results[].nestedResults.ranges | type: RangeResults | description: Range aggregation results
224
+ - name: aggregationData.results[].groupedByValue.results[].nestedResults.ranges.results | type: Array<RangeAggregationResult> | description: List of ranges returned in same order as requested
225
+ - name: aggregationData.results[].groupedByValue.results[].nestedResults.ranges.results[].count | type: number | description: Count of entities in this range
226
+ - name: aggregationData.results[].groupedByValue.results[].nestedResults.ranges.results[].from | type: number | description: Inclusive lower bound of the range
227
+ - name: aggregationData.results[].groupedByValue.results[].nestedResults.ranges.results[].to | type: number | description: Exclusive upper bound of the range
228
+ - name: aggregationData.results[].groupedByValue.results[].nestedResults.scalar | type: AggregationResultsScalarResult | description: Scalar aggregation results
229
+ - name: aggregationData.results[].groupedByValue.results[].nestedResults.scalar.type | type: ScalarType | description: Type of scalar aggregation
230
+ enum:
231
+ COUNT_DISTINCT: Count of distinct values
232
+ MAX: Maximum value
233
+ MIN: Minimum value
234
+ UNKNOWN_SCALAR_TYPE
235
+ - name: aggregationData.results[].groupedByValue.results[].nestedResults.scalar.value | type: number | description: Value of the scalar aggregation
236
+ - name: aggregationData.results[].groupedByValue.results[].nestedResults.values | type: ValueResults | description: Value aggregation results
237
+ - name: aggregationData.results[].groupedByValue.results[].nestedResults.values.results | type: Array<ValueAggregationResult> | description: List of value aggregations
238
+ - name: aggregationData.results[].groupedByValue.results[].nestedResults.values.results[].count | type: number | description: Count of entities with this value
239
+ - name: aggregationData.results[].groupedByValue.results[].nestedResults.values.results[].value | type: string | description: Value of the field
240
+ - name: aggregationData.results[].groupedByValue.results[].value | type: string | description: Value of the field
241
+ - name: aggregationData.results[].nested | type: NestedResults | description: Nested aggregation results
242
+ - name: aggregationData.results[].nested.results | type: Array<Results> | description: List of nested aggregations
243
+ - name: aggregationData.results[].nested.results[].results | type: Record<string, NestedResultValue> | description: List of nested aggregations
244
+ - name: aggregationData.results[].ranges | type: RangeResults | description: Range aggregation results
245
+ - name: aggregationData.results[].scalar | type: AggregationResultsScalarResult | description: Scalar aggregation results
246
+ - name: aggregationData.results[].values | type: ValueResults | description: Value aggregation results
247
+ - name: pagingMetadata | type: CursorPagingMetadata | description: Pagination information with cursors for next pages.
248
+ - name: pagingMetadata.count | type: number | description: Number of items returned in the response.
249
+ - name: pagingMetadata.cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.
250
+ - name: pagingMetadata.cursors.next | type: string | description: Cursor string pointing to the next page in the list of results.
251
+ - name: pagingMetadata.cursors.prev | type: string | description: Cursor pointing to the previous page in the list of results.
252
+ - name: pagingMetadata.hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page. + `true`: Another page of results can be retrieved. + `false`: This is the last page.
253
+ - name: variants | type: Array<ReadOnlyVariant> | description: Variants matching the search criteria.
254
+ - name: variants[]._id | type: string | description: Variant GUID.
255
+ - name: variants[].barcode | type: string | description: Barcode for the variant, typically used for point-of-sale systems and inventory management. Common barcode formats include UPC, EAN, and Code 128. The barcode helps with quick product identification and checkout processes.
256
+ - name: variants[].inventoryStatus | type: V3InventoryStatus | description: Current inventory and availability status.
257
+ - name: variants[].inventoryStatus.inStock | type: boolean | description: Whether the variant is currently in stock and available for purchase.
258
+ - name: variants[].inventoryStatus.preorderEnabled | type: boolean | description: Whether customers can place preorders for this variant when it's out of stock.
259
+ - name: variants[].media | type: V3ProductMedia | description: Media associated with the variant. Typically includes images, videos, or other media files specific to this variant.
260
+ - name: variants[].media.altText | type: string | description: Image alt text.
261
+ - name: variants[].media.displayName | type: string | description: Media display name. Allows to override the default media name. Can be passed only when `setBy: url`.
262
+ - name: variants[].media.mediaType | type: ProductMediaMediaType | description: Media type.
263
+ enum:
264
+ IMAGE: Image media type.
265
+ UNKNOWN_MEDIA_TYPE, VIDEO: Video media type.
266
+ - name: variants[].media.thumbnail | type: V3Thumbnail | description: Media thumbnail.
267
+ - name: variants[].media.thumbnail.altText | type: string | description: Thumbnail alt text.
268
+ - name: variants[].media.thumbnail.height | type: number | description: Thumbnail height.
269
+ - name: variants[].media.thumbnail.url | type: string | description: Thumbnail URL.
270
+ - name: variants[].media.thumbnail.width | type: number | description: Thumbnail width.
271
+ - name: variants[].media.uploadId | type: string | description: GUID used to upload media to Wix Media Manager.
272
+ - ONE-OF:
273
+ - name: variants[].media._id | type: string | description: GUID of existing media from Wix Media Manager.
274
+ - name: variants[].media.url | type: string | description: Media URL.
275
+ - ONE-OF:
276
+ - name: variants[].media.image | type: string | description: Product image.
277
+ - name: variants[].media.video | type: string | description: Product video.
278
+ - name: variants[].optionChoices | type: Array<V3OptionChoice> | description: Product option choices that define this variant. Each option choice represents a specific selection for a product option (like "Size: Large" or "Color: Red"). An empty list indicates this is the default variant of a product with no managed options.
279
+ - name: variants[].optionChoices[].optionChoiceIds | type: V3OptionChoiceIds | description: Option and choice identifiers.
280
+ - name: variants[].optionChoices[].optionChoiceIds.choiceId | type: string | description: Specific choice GUID within the option.
281
+ - name: variants[].optionChoices[].optionChoiceIds.optionId | type: string | description: Product option GUID.
282
+ - name: variants[].optionChoices[].optionChoiceNames | type: V3OptionChoiceNames | description: Human-readable option and choice names.
283
+ - name: variants[].optionChoices[].optionChoiceNames.choiceName | type: string | description: Display name of the chosen option value. For example, "Large", "Red", or "Cotton".
284
+ - name: variants[].optionChoices[].optionChoiceNames.optionName | type: string | description: Display name of the product option. For example, "Size", "Color", or "Material".
285
+ - name: variants[].optionChoices[].optionChoiceNames.renderType | type: string | description: Visual representation style for the option choice. Determines how the option is displayed in the product selector UI. Common values include "TEXT_CHOICES", "COLOR_CHOICES", or "IMAGE_CHOICES".
286
+ - name: variants[].price | type: V3PriceInfo | description: Pricing information for the variant.
287
+ - name: variants[].price.actualPrice | type: V3FixedMonetaryAmount | description: Current selling price of the variant.
288
+ - name: variants[].price.actualPrice.amount | type: string | description: Monetary amount. For example, `"3.99"`, or `"-4.99"` for a negative amount.
289
+ - name: variants[].price.actualPrice.formattedAmount | type: string | description: Formatted monetary amount. For example, `"$3.99"`.
290
+ - name: variants[].price.compareAtPrice | type: V3FixedMonetaryAmount | description: Original price before any discounts. Used to show customers the savings when the variant is on sale. If not set, no original price is displayed.
291
+ - name: variants[].productData | type: ProductFields | description: Product information for context and convenience. Includes essential product details like name, visibility, and categories to avoid requiring separate product API calls when working with variants.
292
+ - name: variants[].productData.currency | type: string | description: Currency used for pricing this product. Three-letter currency code in ISO-4217 alphabetic format. Defaults to the site's currency setting unless specified in request headers. Returned only when you pass `"CURRENCY"` to the `fields` parameter.
293
+ - name: variants[].productData.handle | type: string | description: A unique human-friendly identifier for the product. The handle can be set by the user to ensure consistency across multiple platforms.
294
+ - name: variants[].productData.mainCategoryId | type: string | description: Primary category assignment for the product. Determines the main category used for navigation and organization.
295
+ - name: variants[].productData.name | type: string | description: Product name displayed to customers.
296
+ - name: variants[].productData.productId | type: string | description: Product GUID.
297
+ - name: variants[].productData.productType | type: V3ProductType | description: Type of product determining available properties and behavior.
298
+ enum:
299
+ DIGITAL: Digital product.
300
+ PHYSICAL: Physical product.
301
+ UNKNOWN_PRODUCT_TYPE: Not implemented.
302
+ - name: variants[].productData.revision | type: string | description: Revision number, which increments by 1 each time the product is updated. To prevent conflicting changes, the current revision must be passed when updating the product.
303
+ - name: variants[].productData.slug | type: string | description: URL-friendly identifier for the product. Used in product page URLs and for SEO optimization.
304
+ - name: variants[].productData.visible | type: boolean | description: Whether the product is visible to site visitors. Default: `true`
305
+ - name: variants[].productData.visibleInPos | type: boolean | description: Whether the product appears in point-of-sale systems. Default: `true` Always `false` for digital products.
306
+ - ONE-OF:
307
+ - name: variants[].productData.physicalProperties | type: V3PhysicalProperties | description: Physical product properties such as weight and dimensions. Required when `productType` is `PHYSICAL`.
308
+ - name: variants[].productData.physicalProperties.weightMeasurementUnitInfo | type: V3WeightMeasurementUnitInfo | description: Weight measurement unit information for the product. Defines the unit of measurement (kg, lb, etc.) used for product weight calculations. Returned only when you pass `"WEIGHT_MEASUREMENT_UNIT_INFO"` to the `fields` parameter.
309
+ - name: variants[].productData.physicalProperties.weightMeasurementUnitInfo.weightMeasurementUnit | type: WeightUnit | description: Unit of measurement for weight. Standard units include kilograms (KG), pounds (LB), ounces (OZ), and grams (G).
310
+ enum:
311
+ KG: Kilograms.
312
+ LB: Pounds.
313
+ UNSPECIFIED_WEIGHT_UNIT: Weight unit can't be classified due to an error.
314
+ - name: variants[].revenueDetails | type: V3RevenueDetails | description: Revenue and cost details for business analytics. Includes cost, profit, and profit margin calculations. Returned only when you pass `"MERCHANT_DATA"` to the `fields` parameter.
315
+ - name: variants[].revenueDetails.cost | type: V3FixedMonetaryAmount | description: Cost of the variant for profit calculations. The amount you pay to produce or acquire this variant.
316
+ - name: variants[].revenueDetails.profit | type: V3FixedMonetaryAmount | description: Profit amount calculated by subtracting cost from the discounted price.
317
+ - name: variants[].revenueDetails.profitMargin | type: number | description: Profit margin as a percentage of the selling price. Calculated by dividing profit by the discounted price. The result is rounded to 4 decimal places. A value of 0.25 represents a 25% profit margin.
318
+ - name: variants[].sku | type: string | description: Stock keeping unit (SKU) for inventory tracking and identification. The SKU is typically used for inventory management, order fulfillment, and product identification across different systems.
319
+ - name: variants[].subscriptionPricesInfo | type: V3SubscriptionPricesInfo | description: Subscription pricing information when the variant is part of subscription plans. Shows calculated prices after applying subscription discounts to the variant's price. Returned only when you pass `"SUBSCRIPTION_PRICES_INFO"` to the `fields` parameter.
320
+ - name: variants[].subscriptionPricesInfo.subscriptionPrices | type: Array<V3SubscriptionPrice> | description: Pricing for different subscription plans. Shows how the variant's price changes with different subscription intervals or discounts.
321
+ - name: variants[].subscriptionPricesInfo.subscriptionPrices[].price | type: V3FixedMonetaryAmount | description: Variant price with subscription discount applied.
322
+ - name: variants[].subscriptionPricesInfo.subscriptionPrices[].pricePerUnit | type: V3SubscriptionPricePerUnit | description: Price per unit for subscription pricing.
323
+ - name: variants[].subscriptionPricesInfo.subscriptionPrices[].pricePerUnit.description | type: string | description: Description of the subscription price per unit.
324
+ - name: variants[].subscriptionPricesInfo.subscriptionPrices[].pricePerUnit.value | type: string | description: Calculated price per unit for the subscription. Takes into account the subscription discount and the variant's price per unit settings.
325
+ - name: variants[].subscriptionPricesInfo.subscriptionPrices[].subscriptionId | type: string | description: Subscription plan GUID.
326
+ - name: variants[].visible | type: boolean | description: Whether the variant is visible to site visitors. Default: `true`
327
+ - ONE-OF:
328
+ - name: variants[].digitalProperties | type: V3VariantDigitalProperties | description: Digital properties such as downloadable files. Required when the product type is `DIGITAL`.
329
+ - name: variants[].digitalProperties.digitalFile | type: V3SecuredMedia | description: Digital file available for download after purchase. The file that customers receive when they purchase this digital variant.
330
+ - name: variants[].digitalProperties.digitalFile._id | type: string | description: Media GUID in media manager.
331
+ - name: variants[].digitalProperties.digitalFile.fileName | type: string | description: Original file name.
332
+ - name: variants[].digitalProperties.digitalFile.fileSize | type: string | description: Original file size.
333
+ - name: variants[].digitalProperties.digitalFile.fileType | type: SecuredMediaFileType | description: File type.
334
+ enum:
335
+ SECURE_ARCHIVE: Secure archive file.
336
+ SECURE_DOCUMENT: Secure document file.
337
+ SECURE_MUSIC: Secure music file.
338
+ SECURE_PICTURE: Secure picture file.
339
+ SECURE_VIDEO: Secure video file.
340
+ UNSPECIFIED: Unspecified file type.
341
+ - name: variants[].physicalProperties | type: V3VariantPhysicalProperties | description: Physical properties such as weight and dimensions. Required when the product type is `PHYSICAL`.
342
+ - name: variants[].physicalProperties.pricePerUnit | type: V3PricePerUnit | description: Price per unit measurement information. Allows customers to compare prices based on a standard unit (like price per kilogram or per liter). Useful for bulk products or items sold by weight or volume.
343
+ - name: variants[].physicalProperties.pricePerUnit.description | type: string | description: Human-readable description of the price per unit. For example, "per kg" or "per liter".
344
+ - name: variants[].physicalProperties.pricePerUnit.settings | type: V3PricePerUnitSettings | description: Price per unit measurement settings. Defines the unit of measurement for price comparison (e.g., per kilogram, per liter). The measurement unit must correspond to the unit set on the parent product.
345
+ - name: variants[].physicalProperties.pricePerUnit.settings.measurementUnit | type: MeasurementUnit | description: Measurement unit. For example, to define price per 100 grams, set this field to "G".
346
+ enum: CBM, CL, CM, FLOZ, FT, G, GAL, IN, KG, L, LB, M, MG, ML, MM, OZ, PT, QT, SQFT, SQM, UNSPECIFIED, YD
347
+ - name: variants[].physicalProperties.pricePerUnit.settings.quantity | type: number | description: Quantity. For example, to define price per per 100 grams, set this field to `100`.
348
+ - name: variants[].physicalProperties.pricePerUnit.value | type: string | description: Calculated price per unit value. Shows the variant's price normalized to the standard unit of measurement. For example, if a 500g variant costs $2 and the standard unit is 1kg, this value would be $4.
349
+ - name: variants[].physicalProperties.weight | type: number | description: Weight of the variant for shipping calculations. Used for shipping cost calculations and fulfillment planning. Returned only when you pass `"WEIGHT_MEASUREMENT_UNIT_INFO"` to the `fields` parameter.
350
+
351
+ ```
352
+ </type_definition>
353
+ </stores_readOnlyVariantsV3_searchVariants>