@techdacxi/capacitor-persona-plugin
v1.0.5
Published
Native Persona integration for iOS and Android into the web application using PersonaSDK
Readme
capacitor-persona
Native Persona integration into the web application using SDK
Install
npm install capacitor-persona-plugin
npx cap syncAPI
initialize(...)
initialize(options: PresentPersonaOptions) => Promise<void>Initialize the Persona Widget with an Template ID
| Param | Type |
| ------------- | ----------------------------------------------------------------------- |
| options | PresentPersonaOptions |
Since: 0.1.0
presentPersonaFlow()
presentPersonaFlow() => Promise<InquiryResult>Calls the Persona Executor to present the Inquiry Flow
Returns: Promise<InquiryResult>
Since: 0.1.0
Interfaces
PresentPersonaOptions
| Prop | Type | Description | Default | Since |
| ----------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | ----- |
| templateId | string | The template ID corresponds to a pre-set configuration and determines how the flow is customized. | | 1.0.0 |
| inquiryId | string | The inquiry ID is used to resume an existing inquiry instead of creating a new one The inquiry ID has priority over templateId and referenceId | | 1.0.3 |
| referenceId | string | A string unique to every user that is used to identify their Persona account in a way that makes sense to your business key to use in the flow | | 1.0.2 |
| isSandbox | boolean | Whether the Inquiry is going to be in Sandbox mode or Production | false (production mode) | 1.0.0 |
InquiryResult
| Prop | Type | Description | Since |
| ------------------ | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----- |
| status | PersonaPresentationStatus | The status of the Inquiry Result It can be: Success, Failed, Cancelled and Error | 1.0.0 |
| inquiryId | string | The Inquiry identification key associated with the result Only available if the Inquiry is successful | 1.0.0 |
| errorMessage | string | The error message, in case it of an Error status | 1.0.0 |
Enums
PersonaPresentationStatus
| Members | Value |
| --------------- | ------------------------ |
| Success | 'success' |
| Failed | 'failed' |
| Cancelled | 'cancelled' |
| Error | 'error' |
