• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2021-2023 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
16/**
17 * @file
18 * @kit ContactsKit
19 */
20
21import { AsyncCallback } from './@ohos.base';
22import type Context from './application/BaseContext';
23
24/**
25 * Contains variety of system contact, provides functions for adding, updating and deleting these system contact
26 * and provides methods for querying the information of contact.
27 *
28 * @namespace contact
29 * @syscap SystemCapability.Applications.ContactsData
30 * @since 7
31 */
32/**
33 * Contains variety of system contact, provides functions for adding, updating and deleting these system contact
34 * and provides methods for querying the information of contact.
35 *
36 * @namespace contact
37 * @syscap SystemCapability.Applications.ContactsData
38 * @atomicservice
39 * @since 11
40 */
41declare namespace contact {
42  /**
43   * Creates a contact.
44   *
45   * @permission ohos.permission.WRITE_CONTACTS
46   * @param { Contact } contact - Indicates the contact information.
47   * @param { AsyncCallback<number> } callback - Returns the contact ID (which can be obtained
48   * by {@link Contact#getId()}) if the creation is successful. returns {@link Contact#INVALID_CONTACT_ID} if the
49   * creation fails.
50   * @syscap SystemCapability.Applications.ContactsData
51   * @since 7
52   * @deprecated since 10
53   * @useinstead contact.addContact#addContact
54   */
55  function addContact(contact: Contact, callback: AsyncCallback<number>): void;
56
57  /**
58   * Creates a contact.
59   *
60   * @permission ohos.permission.WRITE_CONTACTS
61   * @param { Context } context - Indicates the context of application or capability.
62   * @param { Contact } contact - Indicates the contact information.
63   * @param { AsyncCallback<number> } callback - Returns the contact ID (which can be obtained
64   * by {@link Contact#getId()}) if the creation is successful. returns {@link Contact#INVALID_CONTACT_ID} if the
65   * creation fails.
66   * @throws { BusinessError } 201 - Permission denied.
67   * @throws { BusinessError } 401 - Parameter error.
68   * @syscap SystemCapability.Applications.ContactsData
69   * @since 10
70   */
71  function addContact(context: Context, contact: Contact, callback: AsyncCallback<number>): void;
72
73  /**
74   * Creates a contact.
75   *
76   * @permission ohos.permission.WRITE_CONTACTS
77   * @param { Contact } contact - Indicates the contact information.
78   * @returns { Promise<number> } Returns the contact ID (which can be obtained by {@link Contact#getId()}) if the
79   * creation is successful. returns {@link Contact#INVALID_CONTACT_ID} if the creation fails.
80   * @syscap SystemCapability.Applications.ContactsData
81   * @since 7
82   * @deprecated since 10
83   * @useinstead contact.addContact#addContact
84   */
85  function addContact(contact: Contact): Promise<number>;
86
87  /**
88   * Creates a contact.
89   *
90   * @permission ohos.permission.WRITE_CONTACTS
91   * @param { Context } context - Indicates the context of application or capability.
92   * @param { Contact } contact - Indicates the contact information.
93   * @returns { Promise<number> } Returns the contact ID (which can be obtained by {@link Contact#getId()}) if the
94   * creation is successful. returns {@link Contact#INVALID_CONTACT_ID} if the creation fails.
95   * @throws { BusinessError } 201 - Permission denied.
96   * @throws { BusinessError } 401 - Parameter error.
97   * @syscap SystemCapability.Applications.ContactsData
98   * @since 10
99   */
100  function addContact(context: Context, contact: Contact): Promise<number>;
101
102  /**
103   * Select contact.
104   *
105   * @permission ohos.permission.READ_CONTACTS
106   * @param { AsyncCallback<Array<Contact>> } callback - Indicates the callback for getting the result of the call.
107   * Returns the contact list which user select; returns empty contact list if user not select.
108   * @syscap SystemCapability.Applications.Contacts
109   * @since 7
110   * @deprecated since 10
111   * @useinstead contact.selectContact#selectContacts
112   */
113  function selectContact(callback: AsyncCallback<Array<Contact>>): void;
114
115  /**
116   * Select contact.
117   *
118   * @param { AsyncCallback<Array<Contact>> } callback - Indicates the callback for getting the result of the call.
119   * Returns the contact list which user select; returns empty contact list if user not select.
120   * @throws { BusinessError } 401 - Parameter error.
121   * @syscap SystemCapability.Applications.Contacts
122   * @since 10
123   */
124  /**
125   * Select contact.
126   *
127   * @param { AsyncCallback<Array<Contact>> } callback - Indicates the callback for getting the result of the call.
128   * Returns the contact list which user select; returns empty contact list if user not select.
129   * @throws { BusinessError } 401 - Parameter error.
130   * @syscap SystemCapability.Applications.Contacts
131   * @atomicservice
132   * @since 11
133   */
134  function selectContacts(callback: AsyncCallback<Array<Contact>>): void;
135
136  /**
137   * Select contact.
138   *
139   * @permission ohos.permission.READ_CONTACTS
140   * @returns { Promise<Array<Contact>> } Returns the contact list which user select;
141   * returns empty contact list if user not select.
142   * @syscap SystemCapability.Applications.Contacts
143   * @since 7
144   * @deprecated since 10
145   * @useinstead contact.selectContact#selectContacts
146   */
147  function selectContact(): Promise<Array<Contact>>;
148
149  /**
150   * Select contact.
151   *
152   * @returns { Promise<Array<Contact>> } Returns the contact list which user select;
153   * returns empty contact list if user not select.
154   * @syscap SystemCapability.Applications.Contacts
155   * @since 10
156   */
157  /**
158   * Select contact.
159   *
160   * @returns { Promise<Array<Contact>> } Returns the contact list which user select;
161   * returns empty contact list if user not select.
162   * @syscap SystemCapability.Applications.Contacts
163   * @atomicservice
164   * @since 11
165   */
166  function selectContacts(): Promise<Array<Contact>>;
167
168  /**
169   * Select contact with option.
170   *
171   * @param { ContactSelectionOptions } options - Indicates the Single-select or multiple-select.
172   * @param { AsyncCallback<Array<Contact>> } callback - Indicates the callback for getting the result of the call.
173   * @throws { BusinessError } 401 - Parameter error.
174   * @syscap SystemCapability.Applications.Contacts
175   * @since 10
176   */
177  /**
178   * Select contact with option.
179   *
180   * @param { ContactSelectionOptions } options - Indicates the Single-select or multiple-select.
181   * @param { AsyncCallback<Array<Contact>> } callback - Indicates the callback for getting the result of the call.
182   * @throws { BusinessError } 401 - Parameter error.
183   * @syscap SystemCapability.Applications.Contacts
184   * @atomicservice
185   * @since 11
186   */
187  function selectContacts(options: ContactSelectionOptions, callback: AsyncCallback<Array<Contact>>): void;
188
189  /**
190   * Select contact with option.
191   *
192   * @param { ContactSelectionOptions } options - Indicates the Single-select or multiple-select.
193   * @returns { Promise<Array<Contact>> } Returns the contact list which user select;
194   * returns empty contact list if user not select.
195   * @throws { BusinessError } 401 - Parameter error.
196   * @syscap SystemCapability.Applications.Contacts
197   * @since 10
198   */
199  /**
200   * Select contact with option.
201   *
202   * @param { ContactSelectionOptions } options - Indicates the Single-select or multiple-select.
203   * @returns { Promise<Array<Contact>> } Returns the contact list which user select;
204   * returns empty contact list if user not select.
205   * @throws { BusinessError } 401 - Parameter error.
206   * @syscap SystemCapability.Applications.Contacts
207   * @atomicservice
208   * @since 11
209   */
210  function selectContacts(options: ContactSelectionOptions): Promise<Array<Contact>>;
211
212  /**
213   * Deletes a specified contact.
214   *
215   * @permission ohos.permission.WRITE_CONTACTS
216   * @param { string } key - Indicates the unique query key of a contact to delete.
217   * @param { AsyncCallback<void> } callback - Return the callback function.
218   * @syscap SystemCapability.Applications.ContactsData
219   * @since 7
220   * @deprecated since 10
221   * @useinstead contact.deleteContact#deleteContact
222   */
223  function deleteContact(key: string, callback: AsyncCallback<void>): void;
224
225  /**
226   * Deletes a specified contact.
227   *
228   * @permission ohos.permission.WRITE_CONTACTS
229   * @param { Context } context - Indicates the context of application or capability.
230   * @param { string } key - Indicates the unique query key of a contact to delete.
231   * @param { AsyncCallback<void> } callback - Return the callback function.
232   * @throws { BusinessError } 201 - Permission denied.
233   * @throws { BusinessError } 401 - Parameter error.
234   * @syscap SystemCapability.Applications.ContactsData
235   * @since 10
236   */
237  function deleteContact(context: Context, key: string, callback: AsyncCallback<void>): void;
238
239  /**
240   * Deletes a specified contact.
241   *
242   * @permission ohos.permission.WRITE_CONTACTS
243   * @param { string } key - Indicates the unique query key of a contact to delete.
244   * @returns { Promise<void> } The promise returned by the function.
245   * @syscap SystemCapability.Applications.ContactsData
246   * @since 7
247   * @deprecated since 10
248   * @useinstead contact.deleteContact#deleteContact
249   */
250  function deleteContact(key: string): Promise<void>;
251
252  /**
253   * Deletes a specified contact.
254   *
255   * @permission ohos.permission.WRITE_CONTACTS
256   * @param { Context } context - Indicates the context of application or capability.
257   * @param { string } key - Indicates the unique query key of a contact to delete.
258   * @returns { Promise<void> } The promise returned by the function.
259   * @throws { BusinessError } 201 - Permission denied.
260   * @throws { BusinessError } 401 - Parameter error.
261   * @syscap SystemCapability.Applications.ContactsData
262   * @since 10
263   */
264  function deleteContact(context: Context, key: string): Promise<void>;
265
266  /**
267   * Queries a specified contact of specified attributes.
268   *
269   * @permission ohos.permission.READ_CONTACTS
270   * @param { string } key - Indicates the unique query key of a contact.
271   * @param { AsyncCallback<Contact> } callback - Returns the specified contact.
272   * @syscap SystemCapability.Applications.ContactsData
273   * @since 7
274   * @deprecated since 10
275   * @useinstead contact.queryContact#queryContact
276   */
277  function queryContact(key: string, callback: AsyncCallback<Contact>): void;
278
279  /**
280   * Queries a specified contact of specified attributes.
281   *
282   * @permission ohos.permission.READ_CONTACTS
283   * @param { Context } context - Indicates the context of application or capability.
284   * @param { string } key - Indicates the unique query key of a contact.
285   * @param { AsyncCallback<Contact> } callback - Returns the specified contact.
286   * @throws { BusinessError } 201 - Permission denied.
287   * @throws { BusinessError } 401 - Parameter error.
288   * @syscap SystemCapability.Applications.ContactsData
289   * @since 10
290   */
291  function queryContact(context: Context, key: string, callback: AsyncCallback<Contact>): void;
292
293  /**
294   * Queries a specified contact of specified attributes.
295   *
296   * @permission ohos.permission.READ_CONTACTS
297   * @param { string } key - Indicates the unique query key of a contact.
298   * @param { Holder } holder - Indicates the contact holder.
299   * If this parameter is null, the default holder is used for matching.
300   * @param { AsyncCallback<Contact> } callback - Returns the specified contact.
301   * @syscap SystemCapability.Applications.ContactsData
302   * @since 7
303   * @deprecated since 10
304   * @useinstead contact.queryContact#queryContact
305   */
306  function queryContact(key: string, holder: Holder, callback: AsyncCallback<Contact>): void;
307
308  /**
309   * Queries a specified contact of specified attributes.
310   *
311   * @permission ohos.permission.READ_CONTACTS
312   * @param { Context } context - Indicates the context of application or capability.
313   * @param { string } key - Indicates the unique query key of a contact.
314   * @param { Holder } holder - Indicates the contact holder.
315   * If this parameter is null, the default holder is used for matching.
316   * @param { AsyncCallback<Contact> } callback - Returns the specified contact.
317   * @throws { BusinessError } 201 - Permission denied.
318   * @throws { BusinessError } 401 - Parameter error.
319   * @syscap SystemCapability.Applications.ContactsData
320   * @since 10
321   */
322  function queryContact(context: Context, key: string, holder: Holder, callback: AsyncCallback<Contact>): void;
323
324  /**
325   * Queries a specified contact of specified attributes.
326   *
327   * @permission ohos.permission.READ_CONTACTS
328   * @param { string } key - Indicates the unique query key of a contact.
329   * @param { ContactAttributes } attrs - Indicates the contact attributes.
330   * If this parameter is null, all attributes are used for matching.
331   * @param { AsyncCallback<Contact> } callback - Returns the specified contact.
332   * @syscap SystemCapability.Applications.ContactsData
333   * @since 7
334   * @deprecated since 10
335   * @useinstead contact.queryContact#queryContact
336   */
337  function queryContact(key: string, attrs: ContactAttributes, callback: AsyncCallback<Contact>): void;
338
339  /**
340   * Queries a specified contact of specified attributes.
341   *
342   * @permission ohos.permission.READ_CONTACTS
343   * @param { Context } context - Indicates the context of application or capability.
344   * @param { string } key - Indicates the unique query key of a contact.
345   * @param { ContactAttributes } attrs - Indicates the contact attributes.
346   * If this parameter is null, all attributes are used for matching.
347   * @param { AsyncCallback<Contact> } callback - Returns the specified contact.
348   * @throws { BusinessError } 201 - Permission denied.
349   * @throws { BusinessError } 401 - Parameter error.
350   * @syscap SystemCapability.Applications.ContactsData
351   * @since 10
352   */
353  function queryContact(context: Context, key: string, attrs: ContactAttributes, callback: AsyncCallback<Contact>): void;
354
355  /**
356   * Queries a specified contact of specified attributes.
357   *
358   * @permission ohos.permission.READ_CONTACTS
359   * @param { string } key - Indicates the unique query key of a contact.
360   * @param { Holder } holder - Indicates the contact holder.
361   * @param { ContactAttributes } attrs - Indicates the contact attributes.
362   * If this parameter is null, all attributes are used for matching.
363   * @param { AsyncCallback<Contact> } callback - Returns the specified contact.
364   * @syscap SystemCapability.Applications.ContactsData
365   * @since 7
366   * @deprecated since 10
367   * @useinstead contact.queryContact#queryContact
368   */
369  function queryContact(key: string, holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Contact>): void;
370
371  /**
372   * Queries a specified contact of specified attributes.
373   *
374   * @permission ohos.permission.READ_CONTACTS
375   * @param { Context } context - Indicates the context of application or capability.
376   * @param { string } key - Indicates the unique query key of a contact.
377   * @param { Holder } holder - Indicates the contact holder.
378   * @param { ContactAttributes } attrs - Indicates the contact attributes.
379   * If this parameter is null, all attributes are used for matching.
380   * @param { AsyncCallback<Contact> } callback - Returns the specified contact.
381   * @throws { BusinessError } 201 - Permission denied.
382   * @throws { BusinessError } 401 - Parameter error.
383   * @syscap SystemCapability.Applications.ContactsData
384   * @since 10
385   */
386  function queryContact(context: Context, key: string, holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Contact>): void;
387
388  /**
389   * Queries a specified contact of specified attributes.
390   *
391   * @permission ohos.permission.READ_CONTACTS
392   * @param { string } key - Indicates the unique query key of a contact.
393   * @param { Holder } holder - Indicates the contact holder.
394   * @param { ContactAttributes } attrs - Indicates the contact attributes.
395   * If this parameter is null, all attributes are used for matching.
396   * @returns { Promise<Contact> } Returns the specified contact.
397   * @syscap SystemCapability.Applications.ContactsData
398   * @since 7
399   * @deprecated since 10
400   * @useinstead contact.queryContact#queryContact
401   */
402  function queryContact(key: string, holder?: Holder, attrs?: ContactAttributes): Promise<Contact>;
403
404  /**
405   * Queries a specified contact of specified attributes.
406   *
407   * @permission ohos.permission.READ_CONTACTS
408   * @param { Context } context - Indicates the context of application or capability.
409   * @param { string } key - Indicates the unique query key of a contact.
410   * @param { Holder } holder - Indicates the contact holder.
411   * @param { ContactAttributes } attrs - Indicates the contact attributes.
412   * If this parameter is null, all attributes are used for matching.
413   * @returns { Promise<Contact> } Returns the specified contact.
414   * @throws { BusinessError } 201 - Permission denied.
415   * @throws { BusinessError } 401 - Parameter error.
416   * @syscap SystemCapability.Applications.ContactsData
417   * @since 10
418   */
419  function queryContact(context: Context, key: string, holder?: Holder, attrs?: ContactAttributes): Promise<Contact>;
420
421  /**
422   * Queries contacts with query conditions.
423   *
424   * @permission ohos.permission.READ_CONTACTS
425   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
426   * @syscap SystemCapability.Applications.ContactsData
427   * @since 7
428   * @deprecated since 10
429   * @useinstead contact.queryContacts#queryContacts
430   */
431  function queryContacts(callback: AsyncCallback<Array<Contact>>): void;
432
433  /**
434   * Queries contacts with query conditions.
435   *
436   * @permission ohos.permission.READ_CONTACTS
437   * @param { Context } context - Indicates the context of application or capability.
438   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
439   * @throws { BusinessError } 201 - Permission denied.
440   * @throws { BusinessError } 401 - Parameter error.
441   * @syscap SystemCapability.Applications.ContactsData
442   * @since 10
443   */
444  function queryContacts(context: Context, callback: AsyncCallback<Array<Contact>>): void;
445
446  /**
447   * Queries contacts with query conditions.
448   *
449   * @permission ohos.permission.READ_CONTACTS
450   * @param { Holder } holder - Indicates the contact holder.
451   * If this parameter is null, the default holder is used for matching.
452   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
453   * @syscap SystemCapability.Applications.ContactsData
454   * @since 7
455   * @deprecated since 10
456   * @useinstead contact.queryContacts#queryContacts
457   */
458  function queryContacts(holder: Holder, callback: AsyncCallback<Array<Contact>>): void;
459
460  /**
461   * Queries contacts with query conditions.
462   *
463   * @permission ohos.permission.READ_CONTACTS
464   * @param { Context } context - Indicates the context of application or capability.
465   * @param { Holder } holder - Indicates the contact holder.
466   * If this parameter is null, the default holder is used for matching.
467   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
468   * @throws { BusinessError } 201 - Permission denied.
469   * @throws { BusinessError } 401 - Parameter error.
470   * @syscap SystemCapability.Applications.ContactsData
471   * @since 10
472   */
473  function queryContacts(context: Context, holder: Holder, callback: AsyncCallback<Array<Contact>>): void;
474
475  /**
476   * Queries contacts with query conditions.
477   *
478   * @permission ohos.permission.READ_CONTACTS
479   * @param { ContactAttributes } attrs - Indicates the contact attributes.
480   * If this parameter is null, all attributes are used for matching.
481   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
482   * @syscap SystemCapability.Applications.ContactsData
483   * @since 7
484   * @deprecated since 10
485   * @useinstead contact.queryContacts#queryContacts
486   */
487  function queryContacts(attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
488
489  /**
490   * Queries contacts with query conditions.
491   *
492   * @permission ohos.permission.READ_CONTACTS
493   * @param { Context } context - Indicates the context of application or capability.
494   * @param { ContactAttributes } attrs - Indicates the contact attributes.
495   * If this parameter is null, all attributes are used for matching.
496   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
497   * @throws { BusinessError } 201 - Permission denied.
498   * @throws { BusinessError } 401 - Parameter error.
499   * @syscap SystemCapability.Applications.ContactsData
500   * @since 10
501   */
502  function queryContacts(context: Context, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
503
504  /**
505   * Queries contacts with query conditions.
506   *
507   * @permission ohos.permission.READ_CONTACTS
508   * @param { Holder } holder - Indicates the contact holder.
509   * If this parameter is null, the default holder is used for matching.
510   * @param { ContactAttributes } attrs - Indicates the contact attributes.
511   * If this parameter is null, all attributes are used for matching.
512   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
513   * @syscap SystemCapability.Applications.ContactsData
514   * @since 7
515   * @deprecated since 10
516   * @useinstead contact.queryContacts#queryContacts
517   */
518  function queryContacts(holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
519
520  /**
521   * Queries contacts with query conditions.
522   *
523   * @permission ohos.permission.READ_CONTACTS
524   * @param { Context } context - Indicates the context of application or capability.
525   * @param { Holder } holder - Indicates the contact holder.
526   * If this parameter is null, the default holder is used for matching.
527   * @param { ContactAttributes } attrs - Indicates the contact attributes.
528   * If this parameter is null, all attributes are used for matching.
529   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
530   * @throws { BusinessError } 201 - Permission denied.
531   * @throws { BusinessError } 401 - Parameter error.
532   * @syscap SystemCapability.Applications.ContactsData
533   * @since 10
534   */
535  function queryContacts(context: Context, holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
536
537  /**
538   * Queries contacts with query conditions.
539   *
540   * @permission ohos.permission.READ_CONTACTS
541   * @param { Holder } holder - Indicates the contact holder.
542   * If this parameter is null, the default holder is used for matching.
543   * @param { ContactAttributes } attrs - Indicates the contact attributes.
544   * If this parameter is null, all attributes are used for matching.
545   * @returns { Promise<Array<Contact>> } Returns the {@code Contact} list object.
546   * @syscap SystemCapability.Applications.ContactsData
547   * @since 7
548   * @deprecated since 10
549   * @useinstead contact.queryContacts#queryContacts
550   */
551  function queryContacts(holder?: Holder, attrs?: ContactAttributes): Promise<Array<Contact>>;
552
553  /**
554   * Queries contacts with query conditions.
555   *
556   * @permission ohos.permission.READ_CONTACTS
557   * @param { Context } context - Indicates the context of application or capability.
558   * @param { Holder } holder - Indicates the contact holder.
559   * If this parameter is null, the default holder is used for matching.
560   * @param { ContactAttributes } attrs - Indicates the contact attributes.
561   * If this parameter is null, all attributes are used for matching.
562   * @returns { Promise<Array<Contact>> } Returns the {@code Contact} list object.
563   * @throws { BusinessError } 201 - Permission denied.
564   * @throws { BusinessError } 401 - Parameter error.
565   * @syscap SystemCapability.Applications.ContactsData
566   * @since 10
567   */
568  function queryContacts(context: Context, holder?: Holder, attrs?: ContactAttributes): Promise<Array<Contact>>;
569
570  /**
571   * Queries contacts by a specified email address.
572   *
573   * @permission ohos.permission.READ_CONTACTS
574   * @param { string } email - Indicates the email address.
575   * @param { AsyncCallback<Array<Contact>> } callback - Returns a {@code Contact} list object.
576   * @syscap SystemCapability.Applications.ContactsData
577   * @since 7
578   * @deprecated since 10
579   * @useinstead contact.queryContactsByEmail#queryContactsByEmail
580   */
581  function queryContactsByEmail(email: string, callback: AsyncCallback<Array<Contact>>): void;
582
583  /**
584   * Queries contacts by a specified email address.
585   *
586   * @permission ohos.permission.READ_CONTACTS
587   * @param { Context } context - Indicates the context of application or capability.
588   * @param { string } email - Indicates the email address.
589   * @param { AsyncCallback<Array<Contact>> } callback - Returns a {@code Contact} list object.
590   * @throws { BusinessError } 201 - Permission denied.
591   * @throws { BusinessError } 401 - Parameter error.
592   * @syscap SystemCapability.Applications.ContactsData
593   * @since 10
594   */
595  function queryContactsByEmail(context: Context, email: string, callback: AsyncCallback<Array<Contact>>): void;
596
597  /**
598   * Queries contacts by a specified email address and contact holder.
599   *
600   * @permission ohos.permission.READ_CONTACTS
601   * @param { string } email - Indicates the email address.
602   * @param { Holder } holder - Indicates the contact holder.
603   * If this parameter is null, the default holder is used for matching.
604   * @param { AsyncCallback<Array<Contact>> } callback - Returns a {@code Contact} list object.
605   * @syscap SystemCapability.Applications.ContactsData
606   * @since 7
607   * @deprecated since 10
608   * @useinstead contact.queryContactsByEmail#queryContactsByEmail
609   */
610  function queryContactsByEmail(email: string, holder: Holder, callback: AsyncCallback<Array<Contact>>): void;
611
612  /**
613   * Queries contacts by a specified email address and contact holder.
614   *
615   * @permission ohos.permission.READ_CONTACTS
616   * @param { Context } context - Indicates the context of application or capability.
617   * @param { string } email - Indicates the email address.
618   * @param { Holder } holder - Indicates the contact holder.
619   * If this parameter is null, the default holder is used for matching.
620   * @param { AsyncCallback<Array<Contact>> } callback - Returns a {@code Contact} list object.
621   * @throws { BusinessError } 201 - Permission denied.
622   * @throws { BusinessError } 401 - Parameter error.
623   * @syscap SystemCapability.Applications.ContactsData
624   * @since 10
625   */
626  function queryContactsByEmail(context: Context, email: string, holder: Holder,
627    callback: AsyncCallback<Array<Contact>>): void;
628
629  /**
630   * Queries contacts by a specified email address and contact attributes.
631   *
632   * @permission ohos.permission.READ_CONTACTS
633   * @param { string } email - Indicates the email address.
634   * @param { ContactAttributes } attrs - Indicates the contact attributes.
635   * If this parameter is null, all attributes are used for matching.
636   * @param { AsyncCallback<Array<Contact>> } callback - Returns a {@code Contact} list object.
637   * @syscap SystemCapability.Applications.ContactsData
638   * @since 7
639   * @deprecated since 10
640   * @useinstead contact.queryContactsByEmail#queryContactsByEmail
641   */
642  function queryContactsByEmail(email: string, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
643
644  /**
645   * Queries contacts by a specified email address and contact attributes.
646   *
647   * @permission ohos.permission.READ_CONTACTS
648   * @param { Context } context - Indicates the context of application or capability.
649   * @param { string } email - Indicates the email address.
650   * @param { ContactAttributes } attrs - Indicates the contact attributes.
651   * If this parameter is null, all attributes are used for matching.
652   * @param { AsyncCallback<Array<Contact>> } callback - Returns a {@code Contact} list object.
653   * @throws { BusinessError } 201 - Permission denied.
654   * @throws { BusinessError } 401 - Parameter error.
655   * @syscap SystemCapability.Applications.ContactsData
656   * @since 10
657   */
658  function queryContactsByEmail(context: Context, email: string, attrs: ContactAttributes,
659    callback: AsyncCallback<Array<Contact>>): void;
660
661  /**
662   * Queries contacts by a specified email address, contact holder, and contact attributes.
663   *
664   * @permission ohos.permission.READ_CONTACTS
665   * @param { string } email - Indicates the email address.
666   * @param { Holder } holder - Indicates the contact holder.
667   * If this parameter is null, the default holder is used for matching.
668   * @param { ContactAttributes } attrs - Indicates the contact attributes.
669   * If this parameter is null, all attributes are used for matching.
670   * @param { AsyncCallback<Array<Contact>> } callback - Returns a {@code Contact} list object.
671   * @syscap SystemCapability.Applications.ContactsData
672   * @since 7
673   * @deprecated since 10
674   * @useinstead contact.queryContactsByEmail#queryContactsByEmail
675   */
676  function queryContactsByEmail(email: string, holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
677
678  /**
679   * Queries contacts by a specified email address, contact holder, and contact attributes.
680   *
681   * @permission ohos.permission.READ_CONTACTS
682   * @param { Context } context - Indicates the context of application or capability.
683   * @param { string } email - Indicates the email address.
684   * @param { Holder } holder - Indicates the contact holder.
685   * If this parameter is null, the default holder is used for matching.
686   * @param { ContactAttributes } attrs - Indicates the contact attributes.
687   * If this parameter is null, all attributes are used for matching.
688   * @param { AsyncCallback<Array<Contact>> } callback - Returns a {@code Contact} list object.
689   * @throws { BusinessError } 201 - Permission denied.
690   * @throws { BusinessError } 401 - Parameter error.
691   * @syscap SystemCapability.Applications.ContactsData
692   * @since 10
693   */
694  function queryContactsByEmail(context: Context, email: string, holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
695
696  /**
697   * Queries contacts by a specified email address, contact holder, and contact attributes.
698   *
699   * @permission ohos.permission.READ_CONTACTS
700   * @param { string } email - Indicates the email address.
701   * @param { Holder } holder - Indicates the contact holder.
702   * If this parameter is null, the default holder is used for matching.
703   * @param { ContactAttributes } attrs - Indicates the contact attributes.
704   * If this parameter is null, all attributes are used for matching.
705   * @returns { Promise<Array<Contact>> } Returns a {@code Contact} list object.
706   * @syscap SystemCapability.Applications.ContactsData
707   * @since 7
708   * @deprecated since 10
709   * @useinstead contact.queryContactsByEmail#queryContactsByEmail
710   */
711  function queryContactsByEmail(email: string, holder?: Holder, attrs?: ContactAttributes): Promise<Array<Contact>>;
712
713  /**
714   * Queries contacts by a specified email address, contact holder, and contact attributes.
715   *
716   * @permission ohos.permission.READ_CONTACTS
717   * @param { Context } context - Indicates the context of application or capability.
718   * @param { string } email - Indicates the email address.
719   * @param { Holder } holder - Indicates the contact holder.
720   * If this parameter is null, the default holder is used for matching.
721   * @param { ContactAttributes } attrs - Indicates the contact attributes.
722   * If this parameter is null, all attributes are used for matching.
723   * @returns { Promise<Array<Contact>> } Returns a {@code Contact} list object.
724   * @throws { BusinessError } 201 - Permission denied.
725   * @throws { BusinessError } 401 - Parameter error.
726   * @syscap SystemCapability.Applications.ContactsData
727   * @since 10
728   */
729  function queryContactsByEmail(context: Context, email: string, holder?: Holder, attrs?: ContactAttributes): Promise<Array<Contact>>;
730
731  /**
732   * Queries contacts by a phone number.
733   *
734   * @permission ohos.permission.READ_CONTACTS
735   * @param { string } phoneNumber - Indicates the phone number.
736   * Only full match is supported, and wildcards are not supported.
737   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
738   * @syscap SystemCapability.Applications.ContactsData
739   * @since 7
740   * @deprecated since 10
741   * @useinstead contact.queryContactsByPhoneNumber#queryContactsByPhoneNumber
742   */
743  function queryContactsByPhoneNumber(phoneNumber: string, callback: AsyncCallback<Array<Contact>>): void;
744
745  /**
746   * Queries contacts by a phone number.
747   *
748   * @permission ohos.permission.READ_CONTACTS
749   * @param { Context } context - Indicates the context of application or capability.
750   * @param { string } phoneNumber - Indicates the phone number.
751   * Only full match is supported, and wildcards are not supported.
752   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
753   * @throws { BusinessError } 201 - Permission denied.
754   * @throws { BusinessError } 401 - Parameter error.
755   * @syscap SystemCapability.Applications.ContactsData
756   * @since 10
757   */
758  function queryContactsByPhoneNumber(context: Context, phoneNumber: string, callback: AsyncCallback<Array<Contact>>): void;
759
760  /**
761   * Queries contacts by a phone number and contact holder.
762   *
763   * @permission ohos.permission.READ_CONTACTS
764   * @param { string } phoneNumber - Indicates the phone number.
765   * Only full match is supported, and wildcards are not supported.
766   * @param { Holder } holder - Indicates the contact holder.
767   * If this parameter is null, the default holder is used for matching.
768   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
769   * @syscap SystemCapability.Applications.ContactsData
770   * @since 7
771   * @deprecated since 10
772   * @useinstead contact.queryContactsByPhoneNumber#queryContactsByPhoneNumber
773   */
774  function queryContactsByPhoneNumber(phoneNumber: string, holder: Holder, callback: AsyncCallback<Array<Contact>>): void;
775
776  /**
777   * Queries contacts by a phone number and contact holder.
778   *
779   * @permission ohos.permission.READ_CONTACTS
780   * @param { Context } context - Indicates the context of application or capability.
781   * @param { string } phoneNumber - Indicates the phone number.
782   * Only full match is supported, and wildcards are not supported.
783   * @param { Holder } holder - Indicates the contact holder.
784   * If this parameter is null, the default holder is used for matching.
785   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
786   * @throws { BusinessError } 201 - Permission denied.
787   * @throws { BusinessError } 401 - Parameter error.
788   * @syscap SystemCapability.Applications.ContactsData
789   * @since 10
790   */
791  function queryContactsByPhoneNumber(context: Context, phoneNumber: string, holder: Holder, callback: AsyncCallback<Array<Contact>>): void;
792
793  /**
794   * Queries contacts by a phone number and contact attribute.
795   *
796   * @permission ohos.permission.READ_CONTACTS
797   * @param { string } phoneNumber - Indicates the phone number.
798   * Only full match is supported, and wildcards are not supported.
799   * @param { ContactAttributes } attrs - Indicates the contact attribute.
800   * If this parameter is null, all attributes will be used for matching.
801   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
802   * @syscap SystemCapability.Applications.ContactsData
803   * @since 7
804   * @deprecated since 10
805   * @useinstead contact.queryContactsByPhoneNumber#queryContactsByPhoneNumber
806   */
807  function queryContactsByPhoneNumber(phoneNumber: string, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
808
809  /**
810   * Queries contacts by a phone number and contact attribute.
811   *
812   * @permission ohos.permission.READ_CONTACTS
813   * @param { Context } context - Indicates the context of application or capability.
814   * @param { string } phoneNumber - Indicates the phone number.
815   * Only full match is supported, and wildcards are not supported.
816   * @param { ContactAttributes } attrs - Indicates the contact attribute.
817   * If this parameter is null, all attributes will be used for matching.
818   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
819   * @throws { BusinessError } 201 - Permission denied.
820   * @throws { BusinessError } 401 - Parameter error.
821   * @syscap SystemCapability.Applications.ContactsData
822   * @since 10
823   */
824  function queryContactsByPhoneNumber(context: Context, phoneNumber: string, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
825
826  /**
827   * Queries contacts by a phone number, contact holder and contact attribute.
828   *
829   * @permission ohos.permission.READ_CONTACTS
830   * @param { string } phoneNumber - Indicates the phone number.
831   * Only full match is supported, and wildcards are not supported.
832   * @param { Holder } holder - Indicates the contact holder.
833   * If this parameter is null, the default holder is used for matching.
834   * @param { ContactAttributes } attrs - Indicates the contact attribute.
835   * If this parameter is null, all attributes will be used for matching.
836   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
837   * @syscap SystemCapability.Applications.ContactsData
838   * @since 7
839   * @deprecated since 10
840   * @useinstead contact.queryContactsByPhoneNumber#queryContactsByPhoneNumber
841   */
842  function queryContactsByPhoneNumber(phoneNumber: string, holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
843
844  /**
845   * Queries contacts by a phone number, contact holder and contact attribute.
846   *
847   * @permission ohos.permission.READ_CONTACTS
848   * @param { Context } context - Indicates the context of application or capability.
849   * @param { string } phoneNumber - Indicates the phone number.
850   * Only full match is supported, and wildcards are not supported.
851   * @param { Holder } holder - Indicates the contact holder.
852   * If this parameter is null, the default holder is used for matching.
853   * @param { ContactAttributes } attrs - Indicates the contact attribute.
854   * If this parameter is null, all attributes will be used for matching.
855   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
856   * @throws { BusinessError } 201 - Permission denied.
857   * @throws { BusinessError } 401 - Parameter error.
858   * @syscap SystemCapability.Applications.ContactsData
859   * @since 10
860   */
861  function queryContactsByPhoneNumber(context: Context, phoneNumber: string, holder: Holder, attrs: ContactAttributes,
862    callback: AsyncCallback<Array<Contact>>): void;
863
864  /**
865   * Queries contacts by a phone number, contact holder and contact attribute.
866   *
867   * @permission ohos.permission.READ_CONTACTS
868   * @param { string } phoneNumber - Indicates the phone number.
869   * Only full match is supported, and wildcards are not supported.
870   * @param { Holder } holder - Indicates the contact holder.
871   * If this parameter is null, the default holder is used for matching.
872   * @param { ContactAttributes } attrs - Indicates the contact attribute.
873   * If this parameter is null, all attributes will be used for matching.
874   * @returns { Promise<Array<Contact>> } Returns the {@code Contact} list object.
875   * @syscap SystemCapability.Applications.ContactsData
876   * @since 7
877   * @deprecated since 10
878   * @useinstead contact.queryContactsByPhoneNumber#queryContactsByPhoneNumber
879   */
880  function queryContactsByPhoneNumber(phoneNumber: string, holder?: Holder, attrs?: ContactAttributes): Promise<Array<Contact>>;
881
882  /**
883   * Queries contacts by a phone number, contact holder and contact attribute.
884   *
885   * @permission ohos.permission.READ_CONTACTS
886   * @param { Context } context - Indicates the context of application or capability.
887   * @param { string } phoneNumber - Indicates the phone number.
888   * Only full match is supported, and wildcards are not supported.
889   * @param { Holder } holder - Indicates the contact holder.
890   * If this parameter is null, the default holder is used for matching.
891   * @param { ContactAttributes } attrs - Indicates the contact attribute.
892   * If this parameter is null, all attributes will be used for matching.
893   * @returns { Promise<Array<Contact>> } Returns the {@code Contact} list object.
894   * @throws { BusinessError } 201 - Permission denied.
895   * @throws { BusinessError } 401 - Parameter error.
896   * @syscap SystemCapability.Applications.ContactsData
897   * @since 10
898   */
899  function queryContactsByPhoneNumber(context: Context, phoneNumber: string, holder?: Holder, attrs?: ContactAttributes): Promise<Array<Contact>>;
900
901  /**
902   * Queries contact groups.
903   *
904   * @permission ohos.permission.READ_CONTACTS
905   * @param { AsyncCallback<Array<Group>> } callback - Returns the contact group list object.
906   * @syscap SystemCapability.Applications.ContactsData
907   * @since 7
908   * @deprecated since 10
909   * @useinstead contact.queryGroups#queryGroups
910   */
911  function queryGroups(callback: AsyncCallback<Array<Group>>): void;
912
913  /**
914   * Queries contact groups.
915   *
916   * @permission ohos.permission.READ_CONTACTS
917   * @param { Context } context - Indicates the context of application or capability.
918   * @param { AsyncCallback<Array<Group>> } callback - Returns the contact group list object.
919   * @throws { BusinessError } 201 - Permission denied.
920   * @throws { BusinessError } 401 - Parameter error.
921   * @syscap SystemCapability.Applications.ContactsData
922   * @since 10
923   */
924  function queryGroups(context: Context, callback: AsyncCallback<Array<Group>>): void;
925
926  /**
927   * Queries contact groups by contact holder.
928   *
929   * @permission ohos.permission.READ_CONTACTS
930   * @param { Holder } holder - Indicates the contact holder.
931   * If this parameter is null, the default holder is used for matching.
932   * @param { AsyncCallback<Array<Group>> } callback - Returns the contact group list object.
933   * @syscap SystemCapability.Applications.ContactsData
934   * @since 7
935   * @deprecated since 10
936   * @useinstead contact.queryGroups#queryGroups
937   */
938  function queryGroups(holder: Holder, callback: AsyncCallback<Array<Group>>): void;
939
940  /**
941   * Queries contact groups by contact holder.
942   *
943   * @permission ohos.permission.READ_CONTACTS
944   * @param { Context } context - Indicates the context of application or capability.
945   * @param { Holder } holder - Indicates the contact holder.
946   * If this parameter is null, the default holder is used for matching.
947   * @param { AsyncCallback<Array<Group>> } callback - Returns the contact group list object.
948   * @throws { BusinessError } 201 - Permission denied.
949   * @throws { BusinessError } 401 - Parameter error.
950   * @syscap SystemCapability.Applications.ContactsData
951   * @since 10
952   */
953  function queryGroups(context: Context, holder: Holder, callback: AsyncCallback<Array<Group>>): void;
954
955  /**
956   * Queries contact groups by contact holder.
957   *
958   * @permission ohos.permission.READ_CONTACTS
959   * @param { Holder } holder - Indicates the contact holder.
960   * If this parameter is null, the default holder is used for matching.
961   * @returns { Promise<Array<Group>> } Returns the contact group list object.
962   * @syscap SystemCapability.Applications.ContactsData
963   * @since 7
964   * @deprecated since 10
965   * @useinstead contact.queryGroups#queryGroups
966   */
967  function queryGroups(holder?: Holder): Promise<Array<Group>>;
968
969  /**
970   * Queries contact groups by contact holder.
971   *
972   * @permission ohos.permission.READ_CONTACTS
973   * @param { Context } context - Indicates the context of application or capability.
974   * @param { Holder } holder - Indicates the contact holder.
975   * If this parameter is null, the default holder is used for matching.
976   * @returns { Promise<Array<Group>> } Returns the contact group list object.
977   * @throws { BusinessError } 201 - Permission denied.
978   * @throws { BusinessError } 401 - Parameter error.
979   * @syscap SystemCapability.Applications.ContactsData
980   * @since 10
981   */
982  function queryGroups(context: Context, holder?: Holder): Promise<Array<Group>>;
983
984  /**
985   * Queries contact holders.
986   *
987   * @permission ohos.permission.READ_CONTACTS
988   * @param { AsyncCallback<Array<Holder>> } callback - Returns the {@code Holder} list object.
989   * @syscap SystemCapability.Applications.ContactsData
990   * @since 7
991   * @deprecated since 10
992   * @useinstead contact.queryHolders#queryHolders
993   */
994  function queryHolders(callback: AsyncCallback<Array<Holder>>): void;
995
996  /**
997   * Queries contact holders.
998   *
999   * @permission ohos.permission.READ_CONTACTS
1000   * @param { Context } context - Indicates the context of application or capability.
1001   * @param { AsyncCallback<Array<Holder>> } callback - Returns the {@code Holder} list object.
1002   * @throws { BusinessError } 201 - Permission denied.
1003   * @throws { BusinessError } 401 - Parameter error.
1004   * @syscap SystemCapability.Applications.ContactsData
1005   * @since 10
1006   */
1007  function queryHolders(context: Context, callback: AsyncCallback<Array<Holder>>): void;
1008
1009  /**
1010   * Queries contact holders.
1011   *
1012   * @permission ohos.permission.READ_CONTACTS
1013   * @returns { Promise<Array<Holder>> } Returns the {@code Holder} list object.
1014   * @syscap SystemCapability.Applications.ContactsData
1015   * @since 7
1016   * @deprecated since 10
1017   * @useinstead contact.queryHolders#queryHolders
1018   */
1019  function queryHolders(): Promise<Array<Holder>>;
1020
1021  /**
1022   * Queries contact holders.
1023   *
1024   * @permission ohos.permission.READ_CONTACTS
1025   * @param { Context } context - Indicates the context of application or capability.
1026   * @returns { Promise<Array<Holder>> } Returns the {@code Holder} list object.
1027   * @throws { BusinessError } 201 - Permission denied.
1028   * @throws { BusinessError } 401 - Parameter error.
1029   * @syscap SystemCapability.Applications.ContactsData
1030   * @since 10
1031   */
1032  function queryHolders(context: Context): Promise<Array<Holder>>;
1033
1034  /**
1035   * Obtains the query key of a contact based on a specified ID.
1036   *
1037   * @permission ohos.permission.READ_CONTACTS
1038   * @param { number } id - Indicates the contact ID.
1039   * @param { AsyncCallback<string> } callback - Returns the query key of the contact.
1040   * @syscap SystemCapability.Applications.ContactsData
1041   * @since 7
1042   * @deprecated since 10
1043   * @useinstead contact.queryKey#queryKey
1044   */
1045  function queryKey(id: number, callback: AsyncCallback<string>): void;
1046
1047  /**
1048   * Obtains the query key of a contact based on a specified ID.
1049   *
1050   * @permission ohos.permission.READ_CONTACTS
1051   * @param { Context } context - Indicates the context of application or capability.
1052   * @param { number } id - Indicates the contact ID.
1053   * @param { AsyncCallback<string> } callback - Returns the query key of the contact.
1054   * @throws { BusinessError } 201 - Permission denied.
1055   * @throws { BusinessError } 401 - Parameter error.
1056   * @syscap SystemCapability.Applications.ContactsData
1057   * @since 10
1058   */
1059  function queryKey(context: Context, id: number, callback: AsyncCallback<string>): void;
1060
1061  /**
1062   * Obtains the query key of a contact based on a specified ID and holder.
1063   *
1064   * @permission ohos.permission.READ_CONTACTS
1065   * @param { number } id - Indicates the contact ID.
1066   * @param { Holder } holder - Indicates the contact holder.
1067   * If this parameter is null, the default holder is used for matching.
1068   * @param { AsyncCallback<string> } callback - Returns the query key of the contact.
1069   * @syscap SystemCapability.Applications.ContactsData
1070   * @since 7
1071   * @deprecated since 10
1072   * @useinstead contact.queryKey#queryKey
1073   */
1074  function queryKey(id: number, holder: Holder, callback: AsyncCallback<string>): void;
1075
1076  /**
1077   * Obtains the query key of a contact based on a specified ID and holder.
1078   *
1079   * @permission ohos.permission.READ_CONTACTS
1080   * @param { Context } context - Indicates the context of application or capability.
1081   * @param { number } id - Indicates the contact ID.
1082   * @param { Holder } holder - Indicates the contact holder.
1083   * If this parameter is null, the default holder is used for matching.
1084   * @param { AsyncCallback<string> } callback - Returns the query key of the contact.
1085   * @throws { BusinessError } 201 - Permission denied.
1086   * @throws { BusinessError } 401 - Parameter error.
1087   * @syscap SystemCapability.Applications.ContactsData
1088   * @since 10
1089   */
1090  function queryKey(context: Context, id: number, holder: Holder, callback: AsyncCallback<string>): void;
1091
1092  /**
1093   * Obtains the query key of a contact based on a specified ID and holder.
1094   *
1095   * @permission ohos.permission.READ_CONTACTS
1096   * @param { number } id - Indicates the contact ID.
1097   * @param { Holder } holder - Indicates the contact holder.
1098   * If this parameter is null, the default holder is used for matching.
1099   * @returns { Promise<string> } Returns the query key of the contact.
1100   * @syscap SystemCapability.Applications.ContactsData
1101   * @since 7
1102   * @deprecated since 10
1103   * @useinstead contact.queryKey#queryKey
1104   */
1105  function queryKey(id: number, holder?: Holder): Promise<string>;
1106
1107  /**
1108   * Obtains the query key of a contact based on a specified ID and holder.
1109   *
1110   * @permission ohos.permission.READ_CONTACTS
1111   * @param { Context } context - Indicates the context of application or capability.
1112   * @param { number } id - Indicates the contact ID.
1113   * @param { Holder } holder - Indicates the contact holder.
1114   * If this parameter is null, the default holder is used for matching.
1115   * @returns { Promise<string> } Returns the query key of the contact.
1116   * @throws { BusinessError } 201 - Permission denied.
1117   * @throws { BusinessError } 401 - Parameter error.
1118   * @syscap SystemCapability.Applications.ContactsData
1119   * @since 10
1120   */
1121  function queryKey(context: Context, id: number, holder?: Holder): Promise<string>;
1122
1123  /**
1124   * Queries information about "my card".
1125   *
1126   * @permission ohos.permission.READ_CONTACTS
1127   * @param { AsyncCallback<Contact> } callback - Returns information about "my card".
1128   * @syscap SystemCapability.Applications.ContactsData
1129   * @since 7
1130   * @deprecated since 10
1131   * @useinstead contact.queryMyCard#queryMyCard
1132   */
1133  function queryMyCard(callback: AsyncCallback<Contact>): void;
1134
1135  /**
1136   * Queries information about "my card".
1137   *
1138   * @permission ohos.permission.READ_CONTACTS
1139   * @param { Context } context - Indicates the context of application or capability.
1140   * @param { AsyncCallback<Contact> } callback - Returns information about "my card".
1141   * @throws { BusinessError } 201 - Permission denied.
1142   * @throws { BusinessError } 401 - Parameter error.
1143   * @syscap SystemCapability.Applications.ContactsData
1144   * @since 10
1145   */
1146  function queryMyCard(context: Context, callback: AsyncCallback<Contact>): void;
1147
1148  /**
1149   * Queries information about "my card".
1150   *
1151   * @permission ohos.permission.READ_CONTACTS
1152   * @param { ContactAttributes } attrs - Indicates the contact attribute.
1153   * If this parameter is null, all attributes are used for matching.
1154   * @param { AsyncCallback<Contact> } callback - Returns information about "my card".
1155   * @syscap SystemCapability.Applications.ContactsData
1156   * @since 7
1157   * @deprecated since 10
1158   * @useinstead contact.queryMyCard#queryMyCard
1159   */
1160  function queryMyCard(attrs: ContactAttributes, callback: AsyncCallback<Contact>): void;
1161
1162  /**
1163   * Queries information about "my card".
1164   *
1165   * @permission ohos.permission.READ_CONTACTS
1166   * @param { Context } context - Indicates the context of application or capability.
1167   * @param { ContactAttributes } attrs - Indicates the contact attribute.
1168   * If this parameter is null, all attributes are used for matching.
1169   * @param { AsyncCallback<Contact> } callback - Returns information about "my card".
1170   * @throws { BusinessError } 201 - Permission denied.
1171   * @throws { BusinessError } 401 - Parameter error.
1172   * @syscap SystemCapability.Applications.ContactsData
1173   * @since 10
1174   */
1175  function queryMyCard(context: Context, attrs: ContactAttributes, callback: AsyncCallback<Contact>): void;
1176
1177  /**
1178   * Queries information about "my card".
1179   *
1180   * @permission ohos.permission.READ_CONTACTS
1181   * @param { ContactAttributes } attrs - Indicates the contact attribute.
1182   * If this parameter is null, all attributes are used for matching.
1183   * @returns { Promise<Contact> } Returns information about "my card".
1184   * @syscap SystemCapability.Applications.ContactsData
1185   * @since 7
1186   * @deprecated since 10
1187   * @useinstead contact.queryMyCard#queryMyCard
1188   */
1189  function queryMyCard(attrs?: ContactAttributes): Promise<Contact>;
1190
1191  /**
1192   * Queries information about "my card".
1193   *
1194   * @permission ohos.permission.READ_CONTACTS
1195   * @param { Context } context - Indicates the context of application or capability.
1196   * @param { ContactAttributes } attrs - Indicates the contact attribute.
1197   * If this parameter is null, all attributes are used for matching.
1198   * @returns { Promise<Contact> } Returns information about "my card".
1199   * @throws { BusinessError } 201 - Permission denied.
1200   * @throws { BusinessError } 401 - Parameter error.
1201   * @syscap SystemCapability.Applications.ContactsData
1202   * @since 10
1203   */
1204  function queryMyCard(context: Context, attrs?: ContactAttributes): Promise<Contact>;
1205
1206  /**
1207   * Updates specified attributes of a contact.
1208   *
1209   * @permission ohos.permission.WRITE_CONTACTS
1210   * @param { Contact } contact - Indicates the contact whose information is to update.
1211   * @param { AsyncCallback<void> } callback - The callback of updateContact.
1212   * @syscap SystemCapability.Applications.ContactsData
1213   * @since 7
1214   * @deprecated since 10
1215   * @useinstead contact.updateContact#updateContact
1216   */
1217  function updateContact(contact: Contact, callback: AsyncCallback<void>): void;
1218
1219  /**
1220   * Updates specified attributes of a contact.
1221   *
1222   * @permission ohos.permission.WRITE_CONTACTS
1223   * @param { Context } context - Indicates the context of application or capability.
1224   * @param { Contact } contact - Indicates the contact whose information is to update.
1225   * @param { AsyncCallback<void> } callback - The callback of updateContact.
1226   * @throws { BusinessError } 201 - Permission denied.
1227   * @throws { BusinessError } 401 - Parameter error.
1228   * @syscap SystemCapability.Applications.ContactsData
1229   * @since 10
1230   */
1231  function updateContact(context: Context, contact: Contact, callback: AsyncCallback<void>): void;
1232
1233  /**
1234   * Updates specified attributes of a contact.
1235   *
1236   * @permission ohos.permission.WRITE_CONTACTS
1237   * @param { Contact } contact - Indicates the contact whose information is to update.
1238   * @param { ContactAttributes } attrs - Indicates the contact attribute.
1239   * If this parameter is null, all attributes are used for matching.
1240   * @param { AsyncCallback<void> } callback - The callback of updateContact.
1241   * @syscap SystemCapability.Applications.ContactsData
1242   * @since 7
1243   * @deprecated since 10
1244   * @useinstead contact.updateContact#updateContact
1245   */
1246  function updateContact(contact: Contact, attrs: ContactAttributes, callback: AsyncCallback<void>): void;
1247
1248  /**
1249   * Updates specified attributes of a contact.
1250   *
1251   * @permission ohos.permission.WRITE_CONTACTS
1252   * @param { Context } context - Indicates the context of application or capability.
1253   * @param { Contact } contact - Indicates the contact whose information is to update.
1254   * @param { ContactAttributes } attrs - Indicates the contact attribute.
1255   * If this parameter is null, all attributes are used for matching.
1256   * @param { AsyncCallback<void> } callback - The callback of updateContact.
1257   * @throws { BusinessError } 201 - Permission denied.
1258   * @throws { BusinessError } 401 - Parameter error.
1259   * @syscap SystemCapability.Applications.ContactsData
1260   * @since 10
1261   */
1262  function updateContact(context: Context, contact: Contact, attrs: ContactAttributes, callback: AsyncCallback<void>): void;
1263
1264  /**
1265   * Updates specified attributes of a contact.
1266   *
1267   * @permission ohos.permission.WRITE_CONTACTS
1268   * @param { Contact } contact - Indicates the contact whose information is to update.
1269   * @param { ContactAttributes } attrs - Indicates the contact attribute.
1270   * If this parameter is null, all attributes are used for matching.
1271   * @returns { Promise<void> } The promise returned by the function.
1272   * @syscap SystemCapability.Applications.ContactsData
1273   * @since 7
1274   * @deprecated since 10
1275   * @useinstead contact.updateContact#updateContact
1276   */
1277  function updateContact(contact: Contact, attrs?: ContactAttributes): Promise<void>;
1278
1279  /**
1280   * Updates specified attributes of a contact.
1281   *
1282   * @permission ohos.permission.WRITE_CONTACTS
1283   * @param { Context } context - Indicates the context of application or capability.
1284   * @param { Contact } contact - Indicates the contact whose information is to update.
1285   * @param { ContactAttributes } attrs - Indicates the contact attribute.
1286   * If this parameter is null, all attributes are used for matching.
1287   * @returns { Promise<void> } The promise returned by the function.
1288   * @throws { BusinessError } 201 - Permission denied.
1289   * @throws { BusinessError } 401 - Parameter error.
1290   * @syscap SystemCapability.Applications.ContactsData
1291   * @since 10
1292   */
1293  function updateContact(context: Context, contact: Contact, attrs?: ContactAttributes): Promise<void>;
1294
1295  /**
1296   * Checks whether the contact ID is in the local phone book.
1297   *
1298   * @permission ohos.permission.READ_CONTACTS
1299   * @param { number } id - Indicates the contact ID.
1300   * @param { AsyncCallback<boolean> } callback - The callback of isLocalContact.
1301   * Returns {@code true} if the contact ID is in the local phone book; returns {@code false} otherwise.
1302   * @syscap SystemCapability.Applications.ContactsData
1303   * @since 7
1304   * @deprecated since 10
1305   * @useinstead contact.isLocalContact#isLocalContact
1306   */
1307  function isLocalContact(id: number, callback: AsyncCallback<boolean>): void;
1308
1309  /**
1310   * Checks whether the contact ID is in the local phone book.
1311   *
1312   * @permission ohos.permission.READ_CONTACTS
1313   * @param { Context } context - Indicates the context of application or capability.
1314   * @param { number } id - Indicates the contact ID.
1315   * @param { AsyncCallback<boolean> } callback - The callback of isLocalContact.
1316   * Returns {@code true} if the contact ID is in the local phone book; returns {@code false} otherwise.
1317   * @throws { BusinessError } 201 - Permission denied.
1318   * @throws { BusinessError } 401 - Parameter error.
1319   * @syscap SystemCapability.Applications.ContactsData
1320   * @since 10
1321   */
1322  function isLocalContact(context: Context, id: number, callback: AsyncCallback<boolean>): void;
1323
1324  /**
1325   * Checks whether the contact ID is in the local phone book.
1326   *
1327   * @permission ohos.permission.READ_CONTACTS
1328   * @param { number } id - Indicates the contact ID.
1329   * @returns { Promise<boolean> } Returns {@code true} if the contact ID is in the local phone book,
1330   * returns {@code false} otherwise.
1331   * @syscap SystemCapability.Applications.ContactsData
1332   * @since 7
1333   * @deprecated since 10
1334   * @useinstead contact.isLocalContact#isLocalContact
1335   */
1336  function isLocalContact(id: number): Promise<boolean>;
1337
1338  /**
1339   * Checks whether the contact ID is in the local phone book.
1340   *
1341   * @permission ohos.permission.READ_CONTACTS
1342   * @param { Context } context - Indicates the context of application or capability.
1343   * @param { number } id - Indicates the contact ID.
1344   * @returns { Promise<boolean> } Returns {@code true} if the contact ID is in the local phone book,
1345   * returns {@code false} otherwise.
1346   * @throws { BusinessError } 201 - Permission denied.
1347   * @throws { BusinessError } 401 - Parameter error.
1348   * @syscap SystemCapability.Applications.ContactsData
1349   * @since 10
1350   */
1351  function isLocalContact(context: Context, id: number): Promise<boolean>;
1352
1353  /**
1354   * Checks whether the contact ID is of "my card".
1355   *
1356   * @permission ohos.permission.READ_CONTACTS
1357   * @param { number } id - Indicates the contact ID.
1358   * @param { AsyncCallback<boolean> } callback - The callback of isMyCard.
1359   * Returns {@code true} if the contact ID is of "my card"; returns {@code false} otherwise.
1360   * @syscap SystemCapability.Applications.ContactsData
1361   * @since 7
1362   * @deprecated since 10
1363   * @useinstead contact.deleteContact#deleteContact
1364   */
1365  function isMyCard(id: number, callback: AsyncCallback<boolean>): void;
1366
1367  /**
1368   * Checks whether the contact ID is of "my card".
1369   *
1370   * @permission ohos.permission.READ_CONTACTS
1371   * @param { Context } context - Indicates the context of application or capability.
1372   * @param { number } id - Indicates the contact ID.
1373   * @param { AsyncCallback<boolean> } callback - The callback of isMyCard.
1374   * Returns {@code true} if the contact ID is of "my card"; returns {@code false} otherwise.
1375   * @throws { BusinessError } 201 - Permission denied.
1376   * @throws { BusinessError } 401 - Parameter error.
1377   * @syscap SystemCapability.Applications.ContactsData
1378   * @since 10
1379   */
1380  function isMyCard(context: Context, id: number, callback: AsyncCallback<boolean>): void;
1381
1382  /**
1383   * Checks whether the contact ID is of "my card".
1384   *
1385   * @permission ohos.permission.READ_CONTACTS
1386   * @param { number } id - Indicates the contact ID.
1387   * @returns { Promise<boolean> } Returns true if the contact ID is of "my card", returns false otherwise.
1388   * @syscap SystemCapability.Applications.ContactsData
1389   * @since 7
1390   * @deprecated since 10
1391   * @useinstead contact.isMyCard#isMyCard
1392   */
1393  function isMyCard(id: number): Promise<boolean>;
1394
1395  /**
1396   * Checks whether the contact ID is of "my card".
1397   *
1398   * @permission ohos.permission.READ_CONTACTS
1399   * @param { Context } context - Indicates the context of application or capability.
1400   * @param { number } id - Indicates the contact ID.
1401   * @returns { Promise<boolean> } Returns true if the contact ID is of "my card", returns false otherwise.
1402   * @throws { BusinessError } 201 - Permission denied.
1403   * @throws { BusinessError } 401 - Parameter error.
1404   * @syscap SystemCapability.Applications.ContactsData
1405   * @since 10
1406   */
1407  function isMyCard(context: Context, id: number): Promise<boolean>;
1408
1409  /**
1410   * ContactSelectionOptions Object
1411   *
1412   * @interface ContactSelectionOptions
1413   * @syscap SystemCapability.Applications.Contacts
1414   * @since 10
1415   */
1416  /**
1417   * ContactSelectionOptions Object
1418   *
1419   * @interface ContactSelectionOptions
1420   * @syscap SystemCapability.Applications.Contacts
1421   * @atomicservice
1422   * @since 11
1423   */
1424  interface ContactSelectionOptions {
1425    /**
1426     * Indicates the Single-select or multiple-select.
1427     *
1428     * @type { ?boolean }
1429     * @syscap SystemCapability.Applications.Contacts
1430     * @since 10
1431     */
1432    /**
1433     * Indicates the Single-select or multiple-select.
1434     *
1435     * @type { ?boolean }
1436     * @syscap SystemCapability.Applications.Contacts
1437     * @atomicservice
1438     * @since 11
1439     */
1440    isMultiSelect?: boolean;
1441  }
1442
1443  /**
1444   * Provides methods for contact information
1445   *
1446   * @syscap SystemCapability.Applications.ContactsData
1447   * @since 7
1448   */
1449  /**
1450   * Provides methods for contact information
1451   *
1452   * @syscap SystemCapability.Applications.ContactsData
1453   * @atomicservice
1454   * @since 11
1455   */
1456  class Contact {
1457    /**
1458     * Indicates the contact invalid ID.
1459     *
1460     * @readonly
1461     * @static
1462     * @syscap SystemCapability.Applications.ContactsData
1463     * @since 7
1464     */
1465    /**
1466     * Indicates the contact invalid ID.
1467     *
1468     * @readonly
1469     * @static
1470     * @syscap SystemCapability.Applications.ContactsData
1471     * @atomicservice
1472     * @since 11
1473     */
1474    static readonly INVALID_CONTACT_ID: -1
1475
1476    /**
1477     * Indicates the contact ID.
1478     *
1479     * @type { ?number }
1480     * @readonly
1481     * @syscap SystemCapability.Applications.ContactsData
1482     * @since 7
1483     */
1484    /**
1485     * Indicates the contact ID.
1486     *
1487     * @type { ?number }
1488     * @readonly
1489     * @syscap SystemCapability.Applications.ContactsData
1490     * @atomicservice
1491     * @since 11
1492     */
1493    readonly id?: number
1494
1495    /**
1496     * Indicates the query key that identifies the contact.
1497     *
1498     * @type { ?string }
1499     * @readonly
1500     * @syscap SystemCapability.Applications.ContactsData
1501     * @since 7
1502     */
1503    /**
1504     * Indicates the query key that identifies the contact.
1505     *
1506     * @type { ?string }
1507     * @readonly
1508     * @syscap SystemCapability.Applications.ContactsData
1509     * @atomicservice
1510     * @since 11
1511     */
1512    readonly key?: string
1513
1514    /**
1515     * Indicates the contact attributes.
1516     *
1517     * @type { ?ContactAttributes }
1518     * @syscap SystemCapability.Applications.ContactsData
1519     * @since 7
1520     */
1521    /**
1522     * Indicates the contact attributes.
1523     *
1524     * @type { ?ContactAttributes }
1525     * @syscap SystemCapability.Applications.ContactsData
1526     * @atomicservice
1527     * @since 11
1528     */
1529    contactAttributes?: ContactAttributes
1530
1531    /**
1532     * Indicates list of contact email addresses.
1533     *
1534     * @type { ?Email[] }
1535     * @syscap SystemCapability.Applications.ContactsData
1536     * @since 7
1537     */
1538    /**
1539     * Indicates list of contact email addresses.
1540     *
1541     * @type { ?Email[] }
1542     * @syscap SystemCapability.Applications.ContactsData
1543     * @atomicservice
1544     * @since 11
1545     */
1546    emails?: Email[]
1547
1548    /**
1549     * Indicates an event (special date) of the contact.
1550     *
1551     * @type { ?Event[] }
1552     * @syscap SystemCapability.Applications.ContactsData
1553     * @since 7
1554     */
1555    /**
1556     * Indicates an event (special date) of the contact.
1557     *
1558     * @type { ?Event[] }
1559     * @syscap SystemCapability.Applications.ContactsData
1560     * @atomicservice
1561     * @since 11
1562     */
1563    events?: Event[]
1564
1565    /**
1566     * Indicates a group of the contact.
1567     *
1568     * @type { ?Group[] }
1569     * @syscap SystemCapability.Applications.ContactsData
1570     * @since 7
1571     */
1572    /**
1573     * Indicates a group of the contact.
1574     *
1575     * @type { ?Group[] }
1576     * @syscap SystemCapability.Applications.ContactsData
1577     * @atomicservice
1578     * @since 11
1579     */
1580    groups?: Group[]
1581
1582    /**
1583     * Indicates an IM address of the contact.
1584     *
1585     * @type { ?ImAddress[] }
1586     * @syscap SystemCapability.Applications.ContactsData
1587     * @since 7
1588     */
1589    /**
1590     * Indicates an IM address of the contact.
1591     *
1592     * @type { ?ImAddress[] }
1593     * @syscap SystemCapability.Applications.ContactsData
1594     * @atomicservice
1595     * @since 11
1596     */
1597    imAddresses?: ImAddress[]
1598
1599    /**
1600     * Indicates a phone number of the contact.
1601     *
1602     * @type { ?PhoneNumber[] }
1603     * @syscap SystemCapability.Applications.ContactsData
1604     * @since 7
1605     */
1606    /**
1607     * Indicates a phone number of the contact.
1608     *
1609     * @type { ?PhoneNumber[] }
1610     * @syscap SystemCapability.Applications.ContactsData
1611     * @atomicservice
1612     * @since 11
1613     */
1614    phoneNumbers?: PhoneNumber[]
1615
1616    /**
1617     * Indicates the contact portrait.
1618     *
1619     * @type { ?Portrait }
1620     * @syscap SystemCapability.Applications.ContactsData
1621     * @since 7
1622     */
1623    /**
1624     * Indicates the contact portrait.
1625     *
1626     * @type { ?Portrait }
1627     * @syscap SystemCapability.Applications.ContactsData
1628     * @atomicservice
1629     * @since 11
1630     */
1631    portrait?: Portrait
1632
1633    /**
1634     * Indicates a postal address of the contact.
1635     *
1636     * @type { ?PostalAddress[] }
1637     * @syscap SystemCapability.Applications.ContactsData
1638     * @since 7
1639     */
1640    /**
1641     * Indicates a postal address of the contact.
1642     *
1643     * @type { ?PostalAddress[] }
1644     * @syscap SystemCapability.Applications.ContactsData
1645     * @atomicservice
1646     * @since 11
1647     */
1648    postalAddresses?: PostalAddress[]
1649
1650    /**
1651     * Indicates a relation of the contact.
1652     *
1653     * @type { ?Relation[] }
1654     * @syscap SystemCapability.Applications.ContactsData
1655     * @since 7
1656     */
1657    /**
1658     * Indicates a relation of the contact.
1659     *
1660     * @type { ?Relation[] }
1661     * @syscap SystemCapability.Applications.ContactsData
1662     * @atomicservice
1663     * @since 11
1664     */
1665    relations?: Relation[]
1666
1667    /**
1668     * Indicates a Session Initiation Protocol (SIP) address of the contact.
1669     *
1670     * @type { ?SipAddress[] }
1671     * @syscap SystemCapability.Applications.ContactsData
1672     * @since 7
1673     */
1674    /**
1675     * Indicates a Session Initiation Protocol (SIP) address of the contact.
1676     *
1677     * @type { ?SipAddress[] }
1678     * @syscap SystemCapability.Applications.ContactsData
1679     * @atomicservice
1680     * @since 11
1681     */
1682    sipAddresses?: SipAddress[]
1683
1684    /**
1685     * Indicates a website of the contact.
1686     *
1687     * @type { ?Website[] }
1688     * @syscap SystemCapability.Applications.ContactsData
1689     * @since 7
1690     */
1691    /**
1692     * Indicates a website of the contact.
1693     *
1694     * @type { ?Website[] }
1695     * @syscap SystemCapability.Applications.ContactsData
1696     * @atomicservice
1697     * @since 11
1698     */
1699    websites?: Website[]
1700
1701    /**
1702     * Indicates the contact name.
1703     *
1704     * @type { ?Name }
1705     * @syscap SystemCapability.Applications.ContactsData
1706     * @since 7
1707     */
1708    /**
1709     * Indicates the contact name.
1710     *
1711     * @type { ?Name }
1712     * @syscap SystemCapability.Applications.ContactsData
1713     * @atomicservice
1714     * @since 11
1715     */
1716    name?: Name
1717
1718    /**
1719     * Indicates the contact nickname.
1720     *
1721     * @type { ?NickName }
1722     * @syscap SystemCapability.Applications.ContactsData
1723     * @since 7
1724     */
1725    /**
1726     * Indicates the contact nickname.
1727     *
1728     * @type { ?NickName }
1729     * @syscap SystemCapability.Applications.ContactsData
1730     * @atomicservice
1731     * @since 11
1732     */
1733    nickName?: NickName
1734
1735    /**
1736     * Indicates the contact note.
1737     *
1738     * @type { ?Note }
1739     * @syscap SystemCapability.Applications.ContactsData
1740     * @since 7
1741     */
1742    /**
1743     * Indicates the contact note.
1744     *
1745     * @type { ?Note }
1746     * @syscap SystemCapability.Applications.ContactsData
1747     * @atomicservice
1748     * @since 11
1749     */
1750    note?: Note
1751
1752    /**
1753     * Indicates organization information about the contact.
1754     *
1755     * @type { ?Organization }
1756     * @syscap SystemCapability.Applications.ContactsData
1757     * @since 7
1758     */
1759    /**
1760     * Indicates organization information about the contact.
1761     *
1762     * @type { ?Organization }
1763     * @syscap SystemCapability.Applications.ContactsData
1764     * @atomicservice
1765     * @since 11
1766     */
1767    organization?: Organization
1768  }
1769
1770  /**
1771   * Provides methods for contact attributes information
1772   *
1773   * @syscap SystemCapability.Applications.ContactsData
1774   * @since 7
1775   */
1776  /**
1777   * Provides methods for contact attributes information
1778   *
1779   * @syscap SystemCapability.Applications.ContactsData
1780   * @atomicservice
1781   * @since 11
1782   */
1783  class ContactAttributes {
1784    /**
1785     * Indicates the contact attributes.
1786     *
1787     * @type { Attribute[] }
1788     * @syscap SystemCapability.Applications.ContactsData
1789     * @since 7
1790     */
1791    /**
1792     * Indicates the contact attributes.
1793     *
1794     * @type { Attribute[] }
1795     * @syscap SystemCapability.Applications.ContactsData
1796     * @atomicservice
1797     * @since 11
1798     */
1799    attributes: Attribute[]
1800  }
1801
1802  /**
1803   * Provides methods for attribute information
1804   *
1805   * @enum { number }
1806   * @syscap SystemCapability.Applications.ContactsData
1807   * @since 7
1808   */
1809  /**
1810   * Provides methods for attribute information
1811   *
1812   * @enum { number }
1813   * @syscap SystemCapability.Applications.ContactsData
1814   * @atomicservice
1815   * @since 11
1816   */
1817  enum Attribute {
1818    /**
1819     * Indicates the contact event.
1820     *
1821     * @syscap SystemCapability.Applications.ContactsData
1822     * @since 7
1823     */
1824    /**
1825     * Indicates the contact event.
1826     *
1827     * @syscap SystemCapability.Applications.ContactsData
1828     * @atomicservice
1829     * @since 11
1830     */
1831    ATTR_CONTACT_EVENT,
1832
1833    /**
1834     * Indicates the email address.
1835     *
1836     * @syscap SystemCapability.Applications.ContactsData
1837     * @since 7
1838     */
1839    /**
1840     * Indicates the email address.
1841     *
1842     * @syscap SystemCapability.Applications.ContactsData
1843     * @atomicservice
1844     * @since 11
1845     */
1846    ATTR_EMAIL,
1847
1848    /**
1849     * Indicates the contact group.
1850     *
1851     * @syscap SystemCapability.Applications.ContactsData
1852     * @since 7
1853     */
1854    /**
1855     * Indicates the contact group.
1856     *
1857     * @syscap SystemCapability.Applications.ContactsData
1858     * @atomicservice
1859     * @since 11
1860     */
1861    ATTR_GROUP_MEMBERSHIP,
1862
1863    /**
1864     * Indicates the instant messaging (IM) address.
1865     *
1866     * @syscap SystemCapability.Applications.ContactsData
1867     * @since 7
1868     */
1869    /**
1870     * Indicates the instant messaging (IM) address.
1871     *
1872     * @syscap SystemCapability.Applications.ContactsData
1873     * @atomicservice
1874     * @since 11
1875     */
1876    ATTR_IM,
1877
1878    /**
1879     * Indicates the name.
1880     *
1881     * @syscap SystemCapability.Applications.ContactsData
1882     * @since 7
1883     */
1884    /**
1885     * Indicates the name.
1886     *
1887     * @syscap SystemCapability.Applications.ContactsData
1888     * @atomicservice
1889     * @since 11
1890     */
1891    ATTR_NAME,
1892
1893    /**
1894     * Indicates the nickname.
1895     *
1896     * @syscap SystemCapability.Applications.ContactsData
1897     * @since 7
1898     */
1899    /**
1900     * Indicates the nickname.
1901     *
1902     * @syscap SystemCapability.Applications.ContactsData
1903     * @atomicservice
1904     * @since 11
1905     */
1906    ATTR_NICKNAME,
1907
1908    /**
1909     * Indicates the note.
1910     *
1911     * @syscap SystemCapability.Applications.ContactsData
1912     * @since 7
1913     */
1914    /**
1915     * Indicates the note.
1916     *
1917     * @syscap SystemCapability.Applications.ContactsData
1918     * @atomicservice
1919     * @since 11
1920     */
1921    ATTR_NOTE,
1922
1923    /**
1924     * Indicates the organization.
1925     *
1926     * @syscap SystemCapability.Applications.ContactsData
1927     * @since 7
1928     */
1929    /**
1930     * Indicates the organization.
1931     *
1932     * @syscap SystemCapability.Applications.ContactsData
1933     * @atomicservice
1934     * @since 11
1935     */
1936    ATTR_ORGANIZATION,
1937
1938    /**
1939     * Indicates the phone number.
1940     *
1941     * @syscap SystemCapability.Applications.ContactsData
1942     * @since 7
1943     */
1944    /**
1945     * Indicates the phone number.
1946     *
1947     * @syscap SystemCapability.Applications.ContactsData
1948     * @atomicservice
1949     * @since 11
1950     */
1951    ATTR_PHONE,
1952
1953    /**
1954     * Indicates the portrait.
1955     *
1956     * @syscap SystemCapability.Applications.ContactsData
1957     * @since 7
1958     */
1959    /**
1960     * Indicates the portrait.
1961     *
1962     * @syscap SystemCapability.Applications.ContactsData
1963     * @atomicservice
1964     * @since 11
1965     */
1966    ATTR_PORTRAIT,
1967
1968    /**
1969     * Indicates the postal address.
1970     *
1971     * @syscap SystemCapability.Applications.ContactsData
1972     * @since 7
1973     */
1974    /**
1975     * Indicates the postal address.
1976     *
1977     * @syscap SystemCapability.Applications.ContactsData
1978     * @atomicservice
1979     * @since 11
1980     */
1981    ATTR_POSTAL_ADDRESS,
1982
1983    /**
1984     * Indicates the relation.
1985     *
1986     * @syscap SystemCapability.Applications.ContactsData
1987     * @since 7
1988     */
1989    /**
1990     * Indicates the relation.
1991     *
1992     * @syscap SystemCapability.Applications.ContactsData
1993     * @atomicservice
1994     * @since 11
1995     */
1996    ATTR_RELATION,
1997
1998    /**
1999     * Indicates the Session Initiation Protocol (SIP) address.
2000     *
2001     * @syscap SystemCapability.Applications.ContactsData
2002     * @since 7
2003     */
2004    /**
2005     * Indicates the Session Initiation Protocol (SIP) address.
2006     *
2007     * @syscap SystemCapability.Applications.ContactsData
2008     * @atomicservice
2009     * @since 11
2010     */
2011    ATTR_SIP_ADDRESS,
2012
2013    /**
2014     * Indicates the website.
2015     *
2016     * @syscap SystemCapability.Applications.ContactsData
2017     * @since 7
2018     */
2019    /**
2020     * Indicates the website.
2021     *
2022     * @syscap SystemCapability.Applications.ContactsData
2023     * @atomicservice
2024     * @since 11
2025     */
2026    ATTR_WEBSITE
2027  }
2028
2029  /**
2030   * Provides methods for email information
2031   *
2032   * @syscap SystemCapability.Applications.ContactsData
2033   * @since 7
2034   */
2035  /**
2036   * Provides methods for email information
2037   *
2038   * @syscap SystemCapability.Applications.ContactsData
2039   * @atomicservice
2040   * @since 11
2041   */
2042  class Email {
2043    /**
2044     * Indicates a custom label.
2045     *
2046     * @readonly
2047     * @static
2048     * @syscap SystemCapability.Applications.ContactsData
2049     * @since 7
2050     */
2051    /**
2052     * Indicates a custom label.
2053     *
2054     * @readonly
2055     * @static
2056     * @syscap SystemCapability.Applications.ContactsData
2057     * @atomicservice
2058     * @since 11
2059     */
2060    static readonly CUSTOM_LABEL: 0
2061
2062    /**
2063     * Indicates a home email.
2064     *
2065     * @readonly
2066     * @static
2067     * @syscap SystemCapability.Applications.ContactsData
2068     * @since 7
2069     */
2070    /**
2071     * Indicates a home email.
2072     *
2073     * @readonly
2074     * @static
2075     * @syscap SystemCapability.Applications.ContactsData
2076     * @atomicservice
2077     * @since 11
2078     */
2079    static readonly EMAIL_HOME: 1
2080
2081    /**
2082     * Indicates a work email.
2083     *
2084     * @readonly
2085     * @static
2086     * @syscap SystemCapability.Applications.ContactsData
2087     * @since 7
2088     */
2089    /**
2090     * Indicates a work email.
2091     *
2092     * @readonly
2093     * @static
2094     * @syscap SystemCapability.Applications.ContactsData
2095     * @atomicservice
2096     * @since 11
2097     */
2098    static readonly EMAIL_WORK: 2
2099
2100    /**
2101     * Indicates an email of the OTHER type.
2102     *
2103     * @readonly
2104     * @static
2105     * @syscap SystemCapability.Applications.ContactsData
2106     * @since 7
2107     */
2108    /**
2109     * Indicates an email of the OTHER type.
2110     *
2111     * @readonly
2112     * @static
2113     * @syscap SystemCapability.Applications.ContactsData
2114     * @atomicservice
2115     * @since 11
2116     */
2117    static readonly EMAIL_OTHER: 3
2118
2119    /**
2120     * Indicates an invalid label ID.
2121     *
2122     * @readonly
2123     * @static
2124     * @syscap SystemCapability.Applications.ContactsData
2125     * @since 7
2126     */
2127    /**
2128     * Indicates an invalid label ID.
2129     *
2130     * @readonly
2131     * @static
2132     * @syscap SystemCapability.Applications.ContactsData
2133     * @atomicservice
2134     * @since 11
2135     */
2136    static readonly INVALID_LABEL_ID: -1
2137
2138    /**
2139     * Indicates the email address.
2140     *
2141     * @type { string }
2142     * @syscap SystemCapability.Applications.ContactsData
2143     * @since 7
2144     */
2145    /**
2146     * Indicates the email address.
2147     *
2148     * @type { string }
2149     * @syscap SystemCapability.Applications.ContactsData
2150     * @atomicservice
2151     * @since 11
2152     */
2153    email: string
2154
2155    /**
2156     * Indicates the label name of an attribute.
2157     *
2158     * @type { ?string }
2159     * @syscap SystemCapability.Applications.ContactsData
2160     * @since 7
2161     */
2162    /**
2163     * Indicates the label name of an attribute.
2164     *
2165     * @type { ?string }
2166     * @syscap SystemCapability.Applications.ContactsData
2167     * @atomicservice
2168     * @since 11
2169     */
2170    labelName?: string
2171
2172    /**
2173     * Indicates the displayed email name.
2174     *
2175     * @type { ?string }
2176     * @syscap SystemCapability.Applications.ContactsData
2177     * @since 7
2178     */
2179    /**
2180     * Indicates the displayed email name.
2181     *
2182     * @type { ?string }
2183     * @syscap SystemCapability.Applications.ContactsData
2184     * @atomicservice
2185     * @since 11
2186     */
2187    displayName?: string
2188
2189    /**
2190     * Indicates the label id.
2191     *
2192     * @type { ?number }
2193     * @syscap SystemCapability.Applications.ContactsData
2194     * @since 7
2195     */
2196    /**
2197     * Indicates the label id.
2198     *
2199     * @type { ?number }
2200     * @syscap SystemCapability.Applications.ContactsData
2201     * @atomicservice
2202     * @since 11
2203     */
2204    labelId?: number
2205  }
2206
2207  /**
2208   * Provides methods for event information
2209   *
2210   * @syscap SystemCapability.Applications.ContactsData
2211   * @since 7
2212   */
2213  /**
2214   * Provides methods for event information
2215   *
2216   * @syscap SystemCapability.Applications.ContactsData
2217   * @atomicservice
2218   * @since 11
2219   */
2220  class Event {
2221    /**
2222     * Indicates a custom label.
2223     *
2224     * @readonly
2225     * @static
2226     * @syscap SystemCapability.Applications.ContactsData
2227     * @since 7
2228     */
2229    /**
2230     * Indicates a custom label.
2231     *
2232     * @readonly
2233     * @static
2234     * @syscap SystemCapability.Applications.ContactsData
2235     * @atomicservice
2236     * @since 11
2237     */
2238    static readonly CUSTOM_LABEL: 0
2239
2240    /**
2241     * Indicates an anniversary event.
2242     *
2243     * @readonly
2244     * @static
2245     * @syscap SystemCapability.Applications.ContactsData
2246     * @since 7
2247     */
2248    /**
2249     * Indicates an anniversary event.
2250     *
2251     * @readonly
2252     * @static
2253     * @syscap SystemCapability.Applications.ContactsData
2254     * @atomicservice
2255     * @since 11
2256     */
2257    static readonly EVENT_ANNIVERSARY: 1
2258
2259    /**
2260     * Indicates an event of the OTHER type.
2261     *
2262     * @readonly
2263     * @static
2264     * @syscap SystemCapability.Applications.ContactsData
2265     * @since 7
2266     */
2267    /**
2268     * Indicates an event of the OTHER type.
2269     *
2270     * @readonly
2271     * @static
2272     * @syscap SystemCapability.Applications.ContactsData
2273     * @atomicservice
2274     * @since 11
2275     */
2276    static readonly EVENT_OTHER: 2
2277
2278    /**
2279     * Indicates an birthday event.
2280     *
2281     * @readonly
2282     * @static
2283     * @syscap SystemCapability.Applications.ContactsData
2284     * @since 7
2285     */
2286    /**
2287     * Indicates an birthday event.
2288     *
2289     * @readonly
2290     * @static
2291     * @syscap SystemCapability.Applications.ContactsData
2292     * @atomicservice
2293     * @since 11
2294     */
2295    static readonly EVENT_BIRTHDAY: 3
2296
2297    /**
2298     * Indicates an invalid label ID.
2299     *
2300     * @readonly
2301     * @static
2302     * @syscap SystemCapability.Applications.ContactsData
2303     * @since 7
2304     */
2305    /**
2306     * Indicates an invalid label ID.
2307     *
2308     * @readonly
2309     * @static
2310     * @syscap SystemCapability.Applications.ContactsData
2311     * @atomicservice
2312     * @since 11
2313     */
2314    static readonly INVALID_LABEL_ID: -1
2315
2316    /**
2317     * Indicates the event date.
2318     *
2319     * @type { string }
2320     * @syscap SystemCapability.Applications.ContactsData
2321     * @since 7
2322     */
2323    /**
2324     * Indicates the event date.
2325     *
2326     * @type { string }
2327     * @syscap SystemCapability.Applications.ContactsData
2328     * @atomicservice
2329     * @since 11
2330     */
2331    eventDate: string
2332
2333    /**
2334     * Indicates the label name of an attribute.
2335     *
2336     * @type { ?string }
2337     * @syscap SystemCapability.Applications.ContactsData
2338     * @since 7
2339     */
2340    /**
2341     * Indicates the label name of an attribute.
2342     *
2343     * @type { ?string }
2344     * @syscap SystemCapability.Applications.ContactsData
2345     * @atomicservice
2346     * @since 11
2347     */
2348    labelName?: string
2349
2350    /**
2351     * Indicates the label id.
2352     *
2353     * @type { ?number }
2354     * @syscap SystemCapability.Applications.ContactsData
2355     * @since 7
2356     */
2357    /**
2358     * Indicates the label id.
2359     *
2360     * @type { ?number }
2361     * @syscap SystemCapability.Applications.ContactsData
2362     * @atomicservice
2363     * @since 11
2364     */
2365    labelId?: number
2366  }
2367
2368  /**
2369   * Provides methods for group information
2370   *
2371   * @syscap SystemCapability.Applications.ContactsData
2372   * @since 7
2373   */
2374  /**
2375   * Provides methods for group information
2376   *
2377   * @syscap SystemCapability.Applications.ContactsData
2378   * @atomicservice
2379   * @since 11
2380   */
2381  class Group {
2382    /**
2383     * Indicates the contact group ID.
2384     *
2385     * @type { ?number }
2386     * @syscap SystemCapability.Applications.ContactsData
2387     * @since 7
2388     */
2389    /**
2390     * Indicates the contact group ID.
2391     *
2392     * @type { ?number }
2393     * @syscap SystemCapability.Applications.ContactsData
2394     * @atomicservice
2395     * @since 11
2396     */
2397    groupId?: number
2398
2399    /**
2400     * Indicates the contact group title.
2401     *
2402     * @type { string }
2403     * @syscap SystemCapability.Applications.ContactsData
2404     * @since 7
2405     */
2406    /**
2407     * Indicates the contact group title.
2408     *
2409     * @type { string }
2410     * @syscap SystemCapability.Applications.ContactsData
2411     * @atomicservice
2412     * @since 11
2413     */
2414    title: string
2415  }
2416
2417  /**
2418   * Provides methods for holder information
2419   *
2420   * @syscap SystemCapability.Applications.ContactsData
2421   * @since 7
2422   */
2423  class Holder {
2424    /**
2425     * Indicates the bundle name of a contact holder.
2426     *
2427     * @type { string }
2428     * @readonly
2429     * @syscap SystemCapability.Applications.ContactsData
2430     * @since 7
2431     */
2432    readonly bundleName: string
2433
2434    /**
2435     * Indicates the displayed name of a contact holder.
2436     *
2437     * @type { ?string }
2438     * @readonly
2439     * @syscap SystemCapability.Applications.ContactsData
2440     * @since 7
2441     */
2442    readonly displayName?: string
2443
2444    /**
2445     * Indicates the holder ID.
2446     *
2447     * @type { ?number }
2448     * @syscap SystemCapability.Applications.ContactsData
2449     * @since 7
2450     */
2451    holderId?: number
2452  }
2453
2454  /**
2455   * Provides methods for ImAddress information
2456   *
2457   * @syscap SystemCapability.Applications.ContactsData
2458   * @since 7
2459   */
2460  /**
2461   * Provides methods for ImAddress information
2462   *
2463   * @syscap SystemCapability.Applications.ContactsData
2464   * @atomicservice
2465   * @since 11
2466   */
2467  class ImAddress {
2468    /**
2469     * Indicates a custom label.
2470     *
2471     * @readonly
2472     * @static
2473     * @syscap SystemCapability.Applications.ContactsData
2474     * @since 7
2475     */
2476    /**
2477     * Indicates a custom label.
2478     *
2479     * @readonly
2480     * @static
2481     * @syscap SystemCapability.Applications.ContactsData
2482     * @atomicservice
2483     * @since 11
2484     */
2485    static readonly CUSTOM_LABEL: -1
2486
2487    /**
2488     * Indicates an AIM instant message.
2489     *
2490     * @readonly
2491     * @static
2492     * @syscap SystemCapability.Applications.ContactsData
2493     * @since 7
2494     */
2495    /**
2496     * Indicates an AIM instant message.
2497     *
2498     * @readonly
2499     * @static
2500     * @syscap SystemCapability.Applications.ContactsData
2501     * @atomicservice
2502     * @since 11
2503     */
2504    static readonly IM_AIM: 0
2505
2506    /**
2507     * Indicates a Windows Live instant message.
2508     *
2509     * @readonly
2510     * @static
2511     * @syscap SystemCapability.Applications.ContactsData
2512     * @since 7
2513     */
2514    /**
2515     * Indicates a Windows Live instant message.
2516     *
2517     * @readonly
2518     * @static
2519     * @syscap SystemCapability.Applications.ContactsData
2520     * @atomicservice
2521     * @since 11
2522     */
2523    static readonly IM_MSN: 1
2524
2525    /**
2526     * Indicates a Yahoo instant message.
2527     *
2528     * @readonly
2529     * @static
2530     * @syscap SystemCapability.Applications.ContactsData
2531     * @since 7
2532     */
2533    /**
2534     * Indicates a Yahoo instant message.
2535     *
2536     * @readonly
2537     * @static
2538     * @syscap SystemCapability.Applications.ContactsData
2539     * @atomicservice
2540     * @since 11
2541     */
2542    static readonly IM_YAHOO: 2
2543
2544    /**
2545     * Indicates a Skype instant message.
2546     *
2547     * @readonly
2548     * @static
2549     * @syscap SystemCapability.Applications.ContactsData
2550     * @since 7
2551     */
2552    /**
2553     * Indicates a Skype instant message.
2554     *
2555     * @readonly
2556     * @static
2557     * @syscap SystemCapability.Applications.ContactsData
2558     * @atomicservice
2559     * @since 11
2560     */
2561    static readonly IM_SKYPE: 3
2562
2563    /**
2564     * Indicates a QQ instant message.
2565     *
2566     * @readonly
2567     * @static
2568     * @syscap SystemCapability.Applications.ContactsData
2569     * @since 7
2570     */
2571    /**
2572     * Indicates a QQ instant message.
2573     *
2574     * @readonly
2575     * @static
2576     * @syscap SystemCapability.Applications.ContactsData
2577     * @atomicservice
2578     * @since 11
2579     */
2580    static readonly IM_QQ: 4
2581
2582    /**
2583     * Indicates an ICQ instant message.
2584     *
2585     * @readonly
2586     * @static
2587     * @syscap SystemCapability.Applications.ContactsData
2588     * @since 7
2589     */
2590    /**
2591     * Indicates an ICQ instant message.
2592     *
2593     * @readonly
2594     * @static
2595     * @syscap SystemCapability.Applications.ContactsData
2596     * @atomicservice
2597     * @since 11
2598     */
2599    static readonly IM_ICQ: 6
2600
2601    /**
2602     * Indicates a Jabber instant message.
2603     *
2604     * @readonly
2605     * @static
2606     * @syscap SystemCapability.Applications.ContactsData
2607     * @since 7
2608     */
2609    /**
2610     * Indicates a Jabber instant message.
2611     *
2612     * @readonly
2613     * @static
2614     * @syscap SystemCapability.Applications.ContactsData
2615     * @atomicservice
2616     * @since 11
2617     */
2618    static readonly IM_JABBER: 7
2619
2620    /**
2621     * Indicates an invalid label ID.
2622     *
2623     * @readonly
2624     * @static
2625     * @syscap SystemCapability.Applications.ContactsData
2626     * @since 7
2627     */
2628    /**
2629     * Indicates an invalid label ID.
2630     *
2631     * @readonly
2632     * @static
2633     * @syscap SystemCapability.Applications.ContactsData
2634     * @atomicservice
2635     * @since 11
2636     */
2637    static readonly INVALID_LABEL_ID: -2
2638
2639    /**
2640     * Indicates the IM address.
2641     *
2642     * @type { string }
2643     * @syscap SystemCapability.Applications.ContactsData
2644     * @since 7
2645     */
2646    /**
2647     * Indicates the IM address.
2648     *
2649     * @type { string }
2650     * @syscap SystemCapability.Applications.ContactsData
2651     * @atomicservice
2652     * @since 11
2653     */
2654    imAddress: string
2655
2656    /**
2657     * Indicates the label name of an attribute.
2658     *
2659     * @type { ?string }
2660     * @syscap SystemCapability.Applications.ContactsData
2661     * @since 7
2662     */
2663    /**
2664     * Indicates the label name of an attribute.
2665     *
2666     * @type { ?string }
2667     * @syscap SystemCapability.Applications.ContactsData
2668     * @atomicservice
2669     * @since 11
2670     */
2671    labelName?: string
2672
2673    /**
2674     * Indicates the label id.
2675     *
2676     * @type { ?number }
2677     * @syscap SystemCapability.Applications.ContactsData
2678     * @since 7
2679     */
2680    /**
2681     * Indicates the label id.
2682     *
2683     * @type { ?number }
2684     * @syscap SystemCapability.Applications.ContactsData
2685     * @atomicservice
2686     * @since 11
2687     */
2688    labelId?: number
2689  }
2690
2691  /**
2692   * Provides methods for name information
2693   *
2694   * @syscap SystemCapability.Applications.ContactsData
2695   * @since 7
2696   */
2697  /**
2698   * Provides methods for name information
2699   *
2700   * @syscap SystemCapability.Applications.ContactsData
2701   * @atomicservice
2702   * @since 11
2703   */
2704  class Name {
2705    /**
2706     * Indicates the family name of the contact.
2707     *
2708     * @type { ?string }
2709     * @syscap SystemCapability.Applications.ContactsData
2710     * @since 7
2711     */
2712    /**
2713     * Indicates the family name of the contact.
2714     *
2715     * @type { ?string }
2716     * @syscap SystemCapability.Applications.ContactsData
2717     * @atomicservice
2718     * @since 11
2719     */
2720    familyName?: string
2721
2722    /**
2723     * Indicates the phonetic family name of the contact.
2724     *
2725     * @type { ?string }
2726     * @syscap SystemCapability.Applications.ContactsData
2727     * @since 7
2728     */
2729    /**
2730     * Indicates the phonetic family name of the contact.
2731     *
2732     * @type { ?string }
2733     * @syscap SystemCapability.Applications.ContactsData
2734     * @atomicservice
2735     * @since 11
2736     */
2737    familyNamePhonetic?: string
2738
2739    /**
2740     * Indicates the full name of the contact.
2741     *
2742     * @type { string }
2743     * @syscap SystemCapability.Applications.ContactsData
2744     * @since 7
2745     */
2746    /**
2747     * Indicates the full name of the contact.
2748     *
2749     * @type { string }
2750     * @syscap SystemCapability.Applications.ContactsData
2751     * @atomicservice
2752     * @since 11
2753     */
2754    fullName: string
2755
2756    /**
2757     * Indicates the given name of the contact.
2758     *
2759     * @type { ?string }
2760     * @syscap SystemCapability.Applications.ContactsData
2761     * @since 7
2762     */
2763    /**
2764     * Indicates the given name of the contact.
2765     *
2766     * @type { ?string }
2767     * @syscap SystemCapability.Applications.ContactsData
2768     * @atomicservice
2769     * @since 11
2770     */
2771    givenName?: string
2772
2773    /**
2774     * Indicates the phonetic given name of the contact.
2775     *
2776     * @type { ?string }
2777     * @syscap SystemCapability.Applications.ContactsData
2778     * @since 7
2779     */
2780    /**
2781     * Indicates the phonetic given name of the contact.
2782     *
2783     * @type { ?string }
2784     * @syscap SystemCapability.Applications.ContactsData
2785     * @atomicservice
2786     * @since 11
2787     */
2788    givenNamePhonetic?: string
2789
2790    /**
2791     * Indicates the middle name of the contact.
2792     *
2793     * @type { ?string }
2794     * @syscap SystemCapability.Applications.ContactsData
2795     * @since 7
2796     */
2797    /**
2798     * Indicates the middle name of the contact.
2799     *
2800     * @type { ?string }
2801     * @syscap SystemCapability.Applications.ContactsData
2802     * @atomicservice
2803     * @since 11
2804     */
2805    middleName?: string
2806
2807    /**
2808     * Indicates the phonetic middle name of the contact.
2809     *
2810     * @type { ?string }
2811     * @syscap SystemCapability.Applications.ContactsData
2812     * @since 7
2813     */
2814    /**
2815     * Indicates the phonetic middle name of the contact.
2816     *
2817     * @type { ?string }
2818     * @syscap SystemCapability.Applications.ContactsData
2819     * @atomicservice
2820     * @since 11
2821     */
2822    middleNamePhonetic?: string
2823
2824    /**
2825     * Indicates the prefix of the contact name.
2826     *
2827     * @type { ?string }
2828     * @syscap SystemCapability.Applications.ContactsData
2829     * @since 7
2830     */
2831    /**
2832     * Indicates the prefix of the contact name.
2833     *
2834     * @type { ?string }
2835     * @syscap SystemCapability.Applications.ContactsData
2836     * @atomicservice
2837     * @since 11
2838     */
2839    namePrefix?: string
2840
2841    /**
2842     * Indicates the suffix of this contact name.
2843     *
2844     * @type { ?string }
2845     * @syscap SystemCapability.Applications.ContactsData
2846     * @since 7
2847     */
2848    /**
2849     * Indicates the suffix of this contact name.
2850     *
2851     * @type { ?string }
2852     * @syscap SystemCapability.Applications.ContactsData
2853     * @atomicservice
2854     * @since 11
2855     */
2856    nameSuffix?: string
2857  }
2858
2859  /**
2860   * Provides methods for nick name information
2861   *
2862   * @syscap SystemCapability.Applications.ContactsData
2863   * @since 7
2864   */
2865  /**
2866   * Provides methods for nick name information
2867   *
2868   * @syscap SystemCapability.Applications.ContactsData
2869   * @atomicservice
2870   * @since 11
2871   */
2872  class NickName {
2873    /**
2874     * Indicates the nickname of the contact.
2875     *
2876     * @type { string }
2877     * @syscap SystemCapability.Applications.ContactsData
2878     * @since 7
2879     */
2880    /**
2881     * Indicates the nickname of the contact.
2882     *
2883     * @type { string }
2884     * @syscap SystemCapability.Applications.ContactsData
2885     * @atomicservice
2886     * @since 11
2887     */
2888    nickName: string
2889  }
2890
2891  /**
2892   * Provides methods for note information
2893   *
2894   * @syscap SystemCapability.Applications.ContactsData
2895   * @since 7
2896   */
2897  /**
2898   * Provides methods for note information
2899   *
2900   * @syscap SystemCapability.Applications.ContactsData
2901   * @atomicservice
2902   * @since 11
2903   */
2904  class Note {
2905    /**
2906     * Indicates the note content.
2907     *
2908     * @type { string }
2909     * @syscap SystemCapability.Applications.ContactsData
2910     * @since 7
2911     */
2912    /**
2913     * Indicates the note content.
2914     *
2915     * @type { string }
2916     * @syscap SystemCapability.Applications.ContactsData
2917     * @atomicservice
2918     * @since 11
2919     */
2920    noteContent: string
2921  }
2922
2923  /**
2924   * Provides methods for organization information
2925   *
2926   * @syscap SystemCapability.Applications.ContactsData
2927   * @since 7
2928   */
2929  /**
2930   * Provides methods for organization information
2931   *
2932   * @syscap SystemCapability.Applications.ContactsData
2933   * @atomicservice
2934   * @since 11
2935   */
2936  class Organization {
2937    /**
2938     * Indicates the name of the organization to which the contact belongs.
2939     *
2940     * @type { string }
2941     * @syscap SystemCapability.Applications.ContactsData
2942     * @since 7
2943     */
2944    /**
2945     * Indicates the name of the organization to which the contact belongs.
2946     *
2947     * @type { string }
2948     * @syscap SystemCapability.Applications.ContactsData
2949     * @atomicservice
2950     * @since 11
2951     */
2952    name: string
2953
2954    /**
2955     * Indicates the title of the organization.
2956     *
2957     * @type { ?string }
2958     * @syscap SystemCapability.Applications.ContactsData
2959     * @since 7
2960     */
2961    /**
2962     * Indicates the title of the organization.
2963     *
2964     * @type { ?string }
2965     * @syscap SystemCapability.Applications.ContactsData
2966     * @atomicservice
2967     * @since 11
2968     */
2969    title?: string
2970  }
2971
2972  /**
2973   * Provides methods for phone number information
2974   *
2975   * @syscap SystemCapability.Applications.ContactsData
2976   * @since 7
2977   */
2978  /**
2979   * Provides methods for phone number information
2980   *
2981   * @syscap SystemCapability.Applications.ContactsData
2982   * @atomicservice
2983   * @since 11
2984   */
2985  class PhoneNumber {
2986    /**
2987     * Indicates a custom label.
2988     *
2989     * @readonly
2990     * @static
2991     * @syscap SystemCapability.Applications.ContactsData
2992     * @since 7
2993     */
2994    /**
2995     * Indicates a custom label.
2996     *
2997     * @readonly
2998     * @static
2999     * @syscap SystemCapability.Applications.ContactsData
3000     * @atomicservice
3001     * @since 11
3002     */
3003    static readonly CUSTOM_LABEL: 0
3004
3005    /**
3006     * Indicates a home number.
3007     *
3008     * @readonly
3009     * @static
3010     * @syscap SystemCapability.Applications.ContactsData
3011     * @since 7
3012     */
3013    /**
3014     * Indicates a home number.
3015     *
3016     * @readonly
3017     * @static
3018     * @syscap SystemCapability.Applications.ContactsData
3019     * @atomicservice
3020     * @since 11
3021     */
3022    static readonly NUM_HOME: 1
3023
3024    /**
3025     * Indicates a mobile phone number.
3026     *
3027     * @readonly
3028     * @static
3029     * @syscap SystemCapability.Applications.ContactsData
3030     * @since 7
3031     */
3032    /**
3033     * Indicates a mobile phone number.
3034     *
3035     * @readonly
3036     * @static
3037     * @syscap SystemCapability.Applications.ContactsData
3038     * @atomicservice
3039     * @since 11
3040     */
3041    static readonly NUM_MOBILE: 2
3042
3043    /**
3044     * Indicates a work number.
3045     *
3046     * @readonly
3047     * @static
3048     * @syscap SystemCapability.Applications.ContactsData
3049     * @since 7
3050     */
3051    /**
3052     * Indicates a work number.
3053     *
3054     * @readonly
3055     * @static
3056     * @syscap SystemCapability.Applications.ContactsData
3057     * @atomicservice
3058     * @since 11
3059     */
3060    static readonly NUM_WORK: 3
3061
3062    /**
3063     * Indicates a work fax number.
3064     *
3065     * @readonly
3066     * @static
3067     * @syscap SystemCapability.Applications.ContactsData
3068     * @since 7
3069     */
3070    /**
3071     * Indicates a work fax number.
3072     *
3073     * @readonly
3074     * @static
3075     * @syscap SystemCapability.Applications.ContactsData
3076     * @atomicservice
3077     * @since 11
3078     */
3079    static readonly NUM_FAX_WORK: 4
3080
3081    /**
3082     * Indicates a home fax number.
3083     *
3084     * @readonly
3085     * @static
3086     * @syscap SystemCapability.Applications.ContactsData
3087     * @since 7
3088     */
3089    /**
3090     * Indicates a home fax number.
3091     *
3092     * @readonly
3093     * @static
3094     * @syscap SystemCapability.Applications.ContactsData
3095     * @atomicservice
3096     * @since 11
3097     */
3098    static readonly NUM_FAX_HOME: 5
3099
3100    /**
3101     * Indicates a pager number.
3102     *
3103     * @readonly
3104     * @static
3105     * @syscap SystemCapability.Applications.ContactsData
3106     * @since 7
3107     */
3108    /**
3109     * Indicates a pager number.
3110     *
3111     * @readonly
3112     * @static
3113     * @syscap SystemCapability.Applications.ContactsData
3114     * @atomicservice
3115     * @since 11
3116     */
3117    static readonly NUM_PAGER: 6
3118
3119    /**
3120     * Indicates a number of the OTHER type.
3121     *
3122     * @readonly
3123     * @static
3124     * @syscap SystemCapability.Applications.ContactsData
3125     * @since 7
3126     */
3127    /**
3128     * Indicates a number of the OTHER type.
3129     *
3130     * @readonly
3131     * @static
3132     * @syscap SystemCapability.Applications.ContactsData
3133     * @atomicservice
3134     * @since 11
3135     */
3136    static readonly NUM_OTHER: 7
3137
3138    /**
3139     * Indicates a callback number.
3140     *
3141     * @readonly
3142     * @static
3143     * @syscap SystemCapability.Applications.ContactsData
3144     * @since 7
3145     */
3146    /**
3147     * Indicates a callback number.
3148     *
3149     * @readonly
3150     * @static
3151     * @syscap SystemCapability.Applications.ContactsData
3152     * @atomicservice
3153     * @since 11
3154     */
3155    static readonly NUM_CALLBACK: 8
3156
3157    /**
3158     * Indicates a car number.
3159     *
3160     * @readonly
3161     * @static
3162     * @syscap SystemCapability.Applications.ContactsData
3163     * @since 7
3164     */
3165    /**
3166     * Indicates a car number.
3167     *
3168     * @readonly
3169     * @static
3170     * @syscap SystemCapability.Applications.ContactsData
3171     * @atomicservice
3172     * @since 11
3173     */
3174    static readonly NUM_CAR: 9
3175
3176    /**
3177     * Indicates a company director number.
3178     *
3179     * @readonly
3180     * @static
3181     * @syscap SystemCapability.Applications.ContactsData
3182     * @since 7
3183     */
3184    /**
3185     * Indicates a company director number.
3186     *
3187     * @readonly
3188     * @static
3189     * @syscap SystemCapability.Applications.ContactsData
3190     * @atomicservice
3191     * @since 11
3192     */
3193    static readonly NUM_COMPANY_MAIN: 10
3194
3195    /**
3196     * Indicates an Integrated Services Digital Network (ISDN) number.
3197     *
3198     * @readonly
3199     * @static
3200     * @syscap SystemCapability.Applications.ContactsData
3201     * @since 7
3202     */
3203    /**
3204     * Indicates an Integrated Services Digital Network (ISDN) number.
3205     *
3206     * @readonly
3207     * @static
3208     * @syscap SystemCapability.Applications.ContactsData
3209     * @atomicservice
3210     * @since 11
3211     */
3212    static readonly NUM_ISDN: 11
3213
3214    /**
3215     * Indicates a main number.
3216     *
3217     * @readonly
3218     * @static
3219     * @syscap SystemCapability.Applications.ContactsData
3220     * @since 7
3221     */
3222    /**
3223     * Indicates a main number.
3224     *
3225     * @readonly
3226     * @static
3227     * @syscap SystemCapability.Applications.ContactsData
3228     * @atomicservice
3229     * @since 11
3230     */
3231    static readonly NUM_MAIN: 12
3232
3233    /**
3234     * Indicates a number of the OTHER_FAX type.
3235     *
3236     * @readonly
3237     * @static
3238     * @syscap SystemCapability.Applications.ContactsData
3239     * @since 7
3240     */
3241    /**
3242     * Indicates a number of the OTHER_FAX type.
3243     *
3244     * @readonly
3245     * @static
3246     * @syscap SystemCapability.Applications.ContactsData
3247     * @atomicservice
3248     * @since 11
3249     */
3250    static readonly NUM_OTHER_FAX: 13
3251
3252    /**
3253     * Indicates a radio number.
3254     *
3255     * @readonly
3256     * @static
3257     * @syscap SystemCapability.Applications.ContactsData
3258     * @since 7
3259     */
3260    /**
3261     * Indicates a radio number.
3262     *
3263     * @readonly
3264     * @static
3265     * @syscap SystemCapability.Applications.ContactsData
3266     * @atomicservice
3267     * @since 11
3268     */
3269    static readonly NUM_RADIO: 14
3270
3271    /**
3272     * Indicates a telex number.
3273     *
3274     * @readonly
3275     * @static
3276     * @syscap SystemCapability.Applications.ContactsData
3277     * @since 7
3278     */
3279    /**
3280     * Indicates a telex number.
3281     *
3282     * @readonly
3283     * @static
3284     * @syscap SystemCapability.Applications.ContactsData
3285     * @atomicservice
3286     * @since 11
3287     */
3288    static readonly NUM_TELEX: 15
3289
3290    /**
3291     * Indicates a teletypewriter (TTY) or test-driven development (TDD) number.
3292     *
3293     * @readonly
3294     * @static
3295     * @syscap SystemCapability.Applications.ContactsData
3296     * @since 7
3297     */
3298    /**
3299     * Indicates a teletypewriter (TTY) or test-driven development (TDD) number.
3300     *
3301     * @readonly
3302     * @static
3303     * @syscap SystemCapability.Applications.ContactsData
3304     * @atomicservice
3305     * @since 11
3306     */
3307    static readonly NUM_TTY_TDD: 16
3308
3309    /**
3310     * Indicates a work mobile phone number.
3311     *
3312     * @readonly
3313     * @static
3314     * @syscap SystemCapability.Applications.ContactsData
3315     * @since 7
3316     */
3317    /**
3318     * Indicates a work mobile phone number.
3319     *
3320     * @readonly
3321     * @static
3322     * @syscap SystemCapability.Applications.ContactsData
3323     * @atomicservice
3324     * @since 11
3325     */
3326    static readonly NUM_WORK_MOBILE: 17
3327
3328    /**
3329     * Indicates a work pager number.
3330     *
3331     * @readonly
3332     * @static
3333     * @syscap SystemCapability.Applications.ContactsData
3334     * @since 7
3335     */
3336    /**
3337     * Indicates a work pager number.
3338     *
3339     * @readonly
3340     * @static
3341     * @syscap SystemCapability.Applications.ContactsData
3342     * @atomicservice
3343     * @since 11
3344     */
3345    static readonly NUM_WORK_PAGER: 18
3346
3347    /**
3348     * Indicates an assistant number.
3349     *
3350     * @readonly
3351     * @static
3352     * @syscap SystemCapability.Applications.ContactsData
3353     * @since 7
3354     */
3355    /**
3356     * Indicates an assistant number.
3357     *
3358     * @readonly
3359     * @static
3360     * @syscap SystemCapability.Applications.ContactsData
3361     * @atomicservice
3362     * @since 11
3363     */
3364    static readonly NUM_ASSISTANT: 19
3365
3366    /**
3367     * Indicates an MMS number.
3368     *
3369     * @readonly
3370     * @static
3371     * @syscap SystemCapability.Applications.ContactsData
3372     * @since 7
3373     */
3374    /**
3375     * Indicates an MMS number.
3376     *
3377     * @readonly
3378     * @static
3379     * @syscap SystemCapability.Applications.ContactsData
3380     * @atomicservice
3381     * @since 11
3382     */
3383    static readonly NUM_MMS: 20
3384
3385    /**
3386     * Indicates an invalid label ID.
3387     *
3388     * @readonly
3389     * @static
3390     * @syscap SystemCapability.Applications.ContactsData
3391     * @since 7
3392     */
3393    /**
3394     * Indicates an invalid label ID.
3395     *
3396     * @readonly
3397     * @static
3398     * @syscap SystemCapability.Applications.ContactsData
3399     * @atomicservice
3400     * @since 11
3401     */
3402    static readonly INVALID_LABEL_ID: -1
3403
3404    /**
3405     * Indicates the label name of an attribute.
3406     *
3407     * @type { ?string }
3408     * @syscap SystemCapability.Applications.ContactsData
3409     * @since 7
3410     */
3411    /**
3412     * Indicates the label name of an attribute.
3413     *
3414     * @type { ?string }
3415     * @syscap SystemCapability.Applications.ContactsData
3416     * @atomicservice
3417     * @since 11
3418     */
3419    labelName?: string
3420
3421    /**
3422     * Indicates the phone number of the contact.
3423     *
3424     * @type { string }
3425     * @syscap SystemCapability.Applications.ContactsData
3426     * @since 7
3427     */
3428    /**
3429     * Indicates the phone number of the contact.
3430     *
3431     * @type { string }
3432     * @syscap SystemCapability.Applications.ContactsData
3433     * @atomicservice
3434     * @since 11
3435     */
3436    phoneNumber: string
3437
3438    /**
3439     * Indicates the label id.
3440     *
3441     * @type { ?number }
3442     * @syscap SystemCapability.Applications.ContactsData
3443     * @since 7
3444     */
3445    /**
3446     * Indicates the label id.
3447     *
3448     * @type { ?number }
3449     * @syscap SystemCapability.Applications.ContactsData
3450     * @atomicservice
3451     * @since 11
3452     */
3453    labelId?: number
3454  }
3455
3456  /**
3457   * Provides methods for portrait information
3458   *
3459   * @syscap SystemCapability.Applications.ContactsData
3460   * @since 7
3461   */
3462  /**
3463   * Provides methods for portrait information
3464   *
3465   * @syscap SystemCapability.Applications.ContactsData
3466   * @atomicservice
3467   * @since 11
3468   */
3469  class Portrait {
3470    /**
3471     * Indicates the uri of the contact portrait.
3472     *
3473     * @type { string }
3474     * @syscap SystemCapability.Applications.ContactsData
3475     * @since 7
3476     */
3477    /**
3478     * Indicates the uri of the contact portrait.
3479     *
3480     * @type { string }
3481     * @syscap SystemCapability.Applications.ContactsData
3482     * @atomicservice
3483     * @since 11
3484     */
3485    uri: string
3486  }
3487
3488  /**
3489   * Provides methods for postal address information
3490   *
3491   * @syscap SystemCapability.Applications.ContactsData
3492   * @since 7
3493   */
3494  /**
3495   * Provides methods for postal address information
3496   *
3497   * @syscap SystemCapability.Applications.ContactsData
3498   * @atomicservice
3499   * @since 11
3500   */
3501  class PostalAddress {
3502    /**
3503     * Indicates a custom label.
3504     *
3505     * @readonly
3506     * @static
3507     * @syscap SystemCapability.Applications.ContactsData
3508     * @since 7
3509     */
3510    /**
3511     * Indicates a custom label.
3512     *
3513     * @readonly
3514     * @static
3515     * @syscap SystemCapability.Applications.ContactsData
3516     * @atomicservice
3517     * @since 11
3518     */
3519    static readonly CUSTOM_LABEL: 0
3520
3521    /**
3522     * Indicates a home address.
3523     *
3524     * @readonly
3525     * @static
3526     * @syscap SystemCapability.Applications.ContactsData
3527     * @since 7
3528     */
3529    /**
3530     * Indicates a home address.
3531     *
3532     * @readonly
3533     * @static
3534     * @syscap SystemCapability.Applications.ContactsData
3535     * @atomicservice
3536     * @since 11
3537     */
3538    static readonly ADDR_HOME: 1
3539
3540    /**
3541     * Indicates a work address.
3542     *
3543     * @readonly
3544     * @static
3545     * @syscap SystemCapability.Applications.ContactsData
3546     * @since 7
3547     */
3548    /**
3549     * Indicates a work address.
3550     *
3551     * @readonly
3552     * @static
3553     * @syscap SystemCapability.Applications.ContactsData
3554     * @atomicservice
3555     * @since 11
3556     */
3557    static readonly ADDR_WORK: 2
3558
3559    /**
3560     * Indicates an address of the OTHER type.
3561     *
3562     * @readonly
3563     * @static
3564     * @syscap SystemCapability.Applications.ContactsData
3565     * @since 7
3566     */
3567    /**
3568     * Indicates an address of the OTHER type.
3569     *
3570     * @readonly
3571     * @static
3572     * @syscap SystemCapability.Applications.ContactsData
3573     * @atomicservice
3574     * @since 11
3575     */
3576    static readonly ADDR_OTHER: 3
3577
3578    /**
3579     * Indicates an invalid label ID.
3580     *
3581     * @readonly
3582     * @static
3583     * @syscap SystemCapability.Applications.ContactsData
3584     * @since 7
3585     */
3586    /**
3587     * Indicates an invalid label ID.
3588     *
3589     * @readonly
3590     * @static
3591     * @syscap SystemCapability.Applications.ContactsData
3592     * @atomicservice
3593     * @since 11
3594     */
3595    static readonly INVALID_LABEL_ID: -1
3596
3597    /**
3598     * Indicates the city where this contact is located.
3599     *
3600     * @type { ?string }
3601     * @syscap SystemCapability.Applications.ContactsData
3602     * @since 7
3603     */
3604    /**
3605     * Indicates the city where this contact is located.
3606     *
3607     * @type { ?string }
3608     * @syscap SystemCapability.Applications.ContactsData
3609     * @atomicservice
3610     * @since 11
3611     */
3612    city?: string
3613
3614    /**
3615     * Indicates the country/region where this contact is located.
3616     *
3617     * @type { ?string }
3618     * @syscap SystemCapability.Applications.ContactsData
3619     * @since 7
3620     */
3621    /**
3622     * Indicates the country/region where this contact is located.
3623     *
3624     * @type { ?string }
3625     * @syscap SystemCapability.Applications.ContactsData
3626     * @atomicservice
3627     * @since 11
3628     */
3629    country?: string
3630
3631    /**
3632     * Indicates the label name of an attribute.
3633     *
3634     * @type { ?string }
3635     * @syscap SystemCapability.Applications.ContactsData
3636     * @since 7
3637     */
3638    /**
3639     * Indicates the label name of an attribute.
3640     *
3641     * @type { ?string }
3642     * @syscap SystemCapability.Applications.ContactsData
3643     * @atomicservice
3644     * @since 11
3645     */
3646    labelName?: string
3647
3648    /**
3649     * Indicates the neighborhood where this contact is located.
3650     *
3651     * @type { ?string }
3652     * @syscap SystemCapability.Applications.ContactsData
3653     * @since 7
3654     */
3655    /**
3656     * Indicates the neighborhood where this contact is located.
3657     *
3658     * @type { ?string }
3659     * @syscap SystemCapability.Applications.ContactsData
3660     * @atomicservice
3661     * @since 11
3662     */
3663    neighborhood?: string
3664
3665    /**
3666     * Indicates the post box of this contact.
3667     *
3668     * @type { ?string }
3669     * @syscap SystemCapability.Applications.ContactsData
3670     * @since 7
3671     */
3672    /**
3673     * Indicates the post box of this contact.
3674     *
3675     * @type { ?string }
3676     * @syscap SystemCapability.Applications.ContactsData
3677     * @atomicservice
3678     * @since 11
3679     */
3680    pobox?: string
3681
3682    /**
3683     * Indicates the postal address of this contact.
3684     *
3685     * @type { string }
3686     * @syscap SystemCapability.Applications.ContactsData
3687     * @since 7
3688     */
3689    /**
3690     * Indicates the postal address of this contact.
3691     *
3692     * @type { string }
3693     * @syscap SystemCapability.Applications.ContactsData
3694     * @atomicservice
3695     * @since 11
3696     */
3697    postalAddress: string
3698
3699    /**
3700     * Indicates the postal code of this contact.
3701     *
3702     * @type { ?string }
3703     * @syscap SystemCapability.Applications.ContactsData
3704     * @since 7
3705     */
3706    /**
3707     * Indicates the postal code of this contact.
3708     *
3709     * @type { ?string }
3710     * @syscap SystemCapability.Applications.ContactsData
3711     * @atomicservice
3712     * @since 11
3713     */
3714    postcode?: string
3715
3716    /**
3717     * Indicates the area where this contact is located.
3718     *
3719     * @type { ?string }
3720     * @syscap SystemCapability.Applications.ContactsData
3721     * @since 7
3722     */
3723    /**
3724     * Indicates the area where this contact is located.
3725     *
3726     * @type { ?string }
3727     * @syscap SystemCapability.Applications.ContactsData
3728     * @atomicservice
3729     * @since 11
3730     */
3731    region?: string
3732
3733    /**
3734     * Indicates the street where this contact is located.
3735     *
3736     * @type { ?string }
3737     * @syscap SystemCapability.Applications.ContactsData
3738     * @since 7
3739     */
3740    /**
3741     * Indicates the street where this contact is located.
3742     *
3743     * @type { ?string }
3744     * @syscap SystemCapability.Applications.ContactsData
3745     * @atomicservice
3746     * @since 11
3747     */
3748    street?: string
3749
3750    /**
3751     * Indicates the label id.
3752     *
3753     * @type { ?number }
3754     * @syscap SystemCapability.Applications.ContactsData
3755     * @since 7
3756     */
3757    /**
3758     * Indicates the label id.
3759     *
3760     * @type { ?number }
3761     * @syscap SystemCapability.Applications.ContactsData
3762     * @atomicservice
3763     * @since 11
3764     */
3765    labelId?: number
3766  }
3767
3768  /**
3769   * Provides methods for relation information
3770   *
3771   * @syscap SystemCapability.Applications.ContactsData
3772   * @since 7
3773   */
3774  /**
3775   * Provides methods for relation information
3776   *
3777   * @syscap SystemCapability.Applications.ContactsData
3778   * @atomicservice
3779   * @since 11
3780   */
3781  class Relation {
3782    /**
3783     * Indicates custom relationship type.
3784     *
3785     * @readonly
3786     * @static
3787     * @syscap SystemCapability.Applications.ContactsData
3788     * @since 7
3789     */
3790    /**
3791     * Indicates custom relationship type.
3792     *
3793     * @readonly
3794     * @static
3795     * @syscap SystemCapability.Applications.ContactsData
3796     * @atomicservice
3797     * @since 11
3798     */
3799    static readonly CUSTOM_LABEL: 0
3800
3801    /**
3802     * Indicates assistant relationship type.
3803     *
3804     * @readonly
3805     * @static
3806     * @syscap SystemCapability.Applications.ContactsData
3807     * @since 7
3808     */
3809    /**
3810     * Indicates assistant relationship type.
3811     *
3812     * @readonly
3813     * @static
3814     * @syscap SystemCapability.Applications.ContactsData
3815     * @atomicservice
3816     * @since 11
3817     */
3818    static readonly RELATION_ASSISTANT: 1
3819
3820    /**
3821     * Indicates brother relationship type.
3822     *
3823     * @readonly
3824     * @static
3825     * @syscap SystemCapability.Applications.ContactsData
3826     * @since 7
3827     */
3828    /**
3829     * Indicates brother relationship type.
3830     *
3831     * @readonly
3832     * @static
3833     * @syscap SystemCapability.Applications.ContactsData
3834     * @atomicservice
3835     * @since 11
3836     */
3837    static readonly RELATION_BROTHER: 2
3838
3839    /**
3840     * Indicates child relationship type.
3841     *
3842     * @readonly
3843     * @static
3844     * @syscap SystemCapability.Applications.ContactsData
3845     * @since 7
3846     */
3847    /**
3848     * Indicates child relationship type.
3849     *
3850     * @readonly
3851     * @static
3852     * @syscap SystemCapability.Applications.ContactsData
3853     * @atomicservice
3854     * @since 11
3855     */
3856    static readonly RELATION_CHILD: 3
3857
3858    /**
3859     * Indicates domestic partner relationship type.
3860     *
3861     * @readonly
3862     * @static
3863     * @syscap SystemCapability.Applications.ContactsData
3864     * @since 7
3865     */
3866    /**
3867     * Indicates domestic partner relationship type.
3868     *
3869     * @readonly
3870     * @static
3871     * @syscap SystemCapability.Applications.ContactsData
3872     * @atomicservice
3873     * @since 11
3874     */
3875    static readonly RELATION_DOMESTIC_PARTNER: 4
3876
3877    /**
3878     * Indicates father relationship type.
3879     *
3880     * @readonly
3881     * @static
3882     * @syscap SystemCapability.Applications.ContactsData
3883     * @since 7
3884     */
3885    /**
3886     * Indicates father relationship type.
3887     *
3888     * @readonly
3889     * @static
3890     * @syscap SystemCapability.Applications.ContactsData
3891     * @atomicservice
3892     * @since 11
3893     */
3894    static readonly RELATION_FATHER: 5
3895
3896    /**
3897     * Indicates friend relationship type.
3898     *
3899     * @readonly
3900     * @static
3901     * @syscap SystemCapability.Applications.ContactsData
3902     * @since 7
3903     */
3904    /**
3905     * Indicates friend relationship type.
3906     *
3907     * @readonly
3908     * @static
3909     * @syscap SystemCapability.Applications.ContactsData
3910     * @atomicservice
3911     * @since 11
3912     */
3913    static readonly RELATION_FRIEND: 6
3914
3915    /**
3916     * Indicates manager relationship type.
3917     *
3918     * @readonly
3919     * @static
3920     * @syscap SystemCapability.Applications.ContactsData
3921     * @since 7
3922     */
3923    /**
3924     * Indicates manager relationship type.
3925     *
3926     * @readonly
3927     * @static
3928     * @syscap SystemCapability.Applications.ContactsData
3929     * @atomicservice
3930     * @since 11
3931     */
3932    static readonly RELATION_MANAGER: 7
3933
3934    /**
3935     * Indicates mother relationship type.
3936     *
3937     * @readonly
3938     * @static
3939     * @syscap SystemCapability.Applications.ContactsData
3940     * @since 7
3941     */
3942    /**
3943     * Indicates mother relationship type.
3944     *
3945     * @readonly
3946     * @static
3947     * @syscap SystemCapability.Applications.ContactsData
3948     * @atomicservice
3949     * @since 11
3950     */
3951    static readonly RELATION_MOTHER: 8
3952
3953    /**
3954     * Indicates parent relationship type.
3955     *
3956     * @readonly
3957     * @static
3958     * @syscap SystemCapability.Applications.ContactsData
3959     * @since 7
3960     */
3961    /**
3962     * Indicates parent relationship type.
3963     *
3964     * @readonly
3965     * @static
3966     * @syscap SystemCapability.Applications.ContactsData
3967     * @atomicservice
3968     * @since 11
3969     */
3970    static readonly RELATION_PARENT: 9
3971
3972    /**
3973     * Indicates partner relationship type.
3974     *
3975     * @readonly
3976     * @static
3977     * @syscap SystemCapability.Applications.ContactsData
3978     * @since 7
3979     */
3980    /**
3981     * Indicates partner relationship type.
3982     *
3983     * @readonly
3984     * @static
3985     * @syscap SystemCapability.Applications.ContactsData
3986     * @atomicservice
3987     * @since 11
3988     */
3989    static readonly RELATION_PARTNER: 10
3990
3991    /**
3992     * Indicates referrer relationship type.
3993     *
3994     * @readonly
3995     * @static
3996     * @syscap SystemCapability.Applications.ContactsData
3997     * @since 7
3998     */
3999    /**
4000     * Indicates referrer relationship type.
4001     *
4002     * @readonly
4003     * @static
4004     * @syscap SystemCapability.Applications.ContactsData
4005     * @atomicservice
4006     * @since 11
4007     */
4008    static readonly RELATION_REFERRED_BY: 11
4009
4010    /**
4011     * Indicates relative relationship type.
4012     *
4013     * @readonly
4014     * @static
4015     * @syscap SystemCapability.Applications.ContactsData
4016     * @since 7
4017     */
4018    /**
4019     * Indicates relative relationship type.
4020     *
4021     * @readonly
4022     * @static
4023     * @syscap SystemCapability.Applications.ContactsData
4024     * @atomicservice
4025     * @since 11
4026     */
4027    static readonly RELATION_RELATIVE: 12
4028
4029    /**
4030     * Indicates sister relationship type.
4031     *
4032     * @readonly
4033     * @static
4034     * @syscap SystemCapability.Applications.ContactsData
4035     * @since 7
4036     */
4037    /**
4038     * Indicates sister relationship type.
4039     *
4040     * @readonly
4041     * @static
4042     * @syscap SystemCapability.Applications.ContactsData
4043     * @atomicservice
4044     * @since 11
4045     */
4046    static readonly RELATION_SISTER: 13
4047
4048    /**
4049     * Indicates spouse relationship type.
4050     *
4051     * @readonly
4052     * @static
4053     * @syscap SystemCapability.Applications.ContactsData
4054     * @since 7
4055     */
4056    /**
4057     * Indicates spouse relationship type.
4058     *
4059     * @readonly
4060     * @static
4061     * @syscap SystemCapability.Applications.ContactsData
4062     * @atomicservice
4063     * @since 11
4064     */
4065    static readonly RELATION_SPOUSE: 14
4066
4067    /**
4068     * Indicates invalid relationship type.
4069     *
4070     * @readonly
4071     * @static
4072     * @syscap SystemCapability.Applications.ContactsData
4073     * @since 7
4074     */
4075    /**
4076     * Indicates invalid relationship type.
4077     *
4078     * @readonly
4079     * @static
4080     * @syscap SystemCapability.Applications.ContactsData
4081     * @atomicservice
4082     * @since 11
4083     */
4084    static readonly INVALID_LABEL_ID: -1
4085
4086    /**
4087     * Indicates the label name of an attribute.
4088     *
4089     * @type { ?string }
4090     * @syscap SystemCapability.Applications.ContactsData
4091     * @since 7
4092     */
4093    /**
4094     * Indicates the label name of an attribute.
4095     *
4096     * @type { ?string }
4097     * @syscap SystemCapability.Applications.ContactsData
4098     * @atomicservice
4099     * @since 11
4100     */
4101    labelName?: string
4102
4103    /**
4104     * Indicates the relation name.
4105     *
4106     * @type { string }
4107     * @syscap SystemCapability.Applications.ContactsData
4108     * @since 7
4109     */
4110    /**
4111     * Indicates the relation name.
4112     *
4113     * @type { string }
4114     * @syscap SystemCapability.Applications.ContactsData
4115     * @atomicservice
4116     * @since 11
4117     */
4118    relationName: string
4119
4120    /**
4121     * Indicates the label id.
4122     *
4123     * @type { ?number }
4124     * @syscap SystemCapability.Applications.ContactsData
4125     * @since 7
4126     */
4127    /**
4128     * Indicates the label id.
4129     *
4130     * @type { ?number }
4131     * @syscap SystemCapability.Applications.ContactsData
4132     * @atomicservice
4133     * @since 11
4134     */
4135    labelId?: number
4136  }
4137
4138  /**
4139   * Provides methods for sip address information
4140   *
4141   * @syscap SystemCapability.Applications.ContactsData
4142   * @since 7
4143   */
4144  /**
4145   * Provides methods for sip address information
4146   *
4147   * @syscap SystemCapability.Applications.ContactsData
4148   * @atomicservice
4149   * @since 11
4150   */
4151  class SipAddress {
4152    /**
4153     * Indicates a custom label.
4154     *
4155     * @readonly
4156     * @static
4157     * @syscap SystemCapability.Applications.ContactsData
4158     * @since 7
4159     */
4160    /**
4161     * Indicates a custom label.
4162     *
4163     * @readonly
4164     * @static
4165     * @syscap SystemCapability.Applications.ContactsData
4166     * @atomicservice
4167     * @since 11
4168     */
4169    static readonly CUSTOM_LABEL: 0
4170
4171    /**
4172     * Indicates a home SIP address.
4173     *
4174     * @readonly
4175     * @static
4176     * @syscap SystemCapability.Applications.ContactsData
4177     * @since 7
4178     */
4179    /**
4180     * Indicates a home SIP address.
4181     *
4182     * @readonly
4183     * @static
4184     * @syscap SystemCapability.Applications.ContactsData
4185     * @atomicservice
4186     * @since 11
4187     */
4188    static readonly SIP_HOME: 1
4189
4190    /**
4191     * Indicates a work SIP address.
4192     *
4193     * @readonly
4194     * @static
4195     * @syscap SystemCapability.Applications.ContactsData
4196     * @since 7
4197     */
4198    /**
4199     * Indicates a work SIP address.
4200     *
4201     * @readonly
4202     * @static
4203     * @syscap SystemCapability.Applications.ContactsData
4204     * @atomicservice
4205     * @since 11
4206     */
4207    static readonly SIP_WORK: 2
4208
4209    /**
4210     * Indicates an SIP address of the OTHER type.
4211     *
4212     * @readonly
4213     * @static
4214     * @syscap SystemCapability.Applications.ContactsData
4215     * @since 7
4216     */
4217    /**
4218     * Indicates an SIP address of the OTHER type.
4219     *
4220     * @readonly
4221     * @static
4222     * @syscap SystemCapability.Applications.ContactsData
4223     * @atomicservice
4224     * @since 11
4225     */
4226    static readonly SIP_OTHER: 3
4227
4228    /**
4229     * Indicates an invalid label ID.
4230     *
4231     * @readonly
4232     * @static
4233     * @syscap SystemCapability.Applications.ContactsData
4234     * @since 7
4235     */
4236    /**
4237     * Indicates an invalid label ID.
4238     *
4239     * @readonly
4240     * @static
4241     * @syscap SystemCapability.Applications.ContactsData
4242     * @atomicservice
4243     * @since 11
4244     */
4245    static readonly INVALID_LABEL_ID: -1
4246
4247    /**
4248     * Indicates the label name of an attribute.
4249     *
4250     * @type { ?string }
4251     * @syscap SystemCapability.Applications.ContactsData
4252     * @since 7
4253     */
4254    /**
4255     * Indicates the label name of an attribute.
4256     *
4257     * @type { ?string }
4258     * @syscap SystemCapability.Applications.ContactsData
4259     * @atomicservice
4260     * @since 11
4261     */
4262    labelName?: string
4263
4264    /**
4265     * Indicates the SIP address.
4266     *
4267     * @type { string }
4268     * @syscap SystemCapability.Applications.ContactsData
4269     * @since 7
4270     */
4271    /**
4272     * Indicates the SIP address.
4273     *
4274     * @type { string }
4275     * @syscap SystemCapability.Applications.ContactsData
4276     * @atomicservice
4277     * @since 11
4278     */
4279    sipAddress: string
4280
4281    /**
4282     * Indicates the label id.
4283     *
4284     * @type { ?number }
4285     * @syscap SystemCapability.Applications.ContactsData
4286     * @since 7
4287     */
4288    /**
4289     * Indicates the label id.
4290     *
4291     * @type { ?number }
4292     * @syscap SystemCapability.Applications.ContactsData
4293     * @atomicservice
4294     * @since 11
4295     */
4296    labelId?: number
4297  }
4298
4299  /**
4300   * Provides methods for website information
4301   *
4302   * @syscap SystemCapability.Applications.ContactsData
4303   * @since 7
4304   */
4305  /**
4306   * Provides methods for website information
4307   *
4308   * @syscap SystemCapability.Applications.ContactsData
4309   * @atomicservice
4310   * @since 11
4311   */
4312  class Website {
4313    /**
4314     * Indicates the website.
4315     *
4316     * @type { string }
4317     * @syscap SystemCapability.Applications.ContactsData
4318     * @since 7
4319     */
4320    /**
4321     * Indicates the website.
4322     *
4323     * @type { string }
4324     * @syscap SystemCapability.Applications.ContactsData
4325     * @atomicservice
4326     * @since 11
4327     */
4328    website: string
4329  }
4330}
4331
4332export default contact;