import type { TurboModule } from 'react-native'; import { TurboModuleRegistry } from 'react-native'; /** * Codegen spec — the raw bridge contract, not the public API. * * Enums cross as plain strings because codegen cannot express TS string unions. * Nested params must be named type aliases; an inline object literal degrades to * `AnyTypeAnnotation`. */ export type MyIdOrganizationDetailsInput = { phone?: string; /** Native asset name: Android drawable / iOS image set. */ logo?: string; }; export type MyIdConfigInput = { sessionId: string; clientHash: string; clientHashId: string; minAge?: number; distance?: number; residency?: string; environment?: string; entryType?: string; locale?: string; cameraShape?: string; cameraSelector?: string; cameraResolution?: string; imageFormat?: string; screenOrientation?: string; presentationStyle?: string; withSoundGuides?: boolean; showErrorScreen?: boolean; huaweiAppId?: string; organizationDetails?: MyIdOrganizationDetailsInput; }; export type MyIdAppearanceInput = { colorPrimary?: string; colorOnPrimary?: string; colorError?: string; colorOnError?: string; colorOutline?: string; colorDivider?: string; colorSuccess?: string; colorButtonContainer?: string; colorButtonContainerDisabled?: string; colorButtonContent?: string; colorButtonContentDisabled?: string; colorScanButtonContainer?: string; buttonCornerRadius?: number; }; export type MyIdResultPayload = { code: string; base64?: string; }; export interface Spec extends TurboModule { start( config: MyIdConfigInput, appearance: MyIdAppearanceInput ): Promise; } export default TurboModuleRegistry.getEnforcing('MyidSdk');