UNPKG

alfresco-js-api

Version:

JavaScript client library for the Alfresco REST API

1,379 lines (1,137 loc) 1.64 MB
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["AlfrescoApi"] = factory(); else root["AlfrescoApi"] = factory(); })(window, function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 547); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } var Emitter = __webpack_require__(15); var ApiClient = __webpack_require__(1); var superagent = __webpack_require__(392); var Storage = __webpack_require__(308); var AlfrescoApiClient = function (_ApiClient) { _inherits(AlfrescoApiClient, _ApiClient); function AlfrescoApiClient(host) { _classCallCheck(this, AlfrescoApiClient); var _this2 = _possibleConstructorReturn(this, _ApiClient.call(this)); _this2.storage = new Storage(); _this2.host = host; Emitter.call(_this2); return _this2; } AlfrescoApiClient.prototype.callApi = function callApi(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType, contextRoot, responseType) { var url; if (contextRoot) { var basePath = this.host + '/' + contextRoot; url = this.buildUrlCustomBasePath(basePath, path, pathParams); } else { url = this.buildUrl(path, pathParams); } return this.callHostApi(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType, contextRoot, responseType, url); }; AlfrescoApiClient.prototype.callCustomApi = function callCustomApi(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType, contextRoot, responseType) { var url = this.buildUrlCustomBasePath(path, '', pathParams); return this.callHostApi(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType, contextRoot, responseType, url); }; AlfrescoApiClient.prototype.callHostApi = function callHostApi(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType, contextRoot, responseType, url) { var _this3 = this; var eventEmitter = {}; Emitter(eventEmitter); var request = this.buildRequest(httpMethod, url, queryParams, headerParams, formParams, bodyParam, contentTypes, accepts, responseType, eventEmitter, returnType); if (returnType === 'Binary') { request = request.buffer(true).parse(superagent.parse['application/octet-stream']); } this.promise = new Promise(function (resolve, reject) { request.end(function (error, response) { if (error) { _this3.emit('error', error); eventEmitter.emit('error', error); if (error.status === 401) { _this3.emit('unauthorized'); eventEmitter.emit('unauthorized'); } if (response && response.text) { error = error || {}; reject(Object.assign(error, { message: response.text })); } else { reject({ error: error }); } } else { if (_this3.isBpmRequest()) { if (response.header && response.header.hasOwnProperty('set-cookie')) { _this3.authentications.cookie = response.header['set-cookie']; } } var data = {}; if (response.type === 'text/html') { data = _this3.deserialize(response, 'String'); } else { data = _this3.deserialize(response, returnType); } eventEmitter.emit('success', data); resolve(data); } }).on('abort', function () { eventEmitter.emit('abort'); }); }); this.promise.on = function () { eventEmitter.on.apply(eventEmitter, arguments); return this; }; this.promise.once = function () { eventEmitter.once.apply(eventEmitter, arguments); return this; }; this.promise.emit = function () { eventEmitter.emit.apply(eventEmitter, arguments); return this; }; this.promise.off = function () { eventEmitter.off.apply(eventEmitter, arguments); return this; }; this.promise.abort = function () { request.abort(); return this; }; return this.promise; }; AlfrescoApiClient.prototype.isBpmRequest = function isBpmRequest() { return this.className === 'BpmAuth' || this.className === 'BpmClient'; }; AlfrescoApiClient.prototype.isCsrfEnabled = function isCsrfEnabled() { if (this.config) { return !this.config.disableCsrf; } else { return true; } }; AlfrescoApiClient.prototype.setCsrfToken = function setCsrfToken(request) { var token = this.token(); request.set('X-CSRF-TOKEN', token); if (this.isNodeEnv()) { request.set('Cookie', 'CSRF-TOKEN=' + token + ';path=/'); } try { document.cookie = 'CSRF-TOKEN=' + token + ';path=/'; } catch (err) {} }; AlfrescoApiClient.prototype.isWithCredentials = function isWithCredentials() { if (this.config) { return this.config.withCredentials; } else { return false; } }; AlfrescoApiClient.prototype.isNodeEnv = function isNodeEnv() { return typeof process !== 'undefined' && process.release && process.release.name === 'node'; }; AlfrescoApiClient.prototype.token = function token(a) { return a ? (a ^ Math.random() * 16 >> a / 4).toString(16) : ([1e16] + 1e16).replace(/[01]/g, this.token); }; AlfrescoApiClient.prototype.progress = function progress(event, eventEmitter) { if (event.lengthComputable && this.promise) { var percent = Math.round(event.loaded / event.total * 100); eventEmitter.emit('progress', { total: event.total, loaded: event.loaded, percent: percent }); } }; AlfrescoApiClient.prototype.buildUrlCustomBasePath = function buildUrlCustomBasePath(basePath, path, pathParams) { if (!path.match(/^\//)) { path = '/' + path; } var url = basePath + path; var _this = this; url = url.replace(/\{([\w-]+)\}/g, function (fullMatch, key) { var value; if (pathParams.hasOwnProperty(key)) { value = _this.paramToString(pathParams[key]); } else { value = fullMatch; } return encodeURIComponent(value); }); return url; }; AlfrescoApiClient.prototype.buildRequest = function buildRequest(httpMethod, url, queryParams, headerParams, formParams, bodyParam, contentTypes, accepts, responseType, eventEmitter, returnType) { var _this4 = this; var request = superagent(httpMethod, url); this.applyAuthToRequest(request, ['basicAuth']); request.query(this.normalizeParams(queryParams)); request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); if (this.isBpmRequest() && this.isCsrfEnabled()) { this.setCsrfToken(request); } if (this.isWithCredentials()) { request.withCredentials(); } if (this.isBpmRequest()) { request._withCredentials = true; if (this.authentications.cookie) { if (this.isNodeEnv()) { request.set('Cookie', this.authentications.cookie); } } } request.timeout(this.timeout); var contentType = this.jsonPreferredMime(contentTypes); if (contentType && contentType !== 'multipart/form-data') { request.type(contentType); } else if (!request.header['Content-Type'] && contentType !== 'multipart/form-data') { request.type('application/json'); } if (contentType === 'application/x-www-form-urlencoded') { request.send(this.normalizeParams(formParams)).on('progress', function (event) { _this4.progress(event, eventEmitter); }); } else if (contentType === 'multipart/form-data') { var _formParams = this.normalizeParams(formParams); for (var key in _formParams) { if (_formParams.hasOwnProperty(key)) { if (this.isFileParam(_formParams[key])) { request.attach(key, _formParams[key]).on('progress', function (event) { // jshint ignore:line _this4.progress(event, eventEmitter); }); } else { request.field(key, _formParams[key]).on('progress', function (event) { // jshint ignore:line _this4.progress(event, eventEmitter); }); } } } } else if (bodyParam) { request.send(bodyParam).on('progress', function (event) { _this4.progress(event, eventEmitter); }); } var accept = this.jsonPreferredMime(accepts); if (accept) { request.accept(accept); } if (returnType === 'Blob' || responseType === 'blob' || responseType === 'Blob') { request.responseType('blob'); } else if (returnType === 'String') { request.responseType('string'); } return request; }; return AlfrescoApiClient; }(ApiClient); Emitter(AlfrescoApiClient.prototype); module.exports = AlfrescoApiClient; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(502))) /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(Buffer) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; (function (root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(392)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} })(undefined, function (superagent) { 'use strict'; var exports = function exports() { this.basePath = 'https://localhost/alfresco/api/-default-/public/alfresco/versions/1'.replace(/\/+$/, ''); this.authentications = { 'basicAuth': { type: 'basic' } }; this.defaultHeaders = {}; this.timeout = undefined; }; exports.prototype.paramToString = function (param) { if (param == undefined || param == null) { return ''; } if (param instanceof Date) { return param.toJSON(); } return param.toString(); }; exports.prototype.buildUrl = function (path, pathParams) { if (!path.match(/^\//)) { path = '/' + path; } var url = this.basePath + path; var _this = this; url = url.replace(/\{([\w-]+)\}/g, function (fullMatch, key) { var value; if (pathParams.hasOwnProperty(key)) { value = _this.paramToString(pathParams[key]); } else { value = fullMatch; } return encodeURIComponent(value); }); return url; }; exports.prototype.isJsonMime = function (contentType) { return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i)); }; exports.prototype.jsonPreferredMime = function (contentTypes) { for (var i = 0; i < contentTypes.length; i++) { if (this.isJsonMime(contentTypes[i])) { return contentTypes[i]; } } return contentTypes[0]; }; exports.prototype.isFileParam = function (param) { if (_typeof(__webpack_require__(123).ReadStream)) { if (typeof window === 'undefined' && "function" === 'function' && __webpack_require__(123) && param instanceof __webpack_require__(123).ReadStream) { return true; } } if (typeof Buffer === 'function' && param instanceof Buffer) { return true; } if (typeof Blob === 'function' && param instanceof Blob) { return true; } if (typeof File === 'function' && param instanceof File) { return true; } if ((typeof File === 'undefined' ? 'undefined' : _typeof(File)) === 'object' && param instanceof File) { return true; } return false; }; exports.prototype.normalizeParams = function (params) { var newParams = {}; for (var key in params) { if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) { var value = params[key]; if (this.isFileParam(value) || Array.isArray(value)) { newParams[key] = value; } else { newParams[key] = this.paramToString(value); } } } return newParams; }; exports.CollectionFormatEnum = { CSV: ',', SSV: ' ', TSV: '\t', PIPES: '|', MULTI: 'multi' }; exports.prototype.buildCollectionParam = function buildCollectionParam(param, collectionFormat) { if (param == null) { return null; } switch (collectionFormat) { case 'csv': return param.map(this.paramToString).join(','); case 'ssv': return param.map(this.paramToString).join(' '); case 'tsv': return param.map(this.paramToString).join('\t'); case 'pipes': return param.map(this.paramToString).join('|'); case 'multi': return param.map(this.paramToString); default: throw new Error('Unknown collection format: ' + collectionFormat); } }; exports.prototype.applyAuthToRequest = function (request, authNames) { var _this = this; authNames.forEach(function (authName) { var auth = _this.authentications[authName]; switch (auth.type) { case 'basic': if (auth.username || auth.password) { request.auth(auth.username ? encodeURI(auth.username) : '', auth.password ? encodeURI(auth.password) : ''); } break; case 'apiKey': if (auth.apiKey) { var data = {}; if (auth.apiKeyPrefix) { data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey; } else { data[auth.name] = auth.apiKey; } if (auth['in'] === 'header') { request.set(data); } else { request.query(data); } } break; case 'activiti': if (auth.ticket) { request.set({ 'Authorization': auth.ticket }); } break; case 'oauth2': if (auth.accessToken) { request.set({ 'Authorization': 'Bearer ' + auth.accessToken }); } break; default: throw new Error('Unknown authentication type: ' + auth.type); } }); }; exports.prototype.deserialize = function deserialize(response, returnType) { if (response == null || returnType == null) { return null; } var data = response.body; if (data == null) { data = response.text; } return exports.convertToType(data, returnType); }; exports.prototype.callApi = function callApi(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType) { var _this = this; var url = this.buildUrl(path, pathParams); var request = superagent(httpMethod, url); this.applyAuthToRequest(request, authNames); request.query(this.normalizeParams(queryParams)); request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); request.timeout(this.timeout); var contentType = this.jsonPreferredMime(contentTypes); if (contentType) { request.type(contentType); } else if (!request.header['Content-Type']) { request.type('application/json'); } if (contentType === 'application/x-www-form-urlencoded') { request.send(this.normalizeParams(formParams)); } else if (contentType == 'multipart/form-data') { var _formParams = this.normalizeParams(formParams); for (var key in _formParams) { if (_formParams.hasOwnProperty(key)) { if (this.isFileParam(_formParams[key])) { request.attach(key, _formParams[key]); } else { request.field(key, _formParams[key]); } } } } else if (bodyParam) { request.send(bodyParam); } var accept = this.jsonPreferredMime(accepts); if (accept) { request.accept(accept); } return new Promise(function (resolve, reject) { request.end(function (error, response) { if (error) { if (response && response.text) { reject({ error: error, message: response.text }); } else { reject({ error: error }); } } else { var data = _this.deserialize(response, returnType); resolve(data); } }); }); }; exports.parseDate = function (str) { var dateLength = 10; var separatorPos = str.substring(dateLength).search(/[\+\-]/) + dateLength; var dateStr = separatorPos > dateLength ? str.substring(0, separatorPos) : str; var tzStr = separatorPos > dateLength ? str.substring(separatorPos) : ''; var parsedDate = exports.parseDateTime(dateStr); var tzOffsetMins = exports.parseDateTimeZone(tzStr); parsedDate.setTime(parsedDate.getTime() + tzOffsetMins * 60000); return parsedDate; }; exports.parseDateTime = function (str) { var parts = str.split('+'); var dateParts = str.split(/[^0-9]/).map(function (s) { return parseInt(s, 10); }); return new Date(Date.UTC(dateParts[0], dateParts[1] - 1 || 0, dateParts[2] || 1, dateParts[3] || 0, dateParts[4] || 0, dateParts[5] || 0, dateParts[6] || 0)); }; exports.parseDateTimeZone = function (str) { var match = /([\+\-])(\d{2}):?(\d{2})?/.exec(str); if (match !== null) { return parseInt(match[1] + '1') * -1 * (parseInt(match[2]) * 60) + parseInt(match[3] || 0); } else { return 0; } }; exports.convertToType = function (data, type) { switch (type) { case 'Binary': return data; case 'Boolean': return Boolean(data); case 'Integer': return parseInt(data, 10); case 'Number': return parseFloat(data); case 'String': return data !== null && data !== undefined ? String(data) : data; case 'Date': return data ? this.parseDate(String(data)) : null; default: if (type === Object) { return data; } else if (typeof type === 'function') { return type.constructFromObject(data); } else if (Array.isArray(type)) { var itemType = type[0]; if (data) { return data.map(function (item) { return exports.convertToType(item, itemType); }); } else { return null; } } else if ((typeof type === 'undefined' ? 'undefined' : _typeof(type)) === 'object') { var keyType, valueType; for (var k in type) { if (type.hasOwnProperty(k)) { keyType = k; valueType = type[k]; break; } } var result = {}; for (var k in data) { if (data.hasOwnProperty(k)) { var key = exports.convertToType(k, keyType); var rawValue = data[k]; var value = (typeof rawValue === 'undefined' ? 'undefined' : _typeof(rawValue)) === 'object' ? rawValue : exports.convertToType(rawValue, valueType); result[key] = value; } } return result; } else { return data; } } }; exports.instance = new exports(); return exports; }); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(124).Buffer)) /***/ }), /* 2 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; (function (root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0), __webpack_require__(162)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} })(undefined, function (ApiClient, AbstractRepresentation) { 'use strict'; var exports = function exports() { var _this = this; }; exports.constructFromObject = function (data, obj) { if (data) { obj = data || new exports(); if (data.hasOwnProperty('data')) { obj['data'] = ApiClient.convertToType(data['data'], 'object'); } if (data.hasOwnProperty('size')) { obj['size'] = ApiClient.convertToType(data['size'], 'Integer'); } if (data.hasOwnProperty('start')) { obj['start'] = ApiClient.convertToType(data['start'], 'Integer'); } if (data.hasOwnProperty('total')) { obj['total'] = ApiClient.convertToType(data['total'], 'Integer'); } } return obj; }; exports.prototype['data'] = undefined; exports.prototype['size'] = undefined; exports.prototype['start'] = undefined; exports.prototype['total'] = undefined; return exports; }); /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; (function (root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} })(undefined, function (ApiClient) { 'use strict'; var exports = function exports(count, hasMoreItems, skipCount, maxItems) { this['count'] = count; this['hasMoreItems'] = hasMoreItems; this['skipCount'] = skipCount; this['maxItems'] = maxItems; }; exports.constructFromObject = function (data, obj) { if (data) { obj = data || new exports(); if (data.hasOwnProperty('count')) { obj['count'] = ApiClient.convertToType(data['count'], 'Integer'); } if (data.hasOwnProperty('hasMoreItems')) { obj['hasMoreItems'] = ApiClient.convertToType(data['hasMoreItems'], 'Boolean'); } if (data.hasOwnProperty('totalItems')) { obj['totalItems'] = ApiClient.convertToType(data['totalItems'], 'Integer'); } if (data.hasOwnProperty('skipCount')) { obj['skipCount'] = ApiClient.convertToType(data['skipCount'], 'Integer'); } if (data.hasOwnProperty('maxItems')) { obj['maxItems'] = ApiClient.convertToType(data['maxItems'], 'Integer'); } } return obj; }; exports.prototype['count'] = undefined; exports.prototype['hasMoreItems'] = undefined; exports.prototype['totalItems'] = undefined; exports.prototype['skipCount'] = undefined; exports.prototype['maxItems'] = undefined; return exports; }); /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; (function (root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} })(undefined, function (ApiClient) { 'use strict'; var exports = function exports(displayName, id) { var _this = this; _this['displayName'] = displayName; _this['id'] = id; }; exports.constructFromObject = function (data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('displayName')) { obj['displayName'] = ApiClient.convertToType(data['displayName'], 'String'); } if (data.hasOwnProperty('id')) { obj['id'] = ApiClient.convertToType(data['id'], 'String'); } } return obj; }; exports.prototype['displayName'] = undefined; exports.prototype['id'] = undefined; return exports; }); /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; (function (root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1), __webpack_require__(388)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} })(undefined, function (ApiClient, ErrorError) { 'use strict'; var exports = function exports() {}; exports.constructFromObject = function (data, obj) { if (data) { obj = data || new exports(); if (data.hasOwnProperty('error')) { obj['error'] = ErrorError.constructFromObject(data['error']); } } return obj; }; exports.prototype['error'] = undefined; return exports; }); /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; (function (root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0), __webpack_require__(215)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} })(undefined, function (ApiClient, PathElement) { 'use strict'; var exports = function exports() { var _this = this; }; exports.constructFromObject = function (data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('elements')) { obj['elements'] = ApiClient.convertToType(data['elements'], [PathElement]); } if (data.hasOwnProperty('name')) { obj['name'] = ApiClient.convertToType(data['name'], 'String'); } if (data.hasOwnProperty('isCompleted')) { obj['isCompleted'] = ApiClient.convertToType(data['isCompleted'], 'Boolean'); } } return obj; }; exports.prototype['elements'] = undefined; exports.prototype['name'] = undefined; exports.prototype['isCompleted'] = undefined; return exports; }); /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; (function (root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} })(undefined, function (ApiClient) { 'use strict'; var exports = function exports() {}; exports.constructFromObject = function (data, obj) { if (data) { obj = data || new exports(); if (data.hasOwnProperty('mimeType')) { obj['mimeType'] = ApiClient.convertToType(data['mimeType'], 'String'); } if (data.hasOwnProperty('mimeTypeName')) { obj['mimeTypeName'] = ApiClient.convertToType(data['mimeTypeName'], 'String'); } if (data.hasOwnProperty('sizeInBytes')) { obj['sizeInBytes'] = ApiClient.convertToType(data['sizeInBytes'], 'Integer'); } if (data.hasOwnProperty('encoding')) { obj['encoding'] = ApiClient.convertToType(data['encoding'], 'String'); } } return obj; }; exports.prototype['mimeType'] = undefined; exports.prototype['mimeTypeName'] = undefined; exports.prototype['sizeInBytes'] = undefined; exports.prototype['encoding'] = undefined; return exports; }); /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; (function (root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0), __webpack_require__(218)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} })(undefined, function (ApiClient, ErrorError) { 'use strict'; var exports = function exports() { var _this = this; }; exports.constructFromObject = function (data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('error')) { obj['error'] = ErrorError.constructFromObject(data['error']); } } return obj; }; exports.prototype['error'] = undefined; return exports; }); /***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; (function (root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} })(undefined, function (ApiClient) { 'use strict'; var exports = function exports() {}; exports.constructFromObject = function (data, obj) { if (data) { obj = data || new exports(); if (data.hasOwnProperty('displayName')) { obj['displayName'] = ApiClient.convertToType(data['displayName'], 'String'); } if (data.hasOwnProperty('id')) { obj['id'] = ApiClient.convertToType(data['id'], 'String'); } } return obj; }; exports.prototype['displayName'] = undefined; exports.prototype['id'] = undefined; return exports; }); /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; (function (root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} })(undefined, function (ApiClient) { 'use strict'; var exports = function exports() { var _this = this; }; exports.constructFromObject = function (data, obj) { if (data) { obj = data || new exports(); if (data.hasOwnProperty('email')) { obj['email'] = ApiClient.convertToType(data['email'], 'String'); } if (data.hasOwnProperty('externalId')) { obj['externalId'] = ApiClient.convertToType(data['externalId'], 'String'); } if (data.hasOwnProperty('firstName')) { obj['firstName'] = ApiClient.convertToType(data['firstName'], 'String'); } if (data.hasOwnProperty('id')) { obj['id'] = ApiClient.convertToType(data['id'], 'Integer'); } if (data.hasOwnProperty('lastName')) { obj['lastName'] = ApiClient.convertToType(data['lastName'], 'String'); } if (data.hasOwnProperty('pictureId')) { obj['pictureId'] = ApiClient.convertToType(data['pictureId'], 'Integer'); } } return obj; }; exports.prototype['email'] = undefined; exports.prototype['externalId'] = undefined; exports.prototype['firstName'] = undefined; exports.prototype['id'] = undefined; exports.prototype['lastName'] = undefined; exports.prototype['pictureId'] = undefined; return exports; }); /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; (function (root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} })(undefined, function (ApiClient) { 'use strict'; var exports = function exports(count, hasMoreItems, skipCount, maxItems) { var _this = this; _this['count'] = count; _this['hasMoreItems'] = hasMoreItems; _this['skipCount'] = skipCount; _this['maxItems'] = maxItems; }; exports.constructFromObject = function (data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('count')) { obj['count'] = ApiClient.convertToType(data['count'], 'Number'); } if (data.hasOwnProperty('hasMoreItems')) { obj['hasMoreItems'] = ApiClient.convertToType(data['hasMoreItems'], 'Boolean'); } if (data.hasOwnProperty('totalItems')) { obj['totalItems'] = ApiClient.convertToType(data['totalItems'], 'Number'); } if (data.hasOwnProperty('skipCount')) { obj['skipCount'] = ApiClient.convertToType(data['skipCount'], 'Number'); } if (data.hasOwnProperty('maxItems')) { obj['maxItems'] = ApiClient.convertToType(data['maxItems'], 'Number'); } } return obj; }; exports.prototype['count'] = undefined; exports.prototype['hasMoreItems'] = undefined; exports.prototype['totalItems'] = undefined; exports.prototype['skipCount'] = undefined; exports.prototype['maxItems'] = undefined; return exports; }); /***/ }), /* 12 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; (function (root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0), __webpack_require__(62), __webpack_require__(146), __webpack_require__(61), __webpack_require__(145)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} })(undefined, function (ApiClient, FormFieldRepresentation, FormJavascriptEventRepresentation, FormOutcomeRepresentation, FormTabRepresentation) { 'use strict'; var exports = function exports() { var _this = this; }; exports.constructFromObject = function (data, obj) { if (data) { obj = data || new exports(); if (data.hasOwnProperty('className')) { obj['className'] = ApiClient.convertToType(data['className'], 'String'); } if (data.hasOwnProperty('customFieldTemplates')) { obj['customFieldTemplates'] = ApiClient.convertToType(data['customFieldTemplates'], { 'String': 'String' }); } if (data.hasOwnProperty('fields')) { obj['fields'] = ApiClient.convertToType(data['fields'], [FormFieldRepresentation]); } if (data.hasOwnProperty('gridsterForm')) { obj['gridsterForm'] = ApiClient.convertToType(data['gridsterForm'], 'Boolean'); } if (data.hasOwnProperty('id')) { obj['id'] = ApiClient.convertToType(data['id'], 'Integer'); } if (data.hasOwnProperty('javascriptEvents')) { obj['javascriptEvents'] = ApiClient.convertToType(data['javascriptEvents'], [FormJavascriptEventRepresentation]); } if (data.hasOwnProperty('metadata')) { obj['metadata'] = ApiClient.convertToType(data['metadata'], { 'String': 'String' }); } if (data.hasOwnProperty('name')) { obj['name'] = ApiClient.convertToType(data['name'], 'String'); } if (data.hasOwnProperty('outcomeTarget')) { obj['outcomeTarget'] = ApiClient.convertToType(data['outcomeTarget'], 'String'); } if (data.hasOwnProperty('outcomes')) { obj['outcomes'] = ApiClient.convertToType(data['outcomes'], [FormOutcomeRepresentation]); } if (data.hasOwnProperty('processDefinitionId')) { obj['processDefinitionId'] = ApiClient.convertToType(data['processDefinitionId'], 'String'); } if (data.hasOwnProperty('processDefinitionKey')) { obj['processDefinitionKey'] = ApiClient.convertToType(data['processDefinitionKey'], 'String'); } if (data.hasOwnProperty('processDefinitionName')) { obj['processDefinitionName'] = ApiClient.convertToType(data['processDefinitionName'], 'String'); } if (data.hasOwnProperty('selectedOutcome')) { obj['selectedOutcome'] = ApiClient.convertToType(data['selectedOutcome'], 'String'); } if (data.hasOwnProperty('style')) { obj['style'] = ApiClient.convertToType(data['style'], 'String'); } if (data.hasOwnProperty('tabs')) { obj['tabs'] = ApiClient.convertToType(data['tabs'], [FormTabRepresentation]); } if (data.hasOwnProperty('taskDefinitionKey')) { obj['taskDefinitionKey'] = ApiClient.convertToType(data['taskDefinitionKey'], 'String'); } if (data.hasOwnProperty('taskId')) { obj['taskId'] = ApiClient.convertToType(data['taskId'], 'String'); } if (data.hasOwnProperty('taskName')) { obj['taskName'] = ApiClient.convertToType(data['taskName'], 'String'); } } return obj; }; exports.prototype['className'] = undefined; exports.prototype['customFieldTemplates'] = undefined; exports.prototype['fields'] = undefined; exports.prototype['gridsterForm'] = undefined; exports.prototype['id'] = undefined; exports.prototype['javascriptEvents'] = undefined; exports.prototype['metadata'] = undefined; exports.prototype['name'] = undefined; exports.prototype['outcomeTarget'] = undefined; exports.prototype['outcomes'] = undefined; exports.prototype['processDefinitionId'] = undefined; exports.prototype['processDefinitionKey'] = undefined; exports.prototype['processDefinitionName'] = undefined; exports.prototype['selectedOutcome'] = undefined; exports.prototype['style'] = undefined; exports.prototype['tabs'] = undefined; exports.prototype['taskDefinitionKey'] = undefined; exports.prototype['taskId'] = undefined; exports.prototype['taskName'] = undefined; return exports; }); /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; (function (root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} })(undefined, function (ApiClient) { 'use strict'; var exports = function exports() { var _this = this; }; exports.constructFromObject = function (data, obj) { if (data) { obj = data || new exports(); } return obj; }; return exports; }); /***/ }), /* 14 */ /***/ (functi