@finbourne/lusid-sdk-angular8
Version:
An angular (8+) SDK for secure access to the LUSID® by FINBOURNE web API
178 lines (177 loc) • 17.1 kB
TypeScript
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent } from '@angular/common/http';
import { Observable } from 'rxjs';
import { AddBusinessDaysToDateRequest } from '../model/addBusinessDaysToDateRequest';
import { AddBusinessDaysToDateResponse } from '../model/addBusinessDaysToDateResponse';
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;
constructor(httpClient: HttpClient, basePath: string, configuration: Configuration);
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm;
/**
* [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): Observable<AddBusinessDaysToDateResponse>;
addBusinessDaysToDate(scope: string, addBusinessDaysToDateRequest: AddBusinessDaysToDateRequest, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<AddBusinessDaysToDateResponse>>;
addBusinessDaysToDate(scope: string, addBusinessDaysToDateRequest: AddBusinessDaysToDateRequest, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<AddBusinessDaysToDateResponse>>;
/**
* [EARLY ACCESS] 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): Observable<CalendarDate>;
addDateToCalendar(scope: string, code: string, createDateRequest: CreateDateRequest, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<CalendarDate>>;
addDateToCalendar(scope: string, code: string, createDateRequest: CreateDateRequest, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<CalendarDate>>;
/**
* [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): Observable<Calendar>;
createCalendar(createCalendarRequest: CreateCalendarRequest, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Calendar>>;
createCalendar(createCalendarRequest: CreateCalendarRequest, observe?: 'events', reportProgress?: boolean): 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): Observable<Calendar>;
deleteCalendar(scope: string, code: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Calendar>>;
deleteCalendar(scope: string, code: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Calendar>>;
/**
* [EARLY ACCESS] 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): Observable<CalendarDate>;
deleteDateFromCalendar(scope: string, code: string, dateId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<CalendarDate>>;
deleteDateFromCalendar(scope: string, code: string, dateId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<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?: Date, observe?: 'body', reportProgress?: boolean): Observable<Array<Date>>;
generateSchedule(scope: string, valuationSchedule: ValuationSchedule, asAt?: Date, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Date>>>;
generateSchedule(scope: string, valuationSchedule: ValuationSchedule, asAt?: Date, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Date>>>;
/**
* [EARLY ACCESS] 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 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, asAt?: Date, observe?: 'body', reportProgress?: boolean): Observable<Calendar>;
getCalendar(scope: string, code: string, asAt?: Date, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Calendar>>;
getCalendar(scope: string, code: string, asAt?: Date, observe?: 'events', reportProgress?: boolean): 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?: Date, idFilter?: Array<string>, observe?: 'body', reportProgress?: boolean): Observable<ResourceListOfCalendarDate>;
getDates(scope: string, code: string, fromEffectiveAt?: string, toEffectiveAt?: string, asAt?: Date, idFilter?: Array<string>, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<ResourceListOfCalendarDate>>;
getDates(scope: string, code: string, fromEffectiveAt?: string, toEffectiveAt?: string, asAt?: Date, idFilter?: Array<string>, observe?: 'events', reportProgress?: boolean): 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: Date, scope: string, code: string, asAt?: Date, observe?: 'body', reportProgress?: boolean): Observable<IsBusinessDayResponse>;
isBusinessDateTime(dateTime: Date, scope: string, code: string, asAt?: Date, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<IsBusinessDayResponse>>;
isBusinessDateTime(dateTime: Date, scope: string, code: string, asAt?: Date, observe?: 'events', reportProgress?: boolean): 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. Also, if set, a start value cannot be provided.
* @param limit When paginating, limit the number of returned results to this many.
* @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?: Date, page?: string, limit?: number, filter?: string, observe?: 'body', reportProgress?: boolean): Observable<PagedResourceListOfCalendar>;
listCalendars(asAt?: Date, page?: string, limit?: number, filter?: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<PagedResourceListOfCalendar>>;
listCalendars(asAt?: Date, page?: string, limit?: number, filter?: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<PagedResourceListOfCalendar>>;
/**
* [EARLY ACCESS] ListCalendarsInScope: List all calenders in a specified scope
* List calendars 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. Also, if set, a start value cannot be provided.
* @param start When paginating, skip this number of results.
* @param limit When paginating, limit the number of returned results to this many.
* @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?: Date, page?: string, start?: number, limit?: number, filter?: string, observe?: 'body', reportProgress?: boolean): Observable<PagedResourceListOfCalendar>;
listCalendarsInScope(scope: string, asAt?: Date, page?: string, start?: number, limit?: number, filter?: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<PagedResourceListOfCalendar>>;
listCalendarsInScope(scope: string, asAt?: Date, page?: string, start?: number, limit?: number, filter?: string, observe?: 'events', reportProgress?: boolean): 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): Observable<Calendar>;
updateCalendar(scope: string, code: string, updateCalendarRequest: UpdateCalendarRequest, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Calendar>>;
updateCalendar(scope: string, code: string, updateCalendarRequest: UpdateCalendarRequest, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Calendar>>;
static ɵfac: i0.ɵɵFactoryDef<CalendarsService, [null, { optional: true; }, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDef<CalendarsService>;
}