/** * @module Clients / Circles * @category Entities */ import { AxiosResponse } from 'axios'; import { JwtConfig, LedgerCircle, LedgerIdentifier, LedgerPagedList, LedgerRecord } from "../../../types/src"; import { AccessClient } from '../common/clients/access-client'; import { BaseChangeClient } from '../common/clients/base-change-client'; import { BaseClient, BaseClientOptions } from '../common/clients/base-client'; import { CreateRecordBuilder } from '../common/services/create-record-builder'; import { UpdateRecordBuilder } from '../common/services/update-record-builder'; import { BaseRecordResponse } from '../common/types/base-record-response'; import { BaseListResponse } from '../common/types/list-response'; import { CircleListParams } from './circle-list-params'; import { CircleSignerClient } from './circle-signer-client'; /** * Single circle API response. */ export declare class CircleResponse extends BaseRecordResponse { /** * Record data extracted from the `data` property of the response body. */ circle: LedgerCircle; constructor(response: AxiosResponse, LedgerRecord>); } /** * Circles list API response. */ export declare class CirclesResponse extends BaseListResponse { circles: LedgerCircle[]; constructor(response: AxiosResponse, void>); } /** * Allows querying and managing circles. * * @see {LedgerCircle} */ export declare class CircleClient extends BaseClient { /** * Allows querying and managing circle signers. * * @see {LedgerCircleSigner} */ signer: CircleSignerClient; /** * Allows querying changes. * */ change: BaseChangeClient; /** * Allows checking access. * */ access: AccessClient; constructor(options: BaseClientOptions); /** * Initializes a builder instance that supports chaining to make it * easier to work with ledger records. You can pass the record * payload to this method to use as initial content, this is useful * when you already have an object ready, for example when validating * API responses or modifying an existing record. An empty record is * going to be created if no initial data is provided. * * @see {LedgerCircle} * @see {CreateRecordBuilder} * @param record initial record payload (optional) * @returns a builder instance */ init(record?: Partial>): CreateRecordBuilder; /** * Initializes a builder instance for updating existing records. * The builder supports chaining to make it easier to work with * ledger records. You need to pass the existing record payload * to this method to use as initial content. * * @see {LedgerCircle} * @see {UpdateRecordBuilder} * @param record initial record payload * @returns a builder instance */ from(record: LedgerRecord): UpdateRecordBuilder; /** * Gets a ledger circle by identifier (luid or handle). * * @see {LedgerCircle} * @throws {Error} if the circle doesn't exist or the * current user doesn't have access to this circle * @param id a unique circle handle * @returns a single circle response with the requested circle */ read(id: LedgerIdentifier, authParams?: Partial): Promise; /** * Queries circles from a ledger. * * @see {LedgerCircle} * @param params query parameters * @returns circles list response with all found circles */ list(params?: CircleListParams): Promise; }