{"_id":"@capawesome/capacitor-vapi","name":"@capawesome/capacitor-vapi","dist-tags":{"dev":"5.0.0-dev.25c9a34.1728154031","latest":"5.0.0-dev.25c9a34.1728154031"},"versions":{"5.0.0-dev.25c9a34.1728154031":{"name":"@capawesome/capacitor-vapi","version":"5.0.0-dev.25c9a34.1728154031","description":"Unofficial Capacitor plugin for Vapi SDK.","main":"dist/plugin.cjs.js","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/capawesome-team/capacitor-plugins.git"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"funding":[{"type":"github","url":"https://github.com/sponsors/capawesome-team/"},{"type":"opencollective","url":"https://opencollective.com/capawesome"}],"homepage":"https://capawesome.io/plugins/screen-orientation/","keywords":["capacitor","plugin","native"],"scripts":{"verify":"npm run verify:ios && npm run verify:android && npm run verify:web","verify:ios":"xcodebuild -scheme CapawesomeCapacitorVapi -destination generic/platform=iOS","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 -- --fix --format","eslint":"eslint . --ext ts","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","docgen":"docgen --api VapiPlugin --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":"6.0.0","@capacitor/cli":"6.0.0","@capacitor/core":"6.0.0","@capacitor/docgen":"0.2.0","@capacitor/ios":"6.0.0","@ionic/eslint-config":"0.3.0","@ionic/swiftlint-config":"1.1.2","@vapi-ai/web":"2.1.3","eslint":"7.32.0","openai":"4.62.1","prettier":"2.3.2","prettier-plugin-java":"1.0.2","rimraf":"3.0.2","rollup":"2.77.2","swiftlint":"1.0.1","typescript":"4.7.4"},"peerDependencies":{"@capacitor/core":"^6.0.0"},"swiftlint":"@ionic/swiftlint-config","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"publishConfig":{"access":"public"},"_id":"@capawesome/capacitor-vapi@5.0.0-dev.25c9a34.1728154031","gitHead":"25c9a346469e37bce4f468cb56d61c56fb5d4e74","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-fGHy3sMDjwVQ4lLDzI3Y/TJz3VxAavtv4KtAUPqHYtO6YkfPxx04eulV4yNs9Hqe2UMvmFJ/5Cr4oD3PHQiYPA==","shasum":"ca9b5e0045217a83cc241af9594c99fc736da327","tarball":"https://registry.npmjs.org/@capawesome/capacitor-vapi/-/capacitor-vapi-5.0.0-dev.25c9a34.1728154031.tgz","fileCount":38,"unpackedSize":78285,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHBIwVBrc/OvHXrT7JXbUcYzkJb3WzmSg0XUipD3tICYAiBYh3jbhIi6XXZVRT+cEhgXwuDCG6Oy05vKiSfNDv7SIw=="}]},"_npmUser":{"name":"robingenz","email":"mail@robingenz.dev"},"directories":{},"maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/capacitor-vapi_5.0.0-dev.25c9a34.1728154031_1728154075652_0.1994182352641105"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-05T18:47:55.547Z","5.0.0-dev.25c9a34.1728154031":"2024-10-05T18:47:55.817Z","modified":"2024-10-05T18:47:56.129Z"},"maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"description":"Unofficial Capacitor plugin for Vapi SDK.","homepage":"https://capawesome.io/plugins/screen-orientation/","keywords":["capacitor","plugin","native"],"repository":{"type":"git","url":"git+https://github.com/capawesome-team/capacitor-plugins.git"},"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"license":"MIT","readme":"# @capawesome/capacitor-vapi\n\nUnofficial Capacitor plugin for [Vapi](https://vapi.ai/).[^1]\n\n## Installation\n\n```bash\nnpm install @capawesome/capacitor-vapi @vapi-ai/web openai\nnpx cap sync\n```\n\n### Android\n\n#### Variables\n\nThis plugin will use the following project variables (defined in your app’s `variables.gradle` file):\n\n- `$androidxCoreKtxVersion` version of `androidx.core:core-ktx` (default: `1.13.1`)\n\n### iOS\n\nAdd the `NSMicrophoneUsageDescription`, `NSCameraUsageDescription` and `UIBackgroundModes` keys to the `Info.plist` file (usually `ios/App/App/Info.plist`), which tells the user why your app needs access to the microphone and camera, and that it needs to run in the background:\n\n```xml\n<key>NSMicrophoneUsageDescription</key>\n<string>The app needs access to the microphone to record audio.</string>\n<key>NSCameraUsageDescription</key>\n<string>The app needs access to the camera to record video.</string>\n<key>UIBackgroundModes</key>\n<array>\n  <string>voip</string>\n  <string>audio</string>\n</array>\n```\n\n## Configuration\n\nNo configuration required for this plugin.\n\n## Usage\n\n```typescript\nimport { Vapi } from '@capawesome/capacitor-vapi';\n\nconst echo = async () => {\n  await Vapi.echo();\n};\n```\n\n## API\n\n<docgen-index>\n\n* [`isMuted()`](#ismuted)\n* [`say(...)`](#say)\n* [`setMuted(...)`](#setmuted)\n* [`setup(...)`](#setup)\n* [`start(...)`](#start)\n* [`stop()`](#stop)\n* [`addListener('callEnd', ...)`](#addlistenercallend)\n* [`addListener('callStart', ...)`](#addlistenercallstart)\n* [`addListener('conversationUpdate', ...)`](#addlistenerconversationupdate)\n* [`addListener('error', ...)`](#addlistenererror)\n* [`addListener('speechUpdate', ...)`](#addlistenerspeechupdate)\n* [`removeAllListeners()`](#removealllisteners)\n* [Interfaces](#interfaces)\n* [Type Aliases](#type-aliases)\n\n</docgen-index>\n\n<docgen-api>\n<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->\n\n### isMuted()\n\n```typescript\nisMuted() => Promise<IsMutedResult>\n```\n\n**Returns:** <code>Promise&lt;<a href=\"#ismutedresult\">IsMutedResult</a>&gt;</code>\n\n--------------------\n\n\n### say(...)\n\n```typescript\nsay(options: SayOptions) => Promise<void>\n```\n\n| Param         | Type                                              |\n| ------------- | ------------------------------------------------- |\n| **`options`** | <code><a href=\"#sayoptions\">SayOptions</a></code> |\n\n--------------------\n\n\n### setMuted(...)\n\n```typescript\nsetMuted(options: SetMutedOptions) => Promise<void>\n```\n\n| Param         | Type                                                        |\n| ------------- | ----------------------------------------------------------- |\n| **`options`** | <code><a href=\"#setmutedoptions\">SetMutedOptions</a></code> |\n\n--------------------\n\n\n### setup(...)\n\n```typescript\nsetup(options: SetupOptions) => Promise<void>\n```\n\n| Param         | Type                                                  |\n| ------------- | ----------------------------------------------------- |\n| **`options`** | <code><a href=\"#setupoptions\">SetupOptions</a></code> |\n\n--------------------\n\n\n### start(...)\n\n```typescript\nstart(options: StartOptions) => Promise<void>\n```\n\n| Param         | Type                                                  |\n| ------------- | ----------------------------------------------------- |\n| **`options`** | <code><a href=\"#startoptions\">StartOptions</a></code> |\n\n--------------------\n\n\n### stop()\n\n```typescript\nstop() => Promise<void>\n```\n\n--------------------\n\n\n### addListener('callEnd', ...)\n\n```typescript\naddListener(eventName: 'callEnd', listenerFunc: CallEndEventListener) => Promise<PluginListenerHandle>\n```\n\n| Param              | Type                                                                  |\n| ------------------ | --------------------------------------------------------------------- |\n| **`eventName`**    | <code>'callEnd'</code>                                                |\n| **`listenerFunc`** | <code><a href=\"#callendeventlistener\">CallEndEventListener</a></code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#pluginlistenerhandle\">PluginListenerHandle</a>&gt;</code>\n\n--------------------\n\n\n### addListener('callStart', ...)\n\n```typescript\naddListener(eventName: 'callStart', listenerFunc: CallStartEventListener) => Promise<PluginListenerHandle>\n```\n\n| Param              | Type                                                                      |\n| ------------------ | ------------------------------------------------------------------------- |\n| **`eventName`**    | <code>'callStart'</code>                                                  |\n| **`listenerFunc`** | <code><a href=\"#callstarteventlistener\">CallStartEventListener</a></code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#pluginlistenerhandle\">PluginListenerHandle</a>&gt;</code>\n\n--------------------\n\n\n### addListener('conversationUpdate', ...)\n\n```typescript\naddListener(eventName: 'conversationUpdate', listenerFunc: ConversationUpdateEventListener) => Promise<PluginListenerHandle>\n```\n\n| Param              | Type                                                                                        |\n| ------------------ | ------------------------------------------------------------------------------------------- |\n| **`eventName`**    | <code>'conversationUpdate'</code>                                                           |\n| **`listenerFunc`** | <code><a href=\"#conversationupdateeventlistener\">ConversationUpdateEventListener</a></code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#pluginlistenerhandle\">PluginListenerHandle</a>&gt;</code>\n\n--------------------\n\n\n### addListener('error', ...)\n\n```typescript\naddListener(eventName: 'error', listenerFunc: ErrorEventListener) => Promise<PluginListenerHandle>\n```\n\n| Param              | Type                                                              |\n| ------------------ | ----------------------------------------------------------------- |\n| **`eventName`**    | <code>'error'</code>                                              |\n| **`listenerFunc`** | <code><a href=\"#erroreventlistener\">ErrorEventListener</a></code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#pluginlistenerhandle\">PluginListenerHandle</a>&gt;</code>\n\n--------------------\n\n\n### addListener('speechUpdate', ...)\n\n```typescript\naddListener(eventName: 'speechUpdate', listenerFunc: SpeechUpdateEventListener) => Promise<PluginListenerHandle>\n```\n\n| Param              | Type                                                                            |\n| ------------------ | ------------------------------------------------------------------------------- |\n| **`eventName`**    | <code>'speechUpdate'</code>                                                     |\n| **`listenerFunc`** | <code><a href=\"#speechupdateeventlistener\">SpeechUpdateEventListener</a></code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#pluginlistenerhandle\">PluginListenerHandle</a>&gt;</code>\n\n--------------------\n\n\n### removeAllListeners()\n\n```typescript\nremoveAllListeners() => Promise<void>\n```\n\nRemove all listeners for this plugin.\n\n--------------------\n\n\n### Interfaces\n\n\n#### IsMutedResult\n\n| Prop        | Type                 |\n| ----------- | -------------------- |\n| **`muted`** | <code>boolean</code> |\n\n\n#### SayOptions\n\n| Prop                     | Type                 | Description            |\n| ------------------------ | -------------------- | ---------------------- |\n| **`message`**            | <code>string</code>  |                        |\n| **`endCallAfterSpoken`** | <code>boolean</code> | Only available on Web. |\n\n\n#### SetMutedOptions\n\n| Prop        | Type                 |\n| ----------- | -------------------- |\n| **`muted`** | <code>boolean</code> |\n\n\n#### SetupOptions\n\n| Prop         | Type                |\n| ------------ | ------------------- |\n| **`apiKey`** | <code>string</code> |\n\n\n#### StartOptions\n\n| Prop              | Type                |\n| ----------------- | ------------------- |\n| **`assistantId`** | <code>string</code> |\n\n\n#### PluginListenerHandle\n\n| Prop         | Type                                      |\n| ------------ | ----------------------------------------- |\n| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |\n\n\n#### ConversationUpdateEvent\n\n| Prop           | Type                                                                         |\n| -------------- | ---------------------------------------------------------------------------- |\n| **`messages`** | <code>{ content: string; role: 'user' \\| 'assistant' \\| 'system'; }[]</code> |\n\n\n#### ErrorEvent\n\nEvents providing information related to errors in scripts or in files.\n\n| Prop           | Type                |\n| -------------- | ------------------- |\n| **`colno`**    | <code>number</code> |\n| **`error`**    | <code>any</code>    |\n| **`filename`** | <code>string</code> |\n| **`lineno`**   | <code>number</code> |\n| **`message`**  | <code>string</code> |\n\n\n#### SpeechUpdateEvent\n\n| Prop         | Type                                | Description                        |\n| ------------ | ----------------------------------- | ---------------------------------- |\n| **`role`**   | <code>'user' \\| 'assistant'</code>  | Only available on Android and iOS. |\n| **`status`** | <code>'stopped' \\| 'started'</code> |                                    |\n\n\n### Type Aliases\n\n\n#### CallEndEventListener\n\n<code>(): void</code>\n\n\n#### CallStartEventListener\n\n<code>(): void</code>\n\n\n#### ConversationUpdateEventListener\n\n<code>(event: <a href=\"#conversationupdateevent\">ConversationUpdateEvent</a>): void</code>\n\n\n#### ErrorEventListener\n\n<code>(error: <a href=\"#errorevent\">ErrorEvent</a>): void</code>\n\n\n#### SpeechUpdateEventListener\n\n<code>(event: <a href=\"#speechupdateevent\">SpeechUpdateEvent</a>): void</code>\n\n</docgen-api>\n\n## Changelog\n\nSee [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/vapi/CHANGELOG.md).\n\n## License\n\nSee [LICENSE](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/vapi/LICENSE).\n\n[^1]: This project is not affiliated with, endorsed by, sponsored by, or approved by Superpowered Labs Inc. or any of their affiliates or subsidiaries.\n","readmeFilename":"README.md"}