diff --git a/docs/mammon-api.yml b/docs/mammon-api.yml index f3de671..f80336e 100644 --- a/docs/mammon-api.yml +++ b/docs/mammon-api.yml @@ -108,6 +108,57 @@ paths: '*/*': schema: $ref: "#/components/schemas/CombinedLedgerResponse" + /characters/{characterId}/rule-book: + get: + tags: + - rule-book-controller + operationId: findByCharacterId + parameters: + - name: characterId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "404": + description: Not Found + "400": + description: Bad Request + "200": + description: OK + content: + '*/*': + schema: + $ref: "#/components/schemas/RuleBookResponse" + post: + tags: + - rule-book-controller + operationId: setCharacterRuleBook + parameters: + - name: characterId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SetCharacterRuleBookRequest" + required: true + responses: + "404": + description: Not Found + "400": + description: Bad Request + "200": + description: OK + content: + '*/*': + schema: + $ref: "#/components/schemas/RuleBookResponse" /activity/fetch/{characterId}: post: tags: @@ -190,29 +241,6 @@ paths: type: array items: $ref: "#/components/schemas/CharacterResponse" - /characters/{characterId}/rule-book: - get: - tags: - - rule-book-controller - operationId: findByCharacterId - parameters: - - name: characterId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "404": - description: Not Found - "400": - description: Bad Request - "200": - description: OK - content: - '*/*': - schema: - $ref: "#/components/schemas/RuleBookResponse" components: schemas: UpdateMainLedgerRequest: @@ -301,40 +329,6 @@ components: required: - memberLedgerIds - name - LedgerResponse: - type: object - discriminator: - propertyName: type - properties: - type: - type: string - enum: - - MAIN - - COMBINED - CharacterResponse: - type: object - properties: - characterId: - type: integer - format: int64 - name: - type: string - required: - - characterId - - name - RuleBookResponse: - type: object - properties: - characterId: - type: integer - format: int64 - ruleSets: - type: object - additionalProperties: - $ref: "#/components/schemas/RuleSetResponse" - required: - - characterId - - ruleSets RuleResponse: type: object properties: @@ -363,3 +357,46 @@ components: $ref: "#/components/schemas/RuleResponse" required: - rules + SetCharacterRuleBookRequest: + type: object + properties: + ruleSets: + type: object + additionalProperties: + $ref: "#/components/schemas/RuleSetResponse" + required: + - ruleSets + RuleBookResponse: + type: object + properties: + characterId: + type: integer + format: int64 + ruleSets: + type: object + additionalProperties: + $ref: "#/components/schemas/RuleSetResponse" + required: + - characterId + - ruleSets + LedgerResponse: + type: object + discriminator: + propertyName: type + properties: + type: + type: string + enum: + - MAIN + - COMBINED + CharacterResponse: + type: object + properties: + characterId: + type: integer + format: int64 + name: + type: string + required: + - characterId + - name diff --git a/src/generated/mammon/api.ts b/src/generated/mammon/api.ts index 30078db..57d1cb6 100644 --- a/src/generated/mammon/api.ts +++ b/src/generated/mammon/api.ts @@ -100,6 +100,9 @@ export type RuleResponseRateEnum = typeof RuleResponseRateEnum[keyof typeof Rule export interface RuleSetResponse { 'rules': Array; } +export interface SetCharacterRuleBookRequest { + 'ruleSets': { [key: string]: RuleSetResponse; }; +} export interface UpdateCombinedLedgerRequest { 'name': string; 'memberLedgerIds': Array; @@ -755,6 +758,44 @@ export const RuleBookControllerApiAxiosParamCreator = function (configuration?: let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} characterId + * @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + setCharacterRuleBook: async (characterId: number, setCharacterRuleBookRequest: SetCharacterRuleBookRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'characterId' is not null or undefined + assertParamExists('setCharacterRuleBook', 'characterId', characterId) + // verify required parameter 'setCharacterRuleBookRequest' is not null or undefined + assertParamExists('setCharacterRuleBook', 'setCharacterRuleBookRequest', setCharacterRuleBookRequest) + const localVarPath = `/characters/{characterId}/rule-book` + .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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = '*/*'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(setCharacterRuleBookRequest, localVarRequestOptions, configuration) + return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -781,6 +822,19 @@ export const RuleBookControllerApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['RuleBookControllerApi.findByCharacterId']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * + * @param {number} characterId + * @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async setCharacterRuleBook(characterId: number, setCharacterRuleBookRequest: SetCharacterRuleBookRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.setCharacterRuleBook(characterId, setCharacterRuleBookRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RuleBookControllerApi.setCharacterRuleBook']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, } }; @@ -799,6 +853,16 @@ export const RuleBookControllerApiFactory = function (configuration?: Configurat findByCharacterId(characterId: number, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.findByCharacterId(characterId, options).then((request) => request(axios, basePath)); }, + /** + * + * @param {number} characterId + * @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + setCharacterRuleBook(characterId: number, setCharacterRuleBookRequest: SetCharacterRuleBookRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.setCharacterRuleBook(characterId, setCharacterRuleBookRequest, options).then((request) => request(axios, basePath)); + }, }; }; @@ -815,6 +879,17 @@ export class RuleBookControllerApi extends BaseAPI { public findByCharacterId(characterId: number, options?: RawAxiosRequestConfig) { return RuleBookControllerApiFp(this.configuration).findByCharacterId(characterId, options).then((request) => request(this.axios, this.basePath)); } + + /** + * + * @param {number} characterId + * @param {SetCharacterRuleBookRequest} setCharacterRuleBookRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public setCharacterRuleBook(characterId: number, setCharacterRuleBookRequest: SetCharacterRuleBookRequest, options?: RawAxiosRequestConfig) { + return RuleBookControllerApiFp(this.configuration).setCharacterRuleBook(characterId, setCharacterRuleBookRequest, options).then((request) => request(this.axios, this.basePath)); + } } diff --git a/src/market/acquisition/AcquisitionQuantilsTooltip.vue b/src/market/acquisition/AcquisitionQuantilsTooltip.vue index bc69b83..b29f3dc 100644 --- a/src/market/acquisition/AcquisitionQuantilsTooltip.vue +++ b/src/market/acquisition/AcquisitionQuantilsTooltip.vue @@ -1,10 +1,10 @@