@wix/ditto-codegen-public 1.0.57 → 1.0.59
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/data-items-get-doc.txt +72 -0
- package/dist/docs-output/api-docs/data-items-insert-doc.txt +55 -0
- package/dist/docs-output/api-docs/data-items-query-doc.txt +316 -0
- package/dist/docs-output/api-docs/data-items-remove-doc.txt +50 -0
- package/dist/docs-output/api-docs/data-items-update-doc.txt +57 -0
- package/dist/docs-output/api-docs/ecom-cart-onCartCreated-doc.txt +71 -67
- package/dist/docs-output/api-docs/ecom-cart-onCartUpdated-doc.txt +71 -68
- package/dist/docs-output/api-docs/ecom-currentCart-getCurrentCart-doc.txt +330 -0
- package/dist/out.js +23 -1231
- package/package.json +2 -2
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<data_items_update>
|
|
2
|
+
<use_cases>
|
|
3
|
+
- Modify existing collection items based on user actions or form submissions
|
|
4
|
+
- Update item properties without losing other field values
|
|
5
|
+
- Change item status or state in workflows (e.g., pending to approved)
|
|
6
|
+
- Update timestamps, counters, or computed fields
|
|
7
|
+
- Modify items conditionally based on current field values
|
|
8
|
+
- Bulk update item properties across multiple records
|
|
9
|
+
- Update items with references to other collections
|
|
10
|
+
- Maintain data integrity by updating related records
|
|
11
|
+
</use_cases>
|
|
12
|
+
|
|
13
|
+
<usage>
|
|
14
|
+
|
|
15
|
+
import { items } from "@wix/data";
|
|
16
|
+
|
|
17
|
+
async function updateItem() {
|
|
18
|
+
const toUpdate = {
|
|
19
|
+
_id: "00001",
|
|
20
|
+
title: "Mr.",
|
|
21
|
+
first_name: "John",
|
|
22
|
+
last_name: "Doe",
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const updatedItem = await items.update("myCollection", toUpdate);
|
|
26
|
+
console.log(updatedItem); // See below
|
|
27
|
+
}
|
|
28
|
+
/* item is:
|
|
29
|
+
*
|
|
30
|
+
* {
|
|
31
|
+
* "_id": "00001",
|
|
32
|
+
* "_owner": "ffdkj9c2-df8g-f9ke-lk98-4kjhfr89keedb",
|
|
33
|
+
* "_createdDate": "2017-05-24T12:33:18.938Z",
|
|
34
|
+
* "_updatedDate": "2017-05-24T12:33:18.938Z",
|
|
35
|
+
* "title": "Mr.",
|
|
36
|
+
* "first_name": "John",
|
|
37
|
+
* "last_name": "Doe"
|
|
38
|
+
* }
|
|
39
|
+
*/
|
|
40
|
+
</usage>
|
|
41
|
+
|
|
42
|
+
<type_definition>
|
|
43
|
+
Method: data.items.update(dataCollectionId, item, options)
|
|
44
|
+
Description: Updates an item in a collection. The `update()` method returns a Promise that resolves to the updated item from the specified collection. The Promise is rejected if the current user does not have update permissions for the collection. Calling the `update()` method triggers the [`beforeUpdate()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-update) and [`afterUpdate()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-update) hooks if they have been defined. The `update()` method compares the `_id` property of the specified item with the `_id` property values of the items in the specified collection. If an item in the collection has that `_id` value, `update()` replaces the item's property values with the ones in the specified item. If the existing item had properties with values and those properties were not included in the specified item, the values in those properties are lost. The item's `_updatedDate` property is also updated to the current date. Any valid JavaScript object can be used as a property value. The `update()` method maintains the structure of the specified object. For example, objects that contain nested objects, arrays, or arrays with nested objects are all added to the collection as defined. When updating an item in a collection that has a reference field, set the value of the reference field to the referenced item's `_id` value or the entire referenced item object. The maximum size of an item that you can update in a collection is 500kb. > **Notes:** > - The specified item must include an `_id` property that already exists in the collection. > - The `update()` method does not support multi-reference fields. For multi-reference fields, use `replaceReferences()` or `insertReference()`. > - [Translatable collections](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content) do not allow insertion and modification of items when working in a non-primary language. For example, if a collection's primary language is English, and the site visitor is viewing the site in French, calling `update()` fails and issues an error.
|
|
45
|
+
Method parameters:
|
|
46
|
+
param name: dataCollectionId | type: string | description: GUID of the collection item belongs to. | required: true
|
|
47
|
+
param name: item | type: WixDataItem | description: Data item to update. | required: true
|
|
48
|
+
- name: _id | type: string | description: Data item GUID.
|
|
49
|
+
- name: _owner | type: string | description: GUID of the user who created the item. Can be modified with site owner permissions.
|
|
50
|
+
param name: options | type: WixDataUpdateOptions | description: Options to use when processing this operation.
|
|
51
|
+
- name: appOptions | type: Record<string, any> | description: Options for [querying Wix app collections](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-app-collections/querying-wix-app-collections).
|
|
52
|
+
- name: condition | type: WixDataFilter | description: If provided, item will be updated only if condition is met.
|
|
53
|
+
Method: data.items.and(filter)
|
|
54
|
+
Description: Adds an `and` condition to the filter. A filter with an `and` condition returns all items that meet the conditions defined on both sides of the condition. Use the `and()` method when performing compound queries. For example, the final filter in this set of queries returns results where status is either pending or rejected **and** age is either less than 25 or greater than 65. ```js let statusFilter = items.filter() .eq("status", "pending") .or(items.filter().eq("status", "rejected")); let ageFilter = items.filter() .lt("age", 25) .or(items.filter().gt("age", 65)); let statusAndAgeFilter = statusFilter.and(ageFilter); ``` > **Notes**: > - The `and()` method is designed to work with 2 or more queries or filters. If used with a single query or filter, it returns all items in a collection. > - When chaining multiple `WixDataFilter` methods to a filter, an `and` condition is implied. In such cases, you do not need to call the `and()` method explicitly. For example, this filter returns results where an item `status` is `active` and `age` is greater than 25: > ```js > items.filter().eq("status", "active").gt("age", 25); >
|
|
55
|
+
</type_definition>
|
|
56
|
+
</data_items_update>
|
|
57
|
+
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<ecom_cart_onCartCreated>
|
|
2
|
-
<purpose>Registers a callback function as an event handler. Triggered when a cart is created. This method registers a callback function as an event handler. When developing websites or building apps with Blocks, use a Velo backend event instead of this method. The way you call this method differs depending on the framework you are working in: When using the CLI, run the generate command to add an event extension, and then call this method within the extension code. When building a self-hosted app, subscribe your app to the relevant event, and then call this method on your server.</purpose>
|
|
3
2
|
<use_cases>
|
|
4
3
|
- Initialize cart tracking and analytics when a new cart is created
|
|
5
4
|
- Send welcome messages or onboarding communications to new cart owners
|
|
@@ -11,74 +10,79 @@
|
|
|
11
10
|
- Initialize cart-specific features or personalization
|
|
12
11
|
</use_cases>
|
|
13
12
|
|
|
14
|
-
<
|
|
15
|
-
cart
|
|
16
|
-
</method_declaration>
|
|
17
|
-
<required_parameters>
|
|
18
|
-
- handler: function - handler(event: CartCreatedEnvelope): void | Promise<void>
|
|
19
|
-
</required_parameters>
|
|
20
|
-
<optional_parameters>
|
|
21
|
-
None
|
|
22
|
-
</optional_parameters>
|
|
23
|
-
<import>import { cart } from '@wix/ecom'</import>
|
|
24
|
-
<types>
|
|
25
|
-
**CartCreatedEnvelope**
|
|
26
|
-
Properties:
|
|
27
|
-
- event: CartCreatedEnvelope - The cart update event envelope
|
|
13
|
+
<usage>
|
|
14
|
+
import { cart } from "@wix/ecom";
|
|
28
15
|
|
|
29
|
-
**CartCreatedEnvelope**
|
|
30
|
-
Properties:
|
|
31
|
-
- entity: Cart - The updated cart entity
|
|
32
|
-
- metadata: EventMetadata - Event metadata
|
|
33
|
-
|
|
34
|
-
**Cart**
|
|
35
|
-
Properties:
|
|
36
|
-
- buyerInfo: BuyerInfo - Buyer information.
|
|
37
|
-
|
|
38
|
-
**BuyerInfo**
|
|
39
|
-
- contactId: string - Contact ID. For more information, see the Contacts API.
|
|
40
|
-
- email: string - Buyer email address.
|
|
41
|
-
- one of (id):
|
|
42
|
-
* visitorId: string - Visitor ID (format: GUID). If the buyer is not a site member.
|
|
43
|
-
* memberId: string - Member ID (format: GUID). If the buyer is a site member.
|
|
44
|
-
* userId: string - User ID (format: GUID). If the buyer, or cart owner, is a Wix user.
|
|
45
|
-
</types>
|
|
46
|
-
<important_notes>
|
|
47
|
-
- This method registers a callback function as an event handler
|
|
48
|
-
- When developing websites or building apps with Blocks, use a Velo backend event instead of this method
|
|
49
|
-
- The way you call this method differs depending on the framework you are working in:
|
|
50
|
-
- When using the CLI, run the generate command to add an event extension, and then call this method within the extension code
|
|
51
|
-
- When building a self-hosted app, subscribe your app to the relevant event, and then call this method on your server
|
|
52
|
-
- The handler function can be either synchronous (void) or asynchronous (Promise<void>)
|
|
53
|
-
- Triggered when a cart is created
|
|
54
|
-
- Required Permission: Read Orders
|
|
55
|
-
</important_notes>
|
|
56
|
-
|
|
57
|
-
<event_triggers>
|
|
58
|
-
- Cart Created: Triggered automatically when a new cart is successfully created
|
|
59
|
-
</event_triggers>
|
|
60
|
-
<example_usage>
|
|
61
|
-
```typescript
|
|
62
|
-
import { cart } from '@wix/ecom';
|
|
63
|
-
|
|
64
|
-
// Register event handler for cart creation
|
|
65
16
|
cart.onCartCreated((event) => {
|
|
66
|
-
|
|
17
|
+
// handle your event here
|
|
67
18
|
});
|
|
19
|
+
</usage>
|
|
68
20
|
|
|
69
|
-
|
|
70
|
-
cart.onCartCreated(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
- cart.
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
|
|
21
|
+
<type_definition>
|
|
22
|
+
Method: ecom.cart.onCartCreated(handler)
|
|
23
|
+
Description: Triggered when a cart is created.
|
|
24
|
+
Method parameters:
|
|
25
|
+
param name: handler | type: OnCartCreatedHandler | description: none
|
|
26
|
+
- name: event | type: CartCreatedEnvelope | description: none
|
|
27
|
+
- name: entity | type: Cart | description: none
|
|
28
|
+
- name: businessLocationId | type: string | description: The business location GUID associated with the cart. To learn more, see the Locations API.
|
|
29
|
+
- name: buyerInfo | type: BuyerInfo | description: Buyer information.
|
|
30
|
+
- name: contactId | type: string | description: Contact GUID. For more information, see the Contacts API.
|
|
31
|
+
- name: email | type: string | description: Buyer email address.
|
|
32
|
+
- ONE-OF:
|
|
33
|
+
- name: memberId | type: string | description: Member GUID. If the buyer is a site member.
|
|
34
|
+
- name: userId | type: string | description: User GUID. If the buyer, or cart owner, is a Wix user.
|
|
35
|
+
- name: visitorId | type: string | description: Visitor GUID. If the buyer is **not** a site member.
|
|
36
|
+
- name: buyerNote | type: string | description: [Buyer note](https://support.wix.com/en/article/collecting-and-viewing-buyer-notes) left by the customer.
|
|
37
|
+
- name: contactInfo | type: AddressWithContact | description: Contact info.
|
|
38
|
+
- name: address | type: Address | description: Address.
|
|
39
|
+
- name: addressLine1 | type: string | description: Main address line (usually street name and number).
|
|
40
|
+
- name: addressLine2 | type: string | description: Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
41
|
+
- name: city | type: string | description: City name.
|
|
42
|
+
- name: country | type: string | description: Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
43
|
+
- name: location | type: AddressLocation | description: Geocode object containing latitude and longitude coordinates.
|
|
44
|
+
- name: latitude | type: number | description: Address latitude.
|
|
45
|
+
- name: longitude | type: number | description: Address longitude.
|
|
46
|
+
- name: postalCode | type: string | description: Postal or zip code.
|
|
47
|
+
- name: streetAddress | type: StreetAddress | description: Street address.
|
|
48
|
+
- name: name | type: string | description: Street name.
|
|
49
|
+
- name: number | type: string | description: Street number.
|
|
50
|
+
- name: subdivision | type: string | description: Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
|
|
51
|
+
- name: contactDetails | type: FullAddressContactDetails | description: Contact details.
|
|
52
|
+
- name: company | type: string | description: Company name.
|
|
53
|
+
- name: firstName | type: string | description: First name.
|
|
54
|
+
- name: lastName | type: string | description: Last name.
|
|
55
|
+
- name: phone | type: string | description: Phone number.
|
|
56
|
+
- name: vatId | type: VatId | description: Tax information (for Brazil only). If GUID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed.
|
|
57
|
+
- name: _id | type: string | description: Customer's tax GUID.
|
|
58
|
+
- name: type | type: VatType | description: Tax type. Supported values: + `CPF`: for individual tax payers + `CNPJ`: for corporations
|
|
59
|
+
enum:
|
|
60
|
+
CNPJ: CNPJ - for corporations
|
|
61
|
+
CPF: CPF - for individual tax payers.
|
|
62
|
+
UNSPECIFIED
|
|
63
|
+
- name: extendedFields | type: ExtendedFields | description: Fields extended by data extensions
|
|
64
|
+
- 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).
|
|
65
|
+
- name: overrideCheckoutUrl | type: string | description: `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page. This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
66
|
+
- name: selectedShippingOption | type: SelectedShippingOption | description: Selected shipping option.
|
|
67
|
+
- name: carrierId | type: string | description: Carrier GUID.
|
|
68
|
+
- name: code | type: string | description: Selected shipping option code. For example, "usps_std_overnight".
|
|
69
|
+
- name: metadata | type: EventMetadata | description: none
|
|
70
|
+
- name: _id | type: string | description: Event GUID. With this GUID you can easily spot duplicated events and ignore them.
|
|
71
|
+
- name: entityEventSequence | type: string | description: A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
72
|
+
- name: entityFqdn | type: string | description: Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
73
|
+
- name: entityId | type: string | description: GUID of the entity associated with the event.
|
|
74
|
+
- name: eventTime | type: Date | description: Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`.
|
|
75
|
+
- name: eventType | type: string | description: Event type.
|
|
76
|
+
- name: identity | type: IdentificationData | description: The identification type and identity data.
|
|
77
|
+
- ONE-OF:
|
|
78
|
+
- name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site.
|
|
79
|
+
- name: appId | type: string | description: GUID of an app.
|
|
80
|
+
- name: memberId | type: string | description: GUID of a site visitor that has logged in to the site.
|
|
81
|
+
- name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.).
|
|
82
|
+
- name: instanceId | type: string | description: App instance GUID.
|
|
83
|
+
- name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.
|
|
84
|
+
- name: slug | type: string | description: Event action name, placed at the top level to make it easier for users to dispatch messages. For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
85
|
+
- name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
|
|
86
|
+
Return type: PRIMITIVE<void>
|
|
87
|
+
</type_definition>
|
|
84
88
|
</ecom_cart_onCartCreated>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<ecom_cart_onCartUpdated>
|
|
2
|
-
<purpose>Registers a callback function as an event handler. Triggered when a cart is updated. This method registers a callback function as an event handler. When developing websites or building apps with Blocks, use a Velo backend event instead of this method. The way you call this method differs depending on the framework you are working in: When using the CLI, run the generate command to add an event extension, and then call this method within the extension code. When building a self-hosted app, subscribe your app to the relevant event, and then call this method on your server.</purpose>
|
|
3
2
|
<use_cases>
|
|
4
3
|
- Track cart changes for analytics and monitoring
|
|
5
4
|
- Update inventory systems when cart contents change
|
|
@@ -11,74 +10,78 @@
|
|
|
11
10
|
- Update product recommendations based on cart changes
|
|
12
11
|
</use_cases>
|
|
13
12
|
|
|
14
|
-
<
|
|
15
|
-
cart
|
|
16
|
-
</method_declaration>
|
|
17
|
-
<required_parameters>
|
|
18
|
-
- handler: function - handler(event: CartUpdatedEnvelope): void | Promise<void>
|
|
19
|
-
</required_parameters>
|
|
20
|
-
<optional_parameters>
|
|
21
|
-
None
|
|
22
|
-
</optional_parameters>
|
|
23
|
-
<import>import { cart } from '@wix/ecom'</import>
|
|
24
|
-
<types>
|
|
25
|
-
**CartUpdatedEnvelope**
|
|
26
|
-
Properties:
|
|
27
|
-
- event: CartUpdatedEnvelope - The cart update event envelope
|
|
13
|
+
<usage>
|
|
14
|
+
import { cart } from "@wix/ecom";
|
|
28
15
|
|
|
29
|
-
**CartUpdatedEnvelope**
|
|
30
|
-
Properties:
|
|
31
|
-
- entity: Cart - The updated cart entity
|
|
32
|
-
- metadata: EventMetadata - Event metadata
|
|
33
|
-
|
|
34
|
-
**Cart**
|
|
35
|
-
Properties:
|
|
36
|
-
- buyerInfo: BuyerInfo - Buyer information.
|
|
37
|
-
|
|
38
|
-
**BuyerInfo**
|
|
39
|
-
- contactId: string - Contact ID. For more information, see the Contacts API.
|
|
40
|
-
- email: string - Buyer email address.
|
|
41
|
-
- one of (id):
|
|
42
|
-
* visitorId: string - Visitor ID (format: GUID). If the buyer is not a site member.
|
|
43
|
-
* memberId: string - Member ID (format: GUID). If the buyer is a site member.
|
|
44
|
-
* userId: string - User ID (format: GUID). If the buyer, or cart owner, is a Wix user.
|
|
45
|
-
</types>
|
|
46
|
-
<important_notes>
|
|
47
|
-
- This method registers a callback function as an event handler
|
|
48
|
-
- When developing websites or building apps with Blocks, use a Velo backend event instead of this method
|
|
49
|
-
- The way you call this method differs depending on the framework you are working in:
|
|
50
|
-
- When using the CLI, run the generate command to add an event extension, and then call this method within the extension code
|
|
51
|
-
- When building a self-hosted app, subscribe your app to the relevant event, and then call this method on your server
|
|
52
|
-
- The handler function can be either synchronous (void) or asynchronous (Promise<void>)
|
|
53
|
-
- Triggered when a cart is updated
|
|
54
|
-
- Required Permission: Read Orders
|
|
55
|
-
</important_notes>
|
|
56
|
-
|
|
57
|
-
<event_triggers>
|
|
58
|
-
- Cart Updated: Triggered automatically when a cart's contents, quantities, or properties are modified
|
|
59
|
-
</event_triggers>
|
|
60
|
-
<example_usage>
|
|
61
|
-
```typescript
|
|
62
|
-
import { cart } from '@wix/ecom';
|
|
63
|
-
|
|
64
|
-
// Register event handler for cart updates
|
|
65
16
|
cart.onCartUpdated((event) => {
|
|
66
|
-
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
// Async handler example
|
|
70
|
-
cart.onCartUpdated(async (event) => {
|
|
71
|
-
await trackCartChanges(event);
|
|
17
|
+
// handle your event here
|
|
72
18
|
});
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
- cart.
|
|
82
|
-
-
|
|
83
|
-
|
|
19
|
+
</usage>
|
|
20
|
+
<type_definition>
|
|
21
|
+
Method: ecom.cart.onCartUpdated(handler)
|
|
22
|
+
Description: none
|
|
23
|
+
Method parameters:
|
|
24
|
+
param name: handler | type: OnCartUpdatedHandler | description: none
|
|
25
|
+
- name: event | type: CartUpdatedEnvelope | description: none
|
|
26
|
+
- name: entity | type: Cart | description: none
|
|
27
|
+
- name: businessLocationId | type: string | description: The business location GUID associated with the cart. To learn more, see the Locations API.
|
|
28
|
+
- name: buyerInfo | type: BuyerInfo | description: Buyer information.
|
|
29
|
+
- name: contactId | type: string | description: Contact GUID. For more information, see the Contacts API.
|
|
30
|
+
- name: email | type: string | description: Buyer email address.
|
|
31
|
+
- ONE-OF:
|
|
32
|
+
- name: memberId | type: string | description: Member GUID. If the buyer is a site member.
|
|
33
|
+
- name: userId | type: string | description: User GUID. If the buyer, or cart owner, is a Wix user.
|
|
34
|
+
- name: visitorId | type: string | description: Visitor GUID. If the buyer is **not** a site member.
|
|
35
|
+
- name: buyerNote | type: string | description: [Buyer note](https://support.wix.com/en/article/collecting-and-viewing-buyer-notes) left by the customer.
|
|
36
|
+
- name: contactInfo | type: AddressWithContact | description: Contact info.
|
|
37
|
+
- name: address | type: Address | description: Address.
|
|
38
|
+
- name: addressLine1 | type: string | description: Main address line (usually street name and number).
|
|
39
|
+
- name: addressLine2 | type: string | description: Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
40
|
+
- name: city | type: string | description: City name.
|
|
41
|
+
- name: country | type: string | description: Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
42
|
+
- name: location | type: AddressLocation | description: Geocode object containing latitude and longitude coordinates.
|
|
43
|
+
- name: latitude | type: number | description: Address latitude.
|
|
44
|
+
- name: longitude | type: number | description: Address longitude.
|
|
45
|
+
- name: postalCode | type: string | description: Postal or zip code.
|
|
46
|
+
- name: streetAddress | type: StreetAddress | description: Street address.
|
|
47
|
+
- name: name | type: string | description: Street name.
|
|
48
|
+
- name: number | type: string | description: Street number.
|
|
49
|
+
- name: subdivision | type: string | description: Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
|
|
50
|
+
- name: contactDetails | type: FullAddressContactDetails | description: Contact details.
|
|
51
|
+
- name: company | type: string | description: Company name.
|
|
52
|
+
- name: firstName | type: string | description: First name.
|
|
53
|
+
- name: lastName | type: string | description: Last name.
|
|
54
|
+
- name: phone | type: string | description: Phone number.
|
|
55
|
+
- name: vatId | type: VatId | description: Tax information (for Brazil only). If GUID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed.
|
|
56
|
+
- name: _id | type: string | description: Customer's tax GUID.
|
|
57
|
+
- name: type | type: VatType | description: Tax type. Supported values: + `CPF`: for individual tax payers + `CNPJ`: for corporations
|
|
58
|
+
enum:
|
|
59
|
+
CNPJ: CNPJ - for corporations
|
|
60
|
+
CPF: CPF - for individual tax payers.
|
|
61
|
+
UNSPECIFIED
|
|
62
|
+
- name: extendedFields | type: ExtendedFields | description: Fields extended by data extensions
|
|
63
|
+
- 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).
|
|
64
|
+
- name: overrideCheckoutUrl | type: string | description: `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page. This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
65
|
+
- name: selectedShippingOption | type: SelectedShippingOption | description: Selected shipping option.
|
|
66
|
+
- name: carrierId | type: string | description: Carrier GUID.
|
|
67
|
+
- name: code | type: string | description: Selected shipping option code. For example, "usps_std_overnight".
|
|
68
|
+
- name: metadata | type: EventMetadata | description: none
|
|
69
|
+
- name: _id | type: string | description: Event GUID. With this GUID you can easily spot duplicated events and ignore them.
|
|
70
|
+
- name: entityEventSequence | type: string | description: A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
71
|
+
- name: entityFqdn | type: string | description: Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
72
|
+
- name: entityId | type: string | description: GUID of the entity associated with the event.
|
|
73
|
+
- name: eventTime | type: Date | description: Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`.
|
|
74
|
+
- name: eventType | type: string | description: Event type.
|
|
75
|
+
- name: identity | type: IdentificationData | description: The identification type and identity data.
|
|
76
|
+
- ONE-OF:
|
|
77
|
+
- name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site.
|
|
78
|
+
- name: appId | type: string | description: GUID of an app.
|
|
79
|
+
- name: memberId | type: string | description: GUID of a site visitor that has logged in to the site.
|
|
80
|
+
- name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.).
|
|
81
|
+
- name: instanceId | type: string | description: App instance GUID.
|
|
82
|
+
- name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.
|
|
83
|
+
- name: slug | type: string | description: Event action name, placed at the top level to make it easier for users to dispatch messages. For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
84
|
+
- name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
|
|
85
|
+
Return type: PRIMITIVE<void>
|
|
86
|
+
</type_definition>
|
|
84
87
|
</ecom_cart_onCartUpdated>
|