/** * @module Clients / Domains * @category Entities */ import { AxiosResponse } from 'axios'; import { JwtConfig, LedgerDomain, 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 { DomainListParams } from './domain-list-params'; /** * Single domain API response. */ export declare class DomainResponse extends BaseRecordResponse { /** * Record data extracted from the `data` property of the response body. */ domain: LedgerDomain; constructor(response: AxiosResponse, LedgerRecord>); } /** * Domains list API response. */ export declare class DomainsResponse extends BaseListResponse { /** * A flattened list of records, extracted from the `data` property of * each record returned. */ domains: LedgerDomain[]; constructor(response: AxiosResponse, void>); } /** * Allows querying and managing domains. * * @see {LedgerDomain} */ export declare class DomainClient extends BaseClient { /** * 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 {LedgerDomain} * @see {CreateRecordBuilder} * @param options.record initial record payload (optional) * @param options.handle specify handle to be updated, if any (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 can pass the existing record payload to * this method to use as initial content. * * @see {LedgerDomain} * @see {UpdateRecordBuilder} * @param record initial record payload * @returns a builder instance */ from(record: LedgerRecord): UpdateRecordBuilder; /** * Gets a ledger domain by identifier (luid or handle). * * @see {LedgerDomain} * @throws {Error} if the domain doesn't exist or the * current user doesn't have access to this domain * @param id a unique domain handle * @returns a response with the requested domain */ read(id: LedgerIdentifier, authParams?: Partial): Promise; /** * Queries domains from a ledger. * * @see {LedgerDomain} * @param params query parameters * @returns domains list response with all found domains */ list(params?: DomainListParams): Promise; }