@anuradev/capacitor-contacts
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

@anuradev/capacitor-contacts

Capacitor plugin to get and modify mobile contacts

Install

npm install @anuradev/capacitor-contacts
npx cap sync

API

checkPermissions()

checkPermissions() => Promise<PermissionStatus>

Returns: Promise<PermissionStatus>


requestPermissions()

requestPermissions() => Promise<PermissionStatus>

Returns: Promise<PermissionStatus>


getContacts()

getContacts() => Promise<{ contacts: Contact[]; }>

Returns: Promise<{ contacts: Contact[]; }>


createContact(...)

createContact(data: { name?: string; number: string; }) => Promise<void>
Param Type
data { name?: string; number: string; }

addToExistingContact(...)

addToExistingContact(data: { name?: string; number: string; }) => Promise<void>
Param Type
data { name?: string; number: string; }

deleteContact(...)

deleteContact(data: { contactId: string; }) => Promise<void>
Param Type
data { contactId: string; }

getGroups()

getGroups() => Promise<{ groups: Group[]; }>

Returns: Promise<{ groups: Group[]; }>


getContactGroups()

getContactGroups() => Promise<{ [key: string]: Group[]; }>

Returns: Promise<{ [key: string]: Group[]; }>


Interfaces

PermissionStatus

Prop Type
display PermissionState

Contact

Prop Type
contactId string
displayName string
phoneNumbers PhoneNumber[]
emails EmailAddress[]
photoThumbnail string
organizationName string
organizationRole string
birthday string

PhoneNumber

Prop Type
label string
number string

EmailAddress

Prop Type
label string
address string

Group

Prop Type
groupId string
accountType string
accountName string
title string

Type Aliases

PermissionState

'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'

Readme

Keywords

Package Sidebar

Install

npm i @anuradev/capacitor-contacts

Weekly Downloads

0

Version

1.0.6

License

MIT

Unpacked Size

63.3 kB

Total Files

31

Last publish

Collaborators

  • anuradev