@finbourne/lusid-sdk-angular18
Version:
An Angular (18) SDK for secure access to the LUSID® by FINBOURNE web API
148 lines (147 loc) • 9.69 kB
TypeScript
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Allocation } from '../model/allocation';
import { AllocationSetRequest } from '../model/allocationSetRequest';
import { DeletedEntityResponse } from '../model/deletedEntityResponse';
import { PagedResourceListOfAllocation } from '../model/pagedResourceListOfAllocation';
import { ResourceListOfAllocation } from '../model/resourceListOfAllocation';
import { Configuration } from '../configuration';
import * as i0 from "@angular/core";
export interface DeleteAllocationRequestParams {
/** The allocation scope. */
scope: string;
/** The allocation\'s code. This, together with the scope uniquely identifies the allocation to delete. */
code: string;
}
export interface GetAllocationRequestParams {
/** The scope to which the allocation belongs. */
scope: string;
/** The allocation\'s unique identifier. */
code: string;
/** The asAt datetime at which to retrieve the allocation. Defaults to return the latest version of the allocation if not specified. */
asAt?: string;
/** A list of property keys from the \"Allocations\" domain to decorate onto the allocation. These take the format {domain}/{scope}/{code} e.g. \"Allocations/system/Name\". */
propertyKeys?: Array<string>;
}
export interface ListAllocationsRequestParams {
/** The asAt datetime at which to retrieve the allocation. Defaults to return the latest version of the allocation if not specified. */
asAt?: string;
/** The pagination token to use to continue listing allocations from a previous call to list allocations. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields must not have changed since the original request. */
page?: string;
/** A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\". */
sortBy?: Array<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;
/** A list of property keys from the \"Allocations\" domain to decorate onto each allocation. These take the format {domain}/{scope}/{code} e.g. \"Allocations/system/Name\". All properties, except derived properties, are returned by default, without specifying here. */
propertyKeys?: Array<string>;
}
export interface UpsertAllocationsRequestParams {
/** The collection of allocation requests. */
allocationSetRequest: AllocationSetRequest;
/** An optional verification asAt; individual upserts will fail if an existing entity has been updated between the verification asAt and time of upsert. */
verificationAsAt?: string;
/** Optionally choose to keep retrying upsert for remaining entities if some are being updated concurrently. If set to true, any entities that have changed since the verificationAsAt will be dropped from the set of allocations to upsert and the upsert will be retried. The response will only contain the allocations in the original request that have been successfully upserted. */
retryWithoutChangedEntities?: boolean;
}
export declare class AllocationsService {
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] DeleteAllocation: Delete allocation
* Delete an allocation. Deletion will be valid from the allocation\'s creation datetime. This means that the allocation will no longer exist at any effective datetime from the asAt datetime of deletion.
* @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.
*/
deleteAllocation(requestParameters?: DeleteAllocationRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<DeletedEntityResponse>;
deleteAllocation(requestParameters?: DeleteAllocationRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<DeletedEntityResponse>>;
deleteAllocation(requestParameters?: DeleteAllocationRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<DeletedEntityResponse>>;
/**
* [EARLY ACCESS] GetAllocation: Get Allocation
* Fetch an Allocation matching the provided identifier
* @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.
*/
getAllocation(requestParameters?: GetAllocationRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Allocation>;
getAllocation(requestParameters?: GetAllocationRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Allocation>>;
getAllocation(requestParameters?: GetAllocationRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Allocation>>;
/**
* ListAllocations: List Allocations
* Fetch the last pre-AsAt date version of each allocation in scope (does not fetch the entire history).
* @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.
*/
listAllocations(requestParameters?: ListAllocationsRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<PagedResourceListOfAllocation>;
listAllocations(requestParameters?: ListAllocationsRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<PagedResourceListOfAllocation>>;
listAllocations(requestParameters?: ListAllocationsRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<PagedResourceListOfAllocation>>;
/**
* UpsertAllocations: Upsert Allocations
* Upsert; update existing allocations with given ids, or create new allocations otherwise.
* @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.
*/
upsertAllocations(requestParameters?: UpsertAllocationsRequestParams, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<ResourceListOfAllocation>;
upsertAllocations(requestParameters?: UpsertAllocationsRequestParams, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<ResourceListOfAllocation>>;
upsertAllocations(requestParameters?: UpsertAllocationsRequestParams, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<ResourceListOfAllocation>>;
static ɵfac: i0.ɵɵFactoryDeclaration<AllocationsService, [null, { optional: true; }, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<AllocationsService>;
}