kinvey-js-sdk
Advanced tools
Comparing version 3.6.0-ns.8 to 3.6.0-ns.9
@@ -7,2 +7,45 @@ # Change Log | ||
## [3.5.2](https://github.com/Kinvey/js-sdk/tree/v3.5.2) (2017-07-07) | ||
[Full Changelog](https://github.com/Kinvey/js-sdk/compare/v3.5.1...v3.5.2)<br/> | ||
### Added | ||
_None_ | ||
### Removed | ||
_None_ | ||
### Fixed | ||
- Allow special characters `['.', '$', '~', '>', '<', '!', '@']` to be used in an `_id` for an entity. | ||
- Import `es6-promise` to fix errors caused by environments that do not provide a promise implementation natively. | ||
- Fix error inheritance to correctly display error message in `console.log` statements. | ||
### Merged Pull Requests | ||
- Fix URL formation on Windows and URL symbols in custom ID breaking cache storage [#134](https://github.com/Kinvey/js-sdk/pull/134) | ||
- Fix Promise Undefined Bug [#135](https://github.com/Kinvey/js-sdk/pull/135) | ||
- Fix Error Inheritance [#136](https://github.com/Kinvey/js-sdk/pull/136) | ||
### Closed Issues | ||
_None_ | ||
## [3.5.1](https://github.com/Kinvey/js-sdk/tree/v3.5.1) (2017-06-30) | ||
[Full Changelog](https://github.com/Kinvey/js-sdk/compare/v3.5.0...v3.5.1)<br/> | ||
### Added | ||
_None_ | ||
### Removed | ||
_None_ | ||
### Fixed | ||
- `https:` will automatically be used when a custom hostname is missing a protocol. | ||
- Prevent the active user from being `null` for a short period of time when setting the active user. | ||
### Merged Pull Requests | ||
- Active User Bug [#128](https://github.com/Kinvey/js-sdk/pull/128) | ||
- Add missing protocol to custom hostnames [#129](https://github.com/Kinvey/js-sdk/pull/129) | ||
### Closed Issues | ||
_None_ | ||
## [3.5.0](https://github.com/Kinvey/js-sdk/tree/v3.5.0) (2017-04-20) | ||
@@ -20,3 +63,3 @@ [Full Changelog](https://github.com/Kinvey/js-sdk/compare/v3.4.5...v3.5.0)<br/> | ||
### Changed | ||
### Fixed | ||
- `restore()` static function from the `User` class to throw an error whenever it is called. This function required an end user to supply their master secret for their application. We strongly advise not to do this in your application. | ||
@@ -23,0 +66,0 @@ - All `toJSON()` functions have now been replaced by `toPlainObject()`. The returned result is the exact same. |
@@ -9,2 +9,6 @@ 'use strict'; | ||
var _url = require('url'); | ||
var _url2 = _interopRequireDefault(_url); | ||
var _assign = require('lodash/assign'); | ||
@@ -22,6 +26,2 @@ | ||
var _url = require('url'); | ||
var _url2 = _interopRequireDefault(_url); | ||
var _errors = require('./errors'); | ||
@@ -37,2 +37,3 @@ | ||
var DEFAULT_TIMEOUT = 60000; | ||
var _sharedInstance = null; | ||
@@ -49,33 +50,48 @@ | ||
micHostname: 'https://auth.kinvey.com', | ||
defaultTimeout: 60000 | ||
liveServiceHostname: 'https://kls.kinvey.com', | ||
defaultTimeout: DEFAULT_TIMEOUT | ||
}, options); | ||
this.apiHostname = options.apiHostname; | ||
if (options.apiHostname && (0, _isString2.default)(options.apiHostname)) { | ||
var apiHostname = options.apiHostname; | ||
if ((0, _isString2.default)(this.apiHostname) === false) { | ||
throw new KivneyError('apiHostname must be a string'); | ||
} | ||
if (/^https?:\/\//i.test(apiHostname) === false) { | ||
apiHostname = 'https://' + apiHostname; | ||
} | ||
if (/^https?:\/\//i.test(this.apiHostname) === false) { | ||
this.apiHostname = 'https://' + this.apiHostname; | ||
var apiHostnameParsed = _url2.default.parse(apiHostname); | ||
this.apiProtocol = apiHostnameParsed.protocol; | ||
this.apiHost = apiHostnameParsed.host; | ||
} | ||
var apiHostnameParsed = _url2.default.parse(this.apiHostname); | ||
this.apiProtocol = apiHostnameParsed.protocol; | ||
this.apiHost = apiHostnameParsed.host; | ||
if (options.micHostname && (0, _isString2.default)(options.micHostname)) { | ||
var micHostname = options.micHostname; | ||
this.micHostname = options.micHostname; | ||
if (/^https?:\/\//i.test(micHostname) === false) { | ||
micHostname = 'https://' + micHostname; | ||
} | ||
if ((0, _isString2.default)(this.micHostname) === false) { | ||
throw new KivneyError('micHostname must be a string'); | ||
var micHostnameParsed = _url2.default.parse(micHostname); | ||
this.micProtocol = micHostnameParsed.protocol; | ||
this.micHost = micHostnameParsed.host; | ||
} | ||
if (/^https?:\/\//i.test(this.micHostname) === false) { | ||
this.micHostname = 'https://' + this.micHostname; | ||
if (options.liveServiceHostname && (0, _isString2.default)(options.liveServiceHostname)) { | ||
var liveServiceHostname = options.liveServiceHostname; | ||
if (/^https?:\/\//i.test(liveServiceHostname) === false) { | ||
liveServiceHostname = 'https://' + liveServiceHostname; | ||
} | ||
var liveServiceHostnameParsed = _url2.default.parse(liveServiceHostname); | ||
this.liveServiceProtocol = liveServiceHostnameParsed.protocol; | ||
this.liveServiceHost = liveServiceHostnameParsed.host; | ||
} | ||
var micHostnameParsed = _url2.default.parse(this.micHostname); | ||
this.micProtocol = micHostnameParsed.protocol; | ||
this.micHost = micHostnameParsed.host; | ||
this.appKey = options.appKey; | ||
@@ -91,17 +107,26 @@ | ||
this.defaultTimeout = options.defaultTimeout; | ||
if ((0, _isNumber2.default)(this.defaultTimeout) === false || isNaN(this.defaultTimeout)) { | ||
throw new _errors.KinveyError('Invalid default timeout. Default timeout must be a number.'); | ||
} | ||
if (this.defaultTimeout < 0) { | ||
_utils.Log.info('Default timeout is less than 0. Setting default timeout to 60000ms.'); | ||
this.defaultTimeout = 60000; | ||
} | ||
Object.freeze(this); | ||
this.defaultTimeout = (0, _isNumber2.default)(options.defaultTimeout) && options.defaultTimeout >= 0 ? options.defaultTimeout : DEFAULT_TIMEOUT; | ||
} | ||
_createClass(Client, [{ | ||
key: 'toPlainObject', | ||
value: function toPlainObject() { | ||
return { | ||
apiHostname: this.apiHostname, | ||
apiProtocol: this.apiProtocol, | ||
apiHost: this.apiHost, | ||
micHostname: this.micHostname, | ||
micProtocol: this.micProtocol, | ||
micHost: this.micHost, | ||
liveServiceHostname: this.liveServiceHostname, | ||
liveServiceHost: this.liveServiceHost, | ||
liveServiceProtocol: this.liveServiceProtocol, | ||
appKey: this.appKey, | ||
appSecret: this.appSecret, | ||
masterSecret: this.masterSecret, | ||
encryptionKey: this.encryptionKey, | ||
appVersion: this.appVersion | ||
}; | ||
} | ||
}, { | ||
key: 'activeUser', | ||
@@ -111,2 +136,26 @@ get: function get() { | ||
} | ||
}, { | ||
key: 'apiHostname', | ||
get: function get() { | ||
return _url2.default.format({ | ||
protocol: this.apiProtocol, | ||
host: this.apiHost | ||
}); | ||
} | ||
}, { | ||
key: 'micHostname', | ||
get: function get() { | ||
return _url2.default.format({ | ||
protocol: this.micProtocol, | ||
host: this.micHost | ||
}); | ||
} | ||
}, { | ||
key: 'liveServiceHostname', | ||
get: function get() { | ||
return _url2.default.format({ | ||
protocol: this.liveServiceProtocol, | ||
host: this.liveServiceHost | ||
}); | ||
} | ||
}], [{ | ||
@@ -113,0 +162,0 @@ key: 'initialize', |
@@ -11,2 +11,6 @@ 'use strict'; | ||
var _es6Promise = require('es6-promise'); | ||
var _es6Promise2 = _interopRequireDefault(_es6Promise); | ||
var _differenceBy = require('lodash/differenceBy'); | ||
@@ -544,3 +548,3 @@ | ||
if (entities.length > 0) { | ||
return Promise.all((0, _map2.default)(entities, function (entity) { | ||
return _es6Promise2.default.all((0, _map2.default)(entities, function (entity) { | ||
var metadata = new _entity.Metadata(entity); | ||
@@ -581,3 +585,3 @@ | ||
}).then(function (results) { | ||
return Promise.all((0, _map2.default)(results, function (result) { | ||
return _es6Promise2.default.all((0, _map2.default)(results, function (result) { | ||
if ((0, _utils.isDefined)(result.error) === false) { | ||
@@ -733,4 +737,4 @@ var _request = new _request2.CacheRequest({ | ||
return Promise.all((0, _map2.default)(entities, function (entity) { | ||
return Promise.resolve(entity).then(function (entity) { | ||
return _es6Promise2.default.all((0, _map2.default)(entities, function (entity) { | ||
return _es6Promise2.default.resolve(entity).then(function (entity) { | ||
var metadata = new _entity.Metadata(entity); | ||
@@ -737,0 +741,0 @@ |
@@ -213,3 +213,43 @@ 'use strict'; | ||
metadata = (0, _assign2.default)({ | ||
metadata = this.transformMetadata(file, metadata); | ||
var kinveyFileData = null; | ||
return this.saveFileMetadata(options, metadata).then(function (response) { | ||
kinveyFileData = response.data; | ||
return _this4.makeStatusCheckRequest(response.data._uploadURL, response.data._requiredHeaders, metadata, options.timeout); | ||
}).then(function (response) { | ||
_utils.Log.debug('File upload status check response', response); | ||
if (!response.isSuccess()) { | ||
return _es6Promise2.default.reject(response.error); | ||
} | ||
if (response.statusCode === 200 || response.statusCode === 201) { | ||
return response; | ||
} | ||
if (response.statusCode !== 308) { | ||
var error = new _errors.KinveyError('Unexpected response for upload file status check request.', false, response.statusCode, response.headers.get('X-Kinvey-Request-ID')); | ||
return _es6Promise2.default.reject(error); | ||
} | ||
var uploadOptions = { | ||
start: getStartIndex(response.headers.get('range'), metadata.size), | ||
timeout: options.timeout, | ||
maxBackoff: options.maxBackoff, | ||
headers: kinveyFileData._requiredHeaders | ||
}; | ||
return _this4.retriableUpload(kinveyFileData._uploadURL, file, metadata, uploadOptions); | ||
}).then(function () { | ||
delete kinveyFileData._expiresAt; | ||
delete kinveyFileData._requiredHeaders; | ||
delete kinveyFileData._uploadURL; | ||
kinveyFileData._data = file; | ||
return kinveyFileData; | ||
}); | ||
} | ||
}, { | ||
key: 'transformMetadata', | ||
value: function transformMetadata(file, metadata) { | ||
var fileMetadata = (0, _assign2.default)({ | ||
filename: file._filename || file.name, | ||
@@ -220,14 +260,22 @@ public: false, | ||
}, metadata); | ||
metadata._filename = metadata.filename; | ||
delete metadata.filename; | ||
metadata._public = metadata.public; | ||
delete metadata.public; | ||
fileMetadata._filename = metadata.filename; | ||
delete fileMetadata.filename; | ||
fileMetadata._public = metadata.public; | ||
delete fileMetadata.public; | ||
return fileMetadata; | ||
} | ||
}, { | ||
key: 'saveFileMetadata', | ||
value: function saveFileMetadata(options, metadata) { | ||
var isUpdate = (0, _utils.isDefined)(metadata._id); | ||
var request = new _request.KinveyRequest({ | ||
method: _request.RequestMethod.POST, | ||
method: isUpdate ? _request.RequestMethod.PUT : _request.RequestMethod.POST, | ||
authType: _request.AuthType.Default, | ||
headers: { | ||
'X-Kinvey-Content-Type': metadata.mimeType | ||
}, | ||
url: _url2.default.format({ | ||
protocol: this.client.apiProtocol, | ||
host: this.client.apiHost, | ||
pathname: this.pathname | ||
pathname: isUpdate ? this.pathname + '/' + metadata._id : this.pathname | ||
}), | ||
@@ -239,57 +287,23 @@ properties: options.properties, | ||
}); | ||
request.headers.set('X-Kinvey-Content-Type', metadata.mimeType); | ||
if (metadata._id) { | ||
request.method = _request.RequestMethod.PUT; | ||
request.url = _url2.default.format({ | ||
protocol: this.client.apiProtocol, | ||
host: this.client.apiHost, | ||
pathname: this.pathname + '/' + metadata._id | ||
}); | ||
} | ||
return request.execute().then(function (response) { | ||
return response.data; | ||
}).then(function (data) { | ||
var uploadUrl = data._uploadURL; | ||
var headers = new _request.Headers(data._requiredHeaders); | ||
headers.set('content-type', metadata.mimeType); | ||
delete data._expiresAt; | ||
delete data._requiredHeaders; | ||
delete data._uploadURL; | ||
var statusCheckRequest = new _request.NetworkRequest({ | ||
method: _request.RequestMethod.PUT, | ||
url: uploadUrl, | ||
timeout: options.timeout | ||
}); | ||
statusCheckRequest.headers.addAll(headers.toPlainObject()); | ||
statusCheckRequest.headers.set('Content-Range', 'bytes */' + metadata.size); | ||
return statusCheckRequest.execute(true).then(function (statusCheckResponse) { | ||
_utils.Log.debug('File upload status check response', statusCheckResponse); | ||
if (statusCheckResponse.isSuccess() === false) { | ||
throw statusCheckResponse.error; | ||
} | ||
if (statusCheckResponse.statusCode !== 308) { | ||
return file; | ||
} | ||
options.start = getStartIndex(statusCheckResponse.headers.get('range'), metadata.size); | ||
return _this4.uploadToGCS(uploadUrl, headers, file, metadata, options); | ||
}).then(function (file) { | ||
data._data = file; | ||
return data; | ||
}); | ||
return request.execute(); | ||
} | ||
}, { | ||
key: 'makeStatusCheckRequest', | ||
value: function makeStatusCheckRequest(uploadUrl, requiredHeaders, metadata, timeout) { | ||
var headers = new _request.Headers(requiredHeaders); | ||
headers.set('content-type', metadata.mimeType); | ||
headers.set('content-range', 'bytes */' + metadata.size); | ||
var request = new _request.NetworkRequest({ | ||
method: _request.RequestMethod.PUT, | ||
url: uploadUrl, | ||
timeout: timeout, | ||
headers: headers | ||
}); | ||
return request.execute(); | ||
} | ||
}, { | ||
key: 'uploadToGCS', | ||
value: function uploadToGCS(uploadUrl, headers, file, metadata) { | ||
key: 'retriableUpload', | ||
value: function retriableUpload(uploadUrl, file, metadata, options) { | ||
var _this5 = this; | ||
var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; | ||
options = (0, _assign2.default)({ | ||
@@ -302,4 +316,4 @@ count: 0, | ||
_utils.Log.debug('Start file upload'); | ||
_utils.Log.debug('File upload upload url', uploadUrl); | ||
_utils.Log.debug('File upload headers', headers.toPlainObject()); | ||
_utils.Log.debug('File upload headers', options.headers); | ||
_utils.Log.debug('File upload upload url', _url2.default); | ||
_utils.Log.debug('File upload file', file); | ||
@@ -309,24 +323,23 @@ _utils.Log.debug('File upload metadata', metadata); | ||
var request = new _request.NetworkRequest({ | ||
method: _request.RequestMethod.PUT, | ||
url: uploadUrl, | ||
body: (0, _isFunction2.default)(file.slice) ? file.slice(options.start) : file, | ||
timeout: options.timeout | ||
}); | ||
request.headers.addAll(headers.toPlainObject()); | ||
request.headers.set('Content-Range', 'bytes ' + options.start + '-' + (metadata.size - 1) + '/' + metadata.size); | ||
return request.execute(true).then(function (response) { | ||
return this.makeUploadRequest(uploadUrl, file, metadata, options).then(function (response) { | ||
_utils.Log.debug('File upload response', response); | ||
if (response.statusCode === 308) { | ||
_utils.Log.debug('File upload was incomplete.' + ' The server responded with a status code 308.' + ' Trying to upload the remaining portion of the file.'); | ||
options.start = getStartIndex(response.headers.get('range'), metadata.size); | ||
return _this5.uploadToGCS(uploadUrl, headers, file, metadata, options); | ||
} else if (response.statusCode >= 500 && response.statusCode < 600) { | ||
_utils.Log.debug('File upload error.', response.statusCode, response.data); | ||
if (response.isClientError()) { | ||
return _es6Promise2.default.reject(response.error); | ||
} | ||
if (!response.isSuccess() && !response.isServerError() && response.statusCode !== 308) { | ||
var error = new _errors.KinveyError('Unexpected response for upload file request.', false, response.statusCode, response.headers.get('X-Kinvey-Request-ID')); | ||
return _es6Promise2.default.reject(error); | ||
} | ||
var backoff = Math.pow(2, options.count) + randomInt(1000, 1); | ||
return response; | ||
}).then(function (response) { | ||
var backoff = 0; | ||
if (response.isServerError()) { | ||
_utils.Log.debug('File upload server error. Probably network congestion.', response.statusCode, response.data); | ||
backoff = Math.pow(2, options.count) + randomInt(1, 1001); | ||
if (backoff >= options.maxBackoff) { | ||
throw response.error; | ||
return _es6Promise2.default.reject(response.error); | ||
} | ||
@@ -339,13 +352,47 @@ | ||
options.count += 1; | ||
resolve(_this5.uploadToGCS(uploadUrl, headers, file, metadata, options)); | ||
resolve(true); | ||
}, backoff); | ||
}); | ||
} else if (response.isSuccess() === false) { | ||
throw response.error; | ||
} | ||
return file; | ||
if (response.statusCode === 308) { | ||
_utils.Log.debug('File upload was incomplete (statusCode 308). Trying to upload the remainder of file.'); | ||
options.start = getStartIndex(response.headers.get('range'), metadata.size); | ||
return new _es6Promise2.default(function (resolve) { | ||
setTimeout(function () { | ||
options.count = 0; | ||
resolve(true); | ||
}, backoff); | ||
}); | ||
} | ||
return new _es6Promise2.default(function (resolve) { | ||
setTimeout(function () { | ||
resolve(false); | ||
}, backoff); | ||
}); | ||
}).then(function (shouldRetry) { | ||
if (shouldRetry) { | ||
return _this5.retriableUpload(uploadUrl, file, metadata, options); | ||
} | ||
return null; | ||
}); | ||
} | ||
}, { | ||
key: 'makeUploadRequest', | ||
value: function makeUploadRequest(uploadUrl, file, metadata, options) { | ||
var headers = new _request.Headers(options.headers); | ||
headers.set('content-type', metadata.mimeType); | ||
headers.set('content-range', 'bytes ' + options.start + '-' + (metadata.size - 1) + '/' + metadata.size); | ||
var request = new _request.NetworkRequest({ | ||
method: _request.RequestMethod.PUT, | ||
url: uploadUrl, | ||
headers: headers, | ||
body: (0, _isFunction2.default)(file.slice) ? file.slice(options.start) : file, | ||
timeout: options.timeout | ||
}); | ||
return request.execute(); | ||
} | ||
}, { | ||
key: 'create', | ||
@@ -352,0 +399,0 @@ value: function create(file, metadata, options) { |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var ActiveUserError = function (_BaseError) { | ||
_inherits(ActiveUserError, _BaseError); | ||
function ActiveUserError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'An active user already exists.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, ActiveUserError); | ||
return _possibleConstructorReturn(this, (ActiveUserError.__proto__ || Object.getPrototypeOf(ActiveUserError)).call(this, 'ActiveUserError', message, debug, code, kinveyRequestId)); | ||
} | ||
return ActiveUserError; | ||
}(_base2.default); | ||
function ActiveUserError(message, debug, code, kinveyRequestId) { | ||
this.name = 'ActiveUserError'; | ||
this.message = message || 'An active user already exists.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
ActiveUserError.prototype = Object.create(_base2.default.prototype); | ||
ActiveUserError.prototype.constructor = ActiveUserError; | ||
exports.default = ActiveUserError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var APIVersionNotAvailableError = function (_BaseError) { | ||
_inherits(APIVersionNotAvailableError, _BaseError); | ||
function APIVersionNotAvailableError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'This API version is not available for your app.' + ' Please retry your request with a supported API version.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, APIVersionNotAvailableError); | ||
return _possibleConstructorReturn(this, (APIVersionNotAvailableError.__proto__ || Object.getPrototypeOf(APIVersionNotAvailableError)).call(this, 'APIVersionNotAvailableError', message, debug, code, kinveyRequestId)); | ||
} | ||
return APIVersionNotAvailableError; | ||
}(_base2.default); | ||
function APIVersionNotAvailableError(message, debug, code, kinveyRequestId) { | ||
this.name = 'APIVersionNotAvailableError'; | ||
this.message = message || 'This API version is not available for your app.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
APIVersionNotAvailableError.prototype = Object.create(_base2.default.prototype); | ||
APIVersionNotAvailableError.prototype.constructor = APIVersionNotAvailableError; | ||
exports.default = APIVersionNotAvailableError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var APIVersionNotImplementedError = function (_BaseError) { | ||
_inherits(APIVersionNotImplementedError, _BaseError); | ||
function APIVersionNotImplementedError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'This API version is not implemented.' + ' Please retry your request with a supported API version.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, APIVersionNotImplementedError); | ||
return _possibleConstructorReturn(this, (APIVersionNotImplementedError.__proto__ || Object.getPrototypeOf(APIVersionNotImplementedError)).call(this, 'APIVersionNotImplementedError', message, debug, code, kinveyRequestId)); | ||
} | ||
return APIVersionNotImplementedError; | ||
}(_base2.default); | ||
function APIVersionNotImplementedError(message, debug, code, kinveyRequestId) { | ||
this.name = 'APIVersionNotImplementedError'; | ||
this.message = message || 'This API version is not implemented.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
APIVersionNotImplementedError.prototype = Object.create(_base2.default.prototype); | ||
APIVersionNotImplementedError.prototype.constructor = APIVersionNotImplementedError; | ||
exports.default = APIVersionNotImplementedError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var AppProblemError = function (_BaseError) { | ||
_inherits(AppProblemError, _BaseError); | ||
function AppProblemError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'There is a problem with this app backend that prevents execution of this operation.' + ' Please contact support@kinvey.com for assistance.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, AppProblemError); | ||
return _possibleConstructorReturn(this, (AppProblemError.__proto__ || Object.getPrototypeOf(AppProblemError)).call(this, 'AppProblemError', message, debug, code, kinveyRequestId)); | ||
} | ||
return AppProblemError; | ||
}(_base2.default); | ||
function AppProblemError(message, debug, code, kinveyRequestId) { | ||
this.name = 'AppProblemError'; | ||
this.message = message || 'There is a problem with this app backend that prevents execution of this operation. Please contact support@kinvey.com for assistance.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
AppProblemError.prototype = Object.create(_base2.default.prototype); | ||
AppProblemError.prototype.constructor = AppProblemError; | ||
exports.default = AppProblemError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var BadRequestError = function (_BaseError) { | ||
_inherits(BadRequestError, _BaseError); | ||
function BadRequestError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Unable to understand request.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, BadRequestError); | ||
return _possibleConstructorReturn(this, (BadRequestError.__proto__ || Object.getPrototypeOf(BadRequestError)).call(this, 'BadRequestError', message, debug, code, kinveyRequestId)); | ||
} | ||
return BadRequestError; | ||
}(_base2.default); | ||
function BadRequestError(message, debug, code, kinveyRequestId) { | ||
this.name = 'BadRequestError'; | ||
this.message = message || 'Unable to understand request.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
BadRequestError.prototype = Object.create(_base2.default.prototype); | ||
BadRequestError.prototype.constructor = BadRequestError; | ||
exports.default = BadRequestError; |
@@ -6,40 +6,12 @@ 'use strict'; | ||
}); | ||
var _es6Error = require('es6-error'); | ||
var _es6Error2 = _interopRequireDefault(_es6Error); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: 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) : subClass.__proto__ = superClass; } | ||
var BaseError = function (_ExtendableError) { | ||
_inherits(BaseError, _ExtendableError); | ||
function BaseError(name) { | ||
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'An error occurred.'; | ||
var debug = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; | ||
var code = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -1; | ||
var kinveyRequestId = arguments[4]; | ||
_classCallCheck(this, BaseError); | ||
var _this = _possibleConstructorReturn(this, (BaseError.__proto__ || Object.getPrototypeOf(BaseError)).call(this)); | ||
_this.name = name || _this.constructor.name; | ||
_this.message = message; | ||
_this.debug = debug; | ||
_this.code = code; | ||
_this.kinveyRequestId = kinveyRequestId; | ||
_this.stack = new Error(message).stack; | ||
return _this; | ||
} | ||
return BaseError; | ||
}(_es6Error2.default); | ||
function BaseError(message, debug, code, kinveyRequestId) { | ||
this.name = 'BaseError'; | ||
this.message = message || 'An error occurred.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
BaseError.prototype = Object.create(Error.prototype); | ||
BaseError.prototype.constructor = BaseError; | ||
exports.default = BaseError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var BLError = function (_BaseError) { | ||
_inherits(BLError, _BaseError); | ||
function BLError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'The Business Logic script did not complete.' + ' See debug message for details.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, BLError); | ||
return _possibleConstructorReturn(this, (BLError.__proto__ || Object.getPrototypeOf(BLError)).call(this, 'BLError', message, debug, code, kinveyRequestId)); | ||
} | ||
return BLError; | ||
}(_base2.default); | ||
function BLError(message, debug, code, kinveyRequestId) { | ||
this.name = 'BLError'; | ||
this.message = message || 'The Business Logic script did not complete.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
BLError.prototype = Object.create(_base2.default.prototype); | ||
BLError.prototype.constructor = BLError; | ||
exports.default = BLError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var CORSDisabledError = function (_BaseError) { | ||
_inherits(CORSDisabledError, _BaseError); | ||
function CORSDisabledError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Cross Origin Support is disabled for this application.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, CORSDisabledError); | ||
return _possibleConstructorReturn(this, (CORSDisabledError.__proto__ || Object.getPrototypeOf(CORSDisabledError)).call(this, 'CORSDisabledError', message, debug, code, kinveyRequestId)); | ||
} | ||
return CORSDisabledError; | ||
}(_base2.default); | ||
function CORSDisabledError(message, debug, code, kinveyRequestId) { | ||
this.name = 'CORSDisabledError'; | ||
this.message = message || 'Cross Origin Support is disabled for this application.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
CORSDisabledError.prototype = Object.create(_base2.default.prototype); | ||
CORSDisabledError.prototype.constructor = CORSDisabledError; | ||
exports.default = CORSDisabledError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var DuplicateEndUsersError = function (_BaseError) { | ||
_inherits(DuplicateEndUsersError, _BaseError); | ||
function DuplicateEndUsersError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'More than one user registered with this username for this application.' + ' Please contact support@kinvey.com for assistance.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, DuplicateEndUsersError); | ||
return _possibleConstructorReturn(this, (DuplicateEndUsersError.__proto__ || Object.getPrototypeOf(DuplicateEndUsersError)).call(this, 'DuplicateEndUsersError', message, debug, code, kinveyRequestId)); | ||
} | ||
return DuplicateEndUsersError; | ||
}(_base2.default); | ||
function DuplicateEndUsersError(message, debug, code, kinveyRequestId) { | ||
this.name = 'DuplicateEndUsersError'; | ||
this.message = message || 'More than one user registered with this username for this application.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
DuplicateEndUsersError.prototype = Object.create(_base2.default.prototype); | ||
DuplicateEndUsersError.prototype.constructor = DuplicateEndUsersError; | ||
exports.default = DuplicateEndUsersError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var FeatureUnavailableError = function (_BaseError) { | ||
_inherits(FeatureUnavailableError, _BaseError); | ||
function FeatureUnavailableError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Requested functionality is unavailable in this API version.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, FeatureUnavailableError); | ||
return _possibleConstructorReturn(this, (FeatureUnavailableError.__proto__ || Object.getPrototypeOf(FeatureUnavailableError)).call(this, 'FeatureUnavailableError', message, debug, code, kinveyRequestId)); | ||
} | ||
return FeatureUnavailableError; | ||
}(_base2.default); | ||
function FeatureUnavailableError(message, debug, code, kinveyRequestId) { | ||
this.name = 'FeatureUnavailableError'; | ||
this.message = message || 'Requested functionality is unavailable in this API version.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
FeatureUnavailableError.prototype = Object.create(_base2.default.prototype); | ||
FeatureUnavailableError.prototype.constructor = FeatureUnavailableError; | ||
exports.default = FeatureUnavailableError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var IncompleteRequestBodyError = function (_BaseError) { | ||
_inherits(IncompleteRequestBodyError, _BaseError); | ||
function IncompleteRequestBodyError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'The request body is either missing or incomplete.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, IncompleteRequestBodyError); | ||
return _possibleConstructorReturn(this, (IncompleteRequestBodyError.__proto__ || Object.getPrototypeOf(IncompleteRequestBodyError)).call(this, 'IncompleteRequestBodyError', message, debug, code, kinveyRequestId)); | ||
} | ||
return IncompleteRequestBodyError; | ||
}(_base2.default); | ||
function IncompleteRequestBodyError(message, debug, code, kinveyRequestId) { | ||
this.name = 'IncompleteRequestBodyError'; | ||
this.message = message || 'The request body is either missing or incomplete.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
IncompleteRequestBodyError.prototype = Object.create(_base2.default.prototype); | ||
IncompleteRequestBodyError.prototype.constructor = IncompleteRequestBodyError; | ||
exports.default = IncompleteRequestBodyError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var IndirectCollectionAccessDisallowedError = function (_BaseError) { | ||
_inherits(IndirectCollectionAccessDisallowedError, _BaseError); | ||
function IndirectCollectionAccessDisallowedError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Please use the appropriate API to access this' + ' collection for this app backend.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, IndirectCollectionAccessDisallowedError); | ||
return _possibleConstructorReturn(this, (IndirectCollectionAccessDisallowedError.__proto__ || Object.getPrototypeOf(IndirectCollectionAccessDisallowedError)).call(this, 'IndirectCollectionAccessDisallowedError', message, debug, code, kinveyRequestId)); | ||
} | ||
return IndirectCollectionAccessDisallowedError; | ||
}(_base2.default); | ||
function IndirectCollectionAccessDisallowedError(message, debug, code, kinveyRequestId) { | ||
this.name = 'IndirectCollectionAccessDisallowedError'; | ||
this.message = message || 'Please use the appropriate API to access this collection for this app backend.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
IndirectCollectionAccessDisallowedError.prototype = Object.create(_base2.default.prototype); | ||
IndirectCollectionAccessDisallowedError.prototype.constructor = IndirectCollectionAccessDisallowedError; | ||
exports.default = IndirectCollectionAccessDisallowedError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var InsufficientCredentialsError = function (_BaseError) { | ||
_inherits(InsufficientCredentialsError, _BaseError); | ||
function InsufficientCredentialsError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'The credentials used to authenticate this' + ' request are not authorized to run' + ' this operation. Please retry your' + ' request with appropriate credentials.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, InsufficientCredentialsError); | ||
return _possibleConstructorReturn(this, (InsufficientCredentialsError.__proto__ || Object.getPrototypeOf(InsufficientCredentialsError)).call(this, 'InsufficientCredentialsError', message, debug, code, kinveyRequestId)); | ||
} | ||
return InsufficientCredentialsError; | ||
}(_base2.default); | ||
function InsufficientCredentialsError(message, debug, code, kinveyRequestId) { | ||
this.name = 'InsufficientCredentialsError'; | ||
this.message = message || 'The credentials used to authenticate this request are not authorized to run this operation. Please retry your request with appropriate credentials.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
InsufficientCredentialsError.prototype = Object.create(_base2.default.prototype); | ||
InsufficientCredentialsError.prototype.constructor = InsufficientCredentialsError; | ||
exports.default = InsufficientCredentialsError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var InvalidCredentialsError = function (_BaseError) { | ||
_inherits(InvalidCredentialsError, _BaseError); | ||
function InvalidCredentialsError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Invalid credentials.' + ' Please retry your request with correct credentials.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, InvalidCredentialsError); | ||
return _possibleConstructorReturn(this, (InvalidCredentialsError.__proto__ || Object.getPrototypeOf(InvalidCredentialsError)).call(this, 'InvalidCredentialsError', message, debug, code, kinveyRequestId)); | ||
} | ||
return InvalidCredentialsError; | ||
}(_base2.default); | ||
function InvalidCredentialsError(message, debug, code, kinveyRequestId) { | ||
this.name = 'InvalidCredentialsError'; | ||
this.message = message || 'Invalid credentials. Please retry your request with correct credentials.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
InvalidCredentialsError.prototype = Object.create(_base2.default.prototype); | ||
InvalidCredentialsError.prototype.constructor = InvalidCredentialsError; | ||
exports.default = InvalidCredentialsError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var InvalidIdentifierError = function (_BaseError) { | ||
_inherits(InvalidIdentifierError, _BaseError); | ||
function InvalidIdentifierError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'One of more identifier names in the' + ' request has an invalid format.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, InvalidIdentifierError); | ||
return _possibleConstructorReturn(this, (InvalidIdentifierError.__proto__ || Object.getPrototypeOf(InvalidIdentifierError)).call(this, 'InvalidIdentifierError', message, debug, code, kinveyRequestId)); | ||
} | ||
return InvalidIdentifierError; | ||
}(_base2.default); | ||
function InvalidIdentifierError(message, debug, code, kinveyRequestId) { | ||
this.name = 'InvalidIdentifierError'; | ||
this.message = message || 'One of more identifier names in the request has an invalid format.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
InvalidIdentifierError.prototype = Object.create(_base2.default.prototype); | ||
InvalidIdentifierError.prototype.constructor = InvalidIdentifierError; | ||
exports.default = InvalidIdentifierError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var InvalidQuerySyntaxError = function (_BaseError) { | ||
_inherits(InvalidQuerySyntaxError, _BaseError); | ||
function InvalidQuerySyntaxError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'The query string in the request has an invalid syntax.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, InvalidQuerySyntaxError); | ||
return _possibleConstructorReturn(this, (InvalidQuerySyntaxError.__proto__ || Object.getPrototypeOf(InvalidQuerySyntaxError)).call(this, 'InvalidQuerySyntaxError', message, debug, code, kinveyRequestId)); | ||
} | ||
return InvalidQuerySyntaxError; | ||
}(_base2.default); | ||
function InvalidQuerySyntaxError(message, debug, code, kinveyRequestId) { | ||
this.name = 'InvalidQuerySyntaxError'; | ||
this.message = message || 'The query string in the request has an invalid syntax.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
InvalidQuerySyntaxError.prototype = Object.create(_base2.default.prototype); | ||
InvalidQuerySyntaxError.prototype.constructor = InvalidQuerySyntaxError; | ||
exports.default = InvalidQuerySyntaxError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var JSONParseError = function (_BaseError) { | ||
_inherits(JSONParseError, _BaseError); | ||
function JSONParseError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Unable to parse the JSON in the request.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, JSONParseError); | ||
return _possibleConstructorReturn(this, (JSONParseError.__proto__ || Object.getPrototypeOf(JSONParseError)).call(this, 'JSONParseError', message, debug, code, kinveyRequestId)); | ||
} | ||
return JSONParseError; | ||
}(_base2.default); | ||
function JSONParseError(message, debug, code, kinveyRequestId) { | ||
this.name = 'JSONParseError'; | ||
this.message = message || 'Unable to parse the JSON in the request.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
JSONParseError.prototype = Object.create(_base2.default.prototype); | ||
JSONParseError.prototype.constructor = JSONParseError; | ||
exports.default = JSONParseError; |
@@ -13,20 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var KinveyError = function (_BaseError) { | ||
_inherits(KinveyError, _BaseError); | ||
function KinveyError(message, debug, code, kinveyRequestId) { | ||
_classCallCheck(this, KinveyError); | ||
return _possibleConstructorReturn(this, (KinveyError.__proto__ || Object.getPrototypeOf(KinveyError)).call(this, 'KinveyError', message, debug, code, kinveyRequestId)); | ||
} | ||
return KinveyError; | ||
}(_base2.default); | ||
function KinveyError(message, debug, code, kinveyRequestId) { | ||
this.name = 'KinveyError'; | ||
this.message = message || 'An error occurred.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
KinveyError.prototype = Object.create(_base2.default.prototype); | ||
KinveyError.prototype.constructor = KinveyError; | ||
exports.default = KinveyError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var KinveyInternalErrorRetry = function (_BaseError) { | ||
_inherits(KinveyInternalErrorRetry, _BaseError); | ||
function KinveyInternalErrorRetry() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'The Kinvey server encountered an unexpected error.' + ' Please retry your request.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, KinveyInternalErrorRetry); | ||
return _possibleConstructorReturn(this, (KinveyInternalErrorRetry.__proto__ || Object.getPrototypeOf(KinveyInternalErrorRetry)).call(this, 'KinveyInternalErrorRetry', message, debug, code, kinveyRequestId)); | ||
} | ||
return KinveyInternalErrorRetry; | ||
}(_base2.default); | ||
function KinveyInternalErrorRetry(message, debug, code, kinveyRequestId) { | ||
this.name = 'KinveyInternalErrorRetry'; | ||
this.message = message || 'The Kinvey server encountered an unexpected error. Please retry your request.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
KinveyInternalErrorRetry.prototype = Object.create(_base2.default.prototype); | ||
KinveyInternalErrorRetry.prototype.constructor = KinveyInternalErrorRetry; | ||
exports.default = KinveyInternalErrorRetry; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var KinveyInternalErrorStop = function (_BaseError) { | ||
_inherits(KinveyInternalErrorStop, _BaseError); | ||
function KinveyInternalErrorStop() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'The Kinvey server encountered an unexpected error.' + ' Please contact support@kinvey.com for assistance.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, KinveyInternalErrorStop); | ||
return _possibleConstructorReturn(this, (KinveyInternalErrorStop.__proto__ || Object.getPrototypeOf(KinveyInternalErrorStop)).call(this, 'KinveyInternalErrorStop', message, debug, code, kinveyRequestId)); | ||
} | ||
return KinveyInternalErrorStop; | ||
}(_base2.default); | ||
function KinveyInternalErrorStop(message, debug, code, kinveyRequestId) { | ||
this.name = 'KinveyInternalErrorStop'; | ||
this.message = message || 'The Kinvey server encountered an unexpected error. Please contact support@kinvey.com for assistance.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
KinveyInternalErrorStop.prototype = Object.create(_base2.default.prototype); | ||
KinveyInternalErrorStop.prototype.constructor = KinveyInternalErrorStop; | ||
exports.default = KinveyInternalErrorStop; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var MissingQueryError = function (_BaseError) { | ||
_inherits(MissingQueryError, _BaseError); | ||
function MissingQueryError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'The request is missing a query string.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, MissingQueryError); | ||
return _possibleConstructorReturn(this, (MissingQueryError.__proto__ || Object.getPrototypeOf(MissingQueryError)).call(this, 'MissingQueryError', message, debug, code, kinveyRequestId)); | ||
} | ||
return MissingQueryError; | ||
}(_base2.default); | ||
function MissingQueryError(message, debug, code, kinveyRequestId) { | ||
this.name = 'MissingQueryError'; | ||
this.message = message || 'The request is missing a query string.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
MissingQueryError.prototype = Object.create(_base2.default.prototype); | ||
MissingQueryError.prototype.constructor = MissingQueryError; | ||
exports.default = MissingQueryError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var MissingRequestHeaderError = function (_BaseError) { | ||
_inherits(MissingRequestHeaderError, _BaseError); | ||
function MissingRequestHeaderError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'The request is missing a required header.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, MissingRequestHeaderError); | ||
return _possibleConstructorReturn(this, (MissingRequestHeaderError.__proto__ || Object.getPrototypeOf(MissingRequestHeaderError)).call(this, 'MissingRequestHeaderError', message, debug, code, kinveyRequestId)); | ||
} | ||
return MissingRequestHeaderError; | ||
}(_base2.default); | ||
function MissingRequestHeaderError(message, debug, code, kinveyRequestId) { | ||
this.name = 'MissingRequestHeaderError'; | ||
this.message = message || 'The request is missing a required header.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
MissingRequestHeaderError.prototype = Object.create(_base2.default.prototype); | ||
MissingRequestHeaderError.prototype.constructor = MissingRequestHeaderError; | ||
exports.default = MissingRequestHeaderError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var MissingRequestParameterError = function (_BaseError) { | ||
_inherits(MissingRequestParameterError, _BaseError); | ||
function MissingRequestParameterError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'A required parameter is missing from the request.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, MissingRequestParameterError); | ||
return _possibleConstructorReturn(this, (MissingRequestParameterError.__proto__ || Object.getPrototypeOf(MissingRequestParameterError)).call(this, 'MissingRequestParameterError', message, debug, code, kinveyRequestId)); | ||
} | ||
return MissingRequestParameterError; | ||
}(_base2.default); | ||
function MissingRequestParameterError(message, debug, code, kinveyRequestId) { | ||
this.name = 'MissingRequestParameterError'; | ||
this.message = message || 'A required parameter is missing from the request.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
MissingRequestParameterError.prototype = Object.create(_base2.default.prototype); | ||
MissingRequestParameterError.prototype.constructor = MissingRequestParameterError; | ||
exports.default = MissingRequestParameterError; |
@@ -13,24 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var MobileIdentityConnectError = function (_BaseError) { | ||
_inherits(MobileIdentityConnectError, _BaseError); | ||
function MobileIdentityConnectError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'An error has occurred with Mobile Identity Connect.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
_classCallCheck(this, MobileIdentityConnectError); | ||
return _possibleConstructorReturn(this, (MobileIdentityConnectError.__proto__ || Object.getPrototypeOf(MobileIdentityConnectError)).call(this, 'MobileIdentityConnectError', message, debug, code)); | ||
} | ||
return MobileIdentityConnectError; | ||
}(_base2.default); | ||
function MobileIdentityConnectError(message, debug, code, kinveyRequestId) { | ||
this.name = 'MobileIdentityConnectError'; | ||
this.message = message || 'An error has occurred with Mobile Identity Connect.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
MobileIdentityConnectError.prototype = Object.create(_base2.default.prototype); | ||
MobileIdentityConnectError.prototype.constructor = MobileIdentityConnectError; | ||
exports.default = MobileIdentityConnectError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var NetworkConnectionError = function (_BaseError) { | ||
_inherits(NetworkConnectionError, _BaseError); | ||
function NetworkConnectionError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'There was an error connecting to the network.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, NetworkConnectionError); | ||
return _possibleConstructorReturn(this, (NetworkConnectionError.__proto__ || Object.getPrototypeOf(NetworkConnectionError)).call(this, 'NetworkConnectionError', message, debug, code, kinveyRequestId)); | ||
} | ||
return NetworkConnectionError; | ||
}(_base2.default); | ||
function NetworkConnectionError(message, debug, code, kinveyRequestId) { | ||
this.name = 'NetworkConnectionError'; | ||
this.message = message || 'There was an error connecting to the network.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
NetworkConnectionError.prototype = Object.create(_base2.default.prototype); | ||
NetworkConnectionError.prototype.constructor = NetworkConnectionError; | ||
exports.default = NetworkConnectionError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var NoActiveUserError = function (_BaseError) { | ||
_inherits(NoActiveUserError, _BaseError); | ||
function NoActiveUserError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'There is not an active user.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, NoActiveUserError); | ||
return _possibleConstructorReturn(this, (NoActiveUserError.__proto__ || Object.getPrototypeOf(NoActiveUserError)).call(this, 'NoActiveUserError', message, debug, code, kinveyRequestId)); | ||
} | ||
return NoActiveUserError; | ||
}(_base2.default); | ||
function NoActiveUserError(message, debug, code, kinveyRequestId) { | ||
this.name = 'NoActiveUserError'; | ||
this.message = message || 'There is not an active user.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
NoActiveUserError.prototype = Object.create(_base2.default.prototype); | ||
NoActiveUserError.prototype.constructor = NoActiveUserError; | ||
exports.default = NoActiveUserError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var NoResponseError = function (_BaseError) { | ||
_inherits(NoResponseError, _BaseError); | ||
function NoResponseError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'No response was provided.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, NoResponseError); | ||
return _possibleConstructorReturn(this, (NoResponseError.__proto__ || Object.getPrototypeOf(NoResponseError)).call(this, 'NoResponseError', message, debug, code, kinveyRequestId)); | ||
} | ||
return NoResponseError; | ||
}(_base2.default); | ||
function NoResponseError(message, debug, code, kinveyRequestId) { | ||
this.name = 'NoResponseError'; | ||
this.message = message || 'No response was provided.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
NoResponseError.prototype = Object.create(_base2.default.prototype); | ||
NoResponseError.prototype.constructor = NoResponseError; | ||
exports.default = NoResponseError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var NotFoundError = function (_BaseError) { | ||
_inherits(NotFoundError, _BaseError); | ||
function NotFoundError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'The entity was not found.'; | ||
var debug = arguments[1]; | ||
var code = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 404; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, NotFoundError); | ||
return _possibleConstructorReturn(this, (NotFoundError.__proto__ || Object.getPrototypeOf(NotFoundError)).call(this, 'NotFoundError', message, debug, code, kinveyRequestId)); | ||
} | ||
return NotFoundError; | ||
}(_base2.default); | ||
function NotFoundError(message, debug, code, kinveyRequestId) { | ||
this.name = 'NotFoundError'; | ||
this.message = message || 'The entity was not found.'; | ||
this.debug = debug || undefined; | ||
this.code = code || 404; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
NotFoundError.prototype = Object.create(_base2.default.prototype); | ||
NotFoundError.prototype.constructor = NotFoundError; | ||
exports.default = NotFoundError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var ParameterValueOutOfRangeError = function (_BaseError) { | ||
_inherits(ParameterValueOutOfRangeError, _BaseError); | ||
function ParameterValueOutOfRangeError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'The value specified for one of the' + ' request parameters is out of range.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, ParameterValueOutOfRangeError); | ||
return _possibleConstructorReturn(this, (ParameterValueOutOfRangeError.__proto__ || Object.getPrototypeOf(ParameterValueOutOfRangeError)).call(this, 'ParameterValueOutOfRangeError', message, debug, code, kinveyRequestId)); | ||
} | ||
return ParameterValueOutOfRangeError; | ||
}(_base2.default); | ||
function ParameterValueOutOfRangeError(message, debug, code, kinveyRequestId) { | ||
this.name = 'ParameterValueOutOfRangeError'; | ||
this.message = message || 'The value specified for one of the request parameters is out of range.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
ParameterValueOutOfRangeError.prototype = Object.create(_base2.default.prototype); | ||
ParameterValueOutOfRangeError.prototype.constructor = ParameterValueOutOfRangeError; | ||
exports.default = ParameterValueOutOfRangeError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var PopupError = function (_BaseError) { | ||
_inherits(PopupError, _BaseError); | ||
function PopupError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Unable to open a popup on this platform.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, PopupError); | ||
return _possibleConstructorReturn(this, (PopupError.__proto__ || Object.getPrototypeOf(PopupError)).call(this, 'PopupError', message, debug, code, kinveyRequestId)); | ||
} | ||
return PopupError; | ||
}(_base2.default); | ||
function PopupError(message, debug, code, kinveyRequestId) { | ||
this.name = 'PopupError'; | ||
this.message = message || 'Unable to open a popup on this platform.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
PopupError.prototype = Object.create(_base2.default.prototype); | ||
PopupError.prototype.constructor = PopupError; | ||
exports.default = PopupError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var QueryError = function (_BaseError) { | ||
_inherits(QueryError, _BaseError); | ||
function QueryError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'An error occurred with the query.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, QueryError); | ||
return _possibleConstructorReturn(this, (QueryError.__proto__ || Object.getPrototypeOf(QueryError)).call(this, 'QueryError', message, debug, code, kinveyRequestId)); | ||
} | ||
return QueryError; | ||
}(_base2.default); | ||
function QueryError(message, debug, code, kinveyRequestId) { | ||
this.name = 'QueryError'; | ||
this.message = message || 'An error occurred with the query.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
QueryError.prototype = Object.create(_base2.default.prototype); | ||
QueryError.prototype.constructor = QueryError; | ||
exports.default = QueryError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var ServerError = function (_BaseError) { | ||
_inherits(ServerError, _BaseError); | ||
function ServerError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'An error occurred on the server.'; | ||
var debug = arguments[1]; | ||
var code = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 500; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, ServerError); | ||
return _possibleConstructorReturn(this, (ServerError.__proto__ || Object.getPrototypeOf(ServerError)).call(this, 'ServerError', message, debug, code, kinveyRequestId)); | ||
} | ||
return ServerError; | ||
}(_base2.default); | ||
function ServerError(message, debug, code, kinveyRequestId) { | ||
this.name = 'ServerError'; | ||
this.message = message || 'An error occurred on the server.'; | ||
this.debug = debug || undefined; | ||
this.code = code || 500; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
ServerError.prototype = Object.create(_base2.default.prototype); | ||
ServerError.prototype.constructor = ServerError; | ||
exports.default = ServerError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var StaleRequestError = function (_BaseError) { | ||
_inherits(StaleRequestError, _BaseError); | ||
function StaleRequestError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'The time window for this request has expired.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, StaleRequestError); | ||
return _possibleConstructorReturn(this, (StaleRequestError.__proto__ || Object.getPrototypeOf(StaleRequestError)).call(this, 'StaleRequestError', message, debug, code, kinveyRequestId)); | ||
} | ||
return StaleRequestError; | ||
}(_base2.default); | ||
function StaleRequestError(message, debug, code, kinveyRequestId) { | ||
this.name = 'StaleRequestError'; | ||
this.message = message || 'The time window for this request has expired.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
StaleRequestError.prototype = Object.create(_base2.default.prototype); | ||
StaleRequestError.prototype.constructor = StaleRequestError; | ||
exports.default = StaleRequestError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var SyncError = function (_BaseError) { | ||
_inherits(SyncError, _BaseError); | ||
function SyncError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'An error occurred during sync.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, SyncError); | ||
return _possibleConstructorReturn(this, (SyncError.__proto__ || Object.getPrototypeOf(SyncError)).call(this, 'SyncError', message, debug, code, kinveyRequestId)); | ||
} | ||
return SyncError; | ||
}(_base2.default); | ||
function SyncError(message, debug, code, kinveyRequestId) { | ||
this.name = 'SyncError'; | ||
this.message = message || 'An error occurred during sync.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
SyncError.prototype = Object.create(_base2.default.prototype); | ||
SyncError.prototype.constructor = SyncError; | ||
exports.default = SyncError; |
@@ -13,24 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var TimeoutError = function (_BaseError) { | ||
_inherits(TimeoutError, _BaseError); | ||
function TimeoutError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'The request timed out.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
_classCallCheck(this, TimeoutError); | ||
return _possibleConstructorReturn(this, (TimeoutError.__proto__ || Object.getPrototypeOf(TimeoutError)).call(this, 'TimeoutError', message, debug, code)); | ||
} | ||
return TimeoutError; | ||
}(_base2.default); | ||
function TimeoutError(message, debug, code, kinveyRequestId) { | ||
this.name = 'TimeoutError'; | ||
this.message = message || 'The request timed out.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
TimeoutError.prototype = Object.create(_base2.default.prototype); | ||
TimeoutError.prototype.constructor = TimeoutError; | ||
exports.default = TimeoutError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var UserAlreadyExistsError = function (_BaseError) { | ||
_inherits(UserAlreadyExistsError, _BaseError); | ||
function UserAlreadyExistsError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'This username is already taken.' + ' Please retry your request with a different username.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, UserAlreadyExistsError); | ||
return _possibleConstructorReturn(this, (UserAlreadyExistsError.__proto__ || Object.getPrototypeOf(UserAlreadyExistsError)).call(this, 'UserAlreadyExistsError', message, debug, code, kinveyRequestId)); | ||
} | ||
return UserAlreadyExistsError; | ||
}(_base2.default); | ||
function UserAlreadyExistsError(message, debug, code, kinveyRequestId) { | ||
this.name = 'UserAlreadyExistsError'; | ||
this.message = message || 'This username is already taken. Please retry your request with a different username.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
UserAlreadyExistsError.prototype = Object.create(_base2.default.prototype); | ||
UserAlreadyExistsError.prototype.constructor = UserAlreadyExistsError; | ||
exports.default = UserAlreadyExistsError; |
@@ -13,25 +13,12 @@ 'use strict'; | ||
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) : subClass.__proto__ = superClass; } | ||
var WritesToCollectionDisallowedError = function (_BaseError) { | ||
_inherits(WritesToCollectionDisallowedError, _BaseError); | ||
function WritesToCollectionDisallowedError() { | ||
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'This collection is configured to disallow any' + ' modifications to an existing entity or creation of new entities.'; | ||
var debug = arguments[1]; | ||
var code = arguments[2]; | ||
var kinveyRequestId = arguments[3]; | ||
_classCallCheck(this, WritesToCollectionDisallowedError); | ||
return _possibleConstructorReturn(this, (WritesToCollectionDisallowedError.__proto__ || Object.getPrototypeOf(WritesToCollectionDisallowedError)).call(this, 'WritesToCollectionDisallowedError', message, debug, code, kinveyRequestId)); | ||
} | ||
return WritesToCollectionDisallowedError; | ||
}(_base2.default); | ||
function WritesToCollectionDisallowedError(message, debug, code, kinveyRequestId) { | ||
this.name = 'WritesToCollectionDisallowedError'; | ||
this.message = message || 'This collection is configured to disallow any modifications to an existing entity or creation of new entities.'; | ||
this.debug = debug || undefined; | ||
this.code = code || undefined; | ||
this.kinveyRequestId = kinveyRequestId || undefined; | ||
this.stack = new Error().stack; | ||
} | ||
WritesToCollectionDisallowedError.prototype = Object.create(_base2.default.prototype); | ||
WritesToCollectionDisallowedError.prototype.constructor = WritesToCollectionDisallowedError; | ||
exports.default = WritesToCollectionDisallowedError; |
@@ -10,6 +10,2 @@ 'use strict'; | ||
var _url = require('url'); | ||
var _url2 = _interopRequireDefault(_url); | ||
var _errors = require('./errors'); | ||
@@ -82,8 +78,3 @@ | ||
authType: _request.AuthType.All, | ||
url: _url2.default.format({ | ||
protocol: this.client.apiProtocol, | ||
host: this.client.apiHost, | ||
pathname: '/appdata/' + this.client.appKey | ||
}), | ||
client: client | ||
url: this.client.apiHostname + '/appdata/' + client.appKey | ||
}); | ||
@@ -104,2 +95,5 @@ | ||
return this.client.appVersion; | ||
}, | ||
set: function set(appVersion) { | ||
this.client.appVersion = appVersion; | ||
} | ||
@@ -106,0 +100,0 @@ }]); |
@@ -147,13 +147,8 @@ 'use strict'; | ||
_set(CacheRequest.prototype.__proto__ || Object.getPrototypeOf(CacheRequest.prototype), 'url', urlString, this); | ||
var pathname = global.escape(_url2.default.parse(urlString).pathname); | ||
var pattern = new _urlPattern2.default('(/:namespace)(/)(:appKey)(/)(:collection)(/)(:entityId)(/)'); | ||
var pathname = global.decodeURIComponent(_url2.default.parse(urlString).pathname); | ||
var urlParts = pathname.replace(/^\//, '').split('/'); | ||
var _ref = pattern.match(pathname) || {}, | ||
appKey = _ref.appKey, | ||
collection = _ref.collection, | ||
entityId = _ref.entityId; | ||
this.appKey = appKey; | ||
this.collection = collection; | ||
this.entityId = entityId; | ||
this.appKey = urlParts[1]; | ||
this.collection = urlParts[2]; | ||
this.entityId = urlParts[3]; | ||
} | ||
@@ -160,0 +155,0 @@ }]); |
@@ -69,2 +69,12 @@ 'use strict'; | ||
}, { | ||
key: 'isServerError', | ||
value: function isServerError() { | ||
return this.statusCode >= 500 && this.statusCode < 600; | ||
} | ||
}, { | ||
key: 'isClientError', | ||
value: function isClientError() { | ||
return this.statusCode >= 400 && this.statusCode < 500; | ||
} | ||
}, { | ||
key: 'headers', | ||
@@ -71,0 +81,0 @@ get: function get() { |
{ | ||
"name": "kinvey-js-sdk", | ||
"version": "3.6.0-ns.8", | ||
"version": "3.6.0-ns.9", | ||
"description": "Kinvey JavaScript SDK for developing JavaScript applications. This is the core code used to create specific bundles for all other JavaScript platforms.", | ||
@@ -32,3 +32,3 @@ "homepage": "http://www.kinvey.com", | ||
"test:watch": "mocha -w --compilers js:babel-core/register -r babel-polyfill -s 100 --recursive test/index test", | ||
"transpile": "BABEL_ENV=production babel --no-comments --out-dir dist src" | ||
"transpile": "babel --no-comments --out-dir dist src" | ||
}, | ||
@@ -35,0 +35,0 @@ "dependencies": { |
@@ -7,2 +7,3 @@ # Overview [![Build Status](https://travis-ci.org/Kinvey/js-sdk.svg?branch=master)](https://travis-ci.org/Kinvey/js-sdk) [![Code Climate](https://codeclimate.com/github/Kinvey/js-sdk/badges/gpa.svg)](https://codeclimate.com/github/Kinvey/js-sdk) [![codecov](https://codecov.io/gh/Kinvey/js-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/Kinvey/js-sdk) | ||
* [NativeScript](https://github.com/Kinvey/nativescript-sdk) | ||
* [Angular](https://github.com/Kinvey/angular-sdk) | ||
@@ -9,0 +10,0 @@ * [Angular 2](https://github.com/Kinvey/angular2-sdk) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21
408905
7750