import { Credify } from "."; import { Phone } from "../types"; export interface FiatCurrency { currency: string; value: number; } export interface Duration { value: number; unit: string; } export interface OrderInfo { id: string; referenceId: string; totalAmount: FiatCurrency | any; orderLines: OrderLine[]; paymentRecipient: PaymentRecipient; orderStatus: string; bnplAccountNumber: string; } export interface OrderLine { name: string; referenceId: string; imageUrl: string; category: string; productUrl: string; quantity: string; unitPrice: FiatCurrency | any; subtotal: FiatCurrency | any; measurementUnit: string; } export interface PaymentRecipient { type: string; bankAccount: { name: string; number: string; branch: string; bank: string; }; } export interface MessageInfo { name: string; email: string; phone: Phone; } export interface Terms { contractNumber: string; repaymentDuration: Duration; repaymentInterval: Duration; principalAmount: FiatCurrency; downPayment: FiatCurrency; fee: FiatCurrency; apr: string; overduePenaltyRate: string; accountNumber: string; creditLimit: FiatCurrency; availableCredit: FiatCurrency; } export interface BaseResponse { success?: boolean; data?: any; } export interface GetOrderResponse { success?: boolean; data?: OrderInfo; } export interface GetOrdersResponse { success?: boolean; data?: { orders: OrderInfo[]; }; } interface KeyPairValue { [key: string]: string; } export interface GenerateDisbursementDocumentsDataResponse { _claim_names: KeyPairValue; _claim_sources: { [key: string]: { JWT: string; }; }; } export interface CredifyInstance { [apiKey: string]: Credify; } export interface SimulationInput { market?: string; transactionAmount: FiatCurrency; loanTenor: Duration; disbursementDate: string; downPayment?: FiatCurrency; product?: Item; } export interface Item { manufacturer?: string; category?: string; name?: string; } export interface EncryptedClaimObject extends GenerateDisbursementDocumentsDataResponse { } export declare enum IntentType { BNPL = "BNPL", OFFER = "OFFER" } export declare enum Gender { MALE = "male", FEMALE = "female", UNKNOWN = "unknown" } export interface IntentService { availableProviderIds?: string[]; availableProductCodes?: string[]; availableOfferCodes?: string[]; productCode?: string; offerCode?: string; packageCode?: string; brand?: any; } export interface LodgeIntentRequest { type: IntentType; bnplOrder?: { referenceId: string; totalAmount: FiatCurrency | any; orderLines: OrderLine[]; paymentRecipient: PaymentRecipient; }; offer?: { offerCode?: string; productCode?: string; }; user: { id: string; phone: Phone; credifyId?: string; name?: string; email?: string; gender?: Gender; }; service?: IntentService; } export {};