@finbourne/lusid-sdk-angular18
Version:
An Angular (18) SDK for secure access to the LUSID® by FINBOURNE web API
311 lines (310 loc) • 20.1 kB
TypeScript
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
import { Observable } from 'rxjs';
import { CorporateActionSource } from '../model/corporateActionSource';
import { CreateCorporateActionSourceRequest } from '../model/createCorporateActionSourceRequest';
import { DeletedEntityResponse } from '../model/deletedEntityResponse';
import { PagedResourceListOfCorporateActionSource } from '../model/pagedResourceListOfCorporateActionSource';
import { PagedResourceListOfInstrumentEventHolder } from '../model/pagedResourceListOfInstrumentEventHolder';
import { ResourceListOfCorporateAction } from '../model/resourceListOfCorporateAction';
import { UpsertCorporateActionRequest } from '../model/upsertCorporateActionRequest';
import { UpsertCorporateActionsResponse } from '../model/upsertCorporateActionsResponse';
import { UpsertInstrumentEventRequest } from '../model/upsertInstrumentEventRequest';
import { UpsertInstrumentEventsResponse } from '../model/upsertInstrumentEventsResponse';
import { Configuration } from '../configuration';
import * as i0 from "@angular/core";
export interface BatchUpsertCorporateActionsRequestParams {
/** The scope of corporate action source */
scope: string;
/** The code of the corporate action source */
code: string;
/** The corporate action definitions */
upsertCorporateActionRequest?: Array<UpsertCorporateActionRequest>;
}
export interface CreateCorporateActionSourceRequestParams {
/** The corporate action source definition */
createCorporateActionSourceRequest: CreateCorporateActionSourceRequest;
}
export interface DeleteCorporateActionSourceRequestParams {
/** The scope of the corporate action source to be deleted */
scope: string;
/** The code of the corporate action source to be deleted */
code: string;
}
export interface DeleteCorporateActionsRequestParams {
/** The scope of the corporate action source */
scope: string;
/** The code of the corporate action source */
code: string;
/** The IDs of the corporate actions to delete */
corporateActionIds: Array<string>;
}
export interface DeleteInstrumentEventsRequestParams {
/** The scope of the corporate action source */
scope: string;
/** The code of the corporate action source */
code: string;
/** The IDs of the instrument events to delete */
instrumentEventIds: Array<string>;
}
export interface GetCorporateActionsRequestParams {
/** The scope of the corporate action source. */
scope: string;
/** The code of the corporate action source. */
code: string;
/** Optional. The start effective date of the data range. */
fromEffectiveAt?: string;
/** Optional. The end effective date of the data range. */
toEffectiveAt?: string;
/** Optional. The AsAt date of the data. */
asAt?: string;
/** Optional. Order the results by these fields. Use use the \'-\' sign to denote descending order e.g. -MyFieldName */
sortBy?: Array<string>;
/** Optional. When paginating, limit the results to this number. */
limit?: number;
/** Optional. Expression to filter the result set. For example, to filter on the Announcement Date, use \"announcementDate eq \'2020-03-06\'\" Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid. */
filter?: string;
}
export interface GetInstrumentEventsRequestParams {
/** The scope of the corporate action source. */
scope: string;
/** The code of the corporate action source. */
code: string;
/** Optional. The AsAt date of the data. */
asAt?: string;
/** Optional. When paginating, limit the number of returned results to this many. If not specified, a default of 1000 is used. */
limit?: number;
/** Optional. The pagination token to use to continue listing items from a previous call. Page values are return from list calls, and must be supplied exactly as returned. Additionally, when specifying this value, asAt, filter and limit must not be modified. */
page?: string;
/** Optional. Expression to filter the result set. */
filter?: string;
}
export interface ListCorporateActionSourcesRequestParams {
/** Optional. The AsAt date of the data */
asAt?: string;
/** Optional. Order the results by these fields. Use use the \'-\' sign to denote descending order e.g. -MyFieldName */
sortBy?: Array<string>;
/** Optional. When paginating, limit the number of returned results to this many. If not specified, a default of 100 is used. */
limit?: number;
/** Optional. Expression to filter the result set. For example, to filter on the Display Name, use \"displayName eq \'string\'\" Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid. */
filter?: string;
/** Optional. The pagination token to use to continue listing items from a previous call. Page values are return from list calls, and must be supplied exactly as returned. Additionally, when specifying this value, the filter, asAt, and limit must not be modified. */
page?: string;
}
export interface UpsertInstrumentEventsRequestParams {
/** The scope of the corporate action source. */
scope: string;
/** The code of the corporate action source. */
code: string;
/** The instrument event definitions. */
upsertInstrumentEventRequest?: Array<UpsertInstrumentEventRequest>;
}
export declare class CorporateActionSourcesService {
protected httpClient: HttpClient;
protected basePath: string;
defaultHeaders: HttpHeaders;
configuration: Configuration;
encoder: HttpParameterCodec;
constructor(httpClient: HttpClient, basePath: string | string[], configuration: Configuration);
private addToHttpParams;
private addToHttpParamsRecursive;
/**
* [EARLY ACCESS] BatchUpsertCorporateActions: Batch upsert corporate actions (instrument transition events) to corporate action source.
* Create or update one or more corporate actions in a particular corporate action source. Failures are identified in the body of the response. If a corporate action is upserted at exactly the same effective datetime as a transaction for the same instrument, the corporate action takes precedence. Depending on the nature of the corporate action, this may mean it affects the transaction. The maximum number of corporate actions that this method can upsert per request is 10,000.
* @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.
*/
batchUpsertCorporateActions(requestParameters?: BatchUpsertCorporateActionsRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<UpsertCorporateActionsResponse>;
batchUpsertCorporateActions(requestParameters?: BatchUpsertCorporateActionsRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<UpsertCorporateActionsResponse>>;
batchUpsertCorporateActions(requestParameters?: BatchUpsertCorporateActionsRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<UpsertCorporateActionsResponse>>;
/**
* [EARLY ACCESS] CreateCorporateActionSource: Create corporate action source
* Create a corporate action source.
* @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.
*/
createCorporateActionSource(requestParameters?: CreateCorporateActionSourceRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<CorporateActionSource>;
createCorporateActionSource(requestParameters?: CreateCorporateActionSourceRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<CorporateActionSource>>;
createCorporateActionSource(requestParameters?: CreateCorporateActionSourceRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<CorporateActionSource>>;
/**
* [BETA] DeleteCorporateActionSource: Delete a corporate action source
* Deletes a single corporate action source
* @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.
*/
deleteCorporateActionSource(requestParameters?: DeleteCorporateActionSourceRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<DeletedEntityResponse>;
deleteCorporateActionSource(requestParameters?: DeleteCorporateActionSourceRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<DeletedEntityResponse>>;
deleteCorporateActionSource(requestParameters?: DeleteCorporateActionSourceRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<DeletedEntityResponse>>;
/**
* [EARLY ACCESS] DeleteCorporateActions: Delete corporate actions (instrument transition events) from a corporate action source
* Delete one or more corporate actions from a particular corporate action source. The maximum number of corporate actions that this method can delete per request is 1,000.
* @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.
*/
deleteCorporateActions(requestParameters?: DeleteCorporateActionsRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<DeletedEntityResponse>;
deleteCorporateActions(requestParameters?: DeleteCorporateActionsRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<DeletedEntityResponse>>;
deleteCorporateActions(requestParameters?: DeleteCorporateActionsRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<DeletedEntityResponse>>;
/**
* [EARLY ACCESS] DeleteInstrumentEvents: Delete instrument events from a corporate action source
* Delete one or more corporate actions from a particular corporate action source. The maximum number of instrument events that this method can delete per request is 1,000.
* @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.
*/
deleteInstrumentEvents(requestParameters?: DeleteInstrumentEventsRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<DeletedEntityResponse>;
deleteInstrumentEvents(requestParameters?: DeleteInstrumentEventsRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<DeletedEntityResponse>>;
deleteInstrumentEvents(requestParameters?: DeleteInstrumentEventsRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<DeletedEntityResponse>>;
/**
* [EARLY ACCESS] GetCorporateActions: List corporate actions (instrument transition events) from the corporate action source.
* Get corporate actions from a particular corporate action source.
* @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.
*/
getCorporateActions(requestParameters?: GetCorporateActionsRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<ResourceListOfCorporateAction>;
getCorporateActions(requestParameters?: GetCorporateActionsRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<ResourceListOfCorporateAction>>;
getCorporateActions(requestParameters?: GetCorporateActionsRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<ResourceListOfCorporateAction>>;
/**
* [EARLY ACCESS] GetInstrumentEvents: Get extrinsic instrument events out of a given corporate actions source.
* Retrieves extrinsic corporate actions out of a corporate actions source
* @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.
*/
getInstrumentEvents(requestParameters?: GetInstrumentEventsRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<PagedResourceListOfInstrumentEventHolder>;
getInstrumentEvents(requestParameters?: GetInstrumentEventsRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<PagedResourceListOfInstrumentEventHolder>>;
getInstrumentEvents(requestParameters?: GetInstrumentEventsRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<PagedResourceListOfInstrumentEventHolder>>;
/**
* [EARLY ACCESS] ListCorporateActionSources: List corporate action sources
* Gets a list of all corporate action sources
* @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.
*/
listCorporateActionSources(requestParameters?: ListCorporateActionSourcesRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<PagedResourceListOfCorporateActionSource>;
listCorporateActionSources(requestParameters?: ListCorporateActionSourcesRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<PagedResourceListOfCorporateActionSource>>;
listCorporateActionSources(requestParameters?: ListCorporateActionSourcesRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<PagedResourceListOfCorporateActionSource>>;
/**
* [EARLY ACCESS] UpsertInstrumentEvents: Upsert instrument events to the provided corporate actions source.
* Batch upsert instrument events to corporate action sources. The maximum number of instrument events that this method can upsert per request is 10,000.
* @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.
*/
upsertInstrumentEvents(requestParameters?: UpsertInstrumentEventsRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<UpsertInstrumentEventsResponse>;
upsertInstrumentEvents(requestParameters?: UpsertInstrumentEventsRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<UpsertInstrumentEventsResponse>>;
upsertInstrumentEvents(requestParameters?: UpsertInstrumentEventsRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<UpsertInstrumentEventsResponse>>;
static ɵfac: i0.ɵɵFactoryDeclaration<CorporateActionSourcesService, [null, { optional: true; }, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<CorporateActionSourcesService>;
}