first commit
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
export type PaymentStatus = "Pending" | "Partial" | "Paid"
|
||||
|
||||
export interface SubscriptionMemberInfo {
|
||||
subscriptionMemberId: string
|
||||
customerId: string
|
||||
cusName?: string | null
|
||||
email?: string | null
|
||||
primaryPH?: string | null
|
||||
isPrimary: boolean
|
||||
joinedAt: string
|
||||
isActive: boolean
|
||||
/** False when unassigned from the plan but still a member of the gym. */
|
||||
isPlanAssigned?: boolean
|
||||
}
|
||||
|
||||
export interface SubscriptionInstallment {
|
||||
subscriptionInstallmentId: string
|
||||
installmentNo: number
|
||||
dueDate: string
|
||||
amount: number
|
||||
paidAmount: number
|
||||
status: PaymentStatus
|
||||
}
|
||||
|
||||
export interface AutoChargeCard {
|
||||
cardId: string
|
||||
cardLast4?: string | null
|
||||
cardType?: string | null
|
||||
}
|
||||
|
||||
export interface MemberCard {
|
||||
jobId: string
|
||||
cardId?: string | null
|
||||
cardNumber?: string | null
|
||||
cardType?: string | null
|
||||
nickName?: string | null
|
||||
isPrimary: boolean
|
||||
consentGiven: boolean
|
||||
}
|
||||
|
||||
/** GET client/subscriptions/{id}. */
|
||||
export interface SubscriptionSummary {
|
||||
subscriptionId: string
|
||||
customerPlanId: string
|
||||
planName?: string | null
|
||||
planScope: "Individual" | "Group"
|
||||
memberLimit: number
|
||||
durationMode: "Rolling" | "FixedRange"
|
||||
allowSplitPayments: boolean
|
||||
planPrice: number
|
||||
onboardDate: string
|
||||
/** Frozen at creation, never changes again -- see renewalDate for the current cycle end. */
|
||||
expiryDate?: string | null
|
||||
renewalDate?: string | null
|
||||
isActive: boolean
|
||||
customerInvoiceId?: string | null
|
||||
invoiceAmount: number
|
||||
paidAmount: number
|
||||
balance: number
|
||||
paymentStatus: PaymentStatus
|
||||
members: SubscriptionMemberInfo[]
|
||||
installments: SubscriptionInstallment[]
|
||||
autoChargeEnabled: boolean
|
||||
autoChargeCard?: AutoChargeCard | null
|
||||
}
|
||||
|
||||
export interface SubscriptionPayment {
|
||||
attemptId: string
|
||||
payDate?: string | null
|
||||
payStatus: string
|
||||
payAmount: number
|
||||
payNote?: string | null
|
||||
refType?: string | null
|
||||
paymentMethod?: "Cash" | "Bank" | null
|
||||
bankRefNo?: string | null
|
||||
isApproved?: boolean | null
|
||||
}
|
||||
|
||||
/** GET client/subscriptions/{id}/payments. */
|
||||
export interface SubscriptionPaymentsResult {
|
||||
invoiceId?: string | null
|
||||
invoiceAmount: number
|
||||
paidAmount: number
|
||||
balance: number
|
||||
status: PaymentStatus
|
||||
installments: SubscriptionInstallment[]
|
||||
payments: SubscriptionPayment[]
|
||||
}
|
||||
|
||||
export interface RecordPaymentInput {
|
||||
amount: number
|
||||
note?: string
|
||||
paymentMethod: "Cash" | "Bank"
|
||||
/** Reference/slip number — only meaningful (and sent) when paymentMethod is "Bank". */
|
||||
bankRefNo?: string
|
||||
}
|
||||
|
||||
export type ExtraFeeFrequency = "OneTime" | "Recurring"
|
||||
|
||||
/** Mirrors CustomerSubItemDto — an optional extra fee on a subscription (e.g. coaching fee). */
|
||||
export interface SubscriptionExtraFee {
|
||||
customerSubItemId: string
|
||||
subItemName?: string | null
|
||||
subItemDescription?: string | null
|
||||
subItemPrice: number
|
||||
frequency: ExtraFeeFrequency
|
||||
isActive: boolean
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export interface AddExtraFeeInput {
|
||||
name: string
|
||||
description?: string
|
||||
amount: number
|
||||
frequency: ExtraFeeFrequency
|
||||
}
|
||||
Reference in New Issue
Block a user