import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes } from 'sequelize'; import type { LiteralUnion } from 'type-fest'; import { TenantModel } from '../tenant-model'; import type { GroupedBN, PaymentDetails, PaymentError } from './types'; export declare const nextPayoutId: (size?: number) => string; export declare class Payout extends TenantModel, InferCreationAttributes> { id: CreationOptional; livemode: boolean; instance_did?: string; automatic: boolean; description: string; destination: string; amount: string; payment_details?: PaymentDetails; currency_id: string; customer_id: string; payment_intent_id: string; payment_method_id: string; metadata?: Record; vendor_info?: { vendor_id: string; app_pid?: string; order_id: string; commission_amount: string; }; status: LiteralUnion<'pending' | 'paid' | 'failed' | 'canceled' | 'in_transit' | 'deferred' | 'reverted', string>; failure_message?: string; failure_code?: LiteralUnion<'account_closed' | 'account_frozen' | 'bank_account_restricted' | 'bank_ownership_changed' | 'could_not_process' | 'debit_not_authorized' | 'declined' | 'incorrect_account_holder_address' | 'incorrect_account_holder_name' | 'incorrect_account_holder_tax_id' | 'incorrect_account_type' | 'insufficient_funds' | 'invalid_account_number', string>; attempt_count: number; attempted: boolean; next_attempt?: number; last_attempt_error?: PaymentError | null; created_at: CreationOptional; updated_at: CreationOptional; static readonly GENESIS_ATTRIBUTES: { id: { type: DataTypes.StringDataType; primaryKey: boolean; allowNull: boolean; defaultValue: (size?: number) => string; }; livemode: { type: DataTypes.AbstractDataTypeConstructor; allowNull: boolean; }; automatic: { type: DataTypes.AbstractDataTypeConstructor; allowNull: boolean; }; description: { type: DataTypes.StringDataType; allowNull: boolean; }; amount: { type: DataTypes.StringDataType; allowNull: boolean; }; destination: { type: DataTypes.StringDataType; allowNull: boolean; }; payment_details: { type: DataTypes.AbstractDataTypeConstructor; allowNull: boolean; }; currency_id: { type: DataTypes.StringDataType; allowNull: boolean; }; customer_id: { type: DataTypes.StringDataType; allowNull: boolean; }; payment_intent_id: { type: DataTypes.StringDataType; allowNull: boolean; }; payment_method_id: { type: DataTypes.StringDataType; allowNull: boolean; }; metadata: { type: DataTypes.AbstractDataTypeConstructor; allowNull: boolean; }; status: { type: DataTypes.EnumDataType<"failed" | "pending" | "canceled" | "paid" | "in_transit" | "deferred" | "reverted">; allowNull: boolean; }; failure_message: { type: DataTypes.StringDataType; allowNull: boolean; }; failure_code: { type: DataTypes.EnumDataType<"account_closed" | "account_frozen" | "bank_account_restricted" | "bank_ownership_changed" | "could_not_process" | "debit_not_authorized" | "declined" | "incorrect_account_holder_address" | "incorrect_account_holder_name" | "incorrect_account_holder_tax_id" | "incorrect_account_type" | "insufficient_funds" | "invalid_account_number">; allowNull: boolean; }; attempt_count: { type: DataTypes.IntegerDataTypeConstructor; defaultValue: number; }; attempted: { type: DataTypes.AbstractDataTypeConstructor; defaultValue: boolean; }; next_attempt: { type: DataTypes.IntegerDataTypeConstructor; allowNull: boolean; }; last_attempt_error: { type: DataTypes.AbstractDataTypeConstructor; allowNull: boolean; }; created_at: { type: DataTypes.DateDataTypeConstructor; defaultValue: DataTypes.AbstractDataTypeConstructor; allowNull: boolean; }; updated_at: { type: DataTypes.DateDataTypeConstructor; defaultValue: DataTypes.AbstractDataTypeConstructor; allowNull: boolean; }; }; static initialize(sequelize: any): void; static associate(models: any): void; isImmutable(): boolean; static getPayoutAmountByCustomer(customerId: string, status?: string): Promise; static getSummary(livemode?: boolean, field?: string): Promise; static getPayoutLockedAmount(where?: any): Promise; } export type TPayout = InferAttributes;