@wix/ditto-codegen-public 1.0.162 → 1.0.164
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 +24996 -553
- 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,139 @@
|
|
|
1
|
+
<stores_inventoryItemsV3_updateInventoryItem>
|
|
2
|
+
<description>
|
|
3
|
+
# Method name:
|
|
4
|
+
|
|
5
|
+
stores.inventoryItemsV3.updateInventoryItem(_id: string, inventoryItem: UpdateInventoryItem, options: UpdateInventoryItemOptions)
|
|
6
|
+
|
|
7
|
+
# Method Link:
|
|
8
|
+
|
|
9
|
+
https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/inventory-items-v3/update-inventory-item
|
|
10
|
+
|
|
11
|
+
# Method Description:
|
|
12
|
+
|
|
13
|
+
Updates an inventory item.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
Each time the inventory item is updated, `revision` increments by 1.
|
|
17
|
+
The current `revision` must be passed when updating the inventory item.
|
|
18
|
+
This ensures you're working with the latest inventory item and prevents unintended overwrites.
|
|
19
|
+
|
|
20
|
+
# Method Permissions:
|
|
21
|
+
|
|
22
|
+
- WIX_STORES.INVENTORY_UPDATE
|
|
23
|
+
|
|
24
|
+
# Method Permissions Scopes IDs:
|
|
25
|
+
|
|
26
|
+
undefined
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# Method Code Examples:
|
|
31
|
+
|
|
32
|
+
## updateInventoryItem
|
|
33
|
+
|
|
34
|
+
```javascript
|
|
35
|
+
import { inventoryItemsV3 } from '@wix/stores';
|
|
36
|
+
|
|
37
|
+
async function updateInventoryItem(id, inventoryItem, options) {
|
|
38
|
+
const response = await inventoryItemsV3.updateInventoryItem(id, inventoryItem, options);
|
|
39
|
+
};
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## updateInventoryItem (with elevated permissions)
|
|
43
|
+
|
|
44
|
+
```javascript
|
|
45
|
+
import { inventoryItemsV3 } from '@wix/stores';
|
|
46
|
+
import { auth } from '@wix/essentials';
|
|
47
|
+
|
|
48
|
+
async function myUpdateInventoryItemMethod(id, inventoryItem, options) {
|
|
49
|
+
const elevatedUpdateInventoryItem = auth.elevate(inventoryItemsV3.updateInventoryItem);
|
|
50
|
+
const response = await elevatedUpdateInventoryItem(id, inventoryItem, options);
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
## default
|
|
57
|
+
|
|
58
|
+
```javascript
|
|
59
|
+
try {
|
|
60
|
+
const result = await inventoryItemsV3.updateInventoryItem(
|
|
61
|
+
"ca3ed606-73ca-43d2-a22e-274a42d2d135",
|
|
62
|
+
{
|
|
63
|
+
inStock: true,
|
|
64
|
+
locationId: "7dbb10d8-62ca-4b24-8143-7872a01d667f",
|
|
65
|
+
productId: "9545a9f6-779f-4b92-ab2c-67c5551d0bde",
|
|
66
|
+
revision: "1",
|
|
67
|
+
extendedFields: {}
|
|
68
|
+
},
|
|
69
|
+
{ reason: "MANUAL" }
|
|
70
|
+
);
|
|
71
|
+
return result;
|
|
72
|
+
} catch (error) {
|
|
73
|
+
console.error(error);
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
</description>
|
|
78
|
+
<type_definition>
|
|
79
|
+
```
|
|
80
|
+
Method: stores.inventoryItemsV3.updateInventoryItem(_id, inventoryItem, options)
|
|
81
|
+
Description: Updates an inventory item. Each time the inventory item is updated, `revision` increments by 1. The current `revision` must be passed when updating the inventory item. This ensures you're working with the latest inventory item and prevents unintended overwrites.
|
|
82
|
+
Method parameters:
|
|
83
|
+
param name: _id | type: string | description: Inventory item GUID. | required: true
|
|
84
|
+
param name: inventoryItem | type: UpdateInventoryItem | description: none | required: true
|
|
85
|
+
- name: extendedFields | type: ExtendedFields | description: Custom field data for the inventory item object. [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.
|
|
86
|
+
- name: namespaces | type: Record<string, undefined> | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
87
|
+
- name: inStock | type: boolean | description: Tracking method - in stock. When set to `true`, the item is available for sale without a quantity limit.
|
|
88
|
+
- name: locationId | type: string | description: Stores location GUID.
|
|
89
|
+
- name: preorderInfo | type: PreorderInfo | description: Item preorder info.
|
|
90
|
+
- name: enabled | type: boolean | description: Whether preorder is enabled for the product. Default: `false`
|
|
91
|
+
- name: limit | type: number | description: Number of products that can be preordered after stock reaches zero. Supported only for inventory items with `trackQuantity = true`. Default: `100000`
|
|
92
|
+
- name: message | type: string | description: A message the customer will see when the item is out of stock and preorder is enabled.
|
|
93
|
+
- name: productId | type: string | description: Product GUID.
|
|
94
|
+
- name: quantity | type: number | description: Tracking method - quantity left in inventory. Quantity can be negative when decrementing inventory for an order that has already been paid.
|
|
95
|
+
- name: revision | type: string | description: Revision number, which increments by 1 each time the inventory item is updated. To prevent conflicting changes, the current revision must be passed when updating the inventory item. Ignored when creating an inventory item. | required: true
|
|
96
|
+
- name: variantId | type: string | description: Variant GUID.
|
|
97
|
+
param name: options | type: UpdateInventoryItemOptions | description: none
|
|
98
|
+
- name: reason | type: ReasonType | description: Reason for update.
|
|
99
|
+
enum: MANUAL, ORDER, REVERT_INVENTORY_CHANGE, UNKNOWN
|
|
100
|
+
Return type: PROMISE<InventoryItem>
|
|
101
|
+
- name: _createdDate | type: Date | description: Date and time the inventory item was created.
|
|
102
|
+
- name: _id | type: string | description: Inventory item GUID.
|
|
103
|
+
- name: _updatedDate | type: Date | description: Date and time the inventory item was created.
|
|
104
|
+
- name: availabilityStatus | type: AvailabilityStatus | description: Inventory item availability status. Supported values: + OUT_OF_STOCK: Product is out of stock. + IN_STOCK: Product is in stock. See `quantity` field for exact amount in stock. + PREORDER: Product is only available for preorder. See `preorderInfo` field for more info.
|
|
105
|
+
enum:
|
|
106
|
+
IN_STOCK: Product is in stock. See `quantity` field for exact amount in stock.
|
|
107
|
+
OUT_OF_STOCK: Product is out of stock.
|
|
108
|
+
PREORDER: Product is only available for preorder. See `preorderInfo` field for more info.
|
|
109
|
+
UNKNOWN_AVAILABILITY_STATUS
|
|
110
|
+
- name: extendedFields | type: ExtendedFields | description: Custom field data for the inventory item object. [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.
|
|
111
|
+
- name: extendedFields.namespaces | type: Record<string, undefined> | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
112
|
+
- name: locationId | type: string | description: Stores location GUID.
|
|
113
|
+
- name: preorderInfo | type: PreorderInfo | description: Item preorder info.
|
|
114
|
+
- name: preorderInfo.counter | type: number | description: Number of times the product was preordered. Supported only for inventory items with `trackQuantity = true`.
|
|
115
|
+
- name: preorderInfo.enabled | type: boolean | description: Whether preorder is enabled for the product. Default: `false`
|
|
116
|
+
- name: preorderInfo.limit | type: number | description: Number of products that can be preordered after stock reaches zero. Supported only for inventory items with `trackQuantity = true`. Default: `100000`
|
|
117
|
+
- name: preorderInfo.message | type: string | description: A message the customer will see when the item is out of stock and preorder is enabled.
|
|
118
|
+
- name: preorderInfo.quantity | type: number | description: Quantity of products that can be preordered. Supported only for inventory items with `trackQuantity = true`.
|
|
119
|
+
- name: product | type: Product | description: Product.
|
|
120
|
+
- name: product.directCategoryIds | type: Array<string> | description: List of category GUIDs that this product is included in directly.
|
|
121
|
+
- name: product.name | type: string | description: Product name.
|
|
122
|
+
- name: product.variantName | type: string | description: Variant name.
|
|
123
|
+
- name: product.variantSku | type: string | description: Variant SKU (stock keeping unit).
|
|
124
|
+
- name: product.variantVisible | type: boolean | description: Variant visible.
|
|
125
|
+
- name: productId | type: string | description: Product GUID.
|
|
126
|
+
- name: revision | type: string | description: Revision number, which increments by 1 each time the inventory item is updated. To prevent conflicting changes, the current revision must be passed when updating the inventory item. Ignored when creating an inventory item.
|
|
127
|
+
- name: trackQuantity | type: boolean | description: Whether the quantity is being tracked.
|
|
128
|
+
- name: variantId | type: string | description: Variant GUID.
|
|
129
|
+
- ONE-OF:
|
|
130
|
+
- name: inStock | type: boolean | description: Tracking method - in stock. When set to `true`, the item is available for sale without a quantity limit.
|
|
131
|
+
- name: quantity | type: number | description: Tracking method - quantity left in inventory. Quantity can be negative when decrementing inventory for an order that has already been paid.
|
|
132
|
+
Possible Errors:
|
|
133
|
+
HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: PRE_ORDER_VALIDATION
|
|
134
|
+
HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: REQUESTED_QUANTITY_MUST_BE_NON_NEGATIVE_DECREASING
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
</type_definition>
|
|
139
|
+
</stores_inventoryItemsV3_updateInventoryItem>
|