import { AxiosInstance } from "axios"; import Base, { MaybeRaw, Options } from "../../../../Base"; import { PaginatedResponse, SearchParams } from "../../../../interfaces/global"; import { Pool, PoolChange, PoolQueryOptions, PoolTargetPatch } from "../../../../interfaces/high5/space/pool"; import { OrganizationMember } from "../../../../interfaces/idp"; export default class High5Pool extends Base { constructor(options: Options, axios: AxiosInstance); /** * Get a pool from a space * * @param orgName - Name of the organization * @param spaceName - Name of the space * @param name - Name of the pool * @returns Pool */ getPool(orgName: string, spaceName: string, name: string, raw?: { raw: R; }): Promise>; /** * Replace a pool of a space * * @param orgName - Name of the organization * @param spaceName - Name of the space * @param poolName - Name of the old/current pool * @param name - New name for the pool * @param targets - Execution targets that compromise the pool * @returns The new Pool */ replacePool(orgName: string, spaceName: string, poolName: string, name: string, targets: string[], raw?: { raw: R; }): Promise>; /** * Patch a pool of a space * * @param orgName - Name of the organization * @param spaceName - Name of the space * @param poolName - Name of the pool * @param name - New name for the pool * @param targets - Execution targets that compromise the pool * @returns The patched Pool */ patchPool(orgName: string, spaceName: string, poolName: string, name?: string, targets?: PoolTargetPatch, raw?: { raw: R; }): Promise>; /** * Delete a pool of a space * * @param orgName - Name of the organization * @param spaceName - Name of the space * @param poolName - Name of the pool */ deletePool(orgName: string, spaceName: string, poolName: string, raw?: { raw: R; }): Promise>; /** * Retrieves all pools of a High5 Space which match the provided search filter(s). Will return all pools of the Space if no filter is provided. * * @param orgName Name of the Organization * @param spaceName Name of the Space * @param filters (optional) Array of search filters * @param sorting (optional) Sorting object * @param limit (optional) Max number of results (1-100; defaults to 25) * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0) * @returns Object containing an array of Pool and the total number of results found in the database (independent of limit and page) */ searchPools({ orgName, spaceName, filters, sorting, options, limit, page, }: SearchParams & { orgName: string; spaceName: string; options?: PoolQueryOptions; }, raw?: { raw: R; }): Promise>>; /** * Add a pool to a space * * @param orgName - Name of the organization * @param spaceName - Name of the space * @param name - Name of the pool * @param targets - Execution targets that compromise the pool * @returns The created Pool */ addPool(orgName: string, spaceName: string, name: string, targets: string[], raw?: { raw: R; }): Promise>; /** * Retrieves all the pools the current user is assigned to as an execution target * * @returns Array of pools the user is assigned to as execution target */ getPools(raw?: { raw: R; }): Promise>; /** * Retrieves all targets of a pool which match the provided search filter(s). Will return all targets of the pool if no filter is provided. * * @param orgName Name of the Organization * @param spaceName Name of the Space * @param poolName Name of the pool * @param filters (optional) Array of search filters * @param sorting (optional) Sorting object * @param limit (optional) Max number of results (1-100; defaults to 25) * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0) * @returns Object containing an array of OrganizationMember and the total number of results found in the database (independent of limit and page) */ searchTargetsOfPool({ orgName, spaceName, poolName, filters, sorting, limit, page, }: SearchParams & { orgName: string; spaceName: string; poolName: string; }, raw?: { raw: R; }): Promise>>; /** * Updates the avatar of the specified pool * @param orgName Name of the organization * @param spaceName Name of the space * @param name Name of the pool * @param file Image as Javascript File * @returns Pool details with updated avatar */ updateAvatar(orgName: string, spaceName: string, name: string, file: File, raw?: { raw: R; }): Promise>; protected getEndpoint(endpoint: string): string; }