@capgo/capacitor-contacts 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,944 @@
1
+ import type { PermissionState } from '@capacitor/core';
2
+ /**
3
+ * Permission state for contacts access, including the 'limited' state for iOS 18+.
4
+ *
5
+ * @since 1.0.0
6
+ */
7
+ export type ContactsPermissionState = PermissionState | 'limited';
8
+ /**
9
+ * Type of contacts permission to request.
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ export type ContactsPermissionType = 'readContacts' | 'writeContacts';
14
+ /**
15
+ * Status of contacts permissions.
16
+ *
17
+ * @since 1.0.0
18
+ */
19
+ export interface PermissionStatus {
20
+ /**
21
+ * Permission state for reading contacts.
22
+ *
23
+ * @since 1.0.0
24
+ */
25
+ readContacts: ContactsPermissionState;
26
+ /**
27
+ * Permission state for writing contacts.
28
+ *
29
+ * @since 1.0.0
30
+ */
31
+ writeContacts: ContactsPermissionState;
32
+ }
33
+ /**
34
+ * Options for requesting contacts permissions.
35
+ *
36
+ * @since 1.0.0
37
+ */
38
+ export interface RequestPermissionsOptions {
39
+ /**
40
+ * Specific permissions to request. If not provided, all permissions will be requested.
41
+ *
42
+ * @since 1.0.0
43
+ */
44
+ permissions?: ContactsPermissionType[];
45
+ }
46
+ /**
47
+ * Account information for a contact.
48
+ *
49
+ * @since 1.0.0
50
+ */
51
+ export interface Account {
52
+ /**
53
+ * The name of the account.
54
+ *
55
+ * @since 1.0.0
56
+ */
57
+ name: string;
58
+ /**
59
+ * The type of the account.
60
+ *
61
+ * @since 1.0.0
62
+ */
63
+ type?: string;
64
+ }
65
+ /**
66
+ * Birthday information for a contact.
67
+ *
68
+ * @since 1.0.0
69
+ */
70
+ export interface Birthday {
71
+ /**
72
+ * The day of the month (1-31).
73
+ *
74
+ * @since 1.0.0
75
+ */
76
+ day?: number;
77
+ /**
78
+ * The month (1-12).
79
+ *
80
+ * @since 1.0.0
81
+ */
82
+ month?: number;
83
+ /**
84
+ * The year.
85
+ *
86
+ * @since 1.0.0
87
+ */
88
+ year?: number;
89
+ }
90
+ /**
91
+ * Type of email address.
92
+ *
93
+ * @since 1.0.0
94
+ */
95
+ export type EmailAddressType = 'CUSTOM' | 'HOME' | 'ICLOUD' | 'OTHER' | 'WORK';
96
+ /**
97
+ * Email address information for a contact.
98
+ *
99
+ * @since 1.0.0
100
+ */
101
+ export interface EmailAddress {
102
+ /**
103
+ * The email address value.
104
+ *
105
+ * @since 1.0.0
106
+ */
107
+ value: string;
108
+ /**
109
+ * The type of email address.
110
+ *
111
+ * @since 1.0.0
112
+ */
113
+ type?: EmailAddressType;
114
+ /**
115
+ * Custom label for the email address.
116
+ *
117
+ * @since 1.0.0
118
+ */
119
+ label?: string;
120
+ /**
121
+ * Whether this is the primary email address.
122
+ *
123
+ * @since 1.0.0
124
+ */
125
+ isPrimary?: boolean;
126
+ }
127
+ /**
128
+ * Type of phone number.
129
+ *
130
+ * @since 1.0.0
131
+ */
132
+ export type PhoneNumberType = 'ASSISTANT' | 'CALLBACK' | 'CAR' | 'COMPANY_MAIN' | 'CUSTOM' | 'FAX_HOME' | 'FAX_WORK' | 'HOME' | 'HOME_FAX' | 'ISDN' | 'MAIN' | 'MMS' | 'MOBILE' | 'OTHER' | 'OTHER_FAX' | 'PAGER' | 'RADIO' | 'TELEX' | 'TTY_TDD' | 'WORK' | 'WORK_MOBILE' | 'WORK_PAGER';
133
+ /**
134
+ * Phone number information for a contact.
135
+ *
136
+ * @since 1.0.0
137
+ */
138
+ export interface PhoneNumber {
139
+ /**
140
+ * The phone number value.
141
+ *
142
+ * @since 1.0.0
143
+ */
144
+ value: string;
145
+ /**
146
+ * The type of phone number.
147
+ *
148
+ * @since 1.0.0
149
+ */
150
+ type?: PhoneNumberType;
151
+ /**
152
+ * Custom label for the phone number.
153
+ *
154
+ * @since 1.0.0
155
+ */
156
+ label?: string;
157
+ /**
158
+ * Whether this is the primary phone number.
159
+ *
160
+ * @since 1.0.0
161
+ */
162
+ isPrimary?: boolean;
163
+ }
164
+ /**
165
+ * Type of postal address.
166
+ *
167
+ * @since 1.0.0
168
+ */
169
+ export type PostalAddressType = 'CUSTOM' | 'HOME' | 'OTHER' | 'WORK';
170
+ /**
171
+ * Postal address information for a contact.
172
+ *
173
+ * @since 1.0.0
174
+ */
175
+ export interface PostalAddress {
176
+ /**
177
+ * The city name.
178
+ *
179
+ * @since 1.0.0
180
+ */
181
+ city?: string;
182
+ /**
183
+ * The country name.
184
+ *
185
+ * @since 1.0.0
186
+ */
187
+ country?: string;
188
+ /**
189
+ * The formatted address string.
190
+ *
191
+ * @since 1.0.0
192
+ */
193
+ formatted?: string;
194
+ /**
195
+ * The ISO country code.
196
+ *
197
+ * @since 1.0.0
198
+ */
199
+ isoCountryCode?: string;
200
+ /**
201
+ * Whether this is the primary postal address.
202
+ *
203
+ * @since 1.0.0
204
+ */
205
+ isPrimary?: boolean;
206
+ /**
207
+ * Custom label for the postal address.
208
+ *
209
+ * @since 1.0.0
210
+ */
211
+ label?: string;
212
+ /**
213
+ * The neighborhood name.
214
+ *
215
+ * @since 1.0.0
216
+ */
217
+ neighborhood?: string;
218
+ /**
219
+ * The postal code.
220
+ *
221
+ * @since 1.0.0
222
+ */
223
+ postalCode?: string;
224
+ /**
225
+ * The state or province name.
226
+ *
227
+ * @since 1.0.0
228
+ */
229
+ state?: string;
230
+ /**
231
+ * The street address.
232
+ *
233
+ * @since 1.0.0
234
+ */
235
+ street?: string;
236
+ /**
237
+ * The type of postal address.
238
+ *
239
+ * @since 1.0.0
240
+ */
241
+ type?: PostalAddressType;
242
+ }
243
+ /**
244
+ * Type of URL address.
245
+ *
246
+ * @since 1.0.0
247
+ */
248
+ export type UrlAddressType = 'BLOG' | 'CUSTOM' | 'FTP' | 'HOME' | 'HOMEPAGE' | 'OTHER' | 'PROFILE' | 'SCHOOL' | 'WORK';
249
+ /**
250
+ * URL address information for a contact.
251
+ *
252
+ * @since 1.0.0
253
+ */
254
+ export interface UrlAddress {
255
+ /**
256
+ * The URL value.
257
+ *
258
+ * @since 1.0.0
259
+ */
260
+ value: string;
261
+ /**
262
+ * The type of URL.
263
+ *
264
+ * @since 1.0.0
265
+ */
266
+ type?: UrlAddressType;
267
+ /**
268
+ * Custom label for the URL.
269
+ *
270
+ * @since 1.0.0
271
+ */
272
+ label?: string;
273
+ }
274
+ /**
275
+ * Contact information.
276
+ *
277
+ * @since 1.0.0
278
+ */
279
+ export interface Contact {
280
+ /**
281
+ * Unique identifier for the contact.
282
+ *
283
+ * @since 1.0.0
284
+ */
285
+ id?: string;
286
+ /**
287
+ * Account information for the contact.
288
+ *
289
+ * @since 1.0.0
290
+ */
291
+ account?: Account;
292
+ /**
293
+ * Birthday information for the contact.
294
+ *
295
+ * @since 1.0.0
296
+ */
297
+ birthday?: Birthday;
298
+ /**
299
+ * Email addresses for the contact.
300
+ *
301
+ * @since 1.0.0
302
+ */
303
+ emailAddresses?: EmailAddress[];
304
+ /**
305
+ * Family name (last name) of the contact.
306
+ *
307
+ * @since 1.0.0
308
+ */
309
+ familyName?: string;
310
+ /**
311
+ * Full name of the contact.
312
+ *
313
+ * @since 1.0.0
314
+ */
315
+ fullName?: string;
316
+ /**
317
+ * Given name (first name) of the contact.
318
+ *
319
+ * @since 1.0.0
320
+ */
321
+ givenName?: string;
322
+ /**
323
+ * Group IDs the contact belongs to.
324
+ *
325
+ * @since 1.0.0
326
+ */
327
+ groupIds?: string[];
328
+ /**
329
+ * Job title of the contact.
330
+ *
331
+ * @since 1.0.0
332
+ */
333
+ jobTitle?: string;
334
+ /**
335
+ * Middle name of the contact.
336
+ *
337
+ * @since 1.0.0
338
+ */
339
+ middleName?: string;
340
+ /**
341
+ * Name prefix (e.g., "Dr.", "Mr.", "Ms.") of the contact.
342
+ *
343
+ * @since 1.0.0
344
+ */
345
+ namePrefix?: string;
346
+ /**
347
+ * Name suffix (e.g., "Jr.", "Sr.", "III") of the contact.
348
+ *
349
+ * @since 1.0.0
350
+ */
351
+ nameSuffix?: string;
352
+ /**
353
+ * Notes about the contact.
354
+ *
355
+ * @since 1.0.0
356
+ */
357
+ note?: string;
358
+ /**
359
+ * Organization name of the contact.
360
+ *
361
+ * @since 1.0.0
362
+ */
363
+ organizationName?: string;
364
+ /**
365
+ * Phone numbers for the contact.
366
+ *
367
+ * @since 1.0.0
368
+ */
369
+ phoneNumbers?: PhoneNumber[];
370
+ /**
371
+ * Base64-encoded photo of the contact.
372
+ *
373
+ * @since 1.0.0
374
+ */
375
+ photo?: string;
376
+ /**
377
+ * Postal addresses for the contact.
378
+ *
379
+ * @since 1.0.0
380
+ */
381
+ postalAddresses?: PostalAddress[];
382
+ /**
383
+ * URL addresses for the contact.
384
+ *
385
+ * @since 1.0.0
386
+ */
387
+ urlAddresses?: UrlAddress[];
388
+ }
389
+ /**
390
+ * Field names available in a Contact object.
391
+ *
392
+ * @since 1.0.0
393
+ */
394
+ export type ContactField = keyof Contact;
395
+ /**
396
+ * Result from counting contacts.
397
+ *
398
+ * @since 1.0.0
399
+ */
400
+ export interface CountContactsResult {
401
+ /**
402
+ * Total number of contacts.
403
+ *
404
+ * @since 1.0.0
405
+ */
406
+ count: number;
407
+ }
408
+ /**
409
+ * Options for creating a contact.
410
+ *
411
+ * @since 1.0.0
412
+ */
413
+ export interface CreateContactOptions {
414
+ /**
415
+ * Contact information to create. The 'id' field will be generated automatically.
416
+ *
417
+ * @since 1.0.0
418
+ */
419
+ contact: Omit<Contact, 'id'>;
420
+ }
421
+ /**
422
+ * Result from creating a contact.
423
+ *
424
+ * @since 1.0.0
425
+ */
426
+ export interface CreateContactResult {
427
+ /**
428
+ * The ID of the newly created contact.
429
+ *
430
+ * @since 1.0.0
431
+ */
432
+ id: string;
433
+ }
434
+ /**
435
+ * Options for displaying the native create contact UI.
436
+ *
437
+ * @since 1.0.0
438
+ */
439
+ export interface DisplayCreateContactOptions {
440
+ /**
441
+ * Optional pre-filled contact information for the create UI.
442
+ *
443
+ * @since 1.0.0
444
+ */
445
+ contact?: Omit<Contact, 'id'>;
446
+ }
447
+ /**
448
+ * Result from displaying the native create contact UI.
449
+ *
450
+ * @since 1.0.0
451
+ */
452
+ export interface DisplayCreateContactResult {
453
+ /**
454
+ * The ID of the created contact, if one was created. Undefined if the user cancelled.
455
+ *
456
+ * @since 1.0.0
457
+ */
458
+ id?: string;
459
+ }
460
+ /**
461
+ * Options for displaying a contact by ID.
462
+ *
463
+ * @since 1.0.0
464
+ */
465
+ export interface DisplayContactByIdOptions {
466
+ /**
467
+ * The ID of the contact to display.
468
+ *
469
+ * @since 1.0.0
470
+ */
471
+ id: string;
472
+ }
473
+ /**
474
+ * Options for displaying the native update contact UI.
475
+ *
476
+ * @since 1.0.0
477
+ */
478
+ export interface DisplayUpdateContactByIdOptions {
479
+ /**
480
+ * The ID of the contact to update.
481
+ *
482
+ * @since 1.0.0
483
+ */
484
+ id: string;
485
+ }
486
+ /**
487
+ * Result from getting accounts.
488
+ *
489
+ * @since 1.0.0
490
+ */
491
+ export interface GetAccountsResult {
492
+ /**
493
+ * List of accounts available on the device.
494
+ *
495
+ * @since 1.0.0
496
+ */
497
+ accounts: Account[];
498
+ }
499
+ /**
500
+ * Options for getting a contact by ID.
501
+ *
502
+ * @since 1.0.0
503
+ */
504
+ export interface GetContactByIdOptions {
505
+ /**
506
+ * The ID of the contact to retrieve.
507
+ *
508
+ * @since 1.0.0
509
+ */
510
+ id: string;
511
+ /**
512
+ * Optional list of specific fields to retrieve. If not specified, all fields are returned.
513
+ *
514
+ * @since 1.0.0
515
+ */
516
+ fields?: ContactField[];
517
+ }
518
+ /**
519
+ * Result from getting a contact by ID.
520
+ *
521
+ * @since 1.0.0
522
+ */
523
+ export interface GetContactByIdResult {
524
+ /**
525
+ * The contact, or null if not found.
526
+ *
527
+ * @since 1.0.0
528
+ */
529
+ contact: Contact | null;
530
+ }
531
+ /**
532
+ * Options for getting contacts.
533
+ *
534
+ * @since 1.0.0
535
+ */
536
+ export interface GetContactsOptions {
537
+ /**
538
+ * Optional list of specific fields to retrieve. If not specified, all fields are returned.
539
+ *
540
+ * @since 1.0.0
541
+ */
542
+ fields?: ContactField[];
543
+ /**
544
+ * Maximum number of contacts to return.
545
+ *
546
+ * @since 1.0.0
547
+ */
548
+ limit?: number;
549
+ /**
550
+ * Number of contacts to skip before starting to return results.
551
+ *
552
+ * @since 1.0.0
553
+ */
554
+ offset?: number;
555
+ }
556
+ /**
557
+ * Result from getting contacts.
558
+ *
559
+ * @since 1.0.0
560
+ */
561
+ export interface GetContactsResult {
562
+ /**
563
+ * List of contacts.
564
+ *
565
+ * @since 1.0.0
566
+ */
567
+ contacts: Contact[];
568
+ }
569
+ /**
570
+ * Options for getting a group by ID.
571
+ *
572
+ * @since 1.0.0
573
+ */
574
+ export interface GetGroupByIdOptions {
575
+ /**
576
+ * The ID of the group to retrieve.
577
+ *
578
+ * @since 1.0.0
579
+ */
580
+ id: string;
581
+ }
582
+ /**
583
+ * Result from getting a group by ID.
584
+ *
585
+ * @since 1.0.0
586
+ */
587
+ export interface GetGroupByIdResult {
588
+ /**
589
+ * The group, or null if not found.
590
+ *
591
+ * @since 1.0.0
592
+ */
593
+ group: Group | null;
594
+ }
595
+ /**
596
+ * Result from getting groups.
597
+ *
598
+ * @since 1.0.0
599
+ */
600
+ export interface GetGroupsResult {
601
+ /**
602
+ * List of groups.
603
+ *
604
+ * @since 1.0.0
605
+ */
606
+ groups: Group[];
607
+ }
608
+ /**
609
+ * Contact group information.
610
+ *
611
+ * @since 1.0.0
612
+ */
613
+ export interface Group {
614
+ /**
615
+ * Unique identifier for the group.
616
+ *
617
+ * @since 1.0.0
618
+ */
619
+ id: string;
620
+ /**
621
+ * Name of the group.
622
+ *
623
+ * @since 1.0.0
624
+ */
625
+ name: string;
626
+ }
627
+ /**
628
+ * Options for creating a group.
629
+ *
630
+ * @since 1.0.0
631
+ */
632
+ export interface CreateGroupOptions {
633
+ /**
634
+ * Group information to create. The 'id' field will be generated automatically.
635
+ *
636
+ * @since 1.0.0
637
+ */
638
+ group: Omit<Group, 'id'>;
639
+ }
640
+ /**
641
+ * Result from creating a group.
642
+ *
643
+ * @since 1.0.0
644
+ */
645
+ export interface CreateGroupResult {
646
+ /**
647
+ * The ID of the newly created group.
648
+ *
649
+ * @since 1.0.0
650
+ */
651
+ id: string;
652
+ }
653
+ /**
654
+ * Options for deleting a contact by ID.
655
+ *
656
+ * @since 1.0.0
657
+ */
658
+ export interface DeleteContactByIdOptions {
659
+ /**
660
+ * The ID of the contact to delete.
661
+ *
662
+ * @since 1.0.0
663
+ */
664
+ id: string;
665
+ }
666
+ /**
667
+ * Options for deleting a group by ID.
668
+ *
669
+ * @since 1.0.0
670
+ */
671
+ export interface DeleteGroupByIdOptions {
672
+ /**
673
+ * The ID of the group to delete.
674
+ *
675
+ * @since 1.0.0
676
+ */
677
+ id: string;
678
+ }
679
+ /**
680
+ * Options for picking contacts using the native contact picker.
681
+ *
682
+ * @since 1.0.0
683
+ */
684
+ export interface PickContactsOptions {
685
+ /**
686
+ * Optional list of specific fields to retrieve. If not specified, all fields are returned.
687
+ *
688
+ * @since 1.0.0
689
+ */
690
+ fields?: ContactField[];
691
+ /**
692
+ * Whether to allow selecting multiple contacts. Default is false.
693
+ *
694
+ * @since 1.0.0
695
+ */
696
+ multiple?: boolean;
697
+ }
698
+ /**
699
+ * Result from picking contacts.
700
+ *
701
+ * @since 1.0.0
702
+ */
703
+ export interface PickContactsResult {
704
+ /**
705
+ * List of selected contacts.
706
+ *
707
+ * @since 1.0.0
708
+ */
709
+ contacts: Contact[];
710
+ }
711
+ /**
712
+ * Alias for PickContactsOptions.
713
+ *
714
+ * @since 1.0.0
715
+ */
716
+ export type PickContactOptions = PickContactsOptions;
717
+ /**
718
+ * Alias for PickContactsResult.
719
+ *
720
+ * @since 1.0.0
721
+ */
722
+ export type PickContactResult = PickContactsResult;
723
+ /**
724
+ * Options for updating a contact by ID.
725
+ *
726
+ * @since 1.0.0
727
+ */
728
+ export interface UpdateContactByIdOptions {
729
+ /**
730
+ * The ID of the contact to update.
731
+ *
732
+ * @since 1.0.0
733
+ */
734
+ id: string;
735
+ /**
736
+ * Updated contact information.
737
+ *
738
+ * @since 1.0.0
739
+ */
740
+ contact: Omit<Contact, 'id'>;
741
+ }
742
+ /**
743
+ * Result from checking if the plugin is supported on the platform.
744
+ *
745
+ * @since 1.0.0
746
+ */
747
+ export interface IsSupportedResult {
748
+ /**
749
+ * Whether the plugin is supported on this platform.
750
+ *
751
+ * @since 1.0.0
752
+ */
753
+ isSupported: boolean;
754
+ }
755
+ /**
756
+ * Result from checking if contacts are available on the device.
757
+ *
758
+ * @since 1.0.0
759
+ */
760
+ export interface IsAvailableResult {
761
+ /**
762
+ * Whether contacts are available on this device.
763
+ *
764
+ * @since 1.0.0
765
+ */
766
+ isAvailable: boolean;
767
+ }
768
+ /**
769
+ * Capacitor Contacts Plugin interface for managing device contacts.
770
+ *
771
+ * @since 1.0.0
772
+ */
773
+ export interface CapacitorContactsPlugin {
774
+ /**
775
+ * Count the total number of contacts on the device.
776
+ *
777
+ * @returns Promise that resolves with the total count of contacts
778
+ * @since 1.0.0
779
+ */
780
+ countContacts(): Promise<CountContactsResult>;
781
+ /**
782
+ * Create a new contact programmatically.
783
+ *
784
+ * @param options - The contact information to create
785
+ * @returns Promise that resolves with the ID of the newly created contact
786
+ * @since 1.0.0
787
+ */
788
+ createContact(options: CreateContactOptions): Promise<CreateContactResult>;
789
+ /**
790
+ * Create a new contact group.
791
+ *
792
+ * @param options - The group information to create
793
+ * @returns Promise that resolves with the ID of the newly created group
794
+ * @since 1.0.0
795
+ */
796
+ createGroup(options: CreateGroupOptions): Promise<CreateGroupResult>;
797
+ /**
798
+ * Delete a contact by ID.
799
+ *
800
+ * @param options - The ID of the contact to delete
801
+ * @returns Promise that resolves when the contact is deleted
802
+ * @since 1.0.0
803
+ */
804
+ deleteContactById(options: DeleteContactByIdOptions): Promise<void>;
805
+ /**
806
+ * Delete a group by ID.
807
+ *
808
+ * @param options - The ID of the group to delete
809
+ * @returns Promise that resolves when the group is deleted
810
+ * @since 1.0.0
811
+ */
812
+ deleteGroupById(options: DeleteGroupByIdOptions): Promise<void>;
813
+ /**
814
+ * Display a contact using the native contact viewer.
815
+ *
816
+ * @param options - The ID of the contact to display
817
+ * @returns Promise that resolves when the viewer is closed
818
+ * @since 1.0.0
819
+ */
820
+ displayContactById(options: DisplayContactByIdOptions): Promise<void>;
821
+ /**
822
+ * Display the native create contact UI.
823
+ *
824
+ * @param options - Optional pre-filled contact information
825
+ * @returns Promise that resolves with the ID of the created contact, or undefined if cancelled
826
+ * @since 1.0.0
827
+ */
828
+ displayCreateContact(options?: DisplayCreateContactOptions): Promise<DisplayCreateContactResult>;
829
+ /**
830
+ * Display the native update contact UI for a specific contact.
831
+ *
832
+ * @param options - The ID of the contact to update
833
+ * @returns Promise that resolves when the update UI is closed
834
+ * @since 1.0.0
835
+ */
836
+ displayUpdateContactById(options: DisplayUpdateContactByIdOptions): Promise<void>;
837
+ /**
838
+ * Get all accounts available on the device.
839
+ *
840
+ * @returns Promise that resolves with the list of accounts
841
+ * @since 1.0.0
842
+ */
843
+ getAccounts(): Promise<GetAccountsResult>;
844
+ /**
845
+ * Get a specific contact by ID.
846
+ *
847
+ * @param options - The ID and optional fields to retrieve
848
+ * @returns Promise that resolves with the contact, or null if not found
849
+ * @since 1.0.0
850
+ */
851
+ getContactById(options: GetContactByIdOptions): Promise<GetContactByIdResult>;
852
+ /**
853
+ * Get all contacts from the device.
854
+ *
855
+ * @param options - Optional filters and pagination options
856
+ * @returns Promise that resolves with the list of contacts
857
+ * @since 1.0.0
858
+ */
859
+ getContacts(options?: GetContactsOptions): Promise<GetContactsResult>;
860
+ /**
861
+ * Get a specific group by ID.
862
+ *
863
+ * @param options - The ID of the group to retrieve
864
+ * @returns Promise that resolves with the group, or null if not found
865
+ * @since 1.0.0
866
+ */
867
+ getGroupById(options: GetGroupByIdOptions): Promise<GetGroupByIdResult>;
868
+ /**
869
+ * Get all contact groups.
870
+ *
871
+ * @returns Promise that resolves with the list of groups
872
+ * @since 1.0.0
873
+ */
874
+ getGroups(): Promise<GetGroupsResult>;
875
+ /**
876
+ * Check if contacts are available on the device.
877
+ *
878
+ * @returns Promise that resolves with availability status
879
+ * @since 1.0.0
880
+ */
881
+ isAvailable(): Promise<IsAvailableResult>;
882
+ /**
883
+ * Check if the plugin is supported on the current platform.
884
+ *
885
+ * @returns Promise that resolves with support status
886
+ * @since 1.0.0
887
+ */
888
+ isSupported(): Promise<IsSupportedResult>;
889
+ /**
890
+ * Open the device's contacts settings.
891
+ *
892
+ * @returns Promise that resolves when the settings are opened
893
+ * @since 1.0.0
894
+ */
895
+ openSettings(): Promise<void>;
896
+ /**
897
+ * Pick a single contact using the native contact picker.
898
+ *
899
+ * @param options - Optional fields to retrieve and picker configuration
900
+ * @returns Promise that resolves with the selected contact(s)
901
+ * @since 1.0.0
902
+ */
903
+ pickContact(options?: PickContactOptions): Promise<PickContactResult>;
904
+ /**
905
+ * Pick one or more contacts using the native contact picker.
906
+ *
907
+ * @param options - Optional fields to retrieve and picker configuration
908
+ * @returns Promise that resolves with the selected contacts
909
+ * @since 1.0.0
910
+ */
911
+ pickContacts(options?: PickContactsOptions): Promise<PickContactsResult>;
912
+ /**
913
+ * Update an existing contact by ID.
914
+ *
915
+ * @param options - The ID and updated contact information
916
+ * @returns Promise that resolves when the contact is updated
917
+ * @since 1.0.0
918
+ */
919
+ updateContactById(options: UpdateContactByIdOptions): Promise<void>;
920
+ /**
921
+ * Check the current permission status for contacts.
922
+ *
923
+ * @returns Promise that resolves with the current permission status
924
+ * @since 1.0.0
925
+ */
926
+ checkPermissions(): Promise<PermissionStatus>;
927
+ /**
928
+ * Request permissions to access contacts.
929
+ *
930
+ * @param options - Optional specific permissions to request
931
+ * @returns Promise that resolves with the updated permission status
932
+ * @since 1.0.0
933
+ */
934
+ requestPermissions(options?: RequestPermissionsOptions): Promise<PermissionStatus>;
935
+ /**
936
+ * Get the native Capacitor plugin version.
937
+ *
938
+ * @returns Promise that resolves with the plugin version
939
+ * @since 1.0.0
940
+ */
941
+ getPluginVersion(): Promise<{
942
+ version: string;
943
+ }>;
944
+ }