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