@evespace/esi-client
Version:
TypeScript client for EVE Online's ESI (EVE Swagger Interface) API
1,496 lines (1,466 loc) • 1.07 MB
JavaScript
// src/runtime.ts
var BASE_PATH = "https://esi.evetech.net".replace(/\/+$/, "");
var Configuration = class {
constructor(configuration = {}) {
this.configuration = configuration;
}
set config(configuration) {
this.configuration = configuration;
}
get basePath() {
return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
}
get fetchApi() {
return this.configuration.fetchApi;
}
get middleware() {
return this.configuration.middleware || [];
}
get queryParamsStringify() {
return this.configuration.queryParamsStringify || querystring;
}
get username() {
return this.configuration.username;
}
get password() {
return this.configuration.password;
}
get apiKey() {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === "function" ? apiKey : () => apiKey;
}
return void 0;
}
get accessToken() {
const accessToken = this.configuration.accessToken;
if (accessToken) {
return typeof accessToken === "function" ? accessToken : async () => accessToken;
}
return void 0;
}
get headers() {
return this.configuration.headers;
}
get credentials() {
return this.configuration.credentials;
}
};
var DefaultConfig = new Configuration();
var _BaseAPI = class _BaseAPI {
constructor(configuration = DefaultConfig) {
this.configuration = configuration;
this.fetchApi = async (url, init) => {
let fetchParams = { url, init };
for (const middleware of this.middleware) {
if (middleware.pre) {
fetchParams = await middleware.pre({
fetch: this.fetchApi,
...fetchParams
}) || fetchParams;
}
}
let response = void 0;
try {
response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
} catch (e) {
for (const middleware of this.middleware) {
if (middleware.onError) {
response = await middleware.onError({
fetch: this.fetchApi,
url: fetchParams.url,
init: fetchParams.init,
error: e,
response: response ? response.clone() : void 0
}) || response;
}
}
if (response === void 0) {
if (e instanceof Error) {
throw new FetchError(e, "The request failed and the interceptors did not return an alternative response");
} else {
throw e;
}
}
}
for (const middleware of this.middleware) {
if (middleware.post) {
response = await middleware.post({
fetch: this.fetchApi,
url: fetchParams.url,
init: fetchParams.init,
response: response.clone()
}) || response;
}
}
return response;
};
this.middleware = configuration.middleware;
}
withMiddleware(...middlewares) {
const next = this.clone();
next.middleware = next.middleware.concat(...middlewares);
return next;
}
withPreMiddleware(...preMiddlewares) {
const middlewares = preMiddlewares.map((pre) => ({ pre }));
return this.withMiddleware(...middlewares);
}
withPostMiddleware(...postMiddlewares) {
const middlewares = postMiddlewares.map((post) => ({ post }));
return this.withMiddleware(...middlewares);
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
isJsonMime(mime) {
if (!mime) {
return false;
}
return _BaseAPI.jsonRegex.test(mime);
}
async request(context, initOverrides) {
const { url, init } = await this.createFetchParams(context, initOverrides);
const response = await this.fetchApi(url, init);
if (response && (response.status >= 200 && response.status < 300)) {
return response;
}
throw new ResponseError(response, "Response returned an error code");
}
async createFetchParams(context, initOverrides) {
let url = this.configuration.basePath + context.path;
if (context.query !== void 0 && Object.keys(context.query).length !== 0) {
url += "?" + this.configuration.queryParamsStringify(context.query);
}
const headers = Object.assign({}, this.configuration.headers, context.headers);
Object.keys(headers).forEach((key) => headers[key] === void 0 ? delete headers[key] : {});
const initOverrideFn = typeof initOverrides === "function" ? initOverrides : async () => initOverrides;
const initParams = {
method: context.method,
headers,
body: context.body,
credentials: this.configuration.credentials
};
const overriddenInit = {
...initParams,
...await initOverrideFn({
init: initParams,
context
})
};
let body;
if (isFormData(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob(overriddenInit.body)) {
body = overriddenInit.body;
} else if (this.isJsonMime(headers["Content-Type"])) {
body = JSON.stringify(overriddenInit.body);
} else {
body = overriddenInit.body;
}
const init = {
...overriddenInit,
body
};
return { url, init };
}
/**
* Create a shallow clone of `this` by constructing a new instance
* and then shallow cloning data members.
*/
clone() {
const constructor = this.constructor;
const next = new constructor(this.configuration);
next.middleware = this.middleware.slice();
return next;
}
};
_BaseAPI.jsonRegex = new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$", "i");
var BaseAPI = _BaseAPI;
function isBlob(value) {
return typeof Blob !== "undefined" && value instanceof Blob;
}
function isFormData(value) {
return typeof FormData !== "undefined" && value instanceof FormData;
}
var ResponseError = class extends Error {
constructor(response, msg) {
super(msg);
this.response = response;
this.name = "ResponseError";
}
};
var FetchError = class extends Error {
constructor(cause, msg) {
super(msg);
this.cause = cause;
this.name = "FetchError";
}
};
var RequiredError = class extends Error {
constructor(field, msg) {
super(msg);
this.field = field;
this.name = "RequiredError";
}
};
var COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: " ",
pipes: "|"
};
function querystring(params, prefix = "") {
return Object.keys(params).map((key) => querystringSingleKey(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
}
function querystringSingleKey(key, value, keyPrefix = "") {
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
if (value instanceof Array) {
const multiValue = value.map((singleValue) => encodeURIComponent(String(singleValue))).join(`&${encodeURIComponent(fullKey)}=`);
return `${encodeURIComponent(fullKey)}=${multiValue}`;
}
if (value instanceof Set) {
const valueAsArray = Array.from(value);
return querystringSingleKey(key, valueAsArray, keyPrefix);
}
if (value instanceof Date) {
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
}
if (value instanceof Object) {
return querystring(value, fullKey);
}
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
}
function exists(json, key) {
const value = json[key];
return value !== null && value !== void 0;
}
function mapValues(data, fn) {
return Object.keys(data).reduce(
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
{}
);
}
function canConsumeForm(consumes) {
for (const consume of consumes) {
if ("multipart/form-data" === consume.contentType) {
return true;
}
}
return false;
}
var JSONApiResponse = class {
constructor(raw, transformer = (jsonValue) => jsonValue) {
this.raw = raw;
this.transformer = transformer;
}
async value() {
return this.transformer(await this.raw.json());
}
};
var VoidApiResponse = class {
constructor(raw) {
this.raw = raw;
}
async value() {
return void 0;
}
};
var BlobApiResponse = class {
constructor(raw) {
this.raw = raw;
}
async value() {
return await this.raw.blob();
}
};
var TextApiResponse = class {
constructor(raw) {
this.raw = raw;
}
async value() {
return await this.raw.text();
}
};
// src/models/BadRequest.ts
function instanceOfBadRequest(value) {
if (!("error" in value) || value["error"] === void 0) return false;
return true;
}
function BadRequestFromJSON(json) {
return BadRequestFromJSONTyped(json, false);
}
function BadRequestFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"error": json["error"]
};
}
function BadRequestToJSON(json) {
return BadRequestToJSONTyped(json, false);
}
function BadRequestToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"error": value["error"]
};
}
// src/models/DeleteCharactersCharacterIdMailLabelsLabelIdUnprocessableEntity.ts
function instanceOfDeleteCharactersCharacterIdMailLabelsLabelIdUnprocessableEntity(value) {
return true;
}
function DeleteCharactersCharacterIdMailLabelsLabelIdUnprocessableEntityFromJSON(json) {
return DeleteCharactersCharacterIdMailLabelsLabelIdUnprocessableEntityFromJSONTyped(json, false);
}
function DeleteCharactersCharacterIdMailLabelsLabelIdUnprocessableEntityFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"error": json["error"] == null ? void 0 : json["error"]
};
}
function DeleteCharactersCharacterIdMailLabelsLabelIdUnprocessableEntityToJSON(json) {
return DeleteCharactersCharacterIdMailLabelsLabelIdUnprocessableEntityToJSONTyped(json, false);
}
function DeleteCharactersCharacterIdMailLabelsLabelIdUnprocessableEntityToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"error": value["error"]
};
}
// src/models/DeleteFleetsFleetIdMembersMemberIdNotFound.ts
function instanceOfDeleteFleetsFleetIdMembersMemberIdNotFound(value) {
return true;
}
function DeleteFleetsFleetIdMembersMemberIdNotFoundFromJSON(json) {
return DeleteFleetsFleetIdMembersMemberIdNotFoundFromJSONTyped(json, false);
}
function DeleteFleetsFleetIdMembersMemberIdNotFoundFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"error": json["error"] == null ? void 0 : json["error"]
};
}
function DeleteFleetsFleetIdMembersMemberIdNotFoundToJSON(json) {
return DeleteFleetsFleetIdMembersMemberIdNotFoundToJSONTyped(json, false);
}
function DeleteFleetsFleetIdMembersMemberIdNotFoundToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"error": value["error"]
};
}
// src/models/DeleteFleetsFleetIdSquadsSquadIdNotFound.ts
function instanceOfDeleteFleetsFleetIdSquadsSquadIdNotFound(value) {
return true;
}
function DeleteFleetsFleetIdSquadsSquadIdNotFoundFromJSON(json) {
return DeleteFleetsFleetIdSquadsSquadIdNotFoundFromJSONTyped(json, false);
}
function DeleteFleetsFleetIdSquadsSquadIdNotFoundFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"error": json["error"] == null ? void 0 : json["error"]
};
}
function DeleteFleetsFleetIdSquadsSquadIdNotFoundToJSON(json) {
return DeleteFleetsFleetIdSquadsSquadIdNotFoundToJSONTyped(json, false);
}
function DeleteFleetsFleetIdSquadsSquadIdNotFoundToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"error": value["error"]
};
}
// src/models/DeleteFleetsFleetIdWingsWingIdNotFound.ts
function instanceOfDeleteFleetsFleetIdWingsWingIdNotFound(value) {
return true;
}
function DeleteFleetsFleetIdWingsWingIdNotFoundFromJSON(json) {
return DeleteFleetsFleetIdWingsWingIdNotFoundFromJSONTyped(json, false);
}
function DeleteFleetsFleetIdWingsWingIdNotFoundFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"error": json["error"] == null ? void 0 : json["error"]
};
}
function DeleteFleetsFleetIdWingsWingIdNotFoundToJSON(json) {
return DeleteFleetsFleetIdWingsWingIdNotFoundToJSONTyped(json, false);
}
function DeleteFleetsFleetIdWingsWingIdNotFoundToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"error": value["error"]
};
}
// src/models/ErrorLimited.ts
function instanceOfErrorLimited(value) {
if (!("error" in value) || value["error"] === void 0) return false;
return true;
}
function ErrorLimitedFromJSON(json) {
return ErrorLimitedFromJSONTyped(json, false);
}
function ErrorLimitedFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"error": json["error"]
};
}
function ErrorLimitedToJSON(json) {
return ErrorLimitedToJSONTyped(json, false);
}
function ErrorLimitedToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"error": value["error"]
};
}
// src/models/Forbidden.ts
function instanceOfForbidden(value) {
if (!("error" in value) || value["error"] === void 0) return false;
return true;
}
function ForbiddenFromJSON(json) {
return ForbiddenFromJSONTyped(json, false);
}
function ForbiddenFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"error": json["error"],
"ssoStatus": json["sso_status"] == null ? void 0 : json["sso_status"]
};
}
function ForbiddenToJSON(json) {
return ForbiddenToJSONTyped(json, false);
}
function ForbiddenToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"error": value["error"],
"sso_status": value["ssoStatus"]
};
}
// src/models/GatewayTimeout.ts
function instanceOfGatewayTimeout(value) {
if (!("error" in value) || value["error"] === void 0) return false;
return true;
}
function GatewayTimeoutFromJSON(json) {
return GatewayTimeoutFromJSONTyped(json, false);
}
function GatewayTimeoutFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"error": json["error"],
"timeout": json["timeout"] == null ? void 0 : json["timeout"]
};
}
function GatewayTimeoutToJSON(json) {
return GatewayTimeoutToJSONTyped(json, false);
}
function GatewayTimeoutToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"error": value["error"],
"timeout": value["timeout"]
};
}
// src/models/GetAlliancesAllianceIdContacts200Ok.ts
var GetAlliancesAllianceIdContacts200OkContactTypeEnum = {
Character: "character",
Corporation: "corporation",
Alliance: "alliance",
Faction: "faction"
};
function instanceOfGetAlliancesAllianceIdContacts200Ok(value) {
if (!("contactId" in value) || value["contactId"] === void 0) return false;
if (!("contactType" in value) || value["contactType"] === void 0) return false;
if (!("standing" in value) || value["standing"] === void 0) return false;
return true;
}
function GetAlliancesAllianceIdContacts200OkFromJSON(json) {
return GetAlliancesAllianceIdContacts200OkFromJSONTyped(json, false);
}
function GetAlliancesAllianceIdContacts200OkFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"contactId": json["contact_id"],
"contactType": json["contact_type"],
"labelIds": json["label_ids"] == null ? void 0 : json["label_ids"],
"standing": json["standing"]
};
}
function GetAlliancesAllianceIdContacts200OkToJSON(json) {
return GetAlliancesAllianceIdContacts200OkToJSONTyped(json, false);
}
function GetAlliancesAllianceIdContacts200OkToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"contact_id": value["contactId"],
"contact_type": value["contactType"],
"label_ids": value["labelIds"],
"standing": value["standing"]
};
}
// src/models/GetAlliancesAllianceIdContactsLabels200Ok.ts
function instanceOfGetAlliancesAllianceIdContactsLabels200Ok(value) {
if (!("labelId" in value) || value["labelId"] === void 0) return false;
if (!("labelName" in value) || value["labelName"] === void 0) return false;
return true;
}
function GetAlliancesAllianceIdContactsLabels200OkFromJSON(json) {
return GetAlliancesAllianceIdContactsLabels200OkFromJSONTyped(json, false);
}
function GetAlliancesAllianceIdContactsLabels200OkFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"labelId": json["label_id"],
"labelName": json["label_name"]
};
}
function GetAlliancesAllianceIdContactsLabels200OkToJSON(json) {
return GetAlliancesAllianceIdContactsLabels200OkToJSONTyped(json, false);
}
function GetAlliancesAllianceIdContactsLabels200OkToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"label_id": value["labelId"],
"label_name": value["labelName"]
};
}
// src/models/GetAlliancesAllianceIdIconsNotFound.ts
function instanceOfGetAlliancesAllianceIdIconsNotFound(value) {
return true;
}
function GetAlliancesAllianceIdIconsNotFoundFromJSON(json) {
return GetAlliancesAllianceIdIconsNotFoundFromJSONTyped(json, false);
}
function GetAlliancesAllianceIdIconsNotFoundFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"error": json["error"] == null ? void 0 : json["error"]
};
}
function GetAlliancesAllianceIdIconsNotFoundToJSON(json) {
return GetAlliancesAllianceIdIconsNotFoundToJSONTyped(json, false);
}
function GetAlliancesAllianceIdIconsNotFoundToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"error": value["error"]
};
}
// src/models/GetAlliancesAllianceIdIconsOk.ts
function instanceOfGetAlliancesAllianceIdIconsOk(value) {
return true;
}
function GetAlliancesAllianceIdIconsOkFromJSON(json) {
return GetAlliancesAllianceIdIconsOkFromJSONTyped(json, false);
}
function GetAlliancesAllianceIdIconsOkFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"px128x128": json["px128x128"] == null ? void 0 : json["px128x128"],
"px64x64": json["px64x64"] == null ? void 0 : json["px64x64"]
};
}
function GetAlliancesAllianceIdIconsOkToJSON(json) {
return GetAlliancesAllianceIdIconsOkToJSONTyped(json, false);
}
function GetAlliancesAllianceIdIconsOkToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"px128x128": value["px128x128"],
"px64x64": value["px64x64"]
};
}
// src/models/GetAlliancesAllianceIdNotFound.ts
function instanceOfGetAlliancesAllianceIdNotFound(value) {
return true;
}
function GetAlliancesAllianceIdNotFoundFromJSON(json) {
return GetAlliancesAllianceIdNotFoundFromJSONTyped(json, false);
}
function GetAlliancesAllianceIdNotFoundFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"error": json["error"] == null ? void 0 : json["error"]
};
}
function GetAlliancesAllianceIdNotFoundToJSON(json) {
return GetAlliancesAllianceIdNotFoundToJSONTyped(json, false);
}
function GetAlliancesAllianceIdNotFoundToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"error": value["error"]
};
}
// src/models/GetAlliancesAllianceIdOk.ts
function instanceOfGetAlliancesAllianceIdOk(value) {
if (!("creatorCorporationId" in value) || value["creatorCorporationId"] === void 0) return false;
if (!("creatorId" in value) || value["creatorId"] === void 0) return false;
if (!("dateFounded" in value) || value["dateFounded"] === void 0) return false;
if (!("name" in value) || value["name"] === void 0) return false;
if (!("ticker" in value) || value["ticker"] === void 0) return false;
return true;
}
function GetAlliancesAllianceIdOkFromJSON(json) {
return GetAlliancesAllianceIdOkFromJSONTyped(json, false);
}
function GetAlliancesAllianceIdOkFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"creatorCorporationId": json["creator_corporation_id"],
"creatorId": json["creator_id"],
"dateFounded": new Date(json["date_founded"]),
"executorCorporationId": json["executor_corporation_id"] == null ? void 0 : json["executor_corporation_id"],
"factionId": json["faction_id"] == null ? void 0 : json["faction_id"],
"name": json["name"],
"ticker": json["ticker"]
};
}
function GetAlliancesAllianceIdOkToJSON(json) {
return GetAlliancesAllianceIdOkToJSONTyped(json, false);
}
function GetAlliancesAllianceIdOkToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"creator_corporation_id": value["creatorCorporationId"],
"creator_id": value["creatorId"],
"date_founded": value["dateFounded"].toISOString(),
"executor_corporation_id": value["executorCorporationId"],
"faction_id": value["factionId"],
"name": value["name"],
"ticker": value["ticker"]
};
}
// src/models/GetCharactersCharacterIdAgentsResearch200Ok.ts
function instanceOfGetCharactersCharacterIdAgentsResearch200Ok(value) {
if (!("agentId" in value) || value["agentId"] === void 0) return false;
if (!("pointsPerDay" in value) || value["pointsPerDay"] === void 0) return false;
if (!("remainderPoints" in value) || value["remainderPoints"] === void 0) return false;
if (!("skillTypeId" in value) || value["skillTypeId"] === void 0) return false;
if (!("startedAt" in value) || value["startedAt"] === void 0) return false;
return true;
}
function GetCharactersCharacterIdAgentsResearch200OkFromJSON(json) {
return GetCharactersCharacterIdAgentsResearch200OkFromJSONTyped(json, false);
}
function GetCharactersCharacterIdAgentsResearch200OkFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"agentId": json["agent_id"],
"pointsPerDay": json["points_per_day"],
"remainderPoints": json["remainder_points"],
"skillTypeId": json["skill_type_id"],
"startedAt": new Date(json["started_at"])
};
}
function GetCharactersCharacterIdAgentsResearch200OkToJSON(json) {
return GetCharactersCharacterIdAgentsResearch200OkToJSONTyped(json, false);
}
function GetCharactersCharacterIdAgentsResearch200OkToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"agent_id": value["agentId"],
"points_per_day": value["pointsPerDay"],
"remainder_points": value["remainderPoints"],
"skill_type_id": value["skillTypeId"],
"started_at": value["startedAt"].toISOString()
};
}
// src/models/GetCharactersCharacterIdAssets200Ok.ts
var GetCharactersCharacterIdAssets200OkLocationFlagEnum = {
AssetSafety: "AssetSafety",
AutoFit: "AutoFit",
BoosterBay: "BoosterBay",
Cargo: "Cargo",
CorporationGoalDeliveries: "CorporationGoalDeliveries",
CorpseBay: "CorpseBay",
Deliveries: "Deliveries",
DroneBay: "DroneBay",
FighterBay: "FighterBay",
FighterTube0: "FighterTube0",
FighterTube1: "FighterTube1",
FighterTube2: "FighterTube2",
FighterTube3: "FighterTube3",
FighterTube4: "FighterTube4",
FleetHangar: "FleetHangar",
FrigateEscapeBay: "FrigateEscapeBay",
Hangar: "Hangar",
HangarAll: "HangarAll",
HiSlot0: "HiSlot0",
HiSlot1: "HiSlot1",
HiSlot2: "HiSlot2",
HiSlot3: "HiSlot3",
HiSlot4: "HiSlot4",
HiSlot5: "HiSlot5",
HiSlot6: "HiSlot6",
HiSlot7: "HiSlot7",
HiddenModifiers: "HiddenModifiers",
Implant: "Implant",
InfrastructureHangar: "InfrastructureHangar",
LoSlot0: "LoSlot0",
LoSlot1: "LoSlot1",
LoSlot2: "LoSlot2",
LoSlot3: "LoSlot3",
LoSlot4: "LoSlot4",
LoSlot5: "LoSlot5",
LoSlot6: "LoSlot6",
LoSlot7: "LoSlot7",
Locked: "Locked",
MedSlot0: "MedSlot0",
MedSlot1: "MedSlot1",
MedSlot2: "MedSlot2",
MedSlot3: "MedSlot3",
MedSlot4: "MedSlot4",
MedSlot5: "MedSlot5",
MedSlot6: "MedSlot6",
MedSlot7: "MedSlot7",
MobileDepotHold: "MobileDepotHold",
MoonMaterialBay: "MoonMaterialBay",
QuafeBay: "QuafeBay",
RigSlot0: "RigSlot0",
RigSlot1: "RigSlot1",
RigSlot2: "RigSlot2",
RigSlot3: "RigSlot3",
RigSlot4: "RigSlot4",
RigSlot5: "RigSlot5",
RigSlot6: "RigSlot6",
RigSlot7: "RigSlot7",
ShipHangar: "ShipHangar",
Skill: "Skill",
SpecializedAmmoHold: "SpecializedAmmoHold",
SpecializedAsteroidHold: "SpecializedAsteroidHold",
SpecializedCommandCenterHold: "SpecializedCommandCenterHold",
SpecializedFuelBay: "SpecializedFuelBay",
SpecializedGasHold: "SpecializedGasHold",
SpecializedIceHold: "SpecializedIceHold",
SpecializedIndustrialShipHold: "SpecializedIndustrialShipHold",
SpecializedLargeShipHold: "SpecializedLargeShipHold",
SpecializedMaterialBay: "SpecializedMaterialBay",
SpecializedMediumShipHold: "SpecializedMediumShipHold",
SpecializedMineralHold: "SpecializedMineralHold",
SpecializedOreHold: "SpecializedOreHold",
SpecializedPlanetaryCommoditiesHold: "SpecializedPlanetaryCommoditiesHold",
SpecializedSalvageHold: "SpecializedSalvageHold",
SpecializedShipHold: "SpecializedShipHold",
SpecializedSmallShipHold: "SpecializedSmallShipHold",
StructureDeedBay: "StructureDeedBay",
SubSystemBay: "SubSystemBay",
SubSystemSlot0: "SubSystemSlot0",
SubSystemSlot1: "SubSystemSlot1",
SubSystemSlot2: "SubSystemSlot2",
SubSystemSlot3: "SubSystemSlot3",
SubSystemSlot4: "SubSystemSlot4",
SubSystemSlot5: "SubSystemSlot5",
SubSystemSlot6: "SubSystemSlot6",
SubSystemSlot7: "SubSystemSlot7",
Unlocked: "Unlocked",
Wardrobe: "Wardrobe"
};
var GetCharactersCharacterIdAssets200OkLocationTypeEnum = {
Station: "station",
SolarSystem: "solar_system",
Item: "item",
Other: "other"
};
function instanceOfGetCharactersCharacterIdAssets200Ok(value) {
if (!("isSingleton" in value) || value["isSingleton"] === void 0) return false;
if (!("itemId" in value) || value["itemId"] === void 0) return false;
if (!("locationFlag" in value) || value["locationFlag"] === void 0) return false;
if (!("locationId" in value) || value["locationId"] === void 0) return false;
if (!("locationType" in value) || value["locationType"] === void 0) return false;
if (!("quantity" in value) || value["quantity"] === void 0) return false;
if (!("typeId" in value) || value["typeId"] === void 0) return false;
return true;
}
function GetCharactersCharacterIdAssets200OkFromJSON(json) {
return GetCharactersCharacterIdAssets200OkFromJSONTyped(json, false);
}
function GetCharactersCharacterIdAssets200OkFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"isBlueprintCopy": json["is_blueprint_copy"] == null ? void 0 : json["is_blueprint_copy"],
"isSingleton": json["is_singleton"],
"itemId": json["item_id"],
"locationFlag": json["location_flag"],
"locationId": json["location_id"],
"locationType": json["location_type"],
"quantity": json["quantity"],
"typeId": json["type_id"]
};
}
function GetCharactersCharacterIdAssets200OkToJSON(json) {
return GetCharactersCharacterIdAssets200OkToJSONTyped(json, false);
}
function GetCharactersCharacterIdAssets200OkToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"is_blueprint_copy": value["isBlueprintCopy"],
"is_singleton": value["isSingleton"],
"item_id": value["itemId"],
"location_flag": value["locationFlag"],
"location_id": value["locationId"],
"location_type": value["locationType"],
"quantity": value["quantity"],
"type_id": value["typeId"]
};
}
// src/models/GetCharactersCharacterIdAssetsNotFound.ts
function instanceOfGetCharactersCharacterIdAssetsNotFound(value) {
return true;
}
function GetCharactersCharacterIdAssetsNotFoundFromJSON(json) {
return GetCharactersCharacterIdAssetsNotFoundFromJSONTyped(json, false);
}
function GetCharactersCharacterIdAssetsNotFoundFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"error": json["error"] == null ? void 0 : json["error"]
};
}
function GetCharactersCharacterIdAssetsNotFoundToJSON(json) {
return GetCharactersCharacterIdAssetsNotFoundToJSONTyped(json, false);
}
function GetCharactersCharacterIdAssetsNotFoundToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"error": value["error"]
};
}
// src/models/GetCharactersCharacterIdAttributesOk.ts
function instanceOfGetCharactersCharacterIdAttributesOk(value) {
if (!("charisma" in value) || value["charisma"] === void 0) return false;
if (!("intelligence" in value) || value["intelligence"] === void 0) return false;
if (!("memory" in value) || value["memory"] === void 0) return false;
if (!("perception" in value) || value["perception"] === void 0) return false;
if (!("willpower" in value) || value["willpower"] === void 0) return false;
return true;
}
function GetCharactersCharacterIdAttributesOkFromJSON(json) {
return GetCharactersCharacterIdAttributesOkFromJSONTyped(json, false);
}
function GetCharactersCharacterIdAttributesOkFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"accruedRemapCooldownDate": json["accrued_remap_cooldown_date"] == null ? void 0 : new Date(json["accrued_remap_cooldown_date"]),
"bonusRemaps": json["bonus_remaps"] == null ? void 0 : json["bonus_remaps"],
"charisma": json["charisma"],
"intelligence": json["intelligence"],
"lastRemapDate": json["last_remap_date"] == null ? void 0 : new Date(json["last_remap_date"]),
"memory": json["memory"],
"perception": json["perception"],
"willpower": json["willpower"]
};
}
function GetCharactersCharacterIdAttributesOkToJSON(json) {
return GetCharactersCharacterIdAttributesOkToJSONTyped(json, false);
}
function GetCharactersCharacterIdAttributesOkToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"accrued_remap_cooldown_date": value["accruedRemapCooldownDate"] == null ? void 0 : value["accruedRemapCooldownDate"].toISOString(),
"bonus_remaps": value["bonusRemaps"],
"charisma": value["charisma"],
"intelligence": value["intelligence"],
"last_remap_date": value["lastRemapDate"] == null ? void 0 : value["lastRemapDate"].toISOString(),
"memory": value["memory"],
"perception": value["perception"],
"willpower": value["willpower"]
};
}
// src/models/GetCharactersCharacterIdBlueprints200Ok.ts
var GetCharactersCharacterIdBlueprints200OkLocationFlagEnum = {
AutoFit: "AutoFit",
Cargo: "Cargo",
CorpseBay: "CorpseBay",
DroneBay: "DroneBay",
FleetHangar: "FleetHangar",
Deliveries: "Deliveries",
HiddenModifiers: "HiddenModifiers",
Hangar: "Hangar",
HangarAll: "HangarAll",
LoSlot0: "LoSlot0",
LoSlot1: "LoSlot1",
LoSlot2: "LoSlot2",
LoSlot3: "LoSlot3",
LoSlot4: "LoSlot4",
LoSlot5: "LoSlot5",
LoSlot6: "LoSlot6",
LoSlot7: "LoSlot7",
MedSlot0: "MedSlot0",
MedSlot1: "MedSlot1",
MedSlot2: "MedSlot2",
MedSlot3: "MedSlot3",
MedSlot4: "MedSlot4",
MedSlot5: "MedSlot5",
MedSlot6: "MedSlot6",
MedSlot7: "MedSlot7",
HiSlot0: "HiSlot0",
HiSlot1: "HiSlot1",
HiSlot2: "HiSlot2",
HiSlot3: "HiSlot3",
HiSlot4: "HiSlot4",
HiSlot5: "HiSlot5",
HiSlot6: "HiSlot6",
HiSlot7: "HiSlot7",
AssetSafety: "AssetSafety",
Locked: "Locked",
Unlocked: "Unlocked",
Implant: "Implant",
QuafeBay: "QuafeBay",
RigSlot0: "RigSlot0",
RigSlot1: "RigSlot1",
RigSlot2: "RigSlot2",
RigSlot3: "RigSlot3",
RigSlot4: "RigSlot4",
RigSlot5: "RigSlot5",
RigSlot6: "RigSlot6",
RigSlot7: "RigSlot7",
ShipHangar: "ShipHangar",
SpecializedFuelBay: "SpecializedFuelBay",
SpecializedOreHold: "SpecializedOreHold",
SpecializedGasHold: "SpecializedGasHold",
SpecializedMineralHold: "SpecializedMineralHold",
SpecializedSalvageHold: "SpecializedSalvageHold",
SpecializedShipHold: "SpecializedShipHold",
SpecializedSmallShipHold: "SpecializedSmallShipHold",
SpecializedMediumShipHold: "SpecializedMediumShipHold",
SpecializedLargeShipHold: "SpecializedLargeShipHold",
SpecializedIndustrialShipHold: "SpecializedIndustrialShipHold",
SpecializedAmmoHold: "SpecializedAmmoHold",
SpecializedCommandCenterHold: "SpecializedCommandCenterHold",
SpecializedPlanetaryCommoditiesHold: "SpecializedPlanetaryCommoditiesHold",
SpecializedMaterialBay: "SpecializedMaterialBay",
SubSystemSlot0: "SubSystemSlot0",
SubSystemSlot1: "SubSystemSlot1",
SubSystemSlot2: "SubSystemSlot2",
SubSystemSlot3: "SubSystemSlot3",
SubSystemSlot4: "SubSystemSlot4",
SubSystemSlot5: "SubSystemSlot5",
SubSystemSlot6: "SubSystemSlot6",
SubSystemSlot7: "SubSystemSlot7",
FighterBay: "FighterBay",
FighterTube0: "FighterTube0",
FighterTube1: "FighterTube1",
FighterTube2: "FighterTube2",
FighterTube3: "FighterTube3",
FighterTube4: "FighterTube4",
Module: "Module"
};
function instanceOfGetCharactersCharacterIdBlueprints200Ok(value) {
if (!("itemId" in value) || value["itemId"] === void 0) return false;
if (!("locationFlag" in value) || value["locationFlag"] === void 0) return false;
if (!("locationId" in value) || value["locationId"] === void 0) return false;
if (!("materialEfficiency" in value) || value["materialEfficiency"] === void 0) return false;
if (!("quantity" in value) || value["quantity"] === void 0) return false;
if (!("runs" in value) || value["runs"] === void 0) return false;
if (!("timeEfficiency" in value) || value["timeEfficiency"] === void 0) return false;
if (!("typeId" in value) || value["typeId"] === void 0) return false;
return true;
}
function GetCharactersCharacterIdBlueprints200OkFromJSON(json) {
return GetCharactersCharacterIdBlueprints200OkFromJSONTyped(json, false);
}
function GetCharactersCharacterIdBlueprints200OkFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"itemId": json["item_id"],
"locationFlag": json["location_flag"],
"locationId": json["location_id"],
"materialEfficiency": json["material_efficiency"],
"quantity": json["quantity"],
"runs": json["runs"],
"timeEfficiency": json["time_efficiency"],
"typeId": json["type_id"]
};
}
function GetCharactersCharacterIdBlueprints200OkToJSON(json) {
return GetCharactersCharacterIdBlueprints200OkToJSONTyped(json, false);
}
function GetCharactersCharacterIdBlueprints200OkToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"item_id": value["itemId"],
"location_flag": value["locationFlag"],
"location_id": value["locationId"],
"material_efficiency": value["materialEfficiency"],
"quantity": value["quantity"],
"runs": value["runs"],
"time_efficiency": value["timeEfficiency"],
"type_id": value["typeId"]
};
}
// src/models/GetCharactersCharacterIdBookmarksCoordinates.ts
function instanceOfGetCharactersCharacterIdBookmarksCoordinates(value) {
if (!("x" in value) || value["x"] === void 0) return false;
if (!("y" in value) || value["y"] === void 0) return false;
if (!("z" in value) || value["z"] === void 0) return false;
return true;
}
function GetCharactersCharacterIdBookmarksCoordinatesFromJSON(json) {
return GetCharactersCharacterIdBookmarksCoordinatesFromJSONTyped(json, false);
}
function GetCharactersCharacterIdBookmarksCoordinatesFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"x": json["x"],
"y": json["y"],
"z": json["z"]
};
}
function GetCharactersCharacterIdBookmarksCoordinatesToJSON(json) {
return GetCharactersCharacterIdBookmarksCoordinatesToJSONTyped(json, false);
}
function GetCharactersCharacterIdBookmarksCoordinatesToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"x": value["x"],
"y": value["y"],
"z": value["z"]
};
}
// src/models/GetCharactersCharacterIdBookmarksItem.ts
function instanceOfGetCharactersCharacterIdBookmarksItem(value) {
if (!("itemId" in value) || value["itemId"] === void 0) return false;
if (!("typeId" in value) || value["typeId"] === void 0) return false;
return true;
}
function GetCharactersCharacterIdBookmarksItemFromJSON(json) {
return GetCharactersCharacterIdBookmarksItemFromJSONTyped(json, false);
}
function GetCharactersCharacterIdBookmarksItemFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"itemId": json["item_id"],
"typeId": json["type_id"]
};
}
function GetCharactersCharacterIdBookmarksItemToJSON(json) {
return GetCharactersCharacterIdBookmarksItemToJSONTyped(json, false);
}
function GetCharactersCharacterIdBookmarksItemToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"item_id": value["itemId"],
"type_id": value["typeId"]
};
}
// src/models/GetCharactersCharacterIdBookmarks200Ok.ts
function instanceOfGetCharactersCharacterIdBookmarks200Ok(value) {
if (!("bookmarkId" in value) || value["bookmarkId"] === void 0) return false;
if (!("created" in value) || value["created"] === void 0) return false;
if (!("creatorId" in value) || value["creatorId"] === void 0) return false;
if (!("label" in value) || value["label"] === void 0) return false;
if (!("locationId" in value) || value["locationId"] === void 0) return false;
if (!("notes" in value) || value["notes"] === void 0) return false;
return true;
}
function GetCharactersCharacterIdBookmarks200OkFromJSON(json) {
return GetCharactersCharacterIdBookmarks200OkFromJSONTyped(json, false);
}
function GetCharactersCharacterIdBookmarks200OkFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"bookmarkId": json["bookmark_id"],
"coordinates": json["coordinates"] == null ? void 0 : GetCharactersCharacterIdBookmarksCoordinatesFromJSON(json["coordinates"]),
"created": new Date(json["created"]),
"creatorId": json["creator_id"],
"folderId": json["folder_id"] == null ? void 0 : json["folder_id"],
"item": json["item"] == null ? void 0 : GetCharactersCharacterIdBookmarksItemFromJSON(json["item"]),
"label": json["label"],
"locationId": json["location_id"],
"notes": json["notes"]
};
}
function GetCharactersCharacterIdBookmarks200OkToJSON(json) {
return GetCharactersCharacterIdBookmarks200OkToJSONTyped(json, false);
}
function GetCharactersCharacterIdBookmarks200OkToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"bookmark_id": value["bookmarkId"],
"coordinates": GetCharactersCharacterIdBookmarksCoordinatesToJSON(value["coordinates"]),
"created": value["created"].toISOString(),
"creator_id": value["creatorId"],
"folder_id": value["folderId"],
"item": GetCharactersCharacterIdBookmarksItemToJSON(value["item"]),
"label": value["label"],
"location_id": value["locationId"],
"notes": value["notes"]
};
}
// src/models/GetCharactersCharacterIdBookmarksFolders200Ok.ts
function instanceOfGetCharactersCharacterIdBookmarksFolders200Ok(value) {
if (!("folderId" in value) || value["folderId"] === void 0) return false;
if (!("name" in value) || value["name"] === void 0) return false;
return true;
}
function GetCharactersCharacterIdBookmarksFolders200OkFromJSON(json) {
return GetCharactersCharacterIdBookmarksFolders200OkFromJSONTyped(json, false);
}
function GetCharactersCharacterIdBookmarksFolders200OkFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"folderId": json["folder_id"],
"name": json["name"]
};
}
function GetCharactersCharacterIdBookmarksFolders200OkToJSON(json) {
return GetCharactersCharacterIdBookmarksFolders200OkToJSONTyped(json, false);
}
function GetCharactersCharacterIdBookmarksFolders200OkToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"folder_id": value["folderId"],
"name": value["name"]
};
}
// src/models/GetCharactersCharacterIdCalendar200Ok.ts
var GetCharactersCharacterIdCalendar200OkEventResponseEnum = {
Declined: "declined",
NotResponded: "not_responded",
Accepted: "accepted",
Tentative: "tentative"
};
function instanceOfGetCharactersCharacterIdCalendar200Ok(value) {
return true;
}
function GetCharactersCharacterIdCalendar200OkFromJSON(json) {
return GetCharactersCharacterIdCalendar200OkFromJSONTyped(json, false);
}
function GetCharactersCharacterIdCalendar200OkFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"eventDate": json["event_date"] == null ? void 0 : new Date(json["event_date"]),
"eventId": json["event_id"] == null ? void 0 : json["event_id"],
"eventResponse": json["event_response"] == null ? void 0 : json["event_response"],
"importance": json["importance"] == null ? void 0 : json["importance"],
"title": json["title"] == null ? void 0 : json["title"]
};
}
function GetCharactersCharacterIdCalendar200OkToJSON(json) {
return GetCharactersCharacterIdCalendar200OkToJSONTyped(json, false);
}
function GetCharactersCharacterIdCalendar200OkToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"event_date": value["eventDate"] == null ? void 0 : value["eventDate"].toISOString(),
"event_id": value["eventId"],
"event_response": value["eventResponse"],
"importance": value["importance"],
"title": value["title"]
};
}
// src/models/GetCharactersCharacterIdCalendarEventIdAttendees200Ok.ts
var GetCharactersCharacterIdCalendarEventIdAttendees200OkEventResponseEnum = {
Declined: "declined",
NotResponded: "not_responded",
Accepted: "accepted",
Tentative: "tentative"
};
function instanceOfGetCharactersCharacterIdCalendarEventIdAttendees200Ok(value) {
return true;
}
function GetCharactersCharacterIdCalendarEventIdAttendees200OkFromJSON(json) {
return GetCharactersCharacterIdCalendarEventIdAttendees200OkFromJSONTyped(json, false);
}
function GetCharactersCharacterIdCalendarEventIdAttendees200OkFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"characterId": json["character_id"] == null ? void 0 : json["character_id"],
"eventResponse": json["event_response"] == null ? void 0 : json["event_response"]
};
}
function GetCharactersCharacterIdCalendarEventIdAttendees200OkToJSON(json) {
return GetCharactersCharacterIdCalendarEventIdAttendees200OkToJSONTyped(json, false);
}
function GetCharactersCharacterIdCalendarEventIdAttendees200OkToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"character_id": value["characterId"],
"event_response": value["eventResponse"]
};
}
// src/models/GetCharactersCharacterIdCalendarEventIdAttendeesNotFound.ts
function instanceOfGetCharactersCharacterIdCalendarEventIdAttendeesNotFound(value) {
return true;
}
function GetCharactersCharacterIdCalendarEventIdAttendeesNotFoundFromJSON(json) {
return GetCharactersCharacterIdCalendarEventIdAttendeesNotFoundFromJSONTyped(json, false);
}
function GetCharactersCharacterIdCalendarEventIdAttendeesNotFoundFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"error": json["error"] == null ? void 0 : json["error"]
};
}
function GetCharactersCharacterIdCalendarEventIdAttendeesNotFoundToJSON(json) {
return GetCharactersCharacterIdCalendarEventIdAttendeesNotFoundToJSONTyped(json, false);
}
function GetCharactersCharacterIdCalendarEventIdAttendeesNotFoundToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"error": value["error"]
};
}
// src/models/GetCharactersCharacterIdCalendarEventIdNotFound.ts
function instanceOfGetCharactersCharacterIdCalendarEventIdNotFound(value) {
return true;
}
function GetCharactersCharacterIdCalendarEventIdNotFoundFromJSON(json) {
return GetCharactersCharacterIdCalendarEventIdNotFoundFromJSONTyped(json, false);
}
function GetCharactersCharacterIdCalendarEventIdNotFoundFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"error": json["error"] == null ? void 0 : json["error"]
};
}
function GetCharactersCharacterIdCalendarEventIdNotFoundToJSON(json) {
return GetCharactersCharacterIdCalendarEventIdNotFoundToJSONTyped(json, false);
}
function GetCharactersCharacterIdCalendarEventIdNotFoundToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"error": value["error"]
};
}
// src/models/GetCharactersCharacterIdCalendarEventIdOk.ts
var GetCharactersCharacterIdCalendarEventIdOkOwnerTypeEnum = {
EveServer: "eve_server",
Corporation: "corporation",
Faction: "faction",
Character: "character",
Alliance: "alliance"
};
function instanceOfGetCharactersCharacterIdCalendarEventIdOk(value) {
if (!("date" in value) || value["date"] === void 0) return false;
if (!("duration" in value) || value["duration"] === void 0) return false;
if (!("eventId" in value) || value["eventId"] === void 0) return false;
if (!("importance" in value) || value["importance"] === void 0) return false;
if (!("ownerId" in value) || value["ownerId"] === void 0) return false;
if (!("ownerName" in value) || value["ownerName"] === void 0) return false;
if (!("ownerType" in value) || value["ownerType"] === void 0) return false;
if (!("response" in value) || value["response"] === void 0) return false;
if (!("text" in value) || value["text"] === void 0) return false;
if (!("title" in value) || value["title"] === void 0) return false;
return true;
}
function GetCharactersCharacterIdCalendarEventIdOkFromJSON(json) {
return GetCharactersCharacterIdCalendarEventIdOkFromJSONTyped(json, false);
}
function GetCharactersCharacterIdCalendarEventIdOkFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"date": new Date(json["date"]),
"duration": json["duration"],
"eventId": json["event_id"],
"importance": json["importance"],
"ownerId": json["owner_id"],
"ownerName": json["owner_name"],
"ownerType": json["owner_type"],
"response": json["response"],
"text": json["text"],
"title": json["title"]
};
}
function GetCharactersCharacterIdCalendarEventIdOkToJSON(json) {
return GetCharactersCharacterIdCalendarEventIdOkToJSONTyped(json, false);
}
function GetCharactersCharacterIdCalendarEventIdOkToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"date": value["date"].toISOString(),
"duration": value["duration"],
"event_id": value["eventId"],
"importance": value["importance"],
"owner_id": value["ownerId"],
"owner_name": value["ownerName"],
"owner_type": value["ownerType"],
"response": value["response"],
"text": value["text"],
"title": value["title"]
};
}
// src/models/GetCharactersCharacterIdClonesHomeLocation.ts
var GetCharactersCharacterIdClonesHomeLocationLocationTypeEnum = {
Station: "station",
Structure: "structure"
};
function instanceOfGetCharactersCharacterIdClonesHomeLocation(value) {
return true;
}
function GetCharactersCharacterIdClonesHomeLocationFromJSON(json) {
return GetCharactersCharacterIdClonesHomeLocationFromJSONTyped(json, false);
}
function GetCharactersCharacterIdClonesHomeLocationFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"locationId": json["location_id"] == null ? void 0 : json["location_id"],
"locationType": json["location_type"] == null ? void 0 : json["location_type"]
};
}
function GetCharactersCharacterIdClonesHomeLocationToJSON(json) {
return GetCharactersCharacterIdClonesHomeLocationToJSONTyped(json, false);
}
function GetCharactersCharacterIdClonesHomeLocationToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
"location_id": value["locationId"],
"location_type": value["locationType"]
};
}
// src/models/GetCharactersCharacterIdClonesJumpClone.ts
var GetCharactersCharacterIdClonesJumpCloneLocationTypeEnum = {
Station: "station",
Structure: "structure"
};
function instanceOfGetCharactersCharacterIdClonesJumpClone(value) {
if (!("implants" in value) || value["implants"] === void 0) return false;
if (!("jumpCloneId" in value) || value["jumpCloneId"] === void 0) return false;
if (!("locationId" in value) || value["locationId"] === void 0) return false;
if (!("locationType" in value) || value["locationType"] === void 0) return false;
return true;
}
function GetCharactersCharacterIdClonesJumpCloneFromJSON(json) {
return GetCharactersCharacterIdClonesJumpCloneFromJSONTyped(json, false);
}
function GetCharactersCharacterIdClonesJumpCloneFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
"implants": json["implants"],
"jumpCloneId": json["jump_clone_id"],
"locationId": json["location_id"],
"locationType": json["location_type"],
"name": json["name"] == null ? void 0 : json["name"]
};
}
function GetCharactersCharacterIdClonesJumpCloneToJSON(json) {
return GetCharactersCh