@finbourne/lusid-sdk-angular8
Version:
An angular (8+) SDK for secure access to the LUSID® by FINBOURNE web API
177 lines (176 loc) • 19.8 kB
TypeScript
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Account } from '../model/account';
import { AccountProperties } from '../model/accountProperties';
import { AccountsUpsertResponse } from '../model/accountsUpsertResponse';
import { ChartOfAccounts } from '../model/chartOfAccounts';
import { ChartOfAccountsProperties } from '../model/chartOfAccountsProperties';
import { ChartOfAccountsRequest } from '../model/chartOfAccountsRequest';
import { DeleteAccountsResponse } from '../model/deleteAccountsResponse';
import { DeletedEntityResponse } from '../model/deletedEntityResponse';
import { PagedResourceListOfAccount } from '../model/pagedResourceListOfAccount';
import { PagedResourceListOfChartOfAccounts } from '../model/pagedResourceListOfChartOfAccounts';
import { Property } from '../model/property';
import { Configuration } from '../configuration';
import * as i0 from "@angular/core";
export declare class ChartOfAccountsService {
protected httpClient: HttpClient;
protected basePath: string;
defaultHeaders: HttpHeaders;
configuration: Configuration;
constructor(httpClient: HttpClient, basePath: string, configuration: Configuration);
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm;
/**
* [EXPERIMENTAL] CreateChartOfAccounts: Create a Chart of Accounts
* Create the given chart of accounts.
* @param scope The scope of the Chart of Accounts.
* @param chartOfAccountsRequest The definition of the Chart of Accounts.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
createChartOfAccounts(scope: string, chartOfAccountsRequest: ChartOfAccountsRequest, observe?: 'body', reportProgress?: boolean): Observable<ChartOfAccounts>;
createChartOfAccounts(scope: string, chartOfAccountsRequest: ChartOfAccountsRequest, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<ChartOfAccounts>>;
createChartOfAccounts(scope: string, chartOfAccountsRequest: ChartOfAccountsRequest, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<ChartOfAccounts>>;
/**
* [EXPERIMENTAL] DeleteAccounts: Soft or hard delete multiple accounts
* Delete one or more account from the chart of accounts. Soft deletion marks the account as inactive While the Hard deletion is deleting the account. The maximum number of accounts that this method can delete per request is 2,000.
* @param scope The scope of the chart of accounts.
* @param code The code of the chart of accounts. Together with the scope this uniquely identifies the Chart of Accounts.
* @param requestBody The codes of the accounts to delete.
* @param deleteMode The delete mode to use (defaults to \'Soft\').
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
deleteAccounts(scope: string, code: string, requestBody: Array<string>, deleteMode?: 'Soft' | 'Hard', observe?: 'body', reportProgress?: boolean): Observable<DeleteAccountsResponse>;
deleteAccounts(scope: string, code: string, requestBody: Array<string>, deleteMode?: 'Soft' | 'Hard', observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<DeleteAccountsResponse>>;
deleteAccounts(scope: string, code: string, requestBody: Array<string>, deleteMode?: 'Soft' | 'Hard', observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<DeleteAccountsResponse>>;
/**
* [EXPERIMENTAL] DeleteChartOfAccounts: Delete a Chart of Accounts
* Delete the given chart of accounts.
* @param scope The scope of the Chart of Accounts to be deleted.
* @param code The code of the Chart of Accounts to be deleted.Together with the scope this uniquely identifies the chart of accounts.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
deleteChartOfAccounts(scope: string, code: string, observe?: 'body', reportProgress?: boolean): Observable<DeletedEntityResponse>;
deleteChartOfAccounts(scope: string, code: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<DeletedEntityResponse>>;
deleteChartOfAccounts(scope: string, code: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<DeletedEntityResponse>>;
/**
* [EXPERIMENTAL] GetAccount: Get Account
* Retrieve the definition of a particular Account which is part of a Chart of Accounts.
* @param scope The scope of the ChartOfAccounts.
* @param code The code of the ChartOfAccounts. Together with the scope this uniquely identifies the ChartOfAccounts.
* @param accountCode The code of the Account.
* @param effectiveAt The effective datetime or cut label at which to retrieve the Account properties. Defaults to the current LUSID system datetime if not specified.
* @param asAt The asAt datetime at which to retrieve the Account definition. Defaults to returning the latest version of the Account definition if not specified.
* @param propertyKeys A list of property keys from the \'Account\' domain to decorate onto the Account. These must take the format {domain}/{scope}/{code}, for example \'Account/Manager/Id\'. If not provided will return all the entitled properties for that Account.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
getAccount(scope: string, code: string, accountCode: string, effectiveAt?: string, asAt?: Date, propertyKeys?: Array<string>, observe?: 'body', reportProgress?: boolean): Observable<Account>;
getAccount(scope: string, code: string, accountCode: string, effectiveAt?: string, asAt?: Date, propertyKeys?: Array<string>, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Account>>;
getAccount(scope: string, code: string, accountCode: string, effectiveAt?: string, asAt?: Date, propertyKeys?: Array<string>, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Account>>;
/**
* [EXPERIMENTAL] GetChartOfAccounts: Get ChartOfAccounts
* Retrieve the definition of a particular ChartOfAccounts.
* @param scope The scope of the ChartOfAccounts.
* @param code The code of the ChartOfAccounts. Together with the scope this uniquely identifies the ChartOfAccounts.
* @param effectiveAt The effective datetime or cut label at which to retrieve the ChartOfAccounts properties. Defaults to the current LUSID system datetime if not specified.
* @param asAt The asAt datetime at which to retrieve the ChartOfAccounts definition. Defaults to returning the latest version of the ChartOfAccounts definition if not specified.
* @param propertyKeys A list of property keys from the \'ChartOfAccounts\' domain to decorate onto the ChartOfAccounts. These must take the format {domain}/{scope}/{code}, for example \'ChartOfAccounts/Manager/Id\'. If not provided will return all the entitled properties for that ChartOfAccounts.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
getChartOfAccounts(scope: string, code: string, effectiveAt?: string, asAt?: Date, propertyKeys?: Array<string>, observe?: 'body', reportProgress?: boolean): Observable<ChartOfAccounts>;
getChartOfAccounts(scope: string, code: string, effectiveAt?: string, asAt?: Date, propertyKeys?: Array<string>, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<ChartOfAccounts>>;
getChartOfAccounts(scope: string, code: string, effectiveAt?: string, asAt?: Date, propertyKeys?: Array<string>, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<ChartOfAccounts>>;
/**
* [EXPERIMENTAL] ListAccounts: List Accounts
* List the accounts in a chart of accounts
* @param scope The scope of the chart of account.
* @param code The code of the chart of account. Together with the scope this uniquely identifies the chart of accounts.
* @param effectiveAt The effective datetime or cut label at which to list the TimeVariant properties decorated on Accounts. Defaults to the current LUSID system datetime if not specified.
* @param asAt The asAt datetime at which to retrieve the instrument. Defaults to returning the latest version if not specified.
* @param page The pagination token to use to continue listing charts of accounts; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request. Also, if set, a start value cannot be provided.
* @param start When paginating, skip this number of results.
* @param limit When paginating, limit the results to this number. Defaults to 100 if not specified.
* @param filter Expression to filter the results. For example, to filter on the Account type, specify \"code eq \'001\'\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914.
* @param propertyKeys A list of property keys from the \'Account\' domain to decorate onto the Account. These must have the format {domain}/{scope}/{code}, for example \'Account/system/Name\'.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
listAccounts(scope: string, code: string, effectiveAt?: string, asAt?: Date, page?: string, start?: number, limit?: number, filter?: string, propertyKeys?: Array<string>, observe?: 'body', reportProgress?: boolean): Observable<PagedResourceListOfAccount>;
listAccounts(scope: string, code: string, effectiveAt?: string, asAt?: Date, page?: string, start?: number, limit?: number, filter?: string, propertyKeys?: Array<string>, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<PagedResourceListOfAccount>>;
listAccounts(scope: string, code: string, effectiveAt?: string, asAt?: Date, page?: string, start?: number, limit?: number, filter?: string, propertyKeys?: Array<string>, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<PagedResourceListOfAccount>>;
/**
* [EXPERIMENTAL] ListChartsOfAccounts: List charts of accounts
* List all the charts of accounts matching particular criteria.
* @param effectiveAt The effective datetime or cut label at which to list the TimeVariant properties for the Chart Of Accounts. Defaults to the current LUSID system datetime if not specified.
* @param asAt The asAt datetime at which to list the charts of accounts. Defaults to returning the latest version of each chart of accounts if not specified.
* @param page The pagination token to use to continue listing charts of accounts; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request. Also, if set, a start value cannot be provided.
* @param start When paginating, skip this number of results.
* @param limit When paginating, limit the results to this number. Defaults to 100 if not specified.
* @param filter Expression to filter the results. For example, to filter on the ChartOfAccounts type, specify \"id.Code eq \'001\'\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914.
* @param propertyKeys A list of property keys from the \'ChartOfAccounts\' domain to decorate onto each chart of accounts. These must take the format {domain}/{scope}/{code}, for example \'ChartOfAccounts/Manager/Id\'.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
listChartsOfAccounts(effectiveAt?: string, asAt?: Date, page?: string, start?: number, limit?: number, filter?: string, propertyKeys?: Array<string>, observe?: 'body', reportProgress?: boolean): Observable<PagedResourceListOfChartOfAccounts>;
listChartsOfAccounts(effectiveAt?: string, asAt?: Date, page?: string, start?: number, limit?: number, filter?: string, propertyKeys?: Array<string>, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<PagedResourceListOfChartOfAccounts>>;
listChartsOfAccounts(effectiveAt?: string, asAt?: Date, page?: string, start?: number, limit?: number, filter?: string, propertyKeys?: Array<string>, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<PagedResourceListOfChartOfAccounts>>;
/**
* [EXPERIMENTAL] UpsertAccounts: Upsert Accounts
* Create or update accounts in the chart of accounts. An account will be updated if it already exists and created if it does not. The maximum number of accounts that this method can upsert per request is 2,000.
* @param scope The scope of the chart of account.
* @param code The code of the chart of account. Together with the scope this uniquely identifies the chart of accounts.
* @param account A list of accounts to be created or updated.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
upsertAccounts(scope: string, code: string, account: Array<Account>, observe?: 'body', reportProgress?: boolean): Observable<AccountsUpsertResponse>;
upsertAccounts(scope: string, code: string, account: Array<Account>, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<AccountsUpsertResponse>>;
upsertAccounts(scope: string, code: string, account: Array<Account>, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<AccountsUpsertResponse>>;
/**
* [EXPERIMENTAL] UpsertAccountsProperties: Upsert accounts properties
* Update or insert one or more properties onto a single account. A property will be updated if it already exists and inserted if it does not. All properties must be of the domain \'Account\'. Upserting a property that exists for a chart of accounts, with a null value, will delete the instance of the property for that group. Properties have an <i>effectiveFrom</i> datetime for which the property is valid, and an <i>effectiveUntil</i> datetime until which the property is valid. Not supplying an <i>effectiveUntil</i> datetime results in the property being valid indefinitely, or until the next <i>effectiveFrom</i> datetime of the property.
* @param scope The scope of the Chart of Accounts to update or insert the properties onto.
* @param code The code of the Chart of Accounts to update or insert the properties onto. Together with the scope this uniquely identifies the chart of accounts.
* @param accountCode The unique ID of the account to create or update properties for.
* @param requestBody The properties to be updated or inserted onto the chart of account. Each property in the request must be keyed by its unique property key. This has the format {domain}/{scope}/{code} e.g. \"Account/Manager/Id\".
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
upsertAccountsProperties(scope: string, code: string, accountCode: string, requestBody?: {
[key: string]: Property;
}, observe?: 'body', reportProgress?: boolean): Observable<AccountProperties>;
upsertAccountsProperties(scope: string, code: string, accountCode: string, requestBody?: {
[key: string]: Property;
}, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<AccountProperties>>;
upsertAccountsProperties(scope: string, code: string, accountCode: string, requestBody?: {
[key: string]: Property;
}, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<AccountProperties>>;
/**
* [EXPERIMENTAL] UpsertChartOfAccountsProperties: Upsert chart of accounts properties
* Update or insert one or more properties onto a single chart of accounts. A property will be updated if it already exists and inserted if it does not. All properties must be of the domain \'ChartOfAccounts\'. Upserting a property that exists for a chart of accounts, with a null value, will delete the instance of the property for that group. Properties have an <i>effectiveFrom</i> datetime for which the property is valid, and an <i>effectiveUntil</i> datetime until which the property is valid. Not supplying an <i>effectiveUntil</i> datetime results in the property being valid indefinitely, or until the next <i>effectiveFrom</i> datetime of the property.
* @param scope The scope of the Chart of Accounts to update or insert the properties onto.
* @param code The code of the Chart of Accounts to update or insert the properties onto. Together with the scope this uniquely identifies the chart of accounts.
* @param requestBody The properties to be updated or inserted onto the chart of account. Each property in the request must be keyed by its unique property key. This has the format {domain}/{scope}/{code} e.g. \"ChartOfAccounts/Manager/Id\".
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
upsertChartOfAccountsProperties(scope: string, code: string, requestBody?: {
[key: string]: Property;
}, observe?: 'body', reportProgress?: boolean): Observable<ChartOfAccountsProperties>;
upsertChartOfAccountsProperties(scope: string, code: string, requestBody?: {
[key: string]: Property;
}, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<ChartOfAccountsProperties>>;
upsertChartOfAccountsProperties(scope: string, code: string, requestBody?: {
[key: string]: Property;
}, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<ChartOfAccountsProperties>>;
static ɵfac: i0.ɵɵFactoryDef<ChartOfAccountsService, [null, { optional: true; }, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDef<ChartOfAccountsService>;
}