@wix/auto_sdk_crm_contacts 1.0.255 → 1.0.256
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/build/{cjs/src/contacts-v4-contact-contacts.types.d.ts → contacts-v4-contact-contacts.universal-B3uIE5qF.d.mts} +363 -193
- package/build/{internal/cjs/src/contacts-v4-contact-contacts.types.d.ts → contacts-v4-contact-contacts.universal-B3uIE5qF.d.ts} +363 -193
- package/build/{cjs/src/contacts-v4-contact-contacts.public.d.ts → index.d.mts} +43 -18
- package/build/{es/src/contacts-v4-contact-contacts.public.d.ts → index.d.ts} +43 -18
- package/build/index.js +1338 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +1281 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/{es/src/contacts-v4-contact-contacts.types.d.ts → contacts-v4-contact-contacts.universal-CdMlf2ui.d.mts} +370 -189
- package/build/{es/src/contacts-v4-contact-contacts.types.d.ts → internal/contacts-v4-contact-contacts.universal-CdMlf2ui.d.ts} +370 -189
- package/build/internal/{cjs/src/contacts-v4-contact-contacts.public.d.ts → index.d.mts} +43 -18
- package/build/internal/{es/src/contacts-v4-contact-contacts.public.d.ts → index.d.ts} +43 -18
- package/build/internal/index.js +1338 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +1281 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +914 -0
- package/build/internal/meta.d.ts +914 -0
- package/build/internal/meta.js +618 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +584 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/meta.d.mts +914 -0
- package/build/meta.d.ts +914 -0
- package/build/meta.js +618 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +584 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact-contacts.context.d.ts +0 -36
- package/build/cjs/src/contacts-v4-contact-contacts.context.js +0 -61
- package/build/cjs/src/contacts-v4-contact-contacts.context.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact-contacts.http.d.ts +0 -126
- package/build/cjs/src/contacts-v4-contact-contacts.http.js +0 -555
- package/build/cjs/src/contacts-v4-contact-contacts.http.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact-contacts.meta.d.ts +0 -32
- package/build/cjs/src/contacts-v4-contact-contacts.meta.js +0 -180
- package/build/cjs/src/contacts-v4-contact-contacts.meta.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact-contacts.public.js +0 -193
- package/build/cjs/src/contacts-v4-contact-contacts.public.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact-contacts.types.js +0 -278
- package/build/cjs/src/contacts-v4-contact-contacts.types.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact-contacts.universal.d.ts +0 -2398
- package/build/cjs/src/contacts-v4-contact-contacts.universal.js +0 -911
- package/build/cjs/src/contacts-v4-contact-contacts.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/contacts-v4-contact-contacts.context.d.ts +0 -36
- package/build/es/src/contacts-v4-contact-contacts.context.js +0 -36
- package/build/es/src/contacts-v4-contact-contacts.context.js.map +0 -1
- package/build/es/src/contacts-v4-contact-contacts.http.d.ts +0 -126
- package/build/es/src/contacts-v4-contact-contacts.http.js +0 -544
- package/build/es/src/contacts-v4-contact-contacts.http.js.map +0 -1
- package/build/es/src/contacts-v4-contact-contacts.meta.d.ts +0 -32
- package/build/es/src/contacts-v4-contact-contacts.meta.js +0 -146
- package/build/es/src/contacts-v4-contact-contacts.meta.js.map +0 -1
- package/build/es/src/contacts-v4-contact-contacts.public.js +0 -160
- package/build/es/src/contacts-v4-contact-contacts.public.js.map +0 -1
- package/build/es/src/contacts-v4-contact-contacts.types.js +0 -275
- package/build/es/src/contacts-v4-contact-contacts.types.js.map +0 -1
- package/build/es/src/contacts-v4-contact-contacts.universal.d.ts +0 -2398
- package/build/es/src/contacts-v4-contact-contacts.universal.js +0 -877
- package/build/es/src/contacts-v4-contact-contacts.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/contacts-v4-contact-contacts.context.d.ts +0 -36
- package/build/internal/cjs/src/contacts-v4-contact-contacts.context.js +0 -61
- package/build/internal/cjs/src/contacts-v4-contact-contacts.context.js.map +0 -1
- package/build/internal/cjs/src/contacts-v4-contact-contacts.http.d.ts +0 -126
- package/build/internal/cjs/src/contacts-v4-contact-contacts.http.js +0 -555
- package/build/internal/cjs/src/contacts-v4-contact-contacts.http.js.map +0 -1
- package/build/internal/cjs/src/contacts-v4-contact-contacts.meta.d.ts +0 -32
- package/build/internal/cjs/src/contacts-v4-contact-contacts.meta.js +0 -180
- package/build/internal/cjs/src/contacts-v4-contact-contacts.meta.js.map +0 -1
- package/build/internal/cjs/src/contacts-v4-contact-contacts.public.js +0 -193
- package/build/internal/cjs/src/contacts-v4-contact-contacts.public.js.map +0 -1
- package/build/internal/cjs/src/contacts-v4-contact-contacts.types.js +0 -278
- package/build/internal/cjs/src/contacts-v4-contact-contacts.types.js.map +0 -1
- package/build/internal/cjs/src/contacts-v4-contact-contacts.universal.d.ts +0 -2409
- package/build/internal/cjs/src/contacts-v4-contact-contacts.universal.js +0 -911
- package/build/internal/cjs/src/contacts-v4-contact-contacts.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/contacts-v4-contact-contacts.context.d.ts +0 -36
- package/build/internal/es/src/contacts-v4-contact-contacts.context.js +0 -36
- package/build/internal/es/src/contacts-v4-contact-contacts.context.js.map +0 -1
- package/build/internal/es/src/contacts-v4-contact-contacts.http.d.ts +0 -126
- package/build/internal/es/src/contacts-v4-contact-contacts.http.js +0 -544
- package/build/internal/es/src/contacts-v4-contact-contacts.http.js.map +0 -1
- package/build/internal/es/src/contacts-v4-contact-contacts.meta.d.ts +0 -32
- package/build/internal/es/src/contacts-v4-contact-contacts.meta.js +0 -146
- package/build/internal/es/src/contacts-v4-contact-contacts.meta.js.map +0 -1
- package/build/internal/es/src/contacts-v4-contact-contacts.public.js +0 -160
- package/build/internal/es/src/contacts-v4-contact-contacts.public.js.map +0 -1
- package/build/internal/es/src/contacts-v4-contact-contacts.types.js +0 -275
- package/build/internal/es/src/contacts-v4-contact-contacts.types.js.map +0 -1
- package/build/internal/es/src/contacts-v4-contact-contacts.universal.d.ts +0 -2409
- package/build/internal/es/src/contacts-v4-contact-contacts.universal.js +0 -877
- package/build/internal/es/src/contacts-v4-contact-contacts.universal.js.map +0 -1
|
@@ -0,0 +1,914 @@
|
|
|
1
|
+
import { ah as CreateContactRequest$1, b as CreateContactResponse$1, aj as UpdateContactRequest$1, c as UpdateContactResponse$1, ak as MergeContactsRequest$1, d as MergeContactsResponse$1, ao as DeleteContactRequest$1, ap as DeleteContactResponse$1, aq as LabelContactRequest$1, L as LabelContactResponse$1, ar as UnlabelContactRequest$1, e as UnlabelContactResponse$1, az as QueryContactsRequest$1, aB as QueryContactsResponse$1, aX as GetContactRequest$1, aY as GetContactResponse$1 } from './contacts-v4-contact-contacts.universal-CdMlf2ui.js';
|
|
2
|
+
|
|
3
|
+
interface Contact {
|
|
4
|
+
/**
|
|
5
|
+
* Contact ID.
|
|
6
|
+
* @format GUID
|
|
7
|
+
* @readonly
|
|
8
|
+
*/
|
|
9
|
+
id?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Revision number, which increments by 1 each time the contact is updated.
|
|
12
|
+
* To prevent conflicting changes,
|
|
13
|
+
* the existing `revision` must be specified when updating a contact.
|
|
14
|
+
* @readonly
|
|
15
|
+
*/
|
|
16
|
+
revision?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Details about the contact's source.
|
|
19
|
+
* @readonly
|
|
20
|
+
*/
|
|
21
|
+
source?: ContactSource;
|
|
22
|
+
/**
|
|
23
|
+
* Date and time the contact was created.
|
|
24
|
+
* @readonly
|
|
25
|
+
*/
|
|
26
|
+
createdDate?: Date | null;
|
|
27
|
+
/**
|
|
28
|
+
* Date and time the contact was last updated.
|
|
29
|
+
* @readonly
|
|
30
|
+
*/
|
|
31
|
+
updatedDate?: Date | null;
|
|
32
|
+
/**
|
|
33
|
+
* Details about the contact's last action in the site.
|
|
34
|
+
* @readonly
|
|
35
|
+
*/
|
|
36
|
+
lastActivity?: ContactActivity;
|
|
37
|
+
/**
|
|
38
|
+
* Contact's primary phone and email.
|
|
39
|
+
* @readonly
|
|
40
|
+
*/
|
|
41
|
+
primaryInfo?: PrimaryContactInfo;
|
|
42
|
+
/** Contact's details. */
|
|
43
|
+
info?: ContactInfo;
|
|
44
|
+
/**
|
|
45
|
+
* Contact's primary email details.
|
|
46
|
+
* @readonly
|
|
47
|
+
*/
|
|
48
|
+
primaryEmail?: PrimaryEmail;
|
|
49
|
+
/**
|
|
50
|
+
* Contact's primary phone details.
|
|
51
|
+
* @readonly
|
|
52
|
+
*/
|
|
53
|
+
primaryPhone?: PrimaryPhone;
|
|
54
|
+
}
|
|
55
|
+
interface ContactSource {
|
|
56
|
+
/**
|
|
57
|
+
* Source type.
|
|
58
|
+
* @readonly
|
|
59
|
+
*/
|
|
60
|
+
sourceType?: ContactSourceType;
|
|
61
|
+
/**
|
|
62
|
+
* App ID, if the contact was created by an app.
|
|
63
|
+
* @format GUID
|
|
64
|
+
* @readonly
|
|
65
|
+
*/
|
|
66
|
+
appId?: string | null;
|
|
67
|
+
}
|
|
68
|
+
declare enum ContactSourceType {
|
|
69
|
+
OTHER = "OTHER",
|
|
70
|
+
ADMIN = "ADMIN",
|
|
71
|
+
WIX_APP = "WIX_APP",
|
|
72
|
+
IMPORT = "IMPORT",
|
|
73
|
+
THIRD_PARTY = "THIRD_PARTY",
|
|
74
|
+
WIX_BOOKINGS = "WIX_BOOKINGS",
|
|
75
|
+
WIX_CHAT = "WIX_CHAT",
|
|
76
|
+
WIX_EMAIL_MARKETING = "WIX_EMAIL_MARKETING",
|
|
77
|
+
WIX_EVENTS = "WIX_EVENTS",
|
|
78
|
+
WIX_FORMS = "WIX_FORMS",
|
|
79
|
+
WIX_GROUPS = "WIX_GROUPS",
|
|
80
|
+
WIX_HOTELS = "WIX_HOTELS",
|
|
81
|
+
WIX_MARKET_PLACE = "WIX_MARKET_PLACE",
|
|
82
|
+
WIX_MUSIC = "WIX_MUSIC",
|
|
83
|
+
WIX_RESTAURANTS = "WIX_RESTAURANTS",
|
|
84
|
+
WIX_SITE_MEMBERS = "WIX_SITE_MEMBERS",
|
|
85
|
+
WIX_STORES = "WIX_STORES",
|
|
86
|
+
WIX_CODE = "WIX_CODE",
|
|
87
|
+
HOPP = "HOPP"
|
|
88
|
+
}
|
|
89
|
+
interface ContactActivity {
|
|
90
|
+
/** Date and time of the last action. */
|
|
91
|
+
activityDate?: Date | null;
|
|
92
|
+
/** Contact's last action in the site. */
|
|
93
|
+
activityType?: ContactActivityType;
|
|
94
|
+
}
|
|
95
|
+
declare enum ContactActivityType {
|
|
96
|
+
/** Visited the site. */
|
|
97
|
+
GENERAL = "GENERAL",
|
|
98
|
+
/** Became a new contact. */
|
|
99
|
+
CONTACT_CREATED = "CONTACT_CREATED",
|
|
100
|
+
/** Logged in. */
|
|
101
|
+
MEMBER_LOGIN = "MEMBER_LOGIN",
|
|
102
|
+
/** Requested a site membership. */
|
|
103
|
+
MEMBER_REGISTER = "MEMBER_REGISTER",
|
|
104
|
+
/** Was approved, blocked, or unblocked. */
|
|
105
|
+
MEMBER_STATUS_CHANGED = "MEMBER_STATUS_CHANGED",
|
|
106
|
+
/** Submitted a form. */
|
|
107
|
+
FORM_SUBMITTED = "FORM_SUBMITTED",
|
|
108
|
+
/** Started a chat. */
|
|
109
|
+
INBOX_FORM_SUBMITTED = "INBOX_FORM_SUBMITTED",
|
|
110
|
+
/** Paid a payment request. */
|
|
111
|
+
INBOX_PAYMENT_REQUEST_PAID = "INBOX_PAYMENT_REQUEST_PAID",
|
|
112
|
+
/** Received a message from the site. */
|
|
113
|
+
INBOX_MESSAGE_TO_CUSTOMER = "INBOX_MESSAGE_TO_CUSTOMER",
|
|
114
|
+
/** Sent a new message to the site. */
|
|
115
|
+
INBOX_MESSAGE_FROM_CUSTOMER = "INBOX_MESSAGE_FROM_CUSTOMER",
|
|
116
|
+
/** Subscribed to a site newsletter through a form. */
|
|
117
|
+
NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED = "NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED",
|
|
118
|
+
/** Unsubscribed from a site newsletter. */
|
|
119
|
+
NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE = "NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE",
|
|
120
|
+
/** Made a purchase. */
|
|
121
|
+
ECOM_PURCHASE = "ECOM_PURCHASE",
|
|
122
|
+
/** Abandoned a shopping cart. */
|
|
123
|
+
ECOM_CART_ABANDON = "ECOM_CART_ABANDON",
|
|
124
|
+
/** Checked out shopping cart and submitted buyer info (but didn’t complete the purchase yet). */
|
|
125
|
+
ECOM_CHECKOUT_BUYER = "ECOM_CHECKOUT_BUYER",
|
|
126
|
+
/** Booked an appointment. */
|
|
127
|
+
BOOKINGS_APPOINTMENT = "BOOKINGS_APPOINTMENT",
|
|
128
|
+
/** Made a Wix Hotels reservation. */
|
|
129
|
+
HOTELS_RESERVATION = "HOTELS_RESERVATION",
|
|
130
|
+
/** Paid for a Wix Hotels reservation. */
|
|
131
|
+
HOTELS_PURCHASE = "HOTELS_PURCHASE",
|
|
132
|
+
/** Confirmed a Wix Hotels reservation. */
|
|
133
|
+
HOTELS_CONFIRMATION = "HOTELS_CONFIRMATION",
|
|
134
|
+
/** Canceled a Wix Hotels reservation. */
|
|
135
|
+
HOTELS_CANCEL = "HOTELS_CANCEL",
|
|
136
|
+
/** Purchased a video. */
|
|
137
|
+
VIDEO_PURCHASE = "VIDEO_PURCHASE",
|
|
138
|
+
/** Rented a video. */
|
|
139
|
+
VIDEO_RENT = "VIDEO_RENT",
|
|
140
|
+
/** Made a purchase with a pay button. */
|
|
141
|
+
CASHIER_BUTTON_PURCHASE = "CASHIER_BUTTON_PURCHASE",
|
|
142
|
+
/** Became a new Wix Marketplace lead. */
|
|
143
|
+
ARENA_NEW_LEAD = "ARENA_NEW_LEAD",
|
|
144
|
+
/** RSVP'd to an event. */
|
|
145
|
+
EVENTS_RSVP = "EVENTS_RSVP",
|
|
146
|
+
/** Paid an invoice. */
|
|
147
|
+
INVOICE_PAY = "INVOICE_PAY",
|
|
148
|
+
/** An invoice is now overdue. */
|
|
149
|
+
INVOICE_OVERDUE = "INVOICE_OVERDUE",
|
|
150
|
+
/** Accepted a price quote. */
|
|
151
|
+
PRICE_QUOTE_ACCEPT = "PRICE_QUOTE_ACCEPT",
|
|
152
|
+
/** A price quote has expired. */
|
|
153
|
+
PRICE_QUOTE_EXPIRE = "PRICE_QUOTE_EXPIRE",
|
|
154
|
+
/** Ordered food with Wix Restaurants. */
|
|
155
|
+
RESTAURANTS_ORDER = "RESTAURANTS_ORDER",
|
|
156
|
+
/** Made a Wix Restaurants reservation. */
|
|
157
|
+
RESTAURANTS_RESERVATION = "RESTAURANTS_RESERVATION",
|
|
158
|
+
/** Opened an email from the site. */
|
|
159
|
+
SHOUTOUT_OPEN = "SHOUTOUT_OPEN",
|
|
160
|
+
/** Clicked a link in an email from the site. */
|
|
161
|
+
SHOUTOUT_CLICK = "SHOUTOUT_CLICK",
|
|
162
|
+
/** Merged with another contact. */
|
|
163
|
+
CONTACT_MERGED = "CONTACT_MERGED",
|
|
164
|
+
/** Subscribed to a site newsletter. */
|
|
165
|
+
NEWSLETTER_SUBSCRIPTION_SUBSCRIBE = "NEWSLETTER_SUBSCRIPTION_SUBSCRIBE",
|
|
166
|
+
/** Subscription status to site newsletters is pending confirmation. */
|
|
167
|
+
NEWSLETTER_SUBSCRIPTION_PENDING = "NEWSLETTER_SUBSCRIPTION_PENDING",
|
|
168
|
+
/** Subscription status to site newsletters is not set. */
|
|
169
|
+
NEWSLETTER_SUBSCRIPTION_NOT_SET = "NEWSLETTER_SUBSCRIPTION_NOT_SET",
|
|
170
|
+
/** Subscribed to phone notifications. */
|
|
171
|
+
PHONE_SUBSCRIPTION_SUBSCRIBE = "PHONE_SUBSCRIPTION_SUBSCRIBE",
|
|
172
|
+
/** Subscription to phone notificatons is pending confirmation. */
|
|
173
|
+
PHONE_SUBSCRIPTION_PENDING = "PHONE_SUBSCRIPTION_PENDING",
|
|
174
|
+
/** Subscription to phone notificatons is not set. */
|
|
175
|
+
PHONE_SUBSCRIPTION_NOT_SET = "PHONE_SUBSCRIPTION_NOT_SET",
|
|
176
|
+
/** Subscribed to phone notifications. */
|
|
177
|
+
PHONE_SUBSCRIPTION_UNSUBSCRIBE = "PHONE_SUBSCRIPTION_UNSUBSCRIBE"
|
|
178
|
+
}
|
|
179
|
+
interface PrimaryContactInfo {
|
|
180
|
+
/**
|
|
181
|
+
* Primary email address.
|
|
182
|
+
*
|
|
183
|
+
* This property reflects the email address in `info.emails`
|
|
184
|
+
* where `primary` is `true`.
|
|
185
|
+
* @format EMAIL
|
|
186
|
+
* @readonly
|
|
187
|
+
*/
|
|
188
|
+
email?: string | null;
|
|
189
|
+
/**
|
|
190
|
+
* Primary phone number.
|
|
191
|
+
*
|
|
192
|
+
* This property reflects the phone number in `info.phones`
|
|
193
|
+
* where `primary` is `true`.
|
|
194
|
+
* @readonly
|
|
195
|
+
*/
|
|
196
|
+
phone?: string | null;
|
|
197
|
+
}
|
|
198
|
+
interface Image {
|
|
199
|
+
/**
|
|
200
|
+
* WixMedia image ID.
|
|
201
|
+
* This property is written by Wix when an image is uploaded to the Wix Media Manager.
|
|
202
|
+
*/
|
|
203
|
+
id?: string;
|
|
204
|
+
/** Image source: Either a Media Manager URL or external URL. */
|
|
205
|
+
url?: string;
|
|
206
|
+
/** Height of the original image. */
|
|
207
|
+
height?: number;
|
|
208
|
+
/** Width of the original image. */
|
|
209
|
+
width?: number;
|
|
210
|
+
/** Image alt text (optional). */
|
|
211
|
+
altText?: string | null;
|
|
212
|
+
/**
|
|
213
|
+
* Image URL expiration date (optional).
|
|
214
|
+
* @readonly
|
|
215
|
+
*/
|
|
216
|
+
urlExpirationDate?: Date | null;
|
|
217
|
+
}
|
|
218
|
+
interface ContactInfo {
|
|
219
|
+
/** Contact's first and last name. */
|
|
220
|
+
name?: ContactName;
|
|
221
|
+
/** Contact's email addresses. */
|
|
222
|
+
emails?: ContactEmailsWrapper;
|
|
223
|
+
/** Contact's phone numbers. */
|
|
224
|
+
phones?: ContactPhonesWrapper;
|
|
225
|
+
/** Contact's street addresses. */
|
|
226
|
+
addresses?: ContactAddressesWrapper;
|
|
227
|
+
/**
|
|
228
|
+
* Contact's company name.
|
|
229
|
+
* @maxLength 1000
|
|
230
|
+
*/
|
|
231
|
+
company?: string | null;
|
|
232
|
+
/**
|
|
233
|
+
* Contact's job title.
|
|
234
|
+
* @maxLength 1000
|
|
235
|
+
*/
|
|
236
|
+
jobTitle?: string | null;
|
|
237
|
+
/**
|
|
238
|
+
* Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`.
|
|
239
|
+
* @format LOCAL_DATE
|
|
240
|
+
*/
|
|
241
|
+
birthdate?: string | null;
|
|
242
|
+
/**
|
|
243
|
+
* Locale in
|
|
244
|
+
* [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
245
|
+
* Typically, this is a lowercase 2-letter language code,
|
|
246
|
+
* followed by a hyphen, followed by an uppercase 2-letter country code.
|
|
247
|
+
* For example, `en-US` for U.S. English, and `de-DE` for Germany German.
|
|
248
|
+
* @format LANGUAGE_TAG
|
|
249
|
+
*/
|
|
250
|
+
locale?: string | null;
|
|
251
|
+
/**
|
|
252
|
+
* List of contact's labels.
|
|
253
|
+
*
|
|
254
|
+
* Labels are used to organize contacts. Labels can be
|
|
255
|
+
* added and removed using Label Contact and Unlabel Contact, respectively.
|
|
256
|
+
*
|
|
257
|
+
* To view or manage contact labels, use the Labels API.
|
|
258
|
+
*/
|
|
259
|
+
labelKeys?: LabelsWrapper;
|
|
260
|
+
/**
|
|
261
|
+
* Additional custom fields.
|
|
262
|
+
*
|
|
263
|
+
* Empty fields are not returned.
|
|
264
|
+
*/
|
|
265
|
+
extendedFields?: ExtendedFieldsWrapper;
|
|
266
|
+
/** Contact's profile picture. */
|
|
267
|
+
picture?: ContactPicture;
|
|
268
|
+
}
|
|
269
|
+
interface ContactName {
|
|
270
|
+
/**
|
|
271
|
+
* Contact's first name.
|
|
272
|
+
* @maxLength 1000
|
|
273
|
+
*/
|
|
274
|
+
first?: string | null;
|
|
275
|
+
/**
|
|
276
|
+
* Contact's last name.
|
|
277
|
+
* @maxLength 1000
|
|
278
|
+
*/
|
|
279
|
+
last?: string | null;
|
|
280
|
+
}
|
|
281
|
+
interface ContactEmailsWrapper {
|
|
282
|
+
/**
|
|
283
|
+
* List of up to 50 email addresses.
|
|
284
|
+
* @maxSize 50
|
|
285
|
+
*/
|
|
286
|
+
items?: ContactEmail[];
|
|
287
|
+
}
|
|
288
|
+
interface ContactEmail {
|
|
289
|
+
/**
|
|
290
|
+
* Email ID.
|
|
291
|
+
* @format GUID
|
|
292
|
+
* @readonly
|
|
293
|
+
*/
|
|
294
|
+
id?: string | null;
|
|
295
|
+
/**
|
|
296
|
+
* Email type.
|
|
297
|
+
*
|
|
298
|
+
* `UNTAGGED` is shown as "Other" in the Contact List.
|
|
299
|
+
*/
|
|
300
|
+
tag?: EmailTag;
|
|
301
|
+
/**
|
|
302
|
+
* Email address.
|
|
303
|
+
* @minLength 1
|
|
304
|
+
* @maxLength 320
|
|
305
|
+
*/
|
|
306
|
+
email?: string;
|
|
307
|
+
/**
|
|
308
|
+
* Indicates whether this is the contact's primary email address.
|
|
309
|
+
* When changing `primary` to `true` for an email,
|
|
310
|
+
* the contact's other emails become `false`.
|
|
311
|
+
* Changing the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email.
|
|
312
|
+
*/
|
|
313
|
+
primary?: boolean | null;
|
|
314
|
+
}
|
|
315
|
+
declare enum EmailTag {
|
|
316
|
+
UNTAGGED = "UNTAGGED",
|
|
317
|
+
MAIN = "MAIN",
|
|
318
|
+
HOME = "HOME",
|
|
319
|
+
WORK = "WORK"
|
|
320
|
+
}
|
|
321
|
+
interface ContactPhonesWrapper {
|
|
322
|
+
/**
|
|
323
|
+
* List of up to 50 phone numbers.
|
|
324
|
+
* @maxSize 50
|
|
325
|
+
*/
|
|
326
|
+
items?: ContactPhone[];
|
|
327
|
+
}
|
|
328
|
+
interface ContactPhone {
|
|
329
|
+
/**
|
|
330
|
+
* Phone ID.
|
|
331
|
+
* @format GUID
|
|
332
|
+
* @readonly
|
|
333
|
+
*/
|
|
334
|
+
id?: string | null;
|
|
335
|
+
/**
|
|
336
|
+
* Phone type.
|
|
337
|
+
*
|
|
338
|
+
* `UNTAGGED` is shown as "Other" in the Contact List.
|
|
339
|
+
*/
|
|
340
|
+
tag?: PhoneTag;
|
|
341
|
+
/**
|
|
342
|
+
* [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.
|
|
343
|
+
* @format COUNTRY
|
|
344
|
+
*/
|
|
345
|
+
countryCode?: string | null;
|
|
346
|
+
/**
|
|
347
|
+
* Phone number.
|
|
348
|
+
* @minLength 1
|
|
349
|
+
* @maxLength 50
|
|
350
|
+
*/
|
|
351
|
+
phone?: string;
|
|
352
|
+
/**
|
|
353
|
+
* [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)
|
|
354
|
+
* phone number.
|
|
355
|
+
* Automatically generated using `phone` and `countryCode`, pending both values are valid.
|
|
356
|
+
* @readonly
|
|
357
|
+
*/
|
|
358
|
+
e164Phone?: string | null;
|
|
359
|
+
/**
|
|
360
|
+
* Indicates whether this is the contact's primary phone number.
|
|
361
|
+
* When changing `primary` to `true` for a phone,
|
|
362
|
+
* the contact's `primary` field for other phones becomes `false`.
|
|
363
|
+
* Changing the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone.
|
|
364
|
+
*/
|
|
365
|
+
primary?: boolean | null;
|
|
366
|
+
}
|
|
367
|
+
declare enum PhoneTag {
|
|
368
|
+
UNTAGGED = "UNTAGGED",
|
|
369
|
+
MAIN = "MAIN",
|
|
370
|
+
HOME = "HOME",
|
|
371
|
+
MOBILE = "MOBILE",
|
|
372
|
+
WORK = "WORK",
|
|
373
|
+
FAX = "FAX"
|
|
374
|
+
}
|
|
375
|
+
interface ContactAddressesWrapper {
|
|
376
|
+
/**
|
|
377
|
+
* List of up to 50 addresses.
|
|
378
|
+
* @maxSize 50
|
|
379
|
+
*/
|
|
380
|
+
items?: ContactAddress[];
|
|
381
|
+
}
|
|
382
|
+
interface ContactAddress {
|
|
383
|
+
/**
|
|
384
|
+
* Street address ID.
|
|
385
|
+
* @format GUID
|
|
386
|
+
* @readonly
|
|
387
|
+
*/
|
|
388
|
+
id?: string | null;
|
|
389
|
+
/**
|
|
390
|
+
* Address type.
|
|
391
|
+
* `UNTAGGED` is shown as "Other" in the Contact List.
|
|
392
|
+
*/
|
|
393
|
+
tag?: AddressTag;
|
|
394
|
+
/** Street address. */
|
|
395
|
+
address?: Address;
|
|
396
|
+
}
|
|
397
|
+
declare enum AddressTag {
|
|
398
|
+
UNTAGGED = "UNTAGGED",
|
|
399
|
+
HOME = "HOME",
|
|
400
|
+
WORK = "WORK",
|
|
401
|
+
BILLING = "BILLING",
|
|
402
|
+
SHIPPING = "SHIPPING"
|
|
403
|
+
}
|
|
404
|
+
/** Physical address */
|
|
405
|
+
interface Address extends AddressStreetOneOf {
|
|
406
|
+
/** Street address object, with number and name in separate fields. */
|
|
407
|
+
streetAddress?: StreetAddress;
|
|
408
|
+
/**
|
|
409
|
+
* Main address line, usually street and number, as free text.
|
|
410
|
+
* @maxLength 1000
|
|
411
|
+
*/
|
|
412
|
+
addressLine?: string | null;
|
|
413
|
+
/**
|
|
414
|
+
* 2-letter country code in an
|
|
415
|
+
* [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
|
|
416
|
+
* @format COUNTRY
|
|
417
|
+
*/
|
|
418
|
+
country?: string | null;
|
|
419
|
+
/**
|
|
420
|
+
* Code for a subdivision (such as state, prefecture, or province) in an
|
|
421
|
+
* [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
|
|
422
|
+
* @maxLength 100
|
|
423
|
+
*/
|
|
424
|
+
subdivision?: string | null;
|
|
425
|
+
/**
|
|
426
|
+
* City name.
|
|
427
|
+
* @maxLength 1000
|
|
428
|
+
*/
|
|
429
|
+
city?: string | null;
|
|
430
|
+
/**
|
|
431
|
+
* Postal or zip code.
|
|
432
|
+
* @maxLength 100
|
|
433
|
+
*/
|
|
434
|
+
postalCode?: string | null;
|
|
435
|
+
/**
|
|
436
|
+
* Free text providing more detailed address information,
|
|
437
|
+
* such as apartment, suite, or floor.
|
|
438
|
+
* @maxLength 1000
|
|
439
|
+
*/
|
|
440
|
+
addressLine2?: string | null;
|
|
441
|
+
}
|
|
442
|
+
/** @oneof */
|
|
443
|
+
interface AddressStreetOneOf {
|
|
444
|
+
/** Street address object, with number and name in separate fields. */
|
|
445
|
+
streetAddress?: StreetAddress;
|
|
446
|
+
/**
|
|
447
|
+
* Main address line, usually street and number, as free text.
|
|
448
|
+
* @maxLength 1000
|
|
449
|
+
*/
|
|
450
|
+
addressLine?: string | null;
|
|
451
|
+
}
|
|
452
|
+
interface StreetAddress {
|
|
453
|
+
/**
|
|
454
|
+
* Street number.
|
|
455
|
+
* @maxLength 100
|
|
456
|
+
*/
|
|
457
|
+
number?: string;
|
|
458
|
+
/**
|
|
459
|
+
* Street name.
|
|
460
|
+
* @maxLength 1000
|
|
461
|
+
*/
|
|
462
|
+
name?: string;
|
|
463
|
+
}
|
|
464
|
+
interface LabelsWrapper {
|
|
465
|
+
/**
|
|
466
|
+
* List of contact label keys.
|
|
467
|
+
*
|
|
468
|
+
* Contact labels help categorize contacts. Label keys must exist to be added to the contact.
|
|
469
|
+
* Contact labels can be created or retrieved with Find or Create Label or List Labels.
|
|
470
|
+
* @maxSize 2000
|
|
471
|
+
*/
|
|
472
|
+
items?: string[];
|
|
473
|
+
}
|
|
474
|
+
interface ExtendedFieldsWrapper {
|
|
475
|
+
/**
|
|
476
|
+
* Contact's extended fields,
|
|
477
|
+
* where each key is the field key,
|
|
478
|
+
* and each value is the field's value for the contact.
|
|
479
|
+
*
|
|
480
|
+
* To view and manage extended fields, use the Extended Fields API.
|
|
481
|
+
*/
|
|
482
|
+
items?: Record<string, any>;
|
|
483
|
+
}
|
|
484
|
+
/** TEST contact picture description */
|
|
485
|
+
interface ContactPicture {
|
|
486
|
+
/**
|
|
487
|
+
* Image.
|
|
488
|
+
* This can contain an image URL or a Wix Media image ID.
|
|
489
|
+
*/
|
|
490
|
+
image?: Image;
|
|
491
|
+
}
|
|
492
|
+
interface PrimaryEmail {
|
|
493
|
+
/**
|
|
494
|
+
* Primary email address.
|
|
495
|
+
*
|
|
496
|
+
* This field reflects the email address in `info.emails`
|
|
497
|
+
* where `primary` is `true`.
|
|
498
|
+
* @format EMAIL
|
|
499
|
+
* @readonly
|
|
500
|
+
*/
|
|
501
|
+
email?: string | null;
|
|
502
|
+
/**
|
|
503
|
+
* Indicates the recipient's opt-in or opt-out status for marketing emails.
|
|
504
|
+
*
|
|
505
|
+
* Default: `NOT_SET`
|
|
506
|
+
* @readonly
|
|
507
|
+
*/
|
|
508
|
+
subscriptionStatus?: SubscriptionStatus;
|
|
509
|
+
/**
|
|
510
|
+
* Indicates last reported status of sent emails.
|
|
511
|
+
*
|
|
512
|
+
* Default: `NOT_SET`
|
|
513
|
+
* @readonly
|
|
514
|
+
*/
|
|
515
|
+
deliverabilityStatus?: EmailDeliverabilityStatus;
|
|
516
|
+
}
|
|
517
|
+
declare enum SubscriptionStatus {
|
|
518
|
+
/** No status exists. */
|
|
519
|
+
NO_SUBSCRIPTION_STATUS = "NO_SUBSCRIPTION_STATUS",
|
|
520
|
+
/** No status specified. */
|
|
521
|
+
NOT_SET = "NOT_SET",
|
|
522
|
+
/** Subscription confirmation was requested, but recipient hasn't confirmed yet. */
|
|
523
|
+
PENDING = "PENDING",
|
|
524
|
+
/** Recipient has opted in to marketing emails or SMS messages. */
|
|
525
|
+
SUBSCRIBED = "SUBSCRIBED",
|
|
526
|
+
/** Recipient has opted out of marketing emails or SMS messages. */
|
|
527
|
+
UNSUBSCRIBED = "UNSUBSCRIBED"
|
|
528
|
+
}
|
|
529
|
+
declare enum EmailDeliverabilityStatus {
|
|
530
|
+
/** No status reported. */
|
|
531
|
+
NOT_SET = "NOT_SET",
|
|
532
|
+
/** Emails are being successfully delivered. */
|
|
533
|
+
VALID = "VALID",
|
|
534
|
+
/** The last email to the recipient bounced or was rejected. */
|
|
535
|
+
BOUNCED = "BOUNCED",
|
|
536
|
+
/** Recipient registered a spam complaint with their email provider. */
|
|
537
|
+
SPAM_COMPLAINT = "SPAM_COMPLAINT",
|
|
538
|
+
/** Multiple emails have been delivered without any kind of engagement from the recipient. */
|
|
539
|
+
INACTIVE = "INACTIVE"
|
|
540
|
+
}
|
|
541
|
+
interface PrimaryPhone {
|
|
542
|
+
/**
|
|
543
|
+
* Country code of the primary phone number in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
|
|
544
|
+
* @format COUNTRY
|
|
545
|
+
*/
|
|
546
|
+
countryCode?: string | null;
|
|
547
|
+
/**
|
|
548
|
+
* Phone number in [ITU E.164](https://www.itu.int/rec/T-REC-E.164/) format.
|
|
549
|
+
* Automatically generated using `phone` and `countryCode` when both values are valid.
|
|
550
|
+
* @readonly
|
|
551
|
+
*/
|
|
552
|
+
e164Phone?: string | null;
|
|
553
|
+
/**
|
|
554
|
+
* Formatted phone. Automatically generated using `phone` and `countryCode`.
|
|
555
|
+
* @readonly
|
|
556
|
+
*/
|
|
557
|
+
formattedPhone?: string | null;
|
|
558
|
+
/**
|
|
559
|
+
* Indicates the recipient's opt-in or opt-out status for SMS messages.
|
|
560
|
+
*
|
|
561
|
+
* Default:
|
|
562
|
+
* - `NOT_SET` when the phone is a valid E164 phone.
|
|
563
|
+
* - `NO_SUBSCRIPTION_STATUS` when the phone is not a valid E164 phone.
|
|
564
|
+
* @readonly
|
|
565
|
+
*/
|
|
566
|
+
subscriptionStatus?: SubscriptionStatus;
|
|
567
|
+
/**
|
|
568
|
+
* Primary phone number.
|
|
569
|
+
*
|
|
570
|
+
* This field reflects the phone number in `info.phones`
|
|
571
|
+
* where `primary` is `true`.
|
|
572
|
+
* @readonly
|
|
573
|
+
*/
|
|
574
|
+
phone?: string | null;
|
|
575
|
+
}
|
|
576
|
+
/** Contact creation options. */
|
|
577
|
+
interface CreateContactRequest {
|
|
578
|
+
/** Contact info. */
|
|
579
|
+
info: ContactInfo;
|
|
580
|
+
/**
|
|
581
|
+
* Controls whether the call will succeed
|
|
582
|
+
* if the new contact information contains an email or a phone number already used by another contact.
|
|
583
|
+
*
|
|
584
|
+
* If set to `true`,
|
|
585
|
+
* the call will succeed even if an email address or phone number is used by another contact.
|
|
586
|
+
* If set to `false`,
|
|
587
|
+
* the call will fail if the given email address is used by another contact or,
|
|
588
|
+
* if the email address is not given and the given phone number is used by another contact.
|
|
589
|
+
*
|
|
590
|
+
* Default: `false`
|
|
591
|
+
*/
|
|
592
|
+
allowDuplicates?: boolean;
|
|
593
|
+
}
|
|
594
|
+
/** Contact. */
|
|
595
|
+
interface CreateContactResponse {
|
|
596
|
+
/** Contact. */
|
|
597
|
+
contact?: Contact;
|
|
598
|
+
}
|
|
599
|
+
interface UpdateContactRequest {
|
|
600
|
+
/**
|
|
601
|
+
* ID of the contact to update.
|
|
602
|
+
* @format GUID
|
|
603
|
+
*/
|
|
604
|
+
contactId: string;
|
|
605
|
+
/**
|
|
606
|
+
* Revision number.
|
|
607
|
+
* When updating, include the existing `revision`
|
|
608
|
+
* to prevent conflicting updates.
|
|
609
|
+
*/
|
|
610
|
+
revision: number | null;
|
|
611
|
+
/**
|
|
612
|
+
* Controls whether the call will succeed
|
|
613
|
+
* if the new contact information contains an email or a phone number already used by another contact.
|
|
614
|
+
*
|
|
615
|
+
* If set to `true`,
|
|
616
|
+
* the call will succeed even if an email address or phone number is used by another contact.
|
|
617
|
+
* If set to `false`,
|
|
618
|
+
* the call will fail if the given email address is used by another contact or,
|
|
619
|
+
* if the email address is not given and the given phone number is used by another contact.
|
|
620
|
+
*
|
|
621
|
+
* Default: `false`
|
|
622
|
+
*/
|
|
623
|
+
allowDuplicates?: boolean;
|
|
624
|
+
/** Contact info. */
|
|
625
|
+
info: ContactInfo;
|
|
626
|
+
}
|
|
627
|
+
/** Updated contact. */
|
|
628
|
+
interface UpdateContactResponse {
|
|
629
|
+
/** Updated contact. */
|
|
630
|
+
contact?: Contact;
|
|
631
|
+
}
|
|
632
|
+
interface MergeContactsRequest {
|
|
633
|
+
/**
|
|
634
|
+
* Target contact ID.
|
|
635
|
+
* @format GUID
|
|
636
|
+
*/
|
|
637
|
+
targetContactId: string;
|
|
638
|
+
/**
|
|
639
|
+
* Target contact revision number, which increments by 1 each time the contact is updated.
|
|
640
|
+
* To prevent conflicting changes,
|
|
641
|
+
* the target contact's current `revision` must be specified.
|
|
642
|
+
*/
|
|
643
|
+
targetContactRevision: number | null;
|
|
644
|
+
/**
|
|
645
|
+
* IDs of up to 5 contacts to merge into the target contact.
|
|
646
|
+
* When you merge more than one source contact,
|
|
647
|
+
* the first source is given precedence, then the second, and so on.
|
|
648
|
+
* @minSize 1
|
|
649
|
+
* @maxSize 5
|
|
650
|
+
*/
|
|
651
|
+
sourceContactIds?: string[];
|
|
652
|
+
}
|
|
653
|
+
interface MergeContactsResponse {
|
|
654
|
+
/** Updated target contact. */
|
|
655
|
+
contact?: Contact;
|
|
656
|
+
}
|
|
657
|
+
interface DeleteContactRequest {
|
|
658
|
+
/**
|
|
659
|
+
* ID of the contact to delete.
|
|
660
|
+
* @format GUID
|
|
661
|
+
*/
|
|
662
|
+
contactId: string;
|
|
663
|
+
}
|
|
664
|
+
interface DeleteContactResponse {
|
|
665
|
+
}
|
|
666
|
+
interface LabelContactRequest {
|
|
667
|
+
/**
|
|
668
|
+
* ID of the contact to add labels to.
|
|
669
|
+
* @format GUID
|
|
670
|
+
*/
|
|
671
|
+
contactId: string;
|
|
672
|
+
/**
|
|
673
|
+
* List of label keys to add to the contact.
|
|
674
|
+
*
|
|
675
|
+
* Label keys must exist to be added to the contact.
|
|
676
|
+
* Use the Labels API to create or retrieve labels.
|
|
677
|
+
* @minSize 1
|
|
678
|
+
* @maxSize 100
|
|
679
|
+
*/
|
|
680
|
+
labelKeys: string[];
|
|
681
|
+
}
|
|
682
|
+
/** Updated contact. */
|
|
683
|
+
interface LabelContactResponse {
|
|
684
|
+
/** Updated contact. */
|
|
685
|
+
contact?: Contact;
|
|
686
|
+
}
|
|
687
|
+
interface UnlabelContactRequest {
|
|
688
|
+
/**
|
|
689
|
+
* ID of the contact to remove labels from.
|
|
690
|
+
* @format GUID
|
|
691
|
+
*/
|
|
692
|
+
contactId: string;
|
|
693
|
+
/**
|
|
694
|
+
* List of label keys to remove from the contact.
|
|
695
|
+
* @minSize 1
|
|
696
|
+
* @maxSize 100
|
|
697
|
+
*/
|
|
698
|
+
labelKeys: string[];
|
|
699
|
+
}
|
|
700
|
+
/** Updated contact. */
|
|
701
|
+
interface UnlabelContactResponse {
|
|
702
|
+
/** Updated contact. */
|
|
703
|
+
contact?: Contact;
|
|
704
|
+
}
|
|
705
|
+
interface Sorting {
|
|
706
|
+
/**
|
|
707
|
+
* Field to sort by.
|
|
708
|
+
*
|
|
709
|
+
* Supported properties:
|
|
710
|
+
* `createdDate`, `lastActivity.activityDate`, `primaryInfo.email`, `info.name.first`, `info.name.last`, `info.company`,
|
|
711
|
+
* `info.jobTitle`, `info.birthdate`
|
|
712
|
+
* @maxLength 100
|
|
713
|
+
*/
|
|
714
|
+
fieldName?: string;
|
|
715
|
+
/**
|
|
716
|
+
* Sort order.
|
|
717
|
+
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
718
|
+
*
|
|
719
|
+
* Defaults to `ASC`.
|
|
720
|
+
*/
|
|
721
|
+
order?: SortOrder;
|
|
722
|
+
}
|
|
723
|
+
declare enum SortOrder {
|
|
724
|
+
ASC = "ASC",
|
|
725
|
+
DESC = "DESC"
|
|
726
|
+
}
|
|
727
|
+
interface Paging {
|
|
728
|
+
/**
|
|
729
|
+
* Number of items to return. Learn more about pagination in API Query Language([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language)|[REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging).
|
|
730
|
+
*
|
|
731
|
+
* Default: `50`. <br>
|
|
732
|
+
* Maximum: `1000`.
|
|
733
|
+
* @max 1000
|
|
734
|
+
*/
|
|
735
|
+
limit?: number | null;
|
|
736
|
+
/** Number of items to skip in the current sort order. */
|
|
737
|
+
offset?: number | null;
|
|
738
|
+
}
|
|
739
|
+
declare enum ContactFieldSet {
|
|
740
|
+
/** name, primaryEmail, primaryPhone */
|
|
741
|
+
BASIC = "BASIC",
|
|
742
|
+
/** name, phones, emails, addresses */
|
|
743
|
+
COMMUNICATION_DETAILS = "COMMUNICATION_DETAILS",
|
|
744
|
+
/** name, primaryInfo(email, phone), extendedFields */
|
|
745
|
+
EXTENDED = "EXTENDED",
|
|
746
|
+
/** Full contact object */
|
|
747
|
+
FULL = "FULL"
|
|
748
|
+
}
|
|
749
|
+
interface PagingMetadata {
|
|
750
|
+
/** The number of items returned in this response. */
|
|
751
|
+
count?: number | null;
|
|
752
|
+
/** The offset which was requested. */
|
|
753
|
+
offset?: number | null;
|
|
754
|
+
/** The total number of items that match the query. */
|
|
755
|
+
total?: number | null;
|
|
756
|
+
/** A flag that indicates the server failed to calculate 'total' field. */
|
|
757
|
+
tooManyToCount?: boolean | null;
|
|
758
|
+
}
|
|
759
|
+
interface QueryContactsRequest {
|
|
760
|
+
/**
|
|
761
|
+
* Plain text search for an exact match.
|
|
762
|
+
*
|
|
763
|
+
* Supported properties:
|
|
764
|
+
* `info.name.first`, `info.name.last`, `info.emails.email`, `info.phones.phone`
|
|
765
|
+
*
|
|
766
|
+
* Max: 100 characters
|
|
767
|
+
* @maxLength 100
|
|
768
|
+
*/
|
|
769
|
+
search?: string | null;
|
|
770
|
+
/** Query options. */
|
|
771
|
+
query?: Query;
|
|
772
|
+
}
|
|
773
|
+
interface Query {
|
|
774
|
+
/**
|
|
775
|
+
* Filter object.
|
|
776
|
+
* See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
|
|
777
|
+
* for more information.
|
|
778
|
+
*
|
|
779
|
+
* For a detailed list of supported filters, see
|
|
780
|
+
* [Supported Filters](https://dev.wix.com/api/rest/contacts/contacts/supported-filters).
|
|
781
|
+
*/
|
|
782
|
+
filter?: Record<string, any> | null;
|
|
783
|
+
/**
|
|
784
|
+
* Sorting options.
|
|
785
|
+
* See [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination)
|
|
786
|
+
* for more information.
|
|
787
|
+
*
|
|
788
|
+
* Max: 1 sort object
|
|
789
|
+
* @maxSize 1
|
|
790
|
+
*/
|
|
791
|
+
sort?: Sorting[];
|
|
792
|
+
/** Pagination options. */
|
|
793
|
+
paging?: Paging;
|
|
794
|
+
/**
|
|
795
|
+
* List of projected fields to return.
|
|
796
|
+
* If both `fields` and `fieldsets` are sent in the request,
|
|
797
|
+
* the union of both lists is returned.
|
|
798
|
+
* `id` and `revision` are always returned.
|
|
799
|
+
*
|
|
800
|
+
* Supported properties:
|
|
801
|
+
* `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
|
|
802
|
+
* `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
|
|
803
|
+
* `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
|
|
804
|
+
* `info.labelKeys`, `info.locations`, `info.extendedFields`
|
|
805
|
+
* @maxLength 100
|
|
806
|
+
* @maxSize 100
|
|
807
|
+
*/
|
|
808
|
+
fields?: string[];
|
|
809
|
+
/**
|
|
810
|
+
* Predefined sets of fields to return.
|
|
811
|
+
* If both `fields` and `fieldsets` are sent in the request,
|
|
812
|
+
* the union of both lists is returned.
|
|
813
|
+
*
|
|
814
|
+
* - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
|
|
815
|
+
* - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
|
|
816
|
+
* - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
|
|
817
|
+
* - `FULL`: Returns all fields.
|
|
818
|
+
*
|
|
819
|
+
* Default: If `fields` is omitted from the request, `FULL`.
|
|
820
|
+
* @maxSize 10
|
|
821
|
+
*/
|
|
822
|
+
fieldsets?: ContactFieldSet[];
|
|
823
|
+
}
|
|
824
|
+
/** List of contacts. */
|
|
825
|
+
interface QueryContactsResponse {
|
|
826
|
+
/** List of contacts. */
|
|
827
|
+
contacts?: Contact[];
|
|
828
|
+
/** Details on the paged set of results returned. */
|
|
829
|
+
pagingMetadata?: PagingMetadata;
|
|
830
|
+
}
|
|
831
|
+
interface GetContactRequest {
|
|
832
|
+
/**
|
|
833
|
+
* ID of the contact to retrieve.
|
|
834
|
+
* @format GUID
|
|
835
|
+
*/
|
|
836
|
+
id: string;
|
|
837
|
+
/**
|
|
838
|
+
* List of projected fields to return.
|
|
839
|
+
* If both `fields` and `fieldsets` are sent in the request,
|
|
840
|
+
* the union of both lists is returned.
|
|
841
|
+
* `id` and `revision` are always returned.
|
|
842
|
+
*
|
|
843
|
+
* Supported properties:
|
|
844
|
+
* `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
|
|
845
|
+
* `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
|
|
846
|
+
* `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
|
|
847
|
+
* `info.labelKeys`, `info.locations`, `info.extendedFields`
|
|
848
|
+
* @maxLength 100
|
|
849
|
+
* @maxSize 100
|
|
850
|
+
*/
|
|
851
|
+
fields?: string[];
|
|
852
|
+
/**
|
|
853
|
+
* Predefined sets of fields to return.
|
|
854
|
+
* If both `fields` and `fieldsets` are sent in the request,
|
|
855
|
+
* the union of both lists is returned.
|
|
856
|
+
*
|
|
857
|
+
* - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
|
|
858
|
+
* - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
|
|
859
|
+
* - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
|
|
860
|
+
* - `FULL`: Returns all fields.
|
|
861
|
+
*
|
|
862
|
+
* Default: If `fields` is omitted from the request, `FULL`.
|
|
863
|
+
* @maxSize 10
|
|
864
|
+
*/
|
|
865
|
+
fieldsets?: ContactFieldSet[];
|
|
866
|
+
}
|
|
867
|
+
/** The requested contact. */
|
|
868
|
+
interface GetContactResponse {
|
|
869
|
+
/** The requested contact. */
|
|
870
|
+
contact?: Contact;
|
|
871
|
+
/** Contact response type. */
|
|
872
|
+
responseType?: GetContactResponseType;
|
|
873
|
+
}
|
|
874
|
+
declare enum GetContactResponseType {
|
|
875
|
+
/** The specified contact was returned. */
|
|
876
|
+
REGULAR = "REGULAR",
|
|
877
|
+
/** Not used. */
|
|
878
|
+
IMPLICIT = "IMPLICIT",
|
|
879
|
+
/** The specified contact was previously merged with another contact and the new contact was returned. */
|
|
880
|
+
MERGED = "MERGED"
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
884
|
+
getUrl: (context: any) => string;
|
|
885
|
+
httpMethod: K;
|
|
886
|
+
path: string;
|
|
887
|
+
pathParams: M;
|
|
888
|
+
__requestType: T;
|
|
889
|
+
__originalRequestType: S;
|
|
890
|
+
__responseType: Q;
|
|
891
|
+
__originalResponseType: R;
|
|
892
|
+
};
|
|
893
|
+
declare function createContact(): __PublicMethodMetaInfo<'POST', {}, CreateContactRequest$1, CreateContactRequest, CreateContactResponse$1, CreateContactResponse>;
|
|
894
|
+
declare function updateContact(): __PublicMethodMetaInfo<'PATCH', {
|
|
895
|
+
contactId: string;
|
|
896
|
+
}, UpdateContactRequest$1, UpdateContactRequest, UpdateContactResponse$1, UpdateContactResponse>;
|
|
897
|
+
declare function mergeContacts(): __PublicMethodMetaInfo<'POST', {
|
|
898
|
+
targetContactId: string;
|
|
899
|
+
}, MergeContactsRequest$1, MergeContactsRequest, MergeContactsResponse$1, MergeContactsResponse>;
|
|
900
|
+
declare function deleteContact(): __PublicMethodMetaInfo<'DELETE', {
|
|
901
|
+
contactId: string;
|
|
902
|
+
}, DeleteContactRequest$1, DeleteContactRequest, DeleteContactResponse$1, DeleteContactResponse>;
|
|
903
|
+
declare function labelContact(): __PublicMethodMetaInfo<'POST', {
|
|
904
|
+
contactId: string;
|
|
905
|
+
}, LabelContactRequest$1, LabelContactRequest, LabelContactResponse$1, LabelContactResponse>;
|
|
906
|
+
declare function unlabelContact(): __PublicMethodMetaInfo<'DELETE', {
|
|
907
|
+
contactId: string;
|
|
908
|
+
}, UnlabelContactRequest$1, UnlabelContactRequest, UnlabelContactResponse$1, UnlabelContactResponse>;
|
|
909
|
+
declare function queryContacts(): __PublicMethodMetaInfo<'POST', {}, QueryContactsRequest$1, QueryContactsRequest, QueryContactsResponse$1, QueryContactsResponse>;
|
|
910
|
+
declare function getContact(): __PublicMethodMetaInfo<'GET', {
|
|
911
|
+
id: string;
|
|
912
|
+
}, GetContactRequest$1, GetContactRequest, GetContactResponse$1, GetContactResponse>;
|
|
913
|
+
|
|
914
|
+
export { type __PublicMethodMetaInfo, createContact, deleteContact, getContact, labelContact, mergeContacts, queryContacts, unlabelContact, updateContact };
|