import type { SubscriptionsApi } from "@fluid-app/subscriptions-core";
import type { subscriptions } from "@fluid-app/subscriptions-core";
import type { FetchClient } from "@fluid-app/portal-tenant-api-client";
import { portalTenant } from "@fluid-app/portal-tenant-api-client";
type BffSubscriptionResponse = Awaited<ReturnType<typeof portalTenant.subscriptions_show>>;
type BffSubscription = NonNullable<BffSubscriptionResponse["subscription"]>;
/**
 * Maps a BFF subscription detail response to the port's SubscriptionDetail.
 *
 * The BFF returns a flat Subscription schema (plan_name, product, etc.) while
 * the port expects richly nested objects (subscription_plan, variant.product).
 * This explicitly maps every field the UI accesses so undefined-property crashes
 * are caught here at the adapter boundary rather than deep in the component tree.
 */
export declare function mapDetailSubscription(bff: BffSubscription): subscriptions.SubscriptionDetailSubscription;
/**
 * Creates a SubscriptionsApi-compatible adapter backed by the portal-tenant BFF.
 *
 * Uses async/await with explicit field mapping. The BFF returns simplified
 * subscription types compared to the full admin API; the adapter maps the
 * response envelope and provides runtime defaults for optional fields.
 */
export declare function createPortalSubscriptionsAdapter(client: FetchClient): SubscriptionsApi;
export {};
//# sourceMappingURL=subscriptions-api-adapter.d.ts.map