@wix/crm 1.0.169 → 1.0.170

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.
@@ -1,4169 +0,0 @@
1
- interface ContactAttachment$1 extends ContactAttachmentMediaOneOf$1 {
2
- /** Image details when the attachment type is `IMAGE`. */
3
- image?: Image$2;
4
- /** Document details when the attachment type is `OTHER`. */
5
- document?: Document;
6
- /**
7
- * Attachment ID.
8
- * @readonly
9
- */
10
- id?: string;
11
- /**
12
- * Details of the preview image reduced size when the attachment is of type `IMAGE`.
13
- * @readonly
14
- */
15
- previewImage?: Image$2;
16
- /**
17
- * Name of the attachment file.
18
- * @readonly
19
- */
20
- fileName?: string;
21
- /**
22
- * Mime type of the attachment. See supported mime types
23
- * ([REST](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/attachments/attachment-v4/supported-mime-types)|[SDK](https://dev.wix.com/docs/sdk/backend-modules/crm/attachments/supported-mime-types)).
24
- * @readonly
25
- */
26
- mimeType?: string;
27
- /**
28
- * Type of the attachment.
29
- * @readonly
30
- */
31
- attachmentType?: AttachmentType$1;
32
- }
33
- /** @oneof */
34
- interface ContactAttachmentMediaOneOf$1 {
35
- /** Image details when the attachment type is `IMAGE`. */
36
- image?: Image$2;
37
- /** Document details when the attachment type is `OTHER`. */
38
- document?: Document;
39
- }
40
- interface Image$2 {
41
- /** WixMedia image ID. */
42
- id?: string;
43
- /** Image URL. */
44
- url?: string;
45
- /**
46
- * Original image height.
47
- * @readonly
48
- */
49
- height?: number;
50
- /**
51
- * Original image width.
52
- * @readonly
53
- */
54
- width?: number;
55
- /** Image alt text. Optional. */
56
- altText?: string | null;
57
- /**
58
- * Image URL expiration date when relevant.
59
- * @readonly
60
- */
61
- urlExpirationDate?: Date | null;
62
- }
63
- interface Document {
64
- /** WixMedia ID. */
65
- id?: string;
66
- /** Document URL. */
67
- url?: string;
68
- /**
69
- * Document URL expiration date when relevant.
70
- * @readonly
71
- */
72
- urlExpirationDate?: Date | null;
73
- }
74
- declare enum AttachmentType$1 {
75
- /** Unknown attachment type. */
76
- UNKNOWN = "UNKNOWN",
77
- /** Attachment is an image file. */
78
- IMAGE = "IMAGE",
79
- /** Attachment is a document or any non-image file type. */
80
- OTHER = "OTHER"
81
- }
82
- interface GenerateAttachmentUploadUrlRequest$1 {
83
- /** ID of the contact for whom the attachment is being uploaded. */
84
- contactId: string;
85
- /** File name of the attachment including the extension, for example, `contact-cv.pdf`. */
86
- fileName: string;
87
- /**
88
- * Mime type of the attachment file, for example, `application/pdf`.
89
- * See supported mime types ([REST](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/attachments/attachment-v4/supported-mime-types)|
90
- * [SDK](https://dev.wix.com/docs/sdk/backend-modules/crm/attachments/supported-mime-types)).
91
- */
92
- mimeType: string;
93
- }
94
- interface GenerateAttachmentUploadUrlResponse$1 {
95
- /** The URL for uploading a file as an attachment to the contact. */
96
- uploadUrl?: string;
97
- }
98
- interface ListAttachmentsRequest$1 {
99
- /** Contact ID for the attachments to be listed. */
100
- contactId: string;
101
- /** Allow paginating, default: limit = 100 and offset = 0 */
102
- paging?: Paging$7;
103
- }
104
- interface Paging$7 {
105
- /**
106
- * Number of items to return.
107
- *
108
- * Default: `100`
109
- * Max: `100`
110
- */
111
- limit?: number | null;
112
- /** Number of items to skip in the current sort order. */
113
- offset?: number | null;
114
- }
115
- interface ListAttachmentsResponse$1 {
116
- /** List of attachments for the specified contact. */
117
- attachments?: ContactAttachment$1[];
118
- /** Metadata for the paginated results. */
119
- metadata?: PagingMetadata$7;
120
- }
121
- interface PagingMetadata$7 {
122
- /** Number of items returned in the response. */
123
- count?: number | null;
124
- /** Offset that was requested. */
125
- offset?: number | null;
126
- /** Total number of items that match the query. */
127
- total?: number | null;
128
- /** Whether the server failed to calculate the `total` field. */
129
- tooManyToCount?: boolean | null;
130
- }
131
- interface DeleteAttachmentRequest$1 {
132
- /** Contact ID for the attachment to delete. */
133
- contactId: string;
134
- /** Attachment ID to delete. */
135
- attachmentId: string;
136
- }
137
- interface DeleteAttachmentResponse$1 {
138
- }
139
- interface GetAttachmentRequest$1 {
140
- /** Contact ID for the attachment to retrieve. */
141
- contactId: string;
142
- /** Attachment ID to retrieve. */
143
- attachmentId: string;
144
- }
145
- interface GetAttachmentResponse$1 {
146
- /** The requested attachment. */
147
- attachment?: ContactAttachment$1;
148
- }
149
- interface GenerateAttachmentUploadUrlResponseNonNullableFields$1 {
150
- uploadUrl: string;
151
- uploadId: string;
152
- }
153
- interface ImageNonNullableFields$1 {
154
- id: string;
155
- url: string;
156
- height: number;
157
- width: number;
158
- }
159
- interface DocumentNonNullableFields {
160
- id: string;
161
- url: string;
162
- }
163
- interface ContactAttachmentNonNullableFields$1 {
164
- image?: ImageNonNullableFields$1;
165
- document?: DocumentNonNullableFields;
166
- id: string;
167
- previewImage?: ImageNonNullableFields$1;
168
- fileName: string;
169
- mimeType: string;
170
- attachmentType: AttachmentType$1;
171
- mediaPath: string;
172
- }
173
- interface ListAttachmentsResponseNonNullableFields$1 {
174
- attachments: ContactAttachmentNonNullableFields$1[];
175
- }
176
- interface GetAttachmentResponseNonNullableFields$1 {
177
- attachment?: ContactAttachmentNonNullableFields$1;
178
- }
179
-
180
- interface ContactAttachment extends ContactAttachmentMediaOneOf {
181
- /** Image details when the attachment type is `IMAGE`. */
182
- image?: string;
183
- /** Document details when the attachment type is `OTHER`. */
184
- document?: string;
185
- /**
186
- * Attachment ID.
187
- * @readonly
188
- */
189
- _id?: string;
190
- /**
191
- * Details of the preview image reduced size when the attachment is of type `IMAGE`.
192
- * @readonly
193
- */
194
- previewImage?: string;
195
- /**
196
- * Name of the attachment file.
197
- * @readonly
198
- */
199
- fileName?: string;
200
- /**
201
- * Mime type of the attachment. See supported mime types
202
- * ([REST](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/attachments/attachment-v4/supported-mime-types)|[SDK](https://dev.wix.com/docs/sdk/backend-modules/crm/attachments/supported-mime-types)).
203
- * @readonly
204
- */
205
- mimeType?: string;
206
- /**
207
- * Type of the attachment.
208
- * @readonly
209
- */
210
- attachmentType?: AttachmentType;
211
- }
212
- /** @oneof */
213
- interface ContactAttachmentMediaOneOf {
214
- /** Image details when the attachment type is `IMAGE`. */
215
- image?: string;
216
- /** Document details when the attachment type is `OTHER`. */
217
- document?: string;
218
- }
219
- declare enum AttachmentType {
220
- /** Unknown attachment type. */
221
- UNKNOWN = "UNKNOWN",
222
- /** Attachment is an image file. */
223
- IMAGE = "IMAGE",
224
- /** Attachment is a document or any non-image file type. */
225
- OTHER = "OTHER"
226
- }
227
- interface GenerateAttachmentUploadUrlRequest {
228
- /** ID of the contact for whom the attachment is being uploaded. */
229
- contactId: string;
230
- /** File name of the attachment including the extension, for example, `contact-cv.pdf`. */
231
- fileName: string;
232
- /**
233
- * Mime type of the attachment file, for example, `application/pdf`.
234
- * See supported mime types ([REST](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/attachments/attachment-v4/supported-mime-types)|
235
- * [SDK](https://dev.wix.com/docs/sdk/backend-modules/crm/attachments/supported-mime-types)).
236
- */
237
- mimeType: string;
238
- }
239
- interface GenerateAttachmentUploadUrlResponse {
240
- /** The URL for uploading a file as an attachment to the contact. */
241
- uploadUrl?: string;
242
- }
243
- interface ListAttachmentsRequest {
244
- /** Contact ID for the attachments to be listed. */
245
- contactId: string;
246
- /** Allow paginating, default: limit = 100 and offset = 0 */
247
- paging?: Paging$6;
248
- }
249
- interface Paging$6 {
250
- /**
251
- * Number of items to return.
252
- *
253
- * Default: `100`
254
- * Max: `100`
255
- */
256
- limit?: number | null;
257
- /** Number of items to skip in the current sort order. */
258
- offset?: number | null;
259
- }
260
- interface ListAttachmentsResponse {
261
- /** List of attachments for the specified contact. */
262
- attachments?: ContactAttachment[];
263
- /** Metadata for the paginated results. */
264
- metadata?: PagingMetadata$6;
265
- }
266
- interface PagingMetadata$6 {
267
- /** Number of items returned in the response. */
268
- count?: number | null;
269
- /** Offset that was requested. */
270
- offset?: number | null;
271
- /** Total number of items that match the query. */
272
- total?: number | null;
273
- /** Whether the server failed to calculate the `total` field. */
274
- tooManyToCount?: boolean | null;
275
- }
276
- interface DeleteAttachmentRequest {
277
- /** Contact ID for the attachment to delete. */
278
- contactId: string;
279
- /** Attachment ID to delete. */
280
- attachmentId: string;
281
- }
282
- interface DeleteAttachmentResponse {
283
- }
284
- interface GetAttachmentRequest {
285
- /** Contact ID for the attachment to retrieve. */
286
- contactId: string;
287
- /** Attachment ID to retrieve. */
288
- attachmentId: string;
289
- }
290
- interface GetAttachmentResponse {
291
- /** The requested attachment. */
292
- attachment?: ContactAttachment;
293
- }
294
- interface GenerateAttachmentUploadUrlResponseNonNullableFields {
295
- uploadUrl: string;
296
- uploadId: string;
297
- }
298
- interface ContactAttachmentNonNullableFields {
299
- image: string;
300
- document: string;
301
- _id: string;
302
- previewImage: string;
303
- fileName: string;
304
- mimeType: string;
305
- attachmentType: AttachmentType;
306
- mediaPath: string;
307
- }
308
- interface ListAttachmentsResponseNonNullableFields {
309
- attachments: ContactAttachmentNonNullableFields[];
310
- }
311
- interface GetAttachmentResponseNonNullableFields {
312
- attachment?: ContactAttachmentNonNullableFields;
313
- }
314
-
315
- type __PublicMethodMetaInfo$5<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
316
- getUrl: (context: any) => string;
317
- httpMethod: K;
318
- path: string;
319
- pathParams: M;
320
- __requestType: T;
321
- __originalRequestType: S;
322
- __responseType: Q;
323
- __originalResponseType: R;
324
- };
325
- declare function generateAttachmentUploadUrl(): __PublicMethodMetaInfo$5<'POST', {
326
- contactId: string;
327
- }, GenerateAttachmentUploadUrlRequest, GenerateAttachmentUploadUrlRequest$1, GenerateAttachmentUploadUrlResponse & GenerateAttachmentUploadUrlResponseNonNullableFields, GenerateAttachmentUploadUrlResponse$1 & GenerateAttachmentUploadUrlResponseNonNullableFields$1>;
328
- declare function listAttachments(): __PublicMethodMetaInfo$5<'GET', {
329
- contactId: string;
330
- }, ListAttachmentsRequest, ListAttachmentsRequest$1, ListAttachmentsResponse & ListAttachmentsResponseNonNullableFields, ListAttachmentsResponse$1 & ListAttachmentsResponseNonNullableFields$1>;
331
- declare function deleteAttachment(): __PublicMethodMetaInfo$5<'DELETE', {
332
- contactId: string;
333
- attachmentId: string;
334
- }, DeleteAttachmentRequest, DeleteAttachmentRequest$1, DeleteAttachmentResponse, DeleteAttachmentResponse$1>;
335
- declare function getAttachment(): __PublicMethodMetaInfo$5<'GET', {
336
- contactId: string;
337
- attachmentId: string;
338
- }, GetAttachmentRequest, GetAttachmentRequest$1, GetAttachmentResponse & GetAttachmentResponseNonNullableFields, GetAttachmentResponse$1 & GetAttachmentResponseNonNullableFields$1>;
339
-
340
- declare const meta$5_deleteAttachment: typeof deleteAttachment;
341
- declare const meta$5_generateAttachmentUploadUrl: typeof generateAttachmentUploadUrl;
342
- declare const meta$5_getAttachment: typeof getAttachment;
343
- declare const meta$5_listAttachments: typeof listAttachments;
344
- declare namespace meta$5 {
345
- export { type __PublicMethodMetaInfo$5 as __PublicMethodMetaInfo, meta$5_deleteAttachment as deleteAttachment, meta$5_generateAttachmentUploadUrl as generateAttachmentUploadUrl, meta$5_getAttachment as getAttachment, meta$5_listAttachments as listAttachments };
346
- }
347
-
348
- interface Contact$1 {
349
- /**
350
- * Contact ID.
351
- * @readonly
352
- */
353
- id?: string;
354
- /**
355
- * Revision number, which increments by 1 each time the contact is updated.
356
- * To prevent conflicting changes,
357
- * the existing `revision` must be specified when updating a contact.
358
- * @readonly
359
- */
360
- revision?: number;
361
- /**
362
- * Details about the contact's source.
363
- * @readonly
364
- */
365
- source?: ContactSource$1;
366
- /**
367
- * Date and time the contact was created.
368
- * @readonly
369
- */
370
- createdDate?: Date | null;
371
- /**
372
- * Date and time the contact was last updated.
373
- * @readonly
374
- */
375
- updatedDate?: Date | null;
376
- /**
377
- * Details about the contact's last action in the site.
378
- * @readonly
379
- */
380
- lastActivity?: ContactActivity$1;
381
- /**
382
- * Contact's primary phone and email.
383
- * @readonly
384
- */
385
- primaryInfo?: PrimaryContactInfo$1;
386
- /** Contact's details. */
387
- info?: ContactInfo$5;
388
- }
389
- interface ContactSource$1 {
390
- /**
391
- * Source type.
392
- * @readonly
393
- */
394
- sourceType?: ContactSourceType$1;
395
- /**
396
- * App ID, if the contact was created by an app.
397
- * @readonly
398
- */
399
- appId?: string | null;
400
- }
401
- declare enum ContactSourceType$1 {
402
- OTHER = "OTHER",
403
- ADMIN = "ADMIN",
404
- WIX_APP = "WIX_APP",
405
- IMPORT = "IMPORT",
406
- THIRD_PARTY = "THIRD_PARTY",
407
- WIX_BOOKINGS = "WIX_BOOKINGS",
408
- WIX_CHAT = "WIX_CHAT",
409
- WIX_EMAIL_MARKETING = "WIX_EMAIL_MARKETING",
410
- WIX_EVENTS = "WIX_EVENTS",
411
- WIX_FORMS = "WIX_FORMS",
412
- WIX_GROUPS = "WIX_GROUPS",
413
- WIX_HOTELS = "WIX_HOTELS",
414
- WIX_MARKET_PLACE = "WIX_MARKET_PLACE",
415
- WIX_MUSIC = "WIX_MUSIC",
416
- WIX_RESTAURANTS = "WIX_RESTAURANTS",
417
- WIX_SITE_MEMBERS = "WIX_SITE_MEMBERS",
418
- WIX_STORES = "WIX_STORES",
419
- WIX_CODE = "WIX_CODE",
420
- HOPP = "HOPP"
421
- }
422
- interface ContactActivity$1 {
423
- /** Date and time of the last action. */
424
- activityDate?: Date | null;
425
- /** Contact's last action in the site. */
426
- activityType?: ContactActivityType$1;
427
- }
428
- declare enum ContactActivityType$1 {
429
- /** Visited the site. */
430
- GENERAL = "GENERAL",
431
- /** Became a new contact. */
432
- CONTACT_CREATED = "CONTACT_CREATED",
433
- /** Logged in. */
434
- MEMBER_LOGIN = "MEMBER_LOGIN",
435
- /** Requested a site membership. */
436
- MEMBER_REGISTER = "MEMBER_REGISTER",
437
- /** Was approved, blocked, or unblocked. */
438
- MEMBER_STATUS_CHANGED = "MEMBER_STATUS_CHANGED",
439
- /** Submitted a form. */
440
- FORM_SUBMITTED = "FORM_SUBMITTED",
441
- /** Started a chat. */
442
- INBOX_FORM_SUBMITTED = "INBOX_FORM_SUBMITTED",
443
- /** Paid a payment request. */
444
- INBOX_PAYMENT_REQUEST_PAID = "INBOX_PAYMENT_REQUEST_PAID",
445
- /** Received a message from the site. */
446
- INBOX_MESSAGE_TO_CUSTOMER = "INBOX_MESSAGE_TO_CUSTOMER",
447
- /** Sent a new message to the site. */
448
- INBOX_MESSAGE_FROM_CUSTOMER = "INBOX_MESSAGE_FROM_CUSTOMER",
449
- /** Subscribed to a site newsletter through a form. */
450
- NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED = "NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED",
451
- /** Unsubscribed from a site newsletter. */
452
- NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE = "NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE",
453
- /** Made a purchase. */
454
- ECOM_PURCHASE = "ECOM_PURCHASE",
455
- /** Abandoned a shopping cart. */
456
- ECOM_CART_ABANDON = "ECOM_CART_ABANDON",
457
- /** Checked out shopping cart and submitted buyer info (but didn’t complete the purchase yet). */
458
- ECOM_CHECKOUT_BUYER = "ECOM_CHECKOUT_BUYER",
459
- /** Booked an appointment. */
460
- BOOKINGS_APPOINTMENT = "BOOKINGS_APPOINTMENT",
461
- /** Made a Wix Hotels reservation. */
462
- HOTELS_RESERVATION = "HOTELS_RESERVATION",
463
- /** Paid for a Wix Hotels reservation. */
464
- HOTELS_PURCHASE = "HOTELS_PURCHASE",
465
- /** Confirmed a Wix Hotels reservation. */
466
- HOTELS_CONFIRMATION = "HOTELS_CONFIRMATION",
467
- /** Canceled a Wix Hotels reservation. */
468
- HOTELS_CANCEL = "HOTELS_CANCEL",
469
- /** Purchased a video. */
470
- VIDEO_PURCHASE = "VIDEO_PURCHASE",
471
- /** Rented a video. */
472
- VIDEO_RENT = "VIDEO_RENT",
473
- /** Made a purchase with a pay button. */
474
- CASHIER_BUTTON_PURCHASE = "CASHIER_BUTTON_PURCHASE",
475
- /** Became a new Wix Marketplace lead. */
476
- ARENA_NEW_LEAD = "ARENA_NEW_LEAD",
477
- /** RSVP'd to an event. */
478
- EVENTS_RSVP = "EVENTS_RSVP",
479
- /** Paid an invoice. */
480
- INVOICE_PAY = "INVOICE_PAY",
481
- /** An invoice is now overdue. */
482
- INVOICE_OVERDUE = "INVOICE_OVERDUE",
483
- /** Accepted a price quote. */
484
- PRICE_QUOTE_ACCEPT = "PRICE_QUOTE_ACCEPT",
485
- /** A price quote has expired. */
486
- PRICE_QUOTE_EXPIRE = "PRICE_QUOTE_EXPIRE",
487
- /** Ordered food with Wix Restaurants. */
488
- RESTAURANTS_ORDER = "RESTAURANTS_ORDER",
489
- /** Made a Wix Restaurants reservation. */
490
- RESTAURANTS_RESERVATION = "RESTAURANTS_RESERVATION",
491
- /** Opened an email from the site. */
492
- SHOUTOUT_OPEN = "SHOUTOUT_OPEN",
493
- /** Clicked a link in an email from the site. */
494
- SHOUTOUT_CLICK = "SHOUTOUT_CLICK",
495
- /** Merged with another contact. */
496
- CONTACT_MERGED = "CONTACT_MERGED",
497
- /** Subscribed to a site newsletter. */
498
- NEWSLETTER_SUBSCRIPTION_SUBSCRIBE = "NEWSLETTER_SUBSCRIPTION_SUBSCRIBE",
499
- /** Subscription status to site newsletters is pending confirmation. */
500
- NEWSLETTER_SUBSCRIPTION_PENDING = "NEWSLETTER_SUBSCRIPTION_PENDING",
501
- /** Subscription status to site newsletters is not set. */
502
- NEWSLETTER_SUBSCRIPTION_NOT_SET = "NEWSLETTER_SUBSCRIPTION_NOT_SET",
503
- /** Subscribed to phone notifications. */
504
- PHONE_SUBSCRIPTION_SUBSCRIBE = "PHONE_SUBSCRIPTION_SUBSCRIBE",
505
- /** Subscription to phone notificatons is pending confirmation. */
506
- PHONE_SUBSCRIPTION_PENDING = "PHONE_SUBSCRIPTION_PENDING",
507
- /** Subscription to phone notificatons is not set. */
508
- PHONE_SUBSCRIPTION_NOT_SET = "PHONE_SUBSCRIPTION_NOT_SET",
509
- /** Subscribed to phone notifications. */
510
- PHONE_SUBSCRIPTION_UNSUBSCRIBE = "PHONE_SUBSCRIPTION_UNSUBSCRIBE"
511
- }
512
- interface PrimaryContactInfo$1 {
513
- /**
514
- * Primary email address.
515
- *
516
- * This property reflects the email address in `info.emails`
517
- * where `primary` is `true`.
518
- * @readonly
519
- */
520
- email?: string | null;
521
- /**
522
- * Primary phone number.
523
- *
524
- * This property reflects the phone number in `info.phones`
525
- * where `primary` is `true`.
526
- * @readonly
527
- */
528
- phone?: string | null;
529
- }
530
- interface Image$1 {
531
- /**
532
- * WixMedia image ID.
533
- * This property is written by Wix when an image is uploaded to the Wix Media Manager.
534
- */
535
- id?: string;
536
- /** Image source: Either a Media Manager URL or external URL. */
537
- url?: string;
538
- /** Height of the original image. */
539
- height?: number;
540
- /** Width of the original image. */
541
- width?: number;
542
- /** Image alt text (optional). */
543
- altText?: string | null;
544
- /**
545
- * Image URL expiration date (optional).
546
- * @readonly
547
- */
548
- urlExpirationDate?: Date | null;
549
- }
550
- interface ContactInfo$5 {
551
- /** Contact's first and last name. */
552
- name?: ContactName$3;
553
- /** Contact's email addresses. */
554
- emails?: ContactEmailsWrapper$3;
555
- /** Contact's phone numbers. */
556
- phones?: ContactPhonesWrapper$3;
557
- /** Contact's street addresses. */
558
- addresses?: ContactAddressesWrapper$3;
559
- /** Contact's company name. */
560
- company?: string | null;
561
- /** Contact's job title. */
562
- jobTitle?: string | null;
563
- /** Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`. */
564
- birthdate?: string | null;
565
- /**
566
- * Locale in
567
- * [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
568
- * Typically, this is a lowercase 2-letter language code,
569
- * followed by a hyphen, followed by an uppercase 2-letter country code.
570
- * For example, `en-US` for U.S. English, and `de-DE` for Germany German.
571
- */
572
- locale?: string | null;
573
- /**
574
- * List of contact's labels.
575
- *
576
- * Labels are used to organize contacts. Labels can be
577
- * added and removed using Label Contact and Unlabel Contact, respectively.
578
- *
579
- * To view or manage contact labels, use the Labels API.
580
- */
581
- labelKeys?: LabelsWrapper$3;
582
- /**
583
- * Additional custom fields.
584
- *
585
- * Empty fields are not returned.
586
- */
587
- extendedFields?: ExtendedFieldsWrapper$3;
588
- /** Contact's profile picture. */
589
- picture?: ContactPicture$3;
590
- }
591
- interface ContactName$3 {
592
- /** Contact's first name. */
593
- first?: string | null;
594
- /** Contact's last name. */
595
- last?: string | null;
596
- }
597
- interface ContactEmailsWrapper$3 {
598
- /** List of up to 50 email addresses. */
599
- items?: ContactEmail$3[];
600
- }
601
- interface ContactEmail$3 {
602
- /**
603
- * Email ID.
604
- * @readonly
605
- */
606
- id?: string | null;
607
- /**
608
- * Email type.
609
- *
610
- * `UNTAGGED` is shown as "Other" in the Contact List.
611
- */
612
- tag?: EmailTag$3;
613
- /** Email address. */
614
- email?: string;
615
- /**
616
- * Indicates whether this is the contact's primary email address.
617
- * When changing `primary` to `true` for an email,
618
- * the contact's other emails become `false`.
619
- * Changing the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email.
620
- */
621
- primary?: boolean | null;
622
- }
623
- declare enum EmailTag$3 {
624
- UNTAGGED = "UNTAGGED",
625
- MAIN = "MAIN",
626
- HOME = "HOME",
627
- WORK = "WORK"
628
- }
629
- interface ContactPhonesWrapper$3 {
630
- /** List of up to 50 phone numbers. */
631
- items?: ContactPhone$3[];
632
- }
633
- interface ContactPhone$3 {
634
- /**
635
- * Phone ID.
636
- * @readonly
637
- */
638
- id?: string | null;
639
- /**
640
- * Phone type.
641
- *
642
- * `UNTAGGED` is shown as "Other" in the Contact List.
643
- */
644
- tag?: PhoneTag$3;
645
- /** [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. */
646
- countryCode?: string | null;
647
- /** Phone number. */
648
- phone?: string;
649
- /**
650
- * [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)
651
- * phone number.
652
- * Automatically generated using `phone` and `countryCode`, pending both values are valid.
653
- * @readonly
654
- */
655
- e164Phone?: string | null;
656
- /**
657
- * Indicates whether this is the contact's primary phone number.
658
- * When changing `primary` to `true` for a phone,
659
- * the contact's `primary` field for other phones becomes `false`.
660
- * Changing the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone.
661
- */
662
- primary?: boolean | null;
663
- }
664
- declare enum PhoneTag$3 {
665
- UNTAGGED = "UNTAGGED",
666
- MAIN = "MAIN",
667
- HOME = "HOME",
668
- MOBILE = "MOBILE",
669
- WORK = "WORK",
670
- FAX = "FAX"
671
- }
672
- interface ContactAddressesWrapper$3 {
673
- /** List of up to 50 addresses. */
674
- items?: ContactAddress$3[];
675
- }
676
- interface ContactAddress$3 {
677
- /**
678
- * Street address ID.
679
- * @readonly
680
- */
681
- id?: string | null;
682
- /**
683
- * Address type.
684
- * `UNTAGGED` is shown as "Other" in the Contact List.
685
- */
686
- tag?: AddressTag$3;
687
- /** Street address. */
688
- address?: Address$3;
689
- }
690
- declare enum AddressTag$3 {
691
- UNTAGGED = "UNTAGGED",
692
- HOME = "HOME",
693
- WORK = "WORK",
694
- BILLING = "BILLING",
695
- SHIPPING = "SHIPPING"
696
- }
697
- /** Physical address */
698
- interface Address$3 extends AddressStreetOneOf$3 {
699
- /** Street address object, with number and name in separate fields. */
700
- streetAddress?: StreetAddress$3;
701
- /** Main address line, usually street and number, as free text. */
702
- addressLine?: string | null;
703
- /**
704
- * 2-letter country code in an
705
- * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
706
- */
707
- country?: string | null;
708
- /**
709
- * Code for a subdivision (such as state, prefecture, or province) in an
710
- * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
711
- */
712
- subdivision?: string | null;
713
- /** City name. */
714
- city?: string | null;
715
- /** Postal or zip code. */
716
- postalCode?: string | null;
717
- /**
718
- * Free text providing more detailed address information,
719
- * such as apartment, suite, or floor.
720
- */
721
- addressLine2?: string | null;
722
- }
723
- /** @oneof */
724
- interface AddressStreetOneOf$3 {
725
- /** Street address object, with number and name in separate fields. */
726
- streetAddress?: StreetAddress$3;
727
- /** Main address line, usually street and number, as free text. */
728
- addressLine?: string | null;
729
- }
730
- interface StreetAddress$3 {
731
- /** Street number. */
732
- number?: string;
733
- /** Street name. */
734
- name?: string;
735
- }
736
- declare enum SubdivisionType {
737
- UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
738
- /** State */
739
- ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
740
- /** County */
741
- ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
742
- /** City/town */
743
- ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
744
- /** Neighborhood/quarter */
745
- ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
746
- /** Street/block */
747
- ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
748
- /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
749
- COUNTRY = "COUNTRY"
750
- }
751
- interface LabelsWrapper$3 {
752
- /**
753
- * List of contact label keys.
754
- *
755
- * Contact labels help categorize contacts. Label keys must exist to be added to the contact.
756
- * Contact labels can be created or retrieved with Find or Create Label or List Labels.
757
- */
758
- items?: string[];
759
- }
760
- interface ExtendedFieldsWrapper$3 {
761
- /**
762
- * Contact's extended fields,
763
- * where each key is the field key,
764
- * and each value is the field's value for the contact.
765
- *
766
- * To view and manage extended fields, use the Extended Fields API.
767
- */
768
- items?: Record<string, any>;
769
- }
770
- /** TEST contact picture description */
771
- interface ContactPicture$3 {
772
- /**
773
- * Image.
774
- * This can contain an image URL or a Wix Media image ID.
775
- */
776
- image?: Image$1;
777
- }
778
- declare enum ImageProvider$1 {
779
- UNKNOWN = "UNKNOWN",
780
- /** Image stored outside Wix */
781
- EXTERNAL = "EXTERNAL",
782
- /** Stored in wix media platform, Must be uploaded by using `GeneratePictureUploadUrl` */
783
- WIX_MEDIA = "WIX_MEDIA"
784
- }
785
- declare enum SubscriptionStatus$1 {
786
- NO_SUBSCRIPTION_STATUS = "NO_SUBSCRIPTION_STATUS",
787
- NOT_SET = "NOT_SET",
788
- PENDING = "PENDING",
789
- SUBSCRIBED = "SUBSCRIBED",
790
- UNSUBSCRIBED = "UNSUBSCRIBED"
791
- }
792
- declare enum EmailDeliverabilityStatus$1 {
793
- NOT_SET = "NOT_SET",
794
- VALID = "VALID",
795
- BOUNCED = "BOUNCED",
796
- SPAM_COMPLAINT = "SPAM_COMPLAINT",
797
- INACTIVE = "INACTIVE"
798
- }
799
- declare enum PhoneDeliverabilityStatus$1 {
800
- NO_PHONE_DELIVERABILITY_STATUS = "NO_PHONE_DELIVERABILITY_STATUS",
801
- NOT_SET = "NOT_SET"
802
- }
803
- declare enum MemberStatus$1 {
804
- PENDING = "PENDING",
805
- ACTIVE = "ACTIVE",
806
- DELETED = "DELETED",
807
- BLOCKED = "BLOCKED",
808
- OFFLINE = "OFFLINE"
809
- }
810
- declare enum PrivacyStatus$1 {
811
- PRIVATE = "PRIVATE",
812
- PUBLIC = "PUBLIC"
813
- }
814
- declare enum Role$1 {
815
- UNSPECIFIED_ROLE = "UNSPECIFIED_ROLE",
816
- OWNER = "OWNER",
817
- CONTRIBUTOR = "CONTRIBUTOR"
818
- }
819
- /** Contact creation options. */
820
- interface CreateContactRequest$1 {
821
- /** Contact info. */
822
- info: ContactInfo$5;
823
- /**
824
- * Controls whether the call will succeed
825
- * if the new contact information contains an email or a phone number already used by another contact.
826
- *
827
- * If set to `true`,
828
- * the call will succeed even if an email address or phone number is used by another contact.
829
- * If set to `false`,
830
- * the call will fail if the given email address is used by another contact or,
831
- * if the email address is not given and the given phone number is used by another contact.
832
- *
833
- * Default: `false`
834
- */
835
- allowDuplicates?: boolean;
836
- }
837
- /** Contact. */
838
- interface CreateContactResponse$1 {
839
- /** Contact. */
840
- contact?: Contact$1;
841
- }
842
- interface UpdateContactRequest$1 {
843
- /** ID of the contact to update. */
844
- contactId: string;
845
- /**
846
- * Revision number.
847
- * When updating, include the existing `revision`
848
- * to prevent conflicting updates.
849
- */
850
- revision: number | null;
851
- /**
852
- * Controls whether the call will succeed
853
- * if the new contact information contains an email or a phone number already used by another contact.
854
- *
855
- * If set to `true`,
856
- * the call will succeed even if an email address or phone number is used by another contact.
857
- * If set to `false`,
858
- * the call will fail if the given email address is used by another contact or,
859
- * if the email address is not given and the given phone number is used by another contact.
860
- *
861
- * Default: `false`
862
- */
863
- allowDuplicates?: boolean;
864
- /** Contact info. */
865
- info: ContactInfo$5;
866
- }
867
- /** Updated contact. */
868
- interface UpdateContactResponse$1 {
869
- /** Updated contact. */
870
- contact?: Contact$1;
871
- }
872
- interface MergeContactsRequest$1 {
873
- /** Target contact ID. */
874
- targetContactId: string;
875
- /**
876
- * Target contact revision number, which increments by 1 each time the contact is updated.
877
- * To prevent conflicting changes,
878
- * the target contact's current `revision` must be specified.
879
- */
880
- targetContactRevision: number | null;
881
- /**
882
- * IDs of up to 5 contacts to merge into the target contact.
883
- * When you merge more than one source contact,
884
- * the first source is given precedence, then the second, and so on.
885
- */
886
- sourceContactIds?: string[];
887
- }
888
- interface MergeContactsResponse$1 {
889
- /** Updated target contact. */
890
- contact?: Contact$1;
891
- }
892
- interface DeleteContactRequest$1 {
893
- /** ID of the contact to delete. */
894
- contactId: string;
895
- }
896
- interface DeleteContactResponse$1 {
897
- }
898
- interface LabelContactRequest$1 {
899
- /** ID of the contact to add labels to. */
900
- contactId: string;
901
- /**
902
- * List of label keys to add to the contact.
903
- *
904
- * Label keys must exist to be added to the contact.
905
- * Use the Labels API to create or retrieve labels.
906
- */
907
- labelKeys: string[];
908
- }
909
- /** Updated contact. */
910
- interface LabelContactResponse$1 {
911
- /** Updated contact. */
912
- contact?: Contact$1;
913
- }
914
- interface UnlabelContactRequest$1 {
915
- /** ID of the contact to remove labels from. */
916
- contactId: string;
917
- /** List of label keys to remove from the contact. */
918
- labelKeys: string[];
919
- }
920
- /** Updated contact. */
921
- interface UnlabelContactResponse$1 {
922
- /** Updated contact. */
923
- contact?: Contact$1;
924
- }
925
- interface Sorting$7 {
926
- /**
927
- * Field to sort by.
928
- *
929
- * Supported properties:
930
- * `createdDate`, `lastActivity.activityDate`, `primaryInfo.email`, `info.name.first`, `info.name.last`, `info.company`,
931
- * `info.jobTitle`, `info.birthdate`
932
- */
933
- fieldName?: string;
934
- /**
935
- * Sort order.
936
- * Use `ASC` for ascending order or `DESC` for descending order.
937
- *
938
- * Defaults to `ASC`.
939
- */
940
- order?: SortOrder$7;
941
- }
942
- declare enum SortOrder$7 {
943
- ASC = "ASC",
944
- DESC = "DESC"
945
- }
946
- interface Paging$5 {
947
- /**
948
- * 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).
949
- *
950
- * Default: `50`. <br>
951
- * Maximum: `1000`.
952
- */
953
- limit?: number | null;
954
- /** Number of items to skip in the current sort order. */
955
- offset?: number | null;
956
- }
957
- declare enum ContactFieldSet$1 {
958
- /** name, primaryEmail, primaryPhone */
959
- BASIC = "BASIC",
960
- /** name, phones, emails, addresses */
961
- COMMUNICATION_DETAILS = "COMMUNICATION_DETAILS",
962
- /** name, primaryInfo(email, phone), extendedFields */
963
- EXTENDED = "EXTENDED",
964
- /** Full contact object */
965
- FULL = "FULL"
966
- }
967
- interface PagingMetadata$5 {
968
- /** The number of items returned in this response. */
969
- count?: number | null;
970
- /** The offset which was requested. */
971
- offset?: number | null;
972
- /** The total number of items that match the query. */
973
- total?: number | null;
974
- /** A flag that indicates the server failed to calculate 'total' field. */
975
- tooManyToCount?: boolean | null;
976
- }
977
- interface QueryContactsRequest$1 {
978
- /**
979
- * Plain text search for an exact match.
980
- *
981
- * Supported properties:
982
- * `info.name.first`, `info.name.last`, `info.emails.email`, `info.phones.phone`
983
- *
984
- * Max: 100 characters
985
- */
986
- search?: string | null;
987
- /** Query options. */
988
- query?: Query$5;
989
- }
990
- interface Query$5 {
991
- /**
992
- * Filter object.
993
- * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
994
- * for more information.
995
- *
996
- * For a detailed list of supported filters, see
997
- * [Supported Filters](https://dev.wix.com/api/rest/contacts/contacts/supported-filters).
998
- */
999
- filter?: Record<string, any> | null;
1000
- /**
1001
- * Sorting options.
1002
- * See [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination)
1003
- * for more information.
1004
- *
1005
- * Max: 1 sort object
1006
- */
1007
- sort?: Sorting$7[];
1008
- /** Pagination options. */
1009
- paging?: Paging$5;
1010
- /**
1011
- * List of projected fields to return.
1012
- * If both `fields` and `fieldsets` are sent in the request,
1013
- * the union of both lists is returned.
1014
- * `id` and `revision` are always returned.
1015
- *
1016
- * Supported properties:
1017
- * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
1018
- * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
1019
- * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
1020
- * `info.labelKeys`, `info.locations`, `info.extendedFields`
1021
- */
1022
- fields?: string[];
1023
- /**
1024
- * Predefined sets of fields to return.
1025
- * If both `fields` and `fieldsets` are sent in the request,
1026
- * the union of both lists is returned.
1027
- *
1028
- * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
1029
- * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
1030
- * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
1031
- * - `FULL`: Returns all fields.
1032
- *
1033
- * Default: If `fields` is omitted from the request, `FULL`.
1034
- */
1035
- fieldsets?: ContactFieldSet$1[];
1036
- }
1037
- /** List of contacts. */
1038
- interface QueryContactsResponse$1 {
1039
- /** List of contacts. */
1040
- contacts?: Contact$1[];
1041
- /** Details on the paged set of results returned. */
1042
- pagingMetadata?: PagingMetadata$5;
1043
- }
1044
- interface GetContactRequest$1 {
1045
- /** ID of the contact to retrieve. */
1046
- id: string;
1047
- /**
1048
- * List of projected fields to return.
1049
- * If both `fields` and `fieldsets` are sent in the request,
1050
- * the union of both lists is returned.
1051
- * `id` and `revision` are always returned.
1052
- *
1053
- * Supported properties:
1054
- * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
1055
- * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
1056
- * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
1057
- * `info.labelKeys`, `info.locations`, `info.extendedFields`
1058
- */
1059
- fields?: string[];
1060
- /**
1061
- * Predefined sets of fields to return.
1062
- * If both `fields` and `fieldsets` are sent in the request,
1063
- * the union of both lists is returned.
1064
- *
1065
- * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
1066
- * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
1067
- * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
1068
- * - `FULL`: Returns all fields.
1069
- *
1070
- * Default: If `fields` is omitted from the request, `FULL`.
1071
- */
1072
- fieldsets?: ContactFieldSet$1[];
1073
- }
1074
- /** The requested contact. */
1075
- interface GetContactResponse$1 {
1076
- /** The requested contact. */
1077
- contact?: Contact$1;
1078
- /** Contact response type. */
1079
- responseType?: GetContactResponseType$1;
1080
- }
1081
- declare enum GetContactResponseType$1 {
1082
- /** The specified contact was returned. */
1083
- REGULAR = "REGULAR",
1084
- /** Not used. */
1085
- IMPLICIT = "IMPLICIT",
1086
- /** The specified contact was previously merged with another contact and the new contact was returned. */
1087
- MERGED = "MERGED"
1088
- }
1089
- interface ContactSourceNonNullableFields$1 {
1090
- sourceType: ContactSourceType$1;
1091
- }
1092
- interface ContactActivityNonNullableFields$1 {
1093
- activityType: ContactActivityType$1;
1094
- }
1095
- interface ImageNonNullableFields {
1096
- id: string;
1097
- url: string;
1098
- height: number;
1099
- width: number;
1100
- }
1101
- interface ContactEmailNonNullableFields$1 {
1102
- tag: EmailTag$3;
1103
- email: string;
1104
- }
1105
- interface ContactEmailsWrapperNonNullableFields$1 {
1106
- items: ContactEmailNonNullableFields$1[];
1107
- }
1108
- interface ContactPhoneNonNullableFields$1 {
1109
- tag: PhoneTag$3;
1110
- phone: string;
1111
- }
1112
- interface ContactPhonesWrapperNonNullableFields$1 {
1113
- items: ContactPhoneNonNullableFields$1[];
1114
- }
1115
- interface StreetAddressNonNullableFields$1 {
1116
- number: string;
1117
- name: string;
1118
- apt: string;
1119
- }
1120
- interface SubdivisionNonNullableFields {
1121
- code: string;
1122
- name: string;
1123
- type: SubdivisionType;
1124
- }
1125
- interface AddressNonNullableFields$1 {
1126
- streetAddress?: StreetAddressNonNullableFields$1;
1127
- subdivisions: SubdivisionNonNullableFields[];
1128
- }
1129
- interface ContactAddressNonNullableFields$1 {
1130
- tag: AddressTag$3;
1131
- address?: AddressNonNullableFields$1;
1132
- }
1133
- interface ContactAddressesWrapperNonNullableFields$1 {
1134
- items: ContactAddressNonNullableFields$1[];
1135
- }
1136
- interface AssigneesWrapperNonNullableFields$1 {
1137
- items: string[];
1138
- }
1139
- interface LabelsWrapperNonNullableFields$1 {
1140
- items: string[];
1141
- }
1142
- interface LocationsWrapperNonNullableFields$1 {
1143
- items: string[];
1144
- }
1145
- interface ContactPictureNonNullableFields$1 {
1146
- image?: ImageNonNullableFields;
1147
- imageProvider: ImageProvider$1;
1148
- }
1149
- interface ContactInfoNonNullableFields$1 {
1150
- emails?: ContactEmailsWrapperNonNullableFields$1;
1151
- phones?: ContactPhonesWrapperNonNullableFields$1;
1152
- addresses?: ContactAddressesWrapperNonNullableFields$1;
1153
- assignedUserIds?: AssigneesWrapperNonNullableFields$1;
1154
- labelKeys?: LabelsWrapperNonNullableFields$1;
1155
- locations?: LocationsWrapperNonNullableFields$1;
1156
- picture?: ContactPictureNonNullableFields$1;
1157
- }
1158
- interface SegmentsWrapperNonNullableFields$1 {
1159
- items: string[];
1160
- }
1161
- interface PrimaryEmailNonNullableFields$1 {
1162
- subscriptionStatus: SubscriptionStatus$1;
1163
- deliverabilityStatus: EmailDeliverabilityStatus$1;
1164
- }
1165
- interface PrimaryPhoneNonNullableFields$1 {
1166
- subscriptionStatus: SubscriptionStatus$1;
1167
- deliverabilityStatus: PhoneDeliverabilityStatus$1;
1168
- }
1169
- interface ProfileInfoNonNullableFields$1 {
1170
- privacyStatus: PrivacyStatus$1;
1171
- photo?: ImageNonNullableFields;
1172
- }
1173
- interface UserInfoNonNullableFields$1 {
1174
- userId: string;
1175
- role: Role$1;
1176
- }
1177
- interface SessionInfoNonNullableFields$1 {
1178
- mobileAppNames: string[];
1179
- }
1180
- interface GroupInfoNonNullableFields$1 {
1181
- groupIds: string[];
1182
- }
1183
- interface MemberInfoNonNullableFields$1 {
1184
- status: MemberStatus$1;
1185
- profileInfo?: ProfileInfoNonNullableFields$1;
1186
- userInfo?: UserInfoNonNullableFields$1;
1187
- sessionInfo?: SessionInfoNonNullableFields$1;
1188
- groupInfo?: GroupInfoNonNullableFields$1;
1189
- }
1190
- interface ContactNonNullableFields$1 {
1191
- id: string;
1192
- revision: number;
1193
- source?: ContactSourceNonNullableFields$1;
1194
- lastActivity?: ContactActivityNonNullableFields$1;
1195
- picture?: ImageNonNullableFields;
1196
- info?: ContactInfoNonNullableFields$1;
1197
- segments?: SegmentsWrapperNonNullableFields$1;
1198
- primaryEmail?: PrimaryEmailNonNullableFields$1;
1199
- primaryPhone?: PrimaryPhoneNonNullableFields$1;
1200
- memberInfo?: MemberInfoNonNullableFields$1;
1201
- }
1202
- interface CreateContactResponseNonNullableFields$1 {
1203
- contact?: ContactNonNullableFields$1;
1204
- }
1205
- interface UpdateContactResponseNonNullableFields$1 {
1206
- contact?: ContactNonNullableFields$1;
1207
- }
1208
- interface MergeContactsResponseNonNullableFields$1 {
1209
- contact?: ContactNonNullableFields$1;
1210
- }
1211
- interface LabelContactResponseNonNullableFields$1 {
1212
- contact?: ContactNonNullableFields$1;
1213
- }
1214
- interface UnlabelContactResponseNonNullableFields$1 {
1215
- contact?: ContactNonNullableFields$1;
1216
- }
1217
- interface QueryContactsResponseNonNullableFields$1 {
1218
- contacts: ContactNonNullableFields$1[];
1219
- }
1220
- interface GetContactResponseNonNullableFields$1 {
1221
- contact?: ContactNonNullableFields$1;
1222
- responseType: GetContactResponseType$1;
1223
- }
1224
-
1225
- interface Contact {
1226
- /**
1227
- * Contact ID.
1228
- * @readonly
1229
- */
1230
- _id?: string;
1231
- /**
1232
- * Revision number, which increments by 1 each time the contact is updated.
1233
- * To prevent conflicting changes,
1234
- * the existing `revision` must be specified when updating a contact.
1235
- * @readonly
1236
- */
1237
- revision?: number;
1238
- /**
1239
- * Details about the contact's source.
1240
- * @readonly
1241
- */
1242
- source?: ContactSource;
1243
- /**
1244
- * Date and time the contact was created.
1245
- * @readonly
1246
- */
1247
- _createdDate?: Date | null;
1248
- /**
1249
- * Date and time the contact was last updated.
1250
- * @readonly
1251
- */
1252
- _updatedDate?: Date | null;
1253
- /**
1254
- * Details about the contact's last action in the site.
1255
- * @readonly
1256
- */
1257
- lastActivity?: ContactActivity;
1258
- /**
1259
- * Contact's primary phone and email.
1260
- * @readonly
1261
- */
1262
- primaryInfo?: PrimaryContactInfo;
1263
- /** Contact's details. */
1264
- info?: ContactInfo$4;
1265
- }
1266
- interface ContactSource {
1267
- /**
1268
- * Source type.
1269
- * @readonly
1270
- */
1271
- sourceType?: ContactSourceType;
1272
- /**
1273
- * App ID, if the contact was created by an app.
1274
- * @readonly
1275
- */
1276
- appId?: string | null;
1277
- }
1278
- declare enum ContactSourceType {
1279
- OTHER = "OTHER",
1280
- ADMIN = "ADMIN",
1281
- WIX_APP = "WIX_APP",
1282
- IMPORT = "IMPORT",
1283
- THIRD_PARTY = "THIRD_PARTY",
1284
- WIX_BOOKINGS = "WIX_BOOKINGS",
1285
- WIX_CHAT = "WIX_CHAT",
1286
- WIX_EMAIL_MARKETING = "WIX_EMAIL_MARKETING",
1287
- WIX_EVENTS = "WIX_EVENTS",
1288
- WIX_FORMS = "WIX_FORMS",
1289
- WIX_GROUPS = "WIX_GROUPS",
1290
- WIX_HOTELS = "WIX_HOTELS",
1291
- WIX_MARKET_PLACE = "WIX_MARKET_PLACE",
1292
- WIX_MUSIC = "WIX_MUSIC",
1293
- WIX_RESTAURANTS = "WIX_RESTAURANTS",
1294
- WIX_SITE_MEMBERS = "WIX_SITE_MEMBERS",
1295
- WIX_STORES = "WIX_STORES",
1296
- WIX_CODE = "WIX_CODE",
1297
- HOPP = "HOPP"
1298
- }
1299
- interface ContactActivity {
1300
- /** Date and time of the last action. */
1301
- activityDate?: Date | null;
1302
- /** Contact's last action in the site. */
1303
- activityType?: ContactActivityType;
1304
- }
1305
- declare enum ContactActivityType {
1306
- /** Visited the site. */
1307
- GENERAL = "GENERAL",
1308
- /** Became a new contact. */
1309
- CONTACT_CREATED = "CONTACT_CREATED",
1310
- /** Logged in. */
1311
- MEMBER_LOGIN = "MEMBER_LOGIN",
1312
- /** Requested a site membership. */
1313
- MEMBER_REGISTER = "MEMBER_REGISTER",
1314
- /** Was approved, blocked, or unblocked. */
1315
- MEMBER_STATUS_CHANGED = "MEMBER_STATUS_CHANGED",
1316
- /** Submitted a form. */
1317
- FORM_SUBMITTED = "FORM_SUBMITTED",
1318
- /** Started a chat. */
1319
- INBOX_FORM_SUBMITTED = "INBOX_FORM_SUBMITTED",
1320
- /** Paid a payment request. */
1321
- INBOX_PAYMENT_REQUEST_PAID = "INBOX_PAYMENT_REQUEST_PAID",
1322
- /** Received a message from the site. */
1323
- INBOX_MESSAGE_TO_CUSTOMER = "INBOX_MESSAGE_TO_CUSTOMER",
1324
- /** Sent a new message to the site. */
1325
- INBOX_MESSAGE_FROM_CUSTOMER = "INBOX_MESSAGE_FROM_CUSTOMER",
1326
- /** Subscribed to a site newsletter through a form. */
1327
- NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED = "NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED",
1328
- /** Unsubscribed from a site newsletter. */
1329
- NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE = "NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE",
1330
- /** Made a purchase. */
1331
- ECOM_PURCHASE = "ECOM_PURCHASE",
1332
- /** Abandoned a shopping cart. */
1333
- ECOM_CART_ABANDON = "ECOM_CART_ABANDON",
1334
- /** Checked out shopping cart and submitted buyer info (but didn’t complete the purchase yet). */
1335
- ECOM_CHECKOUT_BUYER = "ECOM_CHECKOUT_BUYER",
1336
- /** Booked an appointment. */
1337
- BOOKINGS_APPOINTMENT = "BOOKINGS_APPOINTMENT",
1338
- /** Made a Wix Hotels reservation. */
1339
- HOTELS_RESERVATION = "HOTELS_RESERVATION",
1340
- /** Paid for a Wix Hotels reservation. */
1341
- HOTELS_PURCHASE = "HOTELS_PURCHASE",
1342
- /** Confirmed a Wix Hotels reservation. */
1343
- HOTELS_CONFIRMATION = "HOTELS_CONFIRMATION",
1344
- /** Canceled a Wix Hotels reservation. */
1345
- HOTELS_CANCEL = "HOTELS_CANCEL",
1346
- /** Purchased a video. */
1347
- VIDEO_PURCHASE = "VIDEO_PURCHASE",
1348
- /** Rented a video. */
1349
- VIDEO_RENT = "VIDEO_RENT",
1350
- /** Made a purchase with a pay button. */
1351
- CASHIER_BUTTON_PURCHASE = "CASHIER_BUTTON_PURCHASE",
1352
- /** Became a new Wix Marketplace lead. */
1353
- ARENA_NEW_LEAD = "ARENA_NEW_LEAD",
1354
- /** RSVP'd to an event. */
1355
- EVENTS_RSVP = "EVENTS_RSVP",
1356
- /** Paid an invoice. */
1357
- INVOICE_PAY = "INVOICE_PAY",
1358
- /** An invoice is now overdue. */
1359
- INVOICE_OVERDUE = "INVOICE_OVERDUE",
1360
- /** Accepted a price quote. */
1361
- PRICE_QUOTE_ACCEPT = "PRICE_QUOTE_ACCEPT",
1362
- /** A price quote has expired. */
1363
- PRICE_QUOTE_EXPIRE = "PRICE_QUOTE_EXPIRE",
1364
- /** Ordered food with Wix Restaurants. */
1365
- RESTAURANTS_ORDER = "RESTAURANTS_ORDER",
1366
- /** Made a Wix Restaurants reservation. */
1367
- RESTAURANTS_RESERVATION = "RESTAURANTS_RESERVATION",
1368
- /** Opened an email from the site. */
1369
- SHOUTOUT_OPEN = "SHOUTOUT_OPEN",
1370
- /** Clicked a link in an email from the site. */
1371
- SHOUTOUT_CLICK = "SHOUTOUT_CLICK",
1372
- /** Merged with another contact. */
1373
- CONTACT_MERGED = "CONTACT_MERGED",
1374
- /** Subscribed to a site newsletter. */
1375
- NEWSLETTER_SUBSCRIPTION_SUBSCRIBE = "NEWSLETTER_SUBSCRIPTION_SUBSCRIBE",
1376
- /** Subscription status to site newsletters is pending confirmation. */
1377
- NEWSLETTER_SUBSCRIPTION_PENDING = "NEWSLETTER_SUBSCRIPTION_PENDING",
1378
- /** Subscription status to site newsletters is not set. */
1379
- NEWSLETTER_SUBSCRIPTION_NOT_SET = "NEWSLETTER_SUBSCRIPTION_NOT_SET",
1380
- /** Subscribed to phone notifications. */
1381
- PHONE_SUBSCRIPTION_SUBSCRIBE = "PHONE_SUBSCRIPTION_SUBSCRIBE",
1382
- /** Subscription to phone notificatons is pending confirmation. */
1383
- PHONE_SUBSCRIPTION_PENDING = "PHONE_SUBSCRIPTION_PENDING",
1384
- /** Subscription to phone notificatons is not set. */
1385
- PHONE_SUBSCRIPTION_NOT_SET = "PHONE_SUBSCRIPTION_NOT_SET",
1386
- /** Subscribed to phone notifications. */
1387
- PHONE_SUBSCRIPTION_UNSUBSCRIBE = "PHONE_SUBSCRIPTION_UNSUBSCRIBE"
1388
- }
1389
- interface PrimaryContactInfo {
1390
- /**
1391
- * Primary email address.
1392
- *
1393
- * This property reflects the email address in `info.emails`
1394
- * where `primary` is `true`.
1395
- * @readonly
1396
- */
1397
- email?: string | null;
1398
- /**
1399
- * Primary phone number.
1400
- *
1401
- * This property reflects the phone number in `info.phones`
1402
- * where `primary` is `true`.
1403
- * @readonly
1404
- */
1405
- phone?: string | null;
1406
- }
1407
- interface ContactInfo$4 {
1408
- /** Contact's first and last name. */
1409
- name?: ContactName$2;
1410
- /** Contact's email addresses. */
1411
- emails?: ContactEmailsWrapper$2;
1412
- /** Contact's phone numbers. */
1413
- phones?: ContactPhonesWrapper$2;
1414
- /** Contact's street addresses. */
1415
- addresses?: ContactAddressesWrapper$2;
1416
- /** Contact's company name. */
1417
- company?: string | null;
1418
- /** Contact's job title. */
1419
- jobTitle?: string | null;
1420
- /** Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`. */
1421
- birthdate?: string | null;
1422
- /**
1423
- * Locale in
1424
- * [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
1425
- * Typically, this is a lowercase 2-letter language code,
1426
- * followed by a hyphen, followed by an uppercase 2-letter country code.
1427
- * For example, `en-US` for U.S. English, and `de-DE` for Germany German.
1428
- */
1429
- locale?: string | null;
1430
- /**
1431
- * List of contact's labels.
1432
- *
1433
- * Labels are used to organize contacts. Labels can be
1434
- * added and removed using Label Contact and Unlabel Contact, respectively.
1435
- *
1436
- * To view or manage contact labels, use the Labels API.
1437
- */
1438
- labelKeys?: LabelsWrapper$2;
1439
- /**
1440
- * Additional custom fields.
1441
- *
1442
- * Empty fields are not returned.
1443
- */
1444
- extendedFields?: ExtendedFieldsWrapper$2;
1445
- /** Contact's profile picture. */
1446
- picture?: ContactPicture$2;
1447
- }
1448
- interface ContactName$2 {
1449
- /** Contact's first name. */
1450
- first?: string | null;
1451
- /** Contact's last name. */
1452
- last?: string | null;
1453
- }
1454
- interface ContactEmailsWrapper$2 {
1455
- /** List of up to 50 email addresses. */
1456
- items?: ContactEmail$2[];
1457
- }
1458
- interface ContactEmail$2 {
1459
- /**
1460
- * Email ID.
1461
- * @readonly
1462
- */
1463
- _id?: string | null;
1464
- /**
1465
- * Email type.
1466
- *
1467
- * `UNTAGGED` is shown as "Other" in the Contact List.
1468
- */
1469
- tag?: EmailTag$2;
1470
- /** Email address. */
1471
- email?: string;
1472
- /**
1473
- * Indicates whether this is the contact's primary email address.
1474
- * When changing `primary` to `true` for an email,
1475
- * the contact's other emails become `false`.
1476
- * Changing the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email.
1477
- */
1478
- primary?: boolean | null;
1479
- }
1480
- declare enum EmailTag$2 {
1481
- UNTAGGED = "UNTAGGED",
1482
- MAIN = "MAIN",
1483
- HOME = "HOME",
1484
- WORK = "WORK"
1485
- }
1486
- interface ContactPhonesWrapper$2 {
1487
- /** List of up to 50 phone numbers. */
1488
- items?: ContactPhone$2[];
1489
- }
1490
- interface ContactPhone$2 {
1491
- /**
1492
- * Phone ID.
1493
- * @readonly
1494
- */
1495
- _id?: string | null;
1496
- /**
1497
- * Phone type.
1498
- *
1499
- * `UNTAGGED` is shown as "Other" in the Contact List.
1500
- */
1501
- tag?: PhoneTag$2;
1502
- /** [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. */
1503
- countryCode?: string | null;
1504
- /** Phone number. */
1505
- phone?: string;
1506
- /**
1507
- * [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)
1508
- * phone number.
1509
- * Automatically generated using `phone` and `countryCode`, pending both values are valid.
1510
- * @readonly
1511
- */
1512
- e164Phone?: string | null;
1513
- /**
1514
- * Indicates whether this is the contact's primary phone number.
1515
- * When changing `primary` to `true` for a phone,
1516
- * the contact's `primary` field for other phones becomes `false`.
1517
- * Changing the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone.
1518
- */
1519
- primary?: boolean | null;
1520
- }
1521
- declare enum PhoneTag$2 {
1522
- UNTAGGED = "UNTAGGED",
1523
- MAIN = "MAIN",
1524
- HOME = "HOME",
1525
- MOBILE = "MOBILE",
1526
- WORK = "WORK",
1527
- FAX = "FAX"
1528
- }
1529
- interface ContactAddressesWrapper$2 {
1530
- /** List of up to 50 addresses. */
1531
- items?: ContactAddress$2[];
1532
- }
1533
- interface ContactAddress$2 {
1534
- /**
1535
- * Street address ID.
1536
- * @readonly
1537
- */
1538
- _id?: string | null;
1539
- /**
1540
- * Address type.
1541
- * `UNTAGGED` is shown as "Other" in the Contact List.
1542
- */
1543
- tag?: AddressTag$2;
1544
- /** Street address. */
1545
- address?: Address$2;
1546
- }
1547
- declare enum AddressTag$2 {
1548
- UNTAGGED = "UNTAGGED",
1549
- HOME = "HOME",
1550
- WORK = "WORK",
1551
- BILLING = "BILLING",
1552
- SHIPPING = "SHIPPING"
1553
- }
1554
- /** Physical address */
1555
- interface Address$2 extends AddressStreetOneOf$2 {
1556
- /** Street address object, with number and name in separate fields. */
1557
- streetAddress?: StreetAddress$2;
1558
- /** Main address line, usually street and number, as free text. */
1559
- addressLine1?: string | null;
1560
- /**
1561
- * 2-letter country code in an
1562
- * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
1563
- */
1564
- country?: string | null;
1565
- /**
1566
- * Code for a subdivision (such as state, prefecture, or province) in an
1567
- * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
1568
- */
1569
- subdivision?: string | null;
1570
- /** City name. */
1571
- city?: string | null;
1572
- /** Postal or zip code. */
1573
- postalCode?: string | null;
1574
- /**
1575
- * Free text providing more detailed address information,
1576
- * such as apartment, suite, or floor.
1577
- */
1578
- addressLine2?: string | null;
1579
- }
1580
- /** @oneof */
1581
- interface AddressStreetOneOf$2 {
1582
- /** Street address object, with number and name in separate fields. */
1583
- streetAddress?: StreetAddress$2;
1584
- /** Main address line, usually street and number, as free text. */
1585
- addressLine?: string | null;
1586
- }
1587
- interface StreetAddress$2 {
1588
- /** Street number. */
1589
- number?: string;
1590
- /** Street name. */
1591
- name?: string;
1592
- }
1593
- interface LabelsWrapper$2 {
1594
- /**
1595
- * List of contact label keys.
1596
- *
1597
- * Contact labels help categorize contacts. Label keys must exist to be added to the contact.
1598
- * Contact labels can be created or retrieved with Find or Create Label or List Labels.
1599
- */
1600
- items?: string[];
1601
- }
1602
- interface ExtendedFieldsWrapper$2 {
1603
- /**
1604
- * Contact's extended fields,
1605
- * where each key is the field key,
1606
- * and each value is the field's value for the contact.
1607
- *
1608
- * To view and manage extended fields, use the Extended Fields API.
1609
- */
1610
- items?: Record<string, any>;
1611
- }
1612
- /** TEST contact picture description */
1613
- interface ContactPicture$2 {
1614
- /**
1615
- * Image.
1616
- * This can contain an image URL or a Wix Media image ID.
1617
- */
1618
- image?: string;
1619
- }
1620
- declare enum ImageProvider {
1621
- UNKNOWN = "UNKNOWN",
1622
- /** Image stored outside Wix */
1623
- EXTERNAL = "EXTERNAL",
1624
- /** Stored in wix media platform, Must be uploaded by using `GeneratePictureUploadUrl` */
1625
- WIX_MEDIA = "WIX_MEDIA"
1626
- }
1627
- declare enum SubscriptionStatus {
1628
- NO_SUBSCRIPTION_STATUS = "NO_SUBSCRIPTION_STATUS",
1629
- NOT_SET = "NOT_SET",
1630
- PENDING = "PENDING",
1631
- SUBSCRIBED = "SUBSCRIBED",
1632
- UNSUBSCRIBED = "UNSUBSCRIBED"
1633
- }
1634
- declare enum EmailDeliverabilityStatus {
1635
- NOT_SET = "NOT_SET",
1636
- VALID = "VALID",
1637
- BOUNCED = "BOUNCED",
1638
- SPAM_COMPLAINT = "SPAM_COMPLAINT",
1639
- INACTIVE = "INACTIVE"
1640
- }
1641
- declare enum PhoneDeliverabilityStatus {
1642
- NO_PHONE_DELIVERABILITY_STATUS = "NO_PHONE_DELIVERABILITY_STATUS",
1643
- NOT_SET = "NOT_SET"
1644
- }
1645
- declare enum MemberStatus {
1646
- PENDING = "PENDING",
1647
- ACTIVE = "ACTIVE",
1648
- DELETED = "DELETED",
1649
- BLOCKED = "BLOCKED",
1650
- OFFLINE = "OFFLINE"
1651
- }
1652
- declare enum PrivacyStatus {
1653
- PRIVATE = "PRIVATE",
1654
- PUBLIC = "PUBLIC"
1655
- }
1656
- declare enum Role {
1657
- UNSPECIFIED_ROLE = "UNSPECIFIED_ROLE",
1658
- OWNER = "OWNER",
1659
- CONTRIBUTOR = "CONTRIBUTOR"
1660
- }
1661
- /** Contact creation options. */
1662
- interface CreateContactRequest {
1663
- /** Contact info. */
1664
- info: ContactInfo$4;
1665
- /**
1666
- * Controls whether the call will succeed
1667
- * if the new contact information contains an email or a phone number already used by another contact.
1668
- *
1669
- * If set to `true`,
1670
- * the call will succeed even if an email address or phone number is used by another contact.
1671
- * If set to `false`,
1672
- * the call will fail if the given email address is used by another contact or,
1673
- * if the email address is not given and the given phone number is used by another contact.
1674
- *
1675
- * Default: `false`
1676
- */
1677
- allowDuplicates?: boolean;
1678
- }
1679
- /** Contact. */
1680
- interface CreateContactResponse {
1681
- /** Contact. */
1682
- contact?: Contact;
1683
- }
1684
- interface UpdateContactRequest {
1685
- /** ID of the contact to update. */
1686
- contactId: string;
1687
- /**
1688
- * Revision number.
1689
- * When updating, include the existing `revision`
1690
- * to prevent conflicting updates.
1691
- */
1692
- revision: number | null;
1693
- /**
1694
- * Controls whether the call will succeed
1695
- * if the new contact information contains an email or a phone number already used by another contact.
1696
- *
1697
- * If set to `true`,
1698
- * the call will succeed even if an email address or phone number is used by another contact.
1699
- * If set to `false`,
1700
- * the call will fail if the given email address is used by another contact or,
1701
- * if the email address is not given and the given phone number is used by another contact.
1702
- *
1703
- * Default: `false`
1704
- */
1705
- allowDuplicates?: boolean;
1706
- /** Contact info. */
1707
- info: ContactInfo$4;
1708
- }
1709
- /** Updated contact. */
1710
- interface UpdateContactResponse {
1711
- /** Updated contact. */
1712
- contact?: Contact;
1713
- }
1714
- interface MergeContactsRequest {
1715
- /** Target contact ID. */
1716
- targetContactId: string;
1717
- /**
1718
- * Target contact revision number, which increments by 1 each time the contact is updated.
1719
- * To prevent conflicting changes,
1720
- * the target contact's current `revision` must be specified.
1721
- */
1722
- targetContactRevision: number | null;
1723
- /**
1724
- * IDs of up to 5 contacts to merge into the target contact.
1725
- * When you merge more than one source contact,
1726
- * the first source is given precedence, then the second, and so on.
1727
- */
1728
- sourceContactIds?: string[];
1729
- }
1730
- interface MergeContactsResponse {
1731
- /** Updated target contact. */
1732
- contact?: Contact;
1733
- }
1734
- interface DeleteContactRequest {
1735
- /** ID of the contact to delete. */
1736
- contactId: string;
1737
- }
1738
- interface DeleteContactResponse {
1739
- }
1740
- interface LabelContactRequest {
1741
- /** ID of the contact to add labels to. */
1742
- contactId: string;
1743
- /**
1744
- * List of label keys to add to the contact.
1745
- *
1746
- * Label keys must exist to be added to the contact.
1747
- * Use the Labels API to create or retrieve labels.
1748
- */
1749
- labelKeys: string[];
1750
- }
1751
- /** Updated contact. */
1752
- interface LabelContactResponse {
1753
- /** Updated contact. */
1754
- contact?: Contact;
1755
- }
1756
- interface UnlabelContactRequest {
1757
- /** ID of the contact to remove labels from. */
1758
- contactId: string;
1759
- /** List of label keys to remove from the contact. */
1760
- labelKeys: string[];
1761
- }
1762
- /** Updated contact. */
1763
- interface UnlabelContactResponse {
1764
- /** Updated contact. */
1765
- contact?: Contact;
1766
- }
1767
- interface Sorting$6 {
1768
- /**
1769
- * Field to sort by.
1770
- *
1771
- * Supported properties:
1772
- * `createdDate`, `lastActivity.activityDate`, `primaryInfo.email`, `info.name.first`, `info.name.last`, `info.company`,
1773
- * `info.jobTitle`, `info.birthdate`
1774
- */
1775
- fieldName?: string;
1776
- /**
1777
- * Sort order.
1778
- * Use `ASC` for ascending order or `DESC` for descending order.
1779
- *
1780
- * Defaults to `ASC`.
1781
- */
1782
- order?: SortOrder$6;
1783
- }
1784
- declare enum SortOrder$6 {
1785
- ASC = "ASC",
1786
- DESC = "DESC"
1787
- }
1788
- interface Paging$4 {
1789
- /**
1790
- * 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).
1791
- *
1792
- * Default: `50`. <br>
1793
- * Maximum: `1000`.
1794
- */
1795
- limit?: number | null;
1796
- /** Number of items to skip in the current sort order. */
1797
- offset?: number | null;
1798
- }
1799
- declare enum ContactFieldSet {
1800
- /** name, primaryEmail, primaryPhone */
1801
- BASIC = "BASIC",
1802
- /** name, phones, emails, addresses */
1803
- COMMUNICATION_DETAILS = "COMMUNICATION_DETAILS",
1804
- /** name, primaryInfo(email, phone), extendedFields */
1805
- EXTENDED = "EXTENDED",
1806
- /** Full contact object */
1807
- FULL = "FULL"
1808
- }
1809
- interface PagingMetadata$4 {
1810
- /** The number of items returned in this response. */
1811
- count?: number | null;
1812
- /** The offset which was requested. */
1813
- offset?: number | null;
1814
- /** The total number of items that match the query. */
1815
- total?: number | null;
1816
- /** A flag that indicates the server failed to calculate 'total' field. */
1817
- tooManyToCount?: boolean | null;
1818
- }
1819
- interface QueryContactsRequest {
1820
- /**
1821
- * @internal
1822
- * @internal */
1823
- search?: string | null;
1824
- /** Query options. */
1825
- query?: Query$4;
1826
- }
1827
- interface Query$4 {
1828
- /**
1829
- * Filter object.
1830
- * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
1831
- * for more information.
1832
- *
1833
- * For a detailed list of supported filters, see
1834
- * [Supported Filters](https://dev.wix.com/api/rest/contacts/contacts/supported-filters).
1835
- */
1836
- filter?: Record<string, any> | null;
1837
- /**
1838
- * Sorting options.
1839
- * See [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination)
1840
- * for more information.
1841
- *
1842
- * Max: 1 sort object
1843
- */
1844
- sort?: Sorting$6[];
1845
- /** Pagination options. */
1846
- paging?: Paging$4;
1847
- /**
1848
- * List of projected fields to return.
1849
- * If both `fields` and `fieldsets` are sent in the request,
1850
- * the union of both lists is returned.
1851
- * `id` and `revision` are always returned.
1852
- *
1853
- * Supported properties:
1854
- * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
1855
- * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
1856
- * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
1857
- * `info.labelKeys`, `info.locations`, `info.extendedFields`
1858
- */
1859
- fields?: string[];
1860
- /**
1861
- * Predefined sets of fields to return.
1862
- * If both `fields` and `fieldsets` are sent in the request,
1863
- * the union of both lists is returned.
1864
- *
1865
- * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
1866
- * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
1867
- * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
1868
- * - `FULL`: Returns all fields.
1869
- *
1870
- * Default: If `fields` is omitted from the request, `FULL`.
1871
- */
1872
- fieldsets?: ContactFieldSet[];
1873
- }
1874
- /** List of contacts. */
1875
- interface QueryContactsResponse {
1876
- /** List of contacts. */
1877
- contacts?: Contact[];
1878
- /** Details on the paged set of results returned. */
1879
- pagingMetadata?: PagingMetadata$4;
1880
- }
1881
- interface GetContactRequest {
1882
- /** ID of the contact to retrieve. */
1883
- _id: string;
1884
- /**
1885
- * List of projected fields to return.
1886
- * If both `fields` and `fieldsets` are sent in the request,
1887
- * the union of both lists is returned.
1888
- * `id` and `revision` are always returned.
1889
- *
1890
- * Supported properties:
1891
- * `source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,
1892
- * `info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,
1893
- * `info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,
1894
- * `info.labelKeys`, `info.locations`, `info.extendedFields`
1895
- */
1896
- fields?: string[];
1897
- /**
1898
- * Predefined sets of fields to return.
1899
- * If both `fields` and `fieldsets` are sent in the request,
1900
- * the union of both lists is returned.
1901
- *
1902
- * - `BASIC`: Returns `id`, `revision`, `primaryInfo`, `info.name`.
1903
- * - `COMMUNICATION_DETAILS`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.emails`, `info.phones`, `info.addresses`.
1904
- * - `EXTENDED`: Returns `id`, `revision`, `primaryInfo`, `info.name`, `info.extendedFields`.
1905
- * - `FULL`: Returns all fields.
1906
- *
1907
- * Default: If `fields` is omitted from the request, `FULL`.
1908
- */
1909
- fieldsets?: ContactFieldSet[];
1910
- }
1911
- /** The requested contact. */
1912
- interface GetContactResponse {
1913
- /** The requested contact. */
1914
- contact?: Contact;
1915
- /** Contact response type. */
1916
- responseType?: GetContactResponseType;
1917
- }
1918
- declare enum GetContactResponseType {
1919
- /** The specified contact was returned. */
1920
- REGULAR = "REGULAR",
1921
- /** Not used. */
1922
- IMPLICIT = "IMPLICIT",
1923
- /** The specified contact was previously merged with another contact and the new contact was returned. */
1924
- MERGED = "MERGED"
1925
- }
1926
- interface ContactSourceNonNullableFields {
1927
- sourceType: ContactSourceType;
1928
- }
1929
- interface ContactActivityNonNullableFields {
1930
- activityType: ContactActivityType;
1931
- }
1932
- interface ContactEmailNonNullableFields {
1933
- tag: EmailTag$2;
1934
- email: string;
1935
- }
1936
- interface ContactEmailsWrapperNonNullableFields {
1937
- items: ContactEmailNonNullableFields[];
1938
- }
1939
- interface ContactPhoneNonNullableFields {
1940
- tag: PhoneTag$2;
1941
- phone: string;
1942
- }
1943
- interface ContactPhonesWrapperNonNullableFields {
1944
- items: ContactPhoneNonNullableFields[];
1945
- }
1946
- interface StreetAddressNonNullableFields {
1947
- number: string;
1948
- name: string;
1949
- apt: string;
1950
- }
1951
- interface AddressNonNullableFields {
1952
- streetAddress?: StreetAddressNonNullableFields;
1953
- }
1954
- interface ContactAddressNonNullableFields {
1955
- tag: AddressTag$2;
1956
- address?: AddressNonNullableFields;
1957
- }
1958
- interface ContactAddressesWrapperNonNullableFields {
1959
- items: ContactAddressNonNullableFields[];
1960
- }
1961
- interface AssigneesWrapperNonNullableFields {
1962
- items: string[];
1963
- }
1964
- interface LabelsWrapperNonNullableFields {
1965
- items: string[];
1966
- }
1967
- interface LocationsWrapperNonNullableFields {
1968
- items: string[];
1969
- }
1970
- interface ContactPictureNonNullableFields {
1971
- image: string;
1972
- imageProvider: ImageProvider;
1973
- }
1974
- interface ContactInfoNonNullableFields {
1975
- emails?: ContactEmailsWrapperNonNullableFields;
1976
- phones?: ContactPhonesWrapperNonNullableFields;
1977
- addresses?: ContactAddressesWrapperNonNullableFields;
1978
- assignedUserIds?: AssigneesWrapperNonNullableFields;
1979
- labelKeys?: LabelsWrapperNonNullableFields;
1980
- locations?: LocationsWrapperNonNullableFields;
1981
- picture?: ContactPictureNonNullableFields;
1982
- }
1983
- interface SegmentsWrapperNonNullableFields {
1984
- items: string[];
1985
- }
1986
- interface PrimaryEmailNonNullableFields {
1987
- subscriptionStatus: SubscriptionStatus;
1988
- deliverabilityStatus: EmailDeliverabilityStatus;
1989
- }
1990
- interface PrimaryPhoneNonNullableFields {
1991
- subscriptionStatus: SubscriptionStatus;
1992
- deliverabilityStatus: PhoneDeliverabilityStatus;
1993
- }
1994
- interface ProfileInfoNonNullableFields {
1995
- privacyStatus: PrivacyStatus;
1996
- photo: string;
1997
- }
1998
- interface UserInfoNonNullableFields {
1999
- userId: string;
2000
- role: Role;
2001
- }
2002
- interface SessionInfoNonNullableFields {
2003
- mobileAppNames: string[];
2004
- }
2005
- interface GroupInfoNonNullableFields {
2006
- groupIds: string[];
2007
- }
2008
- interface MemberInfoNonNullableFields {
2009
- status: MemberStatus;
2010
- profileInfo?: ProfileInfoNonNullableFields;
2011
- userInfo?: UserInfoNonNullableFields;
2012
- sessionInfo?: SessionInfoNonNullableFields;
2013
- groupInfo?: GroupInfoNonNullableFields;
2014
- }
2015
- interface ContactNonNullableFields {
2016
- _id: string;
2017
- revision: number;
2018
- source?: ContactSourceNonNullableFields;
2019
- lastActivity?: ContactActivityNonNullableFields;
2020
- picture: string;
2021
- info?: ContactInfoNonNullableFields;
2022
- segments?: SegmentsWrapperNonNullableFields;
2023
- primaryEmail?: PrimaryEmailNonNullableFields;
2024
- primaryPhone?: PrimaryPhoneNonNullableFields;
2025
- memberInfo?: MemberInfoNonNullableFields;
2026
- }
2027
- interface CreateContactResponseNonNullableFields {
2028
- contact?: ContactNonNullableFields;
2029
- }
2030
- interface UpdateContactResponseNonNullableFields {
2031
- contact?: ContactNonNullableFields;
2032
- }
2033
- interface MergeContactsResponseNonNullableFields {
2034
- contact?: ContactNonNullableFields;
2035
- }
2036
- interface LabelContactResponseNonNullableFields {
2037
- contact?: ContactNonNullableFields;
2038
- }
2039
- interface UnlabelContactResponseNonNullableFields {
2040
- contact?: ContactNonNullableFields;
2041
- }
2042
- interface QueryContactsResponseNonNullableFields {
2043
- contacts: ContactNonNullableFields[];
2044
- }
2045
- interface GetContactResponseNonNullableFields {
2046
- contact?: ContactNonNullableFields;
2047
- responseType: GetContactResponseType;
2048
- }
2049
-
2050
- type __PublicMethodMetaInfo$4<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
2051
- getUrl: (context: any) => string;
2052
- httpMethod: K;
2053
- path: string;
2054
- pathParams: M;
2055
- __requestType: T;
2056
- __originalRequestType: S;
2057
- __responseType: Q;
2058
- __originalResponseType: R;
2059
- };
2060
- declare function createContact(): __PublicMethodMetaInfo$4<'POST', {}, CreateContactRequest, CreateContactRequest$1, CreateContactResponse & CreateContactResponseNonNullableFields, CreateContactResponse$1 & CreateContactResponseNonNullableFields$1>;
2061
- declare function updateContact(): __PublicMethodMetaInfo$4<'PATCH', {
2062
- contactId: string;
2063
- }, UpdateContactRequest, UpdateContactRequest$1, UpdateContactResponse & UpdateContactResponseNonNullableFields, UpdateContactResponse$1 & UpdateContactResponseNonNullableFields$1>;
2064
- declare function mergeContacts(): __PublicMethodMetaInfo$4<'POST', {
2065
- targetContactId: string;
2066
- }, MergeContactsRequest, MergeContactsRequest$1, MergeContactsResponse & MergeContactsResponseNonNullableFields, MergeContactsResponse$1 & MergeContactsResponseNonNullableFields$1>;
2067
- declare function deleteContact(): __PublicMethodMetaInfo$4<'DELETE', {
2068
- contactId: string;
2069
- }, DeleteContactRequest, DeleteContactRequest$1, DeleteContactResponse, DeleteContactResponse$1>;
2070
- declare function labelContact(): __PublicMethodMetaInfo$4<'POST', {
2071
- contactId: string;
2072
- }, LabelContactRequest, LabelContactRequest$1, LabelContactResponse & LabelContactResponseNonNullableFields, LabelContactResponse$1 & LabelContactResponseNonNullableFields$1>;
2073
- declare function unlabelContact(): __PublicMethodMetaInfo$4<'DELETE', {
2074
- contactId: string;
2075
- }, UnlabelContactRequest, UnlabelContactRequest$1, UnlabelContactResponse & UnlabelContactResponseNonNullableFields, UnlabelContactResponse$1 & UnlabelContactResponseNonNullableFields$1>;
2076
- declare function queryContacts(): __PublicMethodMetaInfo$4<'POST', {}, QueryContactsRequest, QueryContactsRequest$1, QueryContactsResponse & QueryContactsResponseNonNullableFields, QueryContactsResponse$1 & QueryContactsResponseNonNullableFields$1>;
2077
- declare function getContact(): __PublicMethodMetaInfo$4<'GET', {
2078
- id: string;
2079
- }, GetContactRequest, GetContactRequest$1, GetContactResponse & GetContactResponseNonNullableFields, GetContactResponse$1 & GetContactResponseNonNullableFields$1>;
2080
-
2081
- declare const meta$4_createContact: typeof createContact;
2082
- declare const meta$4_deleteContact: typeof deleteContact;
2083
- declare const meta$4_getContact: typeof getContact;
2084
- declare const meta$4_labelContact: typeof labelContact;
2085
- declare const meta$4_mergeContacts: typeof mergeContacts;
2086
- declare const meta$4_queryContacts: typeof queryContacts;
2087
- declare const meta$4_unlabelContact: typeof unlabelContact;
2088
- declare const meta$4_updateContact: typeof updateContact;
2089
- declare namespace meta$4 {
2090
- export { type __PublicMethodMetaInfo$4 as __PublicMethodMetaInfo, meta$4_createContact as createContact, meta$4_deleteContact as deleteContact, meta$4_getContact as getContact, meta$4_labelContact as labelContact, meta$4_mergeContacts as mergeContacts, meta$4_queryContacts as queryContacts, meta$4_unlabelContact as unlabelContact, meta$4_updateContact as updateContact };
2091
- }
2092
-
2093
- /** Extended field that was found or created. */
2094
- interface ExtendedField$1 {
2095
- /**
2096
- * Extended field namespace.
2097
- *
2098
- * Extended fields created through by calling the Find Or Create Extended Field method
2099
- * are automatically assigned to the `custom` namespace.
2100
- * @readonly
2101
- */
2102
- namespace?: string | null;
2103
- /**
2104
- * Extended field key.
2105
- *
2106
- * When accessing contact data,
2107
- * extended field data is available at `extendedFields[key]`.
2108
- * For example, if the key is "custom.notes",
2109
- * the value can be accessed at `extendedFields["custom.notes"]`.
2110
- *
2111
- * `key` is generated when the extended field is created
2112
- * and can't be modified, even if `displayName` changes.
2113
- * @readonly
2114
- */
2115
- key?: string;
2116
- /** Display name shown in the contact list. */
2117
- displayName?: string;
2118
- /**
2119
- * Type of data the field holds.
2120
- * @readonly
2121
- */
2122
- dataType?: FieldDataType$1;
2123
- /**
2124
- * Indicates whether the extended field is a system field or custom field.
2125
- * @readonly
2126
- */
2127
- fieldType?: FieldType$1;
2128
- /**
2129
- * Date and time the field was created.
2130
- * @readonly
2131
- */
2132
- createdDate?: Date | null;
2133
- /**
2134
- * Date and time the field was last updated.
2135
- * @readonly
2136
- */
2137
- updatedDate?: Date | null;
2138
- /**
2139
- * Field description, if the field is a system field.
2140
- * @readonly
2141
- */
2142
- description?: string | null;
2143
- }
2144
- declare enum FieldDataType$1 {
2145
- /** Accepts strings. */
2146
- TEXT = "TEXT",
2147
- /** Accepts floats. */
2148
- NUMBER = "NUMBER",
2149
- /** Accepts dates formatted as `YYYY-MM-DD`. */
2150
- DATE = "DATE",
2151
- /** Accepts strings. Prepends `https://` if no protocol is included. */
2152
- URL = "URL"
2153
- }
2154
- declare enum FieldType$1 {
2155
- /** Field is a system field managed by Wix. System fields can't be modified by calling the Update Extended Field method. */
2156
- SYSTEM = "SYSTEM",
2157
- /** Field is a custom field and can be modified by calling the Update Extended Field method. */
2158
- USER_DEFINED = "USER_DEFINED"
2159
- }
2160
- interface Sorting$5 {
2161
- /** Name of the field to sort by. */
2162
- fieldName?: string;
2163
- /**
2164
- * Sort order.
2165
- *
2166
- * Default: `ASC`.
2167
- */
2168
- order?: SortOrder$5;
2169
- }
2170
- declare enum SortOrder$5 {
2171
- /** Sort by ascending order. */
2172
- ASC = "ASC",
2173
- /** Sort by descending order. */
2174
- DESC = "DESC"
2175
- }
2176
- interface Paging$3 {
2177
- /**
2178
- * Number of items to return.
2179
- *
2180
- * Defaults to `100`.
2181
- */
2182
- limit?: number | null;
2183
- /**
2184
- * Number of items to skip in the current sort order.
2185
- *
2186
- * Defaults to `0`.
2187
- */
2188
- offset?: number | null;
2189
- }
2190
- interface PagingMetadata$3 {
2191
- /** Number of items returned. */
2192
- count?: number | null;
2193
- /** Requested offset. */
2194
- offset?: number | null;
2195
- /** Number of items that matched the query. */
2196
- total?: number | null;
2197
- /**
2198
- * Indicates if `total` calculation timed out before the response was sent.
2199
- * Typically this happens if there is a large set of results.
2200
- */
2201
- tooManyToCount?: boolean | null;
2202
- }
2203
- /** Custom field to find or create. */
2204
- interface FindOrCreateExtendedFieldRequest$1 {
2205
- /**
2206
- * Display name to retrieve or create.
2207
- *
2208
- * If an existing custom field is an exact match
2209
- * for the specified display name,
2210
- * the existing field is returned.
2211
- * If not, a new field is created and returned.
2212
- */
2213
- displayName: string;
2214
- /**
2215
- * Type of data the field holds.
2216
- * Ignored if an existing field is an exact match
2217
- * for the specified display name.
2218
- */
2219
- dataType?: FieldDataType$1;
2220
- }
2221
- /** Extended field that was found or created. */
2222
- interface FindOrCreateExtendedFieldResponse$1 {
2223
- /** Extended field that was found or created. */
2224
- field?: ExtendedField$1;
2225
- /**
2226
- * Indicates whether the extended field was just created or already existed.
2227
- *
2228
- * Returns `true` if the field was just created.
2229
- */
2230
- newField?: boolean;
2231
- }
2232
- interface GetExtendedFieldRequest$1 {
2233
- /**
2234
- * Extended field key.
2235
- *
2236
- * When accessing contact data,
2237
- * extended field values are available at `info.extendedFields.items[key]`.
2238
- * For example, if the key is "custom.patronus",
2239
- * the value can be accessed at `info.extendedFields.items["custom.patronus"]`.
2240
- *
2241
- * `key` is generated when the extended field is created.
2242
- * It can't be modified, even if `displayName` is updated.
2243
- */
2244
- key: string;
2245
- }
2246
- /** The specified field. */
2247
- interface GetExtendedFieldResponse$1 {
2248
- /** The specified field. */
2249
- field?: ExtendedField$1;
2250
- }
2251
- interface UpdateExtendedFieldRequest$1 {
2252
- /** Extended field to rename. */
2253
- field?: ExtendedField$1;
2254
- }
2255
- /** Updated extended field. */
2256
- interface UpdateExtendedFieldResponse$1 {
2257
- /** Renamed extended field. */
2258
- field?: ExtendedField$1;
2259
- }
2260
- interface DeleteExtendedFieldRequest$1 {
2261
- /** Extended field key. */
2262
- key: string;
2263
- }
2264
- interface DeleteExtendedFieldResponse$1 {
2265
- }
2266
- interface QueryExtendedFieldsRequest$1 {
2267
- /** Query options. */
2268
- query?: Query$3;
2269
- }
2270
- interface Query$3 {
2271
- /**
2272
- * ilter object.
2273
- *
2274
- * Possible filters: `$eq`, `$gt`, `$gte`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.
2275
- *
2276
- * For a detailed list of supported filters, see [sorting and filtering for extended fields](https://dev.wix.com/api/rest/contacts/extended-fields/sort-and-filter).
2277
- *
2278
- * Example: `{ "filter": {
2279
- * "displayName": {
2280
- * "$startsWith": "Referral"
2281
- * }
2282
- * }
2283
- * }`
2284
- */
2285
- filter?: Record<string, any> | null;
2286
- /**
2287
- * Sorting options. Currently supports sorting on one field only.
2288
- *
2289
- * Example: `{ "sort": [{"fieldName": "displayName", "order": "DESC"}] }`
2290
- */
2291
- sort?: Sorting$5[];
2292
- /** Pagination options. */
2293
- paging?: Paging$3;
2294
- }
2295
- interface QueryExtendedFieldsResponse$1 {
2296
- /** List of extended fields. */
2297
- fields?: ExtendedField$1[];
2298
- /** Details on the paged set of results returned. */
2299
- pagingMetadata?: PagingMetadata$3;
2300
- }
2301
- interface ExtendedFieldNonNullableFields$1 {
2302
- key: string;
2303
- displayName: string;
2304
- dataType: FieldDataType$1;
2305
- fieldType: FieldType$1;
2306
- }
2307
- interface FindOrCreateExtendedFieldResponseNonNullableFields$1 {
2308
- field?: ExtendedFieldNonNullableFields$1;
2309
- newField: boolean;
2310
- }
2311
- interface GetExtendedFieldResponseNonNullableFields$1 {
2312
- field?: ExtendedFieldNonNullableFields$1;
2313
- }
2314
- interface UpdateExtendedFieldResponseNonNullableFields$1 {
2315
- field?: ExtendedFieldNonNullableFields$1;
2316
- }
2317
- interface QueryExtendedFieldsResponseNonNullableFields$1 {
2318
- fields: ExtendedFieldNonNullableFields$1[];
2319
- }
2320
-
2321
- /** Extended field that was found or created. */
2322
- interface ExtendedField {
2323
- /**
2324
- * Extended field namespace.
2325
- *
2326
- * Extended fields created through by calling the Find Or Create Extended Field method
2327
- * are automatically assigned to the `custom` namespace.
2328
- * @readonly
2329
- */
2330
- namespace?: string | null;
2331
- /**
2332
- * Extended field key.
2333
- *
2334
- * When accessing contact data,
2335
- * extended field data is available at `extendedFields[key]`.
2336
- * For example, if the key is "custom.notes",
2337
- * the value can be accessed at `extendedFields["custom.notes"]`.
2338
- *
2339
- * `key` is generated when the extended field is created
2340
- * and can't be modified, even if `displayName` changes.
2341
- * @readonly
2342
- */
2343
- key?: string;
2344
- /** Display name shown in the contact list. */
2345
- displayName?: string;
2346
- /**
2347
- * Type of data the field holds.
2348
- * @readonly
2349
- */
2350
- dataType?: FieldDataType;
2351
- /**
2352
- * Indicates whether the extended field is a system field or custom field.
2353
- * @readonly
2354
- */
2355
- fieldType?: FieldType;
2356
- /**
2357
- * Date and time the field was created.
2358
- * @readonly
2359
- */
2360
- _createdDate?: Date | null;
2361
- /**
2362
- * Date and time the field was last updated.
2363
- * @readonly
2364
- */
2365
- _updatedDate?: Date | null;
2366
- /**
2367
- * Field description, if the field is a system field.
2368
- * @readonly
2369
- */
2370
- description?: string | null;
2371
- }
2372
- declare enum FieldDataType {
2373
- /** Accepts strings. */
2374
- TEXT = "TEXT",
2375
- /** Accepts floats. */
2376
- NUMBER = "NUMBER",
2377
- /** Accepts dates formatted as `YYYY-MM-DD`. */
2378
- DATE = "DATE",
2379
- /** Accepts strings. Prepends `https://` if no protocol is included. */
2380
- URL = "URL"
2381
- }
2382
- declare enum FieldType {
2383
- /** Field is a system field managed by Wix. System fields can't be modified by calling the Update Extended Field method. */
2384
- SYSTEM = "SYSTEM",
2385
- /** Field is a custom field and can be modified by calling the Update Extended Field method. */
2386
- USER_DEFINED = "USER_DEFINED"
2387
- }
2388
- interface Sorting$4 {
2389
- /** Name of the field to sort by. */
2390
- fieldName?: string;
2391
- /**
2392
- * Sort order.
2393
- *
2394
- * Default: `ASC`.
2395
- */
2396
- order?: SortOrder$4;
2397
- }
2398
- declare enum SortOrder$4 {
2399
- /** Sort by ascending order. */
2400
- ASC = "ASC",
2401
- /** Sort by descending order. */
2402
- DESC = "DESC"
2403
- }
2404
- interface Paging$2 {
2405
- /**
2406
- * Number of items to return.
2407
- *
2408
- * Defaults to `100`.
2409
- */
2410
- limit?: number | null;
2411
- /**
2412
- * Number of items to skip in the current sort order.
2413
- *
2414
- * Defaults to `0`.
2415
- */
2416
- offset?: number | null;
2417
- }
2418
- interface PagingMetadata$2 {
2419
- /** Number of items returned. */
2420
- count?: number | null;
2421
- /** Requested offset. */
2422
- offset?: number | null;
2423
- /** Number of items that matched the query. */
2424
- total?: number | null;
2425
- /**
2426
- * Indicates if `total` calculation timed out before the response was sent.
2427
- * Typically this happens if there is a large set of results.
2428
- */
2429
- tooManyToCount?: boolean | null;
2430
- }
2431
- /** Custom field to find or create. */
2432
- interface FindOrCreateExtendedFieldRequest {
2433
- /**
2434
- * Display name to retrieve or create.
2435
- *
2436
- * If an existing custom field is an exact match
2437
- * for the specified display name,
2438
- * the existing field is returned.
2439
- * If not, a new field is created and returned.
2440
- */
2441
- displayName: string;
2442
- /**
2443
- * Type of data the field holds.
2444
- * Ignored if an existing field is an exact match
2445
- * for the specified display name.
2446
- */
2447
- dataType?: FieldDataType;
2448
- }
2449
- /** Extended field that was found or created. */
2450
- interface FindOrCreateExtendedFieldResponse {
2451
- /** Extended field that was found or created. */
2452
- field?: ExtendedField;
2453
- /**
2454
- * Indicates whether the extended field was just created or already existed.
2455
- *
2456
- * Returns `true` if the field was just created.
2457
- */
2458
- newField?: boolean;
2459
- }
2460
- interface GetExtendedFieldRequest {
2461
- /**
2462
- * Extended field key.
2463
- *
2464
- * When accessing contact data,
2465
- * extended field values are available at `info.extendedFields.items[key]`.
2466
- * For example, if the key is "custom.patronus",
2467
- * the value can be accessed at `info.extendedFields.items["custom.patronus"]`.
2468
- *
2469
- * `key` is generated when the extended field is created.
2470
- * It can't be modified, even if `displayName` is updated.
2471
- */
2472
- key: string;
2473
- }
2474
- /** The specified field. */
2475
- interface GetExtendedFieldResponse {
2476
- /** The specified field. */
2477
- field?: ExtendedField;
2478
- }
2479
- interface UpdateExtendedFieldRequest {
2480
- /** Extended field to rename. */
2481
- field?: ExtendedField;
2482
- }
2483
- /** Updated extended field. */
2484
- interface UpdateExtendedFieldResponse {
2485
- /** Renamed extended field. */
2486
- field?: ExtendedField;
2487
- }
2488
- interface DeleteExtendedFieldRequest {
2489
- /** Extended field key. */
2490
- key: string;
2491
- }
2492
- interface DeleteExtendedFieldResponse {
2493
- }
2494
- interface QueryExtendedFieldsRequest {
2495
- /** Query options. */
2496
- query?: Query$2;
2497
- }
2498
- interface Query$2 {
2499
- /**
2500
- * ilter object.
2501
- *
2502
- * Possible filters: `$eq`, `$gt`, `$gte`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.
2503
- *
2504
- * For a detailed list of supported filters, see [sorting and filtering for extended fields](https://dev.wix.com/api/rest/contacts/extended-fields/sort-and-filter).
2505
- *
2506
- * Example: `{ "filter": {
2507
- * "displayName": {
2508
- * "$startsWith": "Referral"
2509
- * }
2510
- * }
2511
- * }`
2512
- */
2513
- filter?: Record<string, any> | null;
2514
- /**
2515
- * Sorting options. Currently supports sorting on one field only.
2516
- *
2517
- * Example: `{ "sort": [{"fieldName": "displayName", "order": "DESC"}] }`
2518
- */
2519
- sort?: Sorting$4[];
2520
- /** Pagination options. */
2521
- paging?: Paging$2;
2522
- }
2523
- interface QueryExtendedFieldsResponse {
2524
- /** List of extended fields. */
2525
- fields?: ExtendedField[];
2526
- /** Details on the paged set of results returned. */
2527
- pagingMetadata?: PagingMetadata$2;
2528
- }
2529
- interface ExtendedFieldNonNullableFields {
2530
- key: string;
2531
- displayName: string;
2532
- dataType: FieldDataType;
2533
- fieldType: FieldType;
2534
- }
2535
- interface FindOrCreateExtendedFieldResponseNonNullableFields {
2536
- field?: ExtendedFieldNonNullableFields;
2537
- newField: boolean;
2538
- }
2539
- interface GetExtendedFieldResponseNonNullableFields {
2540
- field?: ExtendedFieldNonNullableFields;
2541
- }
2542
- interface UpdateExtendedFieldResponseNonNullableFields {
2543
- field?: ExtendedFieldNonNullableFields;
2544
- }
2545
- interface QueryExtendedFieldsResponseNonNullableFields {
2546
- fields: ExtendedFieldNonNullableFields[];
2547
- }
2548
-
2549
- type __PublicMethodMetaInfo$3<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
2550
- getUrl: (context: any) => string;
2551
- httpMethod: K;
2552
- path: string;
2553
- pathParams: M;
2554
- __requestType: T;
2555
- __originalRequestType: S;
2556
- __responseType: Q;
2557
- __originalResponseType: R;
2558
- };
2559
- declare function findOrCreateExtendedField(): __PublicMethodMetaInfo$3<'POST', {}, FindOrCreateExtendedFieldRequest, FindOrCreateExtendedFieldRequest$1, FindOrCreateExtendedFieldResponse & FindOrCreateExtendedFieldResponseNonNullableFields, FindOrCreateExtendedFieldResponse$1 & FindOrCreateExtendedFieldResponseNonNullableFields$1>;
2560
- declare function getExtendedField(): __PublicMethodMetaInfo$3<'GET', {
2561
- key: string;
2562
- }, GetExtendedFieldRequest, GetExtendedFieldRequest$1, GetExtendedFieldResponse & GetExtendedFieldResponseNonNullableFields, GetExtendedFieldResponse$1 & GetExtendedFieldResponseNonNullableFields$1>;
2563
- declare function renameExtendedField(): __PublicMethodMetaInfo$3<'PATCH', {
2564
- fieldKey: string;
2565
- }, UpdateExtendedFieldRequest, UpdateExtendedFieldRequest$1, UpdateExtendedFieldResponse & UpdateExtendedFieldResponseNonNullableFields, UpdateExtendedFieldResponse$1 & UpdateExtendedFieldResponseNonNullableFields$1>;
2566
- declare function deleteExtendedField(): __PublicMethodMetaInfo$3<'DELETE', {
2567
- key: string;
2568
- }, DeleteExtendedFieldRequest, DeleteExtendedFieldRequest$1, DeleteExtendedFieldResponse, DeleteExtendedFieldResponse$1>;
2569
- declare function queryExtendedFields(): __PublicMethodMetaInfo$3<'POST', {}, QueryExtendedFieldsRequest, QueryExtendedFieldsRequest$1, QueryExtendedFieldsResponse & QueryExtendedFieldsResponseNonNullableFields, QueryExtendedFieldsResponse$1 & QueryExtendedFieldsResponseNonNullableFields$1>;
2570
-
2571
- declare const meta$3_deleteExtendedField: typeof deleteExtendedField;
2572
- declare const meta$3_findOrCreateExtendedField: typeof findOrCreateExtendedField;
2573
- declare const meta$3_getExtendedField: typeof getExtendedField;
2574
- declare const meta$3_queryExtendedFields: typeof queryExtendedFields;
2575
- declare const meta$3_renameExtendedField: typeof renameExtendedField;
2576
- declare namespace meta$3 {
2577
- export { type __PublicMethodMetaInfo$3 as __PublicMethodMetaInfo, meta$3_deleteExtendedField as deleteExtendedField, meta$3_findOrCreateExtendedField as findOrCreateExtendedField, meta$3_getExtendedField as getExtendedField, meta$3_queryExtendedFields as queryExtendedFields, meta$3_renameExtendedField as renameExtendedField };
2578
- }
2579
-
2580
- /** Label that was found or created. */
2581
- interface ContactLabel$1 {
2582
- /**
2583
- * Label namespace.
2584
- *
2585
- * Labels created by calling the Find Or Create Label method
2586
- * are automatically assigned to the `custom` namespace.
2587
- * @readonly
2588
- */
2589
- namespace?: string | null;
2590
- /**
2591
- * Display name for the namespace,
2592
- * used to organize the list of labels in the site dashboard.
2593
- * @readonly
2594
- */
2595
- namespaceDisplayName?: string | null;
2596
- /**
2597
- * Label key.
2598
- *
2599
- * `key` is generated when the label is created.
2600
- * It can't be modified, even if `displayName` is updated.
2601
- * @readonly
2602
- */
2603
- key?: string;
2604
- /** Label display name shown in the dashboard. */
2605
- displayName?: string;
2606
- /**
2607
- * Label type indicating how the label was created.
2608
- * @readonly
2609
- */
2610
- labelType?: LabelType$1;
2611
- /**
2612
- * Date and time the label was created.
2613
- * @readonly
2614
- */
2615
- createdDate?: Date | null;
2616
- /**
2617
- * Date and time the label was last updated.
2618
- * @readonly
2619
- */
2620
- updatedDate?: Date | null;
2621
- }
2622
- declare enum LabelType$1 {
2623
- /** Default system label for the contact list. */
2624
- SYSTEM = "SYSTEM",
2625
- /** Label created by calling the Find Or Create Label method. */
2626
- USER_DEFINED = "USER_DEFINED",
2627
- /** Label created by an app built by Wix. */
2628
- WIX_APP_DEFINED = "WIX_APP_DEFINED"
2629
- }
2630
- interface Sorting$3 {
2631
- /** Name of the field to sort by. */
2632
- fieldName?: string;
2633
- /**
2634
- * Sort order.
2635
- *
2636
- * Default: `ASC`.
2637
- */
2638
- order?: SortOrder$3;
2639
- }
2640
- declare enum SortOrder$3 {
2641
- /** Sort by ascending order. */
2642
- ASC = "ASC",
2643
- /** Sort by descending order. */
2644
- DESC = "DESC"
2645
- }
2646
- interface Paging$1 {
2647
- /**
2648
- * Number of items to return.
2649
- *
2650
- * Defaults to `1000`. <br>
2651
- * Maximum: `2000`.
2652
- */
2653
- limit?: number | null;
2654
- /** Number of items to skip in the current sort order. */
2655
- offset?: number | null;
2656
- }
2657
- interface PagingMetadata$1 {
2658
- /** Number of items returned. */
2659
- count?: number | null;
2660
- /** Requested offset. */
2661
- offset?: number | null;
2662
- /** Number of items that matched the query. */
2663
- total?: number | null;
2664
- /**
2665
- * Indicates if `total` calculation timed out before the response was sent.
2666
- * Typically this happens if there is a large set of results.
2667
- */
2668
- tooManyToCount?: boolean | null;
2669
- }
2670
- /** Label to find or create. */
2671
- interface FindOrCreateLabelRequest$1 {
2672
- /**
2673
- * Display name to retrieve or create.
2674
- *
2675
- * If an existing label is an exact match
2676
- * for the specified display name,
2677
- * the existing label is returned.
2678
- * If not, a new label is created and returned.
2679
- */
2680
- displayName: string;
2681
- /**
2682
- * Language for localization.
2683
- * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
2684
- */
2685
- language?: string | null;
2686
- }
2687
- /** Label that was found or created. */
2688
- interface FindOrCreateLabelResponse$1 {
2689
- /** Label that was found or created. */
2690
- label?: ContactLabel$1;
2691
- /**
2692
- * Indicates whether the label was just created or already existed.
2693
- *
2694
- * Returns `true` if the label was just created.
2695
- */
2696
- newLabel?: boolean;
2697
- }
2698
- interface GetLabelRequest$1 {
2699
- /**
2700
- * Label key.
2701
- *
2702
- * `key` is generated when the label is created.
2703
- * It can't be modified, even if `displayName` is updated.
2704
- */
2705
- key: string;
2706
- /**
2707
- * Language for localization.
2708
- * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
2709
- */
2710
- language?: string | null;
2711
- }
2712
- /** The specified label. */
2713
- interface GetLabelResponse$1 {
2714
- /** The specified label. */
2715
- label?: ContactLabel$1;
2716
- }
2717
- interface UpdateLabelRequest$1 {
2718
- /** Label to rename. */
2719
- label?: ContactLabel$1;
2720
- /**
2721
- * Language for localization.
2722
- * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
2723
- */
2724
- language?: string | null;
2725
- }
2726
- /** Updated label. */
2727
- interface UpdateLabelResponse$1 {
2728
- /** Renamed label. */
2729
- label?: ContactLabel$1;
2730
- }
2731
- interface DeleteLabelRequest$1 {
2732
- /** Label key to delete. */
2733
- key: string;
2734
- }
2735
- interface DeleteLabelResponse$1 {
2736
- }
2737
- interface QueryLabelsRequest$1 {
2738
- /** Query options. */
2739
- query?: Query$1;
2740
- /**
2741
- * Language for localization.
2742
- * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
2743
- */
2744
- language?: string | null;
2745
- }
2746
- interface Query$1 {
2747
- /**
2748
- * ilter object.
2749
- *
2750
- * Possible filters: `$eq`, `$gt`, `$gte`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.
2751
- *
2752
- * For a detailed list of supported filters, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter).
2753
- *
2754
- * Example: `{ "filter": {
2755
- * "displayName": {
2756
- * "$startsWith": "Referral"
2757
- * }
2758
- * }
2759
- * }`
2760
- */
2761
- filter?: Record<string, any> | null;
2762
- /**
2763
- * Sorting options. For a list of fields that can be sorted, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter).
2764
- *
2765
- * Example: `{ "sort": [{"fieldName": "displayName", "order": "DESC"}] }`
2766
- */
2767
- sort?: Sorting$3[];
2768
- /** Pagination options. */
2769
- paging?: Paging$1;
2770
- }
2771
- interface QueryLabelsResponse$1 {
2772
- /** List of labels */
2773
- labels?: ContactLabel$1[];
2774
- /** Details on the paged set of results returned. */
2775
- pagingMetadata?: PagingMetadata$1;
2776
- }
2777
- interface ContactLabelNonNullableFields$1 {
2778
- key: string;
2779
- displayName: string;
2780
- labelType: LabelType$1;
2781
- }
2782
- interface FindOrCreateLabelResponseNonNullableFields$1 {
2783
- label?: ContactLabelNonNullableFields$1;
2784
- newLabel: boolean;
2785
- }
2786
- interface GetLabelResponseNonNullableFields$1 {
2787
- label?: ContactLabelNonNullableFields$1;
2788
- }
2789
- interface UpdateLabelResponseNonNullableFields$1 {
2790
- label?: ContactLabelNonNullableFields$1;
2791
- }
2792
- interface QueryLabelsResponseNonNullableFields$1 {
2793
- labels: ContactLabelNonNullableFields$1[];
2794
- }
2795
-
2796
- /** Label that was found or created. */
2797
- interface ContactLabel {
2798
- /**
2799
- * Label namespace.
2800
- *
2801
- * Labels created by calling the Find Or Create Label method
2802
- * are automatically assigned to the `custom` namespace.
2803
- * @readonly
2804
- */
2805
- namespace?: string | null;
2806
- /**
2807
- * Display name for the namespace,
2808
- * used to organize the list of labels in the site dashboard.
2809
- * @readonly
2810
- */
2811
- namespaceDisplayName?: string | null;
2812
- /**
2813
- * Label key.
2814
- *
2815
- * `key` is generated when the label is created.
2816
- * It can't be modified, even if `displayName` is updated.
2817
- * @readonly
2818
- */
2819
- key?: string;
2820
- /** Label display name shown in the dashboard. */
2821
- displayName?: string;
2822
- /**
2823
- * Label type indicating how the label was created.
2824
- * @readonly
2825
- */
2826
- labelType?: LabelType;
2827
- /**
2828
- * Date and time the label was created.
2829
- * @readonly
2830
- */
2831
- _createdDate?: Date | null;
2832
- /**
2833
- * Date and time the label was last updated.
2834
- * @readonly
2835
- */
2836
- _updatedDate?: Date | null;
2837
- }
2838
- declare enum LabelType {
2839
- /** Default system label for the contact list. */
2840
- SYSTEM = "SYSTEM",
2841
- /** Label created by calling the Find Or Create Label method. */
2842
- USER_DEFINED = "USER_DEFINED",
2843
- /** Label created by an app built by Wix. */
2844
- WIX_APP_DEFINED = "WIX_APP_DEFINED"
2845
- }
2846
- interface Sorting$2 {
2847
- /** Name of the field to sort by. */
2848
- fieldName?: string;
2849
- /**
2850
- * Sort order.
2851
- *
2852
- * Default: `ASC`.
2853
- */
2854
- order?: SortOrder$2;
2855
- }
2856
- declare enum SortOrder$2 {
2857
- /** Sort by ascending order. */
2858
- ASC = "ASC",
2859
- /** Sort by descending order. */
2860
- DESC = "DESC"
2861
- }
2862
- interface Paging {
2863
- /**
2864
- * Number of items to return.
2865
- *
2866
- * Defaults to `1000`. <br>
2867
- * Maximum: `2000`.
2868
- */
2869
- limit?: number | null;
2870
- /** Number of items to skip in the current sort order. */
2871
- offset?: number | null;
2872
- }
2873
- interface PagingMetadata {
2874
- /** Number of items returned. */
2875
- count?: number | null;
2876
- /** Requested offset. */
2877
- offset?: number | null;
2878
- /** Number of items that matched the query. */
2879
- total?: number | null;
2880
- /**
2881
- * Indicates if `total` calculation timed out before the response was sent.
2882
- * Typically this happens if there is a large set of results.
2883
- */
2884
- tooManyToCount?: boolean | null;
2885
- }
2886
- /** Label to find or create. */
2887
- interface FindOrCreateLabelRequest {
2888
- /**
2889
- * Display name to retrieve or create.
2890
- *
2891
- * If an existing label is an exact match
2892
- * for the specified display name,
2893
- * the existing label is returned.
2894
- * If not, a new label is created and returned.
2895
- */
2896
- displayName: string;
2897
- /**
2898
- * Language for localization.
2899
- * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
2900
- */
2901
- language?: string | null;
2902
- }
2903
- /** Label that was found or created. */
2904
- interface FindOrCreateLabelResponse {
2905
- /** Label that was found or created. */
2906
- label?: ContactLabel;
2907
- /**
2908
- * Indicates whether the label was just created or already existed.
2909
- *
2910
- * Returns `true` if the label was just created.
2911
- */
2912
- newLabel?: boolean;
2913
- }
2914
- interface GetLabelRequest {
2915
- /**
2916
- * Label key.
2917
- *
2918
- * `key` is generated when the label is created.
2919
- * It can't be modified, even if `displayName` is updated.
2920
- */
2921
- key: string;
2922
- /**
2923
- * Language for localization.
2924
- * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
2925
- */
2926
- language?: string | null;
2927
- }
2928
- /** The specified label. */
2929
- interface GetLabelResponse {
2930
- /** The specified label. */
2931
- label?: ContactLabel;
2932
- }
2933
- interface UpdateLabelRequest {
2934
- /** Label to rename. */
2935
- label?: ContactLabel;
2936
- /**
2937
- * Language for localization.
2938
- * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
2939
- */
2940
- language?: string | null;
2941
- }
2942
- /** Updated label. */
2943
- interface UpdateLabelResponse {
2944
- /** Renamed label. */
2945
- label?: ContactLabel;
2946
- }
2947
- interface DeleteLabelRequest {
2948
- /** Label key to delete. */
2949
- key: string;
2950
- }
2951
- interface DeleteLabelResponse {
2952
- }
2953
- interface QueryLabelsRequest {
2954
- /** Query options. */
2955
- query?: Query;
2956
- /**
2957
- * Language for localization.
2958
- * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
2959
- */
2960
- language?: string | null;
2961
- }
2962
- interface Query {
2963
- /**
2964
- * ilter object.
2965
- *
2966
- * Possible filters: `$eq`, `$gt`, `$gte`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.
2967
- *
2968
- * For a detailed list of supported filters, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter).
2969
- *
2970
- * Example: `{ "filter": {
2971
- * "displayName": {
2972
- * "$startsWith": "Referral"
2973
- * }
2974
- * }
2975
- * }`
2976
- */
2977
- filter?: Record<string, any> | null;
2978
- /**
2979
- * Sorting options. For a list of fields that can be sorted, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter).
2980
- *
2981
- * Example: `{ "sort": [{"fieldName": "displayName", "order": "DESC"}] }`
2982
- */
2983
- sort?: Sorting$2[];
2984
- /** Pagination options. */
2985
- paging?: Paging;
2986
- }
2987
- interface QueryLabelsResponse {
2988
- /** List of labels */
2989
- labels?: ContactLabel[];
2990
- /** Details on the paged set of results returned. */
2991
- pagingMetadata?: PagingMetadata;
2992
- }
2993
- interface ContactLabelNonNullableFields {
2994
- key: string;
2995
- displayName: string;
2996
- labelType: LabelType;
2997
- }
2998
- interface FindOrCreateLabelResponseNonNullableFields {
2999
- label?: ContactLabelNonNullableFields;
3000
- newLabel: boolean;
3001
- }
3002
- interface GetLabelResponseNonNullableFields {
3003
- label?: ContactLabelNonNullableFields;
3004
- }
3005
- interface UpdateLabelResponseNonNullableFields {
3006
- label?: ContactLabelNonNullableFields;
3007
- }
3008
- interface QueryLabelsResponseNonNullableFields {
3009
- labels: ContactLabelNonNullableFields[];
3010
- }
3011
-
3012
- type __PublicMethodMetaInfo$2<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
3013
- getUrl: (context: any) => string;
3014
- httpMethod: K;
3015
- path: string;
3016
- pathParams: M;
3017
- __requestType: T;
3018
- __originalRequestType: S;
3019
- __responseType: Q;
3020
- __originalResponseType: R;
3021
- };
3022
- declare function findOrCreateLabel(): __PublicMethodMetaInfo$2<'POST', {}, FindOrCreateLabelRequest, FindOrCreateLabelRequest$1, FindOrCreateLabelResponse & FindOrCreateLabelResponseNonNullableFields, FindOrCreateLabelResponse$1 & FindOrCreateLabelResponseNonNullableFields$1>;
3023
- declare function getLabel(): __PublicMethodMetaInfo$2<'GET', {
3024
- key: string;
3025
- }, GetLabelRequest, GetLabelRequest$1, GetLabelResponse & GetLabelResponseNonNullableFields, GetLabelResponse$1 & GetLabelResponseNonNullableFields$1>;
3026
- declare function renameLabel(): __PublicMethodMetaInfo$2<'PATCH', {
3027
- labelKey: string;
3028
- }, UpdateLabelRequest, UpdateLabelRequest$1, UpdateLabelResponse & UpdateLabelResponseNonNullableFields, UpdateLabelResponse$1 & UpdateLabelResponseNonNullableFields$1>;
3029
- declare function deleteLabel(): __PublicMethodMetaInfo$2<'DELETE', {
3030
- key: string;
3031
- }, DeleteLabelRequest, DeleteLabelRequest$1, DeleteLabelResponse, DeleteLabelResponse$1>;
3032
- declare function queryLabels(): __PublicMethodMetaInfo$2<'POST', {}, QueryLabelsRequest, QueryLabelsRequest$1, QueryLabelsResponse & QueryLabelsResponseNonNullableFields, QueryLabelsResponse$1 & QueryLabelsResponseNonNullableFields$1>;
3033
-
3034
- declare const meta$2_deleteLabel: typeof deleteLabel;
3035
- declare const meta$2_findOrCreateLabel: typeof findOrCreateLabel;
3036
- declare const meta$2_getLabel: typeof getLabel;
3037
- declare const meta$2_queryLabels: typeof queryLabels;
3038
- declare const meta$2_renameLabel: typeof renameLabel;
3039
- declare namespace meta$2 {
3040
- export { type __PublicMethodMetaInfo$2 as __PublicMethodMetaInfo, meta$2_deleteLabel as deleteLabel, meta$2_findOrCreateLabel as findOrCreateLabel, meta$2_getLabel as getLabel, meta$2_queryLabels as queryLabels, meta$2_renameLabel as renameLabel };
3041
- }
3042
-
3043
- interface SubmitContactRequest$1 {
3044
- /**
3045
- * Contact's information.
3046
- * To reconcile with an existing contact,
3047
- * a phone or email must be provided,
3048
- * or the current session identity must be attached to a contact or member.
3049
- *
3050
- * If no existing contact can be found,
3051
- * a new contact is created with the specified information.
3052
- *
3053
- * <!--ONLY:REST-->
3054
- * Required if there's no contextual identity or given `contactId`.
3055
- * <!--END:ONLY:REST-->
3056
- */
3057
- info?: ContactInfo$3;
3058
- /** Pass through data, to be posted on Contact Submitted Domain Event (optional). */
3059
- passThroughData?: string | null;
3060
- /**
3061
- * Existing Contact ID (optional).
3062
- * Requires permission `CONTACTS.SUBMIT_WITH_OVERRIDES`
3063
- */
3064
- contactId?: string | null;
3065
- }
3066
- interface ContactInfo$3 {
3067
- /** Contact's first and last name. */
3068
- name?: ContactName$1;
3069
- /** Contact's email addresses. */
3070
- emails?: ContactEmailsWrapper$1;
3071
- /** Contact's phone numbers. */
3072
- phones?: ContactPhonesWrapper$1;
3073
- /** Contact's street addresses. */
3074
- addresses?: ContactAddressesWrapper$1;
3075
- /** Contact's company name. */
3076
- company?: string | null;
3077
- /** Contact's job title. */
3078
- jobTitle?: string | null;
3079
- /** Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`. */
3080
- birthdate?: string | null;
3081
- /**
3082
- * Locale in
3083
- * [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
3084
- * Typically, this is a lowercase 2-letter language code,
3085
- * followed by a hyphen, followed by an uppercase 2-letter country code.
3086
- * For example, `en-US` for U.S. English, and `de-DE` for Germany German.
3087
- */
3088
- locale?: string | null;
3089
- /**
3090
- * List of contact's labels.
3091
- *
3092
- * Labels are used to organize contacts. Labels can be
3093
- * added and removed using Label Contact and Unlabel Contact, respectively.
3094
- *
3095
- * To view or manage contact labels, use the Labels API.
3096
- */
3097
- labelKeys?: LabelsWrapper$1;
3098
- /**
3099
- * Additional custom fields.
3100
- *
3101
- * Empty fields are not returned.
3102
- */
3103
- extendedFields?: ExtendedFieldsWrapper$1;
3104
- /** Contact's profile picture. */
3105
- picture?: ContactPicture$1;
3106
- }
3107
- interface ContactName$1 {
3108
- /** Contact's first name. */
3109
- first?: string | null;
3110
- /** Contact's last name. */
3111
- last?: string | null;
3112
- }
3113
- interface ContactEmailsWrapper$1 {
3114
- /** List of up to 50 email addresses. */
3115
- items?: ContactEmail$1[];
3116
- }
3117
- interface ContactEmail$1 {
3118
- /**
3119
- * Email ID.
3120
- * @readonly
3121
- */
3122
- id?: string | null;
3123
- /**
3124
- * Email type.
3125
- *
3126
- * `UNTAGGED` is shown as "Other" in the Contact List.
3127
- */
3128
- tag?: EmailTag$1;
3129
- /** Email address. */
3130
- email?: string;
3131
- /**
3132
- * Indicates whether this is the contact's primary email address.
3133
- * When changing `primary` to `true` for an email,
3134
- * the contact's other emails become `false`.
3135
- * Changing the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email.
3136
- */
3137
- primary?: boolean | null;
3138
- }
3139
- declare enum EmailTag$1 {
3140
- UNTAGGED = "UNTAGGED",
3141
- MAIN = "MAIN",
3142
- HOME = "HOME",
3143
- WORK = "WORK"
3144
- }
3145
- interface ContactPhonesWrapper$1 {
3146
- /** List of up to 50 phone numbers. */
3147
- items?: ContactPhone$1[];
3148
- }
3149
- interface ContactPhone$1 {
3150
- /**
3151
- * Phone ID.
3152
- * @readonly
3153
- */
3154
- id?: string | null;
3155
- /**
3156
- * Phone type.
3157
- *
3158
- * `UNTAGGED` is shown as "Other" in the Contact List.
3159
- */
3160
- tag?: PhoneTag$1;
3161
- /** [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. */
3162
- countryCode?: string | null;
3163
- /** Phone number. */
3164
- phone?: string;
3165
- /**
3166
- * [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)
3167
- * phone number.
3168
- * Automatically generated using `phone` and `countryCode`, pending both values are valid.
3169
- * @readonly
3170
- */
3171
- e164Phone?: string | null;
3172
- /**
3173
- * Indicates whether this is the contact's primary phone number.
3174
- * When changing `primary` to `true` for a phone,
3175
- * the contact's `primary` field for other phones becomes `false`.
3176
- * Changing the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone.
3177
- */
3178
- primary?: boolean | null;
3179
- }
3180
- declare enum PhoneTag$1 {
3181
- UNTAGGED = "UNTAGGED",
3182
- MAIN = "MAIN",
3183
- HOME = "HOME",
3184
- MOBILE = "MOBILE",
3185
- WORK = "WORK",
3186
- FAX = "FAX"
3187
- }
3188
- interface ContactAddressesWrapper$1 {
3189
- /** List of up to 50 addresses. */
3190
- items?: ContactAddress$1[];
3191
- }
3192
- interface ContactAddress$1 {
3193
- /**
3194
- * Street address ID.
3195
- * @readonly
3196
- */
3197
- id?: string | null;
3198
- /**
3199
- * Address type.
3200
- * `UNTAGGED` is shown as "Other" in the Contact List.
3201
- */
3202
- tag?: AddressTag$1;
3203
- /** Street address. */
3204
- address?: Address$1;
3205
- }
3206
- declare enum AddressTag$1 {
3207
- UNTAGGED = "UNTAGGED",
3208
- HOME = "HOME",
3209
- WORK = "WORK",
3210
- BILLING = "BILLING",
3211
- SHIPPING = "SHIPPING"
3212
- }
3213
- /** Physical address */
3214
- interface Address$1 extends AddressStreetOneOf$1 {
3215
- /** Street address object, with number and name in separate fields. */
3216
- streetAddress?: StreetAddress$1;
3217
- /** Main address line, usually street and number, as free text. */
3218
- addressLine?: string | null;
3219
- /**
3220
- * 2-letter country code in an
3221
- * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
3222
- */
3223
- country?: string | null;
3224
- /**
3225
- * Code for a subdivision (such as state, prefecture, or province) in an
3226
- * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
3227
- */
3228
- subdivision?: string | null;
3229
- /** City name. */
3230
- city?: string | null;
3231
- /** Postal or zip code. */
3232
- postalCode?: string | null;
3233
- /**
3234
- * Free text providing more detailed address information,
3235
- * such as apartment, suite, or floor.
3236
- */
3237
- addressLine2?: string | null;
3238
- }
3239
- /** @oneof */
3240
- interface AddressStreetOneOf$1 {
3241
- /** Street address object, with number and name in separate fields. */
3242
- streetAddress?: StreetAddress$1;
3243
- /** Main address line, usually street and number, as free text. */
3244
- addressLine?: string | null;
3245
- }
3246
- interface StreetAddress$1 {
3247
- /** Street number. */
3248
- number?: string;
3249
- /** Street name. */
3250
- name?: string;
3251
- }
3252
- interface LabelsWrapper$1 {
3253
- /**
3254
- * List of contact label keys.
3255
- *
3256
- * Contact labels help categorize contacts. Label keys must exist to be added to the contact.
3257
- * Contact labels can be created or retrieved with Find or Create Label or List Labels.
3258
- */
3259
- items?: string[];
3260
- }
3261
- interface ExtendedFieldsWrapper$1 {
3262
- /**
3263
- * Contact's extended fields,
3264
- * where each key is the field key,
3265
- * and each value is the field's value for the contact.
3266
- *
3267
- * To view and manage extended fields, use the Extended Fields API.
3268
- */
3269
- items?: Record<string, any>;
3270
- }
3271
- /** TEST contact picture description */
3272
- interface ContactPicture$1 {
3273
- /**
3274
- * Image.
3275
- * This can contain an image URL or a Wix Media image ID.
3276
- */
3277
- image?: Image;
3278
- }
3279
- interface Image {
3280
- /**
3281
- * WixMedia image ID.
3282
- * This property is written by Wix when an image is uploaded to the Wix Media Manager.
3283
- */
3284
- id?: string;
3285
- /** Image source: Either a Media Manager URL or external URL. */
3286
- url?: string;
3287
- /** Height of the original image. */
3288
- height?: number;
3289
- /** Width of the original image. */
3290
- width?: number;
3291
- /** Image alt text (optional). */
3292
- altText?: string | null;
3293
- /**
3294
- * Image URL expiration date (optional).
3295
- * @readonly
3296
- */
3297
- urlExpirationDate?: Date | null;
3298
- }
3299
- interface SubmitContactResponse$1 {
3300
- /** ID of the contact that was found or created. */
3301
- contactId?: string;
3302
- /**
3303
- * Identity type of the returned contact.
3304
- *
3305
- * - `CONTACT`: The returned contact ID belongs to a new or existing contact.
3306
- * - `MEMBER`: The returned contact ID belongs to the currently logged-in site member.
3307
- * - `NOT_AUTHENTICATED_MEMBER`: The returned contact ID belongs to a site member who is not currently logged in.
3308
- */
3309
- identityType?: IdentityType$1;
3310
- /**
3311
- * Indicates whether the contact was just created or already existed.
3312
- *
3313
- * If the contact was just created, returns `true`.
3314
- * If it already existed, returns `false`.
3315
- */
3316
- newContact?: boolean;
3317
- }
3318
- declare enum IdentityType$1 {
3319
- UNKNOWN = "UNKNOWN",
3320
- /** Existing or new contact */
3321
- CONTACT = "CONTACT",
3322
- /** Member is logged in, matching logic skipped */
3323
- MEMBER = "MEMBER",
3324
- /** Matching contact is a member, Merge logic won't be applied */
3325
- NOT_AUTHENTICATED_MEMBER = "NOT_AUTHENTICATED_MEMBER"
3326
- }
3327
- interface SubmitContactResponseNonNullableFields$1 {
3328
- contactId: string;
3329
- identityType: IdentityType$1;
3330
- newContact: boolean;
3331
- }
3332
-
3333
- interface SubmitContactRequest {
3334
- /**
3335
- * Contact's information.
3336
- * To reconcile with an existing contact,
3337
- * a phone or email must be provided,
3338
- * or the current session identity must be attached to a contact or member.
3339
- *
3340
- * If no existing contact can be found,
3341
- * a new contact is created with the specified information.
3342
- *
3343
- * <!--ONLY:REST-->
3344
- * Required if there's no contextual identity or given `contactId`.
3345
- * <!--END:ONLY:REST-->
3346
- */
3347
- info?: ContactInfo$2;
3348
- /** Pass through data, to be posted on Contact Submitted Domain Event (optional). */
3349
- passThroughData?: string | null;
3350
- /**
3351
- * Existing Contact ID (optional).
3352
- * Requires permission `CONTACTS.SUBMIT_WITH_OVERRIDES`
3353
- */
3354
- contactId?: string | null;
3355
- }
3356
- interface ContactInfo$2 {
3357
- /** Contact's first and last name. */
3358
- name?: ContactName;
3359
- /** Contact's email addresses. */
3360
- emails?: ContactEmailsWrapper;
3361
- /** Contact's phone numbers. */
3362
- phones?: ContactPhonesWrapper;
3363
- /** Contact's street addresses. */
3364
- addresses?: ContactAddressesWrapper;
3365
- /** Contact's company name. */
3366
- company?: string | null;
3367
- /** Contact's job title. */
3368
- jobTitle?: string | null;
3369
- /** Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`. */
3370
- birthdate?: string | null;
3371
- /**
3372
- * Locale in
3373
- * [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
3374
- * Typically, this is a lowercase 2-letter language code,
3375
- * followed by a hyphen, followed by an uppercase 2-letter country code.
3376
- * For example, `en-US` for U.S. English, and `de-DE` for Germany German.
3377
- */
3378
- locale?: string | null;
3379
- /**
3380
- * List of contact's labels.
3381
- *
3382
- * Labels are used to organize contacts. Labels can be
3383
- * added and removed using Label Contact and Unlabel Contact, respectively.
3384
- *
3385
- * To view or manage contact labels, use the Labels API.
3386
- */
3387
- labelKeys?: LabelsWrapper;
3388
- /**
3389
- * Additional custom fields.
3390
- *
3391
- * Empty fields are not returned.
3392
- */
3393
- extendedFields?: ExtendedFieldsWrapper;
3394
- /** Contact's profile picture. */
3395
- picture?: ContactPicture;
3396
- }
3397
- interface ContactName {
3398
- /** Contact's first name. */
3399
- first?: string | null;
3400
- /** Contact's last name. */
3401
- last?: string | null;
3402
- }
3403
- interface ContactEmailsWrapper {
3404
- /** List of up to 50 email addresses. */
3405
- items?: ContactEmail[];
3406
- }
3407
- interface ContactEmail {
3408
- /**
3409
- * Email ID.
3410
- * @readonly
3411
- */
3412
- _id?: string | null;
3413
- /**
3414
- * Email type.
3415
- *
3416
- * `UNTAGGED` is shown as "Other" in the Contact List.
3417
- */
3418
- tag?: EmailTag;
3419
- /** Email address. */
3420
- email?: string;
3421
- /**
3422
- * Indicates whether this is the contact's primary email address.
3423
- * When changing `primary` to `true` for an email,
3424
- * the contact's other emails become `false`.
3425
- * Changing the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email.
3426
- */
3427
- primary?: boolean | null;
3428
- }
3429
- declare enum EmailTag {
3430
- UNTAGGED = "UNTAGGED",
3431
- MAIN = "MAIN",
3432
- HOME = "HOME",
3433
- WORK = "WORK"
3434
- }
3435
- interface ContactPhonesWrapper {
3436
- /** List of up to 50 phone numbers. */
3437
- items?: ContactPhone[];
3438
- }
3439
- interface ContactPhone {
3440
- /**
3441
- * Phone ID.
3442
- * @readonly
3443
- */
3444
- _id?: string | null;
3445
- /**
3446
- * Phone type.
3447
- *
3448
- * `UNTAGGED` is shown as "Other" in the Contact List.
3449
- */
3450
- tag?: PhoneTag;
3451
- /** [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. */
3452
- countryCode?: string | null;
3453
- /** Phone number. */
3454
- phone?: string;
3455
- /**
3456
- * [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)
3457
- * phone number.
3458
- * Automatically generated using `phone` and `countryCode`, pending both values are valid.
3459
- * @readonly
3460
- */
3461
- e164Phone?: string | null;
3462
- /**
3463
- * Indicates whether this is the contact's primary phone number.
3464
- * When changing `primary` to `true` for a phone,
3465
- * the contact's `primary` field for other phones becomes `false`.
3466
- * Changing the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone.
3467
- */
3468
- primary?: boolean | null;
3469
- }
3470
- declare enum PhoneTag {
3471
- UNTAGGED = "UNTAGGED",
3472
- MAIN = "MAIN",
3473
- HOME = "HOME",
3474
- MOBILE = "MOBILE",
3475
- WORK = "WORK",
3476
- FAX = "FAX"
3477
- }
3478
- interface ContactAddressesWrapper {
3479
- /** List of up to 50 addresses. */
3480
- items?: ContactAddress[];
3481
- }
3482
- interface ContactAddress {
3483
- /**
3484
- * Street address ID.
3485
- * @readonly
3486
- */
3487
- _id?: string | null;
3488
- /**
3489
- * Address type.
3490
- * `UNTAGGED` is shown as "Other" in the Contact List.
3491
- */
3492
- tag?: AddressTag;
3493
- /** Street address. */
3494
- address?: Address;
3495
- }
3496
- declare enum AddressTag {
3497
- UNTAGGED = "UNTAGGED",
3498
- HOME = "HOME",
3499
- WORK = "WORK",
3500
- BILLING = "BILLING",
3501
- SHIPPING = "SHIPPING"
3502
- }
3503
- /** Physical address */
3504
- interface Address extends AddressStreetOneOf {
3505
- /** Street address object, with number and name in separate fields. */
3506
- streetAddress?: StreetAddress;
3507
- /** Main address line, usually street and number, as free text. */
3508
- addressLine1?: string | null;
3509
- /**
3510
- * 2-letter country code in an
3511
- * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
3512
- */
3513
- country?: string | null;
3514
- /**
3515
- * Code for a subdivision (such as state, prefecture, or province) in an
3516
- * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
3517
- */
3518
- subdivision?: string | null;
3519
- /** City name. */
3520
- city?: string | null;
3521
- /** Postal or zip code. */
3522
- postalCode?: string | null;
3523
- /**
3524
- * Free text providing more detailed address information,
3525
- * such as apartment, suite, or floor.
3526
- */
3527
- addressLine2?: string | null;
3528
- }
3529
- /** @oneof */
3530
- interface AddressStreetOneOf {
3531
- /** Street address object, with number and name in separate fields. */
3532
- streetAddress?: StreetAddress;
3533
- /** Main address line, usually street and number, as free text. */
3534
- addressLine?: string | null;
3535
- }
3536
- interface StreetAddress {
3537
- /** Street number. */
3538
- number?: string;
3539
- /** Street name. */
3540
- name?: string;
3541
- }
3542
- interface LabelsWrapper {
3543
- /**
3544
- * List of contact label keys.
3545
- *
3546
- * Contact labels help categorize contacts. Label keys must exist to be added to the contact.
3547
- * Contact labels can be created or retrieved with Find or Create Label or List Labels.
3548
- */
3549
- items?: string[];
3550
- }
3551
- interface ExtendedFieldsWrapper {
3552
- /**
3553
- * Contact's extended fields,
3554
- * where each key is the field key,
3555
- * and each value is the field's value for the contact.
3556
- *
3557
- * To view and manage extended fields, use the Extended Fields API.
3558
- */
3559
- items?: Record<string, any>;
3560
- }
3561
- /** TEST contact picture description */
3562
- interface ContactPicture {
3563
- /**
3564
- * Image.
3565
- * This can contain an image URL or a Wix Media image ID.
3566
- */
3567
- image?: string;
3568
- }
3569
- interface SubmitContactResponse {
3570
- /** ID of the contact that was found or created. */
3571
- contactId?: string;
3572
- /**
3573
- * Identity type of the returned contact.
3574
- *
3575
- * - `CONTACT`: The returned contact ID belongs to a new or existing contact.
3576
- * - `MEMBER`: The returned contact ID belongs to the currently logged-in site member.
3577
- * - `NOT_AUTHENTICATED_MEMBER`: The returned contact ID belongs to a site member who is not currently logged in.
3578
- */
3579
- identityType?: IdentityType;
3580
- /**
3581
- * Indicates whether the contact was just created or already existed.
3582
- *
3583
- * If the contact was just created, returns `true`.
3584
- * If it already existed, returns `false`.
3585
- */
3586
- newContact?: boolean;
3587
- }
3588
- declare enum IdentityType {
3589
- UNKNOWN = "UNKNOWN",
3590
- /** Existing or new contact */
3591
- CONTACT = "CONTACT",
3592
- /** Member is logged in, matching logic skipped */
3593
- MEMBER = "MEMBER",
3594
- /** Matching contact is a member, Merge logic won't be applied */
3595
- NOT_AUTHENTICATED_MEMBER = "NOT_AUTHENTICATED_MEMBER"
3596
- }
3597
- interface SubmitContactResponseNonNullableFields {
3598
- contactId: string;
3599
- identityType: IdentityType;
3600
- newContact: boolean;
3601
- }
3602
-
3603
- type __PublicMethodMetaInfo$1<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
3604
- getUrl: (context: any) => string;
3605
- httpMethod: K;
3606
- path: string;
3607
- pathParams: M;
3608
- __requestType: T;
3609
- __originalRequestType: S;
3610
- __responseType: Q;
3611
- __originalResponseType: R;
3612
- };
3613
- declare function appendOrCreateContact(): __PublicMethodMetaInfo$1<'POST', {}, SubmitContactRequest, SubmitContactRequest$1, SubmitContactResponse & SubmitContactResponseNonNullableFields, SubmitContactResponse$1 & SubmitContactResponseNonNullableFields$1>;
3614
-
3615
- declare const meta$1_appendOrCreateContact: typeof appendOrCreateContact;
3616
- declare namespace meta$1 {
3617
- export { type __PublicMethodMetaInfo$1 as __PublicMethodMetaInfo, meta$1_appendOrCreateContact as appendOrCreateContact };
3618
- }
3619
-
3620
- interface Task$1 {
3621
- /**
3622
- * Task ID.
3623
- * @readonly
3624
- */
3625
- id?: string | null;
3626
- /**
3627
- * Revision number, which increments by 1 each time the task is updated. To prevent conflicting changes, the existing `revision` must be used when updating a task.
3628
- * @readonly
3629
- */
3630
- revision?: string | null;
3631
- /** Title of the task. */
3632
- title?: string | null;
3633
- /** Description of the task. */
3634
- description?: string | null;
3635
- /**
3636
- * Date and time the task was created.
3637
- * @readonly
3638
- */
3639
- createdDate?: Date | null;
3640
- /**
3641
- * Date and time the task was last updated.
3642
- * @readonly
3643
- */
3644
- updatedDate?: Date | null;
3645
- /** Due date for the task. */
3646
- dueDate?: Date | null;
3647
- /**
3648
- * Status of the task.
3649
- *
3650
- * Default: `ACTION_NEEDED`
3651
- */
3652
- status?: TaskStatus$1;
3653
- /** Details about the task source. */
3654
- source?: TaskSource$1;
3655
- /** Information about the contact associated with the task. */
3656
- contact?: ContactInfo$1;
3657
- }
3658
- /** Possible statuses in which the task may be. */
3659
- declare enum TaskStatus$1 {
3660
- /** Action needed. */
3661
- ACTION_NEEDED = "ACTION_NEEDED",
3662
- /** Task completed. */
3663
- COMPLETED = "COMPLETED"
3664
- }
3665
- interface TaskSource$1 {
3666
- /**
3667
- * How the task was created.
3668
- * @readonly
3669
- */
3670
- sourceType?: SourceType$1;
3671
- /**
3672
- * App ID, if the task was created by an app.
3673
- * @readonly
3674
- */
3675
- appId?: string | null;
3676
- /**
3677
- * User ID, if the task was created by a Wix user.
3678
- * @readonly
3679
- */
3680
- userId?: string | null;
3681
- }
3682
- /** Possible sources that can create tasks. */
3683
- declare enum SourceType$1 {
3684
- /** Task was created by an app. */
3685
- APP = "APP",
3686
- /** Task was created by a Wix user. */
3687
- USER = "USER"
3688
- }
3689
- interface ContactInfo$1 {
3690
- /** ID of the contact associated with the task. */
3691
- id?: string | null;
3692
- /**
3693
- * Contact's first name.
3694
- * @readonly
3695
- */
3696
- firstName?: string | null;
3697
- /**
3698
- * Contact's last name.
3699
- * @readonly
3700
- */
3701
- lastName?: string | null;
3702
- /**
3703
- * Contact's image URL.
3704
- * @readonly
3705
- */
3706
- imageUrl?: string | null;
3707
- /**
3708
- * Contact's primary email.
3709
- * @readonly
3710
- */
3711
- email?: string | null;
3712
- /**
3713
- * Contact's primary phone.
3714
- * @readonly
3715
- */
3716
- phone?: string | null;
3717
- }
3718
- interface CreateTaskRequest$1 {
3719
- /** Task to create. */
3720
- task: Task$1;
3721
- }
3722
- interface CreateTaskResponse$1 {
3723
- /** The created task. */
3724
- task?: Task$1;
3725
- }
3726
- interface GetTaskRequest$1 {
3727
- /** ID of the task to retrieve. */
3728
- taskId: string;
3729
- }
3730
- interface GetTaskResponse$1 {
3731
- /** The retrieved task. */
3732
- task?: Task$1;
3733
- }
3734
- interface UpdateTaskRequest$1 {
3735
- /** Task to update. */
3736
- task: Task$1;
3737
- }
3738
- interface UpdateTaskResponse$1 {
3739
- /** The updated task. */
3740
- task?: Task$1;
3741
- }
3742
- interface DeleteTaskRequest$1 {
3743
- /** ID of the task to delete. */
3744
- taskId: string;
3745
- }
3746
- interface DeleteTaskResponse$1 {
3747
- }
3748
- interface QueryTasksRequest$1 {
3749
- /** Query options. */
3750
- query?: CursorQuery$1;
3751
- }
3752
- interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
3753
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
3754
- cursorPaging?: CursorPaging$1;
3755
- /**
3756
- * Filter object in the following format:
3757
- * `"filter" : {
3758
- * "fieldName1": "value1",
3759
- * "fieldName2":{"$operator":"value2"}
3760
- * }`
3761
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
3762
- */
3763
- filter?: Record<string, any> | null;
3764
- /**
3765
- * Sort object in the following format:
3766
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
3767
- */
3768
- sort?: Sorting$1[];
3769
- }
3770
- /** @oneof */
3771
- interface CursorQueryPagingMethodOneOf$1 {
3772
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
3773
- cursorPaging?: CursorPaging$1;
3774
- }
3775
- interface Sorting$1 {
3776
- /** Name of the field to sort by. */
3777
- fieldName?: string;
3778
- /** Sort order. */
3779
- order?: SortOrder$1;
3780
- }
3781
- declare enum SortOrder$1 {
3782
- /** Sort by ascending order. */
3783
- ASC = "ASC",
3784
- /** Sort by descending order. */
3785
- DESC = "DESC"
3786
- }
3787
- interface CursorPaging$1 {
3788
- /** Number of items to load. */
3789
- limit?: number | null;
3790
- /**
3791
- * Pointer to the next or previous page in the list of results.
3792
- *
3793
- * You can get the relevant cursor token
3794
- * from the `pagingMetadata` object in the previous call's response.
3795
- * Not relevant for the first request.
3796
- */
3797
- cursor?: string | null;
3798
- }
3799
- interface QueryTasksResponse$1 {
3800
- /** The retrieved tasks. */
3801
- tasks?: Task$1[];
3802
- /** Paging metadata. */
3803
- pagingMetadata?: CursorPagingMetadata$1;
3804
- }
3805
- interface CursorPagingMetadata$1 {
3806
- /** Number of items returned in the response. */
3807
- count?: number | null;
3808
- /** Offset that was requested. */
3809
- cursors?: Cursors$1;
3810
- /**
3811
- * Indicates if there are more results after the current page.
3812
- * If `true`, another page of results can be retrieved.
3813
- * If `false`, this is the last page.
3814
- */
3815
- hasNext?: boolean | null;
3816
- }
3817
- interface Cursors$1 {
3818
- /** Cursor pointing to next page in the list of results. */
3819
- next?: string | null;
3820
- /** Cursor pointing to previous page in the list of results. */
3821
- prev?: string | null;
3822
- }
3823
- interface CountTasksRequest$1 {
3824
- /**
3825
- * Filter which tasks to count. See supported filters ([REST](https://dev.wix.com/docs/rest/api-reference/crm/tasks/task-v2/filter-and-sort)| [SDK](https://dev.wix.com/docs/sdk/backend-modules/crm/tasks/query-tasks)).
3826
- *
3827
- * Filter tasks in the following format:
3828
- *
3829
- * `"filter" : {
3830
- * "fieldName1": "value1",
3831
- * "fieldName2":{"$operator":"value2"}
3832
- * }`
3833
- *
3834
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.
3835
- */
3836
- filter?: Record<string, any> | null;
3837
- }
3838
- interface CountTasksResponse$1 {
3839
- /** The number of tasks that match the specified filter. */
3840
- count?: number;
3841
- }
3842
- interface MoveTaskAfterRequest$1 {
3843
- /** ID of the task to move. */
3844
- taskId: string;
3845
- /**
3846
- * The ID of the task after which the moved task is positioned in the task display.
3847
- * If `beforeTaskId` is not specified, the moved task is positioned first in the task display.
3848
- */
3849
- beforeTaskId?: string | null;
3850
- }
3851
- interface MoveTaskAfterResponse$1 {
3852
- }
3853
- interface TaskSourceNonNullableFields$1 {
3854
- sourceType: SourceType$1;
3855
- }
3856
- interface TaskNonNullableFields$1 {
3857
- status: TaskStatus$1;
3858
- source?: TaskSourceNonNullableFields$1;
3859
- }
3860
- interface CreateTaskResponseNonNullableFields$1 {
3861
- task?: TaskNonNullableFields$1;
3862
- }
3863
- interface GetTaskResponseNonNullableFields$1 {
3864
- task?: TaskNonNullableFields$1;
3865
- }
3866
- interface UpdateTaskResponseNonNullableFields$1 {
3867
- task?: TaskNonNullableFields$1;
3868
- }
3869
- interface QueryTasksResponseNonNullableFields$1 {
3870
- tasks: TaskNonNullableFields$1[];
3871
- }
3872
- interface CountTasksResponseNonNullableFields$1 {
3873
- count: number;
3874
- }
3875
-
3876
- interface Task {
3877
- /**
3878
- * Task ID.
3879
- * @readonly
3880
- */
3881
- _id?: string | null;
3882
- /**
3883
- * Revision number, which increments by 1 each time the task is updated. To prevent conflicting changes, the existing `revision` must be used when updating a task.
3884
- * @readonly
3885
- */
3886
- revision?: string | null;
3887
- /** Title of the task. */
3888
- title?: string | null;
3889
- /** Description of the task. */
3890
- description?: string | null;
3891
- /**
3892
- * Date and time the task was created.
3893
- * @readonly
3894
- */
3895
- _createdDate?: Date | null;
3896
- /**
3897
- * Date and time the task was last updated.
3898
- * @readonly
3899
- */
3900
- _updatedDate?: Date | null;
3901
- /** Due date for the task. */
3902
- dueDate?: Date | null;
3903
- /**
3904
- * Status of the task.
3905
- *
3906
- * Default: `ACTION_NEEDED`
3907
- */
3908
- status?: TaskStatus;
3909
- /** Details about the task source. */
3910
- source?: TaskSource;
3911
- /** Information about the contact associated with the task. */
3912
- contact?: ContactInfo;
3913
- }
3914
- /** Possible statuses in which the task may be. */
3915
- declare enum TaskStatus {
3916
- /** Action needed. */
3917
- ACTION_NEEDED = "ACTION_NEEDED",
3918
- /** Task completed. */
3919
- COMPLETED = "COMPLETED"
3920
- }
3921
- interface TaskSource {
3922
- /**
3923
- * How the task was created.
3924
- * @readonly
3925
- */
3926
- sourceType?: SourceType;
3927
- /**
3928
- * App ID, if the task was created by an app.
3929
- * @readonly
3930
- */
3931
- appId?: string | null;
3932
- /**
3933
- * User ID, if the task was created by a Wix user.
3934
- * @readonly
3935
- */
3936
- userId?: string | null;
3937
- }
3938
- /** Possible sources that can create tasks. */
3939
- declare enum SourceType {
3940
- /** Task was created by an app. */
3941
- APP = "APP",
3942
- /** Task was created by a Wix user. */
3943
- USER = "USER"
3944
- }
3945
- interface ContactInfo {
3946
- /** ID of the contact associated with the task. */
3947
- _id?: string | null;
3948
- /**
3949
- * Contact's first name.
3950
- * @readonly
3951
- */
3952
- firstName?: string | null;
3953
- /**
3954
- * Contact's last name.
3955
- * @readonly
3956
- */
3957
- lastName?: string | null;
3958
- /**
3959
- * Contact's image URL.
3960
- * @readonly
3961
- */
3962
- imageUrl?: string | null;
3963
- /**
3964
- * Contact's primary email.
3965
- * @readonly
3966
- */
3967
- email?: string | null;
3968
- /**
3969
- * Contact's primary phone.
3970
- * @readonly
3971
- */
3972
- phone?: string | null;
3973
- }
3974
- interface CreateTaskRequest {
3975
- /** Task to create. */
3976
- task: Task;
3977
- }
3978
- interface CreateTaskResponse {
3979
- /** The created task. */
3980
- task?: Task;
3981
- }
3982
- interface GetTaskRequest {
3983
- /** ID of the task to retrieve. */
3984
- taskId: string;
3985
- }
3986
- interface GetTaskResponse {
3987
- /** The retrieved task. */
3988
- task?: Task;
3989
- }
3990
- interface UpdateTaskRequest {
3991
- /** Task to update. */
3992
- task: Task;
3993
- }
3994
- interface UpdateTaskResponse {
3995
- /** The updated task. */
3996
- task?: Task;
3997
- }
3998
- interface DeleteTaskRequest {
3999
- /** ID of the task to delete. */
4000
- taskId: string;
4001
- }
4002
- interface DeleteTaskResponse {
4003
- }
4004
- interface QueryTasksRequest {
4005
- /** Query options. */
4006
- query?: CursorQuery;
4007
- }
4008
- interface CursorQuery extends CursorQueryPagingMethodOneOf {
4009
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
4010
- cursorPaging?: CursorPaging;
4011
- /**
4012
- * Filter object in the following format:
4013
- * `"filter" : {
4014
- * "fieldName1": "value1",
4015
- * "fieldName2":{"$operator":"value2"}
4016
- * }`
4017
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
4018
- */
4019
- filter?: Record<string, any> | null;
4020
- /**
4021
- * Sort object in the following format:
4022
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
4023
- */
4024
- sort?: Sorting[];
4025
- }
4026
- /** @oneof */
4027
- interface CursorQueryPagingMethodOneOf {
4028
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
4029
- cursorPaging?: CursorPaging;
4030
- }
4031
- interface Sorting {
4032
- /** Name of the field to sort by. */
4033
- fieldName?: string;
4034
- /** Sort order. */
4035
- order?: SortOrder;
4036
- }
4037
- declare enum SortOrder {
4038
- /** Sort by ascending order. */
4039
- ASC = "ASC",
4040
- /** Sort by descending order. */
4041
- DESC = "DESC"
4042
- }
4043
- interface CursorPaging {
4044
- /** Number of items to load. */
4045
- limit?: number | null;
4046
- /**
4047
- * Pointer to the next or previous page in the list of results.
4048
- *
4049
- * You can get the relevant cursor token
4050
- * from the `pagingMetadata` object in the previous call's response.
4051
- * Not relevant for the first request.
4052
- */
4053
- cursor?: string | null;
4054
- }
4055
- interface QueryTasksResponse {
4056
- /** The retrieved tasks. */
4057
- tasks?: Task[];
4058
- /** Paging metadata. */
4059
- pagingMetadata?: CursorPagingMetadata;
4060
- }
4061
- interface CursorPagingMetadata {
4062
- /** Number of items returned in the response. */
4063
- count?: number | null;
4064
- /** Offset that was requested. */
4065
- cursors?: Cursors;
4066
- /**
4067
- * Indicates if there are more results after the current page.
4068
- * If `true`, another page of results can be retrieved.
4069
- * If `false`, this is the last page.
4070
- */
4071
- hasNext?: boolean | null;
4072
- }
4073
- interface Cursors {
4074
- /** Cursor pointing to next page in the list of results. */
4075
- next?: string | null;
4076
- /** Cursor pointing to previous page in the list of results. */
4077
- prev?: string | null;
4078
- }
4079
- interface CountTasksRequest {
4080
- /**
4081
- * Filter which tasks to count. See the list of supported filters in `queryContacts`.
4082
- *
4083
- * Filterable fields include:
4084
- * - `_id`
4085
- * - `_createdDate`
4086
- * - `_updatedDate`
4087
- * - `dueDate`
4088
- * - `status`
4089
- * - `contact.id`
4090
- */
4091
- filter?: Record<string, any> | null;
4092
- }
4093
- interface CountTasksResponse {
4094
- /** The number of tasks that match the specified filter. */
4095
- count?: number;
4096
- }
4097
- interface MoveTaskAfterRequest {
4098
- /** ID of the task to move. */
4099
- taskId: string;
4100
- /**
4101
- * The ID of the task after which the moved task is positioned in the task display.
4102
- * If `beforeTaskId` is not specified, the moved task is positioned first in the task display.
4103
- */
4104
- beforeTaskId?: string | null;
4105
- }
4106
- interface MoveTaskAfterResponse {
4107
- }
4108
- interface TaskSourceNonNullableFields {
4109
- sourceType: SourceType;
4110
- }
4111
- interface TaskNonNullableFields {
4112
- status: TaskStatus;
4113
- source?: TaskSourceNonNullableFields;
4114
- }
4115
- interface CreateTaskResponseNonNullableFields {
4116
- task?: TaskNonNullableFields;
4117
- }
4118
- interface GetTaskResponseNonNullableFields {
4119
- task?: TaskNonNullableFields;
4120
- }
4121
- interface UpdateTaskResponseNonNullableFields {
4122
- task?: TaskNonNullableFields;
4123
- }
4124
- interface QueryTasksResponseNonNullableFields {
4125
- tasks: TaskNonNullableFields[];
4126
- }
4127
- interface CountTasksResponseNonNullableFields {
4128
- count: number;
4129
- }
4130
-
4131
- type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
4132
- getUrl: (context: any) => string;
4133
- httpMethod: K;
4134
- path: string;
4135
- pathParams: M;
4136
- __requestType: T;
4137
- __originalRequestType: S;
4138
- __responseType: Q;
4139
- __originalResponseType: R;
4140
- };
4141
- declare function createTask(): __PublicMethodMetaInfo<'POST', {}, CreateTaskRequest, CreateTaskRequest$1, CreateTaskResponse & CreateTaskResponseNonNullableFields, CreateTaskResponse$1 & CreateTaskResponseNonNullableFields$1>;
4142
- declare function getTask(): __PublicMethodMetaInfo<'GET', {
4143
- taskId: string;
4144
- }, GetTaskRequest, GetTaskRequest$1, GetTaskResponse & GetTaskResponseNonNullableFields, GetTaskResponse$1 & GetTaskResponseNonNullableFields$1>;
4145
- declare function updateTask(): __PublicMethodMetaInfo<'PATCH', {
4146
- taskId: string;
4147
- }, UpdateTaskRequest, UpdateTaskRequest$1, UpdateTaskResponse & UpdateTaskResponseNonNullableFields, UpdateTaskResponse$1 & UpdateTaskResponseNonNullableFields$1>;
4148
- declare function deleteTask(): __PublicMethodMetaInfo<'DELETE', {
4149
- taskId: string;
4150
- }, DeleteTaskRequest, DeleteTaskRequest$1, DeleteTaskResponse, DeleteTaskResponse$1>;
4151
- declare function queryTasks(): __PublicMethodMetaInfo<'POST', {}, QueryTasksRequest, QueryTasksRequest$1, QueryTasksResponse & QueryTasksResponseNonNullableFields, QueryTasksResponse$1 & QueryTasksResponseNonNullableFields$1>;
4152
- declare function countTasks(): __PublicMethodMetaInfo<'POST', {}, CountTasksRequest, CountTasksRequest$1, CountTasksResponse & CountTasksResponseNonNullableFields, CountTasksResponse$1 & CountTasksResponseNonNullableFields$1>;
4153
- declare function moveTaskAfter(): __PublicMethodMetaInfo<'POST', {
4154
- taskId: string;
4155
- }, MoveTaskAfterRequest, MoveTaskAfterRequest$1, MoveTaskAfterResponse, MoveTaskAfterResponse$1>;
4156
-
4157
- type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
4158
- declare const meta_countTasks: typeof countTasks;
4159
- declare const meta_createTask: typeof createTask;
4160
- declare const meta_deleteTask: typeof deleteTask;
4161
- declare const meta_getTask: typeof getTask;
4162
- declare const meta_moveTaskAfter: typeof moveTaskAfter;
4163
- declare const meta_queryTasks: typeof queryTasks;
4164
- declare const meta_updateTask: typeof updateTask;
4165
- declare namespace meta {
4166
- export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_countTasks as countTasks, meta_createTask as createTask, meta_deleteTask as deleteTask, meta_getTask as getTask, meta_moveTaskAfter as moveTaskAfter, meta_queryTasks as queryTasks, meta_updateTask as updateTask };
4167
- }
4168
-
4169
- export { meta$5 as attachments, meta$4 as contacts, meta$3 as extendedFields, meta$2 as labels, meta$1 as submittedContact, meta as tasks };