紧接连接重现原生 SDK
一个轻量级的回放原生SDK,将Fasten Connect的经验嵌入任何回放原生应用程序中. 这个
软件包将 Stitch.js 工作流程包成一对协调 WebViews 这样您就可以通过提供者门户认证
并接收连接事件而不离开您的本地应用程序.
安装
将软件包添加到您的项目中, 以及其对应的本地对等依赖 :
npm install @fastenhealth/fasten-stitch-element-react-native react-native-webview
# or
yarn add @fastenhealth/fasten-stitch-element-react-native react-native-webview
react-native-base64 和SDK捆绑在一起 如果你还没有 react-native-webview 安装后,跟着
正式安装指南 送给你的
平台.
使用量
import { FastenStitchElement } from 'fasten-connect-stitch-react-native';
const CUSTOMER_PUBLIC_ID = 'public_test_...';
export const ConnectScreen = () => (
<FastenStitchElement
publicId={CUSTOMER_PUBLIC_ID}
email="[email protected]"
brandingTheme="dark"
brandingAccentColor="#E04E3C"
brandingCompanyName="your brand"
brandingLogoUrl="https://your-brand.com/assets/logo.svg"
debugModeEnabled
onEventBus={(event) => {
console.log('Fasten event', event);
}}
/>
);
FastenStitchElement 以填充可用的空间,所以将其包裹在一个容器中,使其与您想要它出现在其中的相匹配
您的布局( 例如, a) View 与 flex: 1) (中文(简体) ).
道具
组件接受以下选项(匹配 Stitch.js 部件配置):
publicId(单位:千美元)所需经费) – 你的快取连接公共标识符.externalId- 识别器,您想与病人/会诊联系.email– 用于预先流行支持的Fasten Connect表单的电子邮件地址.reconnectOrgConnectionId——重新连接之前确定的患者连接.searchOnly, (中文(简体) ),searchQuery, (中文(简体) ),searchSortBy, (中文(简体) ),searchSortByOpts, (中文(简体) ),showSplash- 配置提供者搜索 经历.brandId, (中文(简体) ),portalId, (中文(简体) ),endpointId- 将经验限制在特定品牌/门户/端点.brandingTheme, (中文(简体) ),brandingAccentColor, (中文(简体) ),brandingCompanyName, (中文(简体) ),brandingLogoUrl- 自定义嵌入式 经历。 这些可选字符串映射到branding-theme, (中文(简体) ),branding-accent-color, (中文(简体) ),branding-company-name, (中文(简体) ), 财务报告和审定财务报表branding-logo-url查询参数.tefcaMode- 启用TEFCA流量eventTypes– 逗号有限事件类型列表待接收.debugModeEnabled– Surfaces 在嵌入式网页视图中调试工具.onEventBus– 使用从Fasten Connect发送的解析后的有效载荷引用回调(例如当一个连接被创建时).
参见 FastenConnectOptions 内 src/FastenStitchElement.tsx 用于完整、有文件记录的类型定义.
在当地建设 SDK
向可分发文件传送脚本 dist/ 文件夹 :
npm run build
反馈
请打开任何错误或请求的问题 。 你的反馈会帮助我们稳定公共SDK接口.