@finbourne/lusid-sdk-angular18
Version:
An Angular (18) SDK for secure access to the LUSID® by FINBOURNE web API
278 lines (277 loc) • 19.2 kB
TypeScript
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
import { Observable } from 'rxjs';
import { ComplianceRule } from '../model/complianceRule';
import { ComplianceRuleUpsertRequest } from '../model/complianceRuleUpsertRequest';
import { ComplianceRuleUpsertResponse } from '../model/complianceRuleUpsertResponse';
import { ComplianceRunInfo } from '../model/complianceRunInfo';
import { DeletedEntityResponse } from '../model/deletedEntityResponse';
import { ResourceListOfComplianceBreachedOrderInfo } from '../model/resourceListOfComplianceBreachedOrderInfo';
import { ResourceListOfComplianceRule } from '../model/resourceListOfComplianceRule';
import { ResourceListOfComplianceRuleResult } from '../model/resourceListOfComplianceRuleResult';
import { ResourceListOfComplianceRunInfo } from '../model/resourceListOfComplianceRunInfo';
import { Configuration } from '../configuration';
import * as i0 from "@angular/core";
export interface DeleteLegacyComplianceRuleRequestParams {
/** The compliance rule scope. */
scope: string;
/** The compliance rule code. */
code: string;
}
export interface GetLegacyBreachedOrdersInfoRequestParams {
/** The RunId that the results should be checked for */
runId: string;
/** Optional. Find rules related to a specific order by providing an Order Scope/Code combination */
orderScope?: string;
/** Optional. Find rules related to a specific order by providing an Order Scope/Code combination */
orderCode?: string;
/** When paginating, limit the number of returned results to this many. */
limit?: number;
}
export interface GetLegacyComplianceRuleRequestParams {
/** The compliance rule scope. */
scope: string;
/** The compliance rule code. */
code: string;
/** The effective datetime or cut label at which to retrieve the rule definition. Defaults to the current LUSID system datetime if not specified. */
effectiveAt?: string;
/** The asAt datetime at which to retrieve the rule definition. Defaults to returning the latest version if not specified. */
asAt?: string;
}
export interface GetLegacyComplianceRunResultsRequestParams {
/** The unique identifier of the compliance run requested. */
runId: string;
/** The pagination token to use to continue listing compliance rule results from a previous call to list compliance rule result. 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. */
page?: string;
/** When paginating, limit the number of returned results to this many. */
limit?: number;
/** Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid. */
filter?: string;
}
export interface ListLegacyComplianceRulesRequestParams {
/** The effective datetime or cut label at which to retrieve the rule definitions. Defaults to the current LUSID system datetime if not specified. */
effectiveAt?: string;
/** The asAt datetime at which to retrieve the rule definitions. Defaults to returning the latest version if not specified. */
asAt?: string;
/** The pagination token to use to continue listing entities; 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. */
filter?: string;
}
export interface ListLegacyComplianceRunInfoRequestParams {
/** Optional. The time at which to get results from. Default : latest */
asAt?: string;
/** The pagination token to use to continue listing compliance runs from a previous call to list compliance runs. 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. */
page?: string;
/** When paginating, limit the number of returned results to this many. */
limit?: number;
/** Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid. */
filter?: string;
}
export interface RunLegacyComplianceRequestParams {
/** Required: Boolean flag indicating if a run should be PreTrade (Including orders). For post-trade only, set to false */
isPreTrade: boolean;
/** Required: the scope of the recipe to be used */
recipeIdScope: string;
/** Optional: The code of the recipe to be used. If left blank, the default recipe will be used. */
recipeIdCode?: string;
/** Optional. */
byTaxlots?: boolean;
}
export interface UpsertLegacyComplianceRulesRequestParams {
/** A dictionary of upsert request identifiers to rule upsert requests. The request identifiers are valid for the request only and can be used to link the upserted compliance rule to the code of a created compliance rule. */
requestBody: {
[key: string]: ComplianceRuleUpsertRequest;
};
/** The effective datetime or cut label at which the rule will take effect. Defaults to the current LUSID system datetime if not specified. In the case of an update, the changes will take place from this effective time until the next effective time that the rule as been upserted at. For example, consider a rule that already exists, and has previously had an update applied so that the definition will change on the first day of the coming month. An upsert effective from the current day will only change the definition until the first day of the coming month. An additional upsert at the same time (first day of the month) is required if the newly-updated definition is to supersede the future definition. */
effectiveAt?: string;
}
export declare class LegacyComplianceService {
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] DeleteLegacyComplianceRule: Deletes a compliance rule.
* Deletes the rule for all effective time. The rule will remain viewable at previous as at times, and as part of the results of compliance runs, but it will no longer be considered in new compliance runs. This cannot be undone.
* @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.
*/
deleteLegacyComplianceRule(requestParameters?: DeleteLegacyComplianceRuleRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<DeletedEntityResponse>;
deleteLegacyComplianceRule(requestParameters?: DeleteLegacyComplianceRuleRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<DeletedEntityResponse>>;
deleteLegacyComplianceRule(requestParameters?: DeleteLegacyComplianceRuleRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<DeletedEntityResponse>>;
/**
* [EXPERIMENTAL] GetLegacyBreachedOrdersInfo: Get the Ids of Breached orders in a given compliance run and the corresponding list of rules that could have caused it.
* Use this endpoint to get a list or breached orders and the set of rules that may have caused the breach.
* @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.
*/
getLegacyBreachedOrdersInfo(requestParameters?: GetLegacyBreachedOrdersInfoRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<ResourceListOfComplianceBreachedOrderInfo>;
getLegacyBreachedOrdersInfo(requestParameters?: GetLegacyBreachedOrdersInfoRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<ResourceListOfComplianceBreachedOrderInfo>>;
getLegacyBreachedOrdersInfo(requestParameters?: GetLegacyBreachedOrdersInfoRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<ResourceListOfComplianceBreachedOrderInfo>>;
/**
* [EXPERIMENTAL] GetLegacyComplianceRule: Retrieve the definition of single compliance rule.
* Retrieves the compliance rule definition at the given effective and as at times.
* @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.
*/
getLegacyComplianceRule(requestParameters?: GetLegacyComplianceRuleRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<ComplianceRule>;
getLegacyComplianceRule(requestParameters?: GetLegacyComplianceRuleRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<ComplianceRule>>;
getLegacyComplianceRule(requestParameters?: GetLegacyComplianceRuleRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<ComplianceRule>>;
/**
* [EXPERIMENTAL] GetLegacyComplianceRunResults: Get the details of a single compliance run.
* Use this endpoint to fetch the detail associated with a specific compliance run, including a breakdown of the passing state of each rule, portfolio combination.
* @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.
*/
getLegacyComplianceRunResults(requestParameters?: GetLegacyComplianceRunResultsRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<ResourceListOfComplianceRuleResult>;
getLegacyComplianceRunResults(requestParameters?: GetLegacyComplianceRunResultsRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<ResourceListOfComplianceRuleResult>>;
getLegacyComplianceRunResults(requestParameters?: GetLegacyComplianceRunResultsRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<ResourceListOfComplianceRuleResult>>;
/**
* [EXPERIMENTAL] ListLegacyComplianceRules: List compliance rules, with optional filtering.
* For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914.
* @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.
*/
listLegacyComplianceRules(requestParameters?: ListLegacyComplianceRulesRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<ResourceListOfComplianceRule>;
listLegacyComplianceRules(requestParameters?: ListLegacyComplianceRulesRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<ResourceListOfComplianceRule>>;
listLegacyComplianceRules(requestParameters?: ListLegacyComplianceRulesRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<ResourceListOfComplianceRule>>;
/**
* [EXPERIMENTAL] ListLegacyComplianceRunInfo: List historical compliance run ids.
* Use this endpoint to fetch a list of all historical compliance runs.
* @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.
*/
listLegacyComplianceRunInfo(requestParameters?: ListLegacyComplianceRunInfoRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<ResourceListOfComplianceRunInfo>;
listLegacyComplianceRunInfo(requestParameters?: ListLegacyComplianceRunInfoRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<ResourceListOfComplianceRunInfo>>;
listLegacyComplianceRunInfo(requestParameters?: ListLegacyComplianceRunInfoRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<ResourceListOfComplianceRunInfo>>;
/**
* [EXPERIMENTAL] RunLegacyCompliance: Kick off the compliance check process
* Use this endpoint to fetch the start a compliance run, based on a pre-set mapping file.
* @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.
*/
runLegacyCompliance(requestParameters?: RunLegacyComplianceRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<ComplianceRunInfo>;
runLegacyCompliance(requestParameters?: RunLegacyComplianceRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<ComplianceRunInfo>>;
runLegacyCompliance(requestParameters?: RunLegacyComplianceRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<ComplianceRunInfo>>;
/**
* [EXPERIMENTAL] UpsertLegacyComplianceRules: Upsert compliance rules.
* To upsert a new rule, the code field must be left empty, a code will then be assigned and returned as part of the response. To update an existing rule, include the rule code. It is possible to both create and update compliance rules in the same request. The upsert is transactional - either all create/update operations will succeed or none of them will.
* @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.
*/
upsertLegacyComplianceRules(requestParameters?: UpsertLegacyComplianceRulesRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<ComplianceRuleUpsertResponse>;
upsertLegacyComplianceRules(requestParameters?: UpsertLegacyComplianceRulesRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<ComplianceRuleUpsertResponse>>;
upsertLegacyComplianceRules(requestParameters?: UpsertLegacyComplianceRulesRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<ComplianceRuleUpsertResponse>>;
static ɵfac: i0.ɵɵFactoryDeclaration<LegacyComplianceService, [null, { optional: true; }, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<LegacyComplianceService>;
}