import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes } from 'sequelize'; import { TenantModel } from '../tenant-model'; export declare const nextCreditTransactionId: (size?: number) => string; export declare class CreditTransaction extends TenantModel, InferCreationAttributes> { id: CreationOptional; instance_did?: string; quantity: string; credit_amount: string; remaining_balance: string; customer_id: string; credit_grant_id: string; meter_id?: string; subscription_id?: string; source?: string; meter_event_name: string; meter_unit: string; description?: string; metadata?: Record; transfer_status?: 'pending' | 'completed' | 'failed' | null; transfer_hash?: string; created_at: CreationOptional; updated_at: CreationOptional; static readonly GENESIS_ATTRIBUTES: { id: { type: DataTypes.StringDataType; primaryKey: boolean; allowNull: boolean; defaultValue: (size?: number) => string; }; quantity: { type: DataTypes.StringDataType; allowNull: boolean; }; credit_amount: { type: DataTypes.StringDataType; allowNull: boolean; }; remaining_balance: { type: DataTypes.StringDataType; allowNull: boolean; }; customer_id: { type: DataTypes.StringDataType; allowNull: boolean; }; credit_grant_id: { type: DataTypes.StringDataType; allowNull: boolean; }; meter_id: { type: DataTypes.StringDataType; allowNull: boolean; }; subscription_id: { type: DataTypes.StringDataType; allowNull: boolean; }; source: { type: DataTypes.StringDataType; allowNull: boolean; }; meter_event_name: { type: DataTypes.StringDataType; allowNull: boolean; }; meter_unit: { type: DataTypes.StringDataType; allowNull: boolean; }; description: { type: DataTypes.TextDataTypeConstructor; allowNull: boolean; }; metadata: { type: DataTypes.AbstractDataTypeConstructor; allowNull: boolean; }; transfer_status: { type: DataTypes.EnumDataType<"completed" | "failed" | "pending">; allowNull: boolean; }; transfer_hash: { type: DataTypes.StringDataType; 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; static getUsageSummary({ customerId, subscriptionId, meterEventName, currencyId, meterId, startTime, endTime, }: { customerId?: string; subscriptionId?: string; meterEventName?: string; currencyId?: string; meterId?: string; startTime?: Date; endTime?: Date; }): Promise<{ total_quantity: string; total_credit_amount: string; transaction_count: number; filters: { customer_id: string | undefined; subscription_id: string | undefined; meter_event_name: string | undefined; meter_id: string | undefined; currency_id: string | undefined; start_time: string | undefined; end_time: string | undefined; }; }>; static getUsageSummaryForCustomer(customerId: string, meterEventName?: string, startTime?: Date, endTime?: Date): Promise<{ total_quantity: string; total_credit_amount: string; transaction_count: number; filters: { customer_id: string | undefined; subscription_id: string | undefined; meter_event_name: string | undefined; meter_id: string | undefined; currency_id: string | undefined; start_time: string | undefined; end_time: string | undefined; }; }>; static getUsageSummaryForSubscription(subscriptionId: string, startTime?: Date, endTime?: Date): Promise<{ total_quantity: string; total_credit_amount: string; transaction_count: number; filters: { customer_id: string | undefined; subscription_id: string | undefined; meter_event_name: string | undefined; meter_id: string | undefined; currency_id: string | undefined; start_time: string | undefined; end_time: string | undefined; }; }>; static getUsageTrend(customerId: string, meterEventName: string, startTime: Date, endTime: Date): Promise; } export type TCreditTransaction = InferAttributes;