@finbourne/lusid-sdk-angular16
Version:
An angular (16) SDK for secure access to the LUSID® by FINBOURNE web API
342 lines (341 loc) • 25.8 kB
TypeScript
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
import { Observable } from 'rxjs';
import { AddBusinessDaysToDateRequest } from '../model/addBusinessDaysToDateRequest';
import { AddBusinessDaysToDateResponse } from '../model/addBusinessDaysToDateResponse';
import { BatchUpsertDatesForCalendarResponse } from '../model/batchUpsertDatesForCalendarResponse';
import { Calendar } from '../model/calendar';
import { CalendarDate } from '../model/calendarDate';
import { CreateCalendarRequest } from '../model/createCalendarRequest';
import { CreateDateRequest } from '../model/createDateRequest';
import { IsBusinessDayResponse } from '../model/isBusinessDayResponse';
import { PagedResourceListOfCalendar } from '../model/pagedResourceListOfCalendar';
import { ResourceListOfCalendarDate } from '../model/resourceListOfCalendarDate';
import { UpdateCalendarRequest } from '../model/updateCalendarRequest';
import { ValuationSchedule } from '../model/valuationSchedule';
import { Configuration } from '../configuration';
import * as i0 from "@angular/core";
export declare class CalendarsService {
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] AddBusinessDaysToDate: Adds the requested number of Business Days to the provided date.
* A Business day is defined as a point in time that: * Does not represent a day in the calendar\'s weekend * Does not represent a day in the calendar\'s list of holidays (e.g. Christmas Day in the UK) All dates specified must be UTC and the upper bound of a calendar is not inclusive e.g. From: 2020-12-24-00-00-00: Adding 3 business days returns 2020-12-30, assuming Saturday and Sunday are weekends, and the 25th and 28th are holidays. Adding -2 business days returns 2020-12-22 under the same assumptions. If the provided number of days to add is zero, returns a failure.
* @param scope Scope within which to search for the calendars
* @param addBusinessDaysToDateRequest Request Details: start date, number of days to add (which can be negative, but not zero), calendar codes and optionally an AsAt date for searching the calendar store
* @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.
*/
addBusinessDaysToDate(scope: string, addBusinessDaysToDateRequest: AddBusinessDaysToDateRequest, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<AddBusinessDaysToDateResponse>;
addBusinessDaysToDate(scope: string, addBusinessDaysToDateRequest: AddBusinessDaysToDateRequest, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpResponse<AddBusinessDaysToDateResponse>>;
addBusinessDaysToDate(scope: string, addBusinessDaysToDateRequest: AddBusinessDaysToDateRequest, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpEvent<AddBusinessDaysToDateResponse>>;
/**
* AddDateToCalendar: Add a date to a calendar
* Add an event to the calendar. These Events can be a maximum of 24 hours and must be specified in UTC. A local date will be calculated by the system and applied to the calendar before processing.
* @param scope Scope of the calendar
* @param code Code of the calendar
* @param createDateRequest Add date to calendar request
* @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.
*/
addDateToCalendar(scope: string, code: string, createDateRequest: CreateDateRequest, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<CalendarDate>;
addDateToCalendar(scope: string, code: string, createDateRequest: CreateDateRequest, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpResponse<CalendarDate>>;
addDateToCalendar(scope: string, code: string, createDateRequest: CreateDateRequest, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpEvent<CalendarDate>>;
/**
* BatchUpsertDatesForCalendar: Batch upsert dates to a calendar
* Create or update events in the calendar. These Events can be a maximum of 24 hours and must be specified in UTC. A local date will be calculated by the system and applied to the calendar before processing.
* @param scope Scope of the calendar
* @param code Code of the calendar
* @param successMode Whether the batch request should fail Atomically or in a Partial fashion - Allowed Values: Atomic, Partial.
* @param requestBody Create Date Requests of dates to upsert
* @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.
*/
batchUpsertDatesForCalendar(scope: string, code: string, successMode: string, requestBody: {
[key: string]: CreateDateRequest;
}, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<BatchUpsertDatesForCalendarResponse>;
batchUpsertDatesForCalendar(scope: string, code: string, successMode: string, requestBody: {
[key: string]: CreateDateRequest;
}, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpResponse<BatchUpsertDatesForCalendarResponse>>;
batchUpsertDatesForCalendar(scope: string, code: string, successMode: string, requestBody: {
[key: string]: CreateDateRequest;
}, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpEvent<BatchUpsertDatesForCalendarResponse>>;
/**
* [EARLY ACCESS] CreateCalendar: Create a calendar in its generic form
* Create a calendar in a generic form which can be used to store date events.
* @param createCalendarRequest A request to create the calendar
* @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.
*/
createCalendar(createCalendarRequest: CreateCalendarRequest, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<Calendar>;
createCalendar(createCalendarRequest: CreateCalendarRequest, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpResponse<Calendar>>;
createCalendar(createCalendarRequest: CreateCalendarRequest, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpEvent<Calendar>>;
/**
* [EARLY ACCESS] DeleteCalendar: Delete a calendar
* Delete a calendar and all of its respective dates
* @param scope Scope of the calendar
* @param code Code of the calendar
* @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.
*/
deleteCalendar(scope: string, code: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<Calendar>;
deleteCalendar(scope: string, code: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpResponse<Calendar>>;
deleteCalendar(scope: string, code: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpEvent<Calendar>>;
/**
* DeleteDateFromCalendar: Remove a date from a calendar
* Remove a date from a calendar.
* @param scope Scope of the calendar
* @param code Code of the calendar
* @param dateId Identifier of the date to be removed
* @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.
*/
deleteDateFromCalendar(scope: string, code: string, dateId: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<CalendarDate>;
deleteDateFromCalendar(scope: string, code: string, dateId: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpResponse<CalendarDate>>;
deleteDateFromCalendar(scope: string, code: string, dateId: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpEvent<CalendarDate>>;
/**
* DeleteDatesFromCalendar: Delete dates from a calendar
* Delete dates from a calendar.
* @param scope Scope of the calendar
* @param code Code of the calendar
* @param requestBody Identifiers of the dates to be removed
* @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.
*/
deleteDatesFromCalendar(scope: string, code: string, requestBody: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<{
[key: string]: CalendarDate;
}>;
deleteDatesFromCalendar(scope: string, code: string, requestBody: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpResponse<{
[key: string]: CalendarDate;
}>>;
deleteDatesFromCalendar(scope: string, code: string, requestBody: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpEvent<{
[key: string]: CalendarDate;
}>>;
/**
* [EARLY ACCESS] GenerateSchedule: Generate an ordered schedule of dates.
* Returns an ordered array of dates. The dates will only fall on business days as defined by the scope and calendar codes in the valuation schedule. Valuations are made at a frequency defined by the valuation schedule\'s tenor, e.g. every day (\"1D\"), every other week (\"2W\") etc. These dates will be adjusted onto business days as defined by the schedule\'s rollConvention.
* @param scope Scope of the calendars to use
* @param valuationSchedule The ValuationSchedule to generate schedule dates from
* @param asAt Optional AsAt for searching the calendar store. Defaults to Latest.
* @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.
*/
generateSchedule(scope: string, valuationSchedule: ValuationSchedule, asAt?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<Array<string>>;
generateSchedule(scope: string, valuationSchedule: ValuationSchedule, asAt?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpResponse<Array<string>>>;
generateSchedule(scope: string, valuationSchedule: ValuationSchedule, asAt?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpEvent<Array<string>>>;
/**
* GetCalendar: Get a calendar in its generic form
* Retrieve a generic calendar by a specific ID at a point in AsAt time
* @param scope Scope of the calendar identifier
* @param code Code of the calendar identifier
* @param propertyKeys A list of property keys from the \"Calendar\" domain to decorate onto the calendar, These take the format {domain}/{scope}/{code} e.g. \"Calendar/System/Name\".
* @param asAt The AsAt datetime at which to retrieve the calendar
* @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.
*/
getCalendar(scope: string, code: string, propertyKeys?: Array<string>, asAt?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<Calendar>;
getCalendar(scope: string, code: string, propertyKeys?: Array<string>, asAt?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpResponse<Calendar>>;
getCalendar(scope: string, code: string, propertyKeys?: Array<string>, asAt?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpEvent<Calendar>>;
/**
* [EARLY ACCESS] GetDates: Get dates for a specific calendar
* Get dates from a specific calendar within a specific window of effective time, at a point in AsAt time. Providing an id filter can further refine the results.
* @param scope Scope of the calendar
* @param code Code of the calendar
* @param fromEffectiveAt Where the effective window of dates should begin from
* @param toEffectiveAt Where the effective window of dates should end
* @param asAt AsAt the dates should be retrieved at
* @param idFilter An additional filter that will filter dates based on their identifer
* @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.
*/
getDates(scope: string, code: string, fromEffectiveAt?: string, toEffectiveAt?: string, asAt?: string, idFilter?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<ResourceListOfCalendarDate>;
getDates(scope: string, code: string, fromEffectiveAt?: string, toEffectiveAt?: string, asAt?: string, idFilter?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpResponse<ResourceListOfCalendarDate>>;
getDates(scope: string, code: string, fromEffectiveAt?: string, toEffectiveAt?: string, asAt?: string, idFilter?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpEvent<ResourceListOfCalendarDate>>;
/**
* [EARLY ACCESS] IsBusinessDateTime: Check whether a DateTime is a \"Business DateTime\"
* A Business DateTime is defined as a point in time that: * Does not represent a day that overlaps with the calendars WeekendMask * If the calendar is a \"Holiday Calendar\" Does not overlap with any dates in the calendar * If the calendar is a \"TradingHours Calendar\" Does overlap with a date in the calendar All dates specified must be UTC and the upper bound of a calendar is not inclusive e.g. From: 2020-12-25-00-00-00 To: 2020-12-26-00-00-00 IsBusinessDay(2020-12-26-00-00-00) == false
* @param dateTime DateTime to check - This DateTime must be UTC
* @param scope Scope of the calendar
* @param code Code of the calendar
* @param asAt AsAt for the request
* @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.
*/
isBusinessDateTime(dateTime: string, scope: string, code: string, asAt?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<IsBusinessDayResponse>;
isBusinessDateTime(dateTime: string, scope: string, code: string, asAt?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpResponse<IsBusinessDayResponse>>;
isBusinessDateTime(dateTime: string, scope: string, code: string, asAt?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpEvent<IsBusinessDayResponse>>;
/**
* [EARLY ACCESS] ListCalendars: List Calendars
* List calendars at a point in AsAt time.
* @param asAt The AsAt datetime at which to retrieve the calendars
* @param page The pagination token to use to continue listing calendars from a previous call to list calendars. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, and asAt fields must not have changed since the original request.
* @param limit When paginating, limit the number of returned results to this many.
* @param propertyKeys A list of property keys from the \"Calendar\" domain to decorate onto the calendar, These take the format {domain}/{scope}/{code} e.g. \"Calendar/System/Name\".
* @param filter Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.
* @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.
*/
listCalendars(asAt?: string, page?: string, limit?: number, propertyKeys?: Array<string>, filter?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<PagedResourceListOfCalendar>;
listCalendars(asAt?: string, page?: string, limit?: number, propertyKeys?: Array<string>, filter?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpResponse<PagedResourceListOfCalendar>>;
listCalendars(asAt?: string, page?: string, limit?: number, propertyKeys?: Array<string>, filter?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpEvent<PagedResourceListOfCalendar>>;
/**
* ListCalendarsInScope: List all calenders in a specified scope
* List calendars in a Scope at a point in AsAt time.
* @param scope Scope of the calendars
* @param asAt The AsAt datetime at which to retrieve the calendars
* @param page The pagination token to use to continue listing calendars from a previous call to list calendars. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, and asAt fields must not have changed since the original request.
* @param limit When paginating, limit the number of returned results to this many.
* @param propertyKeys A list of property keys from the \"Calendar\" domain to decorate onto the calendar, These take the format {domain}/{scope}/{code} e.g. \"Calendar/System/Name\".
* @param filter Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.
* @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.
*/
listCalendarsInScope(scope: string, asAt?: string, page?: string, limit?: number, propertyKeys?: Array<string>, filter?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<PagedResourceListOfCalendar>;
listCalendarsInScope(scope: string, asAt?: string, page?: string, limit?: number, propertyKeys?: Array<string>, filter?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpResponse<PagedResourceListOfCalendar>>;
listCalendarsInScope(scope: string, asAt?: string, page?: string, limit?: number, propertyKeys?: Array<string>, filter?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpEvent<PagedResourceListOfCalendar>>;
/**
* [EARLY ACCESS] UpdateCalendar: Update a calendar
* Update the calendars WeekendMask, SourceProvider or Properties
* @param scope Scope of the request
* @param code Code of the request
* @param updateCalendarRequest The new state of the calendar
* @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.
*/
updateCalendar(scope: string, code: string, updateCalendarRequest: UpdateCalendarRequest, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<Calendar>;
updateCalendar(scope: string, code: string, updateCalendarRequest: UpdateCalendarRequest, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpResponse<Calendar>>;
updateCalendar(scope: string, code: string, updateCalendarRequest: UpdateCalendarRequest, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
}): Observable<HttpEvent<Calendar>>;
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarsService, [null, { optional: true; }, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<CalendarsService>;
}