import { LicenseFindResultData } from './license/licenseFindResult'; import { FilterFindResultData } from './filterFindResult'; import { AbstractEntity } from '../../abstractEntity'; import { LicensesClient, LicenseFindRawPayload } from '../licensesClient'; import { OfferFindResultData } from './offer/offerFindResult'; import { Parameters } from '../../abstractRestfulClient'; import { EndCustomerOrganizationUnitFindResultType } from './endCustomerOrganizationUnit/endCustomerOrganizationUnitFindResult'; export declare type FindResultItem = { license: LicenseFindResultData; offer?: OfferFindResultData; endCustomerOrganizationUnit?: EndCustomerOrganizationUnitFindResultType; }; export declare type FindData = { pagination: { currentPage: number; totalPage: number; total: number; }; results: Array; filters: Array; }; export declare type FindResultData = { results: AsyncGenerator<{ license: LicenseFindResultData; offer?: OfferFindResultData; }, void, undefined>; filters: FilterFindResultData[]; totalPage: number; nbResults: number; }; export declare type FindConfig = { status: number; data: Array<{ name: string; scope: string; state: string; }>; }; export declare class FindResult extends AbstractEntity { #private; /** * FindResult constructor. Uses the client and request data to go through the pages. * * @param data - Find call result data * @param client - Client used to make the request * @param postData - Post data passed to the request * @param parameters - Extra parameters passed to the request */ constructor(data: FindData, client: LicensesClient, postData?: LicenseFindRawPayload, parameters?: Parameters); /** * Gets all the licenses for the current page * @returns Generator|{@link LicenseFindResult}[] */ getResultsForCurrentPage(): Generator<{ license: LicenseFindResultData; offer?: OfferFindResultData; endCustomerOrganizationUnit?: EndCustomerOrganizationUnitFindResultType; }, void, undefined>; /** * Gets all the licenses from the result, page per page. * Follows the async interator implementation through the generator pattern. * @returns Generator|{@link LicenseFindResult}[] */ getResults(): AsyncGenerator<{ license: LicenseFindResultData; offer?: OfferFindResultData; endCustomerOrganizationUnit?: EndCustomerOrganizationUnitFindResultType; }, void, undefined>; get results(): AsyncGenerator<{ license: LicenseFindResultData; offer?: OfferFindResultData; }, void, undefined>; get filters(): Array; get nbResults(): number; get totalPage(): number; /** * Plain JSON object representation of the result entity. * @returns {@link FindResultData} */ toJSON(): FindResultData; }