@veeroute/lss-account-angular
Version:
OpenAPI client for @veeroute/lss-account-angular
1,172 lines (1,162 loc) • 75 kB
JavaScript
import * as i0 from '@angular/core';
import { InjectionToken, Optional, Inject, Injectable, SkipSelf, NgModule } from '@angular/core';
import * as i1 from '@angular/common/http';
import { HttpHeaders, HttpParams, HttpContext } from '@angular/common/http';
/**
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
class CustomHttpParameterCodec {
encodeKey(k) {
return encodeURIComponent(k);
}
encodeValue(v) {
return encodeURIComponent(v);
}
decodeKey(k) {
return decodeURIComponent(k);
}
decodeValue(v) {
return decodeURIComponent(v);
}
}
const BASE_PATH = new InjectionToken('basePath');
const COLLECTION_FORMATS = {
'csv': ',',
'tsv': ' ',
'ssv': ' ',
'pipes': '|'
};
class Configuration {
/**
* @deprecated Since 5.0. Use credentials instead
*/
apiKeys;
username;
password;
/**
* @deprecated Since 5.0. Use credentials instead
*/
accessToken;
basePath;
withCredentials;
/**
* Takes care of encoding query- and form-parameters.
*/
encoder;
/**
* Encoding of various path parameter
* <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
* <p>
* See {@link README.md} for more details
* </p>
*/
encodeParam;
/**
* The keys are the names in the securitySchemes section of the OpenAPI
* document. They should map to the value used for authentication
* minus any standard prefixes such as 'Basic' or 'Bearer'.
*/
credentials;
constructor(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;
this.encoder = configurationParameters.encoder;
if (configurationParameters.encodeParam) {
this.encodeParam = configurationParameters.encodeParam;
}
else {
this.encodeParam = param => this.defaultEncodeParam(param);
}
if (configurationParameters.credentials) {
this.credentials = configurationParameters.credentials;
}
else {
this.credentials = {};
}
// init default ApiKeyAuth credential
if (!this.credentials['ApiKeyAuth']) {
this.credentials['ApiKeyAuth'] = () => {
return typeof this.accessToken === 'function'
? this.accessToken()
: this.accessToken;
};
}
}
/**
* 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.
*/
selectHeaderContentType(contentTypes) {
if (contentTypes.length === 0) {
return undefined;
}
const type = contentTypes.find((x) => 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.
*/
selectHeaderAccept(accepts) {
if (accepts.length === 0) {
return undefined;
}
const type = accepts.find((x) => 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.
*/
isJsonMime(mime) {
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
}
lookupCredential(key) {
const value = this.credentials[key];
return typeof value === 'function'
? value()
: value;
}
defaultEncodeParam(param) {
// This implementation exists as fallback for missing configuration
// and for backwards compatibility to older typescript-angular generator versions.
// It only works for the 'simple' parameter style.
// Date-handling only works for the 'date-time' format.
// All other styles and Date-formats are probably handled incorrectly.
//
// But: if that's all you need (i.e.: the most common use-case): no need for customization!
const value = param.dataFormat === 'date-time' && param.value instanceof Date
? param.value.toISOString()
: param.value;
return encodeURIComponent(String(value));
}
}
/**
* VRt.Account [AC]
*
* The version of the OpenAPI document: 7.16.2673
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class AuditService {
httpClient;
basePath = 'https://api.edge7.veeroute.cloud';
defaultHeaders = new HttpHeaders();
configuration = new Configuration();
encoder;
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
readAudit(requestParameters, observe = 'body', reportProgress = false, options) {
const offset = requestParameters?.offset;
const limit = requestParameters?.limit;
const from = requestParameters?.from;
const to = requestParameters?.to;
const service = requestParameters?.service;
const operation = requestParameters?.operation;
const processType = requestParameters?.processType;
const status = requestParameters?.status;
const sortField = requestParameters?.sortField;
const sortDirection = requestParameters?.sortDirection;
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (offset !== undefined && offset !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, offset, 'offset');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (from !== undefined && from !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, from, 'from');
}
if (to !== undefined && to !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, to, 'to');
}
if (service !== undefined && service !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, service, 'service');
}
if (operation !== undefined && operation !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, operation, 'operation');
}
if (processType !== undefined && processType !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, processType, 'process_type');
}
if (status !== undefined && status !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, status, 'status');
}
if (sortField !== undefined && sortField !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, sortField, 'sort_field');
}
if (sortDirection !== undefined && sortDirection !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, sortDirection, 'sort_direction');
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential;
// authentication (ApiKeyAuth) required
localVarCredential = this.configuration.lookupCredential('ApiKeyAuth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/account/audit`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuditService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuditService, providedIn: 'root' });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuditService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: Configuration, decorators: [{
type: Optional
}] }] });
/**
* VRt.Account [AC]
*
* The version of the OpenAPI document: 7.16.2673
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class AuthService {
httpClient;
basePath = 'https://api.edge7.veeroute.cloud';
defaultHeaders = new HttpHeaders();
configuration = new Configuration();
encoder;
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
changePassword(requestParameters, observe = 'body', reportProgress = false, options) {
const passwordChangeRequestAccount = requestParameters?.passwordChangeRequestAccount;
let localVarHeaders = this.defaultHeaders;
let localVarCredential;
// authentication (ApiKeyAuth) required
localVarCredential = this.configuration.lookupCredential('ApiKeyAuth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/account/password`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: passwordChangeRequestAccount,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
runTokenGeneration(requestParameters, observe = 'body', reportProgress = false, options) {
const tokenRequestAccount = requestParameters?.tokenRequestAccount;
if (tokenRequestAccount === null || tokenRequestAccount === undefined) {
throw new Error('Required parameter tokenRequestAccount was null or undefined when calling runTokenGeneration.');
}
let localVarHeaders = this.defaultHeaders;
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/account/token/generation`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: tokenRequestAccount,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
runTokenValidation(requestParameters, observe = 'body', reportProgress = false, options) {
const body = requestParameters?.body;
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling runTokenValidation.');
}
let localVarHeaders = this.defaultHeaders;
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/account/token/validation`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: body,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthService, providedIn: 'root' });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AuthService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: Configuration, decorators: [{
type: Optional
}] }] });
/**
* VRt.Account [AC]
*
* The version of the OpenAPI document: 7.16.2673
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class DataService {
httpClient;
basePath = 'https://api.edge7.veeroute.cloud';
defaultHeaders = new HttpHeaders();
configuration = new Configuration();
encoder;
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
readData(requestParameters, observe = 'body', reportProgress = false, options) {
const processCode = requestParameters?.processCode;
if (processCode === null || processCode === undefined) {
throw new Error('Required parameter processCode was null or undefined when calling readData.');
}
const dataFlowType = requestParameters?.dataFlowType;
const dataFlowStage = requestParameters?.dataFlowStage;
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (dataFlowType !== undefined && dataFlowType !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, dataFlowType, 'data_flow_type');
}
if (dataFlowStage !== undefined && dataFlowStage !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, dataFlowStage, 'data_flow_stage');
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential;
// authentication (ApiKeyAuth) required
localVarCredential = this.configuration.lookupCredential('ApiKeyAuth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/octet-stream',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/account/data/${this.configuration.encodeParam({ name: "processCode", value: processCode, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DataService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DataService, providedIn: 'root' });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DataService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: Configuration, decorators: [{
type: Optional
}] }] });
/**
* VRt.Account [AC]
*
* The version of the OpenAPI document: 7.16.2673
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class InfoService {
httpClient;
basePath = 'https://api.edge7.veeroute.cloud';
defaultHeaders = new HttpHeaders();
configuration = new Configuration();
encoder;
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
readInfo(observe = 'body', reportProgress = false, options) {
let localVarHeaders = this.defaultHeaders;
let localVarCredential;
// authentication (ApiKeyAuth) required
localVarCredential = this.configuration.lookupCredential('ApiKeyAuth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/account/info`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateInfo(requestParameters, observe = 'body', reportProgress = false, options) {
const infoChangeRequestAccount = requestParameters?.infoChangeRequestAccount;
if (infoChangeRequestAccount === null || infoChangeRequestAccount === undefined) {
throw new Error('Required parameter infoChangeRequestAccount was null or undefined when calling updateInfo.');
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential;
// authentication (ApiKeyAuth) required
localVarCredential = this.configuration.lookupCredential('ApiKeyAuth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/account/info`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: infoChangeRequestAccount,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InfoService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InfoService, providedIn: 'root' });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InfoService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: Configuration, decorators: [{
type: Optional
}] }] });
/**
* VRt.Account [AC]
*
* The version of the OpenAPI document: 7.16.2673
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class QuotaService {
httpClient;
basePath = 'https://api.edge7.veeroute.cloud';
defaultHeaders = new HttpHeaders();
configuration = new Configuration();
encoder;
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
readQuota(observe = 'body', reportProgress = false, options) {
let localVarHeaders = this.defaultHeaders;
let localVarCredential;
// authentication (ApiKeyAuth) required
localVarCredential = this.configuration.lookupCredential('ApiKeyAuth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/account/quota`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: QuotaService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: QuotaService, providedIn: 'root' });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: QuotaService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: Configuration, decorators: [{
type: Optional
}] }] });
/**
* VRt.Account [AC]
*
* The version of the OpenAPI document: 7.16.2673
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class StatisticsService {
httpClient;
basePath = 'https://api.edge7.veeroute.cloud';
defaultHeaders = new HttpHeaders();
configuration = new Configuration();
encoder;
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
generateReport(requestParameters, observe = 'body', reportProgress = false, options) {
const from = requestParameters?.from;
const to = requestParameters?.to;
const service = requestParameters?.service;
const processType = requestParameters?.processType;