1.0.6 • Published 11 months ago

@anuradev/capacitor-contacts v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@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>
ParamType
data{ name?: string; number: string; }

addToExistingContact(...)

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

deleteContact(...)

deleteContact(data: { contactId: string; }) => Promise<void>
ParamType
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

PropType
displayPermissionState

Contact

PropType
contactIdstring
displayNamestring
phoneNumbersPhoneNumber[]
emailsEmailAddress[]
photoThumbnailstring
organizationNamestring
organizationRolestring
birthdaystring

PhoneNumber

PropType
labelstring
numberstring

EmailAddress

PropType
labelstring
addressstring

Group

PropType
groupIdstring
accountTypestring
accountNamestring
titlestring

Type Aliases

PermissionState

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

2.0.2

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

2.0.1

11 months ago

2.0.0

12 months ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago