@herd/angular-client
Version:
Swagger generated client for @herd/angular-client
854 lines (846 loc) • 1.06 MB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('tslib'), require('@angular/common/http')) :
typeof define === 'function' && define.amd ? define(['exports', '@angular/core', 'tslib', '@angular/common/http'], factory) :
(factory((global.clientBundle = {}),global.i0,global.tslib,global.i1));
}(this, (function (exports,i0,tslib,i1) { 'use strict';
var BASE_PATH = new i0.InjectionToken('basePath');
var COLLECTION_FORMATS = {
'csv': ',',
'tsv': ' ',
'ssv': ' ',
'pipes': '|'
};
var Configuration = /** @class */ (function () {
function Configuration(configurationParameters) {
if (configurationParameters === void 0) { configurationParameters = {}; }
this.apiKeys = configurationParameters.apiKeys;
this.username = configurationParameters.username;
this.password = configurationParameters.password;
this.accessToken = configurationParameters.accessToken;
this.basePath = configurationParameters.basePath;
this.withCredentials = configurationParameters.withCredentials;
}
/**
* Select the correct content-type to use for a request.
* Uses {@link Configuration#isJsonMime} to determine the correct content-type.
* If no content type is found return the first found type if the contentTypes is not empty
* @param contentTypes - the array of content types that are available for selection
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
*/
Configuration.prototype.selectHeaderContentType = function (contentTypes) {
var _this = this;
if (contentTypes.length === 0) {
return undefined;
}
var type = contentTypes.find(function (x) { return _this.isJsonMime(x); });
if (type === undefined) {
return contentTypes[0];
}
return type;
};
/**
* Select the correct accept content-type to use for a request.
* Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.
* If no content type is found return the first found type if the contentTypes is not empty
* @param accepts - the array of content types that are available for selection.
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
*/
Configuration.prototype.selectHeaderAccept = function (accepts) {
var _this = this;
if (accepts.length === 0) {
return undefined;
}
var type = accepts.find(function (x) { return _this.isJsonMime(x); });
if (type === undefined) {
return accepts[0];
}
return type;
};
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
Configuration.prototype.isJsonMime = function (mime) {
var jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
};
return Configuration;
}());
var AllowedAttributeValueService = /** @class */ (function () {
function AllowedAttributeValueService(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'http://localhost/herd-app/rest';
this.defaultHeaders = new i1.HttpHeaders();
this.configuration = new Configuration();
if (configuration) {
this.configuration = configuration;
this.configuration.basePath = configuration.basePath || basePath || this.basePath;
}
else {
this.configuration.basePath = basePath || this.basePath;
}
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
AllowedAttributeValueService.prototype.canConsumeForm = function (consumes) {
var form = 'multipart/form-data';
for (var _i = 0, consumes_1 = consumes; _i < consumes_1.length; _i++) {
var consume = consumes_1[_i];
if (form === consume) {
return true;
}
}
return false;
};
AllowedAttributeValueService.prototype.allowedAttributeValueCreateAllowedAttributeValues = function (allowedAttributeValuesCreateRequest, observe, reportProgress) {
if (observe === void 0) { observe = 'body'; }
if (reportProgress === void 0) { reportProgress = false; }
if (allowedAttributeValuesCreateRequest === null || allowedAttributeValuesCreateRequest === undefined) {
throw new Error('Required parameter allowedAttributeValuesCreateRequest was null or undefined when calling allowedAttributeValueCreateAllowedAttributeValues.');
}
var headers = this.defaultHeaders;
// authentication (basicAuth) required
if (this.configuration.username || this.configuration.password) {
headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
}
// authentication (oauthAuth) required
if (this.configuration.accessToken) {
var accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
var httpHeaderAccepts = [
'application/json',
'application/xml'
];
var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
var consumes = [
'application/json',
'application/xml'
];
var httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.post(this.configuration.basePath + "/allowedAttributeValues", allowedAttributeValuesCreateRequest, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
};
AllowedAttributeValueService.prototype.allowedAttributeValueDeleteAllowedAttributeValues = function (allowedAttributeValuesDeleteRequest, observe, reportProgress) {
if (observe === void 0) { observe = 'body'; }
if (reportProgress === void 0) { reportProgress = false; }
if (allowedAttributeValuesDeleteRequest === null || allowedAttributeValuesDeleteRequest === undefined) {
throw new Error('Required parameter allowedAttributeValuesDeleteRequest was null or undefined when calling allowedAttributeValueDeleteAllowedAttributeValues.');
}
var headers = this.defaultHeaders;
// authentication (basicAuth) required
if (this.configuration.username || this.configuration.password) {
headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
}
// authentication (oauthAuth) required
if (this.configuration.accessToken) {
var accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
var httpHeaderAccepts = [
'application/json',
'application/xml'
];
var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
var consumes = [
'application/json',
'application/xml'
];
var httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.delete(this.configuration.basePath + "/allowedAttributeValues", {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
};
AllowedAttributeValueService.prototype.allowedAttributeValueGetAllowedAttributeValues = function (namespace, attributeValueListName, observe, reportProgress) {
if (observe === void 0) { observe = 'body'; }
if (reportProgress === void 0) { reportProgress = false; }
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling allowedAttributeValueGetAllowedAttributeValues.');
}
if (attributeValueListName === null || attributeValueListName === undefined) {
throw new Error('Required parameter attributeValueListName was null or undefined when calling allowedAttributeValueGetAllowedAttributeValues.');
}
var headers = this.defaultHeaders;
// authentication (basicAuth) required
if (this.configuration.username || this.configuration.password) {
headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
}
// authentication (oauthAuth) required
if (this.configuration.accessToken) {
var accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
var httpHeaderAccepts = [
'application/json',
'application/xml'
];
var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
return this.httpClient.get(this.configuration.basePath + "/allowedAttributeValues/namespaces/" + encodeURIComponent(String(namespace)) + "/attributeValueListNames/" + encodeURIComponent(String(attributeValueListName)), {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
};
AllowedAttributeValueService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AllowedAttributeValueService_Factory() { return new AllowedAttributeValueService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(BASE_PATH, 8), i0.ɵɵinject(Configuration, 8)); }, token: AllowedAttributeValueService, providedIn: "root" });
AllowedAttributeValueService = tslib.__decorate([
i0.Injectable({
providedIn: 'root'
}),
tslib.__param(1, i0.Optional()), tslib.__param(1, i0.Inject(BASE_PATH)), tslib.__param(2, i0.Optional()),
tslib.__metadata("design:paramtypes", [i1.HttpClient, String, Configuration])
], AllowedAttributeValueService);
return AllowedAttributeValueService;
}());
var ApplicationService = /** @class */ (function () {
function ApplicationService(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'http://localhost/herd-app/rest';
this.defaultHeaders = new i1.HttpHeaders();
this.configuration = new Configuration();
if (configuration) {
this.configuration = configuration;
this.configuration.basePath = configuration.basePath || basePath || this.basePath;
}
else {
this.configuration.basePath = basePath || this.basePath;
}
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
ApplicationService.prototype.canConsumeForm = function (consumes) {
var form = 'multipart/form-data';
for (var _i = 0, consumes_1 = consumes; _i < consumes_1.length; _i++) {
var consume = consumes_1[_i];
if (form === consume) {
return true;
}
}
return false;
};
ApplicationService.prototype.applicationGetBuildInfo = function (observe, reportProgress) {
if (observe === void 0) { observe = 'body'; }
if (reportProgress === void 0) { reportProgress = false; }
var headers = this.defaultHeaders;
// authentication (basicAuth) required
if (this.configuration.username || this.configuration.password) {
headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
}
// authentication (oauthAuth) required
if (this.configuration.accessToken) {
var accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
var httpHeaderAccepts = [
'application/json',
'application/xml'
];
var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
return this.httpClient.get(this.configuration.basePath + "/buildInfo", {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
};
ApplicationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ApplicationService_Factory() { return new ApplicationService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(BASE_PATH, 8), i0.ɵɵinject(Configuration, 8)); }, token: ApplicationService, providedIn: "root" });
ApplicationService = tslib.__decorate([
i0.Injectable({
providedIn: 'root'
}),
tslib.__param(1, i0.Optional()), tslib.__param(1, i0.Inject(BASE_PATH)), tslib.__param(2, i0.Optional()),
tslib.__metadata("design:paramtypes", [i1.HttpClient, String, Configuration])
], ApplicationService);
return ApplicationService;
}());
var AttributeValueListService = /** @class */ (function () {
function AttributeValueListService(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'http://localhost/herd-app/rest';
this.defaultHeaders = new i1.HttpHeaders();
this.configuration = new Configuration();
if (configuration) {
this.configuration = configuration;
this.configuration.basePath = configuration.basePath || basePath || this.basePath;
}
else {
this.configuration.basePath = basePath || this.basePath;
}
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
AttributeValueListService.prototype.canConsumeForm = function (consumes) {
var form = 'multipart/form-data';
for (var _i = 0, consumes_1 = consumes; _i < consumes_1.length; _i++) {
var consume = consumes_1[_i];
if (form === consume) {
return true;
}
}
return false;
};
AttributeValueListService.prototype.attributeValueListCreateAttributeValueList = function (attributeValueListCreateRequest, observe, reportProgress) {
if (observe === void 0) { observe = 'body'; }
if (reportProgress === void 0) { reportProgress = false; }
if (attributeValueListCreateRequest === null || attributeValueListCreateRequest === undefined) {
throw new Error('Required parameter attributeValueListCreateRequest was null or undefined when calling attributeValueListCreateAttributeValueList.');
}
var headers = this.defaultHeaders;
// authentication (basicAuth) required
if (this.configuration.username || this.configuration.password) {
headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
}
// authentication (oauthAuth) required
if (this.configuration.accessToken) {
var accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
var httpHeaderAccepts = [
'application/json',
'application/xml'
];
var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
var consumes = [
'application/json',
'application/xml'
];
var httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.post(this.configuration.basePath + "/attributeValueLists", attributeValueListCreateRequest, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
};
AttributeValueListService.prototype.attributeValueListDeleteAttributeValueList = function (namespace, attributeValueListName, observe, reportProgress) {
if (observe === void 0) { observe = 'body'; }
if (reportProgress === void 0) { reportProgress = false; }
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling attributeValueListDeleteAttributeValueList.');
}
if (attributeValueListName === null || attributeValueListName === undefined) {
throw new Error('Required parameter attributeValueListName was null or undefined when calling attributeValueListDeleteAttributeValueList.');
}
var headers = this.defaultHeaders;
// authentication (basicAuth) required
if (this.configuration.username || this.configuration.password) {
headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
}
// authentication (oauthAuth) required
if (this.configuration.accessToken) {
var accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
var httpHeaderAccepts = [
'application/json',
'application/xml'
];
var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
return this.httpClient.delete(this.configuration.basePath + "/attributeValueLists/namespaces/" + encodeURIComponent(String(namespace)) + "/attributeValueListNames/" + encodeURIComponent(String(attributeValueListName)), {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
};
AttributeValueListService.prototype.attributeValueListGetAttributeValueList = function (namespace, attributeValueListName, observe, reportProgress) {
if (observe === void 0) { observe = 'body'; }
if (reportProgress === void 0) { reportProgress = false; }
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling attributeValueListGetAttributeValueList.');
}
if (attributeValueListName === null || attributeValueListName === undefined) {
throw new Error('Required parameter attributeValueListName was null or undefined when calling attributeValueListGetAttributeValueList.');
}
var headers = this.defaultHeaders;
// authentication (basicAuth) required
if (this.configuration.username || this.configuration.password) {
headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
}
// authentication (oauthAuth) required
if (this.configuration.accessToken) {
var accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
var httpHeaderAccepts = [
'application/json',
'application/xml'
];
var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
return this.httpClient.get(this.configuration.basePath + "/attributeValueLists/namespaces/" + encodeURIComponent(String(namespace)) + "/attributeValueListNames/" + encodeURIComponent(String(attributeValueListName)), {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
};
AttributeValueListService.prototype.attributeValueListGetAttributeValueLists = function (observe, reportProgress) {
if (observe === void 0) { observe = 'body'; }
if (reportProgress === void 0) { reportProgress = false; }
var headers = this.defaultHeaders;
// authentication (basicAuth) required
if (this.configuration.username || this.configuration.password) {
headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
}
// authentication (oauthAuth) required
if (this.configuration.accessToken) {
var accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
var httpHeaderAccepts = [
'application/json',
'application/xml'
];
var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
return this.httpClient.get(this.configuration.basePath + "/attributeValueLists", {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
};
AttributeValueListService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AttributeValueListService_Factory() { return new AttributeValueListService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(BASE_PATH, 8), i0.ɵɵinject(Configuration, 8)); }, token: AttributeValueListService, providedIn: "root" });
AttributeValueListService = tslib.__decorate([
i0.Injectable({
providedIn: 'root'
}),
tslib.__param(1, i0.Optional()), tslib.__param(1, i0.Inject(BASE_PATH)), tslib.__param(2, i0.Optional()),
tslib.__metadata("design:paramtypes", [i1.HttpClient, String, Configuration])
], AttributeValueListService);
return AttributeValueListService;
}());
var AvailabilityDayService = /** @class */ (function () {
function AvailabilityDayService(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'http://localhost/herd-app/rest';
this.defaultHeaders = new i1.HttpHeaders();
this.configuration = new Configuration();
if (configuration) {
this.configuration = configuration;
this.configuration.basePath = configuration.basePath || basePath || this.basePath;
}
else {
this.configuration.basePath = basePath || this.basePath;
}
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
AvailabilityDayService.prototype.canConsumeForm = function (consumes) {
var form = 'multipart/form-data';
for (var _i = 0, consumes_1 = consumes; _i < consumes_1.length; _i++) {
var consume = consumes_1[_i];
if (form === consume) {
return true;
}
}
return false;
};
AvailabilityDayService.prototype.availabilityDayGetAvailabilityDays = function (observe, reportProgress) {
if (observe === void 0) { observe = 'body'; }
if (reportProgress === void 0) { reportProgress = false; }
var headers = this.defaultHeaders;
// authentication (basicAuth) required
if (this.configuration.username || this.configuration.password) {
headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
}
// authentication (oauthAuth) required
if (this.configuration.accessToken) {
var accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
var httpHeaderAccepts = [
'application/json',
'application/xml'
];
var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
return this.httpClient.get(this.configuration.basePath + "/availabilityDays", {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
};
AvailabilityDayService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AvailabilityDayService_Factory() { return new AvailabilityDayService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(BASE_PATH, 8), i0.ɵɵinject(Configuration, 8)); }, token: AvailabilityDayService, providedIn: "root" });
AvailabilityDayService = tslib.__decorate([
i0.Injectable({
providedIn: 'root'
}),
tslib.__param(1, i0.Optional()), tslib.__param(1, i0.Inject(BASE_PATH)), tslib.__param(2, i0.Optional()),
tslib.__metadata("design:paramtypes", [i1.HttpClient, String, Configuration])
], AvailabilityDayService);
return AvailabilityDayService;
}());
/**
* CustomHttpUrlEncodingCodec
* Fix plus sign (+) not encoding, so sent as blank space
* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
*/
var CustomHttpUrlEncodingCodec = /** @class */ (function (_super) {
tslib.__extends(CustomHttpUrlEncodingCodec, _super);
function CustomHttpUrlEncodingCodec() {
return _super !== null && _super.apply(this, arguments) || this;
}
CustomHttpUrlEncodingCodec.prototype.encodeKey = function (k) {
k = _super.prototype.encodeKey.call(this, k);
return k.replace(/\+/gi, '%2B');
};
CustomHttpUrlEncodingCodec.prototype.encodeValue = function (v) {
v = _super.prototype.encodeValue.call(this, v);
return v.replace(/\+/gi, '%2B');
};
return CustomHttpUrlEncodingCodec;
}(i1.HttpUrlEncodingCodec));
var BusinessObjectDataService = /** @class */ (function () {
function BusinessObjectDataService(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'http://localhost/herd-app/rest';
this.defaultHeaders = new i1.HttpHeaders();
this.configuration = new Configuration();
if (configuration) {
this.configuration = configuration;
this.configuration.basePath = configuration.basePath || basePath || this.basePath;
}
else {
this.configuration.basePath = basePath || this.basePath;
}
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
BusinessObjectDataService.prototype.canConsumeForm = function (consumes) {
var form = 'multipart/form-data';
for (var _i = 0, consumes_1 = consumes; _i < consumes_1.length; _i++) {
var consume = consumes_1[_i];
if (form === consume) {
return true;
}
}
return false;
};
BusinessObjectDataService.prototype.businessObjectDataCheckBusinessObjectDataAvailability = function (businessObjectDataAvailabilityRequest, observe, reportProgress) {
if (observe === void 0) { observe = 'body'; }
if (reportProgress === void 0) { reportProgress = false; }
if (businessObjectDataAvailabilityRequest === null || businessObjectDataAvailabilityRequest === undefined) {
throw new Error('Required parameter businessObjectDataAvailabilityRequest was null or undefined when calling businessObjectDataCheckBusinessObjectDataAvailability.');
}
var headers = this.defaultHeaders;
// authentication (basicAuth) required
if (this.configuration.username || this.configuration.password) {
headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
}
// authentication (oauthAuth) required
if (this.configuration.accessToken) {
var accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
var httpHeaderAccepts = [
'application/json',
'application/xml'
];
var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
var consumes = [
'application/json',
'application/xml'
];
var httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.post(this.configuration.basePath + "/businessObjectData/availability", businessObjectDataAvailabilityRequest, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
};
BusinessObjectDataService.prototype.businessObjectDataCheckBusinessObjectDataAvailabilityCollection = function (businessObjectDataAvailabilityCollectionRequest, observe, reportProgress) {
if (observe === void 0) { observe = 'body'; }
if (reportProgress === void 0) { reportProgress = false; }
if (businessObjectDataAvailabilityCollectionRequest === null || businessObjectDataAvailabilityCollectionRequest === undefined) {
throw new Error('Required parameter businessObjectDataAvailabilityCollectionRequest was null or undefined when calling businessObjectDataCheckBusinessObjectDataAvailabilityCollection.');
}
var headers = this.defaultHeaders;
// authentication (basicAuth) required
if (this.configuration.username || this.configuration.password) {
headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
}
// authentication (oauthAuth) required
if (this.configuration.accessToken) {
var accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
var httpHeaderAccepts = [
'application/json',
'application/xml'
];
var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
var consumes = [
'application/json',
'application/xml'
];
var httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.post(this.configuration.basePath + "/businessObjectData/availabilityCollection", businessObjectDataAvailabilityCollectionRequest, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
};
BusinessObjectDataService.prototype.businessObjectDataCreateBusinessObjectData = function (businessObjectDataCreateRequest, observe, reportProgress) {
if (observe === void 0) { observe = 'body'; }
if (reportProgress === void 0) { reportProgress = false; }
if (businessObjectDataCreateRequest === null || businessObjectDataCreateRequest === undefined) {
throw new Error('Required parameter businessObjectDataCreateRequest was null or undefined when calling businessObjectDataCreateBusinessObjectData.');
}
var headers = this.defaultHeaders;
// authentication (basicAuth) required
if (this.configuration.username || this.configuration.password) {
headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
}
// authentication (oauthAuth) required
if (this.configuration.accessToken) {
var accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
var httpHeaderAccepts = [
'application/json',
'application/xml'
];
var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
var consumes = [
'application/json',
'application/xml'
];
var httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.post(this.configuration.basePath + "/businessObjectData", businessObjectDataCreateRequest, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
};
BusinessObjectDataService.prototype.businessObjectDataDeleteBusinessObjectData = function (namespace, businessObjectDefinitionName, businessObjectFormatUsage, businessObjectFormatFileType, businessObjectFormatVersion, partitionValue, businessObjectDataVersion, deleteFiles, observe, reportProgress) {
if (observe === void 0) { observe = 'body'; }
if (reportProgress === void 0) { reportProgress = false; }
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling businessObjectDataDeleteBusinessObjectData.');
}
if (businessObjectDefinitionName === null || businessObjectDefinitionName === undefined) {
throw new Error('Required parameter businessObjectDefinitionName was null or undefined when calling businessObjectDataDeleteBusinessObjectData.');
}
if (businessObjectFormatUsage === null || businessObjectFormatUsage === undefined) {
throw new Error('Required parameter businessObjectFormatUsage was null or undefined when calling businessObjectDataDeleteBusinessObjectData.');
}
if (businessObjectFormatFileType === null || businessObjectFormatFileType === undefined) {
throw new Error('Required parameter businessObjectFormatFileType was null or undefined when calling businessObjectDataDeleteBusinessObjectData.');
}
if (businessObjectFormatVersion === null || businessObjectFormatVersion === undefined) {
throw new Error('Required parameter businessObjectFormatVersion was null or undefined when calling businessObjectDataDeleteBusinessObjectData.');
}
if (partitionValue === null || partitionValue === undefined) {
throw new Error('Required parameter partitionValue was null or undefined when calling businessObjectDataDeleteBusinessObjectData.');
}
if (businessObjectDataVersion === null || businessObjectDataVersion === undefined) {
throw new Error('Required parameter businessObjectDataVersion was null or undefined when calling businessObjectDataDeleteBusinessObjectData.');
}
var queryParameters = new i1.HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
if (deleteFiles !== undefined && deleteFiles !== null) {
queryParameters = queryParameters.set('deleteFiles', deleteFiles);
}
var headers = this.defaultHeaders;
// authentication (basicAuth) required
if (this.configuration.username || this.configuration.password) {
headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
}
// authentication (oauthAuth) required
if (this.configuration.accessToken) {
var accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
var httpHeaderAccepts = [
'application/json',
'application/xml'
];
var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
return this.httpClient.delete(this.configuration.basePath + "/businessObjectData/namespaces/" + encodeURIComponent(String(namespace)) + "/businessObjectDefinitionNames/" + encodeURIComponent(String(businessObjectDefinitionName)) + "/businessObjectFormatUsages/" + encodeURIComponent(String(businessObjectFormatUsage)) + "/businessObjectFormatFileTypes/" + encodeURIComponent(String(businessObjectFormatFileType)) + "/businessObjectFormatVersions/" + encodeURIComponent(String(businessObjectFormatVersion)) + "/partitionValues/" + encodeURIComponent(String(partitionValue)) + "/businessObjectDataVersions/" + encodeURIComponent(String(businessObjectDataVersion)), {
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
};
BusinessObjectDataService.prototype.businessObjectDataDeleteBusinessObjectData1 = function (namespace, businessObjectDefinitionName, businessObjectFormatUsage, businessObjectFormatFileType, businessObjectFormatVersion, partitionValue, subPartition1Value, businessObjectDataVersion, deleteFiles, observe, reportProgress) {
if (observe === void 0) { observe = 'body'; }
if (reportProgress === void 0) { reportProgress = false; }
if (namespace === null || namespace === undefined) {
throw new Error('Required parameter namespace was null or undefined when calling businessObjectDataDeleteBusinessObjectData1.');
}
if (businessObjectDefinitionName === null || businessObjectDefinitionName === undefined) {
throw new Error('Required parameter businessObjectDefinitionName was null or undefined when calling businessObjectDataDeleteBusinessObjectData1.');
}
if (businessObjectFormatUsage === null || businessObjectFormatUsage === undefined) {
throw new Error('Required parameter businessObjectFormatUsage was null or undefined when calling businessObjectDataDeleteBusinessObjectData1.');
}
if (businessObjectFormatFileType === null || businessObjectFormatFileType === undefined) {
throw new Error('Required parameter businessObjectFormatFileType was null or undefined when calling businessObjectDataDeleteBusinessObjectData1.');
}
if (businessObjectFormatVersion === null || businessObjectFormatVersion === undefined) {
throw new Error('Required parameter businessObjectFormatVersion was null or undefined when calling businessObjectDataDeleteBusinessObjectData1.');
}
if (partitionValue === null || partitionValue === undefined) {
throw new Error('Required parameter partitionValue was null or undefined when calling businessObjectDataDeleteBusinessObjectData1.');
}
if (subPartition1Value === null || subPartition1Value === undefined) {
throw new Error('Required parameter subPartition1Value was null or undefined when calling businessObjectDataDeleteBusinessObjectData1.');
}
if (businessObjectDataVersion === null || businessObjectDataVersion === undefined) {
throw new Error('Required parameter businessObjectDataVersion was null or undefined when calling businessObjectDataDeleteBusinessObjectData1.');
}
var queryParameters = new i1.HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
if (deleteFiles !== undefined && deleteFiles !== null) {
queryParameters = queryParameters.set('deleteFiles', deleteFiles);
}
var headers = this.defaultHeaders;
// authentication (basicAuth) required
if (this.configuration.username || this.configuration.password) {
headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
}
// authentication (oauthAuth) required
if (this.configuration.accessToken) {
var accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
var httpHeaderAccepts = [
'application/json',
'application/xml'
];
var httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
return this.httpClient.delete(this.configuration.basePath + "/businessObjectData/namespaces/" + encodeURIComponent(String(namespace)) + "/businessObjectDefinitionNames/" + encodeURIComponent(String(businessObjectDefinitionName)) + "/businessObjectFormatUsages/" + encodeURIComponent(String(businessObjectFormatUsage)) + "/businessObjectFormatFileTypes/" + encodeURIComponent(String(businessObjectFormatFileType)) + "/businessObjectFormatVersions/" + encodeURIComponent(String(businessObjectFormatVersion)) + "/partitionValues/" + encodeURIComponent(String(partiti