@veeroute/lss-packer-angular
Version:
OpenAPI client for @veeroute/lss-packer-angular
1,138 lines (1,115 loc) • 50.2 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, 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.Packer [PC]
*
* The version of the OpenAPI document: 7.18.2755
* 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 PackService {
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;
}
cancelPackCalculation(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 cancelPackCalculation.');
}
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 = `/packer/pack/calculation-async/${this.configuration.encodeParam({ name: "processCode", value: processCode, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
deletePackResult(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 deletePackResult.');
}
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 = `/packer/pack/result/${this.configuration.encodeParam({ name: "processCode", value: processCode, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
readPackResult(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 readPackResult.');
}
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 = `/packer/pack/result/${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,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
readPackState(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 readPackState.');
}
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 = `/packer/pack/state/${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,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
runPackCalculation(requestParameters, observe = 'body', reportProgress = false, options) {
const packTaskPacker = requestParameters?.packTaskPacker;
if (packTaskPacker === null || packTaskPacker === undefined) {
throw new Error('Required parameter packTaskPacker was null or undefined when calling runPackCalculation.');
}
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 = `/packer/pack/calculation`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: packTaskPacker,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
runPackCalculationAsync(requestParameters, observe = 'body', reportProgress = false, options) {
const packTaskPacker = requestParameters?.packTaskPacker;
if (packTaskPacker === null || packTaskPacker === undefined) {
throw new Error('Required parameter packTaskPacker was null or undefined when calling runPackCalculationAsync.');
}
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 = `/packer/pack/calculation-async`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: packTaskPacker,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
runPackValidation(requestParameters, observe = 'body', reportProgress = false, options) {
const packTaskPacker = requestParameters?.packTaskPacker;
if (packTaskPacker === null || packTaskPacker === undefined) {
throw new Error('Required parameter packTaskPacker was null or undefined when calling runPackValidation.');
}
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 = `/packer/pack/validation`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: packTaskPacker,
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: PackService, 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: PackService, providedIn: 'root' });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PackService, 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.Packer [PC]
*
* The version of the OpenAPI document: 7.18.2755
* 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 SystemService {
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;
}
check(observe = 'body', reportProgress = false, options) {
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;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/packer/system/check`;
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
});
}
file(requestParameters, observe = 'body', reportProgress = false, options) {
const filename = requestParameters?.filename;
if (filename === null || filename === undefined) {
throw new Error('Required parameter filename was null or undefined when calling file.');
}
let localVarHeaders = this.defaultHeaders;
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'text/html',
'text/plain',
'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 = `/packer/file/${this.configuration.encodeParam({ name: "filename", value: filename, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
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
});
}
version(observe = 'body', reportProgress = false, options) {
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;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/packer/system/version`;
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: SystemService, 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: SystemService, providedIn: 'root' });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SystemService, 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
}] }] });
const APIS = [PackService, SystemService];
/**
* VRt.Packer [PC]
*
* The version of the OpenAPI document: 7.18.2755
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/**
* VRt.Packer [PC]
*
* The version of the OpenAPI document: 7.18.2755
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/**
* VRt.Packer [PC]
*
* The version of the OpenAPI document: 7.18.2755
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/**
* Calculation status: * `WAITING` - the calculation is waiting to be launched. * `IN_PROGRESS` - calculation in progress. * `FINISHED_IN_TIME` - the calculation completed correctly before the specified maximum time. * `FINISHED_OUT_OF_TIME` - the calculation ended because the specified time for calculation has expired, which can affect the quality of the result for the worse. * `CANCELED` - the calculation was canceled because a cancel command was received. * `CANCELED_BY_TIMEOUT` - the calculation was canceled automatically because the waiting time in the queue was exceeded. * `CANCELED_BY_QUOTA` - the calculation was canceled because the quota for this calculation type was exceeded. * `FAILED` - calculation completed with an error.
*/
var CalculationStatusPacker;
(function (CalculationStatusPacker) {
CalculationStatusPacker["WAITING"] = "WAITING";
CalculationStatusPacker["IN_PROGRESS"] = "IN_PROGRESS";
CalculationStatusPacker["FINISHED_IN_TIME"] = "FINISHED_IN_TIME";
CalculationStatusPacker["FINISHED_OUT_OF_TIME"] = "FINISHED_OUT_OF_TIME";
CalculationStatusPacker["CANCELED"] = "CANCELED";
CalculationStatusPacker["CANCELED_BY_TIMEOUT"] = "CANCELED_BY_TIMEOUT";
CalculationStatusPacker["CANCELED_BY_QUOTA"] = "CANCELED_BY_QUOTA";
CalculationStatusPacker["FAILED"] = "FAILED";
})(CalculationStatusPacker || (CalculationStatusPacker = {}));
/**
* VRt.Packer [PC]
*
* The version of the OpenAPI document: 7.18.2755
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/**
* VRt.Packer [PC]
*
* The version of the OpenAPI document: 7.18.2755
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/**
* VRt.Packer [PC]
*
* The version of the OpenAPI document: 7.18.2755
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/**
* VRt.Packer [PC]
*
* The version of the OpenAPI document: 7.18.2755
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/**
* Error type: * `UNIQUE_IDS_VIOLATION` - all keys must be unique * `INCONSISTENT_REFERENCE` - bad reference key * `INVALID_SLOTS_COUNT` - exactly one SLOT package must be present * `INVALID_SLOT_CONTAINER` - slot container_coordinates must be zero * `INVALID_SLOT_BODY` - slot body_dimensions must be zero * `INVALID_PALLETS_COUNT` - exactly one PALLET package must be present * `INVALID_PALLET_CONTAINER_DIMENSIONS` - the length and width of a pallet container_dimensions must not exceed the corresponding body_dimensions * `INVALID_PALLET_CONTAINER` - the pallet container must not go beyond the boundaries of the pallet body in length and width * `INVALID_MIXBOX_CONTAINER` - mixbox container must be inside body subject to container_coordinates offset * `INVALID_MIXBOX_COUNT` - at least one valid MIXBOX package must be present * `INVALID_PRODUCT_DIMENSIONS` - product length, width and height must be at least 1 millimeter, weight - at least 1 gram * `INVALID_PRODUCT_COUNT` - at least one valid product must be present
*/
var EntityErrorTypePacker;
(function (EntityErrorTypePacker) {
EntityErrorTypePacker["UNIQUE_IDS_VIOLATION"] = "UNIQUE_IDS_VIOLATION";
EntityErrorTypePacker["INCONSISTENT_REFERENCE"] = "INCONSISTENT_REFERENCE";
EntityErrorTypePacker["INVALID_SLOTS_COUNT"] = "INVALID_SLOTS_COUNT";
EntityErrorTypePacker["INVALID_SLOT_CONTAINER"] = "INVALID_SLOT_CONTAINER";
EntityErrorTypePacker["INVALID_SLOT_BODY"] = "INVALID_SLOT_BODY";
EntityErrorTypePacker["INVALID_PALLETS_COUNT"] = "INVALID_PALLETS_COUNT";
EntityErrorTypePacker["INVALID_PALLET_CONTAINER_DIMENSIONS"] = "INVALID_PALLET_CONTAINER_DIMENSIONS";
EntityErrorTypePacker["INVALID_PALLET_CONTAINER"] = "INVALID_PALLET_CONTAINER";
EntityErrorTypePacker["INVALID_MIXBOX_CONTAINER"] = "INVALID_MIXBOX_CONTAINER";
EntityErrorTypePacker["INVALID_MIXBOX_COUNT"] = "INVALID_MIXBOX_COUNT";
EntityErrorTypePacker["INVALID_PRODUCT_DIMENSIONS"] = "INVALID_PRODUCT_DIMENSIONS";
EntityErrorTypePacker["INVALID_PRODUCT_COUNT"] = "INVALID_PRODUCT_COUNT";
})(EntityErrorTypePacker || (EntityErrorTypePacker = {}));
/**
* VRt.Packer [PC]
*
* The version of the OpenAPI document: 7.18.2755
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/**
* Entity type.
*/
var EntityTypePacker;
(function (EntityTypePacker) {
EntityTypePacker["TASK"] = "TASK";
EntityTypePacker["SETTINGS"] = "SETTINGS";
EntityTypePacker["PRODUCT"] = "PRODUCT";
EntityTypePacker["PACKAGE"] = "PACKAGE";
})(EntityTypePacker || (EntityTypePacker = {}));
/**
* VRt.Packer [PC]
*
* The version of the OpenAPI document: 7.18.2755
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/**
* Warning type: * `INVALID_PALLET_SLOT_FIT` - a pallet without rotation must be placed in the slot, taking into account the maximum load in terms of size and weight * `INVALID_MIXBOX_PALLET_FIT` - any mixbox must fit on a pallet considering the maximum load, any 4 mixboxes of the same type in a 2×2 configuration without rotation must fit on any pallet according to the overall dimensions and weight of the package body_dimensions * `INVALID_PRODUCT_PACKAGE_FIT` - the product must be placed on a pallet, or in all mixboxes (if only mixboxes are compatible) * `INVALID_PRODUCT_COMPATIBILITY` - the product must be compatible either with all packages or only with all mixboxes
*/
var EntityWarningTypePacker;
(function (EntityWarningTypePacker) {
EntityWarningTypePacker["INVALID_PALLET_SLOT_FIT"] = "INVALID_PALLET_SLOT_FIT";
EntityWarningTypePacker["INVALID_MIXBOX_PALLET_FIT"] = "INVALID_MIXBOX_PALLET_FIT";
EntityWarningTypePacker["INVALID_PRODUCT_PACKAGE_FIT"] = "INVALID_PRODUCT_PACKAGE_FIT";
EntityWarningTypePacker["INVALID_PRODUCT_COMPATIBILITY"] = "INVALID_PRODUCT_COMPATIBILITY";
})(EntityWarningTypePacker || (EntityWarningTypePacker = {}));
/**
* VRt.Packer [PC]
*
* The version of the OpenAPI document: 7.18.2755
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/**
* Types of [packaging](#section/Description/Packaging-process): * `SLOT` - space in the transport box for a stack of pallets, the height limits the stack of pallets * `PALLET` - a pallet, the products are stacked on top of a pallet, with the help of a cardboard partition it can be divided into 2 - 6 parts, in each of which the same products are placed * `MIXBOX` - mix-box, the products are folded inside the box
*/
var PackageTypePacker;
(function (PackageTypePacker) {
PackageTypePacker["SLOT"] = "SLOT";
PackageTypePacker["PALLET"] = "PALLET";
PackageTypePacker["MIXBOX"] = "MIXBOX";
})(PackageTypePacker || (PackageTypePacker = {}));
/**
* VRt.Packer [PC]
*
* The version of the OpenAPI document: 7.18.2755
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/**
* VRt.Packer [PC]
*
* The version of the OpenAPI document: 7.18.2755
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/**
* Service name.
*/
var ServicePacker;
(function (ServicePacker) {
ServicePacker["UNIVERSAL"] = "UNIVERSAL";
ServicePacker["ROUTING"] = "ROUTING";
ServicePacker["ACCOUNT"] = "ACCOUNT";
ServicePacker["ADMIN"] = "ADMIN";
ServicePacker["STUDIO"] = "STUDIO";
ServicePacker["MONITOR"] = "MONITOR";
ServicePacker["PACKER"] = "PACKER";
ServicePacker["AGRO"] = "AGRO";
})(ServicePacker || (ServicePacker = {}));
/**
* VRt.Packer [PC]
*
* The version of the OpenAPI document: 7.18.2755
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
/**
* VRt.Packer [PC]
*
* The version of the OpenAPI document: 7.18.2755
* Contact: servicedesk@veeroute.com
*
* NOTE: This class is auto generated by OpenAPI Generator.
* Do not edit the class manually.
*/
class LssPackerApiModule {
static forRoot(configurationFactory) {
return {
ngModule: LssPackerApiModule,
providers: [{ provide: Configuration, useFactory: configurationFactory }]
};
}
constructor(parentModule, http) {
if (parentModule) {
throw new Error('LssPackerApiModule is already loaded. Import in your base AppModule only.');
}
if (!http) {
throw new Error('You need to import the HttpClientModule in your AppModule! \n' +
'See also https://github.com/angular/angular/issues/20575');
}
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LssPackerApiModule, deps: [{ token: LssPackerApiModule, optional: true, skipSelf: true }, { token: i1.HttpClient, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: LssPackerApiModule });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LssPackerApiModule });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LssPackerApiModule, decorators: [{
type: NgModule,
args: [{
imports: [],
declarations: [],
exports: [],
providers: []
}]
}], ctorParameters: () => [{ type: LssPackerApiModule, decorators: [{
type: Optional
}, {
type: SkipSelf
}] }, { type: i1.HttpClient, decorators: [{
type: Optional
}] }] });
/**
* Generated bundle index. Do not edit.
*/
export { APIS, BASE_PATH, COLLECTION_FORMATS, CalculationStatusPacker, Configuration, EntityErrorTypePacker, EntityTypePacker, EntityWarningTypePacker, L