/** * FlexPrice Customer Portal - Dashboard API (custom) * * Merged from api/custom/typescript/. Uses the FlexPrice SDK * (customers, subscriptions, invoices, wallets, entitlements, features). */ import type { SDKOptions } from "../lib/config.js"; import { Flexprice } from "../index.js"; import type * as models from "./models/index.js"; /** Return type of {@link Flexprice.customers.getCustomerByExternalId} (typically {@link models.CustomerResponse}). */ type CustomerFromLookup = Awaited>; export type DashboardOptions = { subscriptionLimit?: number; invoiceLimit?: number; includeCustomer?: boolean; includeSubscriptions?: boolean; includeInvoices?: boolean; includeUsage?: boolean; includeEntitlements?: boolean; includeSummary?: boolean; includeWalletBalance?: boolean; }; export interface CustomerDashboardData { customer?: CustomerFromLookup; usage?: models.CustomerUsageSummaryResponse; entitlements?: models.CustomerEntitlementsResponse; walletBalance?: models.WalletResponse; activeSubscriptions?: models.SubscriptionResponse[]; invoices?: models.InvoiceResponse[]; summary?: models.CustomerMultiCurrencyInvoiceSummary; metadata: { fetchedAt: string; customerId: string; totalSubscriptions?: number; totalInvoices?: number; errors?: string[]; warnings?: string[]; }; } /** * Customer Portal – single entry point for customer dashboard data using the FlexPrice SDK. */ export declare class CustomerPortal { private sdk; constructor(options: SDKOptions); /** * Get dashboard data for a customer by external ID. */ getDashboardData(customerExternalId: string, options?: DashboardOptions): Promise; } export declare function createCustomerPortal(options: SDKOptions): CustomerPortal; export declare function getCustomerDashboardData(customerExternalId: string, options?: DashboardOptions, config?: SDKOptions): Promise; export {}; //# sourceMappingURL=customer-portal.d.ts.map