import type { MyIdCameraResolution, MyIdCameraSelector, MyIdCameraShape, MyIdEntryType, MyIdEnvironment, MyIdImageFormat, MyIdLocale, MyIdPresentationStyle, MyIdResidency, MyIdScreenOrientation, } from './myid-enums'; /** * Branding shown on the SDK's input and error screens. */ export type MyIdOrganizationDetails = { /** * Call-centre number shown on the error screen. * Defaults to MyID's own number (712022202) when omitted. */ phone?: string; /** * Name of a native image asset — an Android drawable or an iOS image set. * Not a file path, require() result or URL. The asset must live in the host * app, and fits an image view of roughly 240x60. */ logo?: string; }; /** * Configuration for a verification session. * * Only `sessionId`, `clientHash` and `clientHashId` are required; every omitted * field keeps the SDK's own default rather than a default chosen by this * library. Fields marked `@platform` are silently ignored by the other * platform. */ export type MyIdConfig = { /** Issued by your backend via the MyID API. Not a client-side value. */ sessionId: string; /** Provided by the MyID sales team. Treat as a secret. */ clientHash: string; /** Provided by the MyID sales team. */ clientHashId: string; /** Minimum age the user must meet. SDK default: 16. */ minAge?: number; /** Face-match threshold, 0..1. SDK default: 0.65 (Android) / 0.60 (iOS). */ distance?: number; /** * When set to `USER_DEFINED` and no passport data is available, the SDK shows * its own passport-input screen with a resident/non-resident checkbox. */ residency?: MyIdResidency; /** `DEBUG` targets the MyID sandbox. SDK default: `PRODUCTION`. */ environment?: MyIdEnvironment; /** * `FACE_DETECTION` only captures a face and skips MyID verification. * `VIDEO_IDENTIFICATION` exists on both platforms but is marked experimental * by the Android SDK, so treat it as unstable. */ entryType?: MyIdEntryType; /** * SDK default: `UZBEK`. * `UZBEK_CYRILLIC`, `KARAKALPAK` and `TAJIK` exist on Android only; iOS falls * back to `UZBEK`. */ locale?: MyIdLocale; /** Shape of the face-capture cutout. SDK default: `CIRCLE`. */ cameraShape?: MyIdCameraShape; /** SDK default: `FRONT`. */ cameraSelector?: MyIdCameraSelector; /** @platform android — ignored on iOS. SDK default: `LOW`. */ cameraResolution?: MyIdCameraResolution; /** @platform android — ignored on iOS. SDK default: `PNG`. */ imageFormat?: MyIdImageFormat; /** @platform android — ignored on iOS. */ screenOrientation?: MyIdScreenOrientation; /** @platform ios — ignored on Android. How the SDK is presented modally. */ presentationStyle?: MyIdPresentationStyle; /** @platform android — ignored on iOS. Audio guidance during capture. */ withSoundGuides?: boolean; /** Whether the SDK renders its own error screens. SDK default: `true`. */ showErrorScreen?: boolean; /** * @platform android — ignored on iOS. * Required on Huawei devices without Google Play Services; without it the SDK * can fail to initialise. Obtain it from AppGallery Connect. */ huaweiAppId?: string; organizationDetails?: MyIdOrganizationDetails; }; /** * iOS-only theming. Android is themed by overriding the SDK's own XML * resources (`myid_color_*` in `myid_colors.xml`, `myid_button_corner_radius` * in `myid_dimens.xml`) — see the README. * * Colors accept `#RRGGBB` or `RRGGBB`. */ export type MyIdAppearance = { /** Guides the user through the flow — the SDK's dominant accent color. */ colorPrimary?: string; /** Text and icons drawn on top of `colorPrimary`. */ colorOnPrimary?: string; colorError?: string; /** Text and icons drawn on top of error backgrounds. */ colorOnError?: string; /** Borders and outlines on inputs and cards. */ colorOutline?: string; /** Thin lines separating UI sections. */ colorDivider?: string; colorSuccess?: string; colorButtonContainer?: string; colorButtonContainerDisabled?: string; colorButtonContent?: string; colorButtonContentDisabled?: string; /** Background of the scan icon button. */ colorScanButtonContainer?: string; /** Corner radius of primary buttons. SDK default: 12. */ buttonCornerRadius?: number; }; export type MyIdResult = { /** MyID result code. `100` indicates success. */ code: string; /** * Captured face portrait as base64-encoded JPEG, without a data-URI prefix. * Absent when the SDK returned no image. */ base64?: string; }; export type StartMyIdOptions = { config: MyIdConfig; /** @platform ios — ignored on Android. */ iosAppearance?: MyIdAppearance; };