{"_id":"@avasapp/react-native-app-intents","_rev":"4-dbce4e786afcde1ad2855952050c848d","name":"@avasapp/react-native-app-intents","dist-tags":{"latest":"0.2.6"},"versions":{"0.2.4":{"name":"@avasapp/react-native-app-intents","version":"0.2.4","license":"MIT","_id":"@avasapp/react-native-app-intents@0.2.4","maintainers":[{"name":"athik.dev","email":"athik@avas.dev"}],"homepage":"https://github.com/avasapp/react-native-app-intents#readme","bugs":{"url":"https://github.com/avasapp/react-native-app-intents/issues"},"bin":{"app-intents":"dist/cli/cli.js"},"dist":{"shasum":"ea128d3e5952ab7ce39f630f5bc4ce3541d05c17","tarball":"https://registry.npmjs.org/@avasapp/react-native-app-intents/-/react-native-app-intents-0.2.4.tgz","fileCount":71,"integrity":"sha512-z4zbBonseQGDtce0zilXneY0KEDPFd2Tq7WhS3XIR3GQL+HZLDrCsT0j6TPvWOtGynVU2eIcgs4ZLf1zzY1VRQ==","signatures":[{"sig":"MEUCIQD0cjDjEqfzO9cbgQGyq8Rnd0ejl9OX2sEbyRE7dc6qhwIgC+zjzxWmur6QWl6v3gQgXt2YKXUF+oM8fPU1zrIR7Ps=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":292920},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js","react-native":"./dist/index.js"},"./cli":{"types":"./dist/cli/index.d.ts","default":"./dist/cli/index.js"},"./core":{"types":"./dist/core/index.d.ts","default":"./dist/core/index.js"},"./codegen":{"types":"./dist/codegen/index.d.ts","default":"./dist/codegen/index.js"},"./expo-plugin":{"types":"./dist/expo-plugin/index.d.ts","default":"./dist/expo-plugin/index.js"},"./package.json":{"default":"./package.json"},"./app.plugin.js":{"default":"./app.plugin.js"}},"gitHead":"6e10b94cb8cdb5deb2cb39811c092d4bf4109fdb","scripts":{"test":"bun test","build":"tsc -p tsconfig.build.json"},"_npmUser":{"name":"athik.dev","email":"athik@avas.dev"},"repository":{"url":"git+https://github.com/avasapp/react-native-app-intents.git","type":"git","directory":"packages/react-native"},"_npmVersion":"10.8.2","description":"React Native runtime, authoring API, codegen, CLI, and Expo plugin for App Intents.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.3","dependencies":{"@expo/config":"^55.0.16","@expo/require-utils":"^55.0.5","@expo/config-plugins":"^55.0.8"},"react-native":"./dist/index.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-app-intents_0.2.4_1779254652468_0.43167119861555436","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@avasapp/react-native-app-intents","version":"0.2.5","license":"MIT","_id":"@avasapp/react-native-app-intents@0.2.5","maintainers":[{"name":"athik.dev","email":"athik@avas.dev"}],"homepage":"https://github.com/avas-app/react-native-app-intents#readme","bugs":{"url":"https://github.com/avas-app/react-native-app-intents/issues"},"bin":{"app-intents":"dist/cli/cli.js"},"dist":{"shasum":"4b738fb42cdba9582d205589a257ac8d5902b2a5","tarball":"https://registry.npmjs.org/@avasapp/react-native-app-intents/-/react-native-app-intents-0.2.5.tgz","fileCount":71,"integrity":"sha512-DNHLgMKbYBWxBMW/+3qGgXobmmhieACjz+EG2YyyAZZnkejk3SluHNWCJ6ZRQICuR3Wl9K82uK5Jc9M8rH0Blg==","signatures":[{"sig":"MEUCIEIk3aP3d8WvOQQYBFU+BX+sT7qI3Jx3Dk4OKKc78OKlAiEAkrie3QV8lNVn7l5kFDTrwL73olzED+Yrbd+Sqz5PJsA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":293122},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js","react-native":"./dist/index.js"},"./cli":{"types":"./dist/cli/index.d.ts","default":"./dist/cli/index.js"},"./core":{"types":"./dist/core/index.d.ts","default":"./dist/core/index.js"},"./codegen":{"types":"./dist/codegen/index.d.ts","default":"./dist/codegen/index.js"},"./expo-plugin":{"types":"./dist/expo-plugin/index.d.ts","default":"./dist/expo-plugin/index.js"},"./package.json":{"default":"./package.json"},"./app.plugin.js":{"default":"./app.plugin.js"}},"gitHead":"b130d633418eb9fff9d2d14c1d3cae3079c4a7ae","scripts":{"test":"bun test","build":"tsc -p tsconfig.build.json"},"_npmUser":{"name":"athik.dev","email":"athik@avas.dev"},"repository":{"url":"git+https://github.com/avas-app/react-native-app-intents.git","type":"git","directory":"packages/react-native"},"_npmVersion":"10.8.2","description":"React Native runtime, authoring API, codegen, CLI, and Expo plugin for App Intents.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.3","dependencies":{"@expo/config":"^55.0.16","@expo/require-utils":"^55.0.5","@expo/config-plugins":"^55.0.8"},"react-native":"./dist/index.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-app-intents_0.2.5_1779607388126_0.9713199645042694","host":"s3://npm-registry-packages-npm-production"}},"0.2.6":{"name":"@avasapp/react-native-app-intents","version":"0.2.6","description":"React Native runtime, authoring API, codegen, CLI, and Expo plugin for App Intents.","license":"MIT","author":{"name":"avas-app"},"repository":{"type":"git","url":"git+https://github.com/avas-app/react-native-app-intents.git","directory":"packages/react-native"},"bin":{"app-intents":"dist/cli/cli.js"},"type":"module","sideEffects":false,"main":"./dist/index.js","types":"./dist/index.d.ts","react-native":"./dist/index.js","exports":{".":{"react-native":"./dist/index.js","types":"./dist/index.d.ts","default":"./dist/index.js"},"./codegen":{"types":"./dist/codegen/index.d.ts","default":"./dist/codegen/index.js"},"./cli":{"types":"./dist/cli/index.d.ts","default":"./dist/cli/index.js"},"./expo-plugin":{"types":"./dist/expo-plugin/index.d.ts","default":"./dist/expo-plugin/index.js"},"./app.plugin.js":{"default":"./app.plugin.js"},"./core":{"types":"./dist/core/index.d.ts","default":"./dist/core/index.js"},"./package.json":{"default":"./package.json"}},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"bun test"},"dependencies":{"@expo/config":"^55.0.16","@expo/config-plugins":"^55.0.8","@expo/require-utils":"^55.0.5"},"peerDependencies":{"react":"*","react-native":"*"},"gitHead":"ea324d7f5516de80a1c83f099bb2f2d47627e885","_id":"@avasapp/react-native-app-intents@0.2.6","bugs":{"url":"https://github.com/avas-app/react-native-app-intents/issues"},"homepage":"https://github.com/avas-app/react-native-app-intents#readme","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-vJkpMi1P6LxhaeUUVR9ILzEPtOgChOulxxOoS19VA4+Ah5Wc4XZU0Up6yDftwZieHVpEUO7CLOEAxi3hFK5rsQ==","shasum":"066e4bd45f12b8bd02ce165ad7ebfff1cece5303","tarball":"https://registry.npmjs.org/@avasapp/react-native-app-intents/-/react-native-app-intents-0.2.6.tgz","fileCount":72,"unpackedSize":296214,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC85rpfxceChCzu69qpRuSlscLlghcoqfkG+qwFUJ1OXgIgfV9p9ExfvDy3pxDoV0Xg4ykStE6uoxujPzS6YSKHY0w="}]},"_npmUser":{"name":"crockalet","email":"npm.drainage506@passmail.net"},"directories":{},"maintainers":[{"name":"crockalet","email":"npm.drainage506@passmail.net"},{"name":"athik.dev","email":"athik@avas.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-app-intents_0.2.6_1786863136777_0.36735343563752765"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-20T05:24:12.338Z","modified":"2026-08-16T06:52:17.091Z","0.2.4":"2026-05-20T05:24:12.643Z","0.2.5":"2026-05-24T07:23:08.289Z","0.2.6":"2026-08-16T06:52:16.932Z"},"bugs":{"url":"https://github.com/avas-app/react-native-app-intents/issues"},"license":"MIT","homepage":"https://github.com/avas-app/react-native-app-intents#readme","repository":{"type":"git","url":"git+https://github.com/avas-app/react-native-app-intents.git","directory":"packages/react-native"},"description":"React Native runtime, authoring API, codegen, CLI, and Expo plugin for App Intents.","maintainers":[{"name":"crockalet","email":"npm.drainage506@passmail.net"},{"name":"athik.dev","email":"athik@avas.dev"}],"readme":"# react-native-app-intents\n\nType-safe App Intents, App Shortcuts, dynamic shortcut helpers, codegen, CLI, and Expo prebuild automation for React Native.\n\n```bash\nnpm install @avasapp/react-native-app-intents\n```\n\nFull usage docs are included in this package under `docs/` and published at:\n`https://avas-app.github.io/react-native-app-intents/`\n\n## Basic setup\n\nCreate `app-intents.config.ts` at your app root:\n\n```ts\nimport { defineAppIntentsConfig } from \"@avasapp/react-native-app-intents/codegen\";\n\nexport default defineAppIntentsConfig({\n  intents: [\"src/**/*.intents.ts\"],\n  scheme: \"myapp\",\n  ios: {\n    output: \"ios/MyApp/AppShortcuts.swift\",\n    bundleIdentifier: \"com.example.myapp\",\n    siriUsageDescription: \"Used to let Siri run app actions.\",\n  },\n  android: {\n    manifest: \"android/app/src/main/AndroidManifest.xml\",\n    shortcutsOutput: \"android/app/src/main/res/xml/app_shortcuts.xml\",\n    packageName: \"com.example.myapp\",\n  },\n  types: { output: \"src/generated/app-intents.d.ts\" },\n});\n```\n\nDefine intents:\n\n```ts\nimport { defineIntent, p } from \"@avasapp/react-native-app-intents\";\n\nexport const openOrder = defineIntent({\n  id: \"openOrder\",\n  title: \"Open Order\",\n  phrases: [\"Open order ${orderNumber} in ${.applicationName}\"],\n  params: {\n    orderNumber: p.string({\n      androidBiiParam: \"order\",\n      title: \"Order number\",\n      default: \"1234\",\n    }),\n  },\n  surfaces: {\n    spotlight: true,\n    appShortcut: {\n      icon: {\n        androidResourceName: \"@mipmap/ic_launcher_round\",\n        systemName: \"shippingbox\",\n      },\n    },\n  },\n  android: {\n    appAction: {\n      capability: \"actions.intent.GET_ORDER\",\n    },\n  },\n  ios: {\n    appIntent: {},\n  },\n});\n```\n\nGenerate native files:\n\n```bash\nnpx app-intents generate\n```\n\n## Expo setup\n\nUse the package root as an Expo config plugin. The plugin auto-loads the same\n`app-intents.config.ts` file used by the CLI:\n\n```json\n{\n  \"expo\": {\n    \"plugins\": [\"@avasapp/react-native-app-intents\"]\n  }\n}\n```\n\nTo use a different config file, pass `configPath`:\n\n```json\n{\n  \"expo\": {\n    \"plugins\": [[\"@avasapp/react-native-app-intents\", { \"configPath\": \"./config/app-intents.ts\" }]]\n  }\n}\n```\n\nIn Expo prebuilds, configured `ios.output`, `android.manifest`,\n`android.shortcutsOutput`, and `android.shortcutsStringsOutput` paths are honored\nrelative to the app root. If `ios.output` does not start with `ios/`, it is\nwritten under the generated iOS project folder. The generated Android manifest\nalso ensures `MainActivity` uses a foreground-intent-compatible launch mode for\nAssistant/App Action deep links.\n\n### Custom shortcut icons with `expo-asset`\n\nFor custom **Android** shortcut icons in Expo apps, add the image files to native\nresources with the `expo-asset` config plugin, then reference the generated\nresource name from `androidResourceName`:\n\n```json\n{\n  \"expo\": {\n    \"plugins\": [\n      [\"expo-asset\", { \"assets\": [\"./assets/shortcuts/open_order.png\"] }],\n      \"@avasapp/react-native-app-intents\"\n    ]\n  }\n}\n```\n\n```ts\nsurfaces: {\n  appShortcut: {\n    icon: {\n      androidResourceName: \"@drawable/open_order\",\n      systemName: \"shippingbox\",\n    },\n  },\n}\n```\n\nFor iOS **dynamic shortcuts**, you can also point at a bundled template image\nname from the same asset file:\n\n```ts\nawait appIntents.updateDynamicShortcuts([\n  {\n    icon: {\n      androidResourceName: \"@drawable/open_order\",\n      iosTemplateImageName: \"open_order\",\n      systemName: \"shippingbox\",\n    },\n    intent: openOrder,\n    params: { orderNumber: \"1234\" },\n    shortTitle: \"Open order #1234\",\n  },\n]);\n```\n\n`expo-asset` uses the file name as the native resource name, so keep shortcut\nasset files lowercase with underscores (for example, `open_order.png`). Run\n`npx expo prebuild` again after adding or renaming assets.\n\nOn iOS, `iosTemplateImageName` only applies to **dynamic shortcuts** and renders\nas a template/tinted silhouette. Generated App Shortcuts still use `systemName`\nonly; Expo-bundled PNG assets are not used there.\n\n## Runtime usage\n\n```ts\nimport { createAppIntentsRuntime } from \"@avasapp/react-native-app-intents\";\nimport { openOrder } from \"./orders.intents\";\n\nconst appIntents = createAppIntentsRuntime({\n  scheme: \"myapp\",\n  intents: [openOrder] as const,\n});\n\nappIntents.onIntent(openOrder, (params) => {\n  // Navigate to the requested order.\n});\n```\n\n## Auth-gated apps\n\nFor apps where shortcuts should only exist for signed-in users or enabled\nfeatures, donate after a successful action, then clear donations and remove\ndynamic shortcuts when auth or feature flags change:\n\n```ts\nimport { useEffect } from \"react\";\n\nasync function handleOpenedOrder(orderNumber: string) {\n  await appIntents.donate(openOrder, { orderNumber });\n}\n\nuseEffect(() => {\n  if (!session || !flags.orderShortcuts) {\n    void appIntents.clearDonations();\n    void appIntents.updateDynamicShortcuts([]);\n    return;\n  }\n\n  void appIntents.updateDynamicShortcuts([\n    {\n      icon: {\n        androidResourceName: \"@mipmap/ic_launcher_round\",\n        systemName: \"shippingbox\",\n      },\n      intent: openOrder,\n      params: { orderNumber: session.lastViewedOrderNumber },\n      shortTitle: \"Open last order\",\n      longTitle: `Open order ${session.lastViewedOrderNumber}`,\n    },\n  ]);\n}, [session, flags.orderShortcuts]);\n\nasync function logout() {\n  await auth.signOut();\n  await appIntents.clearDonations();\n  await appIntents.updateDynamicShortcuts([]);\n}\n```\n\n`surfaces.appShortcut` still accepts `true`, but you can also pass an object to set\nan iOS SF Symbol (`systemName`) and/or an Android shortcut resource reference\n(`androidResourceName`, such as `@mipmap/ic_launcher_round`).\n\n## Android App Actions contract\n\n- Use `android.appAction` to opt an intent into Android App Actions.\n- Android App Actions are the primary Android target; Google Assistant voice support is best-effort.\n- `surfaces.assistant` and top-level `androidBii` are legacy shims and should be avoided in new intent definitions.\n\n## iOS Siri / App Intents contract\n\n- Use `ios.appIntent` to opt an intent into native Siri/App Intents generation.\n- `surfaces.siri` no longer enables App Intents by itself; keep using `surfaces.appShortcut` and `surfaces.spotlight` for those separate surfaces.\n- Static `ios.appIntent.response.dialog` is supported only for background intents; it cannot be combined with `behavior.opensAppToForeground`.\n- `object` params are flattened into Swift leaf parameters for App Intents, but phrases cannot interpolate the object parameter itself.\n\n## iOS Siri / App Intents support matrix\n\n| Scenario                                                 | Status            | Coverage                                     |\n| -------------------------------------------------------- | ----------------- | -------------------------------------------- |\n| `ios.appIntent` foreground URL handoff                   | Supported         | Codegen snapshot, runtime tests, example app |\n| Static `ios.appIntent.response.dialog`                   | Supported         | Core validation, Swift typecheck, snapshot   |\n| Nested `object` params in generated App Intents          | Supported         | Core validation, Swift typecheck, snapshot   |\n| `surfaces.siri` without `ios.appIntent`                  | Unsupported       | Core validation                              |\n| Object-param placeholders inside `phrases`               | Unsupported       | Core validation                              |\n| Custom bundled image assets in generated App Shortcuts   | Unsupported       | Documentation only                           |\n| Dynamic Siri dialog sourced from JS/native perform logic | Not yet supported | Explicit non-goal for current slice          |\n","readmeFilename":"README.md","author":{"name":"avas-app"}}