diff --git a/src/generated/mammon/api.ts b/src/generated/mammon/api.ts index c47e33b..614325e 100644 --- a/src/generated/mammon/api.ts +++ b/src/generated/mammon/api.ts @@ -73,6 +73,29 @@ export const MainLedgerResponseTypeEnum = { export type MainLedgerResponseTypeEnum = typeof MainLedgerResponseTypeEnum[keyof typeof MainLedgerResponseTypeEnum]; +export interface RuleBookResponse { + 'characterId': number; + 'ruleSets': { [key: string]: RuleSetResponse; }; +} +export interface RuleResponse { + 'rate': RuleResponseRateEnum; + 'fromLedgerId': string; + 'toLedgerId': string; +} + +export const RuleResponseRateEnum = { + None: 'NONE', + Value: 'VALUE', + JitaBuy: 'JITA_BUY', + JitaSell: 'JITA_SELL', + EveEstimate: 'EVE_ESTIMATE', +} as const; + +export type RuleResponseRateEnum = typeof RuleResponseRateEnum[keyof typeof RuleResponseRateEnum]; + +export interface RuleSetResponse { + 'rules': Array; +} export interface UpdateCombinedLedgerRequest { 'name': string; 'memberLedgerIds': Array; @@ -605,3 +628,100 @@ export class LedgerControllerApi extends BaseAPI { +/** + * RuleBookControllerApi - axios parameter creator + */ +export const RuleBookControllerApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {number} characterId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findByCharacterId: async (characterId: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'characterId' is not null or undefined + assertParamExists('findByCharacterId', 'characterId', characterId) + const localVarPath = `/rule-books/{characterId}` + .replace('{characterId}', encodeURIComponent(String(characterId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = '*/*'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * RuleBookControllerApi - functional programming interface + */ +export const RuleBookControllerApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = RuleBookControllerApiAxiosParamCreator(configuration) + return { + /** + * + * @param {number} characterId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async findByCharacterId(characterId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.findByCharacterId(characterId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RuleBookControllerApi.findByCharacterId']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * RuleBookControllerApi - factory interface + */ +export const RuleBookControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = RuleBookControllerApiFp(configuration) + return { + /** + * + * @param {number} characterId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findByCharacterId(characterId: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.findByCharacterId(characterId, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * RuleBookControllerApi - object-oriented interface + */ +export class RuleBookControllerApi extends BaseAPI { + /** + * + * @param {number} characterId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public findByCharacterId(characterId: number, options?: RawAxiosRequestConfig) { + return RuleBookControllerApiFp(this.configuration).findByCharacterId(characterId, options).then((request) => request(this.axios, this.basePath)); + } +} + + + diff --git a/src/pages/Ledger.vue b/src/pages/Ledgers.vue similarity index 100% rename from src/pages/Ledger.vue rename to src/pages/Ledgers.vue diff --git a/src/pages/Rules.vue b/src/pages/Rules.vue new file mode 100644 index 0000000..5af7627 --- /dev/null +++ b/src/pages/Rules.vue @@ -0,0 +1,10 @@ + + + diff --git a/src/routes.ts b/src/routes.ts index 5248b33..33c061b 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -4,10 +4,12 @@ export const routes: RouteRecordRaw[] = [ {path: '/', name: 'home', component: () => import('@/pages/Index.vue')}, {path: '/callback', name: 'callback', component: () => import('@/pages/Index.vue')}, - {path: '/ledgers', component: () => import('@/pages/Ledger.vue'), children: [ + {path: '/ledgers', component: () => import('./pages/Ledgers.vue'), children: [ {path: '', component: () => import('./pages/ledger/ListLedgers.vue')}, ]}, + {path: '/rules', component: () => import('@/pages/Rules.vue')}, + {path: '/market', component: () => import('@/pages/Market.vue'), children: [ {path: '', redirect: '/market/types'}, {path: 'types/:type?', name: 'market-types', component: () => import('@/pages/market/TypeInfo.vue')}, diff --git a/src/sidebar/Sidebar.vue b/src/sidebar/Sidebar.vue index d40ee4f..d12cced 100644 --- a/src/sidebar/Sidebar.vue +++ b/src/sidebar/Sidebar.vue @@ -4,6 +4,7 @@ import {RouterLink} from 'vue-router'; const links = [ {name: "Ledger", path: "/ledgers"}, + {name: "Rules", path: "/rules"}, {name: "Market", path: "/market"}, {name: "Reprocess", path: "/reprocess"}, {name: "Tools", path: "/tools"}