rules endpoint
This commit is contained in:
@@ -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<RuleResponse>;
|
||||
}
|
||||
export interface UpdateCombinedLedgerRequest {
|
||||
'name': 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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user