multi-contact-picker
v0.0.2
Published
Contact picker for selecting multiple contacts on a device
Readme
multi-contact-picker
Contact picker for selecting multiple contacts on a device
Install
npm install multi-contact-picker
npx cap syncAPI
checkPermissions()requestPermissions()getContact(...)getContacts(...)createContact(...)deleteContact(...)pickContacts(...)- Interfaces
- Type Aliases
- Enums
checkPermissions()
checkPermissions() => Promise<PermissionStatus>Returns: Promise<PermissionStatus>
requestPermissions()
requestPermissions() => Promise<PermissionStatus>Returns: Promise<PermissionStatus>
getContact(...)
getContact(options: GetContactOptions) => Promise<GetContactResult>| Param | Type |
| ------------- | --------------------------------------------------------------- |
| options | GetContactOptions |
Returns: Promise<GetContactResult>
getContacts(...)
getContacts(options: GetContactsOptions) => Promise<GetContactsResult>| Param | Type |
| ------------- | ----------------------------------------------------------------- |
| options | GetContactsOptions |
Returns: Promise<GetContactsResult>
createContact(...)
createContact(options: CreateContactOptions) => Promise<CreateContactResult>| Param | Type |
| ------------- | --------------------------------------------------------------------- |
| options | CreateContactOptions |
Returns: Promise<CreateContactResult>
deleteContact(...)
deleteContact(options: DeleteContactOptions) => Promise<void>| Param | Type |
| ------------- | --------------------------------------------------------------------- |
| options | DeleteContactOptions |
pickContacts(...)
pickContacts(options: pickContactsOptions) => Promise<GetContactsResult>| Param | Type |
| ------------- | ------------------------------------------------------------------- |
| options | pickContactsOptions |
Returns: Promise<GetContactsResult>
Interfaces
PermissionStatus
| Prop | Type |
| -------------- | ----------------------------------------------------------- |
| contacts | PermissionState |
GetContactResult
| Prop | Type |
| ------------- | --------------------------------------------------------- |
| contact | ContactPayload |
ContactPayload
| Prop | Type | Description |
| --------------------- | ------------------------------------------------------------------- | ------------------------------------ |
| contactId | string | |
| name | NamePayload | Object holding the name data |
| organization | OrganizationPayload | Object holding the organization data |
| birthday | BirthdayPayload | null | Birthday |
| note | string | null | Note |
| phones | PhonePayload[] | Phones |
| emails | EmailPayload[] | Emails |
| urls | (string | null)[] | URLs |
| postalAddresses | PostalAddressPayload[] | Postal Addresses |
| image | ImagePayload | Image |
NamePayload
| Prop | Type |
| ------------- | --------------------------- |
| display | string | null |
| given | string | null |
| middle | string | null |
| family | string | null |
| prefix | string | null |
| suffix | string | null |
OrganizationPayload
| Prop | Type |
| ---------------- | --------------------------- |
| company | string | null |
| jobTitle | string | null |
| department | string | null |
BirthdayPayload
| Prop | Type |
| ----------- | --------------------------- |
| day | number | null |
| month | number | null |
| year | number | null |
PhonePayload
| Prop | Type |
| --------------- | ----------------------------------------------- |
| type | PhoneType |
| label | string | null |
| isPrimary | boolean | null |
| number | string | null |
EmailPayload
| Prop | Type |
| --------------- | ----------------------------------------------- |
| type | EmailType |
| label | string | null |
| isPrimary | boolean | null |
| address | string | null |
PostalAddressPayload
| Prop | Type |
| ------------------ | --------------------------------------------------------------- |
| type | PostalAddressType |
| label | string | null |
| isPrimary | boolean | null |
| street | string | null |
| neighborhood | string | null |
| city | string | null |
| region | string | null |
| postcode | string | null |
| country | string | null |
ImagePayload
| Prop | Type |
| ------------------ | --------------------------- |
| base64String | string | null |
GetContactOptions
| Prop | Type |
| ---------------- | ------------------------------------------------- |
| contactId | string |
| projection | Projection |
Projection
| Prop | Type | Description | Default |
| --------------------- | -------------------- | ------------------------------------------------------------------------ | ------------------ |
| name | boolean | | false |
| organization | boolean | | false |
| birthday | boolean | | false |
| note | boolean | | false |
| phones | boolean | | false |
| emails | boolean | | false |
| urls | boolean | | false |
| postalAddresses | boolean | | false |
| image | boolean | Be careful! This can potentially slow down your query by a large factor. | false |
GetContactsResult
| Prop | Type |
| -------------- | ----------------------------- |
| message | string |
| contacts | ContactPayload[] |
GetContactsOptions
| Prop | Type |
| ---------------- | ------------------------------------------------- |
| projection | Projection |
CreateContactResult
| Prop | Type |
| --------------- | ------------------- |
| contactId | string |
CreateContactOptions
| Prop | Type |
| ------------- | ----------------------------------------------------- |
| contact | ContactInput |
ContactInput
| Prop | Type | Description |
| --------------------- | --------------------------------------------------------------- | ------------------------------------ |
| name | NameInput | Object holding the name data |
| organization | OrganizationInput | Object holding the organization data |
| birthday | BirthdayInput | null | Birthday |
| note | string | null | Note |
| phones | PhoneInput[] | Phones |
| emails | EmailInput[] | Emails |
| urls | string[] | URLs |
| postalAddresses | PostalAddressInput[] | Postal Addresses |
NameInput
| Prop | Type |
| ------------ | --------------------------- |
| given | string | null |
| middle | string | null |
| family | string | null |
| prefix | string | null |
| suffix | string | null |
OrganizationInput
| Prop | Type |
| ---------------- | --------------------------- |
| company | string | null |
| jobTitle | string | null |
| department | string | null |
BirthdayInput
| Prop | Type |
| ----------- | ------------------- |
| day | number |
| month | number |
| year | number |
PhoneInput
| Prop | Type |
| --------------- | ----------------------------------------------- |
| type | PhoneType |
| label | string | null |
| isPrimary | boolean |
| number | string | null |
EmailInput
| Prop | Type |
| --------------- | ----------------------------------------------- |
| type | EmailType |
| label | string | null |
| isPrimary | boolean |
| address | string | null |
PostalAddressInput
| Prop | Type |
| ------------------ | --------------------------------------------------------------- |
| type | PostalAddressType |
| label | string | null |
| isPrimary | boolean |
| street | string | null |
| neighborhood | string | null |
| city | string | null |
| region | string | null |
| postcode | string | null |
| country | string | null |
DeleteContactOptions
| Prop | Type |
| --------------- | ------------------- |
| contactId | string |
pickContactsOptions
| Prop | Type |
| ---------------- | ------------------------------------------------- |
| projection | Projection |
Type Aliases
PermissionState
'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'
Enums
PhoneType
| Members | Value |
| ----------------- | --------------------------- |
| Home | 'home' |
| Work | 'work' |
| Other | 'other' |
| Custom | 'custom' |
| Mobile | 'mobile' |
| FaxWork | 'fax_work' |
| FaxHome | 'fax_home' |
| Pager | 'pager' |
| Callback | 'callback' |
| Car | 'car' |
| CompanyMain | 'company_main' |
| Isdn | 'isdn' |
| Main | 'main' |
| OtherFax | 'other_fax' |
| Radio | 'radio' |
| Telex | 'telex' |
| TtyTdd | 'tty_tdd' |
| WorkMobile | 'work_mobile' |
| WorkPager | 'work_pager' |
| Assistant | 'assistant' |
| Mms | 'mms' |
EmailType
| Members | Value |
| ------------ | --------------------- |
| Home | 'home' |
| Work | 'work' |
| Other | 'other' |
| Custom | 'custom' |
| Mobile | 'mobile' |
PostalAddressType
| Members | Value |
| ------------ | --------------------- |
| Home | 'home' |
| Work | 'work' |
| Other | 'other' |
| Custom | 'custom' |
