@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.
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
@@ -1,50 +1,130 @@
1
1
  <data_items_remove>
2
- <use_cases>
3
- - Delete items from a collection when they are no longer needed
4
- - Remove user-generated content that violates policies or is flagged
5
- - Clean up expired records, such as old sessions or temporary data
6
- - Delete items based on user actions (e.g., removing from cart, deleting posts)
7
- - Implement soft delete functionality by removing items from active collections
8
- - Remove test or duplicate data from collections
9
- - Delete items as part of GDPR or data privacy compliance
10
- - Remove outdated or archived records from a collection
11
- </use_cases>
12
-
13
- <usage>
2
+ <description>
3
+ # Method name:
14
4
 
5
+ data.items.remove(dataCollectionId: string, itemId: string, options: WixDataRemoveOptions)
6
+
7
+ # Method Link:
8
+
9
+ https://dev.wix.com/docs/sdk/backend-modules/data/items/remove
10
+
11
+ # Method Description:
12
+
13
+ Removes an item from a collection.
14
+
15
+ The `remove()` method returns a Promise that resolves to the removed item
16
+ after it has been removed from the specified collection. The Promise is
17
+ rejected if the current user does not have "delete" permissions for the
18
+ collection.
19
+
20
+ Calling the `remove()` method triggers the [`beforeRemove()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-remove) and [`afterRemove()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-remove) hooks if they have been defined.
21
+
22
+
23
+ > **Note:** The `remove()` method also clears multiple-item reference fields for items in collections referenced by the specified item. For example, suppose you have a **Movies** collection with an **Actors** field that contains multiple references to items in a **People** collection. Removing an item in the **Movies** collection also clears the data in the corresponding multiple-item reference fields in the **People** collection.
24
+
25
+ # Method Permissions:
26
+
27
+ - Write Data Items
28
+
29
+ # Method Permissions Scopes IDs:
30
+
31
+ - SCOPE.DC-DATA.WRITE
32
+
33
+
34
+
35
+ # Method Code Examples:
36
+
37
+ ## Remove an item from a collection
38
+
39
+ ```javascript
40
+ import { items } from "@wix/data";
41
+
42
+ async function removeItem() {
43
+ const result = await items.remove("myCollection", "00001");
44
+ console.log(result); // See removed item below
45
+ }
46
+
47
+ /* removed item is:
48
+ *
49
+ * {
50
+ * "_id": "00001",
51
+ * "_owner": "ffdkj9c2-df8g-f9ke-lk98-4kjhfr89keedb",
52
+ * "_createdDate": "2017-05-24T12:33:18.938Z",
53
+ * "_updatedDate": "2017-05-24T12:33:18.938Z",
54
+ * "title": "Mr.",
55
+ * "first_name": "John",
56
+ * "last_name": "Doe"
57
+ * }
58
+ */
59
+ ```
60
+
61
+
62
+
63
+ ## Remove a collection using a custom function
64
+
65
+ ```javascript
66
+ import { items } from "@wix/data";
67
+
68
+ // Code for a delete operation using remove() //
69
+
70
+ function deleteGreeting(itemId) {
71
+ return items.remove('Greetings', itemId);
72
+ }
73
+
74
+ ```
75
+
76
+ ## Remove an item from a collection with condition
77
+
78
+ ```javascript
15
79
  import { items } from "@wix/data";
16
80
 
17
81
  async function removeItem() {
18
- const removed = await items.remove("myCollection", "itemId");
19
- console.log(removed); // See below
82
+ const filter = wixClient.items.filter().eq("active", false);
83
+ const result = await items.remove("accounts", "00001", { condition: filter });
84
+ console.log(result); // See removed item below
20
85
  }
21
86
 
22
- /* removed is:
23
- *
24
- * {
25
- * "_id": "itemId",
26
- * "_owner": "ffdkj9c2-df8g-f9ke-lk98-4kjhfr89keedb",
27
- * "_createdDate": "2017-05-24T12:33:18.938Z",
28
- * "_updatedDate": "2017-05-24T14:22:51.472Z",
29
- * "title": "Mr.",
30
- * "first_name": "John",
31
- * "last_name": "Doe"
32
- * }
33
- */
34
- </usage>
87
+ /* removed item is:
88
+ *
89
+ * {
90
+ * "_id": "00001",
91
+ * "_owner": "ffdkj9c2-df8g-f9ke-lk98-4kjhfr89keedb",
92
+ * "_createdDate": "2017-05-24T12:33:18.938Z",
93
+ * "_updatedDate": "2017-05-24T12:33:18.938Z",
94
+ * "title": "Mr.",
95
+ * "first_name": "John",
96
+ * "last_name": "Doe",
97
+ * "active": false,
98
+ * }
99
+ */
100
+ ```
101
+
102
+ ## default
35
103
 
104
+ ```javascript
105
+ try {
106
+ const result = await items.remove("collection-0.9304281905629848", "6892593d-d57f-428d-bc53-3f0870a1beef", {});
107
+ return result;
108
+ } catch (error) {
109
+ console.error(error);
110
+ throw error;
111
+ }
112
+ ```
113
+ </description>
36
114
  <type_definition>
37
- Method: data.items.remove(dataCollectionId, itemId, options)
38
- Description: Removes an item from a collection. The `remove()` method returns a Promise that resolves to the removed item after it has been removed from the specified collection. The Promise is rejected if the current user does not have "delete" permissions for the collection. Calling the `remove()` method triggers the [`beforeRemove()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-remove) and [`afterRemove()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-remove) hooks if they have been defined. > **Note:** The `remove()` method also clears multiple-item reference fields for items in collections referenced by the specified item. For example, suppose you have a **Movies** collection with an **Actors** field that contains multiple references to items in a **People** collection. Removing an item in the **Movies** collection also clears the data in the corresponding multiple-item reference fields in the **People** collection.
39
- Method parameters:
40
- param name: dataCollectionId | type: string | description: GUID of the collection that contains the item. | required: true
41
- param name: itemId | type: string | description: GUID of the item to remove. | required: true
42
- param name: options | type: WixDataRemoveOptions | description: Object containing options to use when processing this operation.
43
- Return type: PROMISE<WixDataItem>
44
- - name: _createdDate | type: Date | description: Date and time the item was added to the collection.
45
- - name: _id | type: string | description: Data item GUID.
46
- - name: _owner | type: string | description: GUID of the user who created the item. Can be modified with site owner permissions.
47
- - name: _updatedDate | type: Date | description: Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.
48
- </type_definition>
49
- </data_items_remove>
115
+ ```
116
+ Method: data.items.remove(dataCollectionId, itemId, options)
117
+ Description: Removes an item from a collection. The `remove()` method returns a Promise that resolves to the removed item after it has been removed from the specified collection. The Promise is rejected if the current user does not have "delete" permissions for the collection. Calling the `remove()` method triggers the [`beforeRemove()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-remove) and [`afterRemove()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-remove) hooks if they have been defined. > **Note:** The `remove()` method also clears multiple-item reference fields for items in collections referenced by the specified item. For example, suppose you have a **Movies** collection with an **Actors** field that contains multiple references to items in a **People** collection. Removing an item in the **Movies** collection also clears the data in the corresponding multiple-item reference fields in the **People** collection.
118
+ Method parameters:
119
+ param name: dataCollectionId | type: string | description: GUID of the collection that contains the item. | required: true
120
+ param name: itemId | type: string | description: GUID of the item to remove. | required: true
121
+ param name: options | type: WixDataRemoveOptions | description: Object containing options to use when processing this operation.
122
+ Return type: PROMISE<WixDataItem>
123
+ - name: _createdDate | type: Date | description: Date and time the item was added to the collection.
124
+ - name: _id | type: string | description: Data item GUID.
125
+ - name: _owner | type: string | description: GUID of the user who created the item. Can be modified with site owner permissions.
126
+ - name: _updatedDate | type: Date | description: Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.
50
127
 
128
+ ```
129
+ </type_definition>
130
+ </data_items_remove>