• 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
16import { AsyncCallback } from './@ohos.base';
17import type Context from './application/BaseContext';
18
19/**
20 * Contains variety of system contact, provides functions for adding, updating and deleting these system contact
21 * and provides methods for querying the information of contact.
22 *
23 * @namespace contact
24 * @syscap SystemCapability.Applications.ContactsData
25 * @since 7
26 */
27declare namespace contact {
28  /**
29   * Creates a contact.
30   *
31   * @permission ohos.permission.WRITE_CONTACTS
32   * @param { Contact } contact - Indicates the contact information.
33   * @param { AsyncCallback<number> } callback - Returns the contact ID (which can be obtained
34   * by {@link Contact#getId()}) if the creation is successful. returns {@link Contact#INVALID_CONTACT_ID} if the
35   * creation fails.
36   * @syscap SystemCapability.Applications.ContactsData
37   * @since 7
38   * @deprecated since 10
39   * @useinstead contact.addContact#addContact
40   */
41  function addContact(contact: Contact, callback: AsyncCallback<number>): void;
42
43  /**
44   * Creates a contact.
45   *
46   * @permission ohos.permission.WRITE_CONTACTS
47   * @param { Context } context - Indicates the context of application or capability.
48   * @param { Contact } contact - Indicates the contact information.
49   * @param { AsyncCallback<number> } callback - Returns the contact ID (which can be obtained
50   * by {@link Contact#getId()}) if the creation is successful. returns {@link Contact#INVALID_CONTACT_ID} if the
51   * creation fails.
52   * @throws { BusinessError } 201 - Permission denied.
53   * @throws { BusinessError } 401 - Parameter error.
54   * @syscap SystemCapability.Applications.ContactsData
55   * @since 10
56   */
57  function addContact(context: Context, contact: Contact, callback: AsyncCallback<number>): void;
58
59  /**
60   * Creates a contact.
61   *
62   * @permission ohos.permission.WRITE_CONTACTS
63   * @param { Contact } contact - Indicates the contact information.
64   * @returns { Promise<number> } Returns the contact ID (which can be obtained by {@link Contact#getId()}) if the
65   * creation is successful. returns {@link Contact#INVALID_CONTACT_ID} if the creation fails.
66   * @syscap SystemCapability.Applications.ContactsData
67   * @since 7
68   * @deprecated since 10
69   * @useinstead contact.addContact#addContact
70   */
71  function addContact(contact: Contact): Promise<number>;
72
73  /**
74   * Creates a contact.
75   *
76   * @permission ohos.permission.WRITE_CONTACTS
77   * @param { Context } context - Indicates the context of application or capability.
78   * @param { Contact } contact - Indicates the contact information.
79   * @returns { Promise<number> } Returns the contact ID (which can be obtained by {@link Contact#getId()}) if the
80   * creation is successful. returns {@link Contact#INVALID_CONTACT_ID} if the creation fails.
81   * @throws { BusinessError } 201 - Permission denied.
82   * @throws { BusinessError } 401 - Parameter error.
83   * @syscap SystemCapability.Applications.ContactsData
84   * @since 10
85   */
86  function addContact(context: Context, contact: Contact): Promise<number>;
87
88  /**
89   * Select contact.
90   *
91   * @permission ohos.permission.READ_CONTACTS
92   * @param { AsyncCallback<Array<Contact>> } callback - Indicates the callback for getting the result of the call.
93   * Returns the contact list which user select; returns empty contact list if user not select.
94   * @syscap SystemCapability.Applications.Contacts
95   * @since 7
96   * @deprecated since 10
97   * @useinstead contact.selectContact#selectContacts
98   */
99  function selectContact(callback: AsyncCallback<Array<Contact>>): void;
100
101  /**
102   * Select contact.
103   *
104   * @param { AsyncCallback<Array<Contact>> } callback - Indicates the callback for getting the result of the call.
105   * Returns the contact list which user select; returns empty contact list if user not select.
106   * @throws { BusinessError } 401 - Parameter error.
107   * @syscap SystemCapability.Applications.Contacts
108   * @since 10
109   */
110  function selectContacts(callback: AsyncCallback<Array<Contact>>): void;
111
112  /**
113   * Select contact.
114   *
115   * @permission ohos.permission.READ_CONTACTS
116   * @returns { Promise<Array<Contact>> } Returns the contact list which user select;
117   * returns empty contact list if user not select.
118   * @syscap SystemCapability.Applications.Contacts
119   * @since 7
120   * @deprecated since 10
121   * @useinstead contact.selectContact#selectContacts
122   */
123  function selectContact(): Promise<Array<Contact>>;
124
125  /**
126   * Select contact.
127   *
128   * @returns { Promise<Array<Contact>> } Returns the contact list which user select;
129   * returns empty contact list if user not select.
130   * @syscap SystemCapability.Applications.Contacts
131   * @since 10
132   */
133  function selectContacts(): Promise<Array<Contact>>;
134
135  /**
136   * Select contact with option.
137   *
138   * @param { ContactSelectionOptions } options - Indicates the Single-select or multiple-select.
139   * @param { AsyncCallback<Array<Contact>> } callback - Indicates the callback for getting the result of the call.
140   * @throws { BusinessError } 401 - Parameter error.
141   * @syscap SystemCapability.Applications.Contacts
142   * @since 10
143   */
144  function selectContacts(options: ContactSelectionOptions, callback: AsyncCallback<Array<Contact>>): void;
145
146  /**
147   * Select contact with option.
148   *
149   * @param { ContactSelectionOptions } options - Indicates the Single-select or multiple-select.
150   * @returns { Promise<Array<Contact>> } Returns the contact list which user select;
151   * returns empty contact list if user not select.
152   * @throws { BusinessError } 401 - Parameter error.
153   * @syscap SystemCapability.Applications.Contacts
154   * @since 10
155   */
156  function selectContacts(options: ContactSelectionOptions): Promise<Array<Contact>>;
157
158  /**
159   * Deletes a specified contact.
160   *
161   * @permission ohos.permission.WRITE_CONTACTS
162   * @param { string } key - Indicates the unique query key of a contact to delete.
163   * @param { AsyncCallback<void> } callback - Returns true if the contact is deleted; returns false otherwise.
164   * @syscap SystemCapability.Applications.ContactsData
165   * @since 7
166   * @deprecated since 10
167   * @useinstead contact.deleteContact#deleteContact
168   */
169  function deleteContact(key: string, callback: AsyncCallback<void>): void;
170
171  /**
172   * Deletes a specified contact.
173   *
174   * @permission ohos.permission.WRITE_CONTACTS
175   * @param { Context } context - Indicates the context of application or capability.
176   * @param { string } key - Indicates the unique query key of a contact to delete.
177   * @param { AsyncCallback<void> } callback - Returns true if the contact is deleted; returns false otherwise.
178   * @throws { BusinessError } 201 - Permission denied.
179   * @throws { BusinessError } 401 - Parameter error.
180   * @syscap SystemCapability.Applications.ContactsData
181   * @since 10
182   */
183  function deleteContact(context: Context, key: string, callback: AsyncCallback<void>): void;
184
185  /**
186   * Deletes a specified contact.
187   *
188   * @permission ohos.permission.WRITE_CONTACTS
189   * @param { string } key - Indicates the unique query key of a contact to delete.
190   * @returns { Promise<void> } Returns true if the contact is deleted, returns false otherwise.
191   * @syscap SystemCapability.Applications.ContactsData
192   * @since 7
193   * @deprecated since 10
194   * @useinstead contact.deleteContact#deleteContact
195   */
196  function deleteContact(key: string): Promise<void>;
197
198  /**
199   * Deletes a specified contact.
200   *
201   * @permission ohos.permission.WRITE_CONTACTS
202   * @param { Context } context - Indicates the context of application or capability.
203   * @param { string } key - Indicates the unique query key of a contact to delete.
204   * @returns { Promise<void> } Returns true if the contact is deleted, returns false otherwise.
205   * @throws { BusinessError } 201 - Permission denied.
206   * @throws { BusinessError } 401 - Parameter error.
207   * @syscap SystemCapability.Applications.ContactsData
208   * @since 10
209   */
210  function deleteContact(context: Context, key: string): Promise<void>;
211
212  /**
213   * Queries a specified contact of specified attributes.
214   *
215   * @permission ohos.permission.READ_CONTACTS
216   * @param { string } key - Indicates the unique query key of a contact.
217   * @param { AsyncCallback<Contact> } callback - Returns the specified contact.
218   * @syscap SystemCapability.Applications.ContactsData
219   * @since 7
220   * @deprecated since 10
221   * @useinstead contact.queryContact#queryContact
222   */
223  function queryContact(key: string, callback: AsyncCallback<Contact>): void;
224
225  /**
226   * Queries a specified contact of specified attributes.
227   *
228   * @permission ohos.permission.READ_CONTACTS
229   * @param { Context } context - Indicates the context of application or capability.
230   * @param { string } key - Indicates the unique query key of a contact.
231   * @param { AsyncCallback<Contact> } callback - Returns the specified contact.
232   * @throws { BusinessError } 201 - Permission denied.
233   * @throws { BusinessError } 401 - Parameter error.
234   * @syscap SystemCapability.Applications.ContactsData
235   * @since 10
236   */
237  function queryContact(context: Context, key: string, callback: AsyncCallback<Contact>): void;
238
239  /**
240   * Queries a specified contact of specified attributes.
241   *
242   * @permission ohos.permission.READ_CONTACTS
243   * @param { string } key - Indicates the unique query key of a contact.
244   * @param { Holder } holder - Indicates the contact holder.
245   * If this parameter is null, the default holder is used for matching.
246   * @param { AsyncCallback<Contact> } callback - Returns the specified contact.
247   * @syscap SystemCapability.Applications.ContactsData
248   * @since 7
249   * @deprecated since 10
250   * @useinstead contact.queryContact#queryContact
251   */
252  function queryContact(key: string, holder: Holder, callback: AsyncCallback<Contact>): void;
253
254  /**
255   * Queries a specified contact of specified attributes.
256   *
257   * @permission ohos.permission.READ_CONTACTS
258   * @param { Context } context - Indicates the context of application or capability.
259   * @param { string } key - Indicates the unique query key of a contact.
260   * @param { Holder } holder - Indicates the contact holder.
261   * If this parameter is null, the default holder is used for matching.
262   * @param { AsyncCallback<Contact> } callback - Returns the specified contact.
263   * @throws { BusinessError } 201 - Permission denied.
264   * @throws { BusinessError } 401 - Parameter error.
265   * @syscap SystemCapability.Applications.ContactsData
266   * @since 10
267   */
268  function queryContact(context: Context, key: string, holder: Holder, callback: AsyncCallback<Contact>): void;
269
270  /**
271   * Queries a specified contact of specified attributes.
272   *
273   * @permission ohos.permission.READ_CONTACTS
274   * @param { string } key - Indicates the unique query key of a contact.
275   * @param { ContactAttributes } attrs - Indicates the contact attributes.
276   * If this parameter is null, all attributes are used for matching.
277   * @param { AsyncCallback<Contact> } callback - Returns the specified contact.
278   * @syscap SystemCapability.Applications.ContactsData
279   * @since 7
280   * @deprecated since 10
281   * @useinstead contact.queryContact#queryContact
282   */
283  function queryContact(key: string, attrs: ContactAttributes, callback: AsyncCallback<Contact>): void;
284
285  /**
286   * Queries a specified contact of specified attributes.
287   *
288   * @permission ohos.permission.READ_CONTACTS
289   * @param { Context } context - Indicates the context of application or capability.
290   * @param { string } key - Indicates the unique query key of a contact.
291   * @param { ContactAttributes } attrs - Indicates the contact attributes.
292   * If this parameter is null, all attributes are used for matching.
293   * @param { AsyncCallback<Contact> } callback - Returns the specified contact.
294   * @throws { BusinessError } 201 - Permission denied.
295   * @throws { BusinessError } 401 - Parameter error.
296   * @syscap SystemCapability.Applications.ContactsData
297   * @since 10
298   */
299  function queryContact(context: Context, key: string, attrs: ContactAttributes, callback: AsyncCallback<Contact>): void;
300
301  /**
302   * Queries a specified contact of specified attributes.
303   *
304   * @permission ohos.permission.READ_CONTACTS
305   * @param { string } key - Indicates the unique query key of a contact.
306   * @param { Holder } holder - Indicates the contact holder.
307   * @param { ContactAttributes } attrs - Indicates the contact attributes.
308   * If this parameter is null, all attributes are used for matching.
309   * @param { AsyncCallback<Contact> } callback - Returns the specified contact.
310   * @syscap SystemCapability.Applications.ContactsData
311   * @since 7
312   * @deprecated since 10
313   * @useinstead contact.queryContact#queryContact
314   */
315  function queryContact(key: string, holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Contact>): void;
316
317  /**
318   * Queries a specified contact of specified attributes.
319   *
320   * @permission ohos.permission.READ_CONTACTS
321   * @param { Context } context - Indicates the context of application or capability.
322   * @param { string } key - Indicates the unique query key of a contact.
323   * @param { Holder } holder - Indicates the contact holder.
324   * @param { ContactAttributes } attrs - Indicates the contact attributes.
325   * If this parameter is null, all attributes are used for matching.
326   * @param { AsyncCallback<Contact> } callback - Returns the specified contact.
327   * @throws { BusinessError } 201 - Permission denied.
328   * @throws { BusinessError } 401 - Parameter error.
329   * @syscap SystemCapability.Applications.ContactsData
330   * @since 10
331   */
332  function queryContact(context: Context, key: string, holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Contact>): void;
333
334  /**
335   * Queries a specified contact of specified attributes.
336   *
337   * @permission ohos.permission.READ_CONTACTS
338   * @param { string } key - Indicates the unique query key of a contact.
339   * @param { Holder } holder - Indicates the contact holder.
340   * @param { ContactAttributes } attrs - Indicates the contact attributes.
341   * If this parameter is null, all attributes are used for matching.
342   * @returns { Promise<Contact> } Returns the specified contact.
343   * @syscap SystemCapability.Applications.ContactsData
344   * @since 7
345   * @deprecated since 10
346   * @useinstead contact.queryContact#queryContact
347   */
348  function queryContact(key: string, holder?: Holder, attrs?: ContactAttributes): Promise<Contact>;
349
350  /**
351   * Queries a specified contact of specified attributes.
352   *
353   * @permission ohos.permission.READ_CONTACTS
354   * @param { Context } context - Indicates the context of application or capability.
355   * @param { string } key - Indicates the unique query key of a contact.
356   * @param { Holder } holder - Indicates the contact holder.
357   * @param { ContactAttributes } attrs - Indicates the contact attributes.
358   * If this parameter is null, all attributes are used for matching.
359   * @returns { Promise<Contact> } Returns the specified contact.
360   * @throws { BusinessError } 201 - Permission denied.
361   * @throws { BusinessError } 401 - Parameter error.
362   * @syscap SystemCapability.Applications.ContactsData
363   * @since 10
364   */
365  function queryContact(context: Context, key: string, holder?: Holder, attrs?: ContactAttributes): Promise<Contact>;
366
367  /**
368   * Queries contacts with query conditions.
369   *
370   * @permission ohos.permission.READ_CONTACTS
371   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
372   * @syscap SystemCapability.Applications.ContactsData
373   * @since 7
374   * @deprecated since 10
375   * @useinstead contact.queryContacts#queryContacts
376   */
377  function queryContacts(callback: AsyncCallback<Array<Contact>>): void;
378
379  /**
380   * Queries contacts with query conditions.
381   *
382   * @permission ohos.permission.READ_CONTACTS
383   * @param { Context } context - Indicates the context of application or capability.
384   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
385   * @throws { BusinessError } 201 - Permission denied.
386   * @throws { BusinessError } 401 - Parameter error.
387   * @syscap SystemCapability.Applications.ContactsData
388   * @since 10
389   */
390  function queryContacts(context: Context, callback: AsyncCallback<Array<Contact>>): void;
391
392  /**
393   * Queries contacts with query conditions.
394   *
395   * @permission ohos.permission.READ_CONTACTS
396   * @param { Holder } holder - Indicates the contact holder.
397   * If this parameter is null, the default holder is used for matching.
398   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
399   * @syscap SystemCapability.Applications.ContactsData
400   * @since 7
401   * @deprecated since 10
402   * @useinstead contact.queryContacts#queryContacts
403   */
404  function queryContacts(holder: Holder, callback: AsyncCallback<Array<Contact>>): void;
405
406  /**
407   * Queries contacts with query conditions.
408   *
409   * @permission ohos.permission.READ_CONTACTS
410   * @param { Context } context - Indicates the context of application or capability.
411   * @param { Holder } holder - Indicates the contact holder.
412   * If this parameter is null, the default holder is used for matching.
413   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
414   * @throws { BusinessError } 201 - Permission denied.
415   * @throws { BusinessError } 401 - Parameter error.
416   * @syscap SystemCapability.Applications.ContactsData
417   * @since 10
418   */
419  function queryContacts(context: Context, holder: Holder, callback: AsyncCallback<Array<Contact>>): void;
420
421  /**
422   * Queries contacts with query conditions.
423   *
424   * @permission ohos.permission.READ_CONTACTS
425   * @param { ContactAttributes } attrs - Indicates the contact attributes.
426   * If this parameter is null, all attributes are used for matching.
427   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
428   * @syscap SystemCapability.Applications.ContactsData
429   * @since 7
430   * @deprecated since 10
431   * @useinstead contact.queryContacts#queryContacts
432   */
433  function queryContacts(attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
434
435  /**
436   * Queries contacts with query conditions.
437   *
438   * @permission ohos.permission.READ_CONTACTS
439   * @param { Context } context - Indicates the context of application or capability.
440   * @param { ContactAttributes } attrs - Indicates the contact attributes.
441   * If this parameter is null, all attributes are used for matching.
442   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
443   * @throws { BusinessError } 201 - Permission denied.
444   * @throws { BusinessError } 401 - Parameter error.
445   * @syscap SystemCapability.Applications.ContactsData
446   * @since 10
447   */
448  function queryContacts(context: Context, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
449
450  /**
451   * Queries contacts with query conditions.
452   *
453   * @permission ohos.permission.READ_CONTACTS
454   * @param { Holder } holder - Indicates the contact holder.
455   * If this parameter is null, the default holder is used for matching.
456   * @param { ContactAttributes } attrs - Indicates the contact attributes.
457   * If this parameter is null, all attributes are used for matching.
458   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
459   * @syscap SystemCapability.Applications.ContactsData
460   * @since 7
461   * @deprecated since 10
462   * @useinstead contact.queryContacts#queryContacts
463   */
464  function queryContacts(holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
465
466  /**
467   * Queries contacts with query conditions.
468   *
469   * @permission ohos.permission.READ_CONTACTS
470   * @param { Context } context - Indicates the context of application or capability.
471   * @param { Holder } holder - Indicates the contact holder.
472   * If this parameter is null, the default holder is used for matching.
473   * @param { ContactAttributes } attrs - Indicates the contact attributes.
474   * If this parameter is null, all attributes are used for matching.
475   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
476   * @throws { BusinessError } 201 - Permission denied.
477   * @throws { BusinessError } 401 - Parameter error.
478   * @syscap SystemCapability.Applications.ContactsData
479   * @since 10
480   */
481  function queryContacts(context: Context, holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
482
483  /**
484   * Queries contacts with query conditions.
485   *
486   * @permission ohos.permission.READ_CONTACTS
487   * @param { Holder } holder - Indicates the contact holder.
488   * If this parameter is null, the default holder is used for matching.
489   * @param { ContactAttributes } attrs - Indicates the contact attributes.
490   * If this parameter is null, all attributes are used for matching.
491   * @returns { Promise<Array<Contact>> } Returns the {@code Contact} list object.
492   * @syscap SystemCapability.Applications.ContactsData
493   * @since 7
494   * @deprecated since 10
495   * @useinstead contact.queryContacts#queryContacts
496   */
497  function queryContacts(holder?: Holder, attrs?: ContactAttributes): Promise<Array<Contact>>;
498
499  /**
500   * Queries contacts with query conditions.
501   *
502   * @permission ohos.permission.READ_CONTACTS
503   * @param { Context } context - Indicates the context of application or capability.
504   * @param { Holder } holder - Indicates the contact holder.
505   * If this parameter is null, the default holder is used for matching.
506   * @param { ContactAttributes } attrs - Indicates the contact attributes.
507   * If this parameter is null, all attributes are used for matching.
508   * @returns { Promise<Array<Contact>> } Returns the {@code Contact} list object.
509   * @throws { BusinessError } 201 - Permission denied.
510   * @throws { BusinessError } 401 - Parameter error.
511   * @syscap SystemCapability.Applications.ContactsData
512   * @since 10
513   */
514  function queryContacts(context: Context, holder?: Holder, attrs?: ContactAttributes): Promise<Array<Contact>>;
515
516  /**
517   * Queries contacts by a specified email address.
518   *
519   * @permission ohos.permission.READ_CONTACTS
520   * @param { string } email - Indicates the email address.
521   * @param { AsyncCallback<Array<Contact>> } callback - Returns a {@code Contact} list object.
522   * @syscap SystemCapability.Applications.ContactsData
523   * @since 7
524   * @deprecated since 10
525   * @useinstead contact.queryContactsByEmail#queryContactsByEmail
526   */
527  function queryContactsByEmail(email: string, callback: AsyncCallback<Array<Contact>>): void;
528
529  /**
530   * Queries contacts by a specified email address.
531   *
532   * @permission ohos.permission.READ_CONTACTS
533   * @param { Context } context - Indicates the context of application or capability.
534   * @param { string } email - Indicates the email address.
535   * @param { AsyncCallback<Array<Contact>> } callback - Returns a {@code Contact} list object.
536   * @throws { BusinessError } 201 - Permission denied.
537   * @throws { BusinessError } 401 - Parameter error.
538   * @syscap SystemCapability.Applications.ContactsData
539   * @since 10
540   */
541  function queryContactsByEmail(context: Context, email: string, callback: AsyncCallback<Array<Contact>>): void;
542
543  /**
544   * Queries contacts by a specified email address and contact holder.
545   *
546   * @permission ohos.permission.READ_CONTACTS
547   * @param { string } email - Indicates the email address.
548   * @param { Holder } holder - Indicates the contact holder.
549   * If this parameter is null, the default holder is used for matching.
550   * @param { AsyncCallback<Array<Contact>> } callback - Returns a {@code Contact} list object.
551   * @syscap SystemCapability.Applications.ContactsData
552   * @since 7
553   * @deprecated since 10
554   * @useinstead contact.queryContactsByEmail#queryContactsByEmail
555   */
556  function queryContactsByEmail(email: string, holder: Holder, callback: AsyncCallback<Array<Contact>>): void;
557
558  /**
559   * Queries contacts by a specified email address and contact holder.
560   *
561   * @permission ohos.permission.READ_CONTACTS
562   * @param { Context } context - Indicates the context of application or capability.
563   * @param { string } email - Indicates the email address.
564   * @param { Holder } holder - Indicates the contact holder.
565   * If this parameter is null, the default holder is used for matching.
566   * @param { AsyncCallback<Array<Contact>> } callback - Returns a {@code Contact} list object.
567   * @throws { BusinessError } 201 - Permission denied.
568   * @throws { BusinessError } 401 - Parameter error.
569   * @syscap SystemCapability.Applications.ContactsData
570   * @since 10
571   */
572  function queryContactsByEmail(context: Context, email: string, holder: Holder,
573    callback: AsyncCallback<Array<Contact>>): void;
574
575  /**
576   * Queries contacts by a specified email address and contact attributes.
577   *
578   * @permission ohos.permission.READ_CONTACTS
579   * @param { string } email - Indicates the email address.
580   * @param { ContactAttributes } attrs - Indicates the contact attributes.
581   * If this parameter is null, all attributes are used for matching.
582   * @param { AsyncCallback<Array<Contact>> } callback - Returns a {@code Contact} list object.
583   * @syscap SystemCapability.Applications.ContactsData
584   * @since 7
585   * @deprecated since 10
586   * @useinstead contact.queryContactsByEmail#queryContactsByEmail
587   */
588  function queryContactsByEmail(email: string, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
589
590  /**
591   * Queries contacts by a specified email address and contact attributes.
592   *
593   * @permission ohos.permission.READ_CONTACTS
594   * @param { Context } context - Indicates the context of application or capability.
595   * @param { string } email - Indicates the email address.
596   * @param { ContactAttributes } attrs - Indicates the contact attributes.
597   * If this parameter is null, all attributes are used for matching.
598   * @param { AsyncCallback<Array<Contact>> } callback - Returns a {@code Contact} list object.
599   * @throws { BusinessError } 201 - Permission denied.
600   * @throws { BusinessError } 401 - Parameter error.
601   * @syscap SystemCapability.Applications.ContactsData
602   * @since 10
603   */
604  function queryContactsByEmail(context: Context, email: string, attrs: ContactAttributes,
605    callback: AsyncCallback<Array<Contact>>): void;
606
607  /**
608   * Queries contacts by a specified email address, contact holder, and contact attributes.
609   *
610   * @permission ohos.permission.READ_CONTACTS
611   * @param { string } email - Indicates the email address.
612   * @param { Holder } holder - Indicates the contact holder.
613   * If this parameter is null, the default holder is used for matching.
614   * @param { ContactAttributes } attrs - Indicates the contact attributes.
615   * If this parameter is null, all attributes are used for matching.
616   * @param { AsyncCallback<Array<Contact>> } callback - Returns a {@code Contact} list object.
617   * @syscap SystemCapability.Applications.ContactsData
618   * @since 7
619   * @deprecated since 10
620   * @useinstead contact.queryContactsByEmail#queryContactsByEmail
621   */
622  function queryContactsByEmail(email: string, holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
623
624  /**
625   * Queries contacts by a specified email address, contact holder, and contact attributes.
626   *
627   * @permission ohos.permission.READ_CONTACTS
628   * @param { Context } context - Indicates the context of application or capability.
629   * @param { string } email - Indicates the email address.
630   * @param { Holder } holder - Indicates the contact holder.
631   * If this parameter is null, the default holder is used for matching.
632   * @param { ContactAttributes } attrs - Indicates the contact attributes.
633   * If this parameter is null, all attributes are used for matching.
634   * @param { AsyncCallback<Array<Contact>> } callback - Returns a {@code Contact} list object.
635   * @throws { BusinessError } 201 - Permission denied.
636   * @throws { BusinessError } 401 - Parameter error.
637   * @syscap SystemCapability.Applications.ContactsData
638   * @since 10
639   */
640  function queryContactsByEmail(context: Context, email: string, holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
641
642  /**
643   * Queries contacts by a specified email address, contact holder, and contact attributes.
644   *
645   * @permission ohos.permission.READ_CONTACTS
646   * @param { string } email - Indicates the email address.
647   * @param { Holder } holder - Indicates the contact holder.
648   * If this parameter is null, the default holder is used for matching.
649   * @param { ContactAttributes } attrs - Indicates the contact attributes.
650   * If this parameter is null, all attributes are used for matching.
651   * @returns { Promise<Array<Contact>> } Returns a {@code Contact} list object.
652   * @syscap SystemCapability.Applications.ContactsData
653   * @since 7
654   * @deprecated since 10
655   * @useinstead contact.queryContactsByEmail#queryContactsByEmail
656   */
657  function queryContactsByEmail(email: string, holder?: Holder, attrs?: ContactAttributes): Promise<Array<Contact>>;
658
659  /**
660   * Queries contacts by a specified email address, contact holder, and contact attributes.
661   *
662   * @permission ohos.permission.READ_CONTACTS
663   * @param { Context } context - Indicates the context of application or capability.
664   * @param { string } email - Indicates the email address.
665   * @param { Holder } holder - Indicates the contact holder.
666   * If this parameter is null, the default holder is used for matching.
667   * @param { ContactAttributes } attrs - Indicates the contact attributes.
668   * If this parameter is null, all attributes are used for matching.
669   * @returns { Promise<Array<Contact>> } Returns a {@code Contact} list object.
670   * @throws { BusinessError } 201 - Permission denied.
671   * @throws { BusinessError } 401 - Parameter error.
672   * @syscap SystemCapability.Applications.ContactsData
673   * @since 10
674   */
675  function queryContactsByEmail(context: Context, email: string, holder?: Holder, attrs?: ContactAttributes): Promise<Array<Contact>>;
676
677  /**
678   * Queries contacts by a phone number.
679   *
680   * @permission ohos.permission.READ_CONTACTS
681   * @param { string } phoneNumber - Indicates the phone number.
682   * Only full match is supported, and wildcards are not supported.
683   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
684   * @syscap SystemCapability.Applications.ContactsData
685   * @since 7
686   * @deprecated since 10
687   * @useinstead contact.queryContactsByPhoneNumber#queryContactsByPhoneNumber
688   */
689  function queryContactsByPhoneNumber(phoneNumber: string, callback: AsyncCallback<Array<Contact>>): void;
690
691  /**
692   * Queries contacts by a phone number.
693   *
694   * @permission ohos.permission.READ_CONTACTS
695   * @param { Context } context - Indicates the context of application or capability.
696   * @param { string } phoneNumber - Indicates the phone number.
697   * Only full match is supported, and wildcards are not supported.
698   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
699   * @throws { BusinessError } 201 - Permission denied.
700   * @throws { BusinessError } 401 - Parameter error.
701   * @syscap SystemCapability.Applications.ContactsData
702   * @since 10
703   */
704  function queryContactsByPhoneNumber(context: Context, phoneNumber: string, callback: AsyncCallback<Array<Contact>>): void;
705
706  /**
707   * Queries contacts by a phone number and contact holder.
708   *
709   * @permission ohos.permission.READ_CONTACTS
710   * @param { string } phoneNumber - Indicates the phone number.
711   * Only full match is supported, and wildcards are not supported.
712   * @param { Holder } holder - Indicates the contact holder.
713   * If this parameter is null, the default holder is used for matching.
714   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
715   * @syscap SystemCapability.Applications.ContactsData
716   * @since 7
717   * @deprecated since 10
718   * @useinstead contact.queryContactsByPhoneNumber#queryContactsByPhoneNumber
719   */
720  function queryContactsByPhoneNumber(phoneNumber: string, holder: Holder, callback: AsyncCallback<Array<Contact>>): void;
721
722  /**
723   * Queries contacts by a phone number and contact holder.
724   *
725   * @permission ohos.permission.READ_CONTACTS
726   * @param { Context } context - Indicates the context of application or capability.
727   * @param { string } phoneNumber - Indicates the phone number.
728   * Only full match is supported, and wildcards are not supported.
729   * @param { Holder } holder - Indicates the contact holder.
730   * If this parameter is null, the default holder is used for matching.
731   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
732   * @throws { BusinessError } 201 - Permission denied.
733   * @throws { BusinessError } 401 - Parameter error.
734   * @syscap SystemCapability.Applications.ContactsData
735   * @since 10
736   */
737  function queryContactsByPhoneNumber(context: Context, phoneNumber: string, holder: Holder, callback: AsyncCallback<Array<Contact>>): void;
738
739  /**
740   * Queries contacts by a phone number and contact attribute.
741   *
742   * @permission ohos.permission.READ_CONTACTS
743   * @param { string } phoneNumber - Indicates the phone number.
744   * Only full match is supported, and wildcards are not supported.
745   * @param { ContactAttributes } attrs - Indicates the contact attribute.
746   * If this parameter is null, all attributes will be used for matching.
747   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
748   * @syscap SystemCapability.Applications.ContactsData
749   * @since 7
750   * @deprecated since 10
751   * @useinstead contact.queryContactsByPhoneNumber#queryContactsByPhoneNumber
752   */
753  function queryContactsByPhoneNumber(phoneNumber: string, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
754
755  /**
756   * Queries contacts by a phone number and contact attribute.
757   *
758   * @permission ohos.permission.READ_CONTACTS
759   * @param { Context } context - Indicates the context of application or capability.
760   * @param { string } phoneNumber - Indicates the phone number.
761   * Only full match is supported, and wildcards are not supported.
762   * @param { ContactAttributes } attrs - Indicates the contact attribute.
763   * If this parameter is null, all attributes will be used for matching.
764   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
765   * @throws { BusinessError } 201 - Permission denied.
766   * @throws { BusinessError } 401 - Parameter error.
767   * @syscap SystemCapability.Applications.ContactsData
768   * @since 10
769   */
770  function queryContactsByPhoneNumber(context: Context, phoneNumber: string, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
771
772  /**
773   * Queries contacts by a phone number, contact holder and contact attribute.
774   *
775   * @permission ohos.permission.READ_CONTACTS
776   * @param { string } phoneNumber - Indicates the phone number.
777   * Only full match is supported, and wildcards are not supported.
778   * @param { Holder } holder - Indicates the contact holder.
779   * If this parameter is null, the default holder is used for matching.
780   * @param { ContactAttributes } attrs - Indicates the contact attribute.
781   * If this parameter is null, all attributes will be used for matching.
782   * @param { AsyncCallback<Array<Contact>> } callback - Returns the {@code Contact} list object.
783   * @syscap SystemCapability.Applications.ContactsData
784   * @since 7
785   * @deprecated since 10
786   * @useinstead contact.queryContactsByPhoneNumber#queryContactsByPhoneNumber
787   */
788  function queryContactsByPhoneNumber(phoneNumber: string, holder: Holder, attrs: ContactAttributes, callback: AsyncCallback<Array<Contact>>): void;
789
790  /**
791   * Queries contacts by a phone number, contact holder and contact attribute.
792   *
793   * @permission ohos.permission.READ_CONTACTS
794   * @param { Context } context - Indicates the context of application or capability.
795   * @param { string } phoneNumber - Indicates the phone number.
796   * Only full match is supported, and wildcards are not supported.
797   * @param { Holder } holder - Indicates the contact holder.
798   * If this parameter is null, the default holder is used for matching.
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   * @throws { BusinessError } 201 - Permission denied.
803   * @throws { BusinessError } 401 - Parameter error.
804   * @syscap SystemCapability.Applications.ContactsData
805   * @since 10
806   */
807  function queryContactsByPhoneNumber(context: Context, phoneNumber: string, holder: Holder, attrs: ContactAttributes,
808    callback: AsyncCallback<Array<Contact>>): void;
809
810  /**
811   * Queries contacts by a phone number, contact holder and contact attribute.
812   *
813   * @permission ohos.permission.READ_CONTACTS
814   * @param { string } phoneNumber - Indicates the phone number.
815   * Only full match is supported, and wildcards are not supported.
816   * @param { Holder } holder - Indicates the contact holder.
817   * If this parameter is null, the default holder is used for matching.
818   * @param { ContactAttributes } attrs - Indicates the contact attribute.
819   * If this parameter is null, all attributes will be used for matching.
820   * @returns { Promise<Array<Contact>> } Returns the {@code Contact} list object.
821   * @syscap SystemCapability.Applications.ContactsData
822   * @since 7
823   * @deprecated since 10
824   * @useinstead contact.queryContactsByPhoneNumber#queryContactsByPhoneNumber
825   */
826  function queryContactsByPhoneNumber(phoneNumber: string, holder?: Holder, attrs?: ContactAttributes): Promise<Array<Contact>>;
827
828  /**
829   * Queries contacts by a phone number, contact holder and contact attribute.
830   *
831   * @permission ohos.permission.READ_CONTACTS
832   * @param { Context } context - Indicates the context of application or capability.
833   * @param { string } phoneNumber - Indicates the phone number.
834   * Only full match is supported, and wildcards are not supported.
835   * @param { Holder } holder - Indicates the contact holder.
836   * If this parameter is null, the default holder is used for matching.
837   * @param { ContactAttributes } attrs - Indicates the contact attribute.
838   * If this parameter is null, all attributes will be used for matching.
839   * @returns { Promise<Array<Contact>> } Returns the {@code Contact} list object.
840   * @throws { BusinessError } 201 - Permission denied.
841   * @throws { BusinessError } 401 - Parameter error.
842   * @syscap SystemCapability.Applications.ContactsData
843   * @since 10
844   */
845  function queryContactsByPhoneNumber(context: Context, phoneNumber: string, holder?: Holder, attrs?: ContactAttributes): Promise<Array<Contact>>;
846
847  /**
848   * Queries contact groups.
849   *
850   * @permission ohos.permission.READ_CONTACTS
851   * @param { AsyncCallback<Array<Group>> } callback - Returns the contact group list object.
852   * @syscap SystemCapability.Applications.ContactsData
853   * @since 7
854   * @deprecated since 10
855   * @useinstead contact.queryGroups#queryGroups
856   */
857  function queryGroups(callback: AsyncCallback<Array<Group>>): void;
858
859  /**
860   * Queries contact groups.
861   *
862   * @permission ohos.permission.READ_CONTACTS
863   * @param { Context } context - Indicates the context of application or capability.
864   * @param { AsyncCallback<Array<Group>> } callback - Returns the contact group list object.
865   * @throws { BusinessError } 201 - Permission denied.
866   * @throws { BusinessError } 401 - Parameter error.
867   * @syscap SystemCapability.Applications.ContactsData
868   * @since 10
869   */
870  function queryGroups(context: Context, callback: AsyncCallback<Array<Group>>): void;
871
872  /**
873   * Queries contact groups by contact holder.
874   *
875   * @permission ohos.permission.READ_CONTACTS
876   * @param { Holder } holder - Indicates the contact holder.
877   * If this parameter is null, the default holder is used for matching.
878   * @param { AsyncCallback<Array<Group>> } callback - Returns the contact group list object.
879   * @syscap SystemCapability.Applications.ContactsData
880   * @since 7
881   * @deprecated since 10
882   * @useinstead contact.queryGroups#queryGroups
883   */
884  function queryGroups(holder: Holder, callback: AsyncCallback<Array<Group>>): void;
885
886  /**
887   * Queries contact groups by contact holder.
888   *
889   * @permission ohos.permission.READ_CONTACTS
890   * @param { Context } context - Indicates the context of application or capability.
891   * @param { Holder } holder - Indicates the contact holder.
892   * If this parameter is null, the default holder is used for matching.
893   * @param { AsyncCallback<Array<Group>> } callback - Returns the contact group 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 queryGroups(context: Context, holder: Holder, callback: AsyncCallback<Array<Group>>): void;
900
901  /**
902   * Queries contact groups by contact holder.
903   *
904   * @permission ohos.permission.READ_CONTACTS
905   * @param { Holder } holder - Indicates the contact holder.
906   * If this parameter is null, the default holder is used for matching.
907   * @returns { Promise<Array<Group>> } Returns the contact group list object.
908   * @syscap SystemCapability.Applications.ContactsData
909   * @since 7
910   * @deprecated since 10
911   * @useinstead contact.queryGroups#queryGroups
912   */
913  function queryGroups(holder?: Holder): Promise<Array<Group>>;
914
915  /**
916   * Queries contact groups by contact holder.
917   *
918   * @permission ohos.permission.READ_CONTACTS
919   * @param { Context } context - Indicates the context of application or capability.
920   * @param { Holder } holder - Indicates the contact holder.
921   * If this parameter is null, the default holder is used for matching.
922   * @returns { Promise<Array<Group>> } Returns the contact group list object.
923   * @throws { BusinessError } 201 - Permission denied.
924   * @throws { BusinessError } 401 - Parameter error.
925   * @syscap SystemCapability.Applications.ContactsData
926   * @since 10
927   */
928  function queryGroups(context: Context, holder?: Holder): Promise<Array<Group>>;
929
930  /**
931   * Queries contact holders.
932   *
933   * @permission ohos.permission.READ_CONTACTS
934   * @param { AsyncCallback<Array<Holder>> } callback - Returns the {@code Holder} list object.
935   * @syscap SystemCapability.Applications.ContactsData
936   * @since 7
937   * @deprecated since 10
938   * @useinstead contact.queryHolders#queryHolders
939   */
940  function queryHolders(callback: AsyncCallback<Array<Holder>>): void;
941
942  /**
943   * Queries contact holders.
944   *
945   * @permission ohos.permission.READ_CONTACTS
946   * @param { Context } context - Indicates the context of application or capability.
947   * @param { AsyncCallback<Array<Holder>> } callback - Returns the {@code Holder} 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 queryHolders(context: Context, callback: AsyncCallback<Array<Holder>>): void;
954
955  /**
956   * Queries contact holders.
957   *
958   * @permission ohos.permission.READ_CONTACTS
959   * @returns { Promise<Array<Holder>> } Returns the {@code Holder} list object.
960   * @syscap SystemCapability.Applications.ContactsData
961   * @since 7
962   * @deprecated since 10
963   * @useinstead contact.queryHolders#queryHolders
964   */
965  function queryHolders(): Promise<Array<Holder>>;
966
967  /**
968   * Queries contact holders.
969   *
970   * @permission ohos.permission.READ_CONTACTS
971   * @param { Context } context - Indicates the context of application or capability.
972   * @returns { Promise<Array<Holder>> } Returns the {@code Holder} list object.
973   * @throws { BusinessError } 201 - Permission denied.
974   * @throws { BusinessError } 401 - Parameter error.
975   * @syscap SystemCapability.Applications.ContactsData
976   * @since 10
977   */
978  function queryHolders(context: Context): Promise<Array<Holder>>;
979
980  /**
981   * Obtains the query key of a contact based on a specified ID.
982   *
983   * @permission ohos.permission.READ_CONTACTS
984   * @param { number } id - Indicates the contact ID.
985   * @param { AsyncCallback<string> } callback - Returns the query key of the contact.
986   * @syscap SystemCapability.Applications.ContactsData
987   * @since 7
988   * @deprecated since 10
989   * @useinstead contact.queryKey#queryKey
990   */
991  function queryKey(id: number, callback: AsyncCallback<string>): void;
992
993  /**
994   * Obtains the query key of a contact based on a specified ID.
995   *
996   * @permission ohos.permission.READ_CONTACTS
997   * @param { Context } context - Indicates the context of application or capability.
998   * @param { number } id - Indicates the contact ID.
999   * @param { AsyncCallback<string> } callback - Returns the query key of the contact.
1000   * @throws { BusinessError } 201 - Permission denied.
1001   * @throws { BusinessError } 401 - Parameter error.
1002   * @syscap SystemCapability.Applications.ContactsData
1003   * @since 10
1004   */
1005  function queryKey(context: Context, id: number, callback: AsyncCallback<string>): void;
1006
1007  /**
1008   * Obtains the query key of a contact based on a specified ID and holder.
1009   *
1010   * @permission ohos.permission.READ_CONTACTS
1011   * @param { number } id - Indicates the contact ID.
1012   * @param { Holder } holder - Indicates the contact holder.
1013   * If this parameter is null, the default holder is used for matching.
1014   * @param { AsyncCallback<string> } callback - Returns the query key of the contact.
1015   * @syscap SystemCapability.Applications.ContactsData
1016   * @since 7
1017   * @deprecated since 10
1018   * @useinstead contact.queryKey#queryKey
1019   */
1020  function queryKey(id: number, holder: Holder, callback: AsyncCallback<string>): void;
1021
1022  /**
1023   * Obtains the query key of a contact based on a specified ID and holder.
1024   *
1025   * @permission ohos.permission.READ_CONTACTS
1026   * @param { Context } context - Indicates the context of application or capability.
1027   * @param { number } id - Indicates the contact ID.
1028   * @param { Holder } holder - Indicates the contact holder.
1029   * If this parameter is null, the default holder is used for matching.
1030   * @param { AsyncCallback<string> } callback - Returns the query key of the contact.
1031   * @throws { BusinessError } 201 - Permission denied.
1032   * @throws { BusinessError } 401 - Parameter error.
1033   * @syscap SystemCapability.Applications.ContactsData
1034   * @since 10
1035   */
1036  function queryKey(context: Context, id: number, holder: Holder, callback: AsyncCallback<string>): void;
1037
1038  /**
1039   * Obtains the query key of a contact based on a specified ID and holder.
1040   *
1041   * @permission ohos.permission.READ_CONTACTS
1042   * @param { number } id - Indicates the contact ID.
1043   * @param { Holder } holder - Indicates the contact holder.
1044   * If this parameter is null, the default holder is used for matching.
1045   * @returns { Promise<string> } Returns the query key of the contact.
1046   * @syscap SystemCapability.Applications.ContactsData
1047   * @since 7
1048   * @deprecated since 10
1049   * @useinstead contact.queryKey#queryKey
1050   */
1051  function queryKey(id: number, holder?: Holder): Promise<string>;
1052
1053  /**
1054   * Obtains the query key of a contact based on a specified ID and holder.
1055   *
1056   * @permission ohos.permission.READ_CONTACTS
1057   * @param { Context } context - Indicates the context of application or capability.
1058   * @param { number } id - Indicates the contact ID.
1059   * @param { Holder } holder - Indicates the contact holder.
1060   * If this parameter is null, the default holder is used for matching.
1061   * @returns { Promise<string> } Returns the query key of the contact.
1062   * @throws { BusinessError } 201 - Permission denied.
1063   * @throws { BusinessError } 401 - Parameter error.
1064   * @syscap SystemCapability.Applications.ContactsData
1065   * @since 10
1066   */
1067  function queryKey(context: Context, id: number, holder?: Holder): Promise<string>;
1068
1069  /**
1070   * Queries information about "my card".
1071   *
1072   * @permission ohos.permission.READ_CONTACTS
1073   * @param { AsyncCallback<Contact> } callback - Returns information about "my card".
1074   * @syscap SystemCapability.Applications.ContactsData
1075   * @since 7
1076   * @deprecated since 10
1077   * @useinstead contact.queryMyCard#queryMyCard
1078   */
1079  function queryMyCard(callback: AsyncCallback<Contact>): void;
1080
1081  /**
1082   * Queries information about "my card".
1083   *
1084   * @permission ohos.permission.READ_CONTACTS
1085   * @param { Context } context - Indicates the context of application or capability.
1086   * @param { AsyncCallback<Contact> } callback - Returns information about "my card".
1087   * @throws { BusinessError } 201 - Permission denied.
1088   * @throws { BusinessError } 401 - Parameter error.
1089   * @syscap SystemCapability.Applications.ContactsData
1090   * @since 10
1091   */
1092  function queryMyCard(context: Context, callback: AsyncCallback<Contact>): void;
1093
1094  /**
1095   * Queries information about "my card".
1096   *
1097   * @permission ohos.permission.READ_CONTACTS
1098   * @param { ContactAttributes } attrs - Indicates the contact attribute.
1099   * If this parameter is null, all attributes are used for matching.
1100   * @param { AsyncCallback<Contact> } callback - Returns information about "my card".
1101   * @syscap SystemCapability.Applications.ContactsData
1102   * @since 7
1103   * @deprecated since 10
1104   * @useinstead contact.queryMyCard#queryMyCard
1105   */
1106  function queryMyCard(attrs: ContactAttributes, callback: AsyncCallback<Contact>): void;
1107
1108  /**
1109   * Queries information about "my card".
1110   *
1111   * @permission ohos.permission.READ_CONTACTS
1112   * @param { Context } context - Indicates the context of application or capability.
1113   * @param { ContactAttributes } attrs - Indicates the contact attribute.
1114   * If this parameter is null, all attributes are used for matching.
1115   * @param { AsyncCallback<Contact> } callback - Returns information about "my card".
1116   * @throws { BusinessError } 201 - Permission denied.
1117   * @throws { BusinessError } 401 - Parameter error.
1118   * @syscap SystemCapability.Applications.ContactsData
1119   * @since 10
1120   */
1121  function queryMyCard(context: Context, attrs: ContactAttributes, callback: AsyncCallback<Contact>): void;
1122
1123  /**
1124   * Queries information about "my card".
1125   *
1126   * @permission ohos.permission.READ_CONTACTS
1127   * @param { ContactAttributes } attrs - Indicates the contact attribute.
1128   * If this parameter is null, all attributes are used for matching.
1129   * @returns { Promise<Contact> } Returns information about "my card".
1130   * @syscap SystemCapability.Applications.ContactsData
1131   * @since 7
1132   * @deprecated since 10
1133   * @useinstead contact.queryMyCard#queryMyCard
1134   */
1135  function queryMyCard(attrs?: ContactAttributes): Promise<Contact>;
1136
1137  /**
1138   * Queries information about "my card".
1139   *
1140   * @permission ohos.permission.READ_CONTACTS
1141   * @param { Context } context - Indicates the context of application or capability.
1142   * @param { ContactAttributes } attrs - Indicates the contact attribute.
1143   * If this parameter is null, all attributes are used for matching.
1144   * @returns { Promise<Contact> } Returns information about "my card".
1145   * @throws { BusinessError } 201 - Permission denied.
1146   * @throws { BusinessError } 401 - Parameter error.
1147   * @syscap SystemCapability.Applications.ContactsData
1148   * @since 10
1149   */
1150  function queryMyCard(context: Context, attrs?: ContactAttributes): Promise<Contact>;
1151
1152  /**
1153   * Updates specified attributes of a contact.
1154   *
1155   * @permission ohos.permission.WRITE_CONTACTS
1156   * @param { Contact } contact - Indicates the contact whose information is to update.
1157   * @param { AsyncCallback<void> } callback - The callback of updateContact.
1158   * Returns true if the update is successful; returns false otherwise.
1159   * @syscap SystemCapability.Applications.ContactsData
1160   * @since 7
1161   * @deprecated since 10
1162   * @useinstead contact.updateContact#updateContact
1163   */
1164  function updateContact(contact: Contact, callback: AsyncCallback<void>): void;
1165
1166  /**
1167   * Updates specified attributes of a contact.
1168   *
1169   * @permission ohos.permission.WRITE_CONTACTS
1170   * @param { Context } context - Indicates the context of application or capability.
1171   * @param { Contact } contact - Indicates the contact whose information is to update.
1172   * @param { AsyncCallback<void> } callback - The callback of updateContact.
1173   * Returns true if the update is successful; returns false otherwise.
1174   * @throws { BusinessError } 201 - Permission denied.
1175   * @throws { BusinessError } 401 - Parameter error.
1176   * @syscap SystemCapability.Applications.ContactsData
1177   * @since 10
1178   */
1179  function updateContact(context: Context, contact: Contact, callback: AsyncCallback<void>): void;
1180
1181  /**
1182   * Updates specified attributes of a contact.
1183   *
1184   * @permission ohos.permission.WRITE_CONTACTS
1185   * @param { Contact } contact - Indicates the contact whose information is to update.
1186   * @param { ContactAttributes } attrs - Indicates the contact attribute.
1187   * If this parameter is null, all attributes are used for matching.
1188   * @param { AsyncCallback<void> } callback - The callback of updateContact.
1189   * Returns true if the update is successful; returns false otherwise.
1190   * @syscap SystemCapability.Applications.ContactsData
1191   * @since 7
1192   * @deprecated since 10
1193   * @useinstead contact.updateContact#updateContact
1194   */
1195  function updateContact(contact: Contact, attrs: ContactAttributes, callback: AsyncCallback<void>): void;
1196
1197  /**
1198   * Updates specified attributes of a contact.
1199   *
1200   * @permission ohos.permission.WRITE_CONTACTS
1201   * @param { Context } context - Indicates the context of application or capability.
1202   * @param { Contact } contact - Indicates the contact whose information is to update.
1203   * @param { ContactAttributes } attrs - Indicates the contact attribute.
1204   * If this parameter is null, all attributes are used for matching.
1205   * @param { AsyncCallback<void> } callback - The callback of updateContact.
1206   * Returns true if the update is successful; returns false otherwise.
1207   * @throws { BusinessError } 201 - Permission denied.
1208   * @throws { BusinessError } 401 - Parameter error.
1209   * @syscap SystemCapability.Applications.ContactsData
1210   * @since 10
1211   */
1212  function updateContact(context: Context, contact: Contact, attrs: ContactAttributes, callback: AsyncCallback<void>): void;
1213
1214  /**
1215   * Updates specified attributes of a contact.
1216   *
1217   * @permission ohos.permission.WRITE_CONTACTS
1218   * @param { Contact } contact - Indicates the contact whose information is to update.
1219   * @param { ContactAttributes } attrs - Indicates the contact attribute.
1220   * If this parameter is null, all attributes are used for matching.
1221   * @returns { Promise<void> } Returns {@code true} if the update is successful; returns {@code false} otherwise.
1222   * @syscap SystemCapability.Applications.ContactsData
1223   * @since 7
1224   * @deprecated since 10
1225   * @useinstead contact.updateContact#updateContact
1226   */
1227  function updateContact(contact: Contact, attrs?: ContactAttributes): Promise<void>;
1228
1229  /**
1230   * Updates specified attributes of a contact.
1231   *
1232   * @permission ohos.permission.WRITE_CONTACTS
1233   * @param { Context } context - Indicates the context of application or capability.
1234   * @param { Contact } contact - Indicates the contact whose information is to update.
1235   * @param { ContactAttributes } attrs - Indicates the contact attribute.
1236   * If this parameter is null, all attributes are used for matching.
1237   * @returns { Promise<void> } Returns {@code true} if the update is successful; returns {@code false} otherwise.
1238   * @throws { BusinessError } 201 - Permission denied.
1239   * @throws { BusinessError } 401 - Parameter error.
1240   * @syscap SystemCapability.Applications.ContactsData
1241   * @since 10
1242   */
1243  function updateContact(context: Context, contact: Contact, attrs?: ContactAttributes): Promise<void>;
1244
1245  /**
1246   * Checks whether the contact ID is in the local phone book.
1247   *
1248   * @permission ohos.permission.READ_CONTACTS
1249   * @param { number } id - Indicates the contact ID.
1250   * @param { AsyncCallback<boolean> } callback - The callback of isLocalContact.
1251   * Returns {@code true} if the contact ID is in the local phone book; returns {@code false} otherwise.
1252   * @syscap SystemCapability.Applications.ContactsData
1253   * @since 7
1254   * @deprecated since 10
1255   * @useinstead contact.isLocalContact#isLocalContact
1256   */
1257  function isLocalContact(id: number, callback: AsyncCallback<boolean>): void;
1258
1259  /**
1260   * Checks whether the contact ID is in the local phone book.
1261   *
1262   * @permission ohos.permission.READ_CONTACTS
1263   * @param { Context } context - Indicates the context of application or capability.
1264   * @param { number } id - Indicates the contact ID.
1265   * @param { AsyncCallback<boolean> } callback - The callback of isLocalContact.
1266   * Returns {@code true} if the contact ID is in the local phone book; returns {@code false} otherwise.
1267   * @throws { BusinessError } 201 - Permission denied.
1268   * @throws { BusinessError } 401 - Parameter error.
1269   * @syscap SystemCapability.Applications.ContactsData
1270   * @since 10
1271   */
1272  function isLocalContact(context: Context, id: number, callback: AsyncCallback<boolean>): void;
1273
1274  /**
1275   * Checks whether the contact ID is in the local phone book.
1276   *
1277   * @permission ohos.permission.READ_CONTACTS
1278   * @param { number } id - Indicates the contact ID.
1279   * @returns { Promise<boolean> } Returns {@code true} if the contact ID is in the local phone book,
1280   * returns {@code false} otherwise.
1281   * @syscap SystemCapability.Applications.ContactsData
1282   * @since 7
1283   * @deprecated since 10
1284   * @useinstead contact.isLocalContact#isLocalContact
1285   */
1286  function isLocalContact(id: number): Promise<boolean>;
1287
1288  /**
1289   * Checks whether the contact ID is in the local phone book.
1290   *
1291   * @permission ohos.permission.READ_CONTACTS
1292   * @param { Context } context - Indicates the context of application or capability.
1293   * @param { number } id - Indicates the contact ID.
1294   * @returns { Promise<boolean> } Returns {@code true} if the contact ID is in the local phone book,
1295   * returns {@code false} otherwise.
1296   * @throws { BusinessError } 201 - Permission denied.
1297   * @throws { BusinessError } 401 - Parameter error.
1298   * @syscap SystemCapability.Applications.ContactsData
1299   * @since 10
1300   */
1301  function isLocalContact(context: Context, id: number): Promise<boolean>;
1302
1303  /**
1304   * Checks whether the contact ID is of "my card".
1305   *
1306   * @permission ohos.permission.READ_CONTACTS
1307   * @param { number } id - Indicates the contact ID.
1308   * @param { AsyncCallback<boolean> } callback - The callback of isMyCard.
1309   * Returns {@code true} if the contact ID is of "my card"; returns {@code false} otherwise.
1310   * @syscap SystemCapability.Applications.ContactsData
1311   * @since 7
1312   * @deprecated since 10
1313   * @useinstead contact.deleteContact#deleteContact
1314   */
1315  function isMyCard(id: number, callback: AsyncCallback<boolean>): void;
1316
1317  /**
1318   * Checks whether the contact ID is of "my card".
1319   *
1320   * @permission ohos.permission.READ_CONTACTS
1321   * @param { Context } context - Indicates the context of application or capability.
1322   * @param { number } id - Indicates the contact ID.
1323   * @param { AsyncCallback<boolean> } callback - The callback of isMyCard.
1324   * Returns {@code true} if the contact ID is of "my card"; returns {@code false} otherwise.
1325   * @throws { BusinessError } 201 - Permission denied.
1326   * @throws { BusinessError } 401 - Parameter error.
1327   * @syscap SystemCapability.Applications.ContactsData
1328   * @since 10
1329   */
1330  function isMyCard(context: Context, id: number, callback: AsyncCallback<boolean>): void;
1331
1332  /**
1333   * Checks whether the contact ID is of "my card".
1334   *
1335   * @permission ohos.permission.READ_CONTACTS
1336   * @param { number } id - Indicates the contact ID.
1337   * @returns { Promise<boolean> } Returns true if the contact ID is of "my card", returns false otherwise.
1338   * @syscap SystemCapability.Applications.ContactsData
1339   * @since 7
1340   * @deprecated since 10
1341   * @useinstead contact.isMyCard#isMyCard
1342   */
1343  function isMyCard(id: number): Promise<boolean>;
1344
1345  /**
1346   * Checks whether the contact ID is of "my card".
1347   *
1348   * @permission ohos.permission.READ_CONTACTS
1349   * @param { Context } context - Indicates the context of application or capability.
1350   * @param { number } id - Indicates the contact ID.
1351   * @returns { Promise<boolean> } Returns true if the contact ID is of "my card", returns false otherwise.
1352   * @throws { BusinessError } 201 - Permission denied.
1353   * @throws { BusinessError } 401 - Parameter error.
1354   * @syscap SystemCapability.Applications.ContactsData
1355   * @since 10
1356   */
1357  function isMyCard(context: Context, id: number): Promise<boolean>;
1358
1359  /**
1360   * ContactSelectionOptions Object
1361   *
1362   * @interface ContactSelectionOptions
1363   * @syscap SystemCapability.Applications.Contacts
1364   * @since 10
1365   */
1366  interface ContactSelectionOptions {
1367    /**
1368     * Indicates the Single-select or multiple-select.
1369     *
1370     * @type { ?boolean }
1371     * @syscap SystemCapability.Applications.Contacts
1372     * @since 10
1373     */
1374    isMultiSelect?: boolean;
1375  }
1376
1377  /**
1378   * Provides methods for contact information
1379   *
1380   * @syscap SystemCapability.Applications.ContactsData
1381   * @since 7
1382   */
1383  class Contact {
1384    /**
1385     * Indicates the contact ID.
1386     *
1387     * @readonly
1388     * @static
1389     * @syscap SystemCapability.Applications.ContactsData
1390     * @since 7
1391     */
1392    static readonly INVALID_CONTACT_ID: -1
1393
1394    /**
1395     * Indicates the contact ID.
1396     *
1397     * @type { ?number }
1398     * @readonly
1399     * @syscap SystemCapability.Applications.ContactsData
1400     * @since 7
1401     */
1402    readonly id?: number
1403
1404    /**
1405     * Indicates the query key that identifies the contact.
1406     *
1407     * @type { ?string }
1408     * @readonly
1409     * @syscap SystemCapability.Applications.ContactsData
1410     * @since 7
1411     */
1412    readonly key?: string
1413
1414    /**
1415     * Indicates the contact attributes.
1416     *
1417     * @type { ?ContactAttributes }
1418     * @syscap SystemCapability.Applications.ContactsData
1419     * @since 7
1420     */
1421    contactAttributes?: ContactAttributes
1422
1423    /**
1424     * Indicates an email address of the contact.
1425     *
1426     * @type { ?Email[] }
1427     * @syscap SystemCapability.Applications.ContactsData
1428     * @since 7
1429     */
1430    emails?: Email[]
1431
1432    /**
1433     * Indicates an event (special date) of the contact.
1434     *
1435     * @type { ?Event[] }
1436     * @syscap SystemCapability.Applications.ContactsData
1437     * @since 7
1438     */
1439    events?: Event[]
1440
1441    /**
1442     * Indicates a group of the contact.
1443     *
1444     * @type { ?Group[] }
1445     * @syscap SystemCapability.Applications.ContactsData
1446     * @since 7
1447     */
1448    groups?: Group[]
1449
1450    /**
1451     * Indicates an IM address of the contact.
1452     *
1453     * @type { ?ImAddress[] }
1454     * @syscap SystemCapability.Applications.ContactsData
1455     * @since 7
1456     */
1457    imAddresses?: ImAddress[]
1458
1459    /**
1460     * Indicates a phone number of the contact.
1461     *
1462     * @type { ?PhoneNumber[] }
1463     * @syscap SystemCapability.Applications.ContactsData
1464     * @since 7
1465     */
1466    phoneNumbers?: PhoneNumber[]
1467
1468    /**
1469     * Indicates the contact portrait.
1470     *
1471     * @type { ?Portrait }
1472     * @syscap SystemCapability.Applications.ContactsData
1473     * @since 7
1474     */
1475    portrait?: Portrait
1476
1477    /**
1478     * Indicates a postal address of the contact.
1479     *
1480     * @type { ?PostalAddress[] }
1481     * @syscap SystemCapability.Applications.ContactsData
1482     * @since 7
1483     */
1484    postalAddresses?: PostalAddress[]
1485
1486    /**
1487     * Indicates a relation of the contact.
1488     *
1489     * @type { ?Relation[] }
1490     * @syscap SystemCapability.Applications.ContactsData
1491     * @since 7
1492     */
1493    relations?: Relation[]
1494
1495    /**
1496     * Indicates a Session Initiation Protocol (SIP) address of the contact.
1497     *
1498     * @type { ?SipAddress[] }
1499     * @syscap SystemCapability.Applications.ContactsData
1500     * @since 7
1501     */
1502    sipAddresses?: SipAddress[]
1503
1504    /**
1505     * Indicates a website of the contact.
1506     *
1507     * @type { ?Website[] }
1508     * @syscap SystemCapability.Applications.ContactsData
1509     * @since 7
1510     */
1511    websites?: Website[]
1512
1513    /**
1514     * Indicates the contact name.
1515     *
1516     * @type { ?Name }
1517     * @syscap SystemCapability.Applications.ContactsData
1518     * @since 7
1519     */
1520    name?: Name
1521
1522    /**
1523     * Indicates the contact nickname.
1524     *
1525     * @type { ?NickName }
1526     * @syscap SystemCapability.Applications.ContactsData
1527     * @since 7
1528     */
1529    nickName?: NickName
1530
1531    /**
1532     * Indicates the contact note.
1533     *
1534     * @type { ?Note }
1535     * @syscap SystemCapability.Applications.ContactsData
1536     * @since 7
1537     */
1538    note?: Note
1539
1540    /**
1541     * Indicates organization information about the contact.
1542     *
1543     * @type { ?Organization }
1544     * @syscap SystemCapability.Applications.ContactsData
1545     * @since 7
1546     */
1547    organization?: Organization
1548  }
1549
1550  /**
1551   * Provides methods for contact attributes information
1552   *
1553   * @syscap SystemCapability.Applications.ContactsData
1554   * @since 7
1555   */
1556  class ContactAttributes {
1557    /**
1558     * Indicates the contact attributes.
1559     *
1560     * @type { Attribute[] }
1561     * @syscap SystemCapability.Applications.ContactsData
1562     * @since 7
1563     */
1564    attributes: Attribute[]
1565  }
1566
1567  /**
1568   * Provides methods for attribute information
1569   *
1570   * @enum { number }
1571   * @syscap SystemCapability.Applications.ContactsData
1572   * @since 7
1573   */
1574  enum Attribute {
1575    /**
1576     * Indicates the contact event.
1577     *
1578     * @syscap SystemCapability.Applications.ContactsData
1579     * @since 7
1580     */
1581    ATTR_CONTACT_EVENT,
1582
1583    /**
1584     * Indicates the email address.
1585     *
1586     * @syscap SystemCapability.Applications.ContactsData
1587     * @since 7
1588     */
1589    ATTR_EMAIL,
1590
1591    /**
1592     * Indicates the contact group.
1593     *
1594     * @syscap SystemCapability.Applications.ContactsData
1595     * @since 7
1596     */
1597    ATTR_GROUP_MEMBERSHIP,
1598
1599    /**
1600     * Indicates the instant messaging (IM) address.
1601     *
1602     * @syscap SystemCapability.Applications.ContactsData
1603     * @since 7
1604     */
1605    ATTR_IM,
1606
1607    /**
1608     * Indicates the name.
1609     *
1610     * @syscap SystemCapability.Applications.ContactsData
1611     * @since 7
1612     */
1613    ATTR_NAME,
1614
1615    /**
1616     * Indicates the nickname.
1617     *
1618     * @syscap SystemCapability.Applications.ContactsData
1619     * @since 7
1620     */
1621    ATTR_NICKNAME,
1622
1623    /**
1624     * Indicates the note.
1625     *
1626     * @syscap SystemCapability.Applications.ContactsData
1627     * @since 7
1628     */
1629    ATTR_NOTE,
1630
1631    /**
1632     * Indicates the organization.
1633     *
1634     * @syscap SystemCapability.Applications.ContactsData
1635     * @since 7
1636     */
1637    ATTR_ORGANIZATION,
1638
1639    /**
1640     * Indicates the phone number.
1641     *
1642     * @syscap SystemCapability.Applications.ContactsData
1643     * @since 7
1644     */
1645    ATTR_PHONE,
1646
1647    /**
1648     * Indicates the portrait.
1649     *
1650     * @syscap SystemCapability.Applications.ContactsData
1651     * @since 7
1652     */
1653    ATTR_PORTRAIT,
1654
1655    /**
1656     * Indicates the postal address.
1657     *
1658     * @syscap SystemCapability.Applications.ContactsData
1659     * @since 7
1660     */
1661    ATTR_POSTAL_ADDRESS,
1662
1663    /**
1664     * Indicates the relation.
1665     *
1666     * @syscap SystemCapability.Applications.ContactsData
1667     * @since 7
1668     */
1669    ATTR_RELATION,
1670
1671    /**
1672     * Indicates the Session Initiation Protocol (SIP) address.
1673     *
1674     * @syscap SystemCapability.Applications.ContactsData
1675     * @since 7
1676     */
1677    ATTR_SIP_ADDRESS,
1678
1679    /**
1680     * Indicates the website.
1681     *
1682     * @syscap SystemCapability.Applications.ContactsData
1683     * @since 7
1684     */
1685    ATTR_WEBSITE
1686  }
1687
1688  /**
1689   * Provides methods for email information
1690   *
1691   * @syscap SystemCapability.Applications.ContactsData
1692   * @since 7
1693   */
1694  class Email {
1695    /**
1696     * Indicates a custom label.
1697     *
1698     * @readonly
1699     * @static
1700     * @syscap SystemCapability.Applications.ContactsData
1701     * @since 7
1702     */
1703    static readonly CUSTOM_LABEL: 0
1704
1705    /**
1706     * Indicates a home email.
1707     *
1708     * @readonly
1709     * @static
1710     * @syscap SystemCapability.Applications.ContactsData
1711     * @since 7
1712     */
1713    static readonly EMAIL_HOME: 1
1714
1715    /**
1716     * Indicates a work email.
1717     *
1718     * @readonly
1719     * @static
1720     * @syscap SystemCapability.Applications.ContactsData
1721     * @since 7
1722     */
1723    static readonly EMAIL_WORK: 2
1724
1725    /**
1726     * Indicates an email of the OTHER type.
1727     *
1728     * @readonly
1729     * @static
1730     * @syscap SystemCapability.Applications.ContactsData
1731     * @since 7
1732     */
1733    static readonly EMAIL_OTHER: 3
1734
1735    /**
1736     * Indicates an invalid label ID.
1737     *
1738     * @readonly
1739     * @static
1740     * @syscap SystemCapability.Applications.ContactsData
1741     * @since 7
1742     */
1743    static readonly INVALID_LABEL_ID: -1
1744
1745    /**
1746     * Indicates the email address.
1747     *
1748     * @type { string }
1749     * @syscap SystemCapability.Applications.ContactsData
1750     * @since 7
1751     */
1752    email: string
1753
1754    /**
1755     * Indicates the label name of an attribute.
1756     *
1757     * @type { ?string }
1758     * @syscap SystemCapability.Applications.ContactsData
1759     * @since 7
1760     */
1761    labelName?: string
1762
1763    /**
1764     * Indicates the displayed email name.
1765     *
1766     * @type { ?string }
1767     * @syscap SystemCapability.Applications.ContactsData
1768     * @since 7
1769     */
1770    displayName?: string
1771
1772    /**
1773     * Indicates the label id.
1774     *
1775     * @type { ?number }
1776     * @syscap SystemCapability.Applications.ContactsData
1777     * @since 7
1778     */
1779    labelId?: number
1780  }
1781
1782  /**
1783   * Provides methods for event information
1784   *
1785   * @syscap SystemCapability.Applications.ContactsData
1786   * @since 7
1787   */
1788  class Event {
1789    /**
1790     * Indicates a custom label.
1791     *
1792     * @readonly
1793     * @static
1794     * @syscap SystemCapability.Applications.ContactsData
1795     * @since 7
1796     */
1797    static readonly CUSTOM_LABEL: 0
1798
1799    /**
1800     * Indicates an anniversary event.
1801     *
1802     * @readonly
1803     * @static
1804     * @syscap SystemCapability.Applications.ContactsData
1805     * @since 7
1806     */
1807    static readonly EVENT_ANNIVERSARY: 1
1808
1809    /**
1810     * Indicates an event of the OTHER type.
1811     *
1812     * @readonly
1813     * @static
1814     * @syscap SystemCapability.Applications.ContactsData
1815     * @since 7
1816     */
1817    static readonly EVENT_OTHER: 2
1818
1819    /**
1820     * Indicates an birthday event.
1821     *
1822     * @readonly
1823     * @static
1824     * @syscap SystemCapability.Applications.ContactsData
1825     * @since 7
1826     */
1827    static readonly EVENT_BIRTHDAY: 3
1828
1829    /**
1830     * Indicates an invalid label ID.
1831     *
1832     * @readonly
1833     * @static
1834     * @syscap SystemCapability.Applications.ContactsData
1835     * @since 7
1836     */
1837    static readonly INVALID_LABEL_ID: -1
1838
1839    /**
1840     * Indicates the event date.
1841     *
1842     * @type { string }
1843     * @syscap SystemCapability.Applications.ContactsData
1844     * @since 7
1845     */
1846    eventDate: string
1847
1848    /**
1849     * Indicates the label name of an attribute.
1850     *
1851     * @type { ?string }
1852     * @syscap SystemCapability.Applications.ContactsData
1853     * @since 7
1854     */
1855    labelName?: string
1856
1857    /**
1858     * Indicates the label id.
1859     *
1860     * @type { ?number }
1861     * @syscap SystemCapability.Applications.ContactsData
1862     * @since 7
1863     */
1864    labelId?: number
1865  }
1866
1867  /**
1868   * Provides methods for group information
1869   *
1870   * @syscap SystemCapability.Applications.ContactsData
1871   * @since 7
1872   */
1873  class Group {
1874    /**
1875     * Indicates the contact group ID.
1876     *
1877     * @type { ?number }
1878     * @syscap SystemCapability.Applications.ContactsData
1879     * @since 7
1880     */
1881    groupId?: number
1882
1883    /**
1884     * Indicates the contact group title.
1885     *
1886     * @type { string }
1887     * @syscap SystemCapability.Applications.ContactsData
1888     * @since 7
1889     */
1890    title: string
1891  }
1892
1893  /**
1894   * Provides methods for holder information
1895   *
1896   * @syscap SystemCapability.Applications.ContactsData
1897   * @since 7
1898   */
1899  class Holder {
1900    /**
1901     * Indicates the bundle name of a contact holder.
1902     *
1903     * @type { string }
1904     * @readonly
1905     * @syscap SystemCapability.Applications.ContactsData
1906     * @since 7
1907     */
1908    readonly bundleName: string
1909
1910    /**
1911     * Indicates the displayed name of a contact holder.
1912     *
1913     * @type { ?string }
1914     * @readonly
1915     * @syscap SystemCapability.Applications.ContactsData
1916     * @since 7
1917     */
1918    readonly displayName?: string
1919
1920    /**
1921     * Indicates the holder ID.
1922     *
1923     * @type { ?number }
1924     * @syscap SystemCapability.Applications.ContactsData
1925     * @since 7
1926     */
1927    holderId?: number
1928  }
1929
1930  /**
1931   * Provides methods for ImAddress information
1932   *
1933   * @syscap SystemCapability.Applications.ContactsData
1934   * @since 7
1935   */
1936  class ImAddress {
1937    /**
1938     * Indicates a custom label.
1939     *
1940     * @readonly
1941     * @static
1942     * @syscap SystemCapability.Applications.ContactsData
1943     * @since 7
1944     */
1945    static readonly CUSTOM_LABEL: -1
1946
1947    /**
1948     * Indicates an AIM instant message.
1949     *
1950     * @readonly
1951     * @static
1952     * @syscap SystemCapability.Applications.ContactsData
1953     * @since 7
1954     */
1955    static readonly IM_AIM: 0
1956
1957    /**
1958     * Indicates a Windows Live instant message.
1959     *
1960     * @readonly
1961     * @static
1962     * @syscap SystemCapability.Applications.ContactsData
1963     * @since 7
1964     */
1965    static readonly IM_MSN: 1
1966
1967    /**
1968     * Indicates a Yahoo instant message.
1969     *
1970     * @readonly
1971     * @static
1972     * @syscap SystemCapability.Applications.ContactsData
1973     * @since 7
1974     */
1975    static readonly IM_YAHOO: 2
1976
1977    /**
1978     * Indicates a Skype instant message.
1979     *
1980     * @readonly
1981     * @static
1982     * @syscap SystemCapability.Applications.ContactsData
1983     * @since 7
1984     */
1985    static readonly IM_SKYPE: 3
1986
1987    /**
1988     * Indicates a QQ instant message.
1989     *
1990     * @readonly
1991     * @static
1992     * @syscap SystemCapability.Applications.ContactsData
1993     * @since 7
1994     */
1995    static readonly IM_QQ: 4
1996
1997    /**
1998     * Indicates an ICQ instant message.
1999     *
2000     * @readonly
2001     * @static
2002     * @syscap SystemCapability.Applications.ContactsData
2003     * @since 7
2004     */
2005    static readonly IM_ICQ: 6
2006
2007    /**
2008     * Indicates a Jabber instant message.
2009     *
2010     * @readonly
2011     * @static
2012     * @syscap SystemCapability.Applications.ContactsData
2013     * @since 7
2014     */
2015    static readonly IM_JABBER: 7
2016
2017    /**
2018     * Indicates an invalid label ID.
2019     *
2020     * @readonly
2021     * @static
2022     * @syscap SystemCapability.Applications.ContactsData
2023     * @since 7
2024     */
2025    static readonly INVALID_LABEL_ID: -2
2026
2027    /**
2028     * Indicates the IM address.
2029     *
2030     * @type { string }
2031     * @syscap SystemCapability.Applications.ContactsData
2032     * @since 7
2033     */
2034    imAddress: string
2035
2036    /**
2037     * Indicates the label name of an attribute.
2038     *
2039     * @type { ?string }
2040     * @syscap SystemCapability.Applications.ContactsData
2041     * @since 7
2042     */
2043    labelName?: string
2044
2045    /**
2046     * Indicates the label id.
2047     *
2048     * @type { ?number }
2049     * @syscap SystemCapability.Applications.ContactsData
2050     * @since 7
2051     */
2052    labelId?: number
2053  }
2054
2055  /**
2056   * Provides methods for name information
2057   *
2058   * @syscap SystemCapability.Applications.ContactsData
2059   * @since 7
2060   */
2061  class Name {
2062    /**
2063     * Indicates the family name of the contact.
2064     *
2065     * @type { ?string }
2066     * @syscap SystemCapability.Applications.ContactsData
2067     * @since 7
2068     */
2069    familyName?: string
2070
2071    /**
2072     * Indicates the phonetic family name of the contact.
2073     *
2074     * @type { ?string }
2075     * @syscap SystemCapability.Applications.ContactsData
2076     * @since 7
2077     */
2078    familyNamePhonetic?: string
2079
2080    /**
2081     * Indicates the full name of the contact.
2082     *
2083     * @type { string }
2084     * @syscap SystemCapability.Applications.ContactsData
2085     * @since 7
2086     */
2087    fullName: string
2088
2089    /**
2090     * Indicates the given name of the contact.
2091     *
2092     * @type { ?string }
2093     * @syscap SystemCapability.Applications.ContactsData
2094     * @since 7
2095     */
2096    givenName?: string
2097
2098    /**
2099     * Indicates the phonetic given name of the contact.
2100     *
2101     * @type { ?string }
2102     * @syscap SystemCapability.Applications.ContactsData
2103     * @since 7
2104     */
2105    givenNamePhonetic?: string
2106
2107    /**
2108     * Indicates the middle name of the contact.
2109     *
2110     * @type { ?string }
2111     * @syscap SystemCapability.Applications.ContactsData
2112     * @since 7
2113     */
2114    middleName?: string
2115
2116    /**
2117     * Indicates the phonetic middle name of the contact.
2118     *
2119     * @type { ?string }
2120     * @syscap SystemCapability.Applications.ContactsData
2121     * @since 7
2122     */
2123    middleNamePhonetic?: string
2124
2125    /**
2126     * Indicates the prefix of the contact name.
2127     *
2128     * @type { ?string }
2129     * @syscap SystemCapability.Applications.ContactsData
2130     * @since 7
2131     */
2132    namePrefix?: string
2133
2134    /**
2135     * Indicates the suffix of this contact name.
2136     *
2137     * @type { ?string }
2138     * @syscap SystemCapability.Applications.ContactsData
2139     * @since 7
2140     */
2141    nameSuffix?: string
2142  }
2143
2144  /**
2145   * Provides methods for nick name information
2146   *
2147   * @syscap SystemCapability.Applications.ContactsData
2148   * @since 7
2149   */
2150  class NickName {
2151    /**
2152     * Indicates the nickname of the contact.
2153     *
2154     * @type { string }
2155     * @syscap SystemCapability.Applications.ContactsData
2156     * @since 7
2157     */
2158    nickName: string
2159  }
2160
2161  /**
2162   * Provides methods for note information
2163   *
2164   * @syscap SystemCapability.Applications.ContactsData
2165   * @since 7
2166   */
2167  class Note {
2168    /**
2169     * Indicates the note content.
2170     *
2171     * @type { string }
2172     * @syscap SystemCapability.Applications.ContactsData
2173     * @since 7
2174     */
2175    noteContent: string
2176  }
2177
2178  /**
2179   * Provides methods for organization information
2180   *
2181   * @syscap SystemCapability.Applications.ContactsData
2182   * @since 7
2183   */
2184  class Organization {
2185    /**
2186     * Indicates the name of the organization to which the contact belongs.
2187     *
2188     * @type { string }
2189     * @syscap SystemCapability.Applications.ContactsData
2190     * @since 7
2191     */
2192    name: string
2193
2194    /**
2195     * Indicates the title of the organization.
2196     *
2197     * @type { ?string }
2198     * @syscap SystemCapability.Applications.ContactsData
2199     * @since 7
2200     */
2201    title?: string
2202  }
2203
2204  /**
2205   * Provides methods for phone number information
2206   *
2207   * @syscap SystemCapability.Applications.ContactsData
2208   * @since 7
2209   */
2210  class PhoneNumber {
2211    /**
2212     * Indicates a custom label.
2213     *
2214     * @readonly
2215     * @static
2216     * @syscap SystemCapability.Applications.ContactsData
2217     * @since 7
2218     */
2219    static readonly CUSTOM_LABEL: 0
2220
2221    /**
2222     * Indicates a home number.
2223     *
2224     * @readonly
2225     * @static
2226     * @syscap SystemCapability.Applications.ContactsData
2227     * @since 7
2228     */
2229    static readonly NUM_HOME: 1
2230
2231    /**
2232     * Indicates a mobile phone number.
2233     *
2234     * @readonly
2235     * @static
2236     * @syscap SystemCapability.Applications.ContactsData
2237     * @since 7
2238     */
2239    static readonly NUM_MOBILE: 2
2240
2241    /**
2242     * Indicates a work number.
2243     *
2244     * @readonly
2245     * @static
2246     * @syscap SystemCapability.Applications.ContactsData
2247     * @since 7
2248     */
2249    static readonly NUM_WORK: 3
2250
2251    /**
2252     * Indicates a work fax number.
2253     *
2254     * @readonly
2255     * @static
2256     * @syscap SystemCapability.Applications.ContactsData
2257     * @since 7
2258     */
2259    static readonly NUM_FAX_WORK: 4
2260
2261    /**
2262     * Indicates a home fax number.
2263     *
2264     * @readonly
2265     * @static
2266     * @syscap SystemCapability.Applications.ContactsData
2267     * @since 7
2268     */
2269    static readonly NUM_FAX_HOME: 5
2270
2271    /**
2272     * Indicates a pager number.
2273     *
2274     * @readonly
2275     * @static
2276     * @syscap SystemCapability.Applications.ContactsData
2277     * @since 7
2278     */
2279    static readonly NUM_PAGER: 6
2280
2281    /**
2282     * Indicates a number of the OTHER type.
2283     *
2284     * @readonly
2285     * @static
2286     * @syscap SystemCapability.Applications.ContactsData
2287     * @since 7
2288     */
2289    static readonly NUM_OTHER: 7
2290
2291    /**
2292     * Indicates a callback number.
2293     *
2294     * @readonly
2295     * @static
2296     * @syscap SystemCapability.Applications.ContactsData
2297     * @since 7
2298     */
2299    static readonly NUM_CALLBACK: 8
2300
2301    /**
2302     * Indicates a car number.
2303     *
2304     * @readonly
2305     * @static
2306     * @syscap SystemCapability.Applications.ContactsData
2307     * @since 7
2308     */
2309    static readonly NUM_CAR: 9
2310
2311    /**
2312     * Indicates a company director number.
2313     *
2314     * @readonly
2315     * @static
2316     * @syscap SystemCapability.Applications.ContactsData
2317     * @since 7
2318     */
2319    static readonly NUM_COMPANY_MAIN: 10
2320
2321    /**
2322     * Indicates an Integrated Services Digital Network (ISDN) number.
2323     *
2324     * @readonly
2325     * @static
2326     * @syscap SystemCapability.Applications.ContactsData
2327     * @since 7
2328     */
2329    static readonly NUM_ISDN: 11
2330
2331    /**
2332     * Indicates a main number.
2333     *
2334     * @readonly
2335     * @static
2336     * @syscap SystemCapability.Applications.ContactsData
2337     * @since 7
2338     */
2339    static readonly NUM_MAIN: 12
2340
2341    /**
2342     * Indicates a number of the OTHER_FAX type.
2343     *
2344     * @readonly
2345     * @static
2346     * @syscap SystemCapability.Applications.ContactsData
2347     * @since 7
2348     */
2349    static readonly NUM_OTHER_FAX: 13
2350
2351    /**
2352     * Indicates a radio number.
2353     *
2354     * @readonly
2355     * @static
2356     * @syscap SystemCapability.Applications.ContactsData
2357     * @since 7
2358     */
2359    static readonly NUM_RADIO: 14
2360
2361    /**
2362     * Indicates a telex number.
2363     *
2364     * @readonly
2365     * @static
2366     * @syscap SystemCapability.Applications.ContactsData
2367     * @since 7
2368     */
2369    static readonly NUM_TELEX: 15
2370
2371    /**
2372     * Indicates a teletypewriter (TTY) or test-driven development (TDD) number.
2373     *
2374     * @readonly
2375     * @static
2376     * @syscap SystemCapability.Applications.ContactsData
2377     * @since 7
2378     */
2379    static readonly NUM_TTY_TDD: 16
2380
2381    /**
2382     * Indicates a work mobile phone number.
2383     *
2384     * @readonly
2385     * @static
2386     * @syscap SystemCapability.Applications.ContactsData
2387     * @since 7
2388     */
2389    static readonly NUM_WORK_MOBILE: 17
2390
2391    /**
2392     * Indicates a work pager number.
2393     *
2394     * @readonly
2395     * @static
2396     * @syscap SystemCapability.Applications.ContactsData
2397     * @since 7
2398     */
2399    static readonly NUM_WORK_PAGER: 18
2400
2401    /**
2402     * Indicates an assistant number.
2403     *
2404     * @readonly
2405     * @static
2406     * @syscap SystemCapability.Applications.ContactsData
2407     * @since 7
2408     */
2409    static readonly NUM_ASSISTANT: 19
2410
2411    /**
2412     * Indicates an MMS number.
2413     *
2414     * @readonly
2415     * @static
2416     * @syscap SystemCapability.Applications.ContactsData
2417     * @since 7
2418     */
2419    static readonly NUM_MMS: 20
2420
2421    /**
2422     * Indicates an invalid label ID.
2423     *
2424     * @readonly
2425     * @static
2426     * @syscap SystemCapability.Applications.ContactsData
2427     * @since 7
2428     */
2429    static readonly INVALID_LABEL_ID: -1
2430
2431    /**
2432     * Indicates the label name of an attribute.
2433     *
2434     * @type { ?string }
2435     * @syscap SystemCapability.Applications.ContactsData
2436     * @since 7
2437     */
2438    labelName?: string
2439
2440    /**
2441     * Indicates the phone number of the contact.
2442     *
2443     * @type { string }
2444     * @syscap SystemCapability.Applications.ContactsData
2445     * @since 7
2446     */
2447    phoneNumber: string
2448
2449    /**
2450     * Indicates the label id.
2451     *
2452     * @type { ?number }
2453     * @syscap SystemCapability.Applications.ContactsData
2454     * @since 7
2455     */
2456    labelId?: number
2457  }
2458
2459  /**
2460   * Provides methods for portrait information
2461   *
2462   * @syscap SystemCapability.Applications.ContactsData
2463   * @since 7
2464   */
2465  class Portrait {
2466    /**
2467     * Indicates the uri of the contact portrait.
2468     *
2469     * @type { string }
2470     * @syscap SystemCapability.Applications.ContactsData
2471     * @since 7
2472     */
2473    uri: string
2474  }
2475
2476  /**
2477   * Provides methods for postal address information
2478   *
2479   * @syscap SystemCapability.Applications.ContactsData
2480   * @since 7
2481   */
2482  class PostalAddress {
2483    /**
2484     * Indicates a custom label.
2485     *
2486     * @readonly
2487     * @static
2488     * @syscap SystemCapability.Applications.ContactsData
2489     * @since 7
2490     */
2491    static readonly CUSTOM_LABEL: 0
2492
2493    /**
2494     * Indicates a home address.
2495     *
2496     * @readonly
2497     * @static
2498     * @syscap SystemCapability.Applications.ContactsData
2499     * @since 7
2500     */
2501    static readonly ADDR_HOME: 1
2502
2503    /**
2504     * Indicates a work address.
2505     *
2506     * @readonly
2507     * @static
2508     * @syscap SystemCapability.Applications.ContactsData
2509     * @since 7
2510     */
2511    static readonly ADDR_WORK: 2
2512
2513    /**
2514     * Indicates an address of the OTHER type.
2515     *
2516     * @readonly
2517     * @static
2518     * @syscap SystemCapability.Applications.ContactsData
2519     * @since 7
2520     */
2521    static readonly ADDR_OTHER: 3
2522
2523    /**
2524     * Indicates an invalid label ID.
2525     *
2526     * @readonly
2527     * @static
2528     * @syscap SystemCapability.Applications.ContactsData
2529     * @since 7
2530     */
2531    static readonly INVALID_LABEL_ID: -1
2532
2533    /**
2534     * Indicates the city where this contact is located.
2535     *
2536     * @type { ?string }
2537     * @syscap SystemCapability.Applications.ContactsData
2538     * @since 7
2539     */
2540    city?: string
2541
2542    /**
2543     * Indicates the country/region where this contact is located.
2544     *
2545     * @type { ?string }
2546     * @syscap SystemCapability.Applications.ContactsData
2547     * @since 7
2548     */
2549    country?: string
2550
2551    /**
2552     * Indicates the label name of an attribute.
2553     *
2554     * @type { ?string }
2555     * @syscap SystemCapability.Applications.ContactsData
2556     * @since 7
2557     */
2558    labelName?: string
2559
2560    /**
2561     * Indicates the neighborhood where this contact is located.
2562     *
2563     * @type { ?string }
2564     * @syscap SystemCapability.Applications.ContactsData
2565     * @since 7
2566     */
2567    neighborhood?: string
2568
2569    /**
2570     * Indicates the post box of this contact.
2571     *
2572     * @type { ?string }
2573     * @syscap SystemCapability.Applications.ContactsData
2574     * @since 7
2575     */
2576    pobox?: string
2577
2578    /**
2579     * Indicates the postal address of this contact.
2580     *
2581     * @type { string }
2582     * @syscap SystemCapability.Applications.ContactsData
2583     * @since 7
2584     */
2585    postalAddress: string
2586
2587    /**
2588     * Indicates the postal code of this contact.
2589     *
2590     * @type { ?string }
2591     * @syscap SystemCapability.Applications.ContactsData
2592     * @since 7
2593     */
2594    postcode?: string
2595
2596    /**
2597     * Indicates the area where this contact is located.
2598     *
2599     * @type { ?string }
2600     * @syscap SystemCapability.Applications.ContactsData
2601     * @since 7
2602     */
2603    region?: string
2604
2605    /**
2606     * Indicates the street where this contact is located.
2607     *
2608     * @type { ?string }
2609     * @syscap SystemCapability.Applications.ContactsData
2610     * @since 7
2611     */
2612    street?: string
2613
2614    /**
2615     * Indicates the label id.
2616     *
2617     * @type { ?number }
2618     * @syscap SystemCapability.Applications.ContactsData
2619     * @since 7
2620     */
2621    labelId?: number
2622  }
2623
2624  /**
2625   * Provides methods for relation information
2626   *
2627   * @syscap SystemCapability.Applications.ContactsData
2628   * @since 7
2629   */
2630  class Relation {
2631    /**
2632     * Indicates a custom label.
2633     *
2634     * @readonly
2635     * @static
2636     * @syscap SystemCapability.Applications.ContactsData
2637     * @since 7
2638     */
2639    static readonly CUSTOM_LABEL: 0
2640
2641    /**
2642     * Indicates an assistant.
2643     *
2644     * @readonly
2645     * @static
2646     * @syscap SystemCapability.Applications.ContactsData
2647     * @since 7
2648     */
2649    static readonly RELATION_ASSISTANT: 1
2650
2651    /**
2652     * Indicates a brother.
2653     *
2654     * @readonly
2655     * @static
2656     * @syscap SystemCapability.Applications.ContactsData
2657     * @since 7
2658     */
2659    static readonly RELATION_BROTHER: 2
2660
2661    /**
2662     * Indicates a child.
2663     *
2664     * @readonly
2665     * @static
2666     * @syscap SystemCapability.Applications.ContactsData
2667     * @since 7
2668     */
2669    static readonly RELATION_CHILD: 3
2670
2671    /**
2672     * Indicates a domestic partner.
2673     *
2674     * @readonly
2675     * @static
2676     * @syscap SystemCapability.Applications.ContactsData
2677     * @since 7
2678     */
2679    static readonly RELATION_DOMESTIC_PARTNER: 4
2680
2681    /**
2682     * Indicates a father.
2683     *
2684     * @readonly
2685     * @static
2686     * @syscap SystemCapability.Applications.ContactsData
2687     * @since 7
2688     */
2689    static readonly RELATION_FATHER: 5
2690
2691    /**
2692     * Indicates a friend.
2693     *
2694     * @readonly
2695     * @static
2696     * @syscap SystemCapability.Applications.ContactsData
2697     * @since 7
2698     */
2699    static readonly RELATION_FRIEND: 6
2700
2701    /**
2702     * Indicates a manager.
2703     *
2704     * @readonly
2705     * @static
2706     * @syscap SystemCapability.Applications.ContactsData
2707     * @since 7
2708     */
2709    static readonly RELATION_MANAGER: 7
2710
2711    /**
2712     * Indicates a mother.
2713     *
2714     * @readonly
2715     * @static
2716     * @syscap SystemCapability.Applications.ContactsData
2717     * @since 7
2718     */
2719    static readonly RELATION_MOTHER: 8
2720
2721    /**
2722     * Indicates a parent.
2723     *
2724     * @readonly
2725     * @static
2726     * @syscap SystemCapability.Applications.ContactsData
2727     * @since 7
2728     */
2729    static readonly RELATION_PARENT: 9
2730
2731    /**
2732     * Indicates a partner.
2733     *
2734     * @readonly
2735     * @static
2736     * @syscap SystemCapability.Applications.ContactsData
2737     * @since 7
2738     */
2739    static readonly RELATION_PARTNER: 10
2740
2741    /**
2742     * Indicates a referrer.
2743     *
2744     * @readonly
2745     * @static
2746     * @syscap SystemCapability.Applications.ContactsData
2747     * @since 7
2748     */
2749    static readonly RELATION_REFERRED_BY: 11
2750
2751    /**
2752     * Indicates a relative.
2753     *
2754     * @readonly
2755     * @static
2756     * @syscap SystemCapability.Applications.ContactsData
2757     * @since 7
2758     */
2759    static readonly RELATION_RELATIVE: 12
2760
2761    /**
2762     * Indicates a sister.
2763     *
2764     * @readonly
2765     * @static
2766     * @syscap SystemCapability.Applications.ContactsData
2767     * @since 7
2768     */
2769    static readonly RELATION_SISTER: 13
2770
2771    /**
2772     * Indicates a spouse.
2773     *
2774     * @readonly
2775     * @static
2776     * @syscap SystemCapability.Applications.ContactsData
2777     * @since 7
2778     */
2779    static readonly RELATION_SPOUSE: 14
2780
2781    /**
2782     * Indicates an invalid label ID.
2783     *
2784     * @readonly
2785     * @static
2786     * @syscap SystemCapability.Applications.ContactsData
2787     * @since 7
2788     */
2789    static readonly INVALID_LABEL_ID: -1
2790
2791    /**
2792     * Indicates the label name of an attribute.
2793     *
2794     * @type { ?string }
2795     * @syscap SystemCapability.Applications.ContactsData
2796     * @since 7
2797     */
2798    labelName?: string
2799
2800    /**
2801     * Indicates the relation name.
2802     *
2803     * @type { string }
2804     * @syscap SystemCapability.Applications.ContactsData
2805     * @since 7
2806     */
2807    relationName: string
2808
2809    /**
2810     * Indicates the label id.
2811     *
2812     * @type { ?number }
2813     * @syscap SystemCapability.Applications.ContactsData
2814     * @since 7
2815     */
2816    labelId?: number
2817  }
2818
2819  /**
2820   * Provides methods for sip address information
2821   *
2822   * @syscap SystemCapability.Applications.ContactsData
2823   * @since 7
2824   */
2825  class SipAddress {
2826    /**
2827     * Indicates a custom label.
2828     *
2829     * @readonly
2830     * @static
2831     * @syscap SystemCapability.Applications.ContactsData
2832     * @since 7
2833     */
2834    static readonly CUSTOM_LABEL: 0
2835
2836    /**
2837     * Indicates a home SIP address.
2838     *
2839     * @readonly
2840     * @static
2841     * @syscap SystemCapability.Applications.ContactsData
2842     * @since 7
2843     */
2844    static readonly SIP_HOME: 1
2845
2846    /**
2847     * Indicates a work SIP address.
2848     *
2849     * @readonly
2850     * @static
2851     * @syscap SystemCapability.Applications.ContactsData
2852     * @since 7
2853     */
2854    static readonly SIP_WORK: 2
2855
2856    /**
2857     * Indicates an SIP address of the OTHER type.
2858     *
2859     * @readonly
2860     * @static
2861     * @syscap SystemCapability.Applications.ContactsData
2862     * @since 7
2863     */
2864    static readonly SIP_OTHER: 3
2865
2866    /**
2867     * Indicates an invalid label ID.
2868     *
2869     * @readonly
2870     * @static
2871     * @syscap SystemCapability.Applications.ContactsData
2872     * @since 7
2873     */
2874    static readonly INVALID_LABEL_ID: -1
2875
2876    /**
2877     * Indicates the label name of an attribute.
2878     *
2879     * @type { ?string }
2880     * @syscap SystemCapability.Applications.ContactsData
2881     * @since 7
2882     */
2883    labelName?: string
2884
2885    /**
2886     * Indicates the SIP address.
2887     *
2888     * @type { string }
2889     * @syscap SystemCapability.Applications.ContactsData
2890     * @since 7
2891     */
2892    sipAddress: string
2893
2894    /**
2895     * Indicates the label id.
2896     *
2897     * @type { ?number }
2898     * @syscap SystemCapability.Applications.ContactsData
2899     * @since 7
2900     */
2901    labelId?: number
2902  }
2903
2904  /**
2905   * Provides methods for website information
2906   *
2907   * @syscap SystemCapability.Applications.ContactsData
2908   * @since 7
2909   */
2910  class Website {
2911    /**
2912     * Indicates the website.
2913     *
2914     * @type { string }
2915     * @syscap SystemCapability.Applications.ContactsData
2916     * @since 7
2917     */
2918    website: string
2919  }
2920}
2921
2922export default contact;