/** * Class SubscriptionsClient */ import { AbstractRestfulClient } from '../abstractRestfulClient'; import { SubscriptionData } from './entities/subscription'; import { SubscriptionsListResult } from './entities/subscriptionsListResult'; export declare type SubscriptionsListPayload = { subscription?: string[]; status?: string[]; partnerTag?: string[]; marketplace?: string[]; company?: string[]; startDate?: string; endingDate?: string; lastUpdate?: string; perPage?: string; page?: string; sortBy?: string; sortDirection?: 'ASC' | 'DESC'; }; export declare type AdminSubscriptionsListData = { data: Array; pagination: { perPage: number; currentPage: number; totalPage: number; total: number; next: string; previous: string; }; }; export declare type PartnerSubscriptionsListData = { data: Array; status: number; }; export declare type PartnerSubscription = { reference: string; name: string; status: string; dateDemand: string; dateValidation: string | null; dateEnd: string | null; level: string | null; error_msg: string | null; details: { partnerId: string; }; extraInformation: { programs: Record; }; }; export declare type SubscriptionCreationData = { name: string; level: string; sku: string; extraInformation?: { programs: { [programName: string]: Record; }; }; }; export declare type CreateSubscriptionData = { reference: string; subscription: SubscriptionData; }; export declare class SubscriptionsClient extends AbstractRestfulClient { /** * The base path of the API */ protected basePath: string; /** * The path of the List endpoint */ private LIST_PATH; /** * Pagination for these endpoints are camel cased (`&perPage=x` instead of `&per_page=x`) */ protected isCamelPagination: boolean; /** * @deprecated use listAdmin instead * Calls the admin subscriptions API list endpoint * * @param data - List payload * * @returns Promise\\> */ listRaw(data?: SubscriptionsListPayload): Promise; /** * Lists subscriptions and returns a SubscriptionsListResult to manipulate the results. * * Note: This endpoint requires an admin token to be called * * @param filters - List payload * @param perPage - Number of results per page * @param page - Page number to fetch * * @returns Promise\<{@link SubscriptionsListResult}\> * */ list(filters?: SubscriptionsListPayload): Promise; listAdmin(filters?: SubscriptionsListPayload, perPage?: number, page?: number): Promise; addSubscription(filters: SubscriptionCreationData): Promise; }