From 664d65e5b1f9f7142d2145de1fa66537bb33c8e9 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 3 Jun 2023 12:31:13 -0400 Subject: [PATCH] generate new client based on 06-03-2023 reset --- src/.openapi-generator/FILES | 7 + src/apis/FleetApi.ts | 155 ++++++++++++++++++ src/models/GetMounts200Response.ts | 73 +++++++++ src/models/InstallMount201Response.ts | 73 +++++++++ src/models/InstallMount201ResponseData.ts | 118 +++++++++++++ .../InstallMount201ResponseDataTransaction.ts | 75 +++++++++ src/models/InstallMountRequest.ts | 66 ++++++++ src/models/RegisterRequest.ts | 18 +- src/models/RemoveMount201Response.ts | 73 +++++++++ src/models/RemoveMountRequest.ts | 66 ++++++++ src/models/index.ts | 7 + 11 files changed, 715 insertions(+), 16 deletions(-) create mode 100644 src/models/GetMounts200Response.ts create mode 100644 src/models/InstallMount201Response.ts create mode 100644 src/models/InstallMount201ResponseData.ts create mode 100644 src/models/InstallMount201ResponseDataTransaction.ts create mode 100644 src/models/InstallMountRequest.ts create mode 100644 src/models/RemoveMount201Response.ts create mode 100644 src/models/RemoveMountRequest.ts diff --git a/src/.openapi-generator/FILES b/src/.openapi-generator/FILES index 765cb17..e4fb5b5 100644 --- a/src/.openapi-generator/FILES +++ b/src/.openapi-generator/FILES @@ -44,6 +44,7 @@ models/GetFaction200Response.ts models/GetFactions200Response.ts models/GetJumpGate200Response.ts models/GetMarket200Response.ts +models/GetMounts200Response.ts models/GetMyAgent200Response.ts models/GetMyShip200Response.ts models/GetMyShipCargo200Response.ts @@ -63,6 +64,10 @@ models/GetSystem200Response.ts models/GetSystemWaypoints200Response.ts models/GetSystems200Response.ts models/GetWaypoint200Response.ts +models/InstallMount201Response.ts +models/InstallMount201ResponseData.ts +models/InstallMount201ResponseDataTransaction.ts +models/InstallMountRequest.ts models/Jettison200Response.ts models/Jettison200ResponseData.ts models/JettisonRequest.ts @@ -92,6 +97,8 @@ models/RefuelShip200ResponseData.ts models/Register201Response.ts models/Register201ResponseData.ts models/RegisterRequest.ts +models/RemoveMount201Response.ts +models/RemoveMountRequest.ts models/ScannedShip.ts models/ScannedShipEngine.ts models/ScannedShipFrame.ts diff --git a/src/apis/FleetApi.ts b/src/apis/FleetApi.ts index 5de1d58..d0263e2 100644 --- a/src/apis/FleetApi.ts +++ b/src/apis/FleetApi.ts @@ -23,11 +23,14 @@ import type { DockShip200Response, ExtractResources201Response, ExtractResourcesRequest, + GetMounts200Response, GetMyShip200Response, GetMyShipCargo200Response, GetMyShips200Response, GetShipCooldown200Response, GetShipNav200Response, + InstallMount201Response, + InstallMountRequest, Jettison200Response, JettisonRequest, JumpShip200Response, @@ -42,6 +45,8 @@ import type { PurchaseShip201Response, PurchaseShipRequest, RefuelShip200Response, + RemoveMount201Response, + RemoveMountRequest, SellCargo201Response, SellCargoRequest, ShipRefine200Response, @@ -66,6 +71,8 @@ import { ExtractResources201ResponseToJSON, ExtractResourcesRequestFromJSON, ExtractResourcesRequestToJSON, + GetMounts200ResponseFromJSON, + GetMounts200ResponseToJSON, GetMyShip200ResponseFromJSON, GetMyShip200ResponseToJSON, GetMyShipCargo200ResponseFromJSON, @@ -76,6 +83,10 @@ import { GetShipCooldown200ResponseToJSON, GetShipNav200ResponseFromJSON, GetShipNav200ResponseToJSON, + InstallMount201ResponseFromJSON, + InstallMount201ResponseToJSON, + InstallMountRequestFromJSON, + InstallMountRequestToJSON, Jettison200ResponseFromJSON, Jettison200ResponseToJSON, JettisonRequestFromJSON, @@ -104,6 +115,10 @@ import { PurchaseShipRequestToJSON, RefuelShip200ResponseFromJSON, RefuelShip200ResponseToJSON, + RemoveMount201ResponseFromJSON, + RemoveMount201ResponseToJSON, + RemoveMountRequestFromJSON, + RemoveMountRequestToJSON, SellCargo201ResponseFromJSON, SellCargo201ResponseToJSON, SellCargoRequestFromJSON, @@ -147,6 +162,10 @@ export interface ExtractResourcesOperationRequest { extractResourcesRequest?: ExtractResourcesRequest; } +export interface GetMountsRequest { + shipSymbol: string; +} + export interface GetMyShipRequest { shipSymbol: string; } @@ -168,6 +187,11 @@ export interface GetShipNavRequest { shipSymbol: string; } +export interface InstallMountOperationRequest { + shipSymbol: string; + installMountRequest?: InstallMountRequest; +} + export interface JettisonOperationRequest { shipSymbol: string; jettisonRequest?: JettisonRequest; @@ -210,6 +234,11 @@ export interface RefuelShipRequest { shipSymbol: string; } +export interface RemoveMountOperationRequest { + shipSymbol: string; + removeMountRequest?: RemoveMountRequest; +} + export interface SellCargoOperationRequest { shipSymbol: string; sellCargoRequest?: SellCargoRequest; @@ -518,6 +547,46 @@ export class FleetApi extends runtime.BaseAPI { return await response.value(); } + /** + * Get the mounts on a ship. + * Get Mounts + */ + async getMountsRaw(requestParameters: GetMountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.shipSymbol === null || requestParameters.shipSymbol === undefined) { + throw new runtime.RequiredError('shipSymbol','Required parameter requestParameters.shipSymbol was null or undefined when calling getMounts.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("AgentToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/my/ships/{shipSymbol}/mounts`.replace(`{${"shipSymbol"}}`, encodeURIComponent(String(requestParameters.shipSymbol))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetMounts200ResponseFromJSON(jsonValue)); + } + + /** + * Get the mounts on a ship. + * Get Mounts + */ + async getMounts(shipSymbol: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMountsRaw({ shipSymbol: shipSymbol }, initOverrides); + return await response.value(); + } + /** * Retrieve the details of your ship. * Get Ship @@ -722,6 +791,49 @@ export class FleetApi extends runtime.BaseAPI { return await response.value(); } + /** + * Install a mount on a ship. + * Install Mount + */ + async installMountRaw(requestParameters: InstallMountOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.shipSymbol === null || requestParameters.shipSymbol === undefined) { + throw new runtime.RequiredError('shipSymbol','Required parameter requestParameters.shipSymbol was null or undefined when calling installMount.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("AgentToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/my/ships/{shipSymbol}/mounts/install`.replace(`{${"shipSymbol"}}`, encodeURIComponent(String(requestParameters.shipSymbol))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: InstallMountRequestToJSON(requestParameters.installMountRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InstallMount201ResponseFromJSON(jsonValue)); + } + + /** + * Install a mount on a ship. + * Install Mount + */ + async installMount(shipSymbol: string, installMountRequest?: InstallMountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.installMountRaw({ shipSymbol: shipSymbol, installMountRequest: installMountRequest }, initOverrides); + return await response.value(); + } + /** * Jettison cargo from your ship\'s cargo hold. * Jettison Cargo @@ -1099,6 +1211,49 @@ export class FleetApi extends runtime.BaseAPI { return await response.value(); } + /** + * Remove a mount from a ship. + * Remove Mount + */ + async removeMountRaw(requestParameters: RemoveMountOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.shipSymbol === null || requestParameters.shipSymbol === undefined) { + throw new runtime.RequiredError('shipSymbol','Required parameter requestParameters.shipSymbol was null or undefined when calling removeMount.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("AgentToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/my/ships/{shipSymbol}/mounts/remove`.replace(`{${"shipSymbol"}}`, encodeURIComponent(String(requestParameters.shipSymbol))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RemoveMountRequestToJSON(requestParameters.removeMountRequest), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RemoveMount201ResponseFromJSON(jsonValue)); + } + + /** + * Remove a mount from a ship. + * Remove Mount + */ + async removeMount(shipSymbol: string, removeMountRequest?: RemoveMountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.removeMountRaw({ shipSymbol: shipSymbol, removeMountRequest: removeMountRequest }, initOverrides); + return await response.value(); + } + /** * Sell cargo. * Sell Cargo diff --git a/src/models/GetMounts200Response.ts b/src/models/GetMounts200Response.ts new file mode 100644 index 0000000..fbdb8ab --- /dev/null +++ b/src/models/GetMounts200Response.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SpaceTraders API + * SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe. The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server. ```json http { \"method\": \"GET\", \"url\": \"https://api.spacetraders.io/v2\", } ``` Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community. We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: joel@spacetraders.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ShipMount } from './ShipMount'; +import { + ShipMountFromJSON, + ShipMountFromJSONTyped, + ShipMountToJSON, +} from './ShipMount'; + +/** + * + * @export + * @interface GetMounts200Response + */ +export interface GetMounts200Response { + /** + * + * @type {Array} + * @memberof GetMounts200Response + */ + data: Array; +} + +/** + * Check if a given object implements the GetMounts200Response interface. + */ +export function instanceOfGetMounts200Response(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "data" in value; + + return isInstance; +} + +export function GetMounts200ResponseFromJSON(json: any): GetMounts200Response { + return GetMounts200ResponseFromJSONTyped(json, false); +} + +export function GetMounts200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetMounts200Response { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'data': ((json['data'] as Array).map(ShipMountFromJSON)), + }; +} + +export function GetMounts200ResponseToJSON(value?: GetMounts200Response | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'data': ((value.data as Array).map(ShipMountToJSON)), + }; +} + diff --git a/src/models/InstallMount201Response.ts b/src/models/InstallMount201Response.ts new file mode 100644 index 0000000..95ac82a --- /dev/null +++ b/src/models/InstallMount201Response.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SpaceTraders API + * SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe. The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server. ```json http { \"method\": \"GET\", \"url\": \"https://api.spacetraders.io/v2\", } ``` Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community. We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: joel@spacetraders.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { InstallMount201ResponseData } from './InstallMount201ResponseData'; +import { + InstallMount201ResponseDataFromJSON, + InstallMount201ResponseDataFromJSONTyped, + InstallMount201ResponseDataToJSON, +} from './InstallMount201ResponseData'; + +/** + * + * @export + * @interface InstallMount201Response + */ +export interface InstallMount201Response { + /** + * + * @type {InstallMount201ResponseData} + * @memberof InstallMount201Response + */ + data: InstallMount201ResponseData; +} + +/** + * Check if a given object implements the InstallMount201Response interface. + */ +export function instanceOfInstallMount201Response(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "data" in value; + + return isInstance; +} + +export function InstallMount201ResponseFromJSON(json: any): InstallMount201Response { + return InstallMount201ResponseFromJSONTyped(json, false); +} + +export function InstallMount201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): InstallMount201Response { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'data': InstallMount201ResponseDataFromJSON(json['data']), + }; +} + +export function InstallMount201ResponseToJSON(value?: InstallMount201Response | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'data': InstallMount201ResponseDataToJSON(value.data), + }; +} + diff --git a/src/models/InstallMount201ResponseData.ts b/src/models/InstallMount201ResponseData.ts new file mode 100644 index 0000000..33c5c34 --- /dev/null +++ b/src/models/InstallMount201ResponseData.ts @@ -0,0 +1,118 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SpaceTraders API + * SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe. The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server. ```json http { \"method\": \"GET\", \"url\": \"https://api.spacetraders.io/v2\", } ``` Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community. We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: joel@spacetraders.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Agent } from './Agent'; +import { + AgentFromJSON, + AgentFromJSONTyped, + AgentToJSON, +} from './Agent'; +import type { InstallMount201ResponseDataTransaction } from './InstallMount201ResponseDataTransaction'; +import { + InstallMount201ResponseDataTransactionFromJSON, + InstallMount201ResponseDataTransactionFromJSONTyped, + InstallMount201ResponseDataTransactionToJSON, +} from './InstallMount201ResponseDataTransaction'; +import type { ShipCargo } from './ShipCargo'; +import { + ShipCargoFromJSON, + ShipCargoFromJSONTyped, + ShipCargoToJSON, +} from './ShipCargo'; +import type { ShipMount } from './ShipMount'; +import { + ShipMountFromJSON, + ShipMountFromJSONTyped, + ShipMountToJSON, +} from './ShipMount'; + +/** + * + * @export + * @interface InstallMount201ResponseData + */ +export interface InstallMount201ResponseData { + /** + * + * @type {Agent} + * @memberof InstallMount201ResponseData + */ + agent: Agent; + /** + * + * @type {Array} + * @memberof InstallMount201ResponseData + */ + mounts: Array; + /** + * + * @type {ShipCargo} + * @memberof InstallMount201ResponseData + */ + cargo: ShipCargo; + /** + * + * @type {InstallMount201ResponseDataTransaction} + * @memberof InstallMount201ResponseData + */ + transaction: InstallMount201ResponseDataTransaction; +} + +/** + * Check if a given object implements the InstallMount201ResponseData interface. + */ +export function instanceOfInstallMount201ResponseData(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "agent" in value; + isInstance = isInstance && "mounts" in value; + isInstance = isInstance && "cargo" in value; + isInstance = isInstance && "transaction" in value; + + return isInstance; +} + +export function InstallMount201ResponseDataFromJSON(json: any): InstallMount201ResponseData { + return InstallMount201ResponseDataFromJSONTyped(json, false); +} + +export function InstallMount201ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): InstallMount201ResponseData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'agent': AgentFromJSON(json['agent']), + 'mounts': ((json['mounts'] as Array).map(ShipMountFromJSON)), + 'cargo': ShipCargoFromJSON(json['cargo']), + 'transaction': InstallMount201ResponseDataTransactionFromJSON(json['transaction']), + }; +} + +export function InstallMount201ResponseDataToJSON(value?: InstallMount201ResponseData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'agent': AgentToJSON(value.agent), + 'mounts': ((value.mounts as Array).map(ShipMountToJSON)), + 'cargo': ShipCargoToJSON(value.cargo), + 'transaction': InstallMount201ResponseDataTransactionToJSON(value.transaction), + }; +} + diff --git a/src/models/InstallMount201ResponseDataTransaction.ts b/src/models/InstallMount201ResponseDataTransaction.ts new file mode 100644 index 0000000..d47c58c --- /dev/null +++ b/src/models/InstallMount201ResponseDataTransaction.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SpaceTraders API + * SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe. The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server. ```json http { \"method\": \"GET\", \"url\": \"https://api.spacetraders.io/v2\", } ``` Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community. We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: joel@spacetraders.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface InstallMount201ResponseDataTransaction + */ +export interface InstallMount201ResponseDataTransaction { + /** + * The total price of the transaction. + * @type {number} + * @memberof InstallMount201ResponseDataTransaction + */ + totalPrice: number; + /** + * The timestamp of the transaction. + * @type {string} + * @memberof InstallMount201ResponseDataTransaction + */ + timestamp: string; +} + +/** + * Check if a given object implements the InstallMount201ResponseDataTransaction interface. + */ +export function instanceOfInstallMount201ResponseDataTransaction(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "totalPrice" in value; + isInstance = isInstance && "timestamp" in value; + + return isInstance; +} + +export function InstallMount201ResponseDataTransactionFromJSON(json: any): InstallMount201ResponseDataTransaction { + return InstallMount201ResponseDataTransactionFromJSONTyped(json, false); +} + +export function InstallMount201ResponseDataTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): InstallMount201ResponseDataTransaction { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'totalPrice': json['totalPrice'], + 'timestamp': json['timestamp'], + }; +} + +export function InstallMount201ResponseDataTransactionToJSON(value?: InstallMount201ResponseDataTransaction | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'totalPrice': value.totalPrice, + 'timestamp': value.timestamp, + }; +} + diff --git a/src/models/InstallMountRequest.ts b/src/models/InstallMountRequest.ts new file mode 100644 index 0000000..5d669d1 --- /dev/null +++ b/src/models/InstallMountRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SpaceTraders API + * SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe. The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server. ```json http { \"method\": \"GET\", \"url\": \"https://api.spacetraders.io/v2\", } ``` Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community. We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: joel@spacetraders.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface InstallMountRequest + */ +export interface InstallMountRequest { + /** + * + * @type {string} + * @memberof InstallMountRequest + */ + symbol: string; +} + +/** + * Check if a given object implements the InstallMountRequest interface. + */ +export function instanceOfInstallMountRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "symbol" in value; + + return isInstance; +} + +export function InstallMountRequestFromJSON(json: any): InstallMountRequest { + return InstallMountRequestFromJSONTyped(json, false); +} + +export function InstallMountRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): InstallMountRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'symbol': json['symbol'], + }; +} + +export function InstallMountRequestToJSON(value?: InstallMountRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'symbol': value.symbol, + }; +} + diff --git a/src/models/RegisterRequest.ts b/src/models/RegisterRequest.ts index 5703689..d3b9661 100644 --- a/src/models/RegisterRequest.ts +++ b/src/models/RegisterRequest.ts @@ -21,10 +21,10 @@ import { exists, mapValues } from '../runtime'; export interface RegisterRequest { /** * The faction you choose determines your headquarters. - * @type {string} + * @type {any} * @memberof RegisterRequest */ - faction: RegisterRequestFactionEnum; + faction: any | null; /** * How other agents will see your ships and information. * @type {string} @@ -39,20 +39,6 @@ export interface RegisterRequest { email?: string; } - -/** - * @export - */ -export const RegisterRequestFactionEnum = { - Cosmic: 'COSMIC', - Void: 'VOID', - Galactic: 'GALACTIC', - Quantum: 'QUANTUM', - Dominion: 'DOMINION' -} as const; -export type RegisterRequestFactionEnum = typeof RegisterRequestFactionEnum[keyof typeof RegisterRequestFactionEnum]; - - /** * Check if a given object implements the RegisterRequest interface. */ diff --git a/src/models/RemoveMount201Response.ts b/src/models/RemoveMount201Response.ts new file mode 100644 index 0000000..5c8ad64 --- /dev/null +++ b/src/models/RemoveMount201Response.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SpaceTraders API + * SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe. The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server. ```json http { \"method\": \"GET\", \"url\": \"https://api.spacetraders.io/v2\", } ``` Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community. We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: joel@spacetraders.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { InstallMount201ResponseData } from './InstallMount201ResponseData'; +import { + InstallMount201ResponseDataFromJSON, + InstallMount201ResponseDataFromJSONTyped, + InstallMount201ResponseDataToJSON, +} from './InstallMount201ResponseData'; + +/** + * + * @export + * @interface RemoveMount201Response + */ +export interface RemoveMount201Response { + /** + * + * @type {InstallMount201ResponseData} + * @memberof RemoveMount201Response + */ + data: InstallMount201ResponseData; +} + +/** + * Check if a given object implements the RemoveMount201Response interface. + */ +export function instanceOfRemoveMount201Response(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "data" in value; + + return isInstance; +} + +export function RemoveMount201ResponseFromJSON(json: any): RemoveMount201Response { + return RemoveMount201ResponseFromJSONTyped(json, false); +} + +export function RemoveMount201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemoveMount201Response { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'data': InstallMount201ResponseDataFromJSON(json['data']), + }; +} + +export function RemoveMount201ResponseToJSON(value?: RemoveMount201Response | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'data': InstallMount201ResponseDataToJSON(value.data), + }; +} + diff --git a/src/models/RemoveMountRequest.ts b/src/models/RemoveMountRequest.ts new file mode 100644 index 0000000..6cf1dc1 --- /dev/null +++ b/src/models/RemoveMountRequest.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SpaceTraders API + * SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe. The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server. ```json http { \"method\": \"GET\", \"url\": \"https://api.spacetraders.io/v2\", } ``` Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community. We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players. + * + * The version of the OpenAPI document: 2.0.0 + * Contact: joel@spacetraders.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface RemoveMountRequest + */ +export interface RemoveMountRequest { + /** + * + * @type {string} + * @memberof RemoveMountRequest + */ + symbol: string; +} + +/** + * Check if a given object implements the RemoveMountRequest interface. + */ +export function instanceOfRemoveMountRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "symbol" in value; + + return isInstance; +} + +export function RemoveMountRequestFromJSON(json: any): RemoveMountRequest { + return RemoveMountRequestFromJSONTyped(json, false); +} + +export function RemoveMountRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemoveMountRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'symbol': json['symbol'], + }; +} + +export function RemoveMountRequestToJSON(value?: RemoveMountRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'symbol': value.symbol, + }; +} + diff --git a/src/models/index.ts b/src/models/index.ts index dd9bef1..d143593 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -38,6 +38,7 @@ export * from './GetFaction200Response'; export * from './GetFactions200Response'; export * from './GetJumpGate200Response'; export * from './GetMarket200Response'; +export * from './GetMounts200Response'; export * from './GetMyAgent200Response'; export * from './GetMyShip200Response'; export * from './GetMyShipCargo200Response'; @@ -57,6 +58,10 @@ export * from './GetSystem200Response'; export * from './GetSystemWaypoints200Response'; export * from './GetSystems200Response'; export * from './GetWaypoint200Response'; +export * from './InstallMount201Response'; +export * from './InstallMount201ResponseData'; +export * from './InstallMount201ResponseDataTransaction'; +export * from './InstallMountRequest'; export * from './Jettison200Response'; export * from './Jettison200ResponseData'; export * from './JettisonRequest'; @@ -86,6 +91,8 @@ export * from './RefuelShip200ResponseData'; export * from './Register201Response'; export * from './Register201ResponseData'; export * from './RegisterRequest'; +export * from './RemoveMount201Response'; +export * from './RemoveMountRequest'; export * from './ScannedShip'; export * from './ScannedShipEngine'; export * from './ScannedShipFrame';