- Reorganized admin settings into tabbed interface (General, Security, Payment Methods) - Vertical tabs on desktop, horizontal scrollable on mobile - Moved Payment Methods from separate menu to Settings tab - Fixed admin profile reuse and dashboard blocking - Fixed maintenance mode guard to use AppConfig model - Added admin auto-redirect after login (admins → /admin, users → /) - Reorganized documentation into docs/ folder structure - Created comprehensive README and documentation index - Added PWA and Web Push notifications to to-do list
226 lines
7.6 KiB
TypeScript
226 lines
7.6 KiB
TypeScript
import { AdminPaymentsService } from './admin-payments.service';
|
|
interface RequestWithUser {
|
|
user: {
|
|
userId: string;
|
|
};
|
|
}
|
|
export declare class AdminPaymentsController {
|
|
private readonly service;
|
|
constructor(service: AdminPaymentsService);
|
|
findAll(status?: string): Promise<({
|
|
user: {
|
|
id: string;
|
|
email: string;
|
|
name: string | null;
|
|
};
|
|
subscription: ({
|
|
plan: {
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
name: string;
|
|
currency: string;
|
|
slug: string;
|
|
description: string | null;
|
|
price: import("@prisma/client/runtime/library").Decimal;
|
|
durationType: string;
|
|
durationDays: number | null;
|
|
trialDays: number;
|
|
features: import("@prisma/client/runtime/library").JsonValue;
|
|
badge: string | null;
|
|
badgeColor: string | null;
|
|
highlightColor: string | null;
|
|
sortOrder: number;
|
|
isActive: boolean;
|
|
isVisible: boolean;
|
|
isFeatured: boolean;
|
|
maxWallets: number | null;
|
|
maxGoals: number | null;
|
|
maxTeamMembers: number | null;
|
|
apiEnabled: boolean;
|
|
apiRateLimit: number | null;
|
|
};
|
|
} & {
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
status: string;
|
|
userId: string;
|
|
planId: string;
|
|
startDate: Date;
|
|
endDate: Date;
|
|
isTrialUsed: boolean;
|
|
trialEndDate: Date | null;
|
|
cancelledAt: Date | null;
|
|
cancellationReason: string | null;
|
|
}) | null;
|
|
} & {
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
status: string;
|
|
method: string;
|
|
userId: string;
|
|
currency: string;
|
|
amount: import("@prisma/client/runtime/library").Decimal;
|
|
subscriptionId: string | null;
|
|
invoiceNumber: string;
|
|
tripayReference: string | null;
|
|
tripayFee: import("@prisma/client/runtime/library").Decimal | null;
|
|
totalAmount: import("@prisma/client/runtime/library").Decimal;
|
|
paymentChannel: string | null;
|
|
paymentUrl: string | null;
|
|
qrUrl: string | null;
|
|
proofImageUrl: string | null;
|
|
transferDate: Date | null;
|
|
verifiedBy: string | null;
|
|
verifiedAt: Date | null;
|
|
rejectionReason: string | null;
|
|
couponId: string | null;
|
|
discountAmount: import("@prisma/client/runtime/library").Decimal | null;
|
|
notes: string | null;
|
|
expiresAt: Date | null;
|
|
paidAt: Date | null;
|
|
})[]>;
|
|
getPendingCount(): Promise<number>;
|
|
getMonthlyRevenue(): Promise<{
|
|
month: string;
|
|
revenue: number;
|
|
users: number;
|
|
}[]>;
|
|
findOne(id: string): Promise<({
|
|
user: {
|
|
id: string;
|
|
email: string;
|
|
name: string | null;
|
|
};
|
|
subscription: ({
|
|
plan: {
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
name: string;
|
|
currency: string;
|
|
slug: string;
|
|
description: string | null;
|
|
price: import("@prisma/client/runtime/library").Decimal;
|
|
durationType: string;
|
|
durationDays: number | null;
|
|
trialDays: number;
|
|
features: import("@prisma/client/runtime/library").JsonValue;
|
|
badge: string | null;
|
|
badgeColor: string | null;
|
|
highlightColor: string | null;
|
|
sortOrder: number;
|
|
isActive: boolean;
|
|
isVisible: boolean;
|
|
isFeatured: boolean;
|
|
maxWallets: number | null;
|
|
maxGoals: number | null;
|
|
maxTeamMembers: number | null;
|
|
apiEnabled: boolean;
|
|
apiRateLimit: number | null;
|
|
};
|
|
} & {
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
status: string;
|
|
userId: string;
|
|
planId: string;
|
|
startDate: Date;
|
|
endDate: Date;
|
|
isTrialUsed: boolean;
|
|
trialEndDate: Date | null;
|
|
cancelledAt: Date | null;
|
|
cancellationReason: string | null;
|
|
}) | null;
|
|
} & {
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
status: string;
|
|
method: string;
|
|
userId: string;
|
|
currency: string;
|
|
amount: import("@prisma/client/runtime/library").Decimal;
|
|
subscriptionId: string | null;
|
|
invoiceNumber: string;
|
|
tripayReference: string | null;
|
|
tripayFee: import("@prisma/client/runtime/library").Decimal | null;
|
|
totalAmount: import("@prisma/client/runtime/library").Decimal;
|
|
paymentChannel: string | null;
|
|
paymentUrl: string | null;
|
|
qrUrl: string | null;
|
|
proofImageUrl: string | null;
|
|
transferDate: Date | null;
|
|
verifiedBy: string | null;
|
|
verifiedAt: Date | null;
|
|
rejectionReason: string | null;
|
|
couponId: string | null;
|
|
discountAmount: import("@prisma/client/runtime/library").Decimal | null;
|
|
notes: string | null;
|
|
expiresAt: Date | null;
|
|
paidAt: Date | null;
|
|
}) | null>;
|
|
verify(id: string, req: RequestWithUser): Promise<{
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
status: string;
|
|
method: string;
|
|
userId: string;
|
|
currency: string;
|
|
amount: import("@prisma/client/runtime/library").Decimal;
|
|
subscriptionId: string | null;
|
|
invoiceNumber: string;
|
|
tripayReference: string | null;
|
|
tripayFee: import("@prisma/client/runtime/library").Decimal | null;
|
|
totalAmount: import("@prisma/client/runtime/library").Decimal;
|
|
paymentChannel: string | null;
|
|
paymentUrl: string | null;
|
|
qrUrl: string | null;
|
|
proofImageUrl: string | null;
|
|
transferDate: Date | null;
|
|
verifiedBy: string | null;
|
|
verifiedAt: Date | null;
|
|
rejectionReason: string | null;
|
|
couponId: string | null;
|
|
discountAmount: import("@prisma/client/runtime/library").Decimal | null;
|
|
notes: string | null;
|
|
expiresAt: Date | null;
|
|
paidAt: Date | null;
|
|
}>;
|
|
reject(id: string, req: RequestWithUser, body: {
|
|
reason: string;
|
|
}): Promise<{
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
status: string;
|
|
method: string;
|
|
userId: string;
|
|
currency: string;
|
|
amount: import("@prisma/client/runtime/library").Decimal;
|
|
subscriptionId: string | null;
|
|
invoiceNumber: string;
|
|
tripayReference: string | null;
|
|
tripayFee: import("@prisma/client/runtime/library").Decimal | null;
|
|
totalAmount: import("@prisma/client/runtime/library").Decimal;
|
|
paymentChannel: string | null;
|
|
paymentUrl: string | null;
|
|
qrUrl: string | null;
|
|
proofImageUrl: string | null;
|
|
transferDate: Date | null;
|
|
verifiedBy: string | null;
|
|
verifiedAt: Date | null;
|
|
rejectionReason: string | null;
|
|
couponId: string | null;
|
|
discountAmount: import("@prisma/client/runtime/library").Decimal | null;
|
|
notes: string | null;
|
|
expiresAt: Date | null;
|
|
paidAt: Date | null;
|
|
}>;
|
|
}
|
|
export {};
|