# bulk-contact

> Allow to save multiple contact detail

Latest version **0.0.4** (published 2022-12-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install bulk-contact
pnpm add bulk-contact
yarn add bulk-contact
bun add bulk-contact
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2022-12-05 |
| First published | 2022-12-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 29.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | uohmac |
| Maintainers | anandvsh |
| Keywords | capacitor, plugin, native |

## Links

- npm: https://www.npmjs.com/package/bulk-contact
- Repository: https://github.com/anandvsh/bulk-contact-plugin
- Homepage: https://github.com/anandvsh/bulk-contact-plugin#readme
- Issues: https://github.com/anandvsh/bulk-contact-plugin/issues
- npm.io page: https://npm.io/package/bulk-contact

## Recent versions

- 0.0.4 (latest) — 2022-12-05
- 0.0.3 — 2022-12-05
- 0.0.2 — 2022-12-05
- 0.0.1 — 2022-12-03

## README

# bulk-contact

Allow to save multiple contact detail in ionic capacitor 

## Install

```bash
npm install bulk-contact
npx cap sync
```

## Example
    BulkContact.getPermissions().then(permissionResponse => {
      if (permissionResponse) {
        if (permissionResponse.granted) {
          for (const currentContact of contactList) {
            BulkContact.saveContact({
              name: currentContact.name, 
              mobile: currentContact.mobile
            }).then(() => {
              console.log('contact saved');
            }).catch((exception) => {
              console.log(exception);
            }); 
          }
        } else {
          console.log('permission denied');
        }
      }
    });

## API

<docgen-index>

* [`getPermissions()`](#getpermissions)
* [`getContacts()`](#getcontacts)
* [`saveContact(...)`](#savecontact)
* [Interfaces](#interfaces)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### getPermissions()

```typescript
getPermissions() => Promise<PermissionStatus>
```

**Returns:** <code>Promise&lt;<a href="#permissionstatus">PermissionStatus</a>&gt;</code>

--------------------


### getContacts()

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

**Returns:** <code>Promise&lt;{ contacts: Contact[]; }&gt;</code>

--------------------


### saveContact(...)

```typescript
saveContact(contact: NewContact) => Promise<void>
```

| Param         | Type                                              |
| ------------- | ------------------------------------------------- |
| **`contact`** | <code><a href="#newcontact">NewContact</a></code> |

--------------------


### Interfaces


#### PermissionStatus

| Prop          | Type                 |
| ------------- | -------------------- |
| **`granted`** | <code>boolean</code> |


#### Contact

| Prop                   | Type                        |
| ---------------------- | --------------------------- |
| **`contactId`**        | <code>string</code>         |
| **`displayName`**      | <code>string</code>         |
| **`phoneNumbers`**     | <code>PhoneNumber[]</code>  |
| **`emails`**           | <code>EmailAddress[]</code> |
| **`photoThumbnail`**   | <code>string</code>         |
| **`organizationName`** | <code>string</code>         |
| **`organizationRole`** | <code>string</code>         |
| **`birthday`**         | <code>string</code>         |


#### PhoneNumber

| Prop         | Type                |
| ------------ | ------------------- |
| **`label`**  | <code>string</code> |
| **`number`** | <code>string</code> |


#### EmailAddress

| Prop          | Type                |
| ------------- | ------------------- |
| **`label`**   | <code>string</code> |
| **`address`** | <code>string</code> |


#### NewContact

New contact schema.

| Prop         | Type                |
| ------------ | ------------------- |
| **`name`**   | <code>string</code> |
| **`mobile`** | <code>string</code> |

</docgen-api>

---
_Source: https://npm.io/package/bulk-contact · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
