UNPKG

@finbourne/lusid-sdk-angular7

Version:

An angular (7+) SDK for secure access to the LUSID® by FINBOURNE web API

1,256 lines (1,249 loc) 785 kB
import { __extends, __values } from 'tslib'; import { InjectionToken, Injectable, Optional, Inject, NgModule, SkipSelf } from '@angular/core'; import { HttpUrlEncodingCodec, HttpParams, HttpClient, HttpHeaders } from '@angular/common/http'; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * CustomHttpUrlEncodingCodec * Fix plus sign (+) not encoding, so sent as blank space * See: https://github.com/angular/angular/issues/11058#issuecomment-247367318 */ var /** * CustomHttpUrlEncodingCodec * Fix plus sign (+) not encoding, so sent as blank space * See: https://github.com/angular/angular/issues/11058#issuecomment-247367318 */ CustomHttpUrlEncodingCodec = /** @class */ (function (_super) { __extends(CustomHttpUrlEncodingCodec, _super); function CustomHttpUrlEncodingCodec() { return _super !== null && _super.apply(this, arguments) || this; } /** * @param {?} k * @return {?} */ CustomHttpUrlEncodingCodec.prototype.encodeKey = /** * @param {?} k * @return {?} */ function (k) { k = _super.prototype.encodeKey.call(this, k); return k.replace(/\+/gi, '%2B'); }; /** * @param {?} v * @return {?} */ CustomHttpUrlEncodingCodec.prototype.encodeValue = /** * @param {?} v * @return {?} */ function (v) { v = _super.prototype.encodeValue.call(this, v); return v.replace(/\+/gi, '%2B'); }; return CustomHttpUrlEncodingCodec; }(HttpUrlEncodingCodec)); /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** @type {?} */ var BASE_PATH = new InjectionToken('basePath'); /** @type {?} */ var COLLECTION_FORMATS = { 'csv': ',', 'tsv': ' ', 'ssv': ' ', 'pipes': '|' }; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var Configuration = /** @class */ (function () { function Configuration(configurationParameters) { if (configurationParameters === void 0) { configurationParameters = {}; } this.apiKeys = configurationParameters.apiKeys; this.username = configurationParameters.username; this.password = configurationParameters.password; this.accessToken = configurationParameters.accessToken; this.basePath = configurationParameters.basePath; this.withCredentials = configurationParameters.withCredentials; } /** * Select the correct content-type to use for a request. * Uses {@link Configuration#isJsonMime} to determine the correct content-type. * If no content type is found return the first found type if the contentTypes is not empty * @param contentTypes - the array of content types that are available for selection * @returns the selected content-type or <code>undefined</code> if no selection could be made. */ /** * Select the correct content-type to use for a request. * Uses {\@link Configuration#isJsonMime} to determine the correct content-type. * If no content type is found return the first found type if the contentTypes is not empty * @param {?} contentTypes - the array of content types that are available for selection * @return {?} the selected content-type or <code>undefined</code> if no selection could be made. */ Configuration.prototype.selectHeaderContentType = /** * Select the correct content-type to use for a request. * Uses {\@link Configuration#isJsonMime} to determine the correct content-type. * If no content type is found return the first found type if the contentTypes is not empty * @param {?} contentTypes - the array of content types that are available for selection * @return {?} the selected content-type or <code>undefined</code> if no selection could be made. */ function (contentTypes) { var _this = this; if (contentTypes.length == 0) { return undefined; } /** @type {?} */ var type = contentTypes.find((/** * @param {?} x * @return {?} */ function (x) { return _this.isJsonMime(x); })); if (type === undefined) { return contentTypes[0]; } return type; }; /** * Select the correct accept content-type to use for a request. * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. * If no content type is found return the first found type if the contentTypes is not empty * @param accepts - the array of content types that are available for selection. * @returns the selected content-type or <code>undefined</code> if no selection could be made. */ /** * Select the correct accept content-type to use for a request. * Uses {\@link Configuration#isJsonMime} to determine the correct accept content-type. * If no content type is found return the first found type if the contentTypes is not empty * @param {?} accepts - the array of content types that are available for selection. * @return {?} the selected content-type or <code>undefined</code> if no selection could be made. */ Configuration.prototype.selectHeaderAccept = /** * Select the correct accept content-type to use for a request. * Uses {\@link Configuration#isJsonMime} to determine the correct accept content-type. * If no content type is found return the first found type if the contentTypes is not empty * @param {?} accepts - the array of content types that are available for selection. * @return {?} the selected content-type or <code>undefined</code> if no selection could be made. */ function (accepts) { var _this = this; if (accepts.length == 0) { return undefined; } /** @type {?} */ var type = accepts.find((/** * @param {?} x * @return {?} */ function (x) { return _this.isJsonMime(x); })); if (type === undefined) { return accepts[0]; } return type; }; /** * Check if the given MIME is a JSON MIME. * JSON MIME examples: * application/json * application/json; charset=UTF8 * APPLICATION/JSON * application/vnd.company+json * @param mime - MIME (Multipurpose Internet Mail Extensions) * @return True if the given MIME is JSON, false otherwise. */ /** * Check if the given MIME is a JSON MIME. * JSON MIME examples: * application/json * application/json; charset=UTF8 * APPLICATION/JSON * application/vnd.company+json * @param {?} mime - MIME (Multipurpose Internet Mail Extensions) * @return {?} True if the given MIME is JSON, false otherwise. */ Configuration.prototype.isJsonMime = /** * Check if the given MIME is a JSON MIME. * JSON MIME examples: * application/json * application/json; charset=UTF8 * APPLICATION/JSON * application/vnd.company+json * @param {?} mime - MIME (Multipurpose Internet Mail Extensions) * @return {?} True if the given MIME is JSON, false otherwise. */ function (mime) { /** @type {?} */ var jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); }; return Configuration; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var AggregationService = /** @class */ (function () { function AggregationService(httpClient, basePath, configuration) { this.httpClient = httpClient; this.basePath = 'https://localhost/api'; this.defaultHeaders = new HttpHeaders(); this.configuration = new Configuration(); if (basePath) { this.basePath = basePath; } if (configuration) { this.configuration = configuration; this.basePath = basePath || configuration.basePath || this.basePath; } } /** * @param consumes string[] mime-types * @return true: consumes contains 'multipart/form-data', false: otherwise */ /** * @private * @param {?} consumes string[] mime-types * @return {?} true: consumes contains 'multipart/form-data', false: otherwise */ AggregationService.prototype.canConsumeForm = /** * @private * @param {?} consumes string[] mime-types * @return {?} true: consumes contains 'multipart/form-data', false: otherwise */ function (consumes) { var e_1, _a; /** @type {?} */ var form = 'multipart/form-data'; try { for (var consumes_1 = __values(consumes), consumes_1_1 = consumes_1.next(); !consumes_1_1.done; consumes_1_1 = consumes_1.next()) { var consume = consumes_1_1.value; if (form === consume) { return true; } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (consumes_1_1 && !consumes_1_1.done && (_a = consumes_1.return)) _a.call(consumes_1); } finally { if (e_1) throw e_1.error; } } return false; }; /** * @param {?} scope * @param {?} code * @param {?=} request * @param {?=} sortBy * @param {?=} start * @param {?=} limit * @param {?=} observe * @param {?=} reportProgress * @return {?} */ AggregationService.prototype.getAggregationByGroup = /** * @param {?} scope * @param {?} code * @param {?=} request * @param {?=} sortBy * @param {?=} start * @param {?=} limit * @param {?=} observe * @param {?=} reportProgress * @return {?} */ function (scope, code, request, sortBy, start, limit, observe, reportProgress) { if (observe === void 0) { observe = 'body'; } if (reportProgress === void 0) { reportProgress = false; } if (scope === null || scope === undefined) { throw new Error('Required parameter scope was null or undefined when calling getAggregationByGroup.'); } if (code === null || code === undefined) { throw new Error('Required parameter code was null or undefined when calling getAggregationByGroup.'); } /** @type {?} */ var queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (sortBy) { sortBy.forEach((/** * @param {?} element * @return {?} */ function (element) { queryParameters = queryParameters.append('sortBy', (/** @type {?} */ (element))); })); } if (start !== undefined && start !== null) { queryParameters = queryParameters.set('start', (/** @type {?} */ (start))); } if (limit !== undefined && limit !== null) { queryParameters = queryParameters.set('limit', (/** @type {?} */ (limit))); } /** @type {?} */ var headers = this.defaultHeaders; // authentication (oauth2) required if (this.configuration.accessToken) { /** @type {?} */ var accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header /** @type {?} */ var httpHeaderAccepts = [ 'text/plain', 'application/json', 'text/json' ]; /** @type {?} */ var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header /** @type {?} */ var consumes = []; /** @type {?} */ var httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected != undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.post(this.basePath + "/api/portfoliogroups/" + encodeURIComponent(String(scope)) + "/" + encodeURIComponent(String(code)) + "/$aggregate", request, { params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress }); }; /** * @param {?} scope * @param {?} code * @param {?=} request * @param {?=} sortBy * @param {?=} start * @param {?=} limit * @param {?=} observe * @param {?=} reportProgress * @return {?} */ AggregationService.prototype.getAggregationByPortfolio = /** * @param {?} scope * @param {?} code * @param {?=} request * @param {?=} sortBy * @param {?=} start * @param {?=} limit * @param {?=} observe * @param {?=} reportProgress * @return {?} */ function (scope, code, request, sortBy, start, limit, observe, reportProgress) { if (observe === void 0) { observe = 'body'; } if (reportProgress === void 0) { reportProgress = false; } if (scope === null || scope === undefined) { throw new Error('Required parameter scope was null or undefined when calling getAggregationByPortfolio.'); } if (code === null || code === undefined) { throw new Error('Required parameter code was null or undefined when calling getAggregationByPortfolio.'); } /** @type {?} */ var queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (sortBy) { sortBy.forEach((/** * @param {?} element * @return {?} */ function (element) { queryParameters = queryParameters.append('sortBy', (/** @type {?} */ (element))); })); } if (start !== undefined && start !== null) { queryParameters = queryParameters.set('start', (/** @type {?} */ (start))); } if (limit !== undefined && limit !== null) { queryParameters = queryParameters.set('limit', (/** @type {?} */ (limit))); } /** @type {?} */ var headers = this.defaultHeaders; // authentication (oauth2) required if (this.configuration.accessToken) { /** @type {?} */ var accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header /** @type {?} */ var httpHeaderAccepts = [ 'text/plain', 'application/json', 'text/json' ]; /** @type {?} */ var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header /** @type {?} */ var consumes = []; /** @type {?} */ var httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected != undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.post(this.basePath + "/api/portfolios/" + encodeURIComponent(String(scope)) + "/" + encodeURIComponent(String(code)) + "/$aggregate", request, { params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress }); }; /** * @param {?} scope * @param {?} resultsKey * @param {?=} request * @param {?=} sortBy * @param {?=} start * @param {?=} limit * @param {?=} observe * @param {?=} reportProgress * @return {?} */ AggregationService.prototype.getAggregationByResultSet = /** * @param {?} scope * @param {?} resultsKey * @param {?=} request * @param {?=} sortBy * @param {?=} start * @param {?=} limit * @param {?=} observe * @param {?=} reportProgress * @return {?} */ function (scope, resultsKey, request, sortBy, start, limit, observe, reportProgress) { if (observe === void 0) { observe = 'body'; } if (reportProgress === void 0) { reportProgress = false; } if (scope === null || scope === undefined) { throw new Error('Required parameter scope was null or undefined when calling getAggregationByResultSet.'); } if (resultsKey === null || resultsKey === undefined) { throw new Error('Required parameter resultsKey was null or undefined when calling getAggregationByResultSet.'); } /** @type {?} */ var queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (sortBy) { sortBy.forEach((/** * @param {?} element * @return {?} */ function (element) { queryParameters = queryParameters.append('sortBy', (/** @type {?} */ (element))); })); } if (start !== undefined && start !== null) { queryParameters = queryParameters.set('start', (/** @type {?} */ (start))); } if (limit !== undefined && limit !== null) { queryParameters = queryParameters.set('limit', (/** @type {?} */ (limit))); } /** @type {?} */ var headers = this.defaultHeaders; // authentication (oauth2) required if (this.configuration.accessToken) { /** @type {?} */ var accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header /** @type {?} */ var httpHeaderAccepts = [ 'text/plain', 'application/json', 'text/json' ]; /** @type {?} */ var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header /** @type {?} */ var consumes = []; /** @type {?} */ var httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected != undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.post(this.basePath + "/api/results/" + encodeURIComponent(String(scope)) + "/" + encodeURIComponent(String(resultsKey)) + "/$aggregate", request, { params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress }); }; /** * @param {?} scope * @param {?} code * @param {?=} request * @param {?=} observe * @param {?=} reportProgress * @return {?} */ AggregationService.prototype.getNestedAggregationByGroup = /** * @param {?} scope * @param {?} code * @param {?=} request * @param {?=} observe * @param {?=} reportProgress * @return {?} */ function (scope, code, request, observe, reportProgress) { if (observe === void 0) { observe = 'body'; } if (reportProgress === void 0) { reportProgress = false; } if (scope === null || scope === undefined) { throw new Error('Required parameter scope was null or undefined when calling getNestedAggregationByGroup.'); } if (code === null || code === undefined) { throw new Error('Required parameter code was null or undefined when calling getNestedAggregationByGroup.'); } /** @type {?} */ var headers = this.defaultHeaders; // authentication (oauth2) required if (this.configuration.accessToken) { /** @type {?} */ var accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header /** @type {?} */ var httpHeaderAccepts = [ 'text/plain', 'application/json', 'text/json' ]; /** @type {?} */ var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header /** @type {?} */ var consumes = []; /** @type {?} */ var httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected != undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.post(this.basePath + "/api/portfoliogroups/" + encodeURIComponent(String(scope)) + "/" + encodeURIComponent(String(code)) + "/$aggregatenested", request, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress }); }; AggregationService.decorators = [ { type: Injectable } ]; /** @nocollapse */ AggregationService.ctorParameters = function () { return [ { type: HttpClient }, { type: String, decorators: [{ type: Optional }, { type: Inject, args: [BASE_PATH,] }] }, { type: Configuration, decorators: [{ type: Optional }] } ]; }; return AggregationService; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var AnalyticsStoresService = /** @class */ (function () { function AnalyticsStoresService(httpClient, basePath, configuration) { this.httpClient = httpClient; this.basePath = 'https://localhost/api'; this.defaultHeaders = new HttpHeaders(); this.configuration = new Configuration(); if (basePath) { this.basePath = basePath; } if (configuration) { this.configuration = configuration; this.basePath = basePath || configuration.basePath || this.basePath; } } /** * @param consumes string[] mime-types * @return true: consumes contains 'multipart/form-data', false: otherwise */ /** * @private * @param {?} consumes string[] mime-types * @return {?} true: consumes contains 'multipart/form-data', false: otherwise */ AnalyticsStoresService.prototype.canConsumeForm = /** * @private * @param {?} consumes string[] mime-types * @return {?} true: consumes contains 'multipart/form-data', false: otherwise */ function (consumes) { var e_1, _a; /** @type {?} */ var form = 'multipart/form-data'; try { for (var consumes_1 = __values(consumes), consumes_1_1 = consumes_1.next(); !consumes_1_1.done; consumes_1_1 = consumes_1.next()) { var consume = consumes_1_1.value; if (form === consume) { return true; } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (consumes_1_1 && !consumes_1_1.done && (_a = consumes_1.return)) _a.call(consumes_1); } finally { if (e_1) throw e_1.error; } } return false; }; /** * @param {?=} request * @param {?=} observe * @param {?=} reportProgress * @return {?} */ AnalyticsStoresService.prototype.createAnalyticStore = /** * @param {?=} request * @param {?=} observe * @param {?=} reportProgress * @return {?} */ function (request, observe, reportProgress) { if (observe === void 0) { observe = 'body'; } if (reportProgress === void 0) { reportProgress = false; } /** @type {?} */ var headers = this.defaultHeaders; // authentication (oauth2) required if (this.configuration.accessToken) { /** @type {?} */ var accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header /** @type {?} */ var httpHeaderAccepts = [ 'text/plain', 'application/json', 'text/json' ]; /** @type {?} */ var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header /** @type {?} */ var consumes = []; /** @type {?} */ var httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected != undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.post(this.basePath + "/api/analytics", request, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress }); }; /** * @param {?} scope * @param {?} year * @param {?} month * @param {?} day * @param {?=} observe * @param {?=} reportProgress * @return {?} */ AnalyticsStoresService.prototype.deleteAnalyticStore = /** * @param {?} scope * @param {?} year * @param {?} month * @param {?} day * @param {?=} observe * @param {?=} reportProgress * @return {?} */ function (scope, year, month, day, observe, reportProgress) { if (observe === void 0) { observe = 'body'; } if (reportProgress === void 0) { reportProgress = false; } if (scope === null || scope === undefined) { throw new Error('Required parameter scope was null or undefined when calling deleteAnalyticStore.'); } if (year === null || year === undefined) { throw new Error('Required parameter year was null or undefined when calling deleteAnalyticStore.'); } if (month === null || month === undefined) { throw new Error('Required parameter month was null or undefined when calling deleteAnalyticStore.'); } if (day === null || day === undefined) { throw new Error('Required parameter day was null or undefined when calling deleteAnalyticStore.'); } /** @type {?} */ var headers = this.defaultHeaders; // authentication (oauth2) required if (this.configuration.accessToken) { /** @type {?} */ var accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header /** @type {?} */ var httpHeaderAccepts = [ 'text/plain', 'application/json', 'text/json' ]; /** @type {?} */ var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.delete(this.basePath + "/api/analytics/" + encodeURIComponent(String(scope)) + "/" + encodeURIComponent(String(year)) + "/" + encodeURIComponent(String(month)) + "/" + encodeURIComponent(String(day)), { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress }); }; /** * @param {?} scope * @param {?} year * @param {?} month * @param {?} day * @param {?=} asAt * @param {?=} observe * @param {?=} reportProgress * @return {?} */ AnalyticsStoresService.prototype.getAnalyticStore = /** * @param {?} scope * @param {?} year * @param {?} month * @param {?} day * @param {?=} asAt * @param {?=} observe * @param {?=} reportProgress * @return {?} */ function (scope, year, month, day, asAt, observe, reportProgress) { if (observe === void 0) { observe = 'body'; } if (reportProgress === void 0) { reportProgress = false; } if (scope === null || scope === undefined) { throw new Error('Required parameter scope was null or undefined when calling getAnalyticStore.'); } if (year === null || year === undefined) { throw new Error('Required parameter year was null or undefined when calling getAnalyticStore.'); } if (month === null || month === undefined) { throw new Error('Required parameter month was null or undefined when calling getAnalyticStore.'); } if (day === null || day === undefined) { throw new Error('Required parameter day was null or undefined when calling getAnalyticStore.'); } /** @type {?} */ var queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (asAt !== undefined && asAt !== null) { queryParameters = queryParameters.set('asAt', (/** @type {?} */ (asAt.toISOString()))); } /** @type {?} */ var headers = this.defaultHeaders; // authentication (oauth2) required if (this.configuration.accessToken) { /** @type {?} */ var accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header /** @type {?} */ var httpHeaderAccepts = [ 'text/plain', 'application/json', 'text/json' ]; /** @type {?} */ var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.get(this.basePath + "/api/analytics/" + encodeURIComponent(String(scope)) + "/" + encodeURIComponent(String(year)) + "/" + encodeURIComponent(String(month)) + "/" + encodeURIComponent(String(day)), { params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress }); }; /** * @param {?=} asAt * @param {?=} sortBy * @param {?=} start * @param {?=} limit * @param {?=} filter * @param {?=} observe * @param {?=} reportProgress * @return {?} */ AnalyticsStoresService.prototype.listAnalyticStores = /** * @param {?=} asAt * @param {?=} sortBy * @param {?=} start * @param {?=} limit * @param {?=} filter * @param {?=} observe * @param {?=} reportProgress * @return {?} */ function (asAt, sortBy, start, limit, filter, observe, reportProgress) { if (observe === void 0) { observe = 'body'; } if (reportProgress === void 0) { reportProgress = false; } /** @type {?} */ var queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (asAt !== undefined && asAt !== null) { queryParameters = queryParameters.set('asAt', (/** @type {?} */ (asAt.toISOString()))); } if (sortBy) { sortBy.forEach((/** * @param {?} element * @return {?} */ function (element) { queryParameters = queryParameters.append('sortBy', (/** @type {?} */ (element))); })); } if (start !== undefined && start !== null) { queryParameters = queryParameters.set('start', (/** @type {?} */ (start))); } if (limit !== undefined && limit !== null) { queryParameters = queryParameters.set('limit', (/** @type {?} */ (limit))); } if (filter !== undefined && filter !== null) { queryParameters = queryParameters.set('filter', (/** @type {?} */ (filter))); } /** @type {?} */ var headers = this.defaultHeaders; // authentication (oauth2) required if (this.configuration.accessToken) { /** @type {?} */ var accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header /** @type {?} */ var httpHeaderAccepts = [ 'text/plain', 'application/json', 'text/json' ]; /** @type {?} */ var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.get(this.basePath + "/api/analytics", { params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress }); }; /** * @param {?} scope * @param {?} year * @param {?} month * @param {?} day * @param {?=} data * @param {?=} observe * @param {?=} reportProgress * @return {?} */ AnalyticsStoresService.prototype.setAnalytics = /** * @param {?} scope * @param {?} year * @param {?} month * @param {?} day * @param {?=} data * @param {?=} observe * @param {?=} reportProgress * @return {?} */ function (scope, year, month, day, data, observe, reportProgress) { if (observe === void 0) { observe = 'body'; } if (reportProgress === void 0) { reportProgress = false; } if (scope === null || scope === undefined) { throw new Error('Required parameter scope was null or undefined when calling setAnalytics.'); } if (year === null || year === undefined) { throw new Error('Required parameter year was null or undefined when calling setAnalytics.'); } if (month === null || month === undefined) { throw new Error('Required parameter month was null or undefined when calling setAnalytics.'); } if (day === null || day === undefined) { throw new Error('Required parameter day was null or undefined when calling setAnalytics.'); } /** @type {?} */ var headers = this.defaultHeaders; // authentication (oauth2) required if (this.configuration.accessToken) { /** @type {?} */ var accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header /** @type {?} */ var httpHeaderAccepts = [ 'text/plain', 'application/json', 'text/json' ]; /** @type {?} */ var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } // to determine the Content-Type header /** @type {?} */ var consumes = []; /** @type {?} */ var httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected != undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.put(this.basePath + "/api/analytics/" + encodeURIComponent(String(scope)) + "/" + encodeURIComponent(String(year)) + "/" + encodeURIComponent(String(month)) + "/" + encodeURIComponent(String(day)) + "/prices", data, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress }); }; AnalyticsStoresService.decorators = [ { type: Injectable } ]; /** @nocollapse */ AnalyticsStoresService.ctorParameters = function () { return [ { type: HttpClient }, { type: String, decorators: [{ type: Optional }, { type: Inject, args: [BASE_PATH,] }] }, { type: Configuration, decorators: [{ type: Optional }] } ]; }; return AnalyticsStoresService; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var ApplicationMetadataService = /** @class */ (function () { function ApplicationMetadataService(httpClient, basePath, configuration) { this.httpClient = httpClient; this.basePath = 'https://localhost/api'; this.defaultHeaders = new HttpHeaders(); this.configuration = new Configuration(); if (basePath) { this.basePath = basePath; } if (configuration) { this.configuration = configuration; this.basePath = basePath || configuration.basePath || this.basePath; } } /** * @param consumes string[] mime-types * @return true: consumes contains 'multipart/form-data', false: otherwise */ /** * @private * @param {?} consumes string[] mime-types * @return {?} true: consumes contains 'multipart/form-data', false: otherwise */ ApplicationMetadataService.prototype.canConsumeForm = /** * @private * @param {?} consumes string[] mime-types * @return {?} true: consumes contains 'multipart/form-data', false: otherwise */ function (consumes) { var e_1, _a; /** @type {?} */ var form = 'multipart/form-data'; try { for (var consumes_1 = __values(consumes), consumes_1_1 = consumes_1.next(); !consumes_1_1.done; consumes_1_1 = consumes_1.next()) { var consume = consumes_1_1.value; if (form === consume) { return true; } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (consumes_1_1 && !consumes_1_1.done && (_a = consumes_1.return)) _a.call(consumes_1); } finally { if (e_1) throw e_1.error; } } return false; }; /** * @param {?=} version * @param {?=} observe * @param {?=} reportProgress * @return {?} */ ApplicationMetadataService.prototype.getExcelAddin = /** * @param {?=} version * @param {?=} observe * @param {?=} reportProgress * @return {?} */ function (version, observe, reportProgress) { if (observe === void 0) { observe = 'body'; } if (reportProgress === void 0) { reportProgress = false; } /** @type {?} */ var queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (version !== undefined && version !== null) { queryParameters = queryParameters.set('version', (/** @type {?} */ (version))); } /** @type {?} */ var headers = this.defaultHeaders; // authentication (oauth2) required if (this.configuration.accessToken) { /** @type {?} */ var accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header /** @type {?} */ var httpHeaderAccepts = [ 'text/plain', 'application/json', 'text/json' ]; /** @type {?} */ var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.get(this.basePath + "/api/metadata/downloads/exceladdin", { params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress }); }; /** * @param {?=} observe * @param {?=} reportProgress * @return {?} */ ApplicationMetadataService.prototype.getLusidVersions = /** * @param {?=} observe * @param {?=} reportProgress * @return {?} */ function (observe, reportProgress) { if (observe === void 0) { observe = 'body'; } if (reportProgress === void 0) { reportProgress = false; } /** @type {?} */ var headers = this.defaultHeaders; // authentication (oauth2) required if (this.configuration.accessToken) { /** @type {?} */ var accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header /** @type {?} */ var httpHeaderAccepts = [ 'text/plain', 'application/json', 'text/json' ]; /** @type {?} */ var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.get(this.basePath + "/api/metadata/versions", { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress }); }; /** * @param {?=} filter * @param {?=} observe * @param {?=} reportProgress * @return {?} */ ApplicationMetadataService.prototype.listAccessControlledResources = /** * @param {?=} filter * @param {?=} observe * @param {?=} reportProgress * @return {?} */ function (filter, observe, reportProgress) { if (observe === void 0) { observe = 'body'; } if (reportProgress === void 0) { reportProgress = false; } /** @type {?} */ var queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (filter !== undefined && filter !== null) { queryParameters = queryParameters.set('filter', (/** @type {?} */ (filter))); } /** @type {?} */ var headers = this.defaultHeaders; // authentication (oauth2) required if (this.configuration.accessToken) { /** @type {?} */ var accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } // to determine the Accept header /** @type {?} */ var httpHeaderAccepts = [ 'text/plain', 'application/json', 'text/json' ]; /** @type {?} */ var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.get(this.basePath + "/api/metadata/access/resources", { params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress }); }; ApplicationMetadataService.decorators = [ { type: Injectable } ]; /** @nocollapse */ ApplicationMetadataService.ctorParameters = function () { return [ { type: HttpClient }, { type: String, decorators: [{ type: Optional }, { type: Inject, args: [BASE_PATH,] }] }, { type: Configuration, decorators: [{ type: Optional }] } ]; }; return ApplicationMetadataService; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var CorporateActionSourcesService = /** @class */ (function () { function CorporateActionSourcesService(httpClient, basePath, configuration) { this.httpClient = httpClient; this.basePath = 'https://localhost/api'; this.defaultHeaders = new HttpHeaders(); this.configuration = new Configuration(); if (basePath) { this.basePath = basePath; } if (configuration) { this.configuration = configuration; this.basePath = basePath || configuration.basePath || this.basePath; } } /** * @param consumes string[] mime-types * @return true: consumes contains 'multipart/form-data', false: otherwise */ /** * @private * @param {?} consumes string[] mime-types * @return {?} true: consumes contains 'multipart/form-data', false: otherwise */ CorporateActionSourcesService.prototype.canConsumeForm = /** * @private * @param {?} consumes string[] mime-types * @return {?} true: consumes contains 'multipart/form-data', false: otherwise */ function (consumes) { var e_1, _a; /** @type {?} */ var form = 'multipart/form-data'; try { for (var consumes_1 = __values(consumes), consumes_1_1 = consumes_1.next(); !consumes_1_1.done; consumes_1_1 = consumes_1.next()) { var consume = consumes_1_1.value; if (form === consume) { return true; } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (consumes_1_1 && !consumes_1_1.done && (_a = consumes_1.return)) _a.call(consumes_1); } finally { if (e_1) throw e_1.error; } } return false; }; /** * @param {?} scope * @param {?} code * @param {?=} actions * @param {?=} observe * @param {?=} reportProgress * @return {?} */ CorporateActionSourcesService.prototype.batchUpsertCorporateActions = /** * @param {?} scope * @param {?} code * @param {?=} actions * @param {?=} observe * @param {?=} reportProgress * @return {?} */ function (scope, code, actions, observe, reportProgress) { if (observe === void 0) { observe = 'body'; } if (reportProgress === void 0) { reportProgress = false; } if (scope === null || scope === undefined) { throw new Error('Required parameter scope was null or undefined when calling batchUpsertCorporateActions.'); } if (code === null || code === undefined) { throw new Error('Required parameter code was null or undefined when calling