• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import { AsyncCallback } from './basic';
17
18/**
19 * Contains variety of system contact, provides functions for adding, updating and deleting these system contact
20 * and provides methods for querying the information of contact.
21 *
22 * @since 7
23 * @syscap SystemCapability.Applications.ContactsData
24 */
25declare namespace contact {
26  /**
27   * Creates a contact.
28   *
29   * @param contact Indicates the contact information.
30   * @returns Returns the contact ID (which can be obtained by {@link Contact#getId()}) if the creation is successful;
31   * returns {@link Contact#INVALID_CONTACT_ID} if the creation fails.
32   * @permission ohos.permission.WRITE_CONTACTS
33   */
34  function addContact(contact: Contact, callback: AsyncCallback<number>): void;
35  function addContact(contact: Contact): Promise<number>;
36
37  /**
38   * Select contact.
39   *
40   * @returns Returns the contact list which user select;
41   * returns empty contact list if user not select.
42   * @syscap SystemCapability.Applications.Contacts
43   * @permission ohos.permission.READ_CONTACTS
44   */
45  function selectContact(callback: AsyncCallback<Array<Contact>>): void;
46  function selectContact(): Promise<Array<Contact>>;
47
48  /**
49   * Deletes a specified contact.
50   *
51   * @param key Indicates the unique query key of a contact to delete.
52   * @returns Returns {@code true} if the contact is deleted; returns {@code false} otherwise.
53   * @permission ohos.permission.WRITE_CONTACTS
54   */
55  function deleteContact(key: string, callback: AsyncCallback<void>): void;
56  function deleteContact(key: string): Promise<void>;
57
58  /**
59   * Queries a specified contact of specified attributes.
60   *
61   * @param key Indicates the unique query key of a contact.
62   * @param holder Indicates the contact holder. If this parameter is null, the default holder is used for matching.
63   * @param attrs Indicates the contact attributes. If this parameter is null, all attributes are used for matching.
64   * @returns Returns the specified contact.
65   * @permission ohos.permission.READ_CONTACTS
66   */
67  function queryContact(key: string, callback: AsyncCallback<Contact>): void;
68  function queryContact(key: string, holder: Holder, callback: AsyncCallback<Contact>): void;
69  function queryContact(key: string, attrs: ContactAttributes, callback: AsyncCallback<Contact>): void;
70  function queryContact(key: string, holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Contact>): void;
71  function queryContact(key: string, holder?: Holder, attrs?: ContactAttributes): Promise<Contact>;
72
73  /**
74   * Queries contacts with query conditions.
75   *
76   * @param holder Indicates the contact holder. If this parameter is null, the default holder is used for matching.
77   * @param attrs Indicates the contact attributes. If this parameter is null, all attributes are used for matching.
78   * @returns Returns the {@code Contact} list object.
79   * @permission ohos.permission.READ_CONTACTS
80   */
81  function queryContacts(callback: AsyncCallback<Array<Contact>>): void;
82  function queryContacts(holder: Holder, callback: AsyncCallback<Array<Contact>>): void;
83  function queryContacts(attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
84  function queryContacts(holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
85  function queryContacts(holder?: Holder, attrs?: ContactAttributes): Promise<Array<Contact>>;
86
87  /**
88   * Queries contacts by a specified email address, contact holder, and contact attributes.
89   *
90   * @param email Indicates the email address.
91   * @param holder Indicates the contact holder. If this parameter is null, the default holder is used for matching.
92   * @param attrs Indicates the contact attributes. If this parameter is null, all attributes are used for matching.
93   * @returns Returns a {@code Contact} list object.
94   * @permission ohos.permission.READ_CONTACTS
95   */
96  function queryContactsByEmail(email: string, callback: AsyncCallback<Array<Contact>>): void;
97  function queryContactsByEmail(email: string, holder: Holder, callback: AsyncCallback<Array<Contact>>): void;
98  function queryContactsByEmail(email: string, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
99  function queryContactsByEmail(email: string, holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
100  function queryContactsByEmail(email: string, holder?: Holder, attrs?: ContactAttributes): Promise<Array<Contact>>;
101
102  /**
103   * Queries contacts by a phone number, holder, and contact attribute.
104   *
105   * @param phoneNumber Indicates the phone number. Only full match is supported, and wildcards are not supported.
106   * @param holder Indicates the contact holder. If this parameter is null, the default holder is used for matching.
107   * @param attrs Indicates the contact attribute. If this parameter is null,
108   * all attributes will be used for matching.
109   * @returns Returns the {@code Contact} list object.
110   * @permission ohos.permission.READ_CONTACTS
111   */
112  function queryContactsByPhoneNumber(phoneNumber: string, callback: AsyncCallback<Array<Contact>>): void;
113  function queryContactsByPhoneNumber(phoneNumber: string, holder: Holder, callback: AsyncCallback<Array<Contact>>): void;
114  function queryContactsByPhoneNumber(phoneNumber: string, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
115  function queryContactsByPhoneNumber(phoneNumber: string, holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
116  function queryContactsByPhoneNumber(phoneNumber: string, holder?: Holder, attrs?: ContactAttributes): Promise<Array<Contact>>;
117
118  /**
119   * Queries contact groups.
120   *
121   * @param holder Indicates the contact holder. If this parameter is null, the default holder is used for matching.
122   * @returns Returns the contact group list.
123   * @permission ohos.permission.READ_CONTACTS
124   */
125  function queryGroups(callback: AsyncCallback<Array<Group>>): void;
126  function queryGroups(holder: Holder, callback: AsyncCallback<Array<Group>>): void;
127  function queryGroups(holder?: Holder): Promise<Array<Group>>;
128
129  /**
130   * Queries contact holders.
131   *
132   * @returns Returns the {@code Holder} list object.
133   * @permission ohos.permission.READ_CONTACTS
134   */
135  function queryHolders(callback: AsyncCallback<Array<Holder>>): void;
136  function queryHolders(): Promise<Array<Holder>>;
137
138  /**
139   * Obtains the query key of a contact based on a specified ID and holder.
140   *
141   * @param id Indicates the contact ID.
142   * @param holder Indicates the contact holder. If this parameter is null, the default holder is used for matching.
143   * @returns Returns the query key of the contact.
144   * @permission ohos.permission.READ_CONTACTS
145   */
146  function queryKey(id: number, callback: AsyncCallback<string>): void;
147  function queryKey(id: number, holder: Holder, callback: AsyncCallback<string>): void;
148  function queryKey(id: number, holder?: Holder): Promise<string>;
149
150  /**
151   * Queries information about "my card".
152   *
153   * @param attrs Indicates the contact attributes. If this parameter is null, all attributes are used for matching.
154   * @returns Returns information about "my card".
155   * @permission ohos.permission.READ_CONTACTS
156   */
157  function queryMyCard(callback: AsyncCallback<Contact>): void;
158  function queryMyCard(attrs: ContactAttributes, callback: AsyncCallback<Contact>): void;
159  function queryMyCard(attrs?: ContactAttributes): Promise<Contact>;
160
161  /**
162   * Updates specified attributes of a contact.
163   *
164   * @param contact Indicates the contact whose information is to update.
165   * @param attrs Indicates the contact attributes to update. If this parameter is null,
166   * all available attributes will be updated.
167   * @returns Returns {@code true} if the update is successful; returns {@code false} otherwise.
168   * @permission ohos.permission.WRITE_CONTACTS
169   */
170  function updateContact(contact: Contact, callback: AsyncCallback<void>): void;
171  function updateContact(contact: Contact, attrs: ContactAttributes, callback: AsyncCallback<void>): void;
172  function updateContact(contact: Contact, attrs?: ContactAttributes): Promise<void>;
173
174  /**
175   * Checks whether the contact ID is in the local phone book.
176   *
177   * @param id Indicates the contact ID.
178   * @returns Returns {@code true} if the contact ID is in the local phone book; returns {@code false} otherwise.
179   * @permission ohos.permission.READ_CONTACTS
180   */
181  function isLocalContact(id: number, callback: AsyncCallback<boolean>): void;
182  function isLocalContact(id: number): Promise<boolean>;
183
184  /**
185   * Checks whether the contact ID is of "my card".
186   *
187   * @param id Indicates the contact ID.
188   * @returns Returns {@code true} if the contact ID is of "my card"; returns {@code false} otherwise.
189   * @permission ohos.permission.READ_CONTACTS
190   */
191  function isMyCard(id: number, callback: AsyncCallback<boolean>): void;
192  function isMyCard(id: number): Promise<boolean>;
193
194  /**
195   * Provides methods for contact information
196   */
197  class Contact {
198    /**
199     * Indicates the contact ID.
200     */
201    static readonly INVALID_CONTACT_ID: -1
202
203    /**
204     * Indicates the contact ID.
205     */
206    readonly id?: number
207
208    /**
209     * Indicates the query key that identifies the contact.
210     */
211    readonly key?: string
212
213    /**
214     * Indicates the contact attributes.
215     */
216    contactAttributes?: ContactAttributes
217
218    /**
219     * Indicates an email address of the contact.
220     */
221    emails?: Email[]
222
223    /**
224     * Indicates an event (special date) of the contact.
225     */
226    events?: Event[]
227
228    /**
229     * Indicates a group of the contact.
230     */
231    groups?: Group[]
232
233    /**
234     * Indicates an IM address of the contact.
235     */
236    imAddresses?: ImAddress[]
237
238    /**
239     * Indicates a phone number of the contact.
240     */
241    phoneNumbers?: PhoneNumber[]
242
243    /**
244     * Indicates the contact portrait.
245     */
246    portrait?: Portrait
247
248    /**
249     * Indicates a postal address of the contact.
250     */
251    postalAddresses?: PostalAddress[]
252
253    /**
254     * Indicates a relation of the contact.
255     */
256    relations?: Relation[]
257
258    /**
259     * Indicates a Session Initiation Protocol (SIP) address of the contact.
260     */
261    sipAddresses?: SipAddress[]
262
263    /**
264     * Indicates a website of the contact.
265     */
266    websites?: Website[]
267
268    /**
269     * Indicates the contact name.
270     */
271    name?: Name
272
273    /**
274     * Indicates the contact nickname.
275     */
276    nickName?: NickName
277
278    /**
279     * Indicates the contact note.
280     */
281    note?: Note
282
283    /**
284     * Indicates organization information about the contact.
285     */
286    organization?: Organization
287  }
288
289  /**
290   * Provides methods for contact attributes information
291   */
292  class ContactAttributes {
293    /**
294     * Indicates the contact attributes.
295     */
296    attributes: Attribute[]
297  }
298
299  /**
300   * Provides methods for attribute information
301   */
302  enum Attribute {
303    /**
304     * Indicates the contact event.
305     */
306    ATTR_CONTACT_EVENT,
307
308    /**
309     * Indicates the email address.
310     */
311    ATTR_EMAIL,
312
313    /**
314     * Indicates the contact group.
315     */
316    ATTR_GROUP_MEMBERSHIP,
317
318    /**
319     * Indicates the instant messaging (IM) address.
320     */
321    ATTR_IM,
322
323    /**
324     * Indicates the name.
325     */
326    ATTR_NAME,
327
328    /**
329     * Indicates the nickname.
330     */
331    ATTR_NICKNAME,
332
333    /**
334     * Indicates the note.
335     */
336    ATTR_NOTE,
337
338    /**
339     * Indicates the organization.
340     */
341    ATTR_ORGANIZATION,
342
343    /**
344     * Indicates the phone number.
345     */
346    ATTR_PHONE,
347
348    /**
349     * Indicates the portrait.
350     */
351    ATTR_PORTRAIT,
352
353    /**
354     * Indicates the postal address.
355     */
356    ATTR_POSTAL_ADDRESS,
357
358    /**
359     * Indicates the relation.
360     */
361    ATTR_RELATION,
362
363    /**
364     * Indicates the Session Initiation Protocol (SIP) address.
365     */
366    ATTR_SIP_ADDRESS,
367
368    /**
369     * Indicates the website.
370     */
371    ATTR_WEBSITE
372  }
373
374  /**
375   * Provides methods for email information
376   */
377  class Email {
378    /**
379     * Indicates a custom label.
380     */
381    static readonly CUSTOM_LABEL: 0
382
383    /**
384     * Indicates a home email.
385     */
386    static readonly EMAIL_HOME: 1
387
388    /**
389     * Indicates a work email.
390     */
391    static readonly EMAIL_WORK: 2
392
393    /**
394     * Indicates an email of the OTHER type.
395     */
396    static readonly EMAIL_OTHER: 3
397
398    /**
399     * Indicates an invalid label ID.
400     */
401    static readonly INVALID_LABEL_ID: -1
402
403    /**
404     * Indicates the email address.
405     */
406    email: string
407
408    /**
409     * Indicates the label name of an attribute.
410     */
411    labelName?: string
412
413    /**
414     * Indicates the displayed email name.
415     */
416    displayName?: string
417
418    /**
419     * Indicates the label id.
420     */
421    labelId?: number
422  }
423
424  /**
425   * Provides methods for event information
426   */
427  class Event {
428    /**
429     * Indicates a custom label.
430     */
431    static readonly CUSTOM_LABEL: 0
432
433    /**
434     * Indicates an anniversary event.
435     */
436    static readonly EVENT_ANNIVERSARY: 1
437
438    /**
439     * Indicates an event of the OTHER type.
440     */
441    static readonly EVENT_OTHER: 2
442
443    /**
444     * Indicates an birthday event.
445     */
446    static readonly EVENT_BIRTHDAY: 3
447
448    /**
449     * Indicates an invalid label ID.
450     */
451    static readonly INVALID_LABEL_ID: -1
452
453    /**
454     * Indicates the event date.
455     */
456    eventDate: string
457
458    /**
459     * Indicates the label name of an attribute.
460     */
461    labelName?: string
462
463    /**
464     * Indicates the label id.
465     */
466    labelId?: number
467  }
468
469  /**
470   * Provides methods for group information
471   */
472  class Group {
473    /**
474     * Indicates the contact group ID.
475     */
476    groupId?: number
477
478    /**
479     * Indicates the contact group title.
480     */
481    title: string
482  }
483
484  /**
485   * Provides methods for holder information
486   */
487  class Holder {
488    /**
489     * Indicates the bundle name of a contact holder.
490     */
491    readonly bundleName: string
492
493    /**
494     * Indicates the displayed name of a contact holder.
495     */
496    readonly displayName?: string
497
498    /**
499     * Indicates the holder ID.
500     */
501    holderId?: number
502  }
503
504  /**
505   * Provides methods for ImAddress information
506   */
507  class ImAddress {
508    /**
509     * Indicates a custom label.
510     */
511    static readonly CUSTOM_LABEL: -1
512
513    /**
514     * Indicates an AIM instant message.
515     */
516    static readonly IM_AIM: 0
517
518    /**
519     * Indicates a Windows Live instant message.
520     */
521    static readonly IM_MSN: 1
522
523    /**
524     * Indicates a Yahoo instant message.
525     */
526    static readonly IM_YAHOO: 2
527
528    /**
529     * Indicates a Skype instant message.
530     */
531    static readonly IM_SKYPE: 3
532
533    /**
534     * Indicates a QQ instant message.
535     */
536    static readonly IM_QQ: 4
537
538    /**
539     * Indicates an ICQ instant message.
540     */
541    static readonly IM_ICQ: 6
542
543    /**
544     * Indicates a Jabber instant message.
545     */
546    static readonly IM_JABBER: 7
547
548    /**
549     * Indicates an invalid label ID.
550     */
551    static readonly INVALID_LABEL_ID: -2
552
553    /**
554     * Indicates the IM address.
555     */
556    imAddress: string
557
558    /**
559     * Indicates the label name of an attribute.
560     */
561    labelName?: string
562
563    /**
564     * Indicates the label id.
565     */
566    labelId?: number
567  }
568
569  /**
570   * Provides methods for name information
571   */
572  class Name {
573    /**
574     * Indicates the family name of the contact.
575     */
576    familyName?: string
577
578    /**
579     * Indicates the phonetic family name of the contact.
580     */
581    familyNamePhonetic?: string
582
583    /**
584     * Indicates the full name of the contact.
585     */
586    fullName: string
587
588    /**
589     * Indicates the given name of the contact.
590     */
591    givenName?: string
592
593    /**
594     * Indicates the phonetic given name of the contact.
595     */
596    givenNamePhonetic?: string
597
598    /**
599     * Indicates the middle name of the contact.
600     */
601    middleName?: string
602
603    /**
604     * Indicates the phonetic middle name of the contact.
605     */
606    middleNamePhonetic?: string
607
608    /**
609     * Indicates the prefix of the contact name.
610     */
611    namePrefix?: string
612
613    /**
614     * Indicates the suffix of this contact name.
615     */
616    nameSuffix?: string
617  }
618
619  /**
620   * Provides methods for nick name information
621   */
622  class NickName {
623    /**
624     * Indicates the nickname of the contact.
625     */
626    nickName: string
627  }
628
629  /**
630   * Provides methods for note information
631   */
632  class Note {
633    /**
634     * Indicates the note content.
635     */
636    noteContent: string
637  }
638
639  /**
640   * Provides methods for organization information
641   */
642  class Organization {
643    /**
644     * Indicates the name of the organization to which the contact belongs.
645     */
646    name: string
647
648    /**
649     * Indicates the title of the organization.
650     */
651    title?: string
652  }
653
654  /**
655   * Provides methods for phone number information
656   */
657  class PhoneNumber {
658    /**
659     * Indicates a custom label.
660     */
661    static readonly CUSTOM_LABEL: 0
662
663    /**
664     * Indicates a home number.
665     */
666    static readonly NUM_HOME: 1
667
668    /**
669     * Indicates a mobile phone number.
670     */
671    static readonly NUM_MOBILE: 2
672
673    /**
674     * Indicates a work number.
675     */
676    static readonly NUM_WORK: 3
677
678    /**
679     * Indicates a work fax number.
680     */
681    static readonly NUM_FAX_WORK: 4
682
683    /**
684     * Indicates a home fax number.
685     */
686    static readonly NUM_FAX_HOME: 5
687
688    /**
689     * Indicates a pager number.
690     */
691    static readonly NUM_PAGER: 6
692
693    /**
694     * Indicates a number of the OTHER type.
695     */
696    static readonly NUM_OTHER: 7
697
698    /**
699     * Indicates a callback number.
700     */
701    static readonly NUM_CALLBACK: 8
702
703    /**
704     * Indicates a car number.
705     */
706    static readonly NUM_CAR: 9
707
708    /**
709     * Indicates a company director number.
710     */
711    static readonly NUM_COMPANY_MAIN: 10
712
713    /**
714     * Indicates an Integrated Services Digital Network (ISDN) number.
715     */
716    static readonly NUM_ISDN: 11
717
718    /**
719     * Indicates a main number.
720     */
721    static readonly NUM_MAIN: 12
722
723    /**
724     * Indicates a number of the OTHER_FAX type.
725     */
726    static readonly NUM_OTHER_FAX: 13
727
728    /**
729     * Indicates a radio number.
730     */
731    static readonly NUM_RADIO: 14
732
733    /**
734     * Indicates a telex number.
735     */
736    static readonly NUM_TELEX: 15
737
738    /**
739     * Indicates a teletypewriter (TTY) or test-driven development (TDD) number.
740     */
741    static readonly NUM_TTY_TDD: 16
742
743    /**
744     * Indicates a work mobile phone number.
745     */
746    static readonly NUM_WORK_MOBILE: 17
747
748    /**
749     * Indicates a work pager number.
750     */
751    static readonly NUM_WORK_PAGER: 18
752
753    /**
754     * Indicates an assistant number.
755     */
756    static readonly NUM_ASSISTANT: 19
757
758    /**
759     * Indicates an MMS number.
760     */
761    static readonly NUM_MMS: 20
762
763    /**
764     * Indicates an invalid label ID.
765     */
766    static readonly INVALID_LABEL_ID: -1
767
768    /**
769     * Indicates the label name of an attribute.
770     */
771    labelName?: string
772
773    /**
774     * Indicates the phone number of the contact.
775     */
776    phoneNumber: string
777
778    /**
779     * Indicates the label id.
780     */
781    labelId?: number
782  }
783
784  /**
785   * Provides methods for portrait information
786   */
787  class Portrait {
788    /**
789     * Indicates the uri of the contact portrait.
790     */
791    uri: string
792  }
793
794  /**
795   * Provides methods for postal address information
796   */
797  class PostalAddress {
798    /**
799     * Indicates a custom label.
800     */
801    static readonly CUSTOM_LABEL: 0
802
803    /**
804     * Indicates a home address.
805     */
806    static readonly ADDR_HOME: 1
807
808    /**
809     * Indicates a work address.
810     */
811    static readonly ADDR_WORK: 2
812
813    /**
814     * Indicates an address of the OTHER type.
815     */
816    static readonly ADDR_OTHER: 3
817
818    /**
819     * Indicates an invalid label ID.
820     */
821    static readonly INVALID_LABEL_ID: -1
822
823    /**
824     * Indicates the city where this contact is located.
825     */
826    city?: string
827
828    /**
829     * Indicates the country/region where this contact is located.
830     */
831    country?: string
832
833    /**
834     * Indicates the label name of an attribute.
835     */
836    labelName?: string
837
838    /**
839     * Indicates the neighborhood where this contact is located.
840     */
841    neighborhood?: string
842
843    /**
844     * Indicates the post box of this contact.
845     */
846    pobox?: string
847
848    /**
849     * Indicates the postal address of this contact.
850     */
851    postalAddress: string
852
853    /**
854     * Indicates the postal code of this contact.
855     */
856    postcode?: string
857
858    /**
859     * Indicates the area where this contact is located.
860     */
861    region?: string
862
863    /**
864     * Indicates the street where this contact is located.
865     */
866    street?: string
867
868    /**
869     * Indicates the label id.
870     */
871    labelId?: number
872  }
873
874  /**
875   * Provides methods for relation information
876   */
877  class Relation {
878    /**
879     * Indicates a custom label.
880     */
881    static readonly CUSTOM_LABEL: 0
882
883    /**
884     * Indicates an assistant.
885     */
886    static readonly RELATION_ASSISTANT: 1
887
888    /**
889     * Indicates a brother.
890     */
891    static readonly RELATION_BROTHER: 2
892
893    /**
894     * Indicates a child.
895     */
896    static readonly RELATION_CHILD: 3
897
898    /**
899     * Indicates a domestic partner.
900     */
901    static readonly RELATION_DOMESTIC_PARTNER: 4
902
903    /**
904     * Indicates a father.
905     */
906    static readonly RELATION_FATHER: 5
907
908    /**
909     * Indicates a friend.
910     */
911    static readonly RELATION_FRIEND: 6
912
913    /**
914     * Indicates a manager.
915     */
916    static readonly RELATION_MANAGER: 7
917
918    /**
919     * Indicates a mother.
920     */
921    static readonly RELATION_MOTHER: 8
922
923    /**
924     * Indicates a parent.
925     */
926    static readonly RELATION_PARENT: 9
927
928    /**
929     * Indicates a partner.
930     */
931    static readonly RELATION_PARTNER: 10
932
933    /**
934     * Indicates a referrer.
935     */
936    static readonly RELATION_REFERRED_BY: 11
937
938    /**
939     * Indicates a relative.
940     */
941    static readonly RELATION_RELATIVE: 12
942
943    /**
944     * Indicates a sister.
945     */
946    static readonly RELATION_SISTER: 13
947
948    /**
949     * Indicates a spouse.
950     */
951    static readonly RELATION_SPOUSE: 14
952
953    /**
954     * Indicates an invalid label ID.
955     */
956    static readonly INVALID_LABEL_ID: -1
957
958    /**
959     * Indicates the label name of an attribute.
960     */
961    labelName?: string
962
963    /**
964     * Indicates the relation name.
965     */
966    relationName: string
967
968    /**
969     * Indicates the label id.
970     */
971    labelId?: number
972  }
973
974  /**
975   * Provides methods for sip address information
976   */
977  class SipAddress {
978    /**
979     * Indicates a custom label.
980     */
981    static readonly CUSTOM_LABEL: 0
982
983    /**
984     * Indicates a home SIP address.
985     */
986    static readonly SIP_HOME: 1
987
988    /**
989     * Indicates a work SIP address.
990     */
991    static readonly SIP_WORK: 2
992
993    /**
994     * Indicates an SIP address of the OTHER type.
995     */
996    static readonly SIP_OTHER: 3
997
998    /**
999     * Indicates an invalid label ID.
1000     */
1001    static readonly INVALID_LABEL_ID: -1
1002
1003    /**
1004     * Indicates the label name of an attribute.
1005     */
1006    labelName?: string
1007
1008    /**
1009     * Indicates the SIP address.
1010     */
1011    sipAddress: string
1012
1013    /**
1014     * Indicates the label id.
1015     */
1016    labelId?: number
1017  }
1018
1019  /**
1020   * Provides methods for website information
1021   */
1022  class Website {
1023    /**
1024     * Indicates the website.
1025     */
1026    website: string
1027  }
1028}
1029
1030export default contact;