UNPKG

@finbourne/lusid-sdk-angular18

Version:

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

398 lines (397 loc) 26.3 kB
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { Observable } from 'rxjs'; import { AllocationServiceRunResponse } from '../model/allocationServiceRunResponse'; import { BlockAndOrdersCreateRequest } from '../model/blockAndOrdersCreateRequest'; import { BookTransactionsRequest } from '../model/bookTransactionsRequest'; import { BookTransactionsResponse } from '../model/bookTransactionsResponse'; import { CancelOrdersAndMoveRemainingRequest } from '../model/cancelOrdersAndMoveRemainingRequest'; import { CancelOrdersAndMoveRemainingResponse } from '../model/cancelOrdersAndMoveRemainingResponse'; import { CancelOrdersResponse } from '../model/cancelOrdersResponse'; import { CancelPlacementsResponse } from '../model/cancelPlacementsResponse'; import { MoveOrdersToDifferentBlocksRequest } from '../model/moveOrdersToDifferentBlocksRequest'; import { OrderUpdateRequest } from '../model/orderUpdateRequest'; import { PlaceBlocksRequest } from '../model/placeBlocksRequest'; import { PlacementUpdateRequest } from '../model/placementUpdateRequest'; import { ResourceId } from '../model/resourceId'; import { ResourceListOfBlockAndOrders } from '../model/resourceListOfBlockAndOrders'; import { ResourceListOfChangeIntervalWithOrderManagementDetail } from '../model/resourceListOfChangeIntervalWithOrderManagementDetail'; import { ResourceListOfMovedOrderToDifferentBlockResponse } from '../model/resourceListOfMovedOrderToDifferentBlockResponse'; import { ResourceListOfPlacement } from '../model/resourceListOfPlacement'; import { SweepBlocksRequest } from '../model/sweepBlocksRequest'; import { SweepBlocksResponse } from '../model/sweepBlocksResponse'; import { UpdateOrdersResponse } from '../model/updateOrdersResponse'; import { UpdatePlacementsResponse } from '../model/updatePlacementsResponse'; import { WeightedAllocationServiceRunRequest } from '../model/weightedAllocationServiceRunRequest'; import { Configuration } from '../configuration'; import * as i0 from "@angular/core"; export interface BookTransactionsRequestParams { /** The allocations to create transactions for */ bookTransactionsRequest: BookTransactionsRequest; /** Whether to apply fees and commissions to transactions (default: true) */ applyFeesAndCommission?: boolean; /** Whether to mark allocations and fully-booked orders with state Booked */ markOrdersAndAllocationsAsBooked?: boolean; } export interface CancelOrdersRequestParams { /** The request containing the ids of the orders to be cancelled. */ requestBody: { [key: string]: ResourceId; }; } export interface CancelOrdersAndMoveRemainingRequestParams { /** The request containing the orders to be cancelled, and the destinations of remaining quantities. */ requestBody: { [key: string]: CancelOrdersAndMoveRemainingRequest; }; } export interface CancelPlacementsRequestParams { /** The request containing the ids of the placements to be cancelled. */ requestBody: { [key: string]: ResourceId; }; } export interface CreateOrdersRequestParams { /** The collection of block and orders requests. */ blockAndOrdersCreateRequest: BlockAndOrdersCreateRequest; } export interface GetOrderHistoryRequestParams { /** The scope of the order. */ scope: string; /** The code of the order. */ code: string; /** The asAt datetime at which to retrieve the history of the order and related entities. Defaults to return the latest version if not specified. */ asAt?: string; } export interface MoveOrdersRequestParams { /** The collection of order and destination block ids. */ moveOrdersToDifferentBlocksRequest: MoveOrdersToDifferentBlocksRequest; } export interface PlaceBlocksRequestParams { /** The request containing the blocks to the placed. */ placeBlocksRequest?: PlaceBlocksRequest; } export interface RunAllocationServiceRequestParams { /** The List of Placement IDs for which you wish to allocate Executions. */ resourceId: Array<ResourceId>; /** A string representation of the allocation algorithm you would like to use to allocate shares from executions e.g. \&quot;PR-FIFO\&quot;. This defaults to \&quot;PR-FIFO\&quot;. */ allocationAlgorithm?: string; } export interface RunAllocationServiceWithWeightsRequestParams { /** The placement IDs to allocate against, and the portfolio weights to use for the allocation split. */ weightedAllocationServiceRunRequest: WeightedAllocationServiceRunRequest; /** A string representation of the allocation algorithm you would like to use to allocate shares from executions e.g. \&quot;PR-LF\&quot;. Allocating with weights means the base algorithm is always pro-rata, and the orphan allocation algorithm is either Largest First or Smallest First. This defaults to \&quot;PR-LF\&quot;. Valid values are \&quot;PR-LF\&quot;, \&quot;PR-SF\&quot;, \&quot;LF\&quot;, \&quot;SF\&quot;. */ allocationAlgorithm?: string; } export interface SweepBlocksRequestParams { sweepBlocksRequest: SweepBlocksRequest; } export interface UpdateOrdersRequestParams { /** The request containing the orders to be updated. */ requestBody: { [key: string]: OrderUpdateRequest; }; } export interface UpdatePlacementsRequestParams { /** The request containing the placements to be updated. */ requestBody: { [key: string]: PlacementUpdateRequest; }; } export declare class OrderManagementService { protected httpClient: HttpClient; protected basePath: string; defaultHeaders: HttpHeaders; configuration: Configuration; encoder: HttpParameterCodec; constructor(httpClient: HttpClient, basePath: string | string[], configuration: Configuration); private addToHttpParams; private addToHttpParamsRecursive; /** * BookTransactions: Books transactions using specific allocations as a source. * Takes a collection of allocation IDs, and maps fields from those allocations and related orders onto new transactions. * @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. */ bookTransactions(requestParameters?: BookTransactionsRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<BookTransactionsResponse>; bookTransactions(requestParameters?: BookTransactionsRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<BookTransactionsResponse>>; bookTransactions(requestParameters?: BookTransactionsRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<BookTransactionsResponse>>; /** * [EARLY ACCESS] CancelOrders: Cancel existing orders * The response returns both the collection of successfully canceled orders, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. * @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. */ cancelOrders(requestParameters?: CancelOrdersRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<CancelOrdersResponse>; cancelOrders(requestParameters?: CancelOrdersRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<CancelOrdersResponse>>; cancelOrders(requestParameters?: CancelOrdersRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<CancelOrdersResponse>>; /** * [EARLY ACCESS] CancelOrdersAndMoveRemaining: Cancel existing orders and move any unplaced quantities to new orders in new blocks * Cancels existing orders, reducing their quantities to those aleady placed. Any remaining quantities are moved to new orders in new blocks. The placed quantities are distributed to the cancelled orders on a pro-rata basis. * @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. */ cancelOrdersAndMoveRemaining(requestParameters?: CancelOrdersAndMoveRemainingRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<CancelOrdersAndMoveRemainingResponse>; cancelOrdersAndMoveRemaining(requestParameters?: CancelOrdersAndMoveRemainingRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<CancelOrdersAndMoveRemainingResponse>>; cancelOrdersAndMoveRemaining(requestParameters?: CancelOrdersAndMoveRemainingRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<CancelOrdersAndMoveRemainingResponse>>; /** * [EARLY ACCESS] CancelPlacements: Cancel existing placements * The response returns both the collection of successfully canceled placements, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. * @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. */ cancelPlacements(requestParameters?: CancelPlacementsRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<CancelPlacementsResponse>; cancelPlacements(requestParameters?: CancelPlacementsRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<CancelPlacementsResponse>>; cancelPlacements(requestParameters?: CancelPlacementsRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<CancelPlacementsResponse>>; /** * CreateOrders: Upsert a Block and associated orders * Create orders, and blocks if they don\&#39;t already exist. This will fail if the block exists and already references orders with differing blocking fields. * @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. */ createOrders(requestParameters?: CreateOrdersRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<ResourceListOfBlockAndOrders>; createOrders(requestParameters?: CreateOrdersRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<ResourceListOfBlockAndOrders>>; createOrders(requestParameters?: CreateOrdersRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<ResourceListOfBlockAndOrders>>; /** * GetOrderHistory: Get the history of an order and related entity changes * Get the changes that have happened to an order and related 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. */ getOrderHistory(requestParameters?: GetOrderHistoryRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<ResourceListOfChangeIntervalWithOrderManagementDetail>; getOrderHistory(requestParameters?: GetOrderHistoryRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<ResourceListOfChangeIntervalWithOrderManagementDetail>>; getOrderHistory(requestParameters?: GetOrderHistoryRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<ResourceListOfChangeIntervalWithOrderManagementDetail>>; /** * [EARLY ACCESS] MoveOrders: Move orders to new or existing block * Move an order to a block, creating the block if it does not already exist. This will fail if the block exists and already references orders with differing fields to the upsert request. * @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. */ moveOrders(requestParameters?: MoveOrdersRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<ResourceListOfMovedOrderToDifferentBlockResponse>; moveOrders(requestParameters?: MoveOrdersRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<ResourceListOfMovedOrderToDifferentBlockResponse>>; moveOrders(requestParameters?: MoveOrdersRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<ResourceListOfMovedOrderToDifferentBlockResponse>>; /** * [EARLY ACCESS] PlaceBlocks: Places blocks for a given list of placement requests. * The referenced block\&#39;s existence will be verified. * @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. */ placeBlocks(requestParameters?: PlaceBlocksRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<ResourceListOfPlacement>; placeBlocks(requestParameters?: PlaceBlocksRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<ResourceListOfPlacement>>; placeBlocks(requestParameters?: PlaceBlocksRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<ResourceListOfPlacement>>; /** * RunAllocationService: Runs the Allocation Service * Allocates Executions for a given list of placements back to their originating orders using one of the LUSID algorithms, creating Allocations to record the results. * @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. */ runAllocationService(requestParameters?: RunAllocationServiceRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<AllocationServiceRunResponse>; runAllocationService(requestParameters?: RunAllocationServiceRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<AllocationServiceRunResponse>>; runAllocationService(requestParameters?: RunAllocationServiceRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<AllocationServiceRunResponse>>; /** * [EXPERIMENTAL] RunAllocationServiceWithWeights: Runs the Allocation Service with portfolio weights * Allocates Executions for a given list of placements to a specified set of portfolios by weight, creating Allocations to record the results. Used for the unsolicited Block and Block Trade booking flows where no Orders exist against the Block. Weights are relative to each other and are not required to sum to 1 or 100. * @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. */ runAllocationServiceWithWeights(requestParameters?: RunAllocationServiceWithWeightsRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<AllocationServiceRunResponse>; runAllocationServiceWithWeights(requestParameters?: RunAllocationServiceWithWeightsRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<AllocationServiceRunResponse>>; runAllocationServiceWithWeights(requestParameters?: RunAllocationServiceWithWeightsRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<AllocationServiceRunResponse>>; /** * [EXPERIMENTAL] SweepBlocks: Sweeps specified blocks, for each block that meets the requirements. The request may be partially successful. * The requirements are: &lt;list type&#x3D;\&quot;bullet\&quot;&gt;&lt;term&gt;The block exists.&lt;/term&gt;&lt;term&gt;All orders have state \&quot;Closed\&quot;, \&quot;Cancelled\&quot;, \&quot;Canceled\&quot; or \&quot;Booked\&quot;.&lt;/term&gt;&lt;term&gt;All placements have state \&quot;Allocated\&quot; or \&quot;Over-allocated\&quot;.&lt;/term&gt;&lt;term&gt;All allocations have state \&quot;Closed\&quot;, \&quot;Cancelled\&quot;, \&quot;Canceled\&quot; or \&quot;Booked\&quot;.&lt;/term&gt;&lt;term&gt;No execution or allocation has been modified since the passed LatestAllowableModificationTime.&lt;/term&gt;&lt;/list&gt; * @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. */ sweepBlocks(requestParameters?: SweepBlocksRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<SweepBlocksResponse>; sweepBlocks(requestParameters?: SweepBlocksRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<SweepBlocksResponse>>; sweepBlocks(requestParameters?: SweepBlocksRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<SweepBlocksResponse>>; /** * [EARLY ACCESS] UpdateOrders: Update existing orders * The response returns both the collection of successfully updated orders, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. * @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. */ updateOrders(requestParameters?: UpdateOrdersRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<UpdateOrdersResponse>; updateOrders(requestParameters?: UpdateOrdersRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<UpdateOrdersResponse>>; updateOrders(requestParameters?: UpdateOrdersRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<UpdateOrdersResponse>>; /** * [EARLY ACCESS] UpdatePlacements: Update existing placements * The response returns both the collection of successfully updated placements, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. * @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. */ updatePlacements(requestParameters?: UpdatePlacementsRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<UpdatePlacementsResponse>; updatePlacements(requestParameters?: UpdatePlacementsRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpResponse<UpdatePlacementsResponse>>; updatePlacements(requestParameters?: UpdatePlacementsRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; context?: HttpContext; transferCache?: boolean; }): Observable<HttpEvent<UpdatePlacementsResponse>>; static ɵfac: i0.ɵɵFactoryDeclaration<OrderManagementService, [null, { optional: true; }, { optional: true; }]>; static ɵprov: i0.ɵɵInjectableDeclaration<OrderManagementService>; }