rules endpoint
This commit is contained in:
@@ -73,6 +73,29 @@ export const MainLedgerResponseTypeEnum = {
|
|||||||
|
|
||||||
export type MainLedgerResponseTypeEnum = typeof MainLedgerResponseTypeEnum[keyof typeof 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<RuleResponse>;
|
||||||
|
}
|
||||||
export interface UpdateCombinedLedgerRequest {
|
export interface UpdateCombinedLedgerRequest {
|
||||||
'name': string;
|
'name': string;
|
||||||
'memberLedgerIds': Array<string>;
|
'memberLedgerIds': Array<string>;
|
||||||
@@ -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<RequestArgs> => {
|
||||||
|
// 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<RuleBookResponse>> {
|
||||||
|
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<RuleBookResponse> {
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="mt-4">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
+3
-1
@@ -4,10 +4,12 @@ export const routes: RouteRecordRaw[] = [
|
|||||||
{path: '/', name: 'home', component: () => import('@/pages/Index.vue')},
|
{path: '/', name: 'home', component: () => import('@/pages/Index.vue')},
|
||||||
{path: '/callback', name: 'callback', 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: '', component: () => import('./pages/ledger/ListLedgers.vue')},
|
||||||
]},
|
]},
|
||||||
|
|
||||||
|
{path: '/rules', component: () => import('@/pages/Rules.vue')},
|
||||||
|
|
||||||
{path: '/market', component: () => import('@/pages/Market.vue'), children: [
|
{path: '/market', component: () => import('@/pages/Market.vue'), children: [
|
||||||
{path: '', redirect: '/market/types'},
|
{path: '', redirect: '/market/types'},
|
||||||
{path: 'types/:type?', name: 'market-types', component: () => import('@/pages/market/TypeInfo.vue')},
|
{path: 'types/:type?', name: 'market-types', component: () => import('@/pages/market/TypeInfo.vue')},
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import {RouterLink} from 'vue-router';
|
|||||||
|
|
||||||
const links = [
|
const links = [
|
||||||
{name: "Ledger", path: "/ledgers"},
|
{name: "Ledger", path: "/ledgers"},
|
||||||
|
{name: "Rules", path: "/rules"},
|
||||||
{name: "Market", path: "/market"},
|
{name: "Market", path: "/market"},
|
||||||
{name: "Reprocess", path: "/reprocess"},
|
{name: "Reprocess", path: "/reprocess"},
|
||||||
{name: "Tools", path: "/tools"}
|
{name: "Tools", path: "/tools"}
|
||||||
|
|||||||
Reference in New Issue
Block a user