▸ initializeSDK(): void
Creates a new Orchestration SDK instance with your client context. On iOS, credentials are configured from the TransmitSecurity.plist file. On Android, initialization is performed in the native MainApplication class.
import RNTSIdentityOrchestration from 'react-native-ts-identity-orchestration';
if (Platform.OS === 'ios') {
RNTSIdentityOrchestration.initializeSDK();
}On Android, initialization must be done natively. Add TsIdentityOrchestrationModule.initializeAndroidSDK(this) to your MainApplication.kt onCreate() method.
▸ setResponseHandler(handler): void
Sets a response handler for journey responses and errors. Must be called before startJourney() or startMobileApproveJourney().
| Name | Type | Description |
|---|---|---|
handler | Object | Object containing success and error callbacks |
handler.success | (results: TSIDOModule.ServiceResponse) => void | Called when a journey step response is received |
handler.error | (error: TSIDOModule.JourneyErrorType) => void | Called when a journey error occurs |
import RNTSIdentityOrchestration, { TSIDOModule } from 'react-native-ts-identity-orchestration';
RNTSIdentityOrchestration.setResponseHandler({
success: (results: TSIDOModule.ServiceResponse) => {
// Handle journey step
},
error: (error: TSIDOModule.JourneyErrorType) => {
// Handle error
}
});▸ startJourney(journeyId, options?): void
Starts a journey with the given identifier. The response is delivered asynchronously through the handler set via setResponseHandler().
| Name | Type | Description |
|---|---|---|
journeyId | string | Journey identifier as configured in the Admin Portal |
options? | TSIDOModule.StartJourneyOptions | null | Optional journey start parameters |
The StartJourneyOptions object supports:
| Property | Type | Description |
|---|---|---|
additionalParams | { [key: string]: any } | Key-value parameters passed to the journey, accessible via @policy.request().params.<key> |
flowId | string | Optional flow identifier for tracking |
encrypted | boolean | Enables encryption mode (true = full, false = none) |
import RNTSIdentityOrchestration, { TSIDOModule } from 'react-native-ts-identity-orchestration';
const options: TSIDOModule.StartJourneyOptions = {
flowId: 'login-flow',
additionalParams: { userEmail: 'name@example.com' }
};
RNTSIdentityOrchestration.startJourney('my_journey_id', options);▸ startMobileApproveJourney(payload, options?): void
Starts a mobile approve journey to handle approval flows (such as transaction signing or push notifications). The response is delivered asynchronously through the handler set via setResponseHandler().
| Name | Type | Description |
|---|---|---|
payload | { [key: string]: string } | Key-value object containing approval data |
options? | TSIDOModule.StartJourneyOptions | null | Optional journey start parameters |
import RNTSIdentityOrchestration, { TSIDOModule } from 'react-native-ts-identity-orchestration';
const payload = { transactionId: '12345', amount: '$100' };
RNTSIdentityOrchestration.startMobileApproveJourney(payload, null);▸ submitClientResponse(clientResponseOptionId, data?): void
Submits a client response for the current journey step. This advances the journey to the next step based on the selected response option and any collected data.
| Name | Type | Description |
|---|---|---|
clientResponseOptionId | string | TSIDOModule.ClientResponseOptionType | The response option ID, either a standard type or a custom branch ID |
data? | { [key: string]: any } | null | Client response data object, required for steps that collect input |
Standard response option types (TSIDOModule.ClientResponseOptionType):
| Value | Description |
|---|---|
clientInput | Typical reply to a step with a main or single output path |
cancel | Selects the cancel branch |
fail | Selects the failure branch |
import RNTSIdentityOrchestration, { TSIDOModule } from 'react-native-ts-identity-orchestration';
// Simple response (e.g., information step)
RNTSIdentityOrchestration.submitClientResponse(TSIDOModule.ClientResponseOptionType.clientInput);
// Response with data (e.g., form input)
RNTSIdentityOrchestration.submitClientResponse(
TSIDOModule.ClientResponseOptionType.clientInput,
{ externalUserId: userId, userPassword: password }
);
// Custom branch response
RNTSIdentityOrchestration.submitClientResponse('passkey', {
webauthn_encoded_result: encodedResult
});See ServiceResponse for the full interface reference.
See JourneyActionType for the full enum reference.
See ClientResponseOptionType for the full enum reference.