/** * @module Clients / Effects * @category Entities */ import { AxiosResponse } from 'axios'; import { JwtConfig, LedgerEffect, 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 { EffectListParams } from './effect-list-params'; /** * Single effect API response. */ export declare class EffectResponse extends BaseRecordResponse { /** * Record data extracted from the `data` property of the response body. */ effect: LedgerEffect; constructor(response: AxiosResponse, LedgerRecord>); } /** * Effects list API response. */ export declare class EffectsResponse extends BaseListResponse { effects: LedgerEffect[]; constructor(response: AxiosResponse, void>); } /** * Allows querying and managing effects. * * @see {LedgerEffect} */ export declare class EffectClient 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 {LedgerEffect} * @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 can pass the existing record payload to * this method to use as initial content. * * @see {LedgerEffect} * @see {UpdateRecordBuilder} * @param record initial record payload * @returns a builder instance */ from(record: LedgerRecord): UpdateRecordBuilder; /** * Gets a ledger effect by identifier (luid or handle). * * @see {LedgerEffect} * @throws {Error} if the effect doesn't exist or the * current user doesn't have access to this effect * @param id a unique effect handle * @returns a single effect response with the requested effect */ read(id: LedgerIdentifier, authParams?: Partial): Promise; /** * Queries effects from a ledger. * * @see {LedgerEffect} * @param params query parameters * @returns effects list response with all found effects */ list(params?: EffectListParams): Promise; }