diff --git a/index.ts b/index.ts index 4534314..be2e52d 100644 --- a/index.ts +++ b/index.ts @@ -38,6 +38,7 @@ export { getNetworkConnectionInfo, setActionBehavior, getTopazToken, + getPincodeInfo, onNavigationBarIconClicked, } from './src/utils'; export type {ShareOptions, NavigationBarIcon} from './src/utils'; diff --git a/src/post-message.ts b/src/post-message.ts index d16d3b0..a62a252 100644 --- a/src/post-message.ts +++ b/src/post-message.ts @@ -294,6 +294,13 @@ export type ResponsesFromNativeApp = { id: string; payload: DataConnectionResponse; }; + GET_PINCODE_INFO: { + type: 'GET_PINCODE_INFO'; + id: string; + payload: { + status: 'enabled' | 'disabled'; + }; + }; }; export type NativeAppResponsePayload< diff --git a/src/utils.ts b/src/utils.ts index 22af97f..e6d4bc6 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -301,3 +301,6 @@ export const getTopazToken = ( }, options.timeout, ); + +export const getPincodeInfo = (): Promise<{status: 'enabled' | 'disabled'}> => + postMessageToNativeApp({type: 'GET_PINCODE_INFO'});