apisearch
Version:
Javascript client for Apisearch.
153 lines (152 loc) • 5.45 kB
JavaScript
"use strict";
exports.__esModule = true;
exports.InvalidFormatError = void 0;
var tslib_1 = require("tslib");
var ErrorWithMessage_1 = require("./ErrorWithMessage");
/**
* Class InvalidFormatError
*/
var InvalidFormatError = /** @class */ (function (_super) {
tslib_1.__extends(InvalidFormatError, _super);
function InvalidFormatError() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* Get transportable http error
*
* @return {number}
*/
InvalidFormatError.getTransportableHTTPError = function () {
return 400;
};
/**
* Item representation not valid
*
* @return {InvalidFormatError}
*/
InvalidFormatError.itemRepresentationNotValid = function () {
return new InvalidFormatError("Item representation not valid. Expecting Item array serialized but found malformed data");
};
/**
* Item UUID representation not valid
*
* @return {InvalidFormatError}
*/
InvalidFormatError.itemUUIDRepresentationNotValid = function () {
return new InvalidFormatError("Item UUID representation not valid. Expecting UUID array serialized but found malformed data");
};
/**
* Create Composed UUID bad format.
*
* @return {InvalidFormatError}
*/
InvalidFormatError.composedItemUUIDNotValid = function () {
return new InvalidFormatError("A composed UUID should always follow this format: {id}~{type}.");
};
/**
* Create Query sorted by distance without coordinate.
*
* @return {InvalidFormatError}
*/
InvalidFormatError.querySortedByDistanceWithoutCoordinate = function () {
return new InvalidFormatError("In order to be able to sort by coordinates, you need to create a Query by using Query::createLocated() instead of Query::create()");
};
/**
* Query representation not valid
*
* @return {InvalidFormatError}
*/
InvalidFormatError.queryFormatNotValid = function () {
return new InvalidFormatError("Query Format not valid. Expecting a Query serialized but found malformed data");
};
/**
* Coordinate representation not valid
*
* @return {InvalidFormatError}
*/
InvalidFormatError.coordinateFormatNotValid = function () {
return new InvalidFormatError("A Coordinate should always contain a lat (Latitude) and a lon (Longitude)");
};
/**
* Config representation not valid
*
* @return {InvalidFormatError}
*/
InvalidFormatError.configFormatNotValid = function () {
return new InvalidFormatError("Config Format not valid. Expecting a Config serialized but found malformed data");
};
/**
* Token representation not valid
*
* @return {InvalidFormatError}
*/
InvalidFormatError.tokenFormatNotValid = function () {
return new InvalidFormatError("Token Format not valid. Expecting a Token serialized but found malformed data");
};
/**
* Index format not valid.
*
* @return {InvalidFormatError}
*/
InvalidFormatError.indexFormatNotValid = function () {
return new InvalidFormatError('Index Format not valid. Expecting an Index serialized but found malformed data');
};
/**
* IndexUUI format not valid.
*
* @return {InvalidFormatError}
*/
InvalidFormatError.indexUUIDFormatNotValid = function () {
return new InvalidFormatError('IndexUUID Format not valid. Expecting an IndexUUID serialized but found malformed data');
};
/**
* App format not valid.
*
* @return {InvalidFormatError}
*/
InvalidFormatError.appUUIDFormatNotValid = function () {
return new InvalidFormatError('AppUUID Format not valid. Expecting an AppUUID serialized but found malformed data');
};
/**
* Campaign representation not valid
*
* @return {InvalidFormatError}
*/
InvalidFormatError.campaignFormatNotValid = function () {
return new InvalidFormatError("Campaign Format not valid. Expecting a Campaign serialized but found malformed data");
};
/**
* Changes representation not valid
*
* @return {InvalidFormatError}
*/
InvalidFormatError.changesFormatNotValid = function () {
return new InvalidFormatError("Changes Format not valid. Expecting a Changes serialized but found malformed data");
};
/**
* Boost clause representation not valid
*
* @return {InvalidFormatError}
*/
InvalidFormatError.boostClauseFormatNotValid = function () {
return new InvalidFormatError("Boost clause Format not valid. Expecting a Boost clause serialized but found malformed data");
};
/**
* token uuid representation not valid
*
* @return {InvalidFormatError}
*/
InvalidFormatError.tokenUUIDFormatNotValid = function () {
return new InvalidFormatError("Token UUID Format not valid. Expecting a TokenUUID serialized but found malformed data");
};
/**
* User representation not valid
*
* @return {InvalidFormatError}
*/
InvalidFormatError.userFormatNotValid = function () {
return new InvalidFormatError("User Format not valid. Expecting a User serialized but found malformed data");
};
return InvalidFormatError;
}(ErrorWithMessage_1.ErrorWithMessage));
exports.InvalidFormatError = InvalidFormatError;