@finbourne/lusid-sdk-angular18
Version:
An Angular (18) SDK for secure access to the LUSID® by FINBOURNE web API
412 lines (411 loc) • 26.8 kB
TypeScript
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
import { Observable } from 'rxjs';
import { ClosedPeriod } from '../model/closedPeriod';
import { CreateClosedPeriodRequest } from '../model/createClosedPeriodRequest';
import { CreateTimelineRequest } from '../model/createTimelineRequest';
import { DeletedEntityResponse } from '../model/deletedEntityResponse';
import { PagedResourceListOfClosedPeriod } from '../model/pagedResourceListOfClosedPeriod';
import { PagedResourceListOfTimeline } from '../model/pagedResourceListOfTimeline';
import { PostCloseActivitiesRequest } from '../model/postCloseActivitiesRequest';
import { Timeline } from '../model/timeline';
import { UpdateTimelineRequest } from '../model/updateTimelineRequest';
import { Configuration } from '../configuration';
import * as i0 from "@angular/core";
export interface ConfirmClosedPeriodRequestParams {
/** The scope of the specified Timeline. */
scope: string;
/** The code of the specified Timeline. Together with the scope this uniquely identifies the Timeline. */
code: string;
/** The id of the Closed Period. Together with the scope and code of the Timeline, this uniquely identifies the ClosedPeriod */
closedPeriodId: string;
/** Not in use at the moment */
body?: any;
}
export interface CreateClosedPeriodRequestParams {
/** The scope of the specified Timeline. */
scope: string;
/** The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline. */
code: string;
/** The request containing the details of the Closed Period */
createClosedPeriodRequest?: CreateClosedPeriodRequest;
}
export interface CreateClosedPeriodCandidateRequestParams {
/** The scope of the specified Timeline. */
scope: string;
/** The code of the specified Timeline. Together with the scope this uniquely identifies the Timeline. */
code: string;
/** The request containing the details of the Closed Period */
createClosedPeriodRequest?: CreateClosedPeriodRequest;
}
export interface CreateTimelineRequestParams {
/** The request containing the details of the Timeline */
createTimelineRequest?: CreateTimelineRequest;
}
export interface DeleteTimelineRequestParams {
/** The scope of the specified Timeline. */
scope: string;
/** The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline. */
code: string;
}
export interface GetClosedPeriodRequestParams {
/** The scope of the Timeline. */
scope: string;
/** The code of the Timeline. Together with the scope this uniquely identifies the Timeline. */
code: string;
/** The id of the Closed Period. Together with the scope and code of the Timeline, this uniquely identifies the ClosedPeriod */
closedPeriodId: string;
/** The asAt datetime at which to retrieve the ClosedPeriod definition. Defaults to return the latest version of the definition if not specified. */
asAt?: string;
/** A list of property keys from the \'ClosedPeriod\' domain to decorate onto the ClosedPeriod. These must have the format {domain}/{scope}/{code}, for example \'ClosedPeriod/system/Name\'. */
propertyKeys?: Array<string>;
}
export interface GetTimelineRequestParams {
/** The scope of the specified Timeline. */
scope: string;
/** The code of the specified Timeline. Together with the scope this uniquely identifies the Timeline. */
code: string;
/** The asAt datetime at which to retrieve the Timeline definition. Defaults to return the latest version of the definition if not specified. */
asAt?: string;
/** The effective datetime or cut label at which to retrieve the timeline properties. Defaults to the current LUSID system datetime if not specified. */
effectiveAt?: string;
/** A list of property keys from the \'Timeline\' domain to decorate onto the Timeline. These must have the format {domain}/{scope}/{code}, for example \'Timeline/system/Name\'. */
propertyKeys?: Array<string>;
}
export interface ListClosedPeriodsRequestParams {
/** The scope of the Timeline. */
scope: string;
/** The code of the Timeline. */
code: string;
/** The asAt datetime at which to list the ClosedPeriods. Defaults to returning the latest version of each ClosedPeriod if not specified. */
asAt?: string;
/** The pagination token to use to continue listing ClosedPeriods; 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. */
page?: string;
/** When paginating, limit the results to this number. Defaults to 100 if not specified. */
limit?: number;
/** Expression to filter the results. For example, to filter on the effectiveEnd, specify \"effectiveEnd gt 2019-01-15T10:00:00\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914. */
filter?: string;
/** A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\" */
sortBy?: Array<string>;
/** A list of property keys from the \'ClosedPeriod\' domain to decorate onto each ClosedPeriod. These must take the format {domain}/{scope}/{code}, for example \'ClosedPeriod/Account/id\'. */
propertyKeys?: Array<string>;
}
export interface ListTimelinesRequestParams {
/** The asAt datetime at which to list the Timelines. Defaults to returning the latest version of each Timeline if not specified. */
asAt?: string;
/** The effective datetime or cut label at which to list the Timelines. Note that Timelines are monotemporal, the effectiveAt is for Timevariant Properties on the Timeline only. Defaults to the current LUSID system datetime if not specified. */
effectiveAt?: string;
/** The pagination token to use to continue listing Timelines; 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. */
page?: string;
/** When paginating, limit the results to this number. Defaults to 100 if not specified. */
limit?: number;
/** Expression to filter the results. For example, to filter on the displayName, specify \"displayName eq \'AccountingTimeline\'\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914. */
filter?: string;
/** A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\" */
sortBy?: Array<string>;
/** A list of property keys from the \'Timeline\' domain to decorate onto each Timeline. These must take the format {domain}/{scope}/{code}, for example \'Timeline/Account/id\'. */
propertyKeys?: Array<string>;
}
export interface SetPostCloseActivityRequestParams {
/** The scope of the Timeline. */
scope: string;
/** The code of the Timeline. */
code: string;
/** The ID of the Closed Period. This ID together with the scope and code of the Timeline uniquely defines the Closed Period. */
closedPeriodId: string;
/** This specifies a collection of post-close activities. */
postCloseActivitiesRequest?: PostCloseActivitiesRequest;
}
export interface UnconfirmClosedPeriodRequestParams {
/** The scope of the specified Timeline. */
scope: string;
/** The code of the specified Timeline. Together with the scope this uniquely identifies the Timeline. */
code: string;
/** The id of the Closed Period. Together with the scope and code of the Timeline, this uniquely identifies the ClosedPeriod. The closed period must be the last closed period on the Timeline. */
closedPeriodId: string;
/** Not in use at the moment */
body?: any;
}
export interface UpdateTimelineRequestParams {
/** The scope of the specified Timeline. */
scope: string;
/** The code of the specified Timeline. Together with the domain and scope this uniquely identifies the Timeline. */
code: string;
/** The request containing the updated details of the Timeline */
updateTimelineRequest?: UpdateTimelineRequest;
}
export declare class TimelinesService {
protected httpClient: HttpClient;
protected basePath: string;
defaultHeaders: HttpHeaders;
configuration: Configuration;
encoder: HttpParameterCodec;
constructor(httpClient: HttpClient, basePath: string | string[], configuration: Configuration);
private addToHttpParams;
private addToHttpParamsRecursive;
/**
* [EXPERIMENTAL] ConfirmClosedPeriod: Confirm a Closed Period against a Timeline Entity
* Confirms a Closed Period against a Timeline Entity. Deletes any other unconfirmed Closed Periods on the Timeline.
* @param requestParameters
* @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.
*/
confirmClosedPeriod(requestParameters?: ConfirmClosedPeriodRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<ClosedPeriod>;
confirmClosedPeriod(requestParameters?: ConfirmClosedPeriodRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<ClosedPeriod>>;
confirmClosedPeriod(requestParameters?: ConfirmClosedPeriodRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<ClosedPeriod>>;
/**
* [EXPERIMENTAL] CreateClosedPeriod: Create a new closed period against a timeline entity
* Creates a new closed period against a timeline entity Returns the newly created closed period entity with properties
* @param requestParameters
* @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.
*/
createClosedPeriod(requestParameters?: CreateClosedPeriodRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<ClosedPeriod>;
createClosedPeriod(requestParameters?: CreateClosedPeriodRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<ClosedPeriod>>;
createClosedPeriod(requestParameters?: CreateClosedPeriodRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<ClosedPeriod>>;
/**
* [EXPERIMENTAL] CreateClosedPeriodCandidate: Create a new closed period candidate against a timeline entity
* Creates a new closed period candidate against a timeline entity Returns the newly created closed period candidate entity with properties
* @param requestParameters
* @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.
*/
createClosedPeriodCandidate(requestParameters?: CreateClosedPeriodCandidateRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<ClosedPeriod>;
createClosedPeriodCandidate(requestParameters?: CreateClosedPeriodCandidateRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<ClosedPeriod>>;
createClosedPeriodCandidate(requestParameters?: CreateClosedPeriodCandidateRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<ClosedPeriod>>;
/**
* [EXPERIMENTAL] CreateTimeline: Create a Timeline
* Creates a Timeline. Returns the created Timeline at the current effectiveAt. Note that Timelines are mono-temporal, however they can have Time-Variant Properties. Upserted Properties will be returned at the latest AsAt and EffectiveAt
* @param requestParameters
* @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.
*/
createTimeline(requestParameters?: CreateTimelineRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Timeline>;
createTimeline(requestParameters?: CreateTimelineRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Timeline>>;
createTimeline(requestParameters?: CreateTimelineRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Timeline>>;
/**
* [EXPERIMENTAL] DeleteTimeline: Deletes a particular Timeline
* The deletion will take effect from the Timeline deletion datetime. i.e. will no longer exist at any asAt datetime after the asAt datetime of deletion.
* @param requestParameters
* @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.
*/
deleteTimeline(requestParameters?: DeleteTimelineRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<DeletedEntityResponse>;
deleteTimeline(requestParameters?: DeleteTimelineRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<DeletedEntityResponse>>;
deleteTimeline(requestParameters?: DeleteTimelineRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<DeletedEntityResponse>>;
/**
* [EXPERIMENTAL] GetClosedPeriod: Gets a Closed Period entity.
* Retrieves one ClosedPeriod uniquely defined by the Timelines Scope/Code and a ClosedPeriodId.
* @param requestParameters
* @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.
*/
getClosedPeriod(requestParameters?: GetClosedPeriodRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<ClosedPeriod>;
getClosedPeriod(requestParameters?: GetClosedPeriodRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<ClosedPeriod>>;
getClosedPeriod(requestParameters?: GetClosedPeriodRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<ClosedPeriod>>;
/**
* [EXPERIMENTAL] GetTimeline: Get a single Timeline by scope and code.
* Retrieves one Timeline by scope and code. Timelines are mono-temporal. The EffectiveAt is only applied to Time-Variant Properties.
* @param requestParameters
* @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.
*/
getTimeline(requestParameters?: GetTimelineRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Timeline>;
getTimeline(requestParameters?: GetTimelineRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Timeline>>;
getTimeline(requestParameters?: GetTimelineRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Timeline>>;
/**
* [EXPERIMENTAL] ListClosedPeriods: List ClosedPeriods for a specified Timeline.
* List all the ClosedPeriods matching a particular criteria.
* @param requestParameters
* @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.
*/
listClosedPeriods(requestParameters?: ListClosedPeriodsRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<PagedResourceListOfClosedPeriod>;
listClosedPeriods(requestParameters?: ListClosedPeriodsRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<PagedResourceListOfClosedPeriod>>;
listClosedPeriods(requestParameters?: ListClosedPeriodsRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<PagedResourceListOfClosedPeriod>>;
/**
* [EXPERIMENTAL] ListTimelines: List Timelines
* List all the Timelines matching a particular criteria.
* @param requestParameters
* @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.
*/
listTimelines(requestParameters?: ListTimelinesRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<PagedResourceListOfTimeline>;
listTimelines(requestParameters?: ListTimelinesRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<PagedResourceListOfTimeline>>;
listTimelines(requestParameters?: ListTimelinesRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<PagedResourceListOfTimeline>>;
/**
* [EXPERIMENTAL] SetPostCloseActivity: Sets post-close activities to a Closed Period.
* This sets the given post-close activities to the given Closed Period. **This is an overwriting action!** The possible types of entity are: * `PortfolioTransaction`, * `Instrument`, * `InstrumentEvent`, * `InstrumentEventInstruction`, * `PortfolioSettlementInstruction`, and, * `Quote`.
* @param requestParameters
* @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.
*/
setPostCloseActivity(requestParameters?: SetPostCloseActivityRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<ClosedPeriod>;
setPostCloseActivity(requestParameters?: SetPostCloseActivityRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<ClosedPeriod>>;
setPostCloseActivity(requestParameters?: SetPostCloseActivityRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<ClosedPeriod>>;
/**
* [EXPERIMENTAL] UnconfirmClosedPeriod: Unconfirm the last confirmed Closed Period against a Timeline Entity
* Unconfirm the last confirmed Closed Period against a Timeline Entity
* @param requestParameters
* @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.
*/
unconfirmClosedPeriod(requestParameters?: UnconfirmClosedPeriodRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<ClosedPeriod>;
unconfirmClosedPeriod(requestParameters?: UnconfirmClosedPeriodRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<ClosedPeriod>>;
unconfirmClosedPeriod(requestParameters?: UnconfirmClosedPeriodRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<ClosedPeriod>>;
/**
* [EXPERIMENTAL] UpdateTimeline: Update Timeline defined by scope and code
* Overwrites an existing Timeline Update request has the same required fields as Create apart from the id. Returns the updated Timeline at the current effectiveAt. Note that Timelines are mono-temporal, however they can have Time-Variant Properties. Updated Properties will be returned at the latest AsAt and EffectiveAt
* @param requestParameters
* @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.
*/
updateTimeline(requestParameters?: UpdateTimelineRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Timeline>;
updateTimeline(requestParameters?: UpdateTimelineRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Timeline>>;
updateTimeline(requestParameters?: UpdateTimelineRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Timeline>>;
static ɵfac: i0.ɵɵFactoryDeclaration<TimelinesService, [null, { optional: true; }, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<TimelinesService>;
}