Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More โ†’
Socket
Sign inDemoInstall
Socket

@capacitor-community/contacts

Package Overview
Dependencies
Maintainers
31
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor-community/contacts - npm Package Compare versions

Comparing version 0.1.1 to 1.0.5

dist/docs.json

15

dist/esm/definitions.d.ts

@@ -1,5 +0,6 @@

declare module "@capacitor/core" {
interface PluginRegistry {
Contacts: ContactsPlugin;
}
export interface ContactsPlugin {
getPermissions(): Promise<PermissionStatus>;
getContacts(): Promise<{
contacts: Contact[];
}>;
}

@@ -27,7 +28,1 @@ export interface PermissionStatus {

}
export interface ContactsPlugin {
getPermissions(): Promise<PermissionStatus>;
getContacts(): Promise<{
contacts: Contact[];
}>;
}

@@ -0,1 +1,7 @@

// declare module "@capacitor/core" {
// interface PluginRegistry {
// Contacts: ContactsPlugin;
// }
// }
export {};
//# sourceMappingURL=definitions.js.map

@@ -1,2 +0,4 @@

export * from "./definitions";
export * from "./web";
import type { ContactsPlugin } from './definitions';
declare const Contacts: ContactsPlugin;
export * from './definitions';
export { Contacts };

@@ -1,3 +0,7 @@

export * from "./definitions";
export * from "./web";
import { registerPlugin } from '@capacitor/core';
const Contacts = registerPlugin('Contacts', {
web: () => import('./web').then(m => new m.ContactsPluginWeb()),
});
export * from './definitions';
export { Contacts };
//# sourceMappingURL=index.js.map

@@ -9,4 +9,9 @@ import { WebPlugin } from "@capacitor/core";

}>;
echo(options: {
value: string;
}): Promise<{
value: string;
}>;
}
declare const Contacts: ContactsPluginWeb;
export { Contacts };

@@ -1,11 +0,2 @@

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
import { WebPlugin, registerWebPlugin } from "@capacitor/core";
import { WebPlugin } from "@capacitor/core";
export class ContactsPluginWeb extends WebPlugin {

@@ -18,16 +9,15 @@ constructor() {

}
getPermissions() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error("getPermission not available");
});
async getPermissions() {
throw new Error("getPermission not available");
}
getContacts() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error("getContacts not available");
});
async getContacts() {
throw new Error("getContacts not available");
}
async echo(options) {
console.log('ECHO', options);
return options;
}
}
const Contacts = new ContactsPluginWeb();
export { Contacts };
registerWebPlugin(Contacts);
//# sourceMappingURL=web.js.map
{
"name": "@capacitor-community/contacts",
"version": "0.1.1",
"version": "1.0.5",
"description": "Contacts Plugin for Capacitor",
"main": "dist/esm/index.js",
"main": "dist/plugin.cjs.js",
"module": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
"scripts": {
"build": "npm run clean && tsc",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build"
},
"unpkg": "dist/plugin.js",
"files": [
"android/src/main/",
"android/build.gradle",
"dist/",
"ios/Plugin/",
"Contacts.podspec"
],
"author": "Jonathan Gerber",
"license": "MIT",
"dependencies": {
"@capacitor/core": "latest"
"repository": {
"type": "git",
"url": "git+https://github.com/capacitor-community/contacts.git"
},
"devDependencies": {
"@capacitor/android": "latest",
"@capacitor/ios": "latest",
"all-contributors-cli": "^6.17.0",
"husky": "^4.2.5",
"np": "^6.2.4",
"prettier": "^2.0.5",
"prettier-plugin-java": "^0.8.0",
"pretty-quick": "^2.0.1",
"rimraf": "^3.0.0",
"typescript": "^3.2.4"
"bugs": {
"url": "https://github.com/capacitor-community/contacts/issues"
},
"files": [
"dist/",
"ios/",
"android/",
"CapacitorCommunityContacts.podspec"
],
"keywords": [

@@ -41,2 +30,42 @@ "capacitor",

],
"scripts": {
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
"verify:android": "cd android && ./gradlew clean build test && cd ..",
"verify:web": "npm run build",
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- autocorrect --format",
"eslint": "eslint . --ext ts",
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api ContactsPlugin --output-readme README.md --output-json dist/docs.json",
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "next",
"@capacitor/core": "next",
"@capacitor/docgen": "^0.0.10",
"@capacitor/ios": "next",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
"eslint": "^7.11.0",
"prettier": "~2.2.0",
"prettier-plugin-java": "~1.0.0",
"rimraf": "^3.0.2",
"rollup": "^2.32.0",
"swiftlint": "^1.0.1",
"typescript": "~4.0.3"
},
"peerDependencies": {
"@capacitor/core": "next"
},
"prettier": "@ionic/prettier-config",
"swiftlint": "@ionic/swiftlint-config",
"eslintConfig": {
"extends": "@ionic/eslint-config/recommended"
},
"capacitor": {

@@ -49,15 +78,3 @@ "ios": {

}
},
"repository": {
"type": "git",
"url": "https://github.com/capacitor-community/contacts"
},
"bugs": {
"url": "https://github.com/capacitor-community/contacts/issues"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
}
}

@@ -214,1 +214,78 @@ <p align="center"><br><img src="https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png" width="128" height="128" /></p>

<!-- ALL-CONTRIBUTORS-LIST:END -->
## API
<docgen-index>
* [`getPermissions()`](#getpermissions)
* [`getContacts()`](#getcontacts)
* [Interfaces](#interfaces)
</docgen-index>
<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
### getPermissions()
```typescript
getPermissions() => any
```
**Returns:** <code>any</code>
--------------------
### getContacts()
```typescript
getContacts() => any
```
**Returns:** <code>any</code>
--------------------
### Interfaces
#### PermissionStatus
| Prop | Type |
| ------------- | -------------------- |
| **`granted`** | <code>boolean</code> |
#### Contact
| Prop | Type |
| ---------------------- | ------------------- |
| **`contactId`** | <code>string</code> |
| **`displayName`** | <code>string</code> |
| **`phoneNumbers`** | <code>{}</code> |
| **`emails`** | <code>{}</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> |
</docgen-api>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc