import { OrganizationCreateRequest } from "../../admin-console/models/request/organization-create.request";
import { PremiumCheckoutSessionRequest } from "../../billing/models/request/premium-checkout-session.request";
import { SubscriptionCancellationRequest } from "../../billing/models/request/subscription-cancellation.request";
import { OrganizationBillingMetadataResponse } from "../../billing/models/response/organization-billing-metadata.response";
import { PlanResponse } from "../../billing/models/response/plan.response";
import { PremiumCheckoutSessionResponse } from "../../billing/models/response/premium-checkout-session.response";
import { ListResponse } from "../../models/response/list.response";
import { OrganizationId } from "../../types/guid";
import { InvoicesResponse } from "../models/response/invoices.response";
import { PremiumPlanResponse } from "../models/response/premium-plan.response";
import { ProviderSubscriptionResponse } from "../models/response/provider-subscription-response";

export abstract class BillingApiServiceAbstraction {
  abstract cancelOrganizationSubscription(
    organizationId: string,
    request: SubscriptionCancellationRequest,
  ): Promise<void>;

  abstract cancelPremiumUserSubscription(request: SubscriptionCancellationRequest): Promise<void>;

  abstract createPremiumCheckoutSession(
    request: PremiumCheckoutSessionRequest,
  ): Promise<PremiumCheckoutSessionResponse>;

  abstract getOrganizationBillingMetadata(
    organizationId: OrganizationId,
  ): Promise<OrganizationBillingMetadataResponse>;

  abstract getOrganizationBillingMetadataSelfHost(
    organizationId: OrganizationId,
  ): Promise<OrganizationBillingMetadataResponse>;

  abstract getPlans(): Promise<ListResponse<PlanResponse>>;

  abstract getPremiumPlan(): Promise<PremiumPlanResponse>;

  abstract getProviderClientInvoiceReport(providerId: string, invoiceId: string): Promise<string>;

  abstract getProviderInvoices(providerId: string): Promise<InvoicesResponse>;

  abstract getProviderSubscription(providerId: string): Promise<ProviderSubscriptionResponse>;

  abstract restartSubscription(
    organizationId: string,
    request: OrganizationCreateRequest,
  ): Promise<void>;
}
