174 lines
7.3 KiB
TypeScript
174 lines
7.3 KiB
TypeScript
import * as repo from './admin.repo';
|
|
import * as billingService from './admin.billing.service';
|
|
export declare function login(email: string, password: string, totpCode?: string, recoveryCode?: string): Promise<{
|
|
token: string;
|
|
admin: Omit<any, "passwordHash" | "totpSecret">;
|
|
} | {
|
|
readonly totpRequired: true;
|
|
readonly invalidTotp?: undefined;
|
|
} | {
|
|
readonly invalidTotp: true;
|
|
readonly totpRequired?: undefined;
|
|
} | null>;
|
|
export declare function setupTotp(adminId: string, email: string): Promise<{
|
|
secret: string;
|
|
qrCode: string;
|
|
}>;
|
|
export declare function verifyTotp(adminId: string, code: string): Promise<false | {
|
|
recoveryCodes: string[];
|
|
token: string;
|
|
admin: Omit<any, "passwordHash" | "totpSecret">;
|
|
}>;
|
|
export declare function regenerateRecoveryCodes(adminId: string): Promise<{
|
|
recoveryCodes: string[];
|
|
}>;
|
|
export declare function forgotPassword(email: string): Promise<void>;
|
|
export declare function resetPassword(token: string, password: string): Promise<boolean>;
|
|
export declare function listCompanies(query: {
|
|
q?: string;
|
|
status?: string;
|
|
plan?: string;
|
|
page: number;
|
|
pageSize: number;
|
|
}): Promise<{
|
|
data: unknown[];
|
|
total: number;
|
|
page: number;
|
|
pageSize: number;
|
|
totalPages: number;
|
|
}>;
|
|
export declare function getCompany(id: string): any;
|
|
export declare function updateCompany(id: string, body: any, adminId: string, ip?: string): Promise<any>;
|
|
export declare function setCompanyStatus(id: string, status: string, reason: string | undefined, adminId: string, ip?: string): Promise<any>;
|
|
export declare function deleteCompany(id: string, adminId: string, ip?: string): Promise<void>;
|
|
export declare function impersonateCompany(id: string, adminId: string, ip?: string, reason?: string, durationMinutes?: number): Promise<{
|
|
token: string;
|
|
expiresIn: number;
|
|
impersonation: {
|
|
companyId: string;
|
|
reason: string | undefined;
|
|
durationMinutes: number;
|
|
};
|
|
}>;
|
|
export declare function listRenters(query: {
|
|
q?: string;
|
|
blocked?: string;
|
|
page: number;
|
|
pageSize: number;
|
|
}): Promise<{
|
|
data: unknown[];
|
|
total: number;
|
|
page: number;
|
|
pageSize: number;
|
|
totalPages: number;
|
|
}>;
|
|
export declare function setRenterActive(id: string, isActive: boolean): any;
|
|
export declare function getPlatformMetrics(): Promise<{
|
|
totalCompanies: any;
|
|
activeCompanies: any;
|
|
trialingCompanies: any;
|
|
suspendedCompanies: any;
|
|
totalRenters: any;
|
|
totalReservations: any;
|
|
}>;
|
|
export declare function listNotifications(query: {
|
|
channel?: string;
|
|
status?: string;
|
|
companyId?: string;
|
|
page: number;
|
|
pageSize: number;
|
|
}): Promise<{
|
|
data: unknown[];
|
|
total: number;
|
|
page: number;
|
|
pageSize: number;
|
|
totalPages: number;
|
|
}>;
|
|
export declare function getAuditLogs(query: {
|
|
adminId?: string;
|
|
action?: string;
|
|
companyId?: string;
|
|
entityId?: string;
|
|
page: number;
|
|
pageSize: number;
|
|
}): Promise<{
|
|
data: unknown[];
|
|
total: number;
|
|
page: number;
|
|
pageSize: number;
|
|
totalPages: number;
|
|
}>;
|
|
export declare function listAdmins(): Promise<any>;
|
|
export declare function createAdmin(body: {
|
|
email: string;
|
|
firstName: string;
|
|
lastName: string;
|
|
role: string;
|
|
password: string;
|
|
permissions?: any[];
|
|
}): Promise<Omit<any, "passwordHash" | "totpSecret">>;
|
|
export declare function updateAdmin(id: string, body: {
|
|
email?: string;
|
|
firstName?: string;
|
|
lastName?: string;
|
|
role?: string;
|
|
password?: string;
|
|
isActive?: boolean;
|
|
}): Promise<Omit<any, "passwordHash" | "totpSecret">>;
|
|
export declare function updateAdminRole(id: string, role: string): any;
|
|
export declare function updateAdminPermissions(id: string, permissions: any[]): Promise<Omit<any, "passwordHash" | "totpSecret">>;
|
|
export declare function getBilling(query: {
|
|
q?: string;
|
|
status?: string;
|
|
plan?: string;
|
|
page: number;
|
|
pageSize: number;
|
|
}): Promise<{
|
|
data: any[];
|
|
total: number;
|
|
page: number;
|
|
pageSize: number;
|
|
totalPages: number;
|
|
}>;
|
|
export declare function getCompanyInvoices(companyId: string, query: {
|
|
page: number;
|
|
pageSize: number;
|
|
}): Promise<{
|
|
data: unknown[];
|
|
total: number;
|
|
page: number;
|
|
pageSize: number;
|
|
totalPages: number;
|
|
}>;
|
|
export declare function getInvoicePdf(invoiceId: string): Promise<{
|
|
pdfBuffer: Buffer<ArrayBufferLike>;
|
|
invoiceNumber: any;
|
|
}>;
|
|
export declare function getBillingAccountDetail(companyId: string): Promise<any>;
|
|
export declare function updateBillingAccount(billingAccountId: string, data: Parameters<typeof billingService.updateBillingAccount>[1], adminId: string, ip?: string): Promise<any>;
|
|
export declare function setDunningPaused(billingAccountId: string, paused: boolean, adminId: string, ip?: string): Promise<any>;
|
|
export declare function createBillingInvoice(billingAccountId: string, data: Parameters<typeof billingService.createDraftInvoice>[1], adminId: string, ip?: string): Promise<any>;
|
|
export declare function finalizeBillingInvoice(invoiceId: string, adminId: string, ip?: string): Promise<any>;
|
|
export declare function payBillingInvoice(invoiceId: string, data: Parameters<typeof billingService.payInvoice>[1], adminId: string, ip?: string): Promise<any>;
|
|
export declare function retryBillingInvoicePayment(invoiceId: string, data: Parameters<typeof billingService.retryInvoicePayment>[1], adminId: string, ip?: string): Promise<any>;
|
|
export declare function voidBillingInvoice(invoiceId: string, reason: string, adminId: string, ip?: string): Promise<any>;
|
|
export declare function markBillingInvoiceUncollectible(invoiceId: string, reason: string, adminId: string, ip?: string): Promise<any>;
|
|
export declare function issueBillingCreditNote(invoiceId: string, data: Parameters<typeof billingService.issueCreditNote>[1], adminId: string, ip?: string): Promise<any>;
|
|
export declare function issueBillingRefund(invoiceId: string, data: Parameters<typeof billingService.issueRefund>[1], adminId: string, ip?: string): Promise<any>;
|
|
export declare function getMarketplaceHomepage(): Promise<import("@rentaldrivego/types").MarketplaceHomepageConfig>;
|
|
export declare function updateMarketplaceHomepage(homepage: any, adminId: string, ip?: string): Promise<import("@rentaldrivego/types").MarketplaceHomepageConfig>;
|
|
export declare function getPricingConfigs(): any;
|
|
export declare function updatePricingConfigs(entries: {
|
|
plan: string;
|
|
billingPeriod: string;
|
|
amount: number;
|
|
}[], adminId: string, ip?: string): Promise<any>;
|
|
export declare function listPlanFeatures(): any;
|
|
export declare function createPlanFeature(data: Parameters<typeof repo.createPlanFeature>[0], adminId: string, ip?: string): Promise<any>;
|
|
export declare function updatePlanFeature(id: string, data: Parameters<typeof repo.updatePlanFeature>[1], adminId: string, ip?: string): Promise<any>;
|
|
export declare function deletePlanFeature(id: string, adminId: string, ip?: string): Promise<void>;
|
|
export declare function listPromotions(): any;
|
|
export declare function createPromotion(data: Parameters<typeof repo.createPromotion>[0], adminId: string, ip?: string): Promise<any>;
|
|
export declare function updatePromotion(id: string, data: Parameters<typeof repo.updatePromotion>[1], adminId: string, ip?: string): Promise<any>;
|
|
export declare function deletePromotion(id: string, adminId: string, ip?: string): Promise<void>;
|
|
//# sourceMappingURL=admin.service.d.ts.map
|