UNPKG

@veeroute/lss-packer-angular

Version:

OpenAPI client for @veeroute/lss-packer-angular

1 lines 92.3 kB
{"version":3,"file":"veeroute-lss-packer-angular.mjs","sources":["../../variables.ts","../../encoder.ts","../../configuration.ts","../../api.base.service.ts","../../api/packService.ts","../../api/systemService.ts","../../api/api.ts","../../model/attribute.ts","../../model/calculationSettings.ts","../../model/calculationStatus.ts","../../model/checkResult.ts","../../model/coordinates.ts","../../model/dimensions.ts","../../model/packageType.ts","../../model/packerEntityErrorType.ts","../../model/packerEntityType.ts","../../model/packerEntityWarningType.ts","../../model/schemaError.ts","../../model/service.ts","../../model/unpackedItems.ts","../../model/versionResult.ts","../../api.module.ts","../../provide-api.ts","../../veeroute-lss-packer-angular.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const BASE_PATH = new InjectionToken<string>('basePath');\nexport const COLLECTION_FORMATS = {\n 'csv': ',',\n 'tsv': ' ',\n 'ssv': ' ',\n 'pipes': '|'\n}\n","import { HttpParameterCodec } from '@angular/common/http';\n\n/**\n * Custom HttpParameterCodec\n * Workaround for https://github.com/angular/angular/issues/18261\n */\nexport class CustomHttpParameterCodec implements HttpParameterCodec {\n encodeKey(k: string): string {\n return encodeURIComponent(k);\n }\n encodeValue(v: string): string {\n return encodeURIComponent(v);\n }\n decodeKey(k: string): string {\n return decodeURIComponent(k);\n }\n decodeValue(v: string): string {\n return decodeURIComponent(v);\n }\n}\n","import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http';\nimport { Param } from './param';\n\nexport interface ConfigurationParameters {\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n apiKeys?: {[ key: string ]: string};\n username?: string;\n password?: string;\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n accessToken?: string | (() => string);\n basePath?: string;\n withCredentials?: boolean;\n /**\n * Takes care of encoding query- and form-parameters.\n */\n encoder?: HttpParameterCodec;\n /**\n * Override the default method for encoding path parameters in various\n * <a href=\"https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values\">styles</a>.\n * <p>\n * See {@link README.md} for more details\n * </p>\n */\n encodeParam?: (param: Param) => string;\n /**\n * The keys are the names in the securitySchemes section of the OpenAPI\n * document. They should map to the value used for authentication\n * minus any standard prefixes such as 'Basic' or 'Bearer'.\n */\n credentials?: {[ key: string ]: string | (() => string | undefined)};\n}\n\nexport class Configuration {\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n apiKeys?: {[ key: string ]: string};\n username?: string;\n password?: string;\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n accessToken?: string | (() => string);\n basePath?: string;\n withCredentials?: boolean;\n /**\n * Takes care of encoding query- and form-parameters.\n */\n encoder?: HttpParameterCodec;\n /**\n * Encoding of various path parameter\n * <a href=\"https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values\">styles</a>.\n * <p>\n * See {@link README.md} for more details\n * </p>\n */\n encodeParam: (param: Param) => string;\n /**\n * The keys are the names in the securitySchemes section of the OpenAPI\n * document. They should map to the value used for authentication\n * minus any standard prefixes such as 'Basic' or 'Bearer'.\n */\n credentials: {[ key: string ]: string | (() => string | undefined)};\n\nconstructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {\n if (apiKeys) {\n this.apiKeys = apiKeys;\n }\n if (username !== undefined) {\n this.username = username;\n }\n if (password !== undefined) {\n this.password = password;\n }\n if (accessToken !== undefined) {\n this.accessToken = accessToken;\n }\n if (basePath !== undefined) {\n this.basePath = basePath;\n }\n if (withCredentials !== undefined) {\n this.withCredentials = withCredentials;\n }\n if (encoder) {\n this.encoder = encoder;\n }\n this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));\n this.credentials = credentials ?? {};\n\n // init default ApiKeyAuth credential\n if (!this.credentials['ApiKeyAuth']) {\n this.credentials['ApiKeyAuth'] = () => {\n return typeof this.accessToken === 'function'\n ? this.accessToken()\n : this.accessToken;\n };\n }\n }\n\n /**\n * Select the correct content-type to use for a request.\n * Uses {@link Configuration#isJsonMime} to determine the correct content-type.\n * If no content type is found return the first found type if the contentTypes is not empty\n * @param contentTypes - the array of content types that are available for selection\n * @returns the selected content-type or <code>undefined</code> if no selection could be made.\n */\n public selectHeaderContentType (contentTypes: string[]): string | undefined {\n if (contentTypes.length === 0) {\n return undefined;\n }\n\n const type = contentTypes.find((x: string) => this.isJsonMime(x));\n if (type === undefined) {\n return contentTypes[0];\n }\n return type;\n }\n\n /**\n * Select the correct accept content-type to use for a request.\n * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.\n * If no content type is found return the first found type if the contentTypes is not empty\n * @param accepts - the array of content types that are available for selection.\n * @returns the selected content-type or <code>undefined</code> if no selection could be made.\n */\n public selectHeaderAccept(accepts: string[]): string | undefined {\n if (accepts.length === 0) {\n return undefined;\n }\n\n const type = accepts.find((x: string) => this.isJsonMime(x));\n if (type === undefined) {\n return accepts[0];\n }\n return type;\n }\n\n /**\n * Check if the given MIME is a JSON MIME.\n * JSON MIME examples:\n * application/json\n * application/json; charset=UTF8\n * APPLICATION/JSON\n * application/vnd.company+json\n * @param mime - MIME (Multipurpose Internet Mail Extensions)\n * @return True if the given MIME is JSON, false otherwise.\n */\n public isJsonMime(mime: string): boolean {\n const jsonMime: RegExp = new RegExp('^(application\\/json|[^;/ \\t]+\\/[^;/ \\t]+[+]json)[ \\t]*(;.*)?$', 'i');\n return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');\n }\n\n public lookupCredential(key: string): string | undefined {\n const value = this.credentials[key];\n return typeof value === 'function'\n ? value()\n : value;\n }\n\n public addCredentialToHeaders(credentialKey: string, headerName: string, headers: HttpHeaders, prefix?: string): HttpHeaders {\n const value = this.lookupCredential(credentialKey);\n return value\n ? headers.set(headerName, (prefix ?? '') + value)\n : headers;\n }\n\n public addCredentialToQuery(credentialKey: string, paramName: string, query: HttpParams): HttpParams {\n const value = this.lookupCredential(credentialKey);\n return value\n ? query.set(paramName, value)\n : query;\n }\n\n private defaultEncodeParam(param: Param): string {\n // This implementation exists as fallback for missing configuration\n // and for backwards compatibility to older typescript-angular generator versions.\n // It only works for the 'simple' parameter style.\n // Date-handling only works for the 'date-time' format.\n // All other styles and Date-formats are probably handled incorrectly.\n //\n // But: if that's all you need (i.e.: the most common use-case): no need for customization!\n\n const value = param.dataFormat === 'date-time' && param.value instanceof Date\n ? (param.value as Date).toISOString()\n : param.value;\n\n return encodeURIComponent(String(value));\n }\n}\n","/**\n * VRt.Packer [PC]\n *\n * The version of the OpenAPI document: 7.37.3331\n * Contact: support@veeroute.com\n *\n * NOTE: This class is auto generated by OpenAPI Generator.\n * Do not edit the class manually.\n */\nimport { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from './encoder';\nimport { Configuration } from './configuration';\n\nexport class BaseService {\n protected basePath = 'https://api.edge7.veeroute.cloud';\n public defaultHeaders = new HttpHeaders();\n public configuration: Configuration;\n public encoder: HttpParameterCodec;\n\n constructor(basePath?: string|string[], configuration?: Configuration) {\n this.configuration = configuration || new Configuration();\n if (typeof this.configuration.basePath !== 'string') {\n const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;\n if (firstBasePath != undefined) {\n basePath = firstBasePath;\n }\n\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n protected canConsumeForm(consumes: string[]): boolean {\n return consumes.indexOf('multipart/form-data') !== -1;\n }\n\n protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep: boolean = false): HttpParams {\n // If the value is an object (but not a Date), recursively add its keys.\n if (typeof value === 'object' && !(value instanceof Date)) {\n return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);\n }\n return this.addToHttpParamsRecursive(httpParams, value, key);\n }\n\n protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams {\n if (value === null || value === undefined) {\n return httpParams;\n }\n if (typeof value === 'object') {\n // If JSON format is preferred, key must be provided.\n if (key != null) {\n return isDeep\n ? Object.keys(value as Record<string, any>).reduce(\n (hp, k) => hp.append(`${key}[${k}]`, value[k]),\n httpParams,\n )\n : httpParams.append(key, JSON.stringify(value));\n }\n // Otherwise, if it's an array, add each element.\n if (Array.isArray(value)) {\n value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, value.toISOString());\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach(k => {\n const paramKey = key ? `${key}.${k}` : k;\n httpParams = this.addToHttpParamsRecursive(httpParams, value[k], paramKey);\n });\n }\n return httpParams;\n } else if (key != null) {\n return httpParams.append(key, value);\n }\n throw Error(\"key may not be null if value is not object or array\");\n }\n}\n","/**\n * VRt.Packer [PC]\n *\n * The version of the OpenAPI document: 7.37.3331\n * Contact: support@veeroute.com\n *\n * NOTE: This class is auto generated by OpenAPI Generator.\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { CalculationAsyncResultPacker } from '../model/calculationAsyncResult';\n// @ts-ignore\nimport { CalculationStatePacker } from '../model/calculationState';\n// @ts-ignore\nimport { General402Packer } from '../model/general402';\n// @ts-ignore\nimport { General404Packer } from '../model/general404';\n// @ts-ignore\nimport { General429Packer } from '../model/general429';\n// @ts-ignore\nimport { General500Packer } from '../model/general500';\n// @ts-ignore\nimport { PackResultPacker } from '../model/packResult';\n// @ts-ignore\nimport { PackTaskPacker } from '../model/packTask';\n// @ts-ignore\nimport { Packer400WithErrorsAndWarningsPacker } from '../model/packer400WithErrorsAndWarnings';\n// @ts-ignore\nimport { PackerValidateResultPacker } from '../model/packerValidateResult';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\nimport { BaseService } from '../api.base.service';\nimport {\n PackServiceInterface,\n CancelPackCalculationRequestParams,\n DeletePackResultRequestParams,\n ReadPackResultRequestParams,\n ReadPackStateRequestParams,\n RunPackCalculationRequestParams,\n RunPackCalculationAsyncRequestParams,\n RunPackValidationRequestParams\n} from './packServiceInterface';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PackService extends BaseService implements PackServiceInterface {\n\n constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {\n super(basePath, configuration);\n }\n\n /**\n * Cancel calculation\n * Cancel calculation process by the calculation identifier.\n * @param requestParameters\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public cancelPackCalculation(requestParameters: CancelPackCalculationRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any>;\n public cancelPackCalculation(requestParameters: CancelPackCalculationRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;\n public cancelPackCalculation(requestParameters: CancelPackCalculationRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;\n public cancelPackCalculation(requestParameters: CancelPackCalculationRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n const processCode = requestParameters?.processCode;\n if (processCode === null || processCode === undefined) {\n throw new Error('Required parameter processCode was null or undefined when calling cancelPackCalculation.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n // authentication (ApiKeyAuth) required\n localVarHeaders = this.configuration.addCredentialToHeaders('ApiKeyAuth', 'Authorization', localVarHeaders, 'Bearer ');\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/packer/pack/calculation-async/${this.configuration.encodeParam({name: \"processCode\", value: processCode, in: \"path\", style: \"simple\", explode: false, dataType: \"string\", dataFormat: \"uuid\"})}`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Result removal\n * Removal of the planning result by the calculation identifier.\n * @param requestParameters\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public deletePackResult(requestParameters: DeletePackResultRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any>;\n public deletePackResult(requestParameters: DeletePackResultRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;\n public deletePackResult(requestParameters: DeletePackResultRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;\n public deletePackResult(requestParameters: DeletePackResultRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n const processCode = requestParameters?.processCode;\n if (processCode === null || processCode === undefined) {\n throw new Error('Required parameter processCode was null or undefined when calling deletePackResult.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n // authentication (ApiKeyAuth) required\n localVarHeaders = this.configuration.addCredentialToHeaders('ApiKeyAuth', 'Authorization', localVarHeaders, 'Bearer ');\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/packer/pack/result/${this.configuration.encodeParam({name: \"processCode\", value: processCode, in: \"path\", style: \"simple\", explode: false, dataType: \"string\", dataFormat: \"uuid\"})}`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Getting the result\n * Getting the result based on the calculation identifier.\n * @param requestParameters\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public readPackResult(requestParameters: ReadPackResultRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<PackResultPacker>;\n public readPackResult(requestParameters: ReadPackResultRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<PackResultPacker>>;\n public readPackResult(requestParameters: ReadPackResultRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<PackResultPacker>>;\n public readPackResult(requestParameters: ReadPackResultRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n const processCode = requestParameters?.processCode;\n if (processCode === null || processCode === undefined) {\n throw new Error('Required parameter processCode was null or undefined when calling readPackResult.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n // authentication (ApiKeyAuth) required\n localVarHeaders = this.configuration.addCredentialToHeaders('ApiKeyAuth', 'Authorization', localVarHeaders, 'Bearer ');\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/packer/pack/result/${this.configuration.encodeParam({name: \"processCode\", value: processCode, in: \"path\", style: \"simple\", explode: false, dataType: \"string\", dataFormat: \"uuid\"})}`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<PackResultPacker>('get', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Calculation state\n * Read calculation state by the calculation identifier.\n * @param requestParameters\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public readPackState(requestParameters: ReadPackStateRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<CalculationStatePacker>;\n public readPackState(requestParameters: ReadPackStateRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<CalculationStatePacker>>;\n public readPackState(requestParameters: ReadPackStateRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<CalculationStatePacker>>;\n public readPackState(requestParameters: ReadPackStateRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n const processCode = requestParameters?.processCode;\n if (processCode === null || processCode === undefined) {\n throw new Error('Required parameter processCode was null or undefined when calling readPackState.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n // authentication (ApiKeyAuth) required\n localVarHeaders = this.configuration.addCredentialToHeaders('ApiKeyAuth', 'Authorization', localVarHeaders, 'Bearer ');\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/packer/pack/state/${this.configuration.encodeParam({name: \"processCode\", value: processCode, in: \"path\", style: \"simple\", explode: false, dataType: \"string\", dataFormat: \"uuid\"})}`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<CalculationStatePacker>('get', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Packing (SYNC)\n * Planning the optimal package.\n * @param requestParameters\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public runPackCalculation(requestParameters: RunPackCalculationRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<PackResultPacker>;\n public runPackCalculation(requestParameters: RunPackCalculationRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<PackResultPacker>>;\n public runPackCalculation(requestParameters: RunPackCalculationRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<PackResultPacker>>;\n public runPackCalculation(requestParameters: RunPackCalculationRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n const packTaskPacker = requestParameters?.packTaskPacker;\n if (packTaskPacker === null || packTaskPacker === undefined) {\n throw new Error('Required parameter packTaskPacker was null or undefined when calling runPackCalculation.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n // authentication (ApiKeyAuth) required\n localVarHeaders = this.configuration.addCredentialToHeaders('ApiKeyAuth', 'Authorization', localVarHeaders, 'Bearer ');\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/packer/pack/calculation`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<PackResultPacker>('post', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n body: packTaskPacker,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Packing (ASYNC)\n * The result can be obtained using the [result](#operation/read_pack_result) method, removing - with [delete](#operation/delete_pack_result). \n * @param requestParameters\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public runPackCalculationAsync(requestParameters: RunPackCalculationAsyncRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<CalculationAsyncResultPacker>;\n public runPackCalculationAsync(requestParameters: RunPackCalculationAsyncRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<CalculationAsyncResultPacker>>;\n public runPackCalculationAsync(requestParameters: RunPackCalculationAsyncRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<CalculationAsyncResultPacker>>;\n public runPackCalculationAsync(requestParameters: RunPackCalculationAsyncRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n const packTaskPacker = requestParameters?.packTaskPacker;\n if (packTaskPacker === null || packTaskPacker === undefined) {\n throw new Error('Required parameter packTaskPacker was null or undefined when calling runPackCalculationAsync.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n // authentication (ApiKeyAuth) required\n localVarHeaders = this.configuration.addCredentialToHeaders('ApiKeyAuth', 'Authorization', localVarHeaders, 'Bearer ');\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/packer/pack/calculation-async`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<CalculationAsyncResultPacker>('post', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n body: packTaskPacker,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Data validation\n * Checking data before planning.\n * @param requestParameters\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public runPackValidation(requestParameters: RunPackValidationRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<PackerValidateResultPacker>;\n public runPackValidation(requestParameters: RunPackValidationRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<PackerValidateResultPacker>>;\n public runPackValidation(requestParameters: RunPackValidationRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<PackerValidateResultPacker>>;\n public runPackValidation(requestParameters: RunPackValidationRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n const packTaskPacker = requestParameters?.packTaskPacker;\n if (packTaskPacker === null || packTaskPacker === undefined) {\n throw new Error('Required parameter packTaskPacker was null or undefined when calling runPackValidation.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n // authentication (ApiKeyAuth) required\n localVarHeaders = this.configuration.addCredentialToHeaders('ApiKeyAuth', 'Authorization', localVarHeaders, 'Bearer ');\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/packer/pack/validation`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<PackerValidateResultPacker>('post', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n body: packTaskPacker,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","/**\n * VRt.Packer [PC]\n *\n * The version of the OpenAPI document: 7.37.3331\n * Contact: support@veeroute.com\n *\n * NOTE: This class is auto generated by OpenAPI Generator.\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { CheckResultPacker } from '../model/checkResult';\n// @ts-ignore\nimport { General404Packer } from '../model/general404';\n// @ts-ignore\nimport { General429Packer } from '../model/general429';\n// @ts-ignore\nimport { General500Packer } from '../model/general500';\n// @ts-ignore\nimport { VersionResultPacker } from '../model/versionResult';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\nimport { BaseService } from '../api.base.service';\nimport {\n SystemServiceInterface,\n FileRequestParams\n} from './systemServiceInterface';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SystemService extends BaseService implements SystemServiceInterface {\n\n constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {\n super(basePath, configuration);\n }\n\n /**\n * Checking the availability\n * Checking the service availability.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public check(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<CheckResultPacker>;\n public check(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<CheckResultPacker>>;\n public check(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<CheckResultPacker>>;\n public check(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n\n let localVarHeaders = this.defaultHeaders;\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/packer/system/check`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<CheckResultPacker>('get', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Getting the documentation\n * Getting the file with this service documentation.\n * @param requestParameters\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public file(requestParameters: FileRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/html' | 'text/plain' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<string>;\n public file(requestParameters: FileRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/html' | 'text/plain' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<string>>;\n public file(requestParameters: FileRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/html' | 'text/plain' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<string>>;\n public file(requestParameters: FileRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/html' | 'text/plain' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n const filename = requestParameters?.filename;\n if (filename === null || filename === undefined) {\n throw new Error('Required parameter filename was null or undefined when calling file.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'text/html',\n 'text/plain',\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/packer/file/${this.configuration.encodeParam({name: \"filename\", value: filename, in: \"path\", style: \"simple\", explode: false, dataType: \"string\", dataFormat: undefined})}`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<string>('get', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Getting the service version\n * Getting the service version.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public version(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<VersionResultPacker>;\n public version(