import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes } from 'sequelize'; import type { LiteralUnion } from 'type-fest'; import { TenantModel } from '../tenant-model'; import type { GroupedBN, PaymentBeneficiary, PaymentDetails, PaymentError } from './types'; export declare const nextPaymentIntentId: (size?: number) => string; export declare class PaymentIntent extends TenantModel, InferCreationAttributes> { id: CreationOptional; livemode: boolean; instance_did?: string; description: string; amount: string; amount_received?: string; amount_capturable?: string; amount_details?: { tip: string; }; currency_id: string; customer_id?: string; payment_method_id: string; invoice_id?: string; last_charge?: string; last_payment_error: PaymentError | null; metadata?: Record; receipt_email?: string; statement_descriptor: string; statement_descriptor_suffix?: string; status: LiteralUnion<'requires_payment_method' | 'requires_confirmation' | 'requires_action' | 'processing' | 'requires_capture' | 'canceled' | 'succeeded', string>; canceled_at?: number; cancellation_reason?: LiteralUnion<'abandoned' | 'duplicate' | 'requested_by_customer' | 'fraudulent' | 'failed_invoice' | 'void_invoice' | 'automatic', string>; capture_method: LiteralUnion<'automatic' | 'manual', string>; confirmation_method: LiteralUnion<'automatic' | 'manual', string>; payment_method_types: string[]; review?: string; payment_details?: PaymentDetails; setup_future_usage?: LiteralUnion<'off_session' | 'on_session', string>; quote_locked_at?: Date; beneficiaries?: PaymentBeneficiary[]; 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; }; amount: { type: DataTypes.StringDataType; allowNull: boolean; }; amount_received: { type: DataTypes.StringDataType; default: string; }; amount_capturable: { type: DataTypes.StringDataType; default: string; }; amount_details: { type: DataTypes.AbstractDataTypeConstructor; allowNull: boolean; }; currency_id: { type: DataTypes.StringDataType; allowNull: boolean; }; customer_id: { type: DataTypes.StringDataType; allowNull: boolean; }; description: { type: DataTypes.StringDataType; allowNull: boolean; }; last_payment_error: { type: DataTypes.AbstractDataTypeConstructor; allowNull: boolean; }; last_charge: { type: DataTypes.StringDataType; allowNull: boolean; }; metadata: { type: DataTypes.AbstractDataTypeConstructor; allowNull: boolean; }; invoice_id: { type: DataTypes.StringDataType; allowNull: boolean; }; payment_method_id: { type: DataTypes.StringDataType; allowNull: boolean; }; receipt_email: { type: DataTypes.StringDataType; allowNull: boolean; }; statement_descriptor: { type: DataTypes.StringDataType; allowNull: boolean; }; statement_descriptor_suffix: { type: DataTypes.StringDataType; allowNull: boolean; }; status: { type: DataTypes.EnumDataType<"processing" | "requires_action" | "requires_capture" | "canceled" | "requires_payment_method" | "requires_confirmation" | "succeeded">; allowNull: boolean; }; canceled_at: { type: DataTypes.DateDataTypeConstructor; allowNull: boolean; }; cancellation_reason: { type: DataTypes.EnumDataType<"automatic" | "duplicate" | "fraudulent" | "requested_by_customer" | "abandoned" | "failed_invoice" | "void_invoice">; allowNull: boolean; }; capture_method: { type: DataTypes.EnumDataType<"manual" | "automatic">; allowNull: boolean; }; confirmation_method: { type: DataTypes.EnumDataType<"manual" | "automatic">; allowNull: boolean; }; payment_method_types: { type: DataTypes.AbstractDataTypeConstructor; defaultValue: never[]; }; review: { type: DataTypes.StringDataType; allowNull: boolean; }; payment_details: { type: DataTypes.AbstractDataTypeConstructor; allowNull: boolean; }; setup_future_usage: { type: DataTypes.EnumDataType<"off_session" | "on_session">; allowNull: boolean; }; quote_locked_at: { type: DataTypes.DateDataTypeConstructor; 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 getPaidAmountByCustomer(customerId: string): Promise; static getSummary(livemode?: boolean, field?: string): Promise; } export type TPaymentIntent = InferAttributes;