import type { TurboModule } from 'react-native'; import { TurboModuleRegistry } from 'react-native'; export type InitializeArgs = { environment: string; locale: string; // biome-ignore lint/complexity/noBannedTypes: TurboModule codegen does not support Record<…>; Object is the supported map shape translations: Object; publicKey: string; // biome-ignore lint/complexity/noBannedTypes: TurboModule codegen does not support Record<…>; Object is the supported map shape style: Object; merchantIdentifier: string; // biome-ignore lint/complexity/noBannedTypes: TurboModule codegen does not support Record<…>; Object is the supported map shape paymentSession: Object; registeredCallbacks: string[]; }; export type APICallResult = { success: boolean; paymentSessionSubmissionResult?: { id: string; type: string; status: string; action?: { type: string; url?: string; }; declineReason?: string; }; }; export interface Spec extends TurboModule { initialize(args: InitializeArgs): Promise; clear(): Promise; resolveTokenized( callbackId: string, success: boolean, error: string | null ): Promise; resolveSubmit(callbackId: string, args: APICallResult): Promise; } export default TurboModuleRegistry.getEnforcing('CheckoutModule');