import type { Order } from './order'; import type { currencyCode } from './currency'; import type { fullThemeModeValue } from './enums'; import type { PaymentMethodName } from './enums/paymentMethods'; import type { PaymentType } from './payment/paymentType'; import { ExtendableObject, ExtendableString } from './tsUtils'; import { CountryCode } from './country'; export interface CheckoutProfileRequest { transaction_mode: 'PURCHASE' | 'AUTHORIZE_CAPTURE'; currency: currencyCode; total_amount: number; customer?: string; buyer?: { email: string; phone?: { country_code: string; number: string; }; first_name?: string; last_name?: string; }; supported_payment_methods?: string[]; supported_currencies?: currencyCode[]; payment_type?: PaymentType | (string & {}); merchant_id?: string; reference?: { transaction?: string; order?: string; }; order: Order; invoice?: { id?: string; }; [key: string]: any; } export interface CheckoutProfileResponse { status: string; merchant: Merchant; assests: Assests; payment_options: PaymentOptions; session: string; [key: string]: any; } export interface PaymentOptions { id: string; object: string; payment_methods: PaymentMethod[]; currency: string; country: string; settlement_currency: string; supported_currencies: SupportedCurrency[]; api_version: string; order: ExtendableObject<{ id: string; amount: number; currency: string; customer: { id?: string; email: string; phone?: { country_code: string; number: string; }; first_name?: string; last_name?: string; [key: string]: any; }; items: Array<{ name: string; amount: number; currency: string; quantity: number; requires_shipping: boolean; description: string; [key: string]: any; }>; }>; [key: string]: any; } export interface SupportedCurrency { amount: number; currency: currencyCode; symbol: string; name: string; flag: string; decimal_digit: number; selected: boolean; rate: number; logos: Record; order_by: number; [key: string]: any; } export interface PaymentMethod { id: string; source_id?: string; name: PaymentMethodName; name_ar: string; image: string; payment_type: string; allowed_auth_methods?: string[]; supported_card_brands: string[]; supported_currencies: currencyCode[]; order_by: number; cc_markup: number; asynchronous: boolean; threeDS: string; api_version: number; api_version_minor: number; logos: Record; payment_order_type: string; button_style: ButtonStyle; display_name: string; default_currency: string; gateway_name?: string; gateway_merchant_id?: string; [key: string]: any; } export interface ButtonStyle { background: Record; title_asset: string; [key: string]: any; } interface Color { base_color: string; background_colors: string[]; [key: string]: any; } interface LogoObject { svg: string; png: string; disabled: ImageFormatObject; currency_widget: ImageFormatObject; card_icon: ImageFormatObject; [key: string]: any; } interface ImageFormatObject { svg: string; png: string; [key: string]: any; } interface Assests { web: Theme; theme: Theme; localisation: { url: string; card: { url: string; }; }; } interface Theme { light: string; dark: string; card: { [key in fullThemeModeValue]?: string; }; [key: string]: any; } interface Merchant { id: string; api_version: string; live_mode: boolean; object: string; name: string; country_code: ExtendableString; logo: string; contact: any[]; powered_by: boolean; key_type: string; encryption_key: string; permissions: string[]; permission: Permission; background: Background; sdk_settings: SdkSettings; session_token: string; [key: string]: any; } interface Permission { card_wallet: boolean; threeDSecure: boolean; pci_dss: boolean; card_cvv: boolean; saved_card_cvv: boolean; [key: string]: any; } interface SdkSettings { status_display_duration: number; otp_resend_interval: number; otp_resend_attempts: number; [key: string]: any; } interface Background { url: string; mode: string; color: { [key in fullThemeModeValue]?: ExtendableObject<{ color: string; image: string; rectangle?: { background: string; 'backdrop-filter': string; }; }>; }; [key: string]: any; } export {};