UNPKG

@finbourne/lusid-sdk-angular18

Version:

An Angular (18) SDK for secure access to the LUSID® by FINBOURNE web API

264 lines (263 loc) 16.8 kB
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { Observable } from 'rxjs'; import { Dialect } from '../model/dialect'; import { PagedResourceListOfDialectId } from '../model/pagedResourceListOfDialectId'; import { PagedResourceListOfTranslationScriptId } from '../model/pagedResourceListOfTranslationScriptId'; import { TranslateEntitiesInlinedRequest } from '../model/translateEntitiesInlinedRequest'; import { TranslateEntitiesRequest } from '../model/translateEntitiesRequest'; import { TranslateEntitiesResponse } from '../model/translateEntitiesResponse'; import { TranslationScript } from '../model/translationScript'; import { UpsertDialectRequest } from '../model/upsertDialectRequest'; import { UpsertTranslationScriptRequest } from '../model/upsertTranslationScriptRequest'; import { Configuration } from '../configuration'; import * as i0 from "@angular/core"; export interface GetTranslationDialectRequestParams { /** The scope of the dialect. */ scope: string; /** The vendor of the dialect, the entity that created it. e.g. ISDA, FINBOURNE. */ vendor: string; /** The source system of the dialect, the system that understands it. e.g. LUSID, QuantLib. */ sourceSystem: string; /** The type of entity this dialect describes e.g. Instrument. Available values: Instrument. */ entityType: string; /** The serialisation format of a document in this dialect. Available values: Json, Xml. */ serialisationFormat: string; /** The semantic version of the dialect: MAJOR.MINOR.PATCH. */ version: string; /** The asAt datetime at which to retrieve the dialect. Defaults to return the latest version of the dialect if not specified. */ asAt?: string; } export interface GetTranslationScriptRequestParams { /** Scope of the translation script. */ scope: string; /** Code of the translation script. */ code: string; /** Semantic version of the translation script. */ version: string; /** The asAt datetime at which to retrieve the translation script. Defaults to latest. */ asAt?: string; } export interface ListDialectIdsRequestParams { /** The asAt datetime at which to retrieve the dialects. Defaults to return the latest version of the dialect if not specified. */ asAt?: string; /** The pagination token to use to continue listing dialect IDs from a previous call to list dialect IDs. This value is returned from the previous call. If a pagination token is provided the 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 ListTranslationScriptIdsRequestParams { /** The asAt datetime at which to retrieve the script identifiers. Defaults to latest. */ asAt?: string; /** When paginating, limit the results to this number. Defaults to 100 if not specified. */ limit?: number; /** Expression to filter the results. For example, Id.Version.Major eq 1 to list IDs with major version 1 or Id.Scope eq \&#39;my-scripts\&#39; to list result only for a particular scope. */ filter?: string; /** The pagination token to use to continue listing translation script IDs; this value is returned from the previous call. If a pagination token is provided, the filter field must not have changed since the original request. */ page?: string; } export interface TranslateEntitiesRequestParams { /** The entities to translate, along with identifiers for the script and (optional) dialect to use. */ translateEntitiesRequest: TranslateEntitiesRequest; } export interface TranslateEntitiesInlinedRequestParams { /** The entities to translate, along with the script to use and an optional schema for validation. */ translateEntitiesInlinedRequest: TranslateEntitiesInlinedRequest; } export interface UpsertTranslationDialectRequestParams { /** The dialect to upsert. */ upsertDialectRequest: UpsertDialectRequest; } export interface UpsertTranslationScriptRequestParams { /** The translation script to be upserted. */ upsertTranslationScriptRequest: UpsertTranslationScriptRequest; } export declare class ScriptedTranslationService { 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] GetTranslationDialect: Get a dialect. * Get the dialect with the given identifier at the specific asAt time. * @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. */ getTranslationDialect(requestParameters?: GetTranslationDialectRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<Dialect>; getTranslationDialect(requestParameters?: GetTranslationDialectRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<Dialect>>; getTranslationDialect(requestParameters?: GetTranslationDialectRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<Dialect>>; /** * [EARLY ACCESS] GetTranslationScript: Retrieve a translation script by its identifier. * Retrieves a translation script to be used for translating financial entities. * @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. */ getTranslationScript(requestParameters?: GetTranslationScriptRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<TranslationScript>; getTranslationScript(requestParameters?: GetTranslationScriptRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<TranslationScript>>; getTranslationScript(requestParameters?: GetTranslationScriptRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<TranslationScript>>; /** * [EARLY ACCESS] ListDialectIds: List dialect identifiers matching an optional filter. * List the stored dialects\&#39; identifiers with pagination and filtering at the specified asAt time. * @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. */ listDialectIds(requestParameters?: ListDialectIdsRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<PagedResourceListOfDialectId>; listDialectIds(requestParameters?: ListDialectIdsRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<PagedResourceListOfDialectId>>; listDialectIds(requestParameters?: ListDialectIdsRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<PagedResourceListOfDialectId>>; /** * [EARLY ACCESS] ListTranslationScriptIds: List translation script identifiers. * List translation script ids. * @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. */ listTranslationScriptIds(requestParameters?: ListTranslationScriptIdsRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<PagedResourceListOfTranslationScriptId>; listTranslationScriptIds(requestParameters?: ListTranslationScriptIdsRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<PagedResourceListOfTranslationScriptId>>; listTranslationScriptIds(requestParameters?: ListTranslationScriptIdsRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<PagedResourceListOfTranslationScriptId>>; /** * [EARLY ACCESS] TranslateEntities: Translate a collection of entities with a specified translation script. * Run the provided translation request. The entities to translate are specified in the request body as a dictionary with (ephemeral) unique correlation IDs. The script to use and optional dialect to validate results against are sourced from the database. * @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. */ translateEntities(requestParameters?: TranslateEntitiesRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<TranslateEntitiesResponse>; translateEntities(requestParameters?: TranslateEntitiesRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<TranslateEntitiesResponse>>; translateEntities(requestParameters?: TranslateEntitiesRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<TranslateEntitiesResponse>>; /** * [EARLY ACCESS] TranslateEntitiesInlined: Translate a collection of entities, inlining the body of the translation script. * Run the provided translation request. The entities to translate, script to use and dialect to validate results against are all specified in the request body. The entities are given as a dictionary with (ephemeral) unique correlation IDs. * @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. */ translateEntitiesInlined(requestParameters?: TranslateEntitiesInlinedRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<TranslateEntitiesResponse>; translateEntitiesInlined(requestParameters?: TranslateEntitiesInlinedRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<TranslateEntitiesResponse>>; translateEntitiesInlined(requestParameters?: TranslateEntitiesInlinedRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<TranslateEntitiesResponse>>; /** * [EARLY ACCESS] UpsertTranslationDialect: Upsert a Dialect. * Upsert the given dialect. * @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. */ upsertTranslationDialect(requestParameters?: UpsertTranslationDialectRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<Dialect>; upsertTranslationDialect(requestParameters?: UpsertTranslationDialectRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<Dialect>>; upsertTranslationDialect(requestParameters?: UpsertTranslationDialectRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<Dialect>>; /** * [EARLY ACCESS] UpsertTranslationScript: Upsert a translation script. * Upserts a translation script to be used for translating financial entities. * @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. */ upsertTranslationScript(requestParameters?: UpsertTranslationScriptRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<TranslationScript>; upsertTranslationScript(requestParameters?: UpsertTranslationScriptRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<TranslationScript>>; upsertTranslationScript(requestParameters?: UpsertTranslationScriptRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<TranslationScript>>; static ɵfac: i0.ɵɵFactoryDeclaration<ScriptedTranslationService, [null, { optional: true; }, { optional: true; }]>; static ɵprov: i0.ɵɵInjectableDeclaration<ScriptedTranslationService>; }