@wix/ditto-codegen-public 1.0.161 → 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.
- package/dist/docs-output/api-docs/bookings-bookings-onBookingCanceled-doc.txt +169 -0
- package/dist/docs-output/api-docs/bookings-bookings-onBookingCreated-doc.txt +154 -0
- package/dist/docs-output/api-docs/crm-contacts-onContactCreated-doc.txt +87 -171
- package/dist/docs-output/api-docs/crm-contacts-onContactDeleted-doc.txt +58 -0
- package/dist/docs-output/api-docs/crm-contacts-onContactUpdated-doc.txt +99 -0
- package/dist/docs-output/api-docs/data-items-get-doc.txt +95 -54
- package/dist/docs-output/api-docs/data-items-insert-doc.txt +235 -43
- package/dist/docs-output/api-docs/data-items-onDataItemCreated-doc.txt +61 -0
- package/dist/docs-output/api-docs/data-items-onDataItemDeleted-doc.txt +58 -0
- package/dist/docs-output/api-docs/data-items-onDataItemUpdated-doc.txt +61 -0
- package/dist/docs-output/api-docs/data-items-query-doc.txt +507 -302
- package/dist/docs-output/api-docs/data-items-remove-doc.txt +120 -40
- package/dist/docs-output/api-docs/data-items-update-doc.txt +425 -46
- package/dist/docs-output/api-docs/ecom-cart-addToCart-doc.txt +488 -0
- package/dist/docs-output/api-docs/ecom-cart-createCart-doc.txt +518 -0
- package/dist/docs-output/api-docs/ecom-cart-createCheckout-doc.txt +155 -0
- package/dist/docs-output/api-docs/ecom-cart-deleteCart-doc.txt +92 -0
- package/dist/docs-output/api-docs/ecom-cart-getCart-doc.txt +376 -0
- package/dist/docs-output/api-docs/ecom-cart-onCartCreated-doc.txt +89 -80
- package/dist/docs-output/api-docs/ecom-cart-onCartUpdated-doc.txt +91 -81
- package/dist/docs-output/api-docs/ecom-cart-removeLineItemsFromCart-doc.txt +321 -0
- package/dist/docs-output/api-docs/ecom-cart-updateCart-doc.txt +539 -0
- package/dist/docs-output/api-docs/ecom-checkout-addToCheckout-doc.txt +1005 -0
- package/dist/docs-output/api-docs/ecom-checkout-createCheckout-doc.txt +1641 -0
- package/dist/docs-output/api-docs/ecom-checkout-getCheckout-doc.txt +1027 -0
- package/dist/docs-output/api-docs/ecom-checkout-onCheckoutCompleted-doc.txt +151 -0
- package/dist/docs-output/api-docs/ecom-checkout-onCheckoutCreated-doc.txt +150 -0
- package/dist/docs-output/api-docs/ecom-checkout-onCheckoutUpdated-doc.txt +150 -0
- package/dist/docs-output/api-docs/ecom-checkout-removeLineItemsFromCheckout-doc.txt +879 -0
- package/dist/docs-output/api-docs/ecom-checkout-updateCheckout-doc.txt +1011 -0
- package/dist/docs-output/api-docs/ecom-currentCart-getCurrentCart-doc.txt +368 -322
- package/dist/docs-output/api-docs/ecom-currentCart-updateCurrentCart-doc.txt +506 -321
- package/dist/docs-output/api-docs/ecom-orders-bulkUpdateOrders-doc.txt +1040 -0
- package/dist/docs-output/api-docs/ecom-orders-cancelOrder-doc.txt +608 -0
- package/dist/docs-output/api-docs/ecom-orders-getOrder-doc.txt +926 -0
- package/dist/docs-output/api-docs/ecom-orders-onOrderCreated-doc.txt +245 -0
- package/dist/docs-output/api-docs/ecom-orders-onOrderUpdated-doc.txt +244 -0
- package/dist/docs-output/api-docs/ecom-orders-searchOrders-doc.txt +670 -0
- package/dist/docs-output/api-docs/ecom-orders-updateOrder-doc.txt +818 -0
- package/dist/docs-output/api-docs/search-wixSiteSearch-search-doc.txt +162 -0
- package/dist/docs-output/api-docs/stores-collections-addProductsToCollection-doc.txt +86 -0
- package/dist/docs-output/api-docs/stores-collections-createCollection-doc.txt +108 -0
- package/dist/docs-output/api-docs/stores-collections-getCollection-doc.txt +102 -0
- package/dist/docs-output/api-docs/stores-collections-queryCollections-doc.txt +209 -0
- package/dist/docs-output/api-docs/stores-collections-removeProductsFromCollection-doc.txt +86 -0
- package/dist/docs-output/api-docs/stores-collections-updateCollection-doc.txt +110 -0
- package/dist/docs-output/api-docs/stores-inventory-queryInventory-doc.txt +98 -0
- package/dist/docs-output/api-docs/stores-inventory-updateInventoryVariants-doc.txt +249 -0
- package/dist/docs-output/api-docs/stores-inventoryItemsV3-queryInventoryItems-doc.txt +236 -0
- package/dist/docs-output/api-docs/stores-inventoryItemsV3-updateInventoryItem-doc.txt +139 -0
- package/dist/docs-output/api-docs/stores-productsV3-createProduct-doc.txt +1697 -0
- package/dist/docs-output/api-docs/stores-productsV3-deleteProduct-doc.txt +73 -0
- package/dist/docs-output/api-docs/stores-productsV3-getProduct-doc.txt +933 -0
- package/dist/docs-output/api-docs/stores-productsV3-onProductCreated-doc.txt +794 -0
- package/dist/docs-output/api-docs/stores-productsV3-onProductDeleted-doc.txt +794 -0
- package/dist/docs-output/api-docs/stores-productsV3-onProductUpdated-doc.txt +794 -0
- package/dist/docs-output/api-docs/stores-productsV3-queryProducts-doc.txt +1051 -0
- package/dist/docs-output/api-docs/stores-productsV3-searchProducts-doc.txt +1144 -0
- package/dist/docs-output/api-docs/stores-productsV3-updateProduct-doc.txt +1730 -1600
- package/dist/docs-output/api-docs/stores-readOnlyVariantsV3-queryVariants-doc.txt +290 -0
- package/dist/docs-output/api-docs/stores-readOnlyVariantsV3-searchVariants-doc.txt +353 -0
- package/dist/out.js +929 -79
- package/package.json +2 -2
- package/dist/docs-output/api-docs/data-items-onDataItemCreated.txt +0 -103
- package/dist/docs-output/api-docs/stores-product-onProductCreated-doc.txt +0 -118
- package/dist/docs-output/api-docs/stores-productV3-onProductCreated-doc.txt +0 -184
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
<stores_readOnlyVariantsV3_queryVariants>
|
|
2
|
+
<description>
|
|
3
|
+
# Method name:
|
|
4
|
+
|
|
5
|
+
stores.readOnlyVariantsV3.queryVariants(options: QueryVariantsOptions)
|
|
6
|
+
|
|
7
|
+
# Method Link:
|
|
8
|
+
|
|
9
|
+
https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/read-only-variants-v3/query-variants
|
|
10
|
+
|
|
11
|
+
# Method Description:
|
|
12
|
+
|
|
13
|
+
Retrieve product variants using structured queries with cursor-based pagination.
|
|
14
|
+
|
|
15
|
+
Use this endpoint for simple filtering operations on `id` and `productId`.
|
|
16
|
+
For complex queries with free-text search and aggregations, use Search Variants instead.
|
|
17
|
+
|
|
18
|
+
Up to 1,000 variants can be returned per request.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|PROPERTY |SUPPORTED FILTERS & SORTING
|
|
22
|
+
|:---:|:---:|
|
|
23
|
+
|`_id`|[`eq()`](/variants-query-builder/eq),[`ne()`](/variants-query-builder/ne),[`exists()`](/variants-query-builder/exists),[`in()`](/variants-query-builder/in),[`hasSome()`](/variants-query-builder/has-some),[`startsWith()`](/variants-query-builder/starts-with),[`gt()`](/variants-query-builder/gt),[`lt()`](/variants-query-builder/lt),[`le()`](/variants-query-builder/le),[`ge()`](/variants-query-builder/ge),[`ascending()`](/variants-query-builder/ascending),[`descending()`](/variants-query-builder/descending)|
|
|
24
|
+
|`productData.productId`|[`eq()`](/variants-query-builder/eq),[`ne()`](/variants-query-builder/ne),[`exists()`](/variants-query-builder/exists),[`in()`](/variants-query-builder/in),[`hasSome()`](/variants-query-builder/has-some),[`startsWith()`](/variants-query-builder/starts-with),[`gt()`](/variants-query-builder/gt),[`lt()`](/variants-query-builder/lt),[`le()`](/variants-query-builder/le),[`ge()`](/variants-query-builder/ge),[`ascending()`](/variants-query-builder/ascending),[`descending()`](/variants-query-builder/descending)|
|
|
25
|
+
|
|
26
|
+
# Method Permissions:
|
|
27
|
+
|
|
28
|
+
- WIX_STORES.READ_ONLY_VARIANT_READ
|
|
29
|
+
- WIX_STORES.READ_ONLY_VARIANT_READ_HIDDEN
|
|
30
|
+
|
|
31
|
+
# Method Permissions Scopes IDs:
|
|
32
|
+
|
|
33
|
+
undefined
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# Method Code Examples:
|
|
38
|
+
|
|
39
|
+
## queryVariants
|
|
40
|
+
|
|
41
|
+
```javascript
|
|
42
|
+
import { readOnlyVariantsV3 } from '@wix/stores';
|
|
43
|
+
|
|
44
|
+
async function queryVariants() {
|
|
45
|
+
const { items } = await readOnlyVariantsV3.queryVariants().find();
|
|
46
|
+
};
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## queryVariants (with elevated permissions)
|
|
50
|
+
|
|
51
|
+
```javascript
|
|
52
|
+
import { readOnlyVariantsV3 } from '@wix/stores';
|
|
53
|
+
import { auth } from '@wix/essentials';
|
|
54
|
+
|
|
55
|
+
async function myQueryVariantsMethod(query, options) {
|
|
56
|
+
const elevatedQueryVariants = auth.elevate(readOnlyVariantsV3.queryVariants);
|
|
57
|
+
const response = await elevatedQueryVariants(query, options);
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## default
|
|
64
|
+
|
|
65
|
+
```javascript
|
|
66
|
+
try {
|
|
67
|
+
const { items } = await readOnlyVariantsV3.queryVariants().find();
|
|
68
|
+
return items;
|
|
69
|
+
} catch (error) {
|
|
70
|
+
console.error(error);
|
|
71
|
+
throw error;
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
</description>
|
|
75
|
+
<type_definition>
|
|
76
|
+
```
|
|
77
|
+
Method: stores.readOnlyVariantsV3.queryVariants(options)
|
|
78
|
+
Description: Retrieve product variants using structured queries with cursor-based pagination. Use this endpoint for simple filtering operations on `id` and `productId`. For complex queries with free-text search and aggregations, use Search Variants instead. Up to 1,000 variants can be returned per request. |PROPERTY |SUPPORTED FILTERS & SORTING |:---:|:---:| |`_id`|[`eq()`](/variants-query-builder/eq),[`ne()`](/variants-query-builder/ne),[`exists()`](/variants-query-builder/exists),[`in()`](/variants-query-builder/in),[`hasSome()`](/variants-query-builder/has-some),[`startsWith()`](/variants-query-builder/starts-with),[`gt()`](/variants-query-builder/gt),[`lt()`](/variants-query-builder/lt),[`le()`](/variants-query-builder/le),[`ge()`](/variants-query-builder/ge),[`ascending()`](/variants-query-builder/ascending),[`descending()`](/variants-query-builder/descending)| |`productData.productId`|[`eq()`](/variants-query-builder/eq),[`ne()`](/variants-query-builder/ne),[`exists()`](/variants-query-builder/exists),[`in()`](/variants-query-builder/in),[`hasSome()`](/variants-query-builder/has-some),[`startsWith()`](/variants-query-builder/starts-with),[`gt()`](/variants-query-builder/gt),[`lt()`](/variants-query-builder/lt),[`le()`](/variants-query-builder/le),[`ge()`](/variants-query-builder/ge),[`ascending()`](/variants-query-builder/ascending),[`descending()`](/variants-query-builder/descending)|
|
|
79
|
+
Method parameters:
|
|
80
|
+
param name: options | type: QueryVariantsOptions | description: none
|
|
81
|
+
- name: fields | type: Array<RequestedFields> | description: List of additional fields to include in the response. See VariantOps.RequestedFields for available options.
|
|
82
|
+
enum:
|
|
83
|
+
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.
|
|
84
|
+
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.
|
|
85
|
+
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.
|
|
86
|
+
UNKNOWN_REQUESTED_FIELD: Unknown requested field.
|
|
87
|
+
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.
|
|
88
|
+
Return type: REFERENCE<VariantsQueryBuilder>
|
|
89
|
+
Method: stores.readOnlyVariantsV3.queryVariants().ascending(propertyNames)
|
|
90
|
+
Description: Adds a sort to a query, sorting by the specified properties in ascending order. The `ascending()` function refines a `VariantsQueryBuilder` to sort by the value of `propertyName` in ascending order. You can specify multiple properties for sorting in ascending order by passing each property name as an additional argument. `ascending()` sorts the results in the order the properties are passed. You can sort the following types: - Number: Sorts numerically. - Date: Sorts by date and time. - String: Sorts lexicographically, so `'abc'` comes after `'XYZ'`. If a property contains a number stored as a string (for example, `'0'`), that value is sorted alphabetically and not numerically. If a property doesn't have a value, that value is ranked lowest.
|
|
91
|
+
Method parameters:
|
|
92
|
+
param name: propertyNames | type: Array<string> | description: Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
93
|
+
Return type: REFERENCE<VariantsQueryBuilder>
|
|
94
|
+
Method: stores.readOnlyVariantsV3.queryVariants().descending(propertyNames)
|
|
95
|
+
Description: Adds a sort to a query, sorting by the specified properties in descending order. The `descending()` function refines a `VariantsQueryBuilder` to sort by the value of `propertyName` in descending order. You can specify multiple properties for sorting in descending order by passing each property name as an additional argument. `descending()` sorts the results in the order the properties are passed. You can sort the following types: - Number: Sorts numerically. - Date: Sorts by date and time. - String: Sorts lexicographically, so `'abc'` comes after `'XYZ'`. If a property contains a number stored as a string (for example, `'0'`), that value is sorted alphabetically and not numerically. If a property doesn't have a value, that value is ranked lowest.
|
|
96
|
+
Method parameters:
|
|
97
|
+
param name: propertyNames | type: Array<string> | description: Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
98
|
+
Return type: REFERENCE<VariantsQueryBuilder>
|
|
99
|
+
Method: stores.readOnlyVariantsV3.queryVariants().eq(propertyName, value)
|
|
100
|
+
Description: Refines a query to match items where the specified property equals the specified value. The `eq()` function refines a `VariantsQueryBuilder` to match only items where the value of the specified `propertyName` equals the specified `value`. `eq()` matches only values of the same type. For example, `0` stored as a number doesn't match `'0'` stored as a string. Matching strings with `eq()` is case-sensitive, so `'text'` isn't equal to `'Text'`.
|
|
101
|
+
Method parameters:
|
|
102
|
+
param name: propertyName | type: string | description: Property whose value is compared with `value`.
|
|
103
|
+
param name: value | type: any | description: Value to compare against.
|
|
104
|
+
Return type: REFERENCE<VariantsQueryBuilder>
|
|
105
|
+
Method: stores.readOnlyVariantsV3.queryVariants().exists(propertyName, value)
|
|
106
|
+
Description: Refines a query to match items where the specified property contains a value. The `exists()` function refines a `VariantsQueryBuilder` to only match items where the value of the specified `propertyName` doesn't equal null or undefined. `exists()` checks for either existence or non-existence based on the boolean parameter. Note that `exists()` does match items where the value of the specified `propertyName` is an empty string or an invalid value. `exists()` is only useful for properties which don't contain default values and therefore their values may be unassigned.
|
|
107
|
+
Method parameters:
|
|
108
|
+
param name: propertyName | type: string | description: none
|
|
109
|
+
param name: value | type: boolean | description: none
|
|
110
|
+
Return type: REFERENCE<VariantsQueryBuilder>
|
|
111
|
+
Method: stores.readOnlyVariantsV3.queryVariants().find()
|
|
112
|
+
Description: Returns the query results. The `find()` function returns a Promise that resolves to the query results and metadata. The Promise is rejected if `find()` is called with insufficient permissions or if any of the previous functions used to refine the query are invalid.
|
|
113
|
+
Return type: PROMISE<VariantsQueryResult>
|
|
114
|
+
- name: cursors | type: Cursors | description: Returns the query cursors. `cursors` returns the query's `next` and `prev` cursors.
|
|
115
|
+
- name: cursors.next | type: string | description: Cursor string pointing to the next page in the list of results.
|
|
116
|
+
- name: cursors.prev | type: string | description: Cursor pointing to the previous page in the list of results.
|
|
117
|
+
- name: items | type: Array<ReadOnlyVariant> | description: Returns an array of `readOnlyVariantsV3` items that match the query. `items` contains the current page of results retrieved by the query. If no results match the query, `items` is an empty array. The page size is defined by the [`limit()`](/variants-query-builder/limit) function and can be retrieved using the [`pageSize`](#page-size) property. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `readOnlyVariantsV3` to navigate the pages of a query result.
|
|
118
|
+
- name: items[]._id | type: string | description: Variant GUID.
|
|
119
|
+
- name: items[].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.
|
|
120
|
+
- name: items[].inventoryStatus | type: V3InventoryStatus | description: Current inventory and availability status.
|
|
121
|
+
- name: items[].inventoryStatus.inStock | type: boolean | description: Whether the variant is currently in stock and available for purchase.
|
|
122
|
+
- name: items[].inventoryStatus.preorderEnabled | type: boolean | description: Whether customers can place preorders for this variant when it's out of stock.
|
|
123
|
+
- name: items[].media | type: V3ProductMedia | description: Media associated with the variant. Typically includes images, videos, or other media files specific to this variant.
|
|
124
|
+
- name: items[].media.altText | type: string | description: Image alt text.
|
|
125
|
+
- name: items[].media.displayName | type: string | description: Media display name. Allows to override the default media name. Can be passed only when `setBy: url`.
|
|
126
|
+
- name: items[].media.mediaType | type: ProductMediaMediaType | description: Media type.
|
|
127
|
+
enum:
|
|
128
|
+
IMAGE: Image media type.
|
|
129
|
+
UNKNOWN_MEDIA_TYPE, VIDEO: Video media type.
|
|
130
|
+
- name: items[].media.thumbnail | type: V3Thumbnail | description: Media thumbnail.
|
|
131
|
+
- name: items[].media.thumbnail.altText | type: string | description: Thumbnail alt text.
|
|
132
|
+
- name: items[].media.thumbnail.height | type: number | description: Thumbnail height.
|
|
133
|
+
- name: items[].media.thumbnail.url | type: string | description: Thumbnail URL.
|
|
134
|
+
- name: items[].media.thumbnail.width | type: number | description: Thumbnail width.
|
|
135
|
+
- name: items[].media.uploadId | type: string | description: GUID used to upload media to Wix Media Manager.
|
|
136
|
+
- ONE-OF:
|
|
137
|
+
- name: items[].media._id | type: string | description: GUID of existing media from Wix Media Manager.
|
|
138
|
+
- name: items[].media.url | type: string | description: Media URL.
|
|
139
|
+
- ONE-OF:
|
|
140
|
+
- name: items[].media.image | type: string | description: Product image.
|
|
141
|
+
- name: items[].media.video | type: string | description: Product video.
|
|
142
|
+
- name: items[].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.
|
|
143
|
+
- name: items[].optionChoices[].optionChoiceIds | type: V3OptionChoiceIds | description: Option and choice identifiers.
|
|
144
|
+
- name: items[].optionChoices[].optionChoiceIds.choiceId | type: string | description: Specific choice GUID within the option.
|
|
145
|
+
- name: items[].optionChoices[].optionChoiceIds.optionId | type: string | description: Product option GUID.
|
|
146
|
+
- name: items[].optionChoices[].optionChoiceNames | type: V3OptionChoiceNames | description: Human-readable option and choice names.
|
|
147
|
+
- name: items[].optionChoices[].optionChoiceNames.choiceName | type: string | description: Display name of the chosen option value. For example, "Large", "Red", or "Cotton".
|
|
148
|
+
- name: items[].optionChoices[].optionChoiceNames.optionName | type: string | description: Display name of the product option. For example, "Size", "Color", or "Material".
|
|
149
|
+
- name: items[].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".
|
|
150
|
+
- name: items[].price | type: V3PriceInfo | description: Pricing information for the variant.
|
|
151
|
+
- name: items[].price.actualPrice | type: V3FixedMonetaryAmount | description: Current selling price of the variant.
|
|
152
|
+
- name: items[].price.actualPrice.amount | type: string | description: Monetary amount. For example, `"3.99"`, or `"-4.99"` for a negative amount.
|
|
153
|
+
- name: items[].price.actualPrice.formattedAmount | type: string | description: Formatted monetary amount. For example, `"$3.99"`.
|
|
154
|
+
- name: items[].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.
|
|
155
|
+
- name: items[].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.
|
|
156
|
+
- name: items[].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.
|
|
157
|
+
- name: items[].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.
|
|
158
|
+
- name: items[].productData.mainCategoryId | type: string | description: Primary category assignment for the product. Determines the main category used for navigation and organization.
|
|
159
|
+
- name: items[].productData.name | type: string | description: Product name displayed to customers.
|
|
160
|
+
- name: items[].productData.productId | type: string | description: Product GUID.
|
|
161
|
+
- name: items[].productData.productType | type: V3ProductType | description: Type of product determining available properties and behavior.
|
|
162
|
+
enum:
|
|
163
|
+
DIGITAL: Digital product.
|
|
164
|
+
PHYSICAL: Physical product.
|
|
165
|
+
UNKNOWN_PRODUCT_TYPE: Not implemented.
|
|
166
|
+
- name: items[].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.
|
|
167
|
+
- name: items[].productData.slug | type: string | description: URL-friendly identifier for the product. Used in product page URLs and for SEO optimization.
|
|
168
|
+
- name: items[].productData.visible | type: boolean | description: Whether the product is visible to site visitors. Default: `true`
|
|
169
|
+
- name: items[].productData.visibleInPos | type: boolean | description: Whether the product appears in point-of-sale systems. Default: `true` Always `false` for digital products.
|
|
170
|
+
- ONE-OF:
|
|
171
|
+
- name: items[].productData.physicalProperties | type: V3PhysicalProperties | description: Physical product properties such as weight and dimensions. Required when `productType` is `PHYSICAL`.
|
|
172
|
+
- name: items[].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.
|
|
173
|
+
- name: items[].productData.physicalProperties.weightMeasurementUnitInfo.weightMeasurementUnit | type: WeightUnit | description: Unit of measurement for weight. Standard units include kilograms (KG), pounds (LB), ounces (OZ), and grams (G).
|
|
174
|
+
enum:
|
|
175
|
+
KG: Kilograms.
|
|
176
|
+
LB: Pounds.
|
|
177
|
+
UNSPECIFIED_WEIGHT_UNIT: Weight unit can't be classified due to an error.
|
|
178
|
+
- name: items[].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.
|
|
179
|
+
- name: items[].revenueDetails.cost | type: V3FixedMonetaryAmount | description: Cost of the variant for profit calculations. The amount you pay to produce or acquire this variant.
|
|
180
|
+
- name: items[].revenueDetails.profit | type: V3FixedMonetaryAmount | description: Profit amount calculated by subtracting cost from the discounted price.
|
|
181
|
+
- name: items[].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.
|
|
182
|
+
- name: items[].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.
|
|
183
|
+
- name: items[].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.
|
|
184
|
+
- name: items[].subscriptionPricesInfo.subscriptionPrices | type: Array<V3SubscriptionPrice> | description: Pricing for different subscription plans. Shows how the variant's price changes with different subscription intervals or discounts.
|
|
185
|
+
- name: items[].subscriptionPricesInfo.subscriptionPrices[].price | type: V3FixedMonetaryAmount | description: Variant price with subscription discount applied.
|
|
186
|
+
- name: items[].subscriptionPricesInfo.subscriptionPrices[].pricePerUnit | type: V3SubscriptionPricePerUnit | description: Price per unit for subscription pricing.
|
|
187
|
+
- name: items[].subscriptionPricesInfo.subscriptionPrices[].pricePerUnit.description | type: string | description: Description of the subscription price per unit.
|
|
188
|
+
- name: items[].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.
|
|
189
|
+
- name: items[].subscriptionPricesInfo.subscriptionPrices[].subscriptionId | type: string | description: Subscription plan GUID.
|
|
190
|
+
- name: items[].visible | type: boolean | description: Whether the variant is visible to site visitors. Default: `true`
|
|
191
|
+
- ONE-OF:
|
|
192
|
+
- name: items[].digitalProperties | type: V3VariantDigitalProperties | description: Digital properties such as downloadable files. Required when the product type is `DIGITAL`.
|
|
193
|
+
- name: items[].digitalProperties.digitalFile | type: V3SecuredMedia | description: Digital file available for download after purchase. The file that customers receive when they purchase this digital variant.
|
|
194
|
+
- name: items[].digitalProperties.digitalFile._id | type: string | description: Media GUID in media manager.
|
|
195
|
+
- name: items[].digitalProperties.digitalFile.fileName | type: string | description: Original file name.
|
|
196
|
+
- name: items[].digitalProperties.digitalFile.fileSize | type: string | description: Original file size.
|
|
197
|
+
- name: items[].digitalProperties.digitalFile.fileType | type: SecuredMediaFileType | description: File type.
|
|
198
|
+
enum:
|
|
199
|
+
SECURE_ARCHIVE: Secure archive file.
|
|
200
|
+
SECURE_DOCUMENT: Secure document file.
|
|
201
|
+
SECURE_MUSIC: Secure music file.
|
|
202
|
+
SECURE_PICTURE: Secure picture file.
|
|
203
|
+
SECURE_VIDEO: Secure video file.
|
|
204
|
+
UNSPECIFIED: Unspecified file type.
|
|
205
|
+
- name: items[].physicalProperties | type: V3VariantPhysicalProperties | description: Physical properties such as weight and dimensions. Required when the product type is `PHYSICAL`.
|
|
206
|
+
- name: items[].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.
|
|
207
|
+
- name: items[].physicalProperties.pricePerUnit.description | type: string | description: Human-readable description of the price per unit. For example, "per kg" or "per liter".
|
|
208
|
+
- name: items[].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.
|
|
209
|
+
- name: items[].physicalProperties.pricePerUnit.settings.measurementUnit | type: MeasurementUnit | description: Measurement unit. For example, to define price per 100 grams, set this field to "G".
|
|
210
|
+
enum: CBM, CL, CM, FLOZ, FT, G, GAL, IN, KG, L, LB, M, MG, ML, MM, OZ, PT, QT, SQFT, SQM, UNSPECIFIED, YD
|
|
211
|
+
- name: items[].physicalProperties.pricePerUnit.settings.quantity | type: number | description: Quantity. For example, to define price per per 100 grams, set this field to `100`.
|
|
212
|
+
- name: items[].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.
|
|
213
|
+
- name: items[].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.
|
|
214
|
+
- name: length | type: number | description: Returns the number of items in the current page of results. `length` returns just the number of items in the current page, not the total number of items that match the query. The page size is defined by the [`limit()`](/variants-query-builder/limit) function and can be retrieved using the [`pageSize`](#page-size) property. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `readOnlyVariantsV3` to navigate the pages of a query result.
|
|
215
|
+
- name: pageSize | type: number | description: Returns the requested page size. `pageSize` returns the page size set in [`limit()`](/variants-query-builder/limit) in `VariantsQueryBuilder`.
|
|
216
|
+
- name: query | type: VariantsQueryBuilder | description: Returns the `VariantsQueryBuilder` object used to get the current results. Use `query` to create and run a new query by chaining additional `VariantsQueryBuilder` functions to it. You can filter only on properties that haven't already been used in the previous `VariantsQueryBuilder`.
|
|
217
|
+
Method: stores.readOnlyVariantsV3.hasNext()
|
|
218
|
+
Description: Indicates whether the query has more results. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `readOnlyVariantsV3` to navigate the pages of a query result.
|
|
219
|
+
Return type: PRIMITIVE<boolean>
|
|
220
|
+
Method: stores.readOnlyVariantsV3.hasPrev()
|
|
221
|
+
Description: Indicates whether the query has previous results. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `readOnlyVariantsV3` to navigate the pages of a query result.
|
|
222
|
+
Return type: PRIMITIVE<boolean>
|
|
223
|
+
Method: stores.readOnlyVariantsV3.queryVariants().next()
|
|
224
|
+
Description: Retrieves the next page of query results. The `next()` function retrieves the next page of query results. The page size is defined by the [`limit()`](/variants-query-builder/limit) function and can be retrieved using the [`pageSize`](#page-size) property. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `readOnlyVariantsV3` to navigate the pages of a query result. If items are added or removed between calls to `next()`, the values returned by `VariantsQueryBuilder` may change.
|
|
225
|
+
Return type: PROMISE<VariantsQueryResult>
|
|
226
|
+
Method: stores.readOnlyVariantsV3.queryVariants().prev()
|
|
227
|
+
Description: Retrieves the previous page of query results. The `prev()` function retrieves the previous page of query results. The page size is defined by the [`limit()`](/variants-query-builder/limit) function and can be retrieved using the [`pageSize`](#page-size) property. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `readOnlyVariantsV3` to navigate the pages of a query result. If items are added or removed between calls to `prev()`, the values returned may change.
|
|
228
|
+
Return type: PROMISE<VariantsQueryResult>
|
|
229
|
+
Method: stores.readOnlyVariantsV3.queryVariants().ge(propertyName, value)
|
|
230
|
+
Description: Refines a query to match items where the specified property is greater than or equal to the specified value. The `ge()` function refines a `VariantsQueryBuilder` to match only items where the value of the specified `propertyName` is greater than or equal to the specified `value`. `ge()` matches only values of the same type. For example, `0` stored as a number doesn't match `'0'` stored as a string. If a property contains a number stored as a string (for example, `'0'`), that value is compared alphabetically and not numerically. If a property doesn't have a value, that value is ranked lowest. The following types of properties can be compared: - Number: Compares numerically. - Date: Compares JavaScript Date objects. - String: Compares lexicographically, so `'abc'` is greater than `'ABC'`.
|
|
231
|
+
Method parameters:
|
|
232
|
+
param name: propertyName | type: string | description: Property whose value is compared with `value`.
|
|
233
|
+
param name: value | type: any | description: Value to compare against.
|
|
234
|
+
Return type: REFERENCE<VariantsQueryBuilder>
|
|
235
|
+
Method: stores.readOnlyVariantsV3.queryVariants().gt(propertyName, value)
|
|
236
|
+
Description: Refines a query to match items where the specified property is greater than the specified value. The `gt()` function refines a `VariantsQueryBuilder` to match only items where the value of the specified `propertyName` is greater than the specified `value`. `gt()` matches only values of the same type. For example, `0` stored as a number doesn't match `'0'` stored as a string. If a property contains a number stored as a string (for example, `'0'`), that value is compared alphabetically and not numerically. If a property doesn't have a value, that value is ranked lowest. The following types of properties can be compared: - Number: Compares numerically. - Date: Compares JavaScript Date objects. - String: Compares lexicographically, so `'abc'` is greater than `'ABC'`.
|
|
237
|
+
Method parameters:
|
|
238
|
+
param name: propertyName | type: string | description: Property whose value is compared with `value`.
|
|
239
|
+
param name: value | type: any | description: Value to compare against.
|
|
240
|
+
Return type: REFERENCE<VariantsQueryBuilder>
|
|
241
|
+
Method: stores.readOnlyVariantsV3.queryVariants().hasSome(propertyName, value)
|
|
242
|
+
Description: Refines a query to match items whose specified property contains any of the specified values. The `hasSome()` function refines a `VariantsQueryBuilder` to match only items where the value of the specified `propertyName` equals any of the specified `values`. Matching strings with `hasSome()` is case-sensitive, so `'text'` isn't equal to `'Text'`. If the specified property is an array, `hasSome()` matches if any of that array's elements equal any of the specified values.
|
|
243
|
+
Method parameters:
|
|
244
|
+
param name: propertyName | type: string | description: Property whose value is compared with `values`.
|
|
245
|
+
param name: value | type: Array<any> | description: none
|
|
246
|
+
Return type: REFERENCE<VariantsQueryBuilder>
|
|
247
|
+
Method: stores.readOnlyVariantsV3.queryVariants().in(propertyName, value)
|
|
248
|
+
Description: Refines a query to only match items where the specified property contains any of the values in the provided array of values. The `in()` function refines a `VariantsQueryBuilder` to match only items where the specified `propertyName` is equal to any of the values in the provided array. Matching strings with `in()` is case-sensitive, so `'text'` isn't equal to `'Text'`.
|
|
249
|
+
Method parameters:
|
|
250
|
+
param name: propertyName | type: string | description: none
|
|
251
|
+
param name: value | type: any | description: none
|
|
252
|
+
Return type: REFERENCE<VariantsQueryBuilder>
|
|
253
|
+
Method: stores.readOnlyVariantsV3.queryVariants().le(propertyName, value)
|
|
254
|
+
Description: Refines a query to match items where the specified property is less than or equal to the specified value. The `le()` function refines a `VariantsQueryBuilder` to match only items where the value of the specified `propertyName` is less than or equal to the specified `value`. `le()` matches only values of the same type. For example, `0` stored as a number doesn't match `'0'` stored as a string. If a property contains a number stored as a string (for example, `'0'`), that value is compared alphabetically and not numerically. If a property doesn't have a value, that value is ranked lowest. The following types of properties can be compared: - Number: Compares numerically. - Date: Compares JavaScript Date objects. - String: Compares lexicographically, so `'ABC'` is less than `'abc'`.
|
|
255
|
+
Method parameters:
|
|
256
|
+
param name: propertyName | type: string | description: Property whose value is compared with `value`.
|
|
257
|
+
param name: value | type: any | description: Value to compare against.
|
|
258
|
+
Return type: REFERENCE<VariantsQueryBuilder>
|
|
259
|
+
Method: stores.readOnlyVariantsV3.queryVariants().limit(limit)
|
|
260
|
+
Description: Limits the number of items the query returns. The `limit()` function defines the number of results a query returns in each page. Only one page of results is retrieved at a time. You can use the `next()` and `prev()` functions to navigate the pages of a query result.
|
|
261
|
+
Method parameters:
|
|
262
|
+
param name: limit | type: number | description: Number of items to return, which is also the `pageSize` of the results object.
|
|
263
|
+
Return type: REFERENCE<VariantsQueryBuilder>
|
|
264
|
+
Method: stores.readOnlyVariantsV3.queryVariants().lt(propertyName, value)
|
|
265
|
+
Description: Refines a query to match items where the specified property is less than the specified value. The `le()` function refines a `VariantsQueryBuilder` to match only items where the value of the specified `propertyName` is less than the specified `value`. `le()` matches only values of the same type. For example, `0` stored as a number doesn't match `'0'` stored as a string. If a property contains a number stored as a string (for example, `'0'`), that value is compared alphabetically and not numerically. If a property doesn't have a value, that value is ranked lowest. The following types of properties can be compared: - Number: Compares numerically. - Date: Compares JavaScript Date objects. - String: Compares lexicographically, so `'ABC'` is less than `'abc'`.
|
|
266
|
+
Method parameters:
|
|
267
|
+
param name: propertyName | type: string | description: Property whose value is compared with `value`.
|
|
268
|
+
param name: value | type: any | description: Value to compare against.
|
|
269
|
+
Return type: REFERENCE<VariantsQueryBuilder>
|
|
270
|
+
Method: stores.readOnlyVariantsV3.queryVariants().ne(propertyName, value)
|
|
271
|
+
Description: Refines a query to match items where the specified property doesn't equal the specified value. The `ne()` function refines a `VariantsQueryBuilder` to match only items where the value of the specified `propertyName` doesn't equal the specified `value`. `ne()` matches only values of the same type. For example, `0` stored as a number doesn't match `'0'` stored as a string. Matching strings with `ne()` is case-sensitive, so `'text'` isn't equal to `'Text'`.
|
|
272
|
+
Method parameters:
|
|
273
|
+
param name: propertyName | type: string | description: Property whose value is compared with `value`.
|
|
274
|
+
param name: value | type: any | description: Value to compare against.
|
|
275
|
+
Return type: REFERENCE<VariantsQueryBuilder>
|
|
276
|
+
Method: stores.readOnlyVariantsV3.queryVariants().skipTo(cursor)
|
|
277
|
+
Description: Refines a query that skips to a specific record. The `skipTo()` function refines a `VariantsQueryBuilder` to return items that appear before or after the item pointed to by the provided cursor. Get the relevant cursor for a specific item from the `cursors` object in previous call's response. Then you can skip to `cursors.prev` to return items before the cursor, or `cursors.next` to return items after the cursor. When using `skipTo()`, the filters and the sorting order of the original query can't be changed. Only the `limit()` property of the query can be changed.
|
|
278
|
+
Method parameters:
|
|
279
|
+
param name: cursor | type: string | description: A pointer to specific record
|
|
280
|
+
Return type: REFERENCE<VariantsQueryBuilder>
|
|
281
|
+
Method: stores.readOnlyVariantsV3.queryVariants().startsWith(propertyName, value)
|
|
282
|
+
Description: Refines a query to match items where the specified property starts with the specified value. The `startsWith()` function refines a `VariantsQueryBuilder` to match only items where the value of the specified `propertyName` starts with the specified `string`. Matching with `startsWith()` is case-sensitive, so `'TEXT'` doesn't start with `'text'`. You can only use `startsWith()` with a property whose value is a string.
|
|
283
|
+
Method parameters:
|
|
284
|
+
param name: propertyName | type: string | description: Property whose value is compared with `string`.
|
|
285
|
+
param name: value | type: string | description: none
|
|
286
|
+
Return type: REFERENCE<VariantsQueryBuilder>
|
|
287
|
+
|
|
288
|
+
```
|
|
289
|
+
</type_definition>
|
|
290
|
+
</stores_readOnlyVariantsV3_queryVariants>
|