@bookla-app/react-client-sdk
Version:
React SDK for Bookla Client API
20 lines (19 loc) • 1.56 kB
TypeScript
import { HttpClient } from "../core/http-client";
import { RequestOptions } from "../types/config";
import { SubscriptionCartResponse, PurchaseSubscriptionsResponse, SubscriptionContract, CompanySubscription } from "../types/responses";
import { AddToCartRequest, CreateSubscriptionPurchaseRequest, RenewPurchasesRequest } from "../types/requests";
export declare class ClientSubscriptionService {
private client;
constructor(client: HttpClient);
private validateAddToCartRequest;
private validateRenewRequest;
getCart(companyId: string, options?: RequestOptions): Promise<SubscriptionCartResponse>;
addToCart(companyId: string, data: AddToCartRequest, options?: RequestOptions): Promise<SubscriptionCartResponse>;
removeFromCart(companyId: string, itemId: string, options?: RequestOptions): Promise<SubscriptionCartResponse>;
checkout(companyId: string, options?: RequestOptions): Promise<PurchaseSubscriptionsResponse>;
getPurchases(companyId: string, options?: RequestOptions): Promise<SubscriptionContract[]>;
getPurchase(companyId: string, itemId: string, options?: RequestOptions): Promise<SubscriptionContract>;
renewPurchases(companyId: string, data: RenewPurchasesRequest, options?: RequestOptions): Promise<PurchaseSubscriptionsResponse>;
getAvailableSubscriptions(companyId: string, ids?: string[], options?: RequestOptions): Promise<CompanySubscription[]>;
createPurchase(companyId: string, data: CreateSubscriptionPurchaseRequest, options?: RequestOptions): Promise<PurchaseSubscriptionsResponse>;
}