From 527a3798166fcfe2d51f7a4eeefb214eb26f89a0 Mon Sep 17 00:00:00 2001 From: skywalker Date: Mon, 26 Aug 2024 12:46:40 +0300 Subject: [PATCH 1/2] fix(dev): do not use volume --- client/src/generated/api.ts | 39 ++- client/src/generated/api/add-favorite-api.ts | 238 +++++-------- client/src/generated/api/basic-login-api.ts | 242 +++++--------- .../generated/api/create-instrument-api.ts | 243 +++++--------- .../api/delete-instrument-by-id-api.ts | 235 +++++-------- .../src/generated/api/edit-instrument-api.ts | 242 +++++--------- client/src/generated/api/get-countries-api.ts | 213 +++++------- .../api/get-instrument-basic-materials-api.ts | 215 +++++------- .../generated/api/get-instrument-by-id-api.ts | 238 +++++-------- .../generated/api/get-instrument-photo-api.ts | 240 +++++-------- .../generated/api/get-instrument-types-api.ts | 215 +++++------- .../api/get-instruments-by-criteria-api.ts | 250 +++++--------- ...t-instruments-by-criteria-paginated-api.ts | 314 ++++++------------ .../generated/api/get-manufacturers-api.ts | 213 +++++------- .../src/generated/api/get-user-profile-api.ts | 206 +++++------- client/src/generated/api/list-favorite-api.ts | 213 +++++------- client/src/generated/api/logout-api.ts | 201 +++++------ .../src/generated/api/remove-favorite-api.ts | 238 +++++-------- .../generated/api/user-registration-api.ts | 241 +++++--------- client/src/generated/base.ts | 59 ++-- client/src/generated/common.ts | 204 +++++------- client/src/generated/configuration.ts | 200 +++++------ client/src/generated/index.ts | 1 + client/src/generated/model/basic-material.ts | 17 +- client/src/generated/model/client-error.ts | 29 +- client/src/generated/model/country.ts | 17 +- .../model/create-instrument-request-body.ts | 32 +- .../model/edit-instrument-request-body.ts | 32 +- .../generated/model/get-countries-response.ts | 18 +- ...get-instrument-basic-materials-response.ts | 18 +- ...et-instrument-by-criteria-page-response.ts | 78 ++--- .../model/get-instrument-types-response.ts | 18 +- ...et-instruments-by-criteria-request-body.ts | 140 ++++---- .../get-instruments-by-criteria-response.ts | 18 +- .../model/get-manufacturers-response.ts | 18 +- client/src/generated/model/index.ts | 56 ++-- .../model/instrument-detail-without-id.ts | 102 +++--- .../src/generated/model/instrument-detail.ts | 116 +++---- client/src/generated/model/instrument-id.ts | 17 +- client/src/generated/model/instrument-name.ts | 17 +- .../src/generated/model/instrument-photo.ts | 17 +- client/src/generated/model/instrument-type.ts | 17 +- client/src/generated/model/jwt-response.ts | 17 +- .../src/generated/model/manufacture-date.ts | 17 +- .../src/generated/model/manufacturer-name.ts | 17 +- client/src/generated/model/manufacturer.ts | 17 +- client/src/generated/model/profile-details.ts | 41 +-- .../generated/model/registration-request.ts | 41 +-- client/src/generated/model/release-date.ts | 17 +- client/src/generated/model/server-error.ts | 29 +- .../username-and-password-request-body.ts | 29 +- tools/docker/docker-compose.yml | 36 +- tools/scripts/deploy.sh | 32 +- 53 files changed, 2318 insertions(+), 3452 deletions(-) diff --git a/client/src/generated/api.ts b/client/src/generated/api.ts index a7e279d7..643644cf 100644 --- a/client/src/generated/api.ts +++ b/client/src/generated/api.ts @@ -12,21 +12,24 @@ * Do not edit the class manually. */ -export * from "./api/add-favorite-api"; -export * from "./api/basic-login-api"; -export * from "./api/create-instrument-api"; -export * from "./api/delete-instrument-by-id-api"; -export * from "./api/edit-instrument-api"; -export * from "./api/get-countries-api"; -export * from "./api/get-instrument-basic-materials-api"; -export * from "./api/get-instrument-by-id-api"; -export * from "./api/get-instrument-photo-api"; -export * from "./api/get-instrument-types-api"; -export * from "./api/get-instruments-by-criteria-api"; -export * from "./api/get-instruments-by-criteria-paginated-api"; -export * from "./api/get-manufacturers-api"; -export * from "./api/get-user-profile-api"; -export * from "./api/list-favorite-api"; -export * from "./api/logout-api"; -export * from "./api/remove-favorite-api"; -export * from "./api/user-registration-api"; + + +export * from './api/add-favorite-api'; +export * from './api/basic-login-api'; +export * from './api/create-instrument-api'; +export * from './api/delete-instrument-by-id-api'; +export * from './api/edit-instrument-api'; +export * from './api/get-countries-api'; +export * from './api/get-instrument-basic-materials-api'; +export * from './api/get-instrument-by-id-api'; +export * from './api/get-instrument-photo-api'; +export * from './api/get-instrument-types-api'; +export * from './api/get-instruments-by-criteria-api'; +export * from './api/get-instruments-by-criteria-paginated-api'; +export * from './api/get-manufacturers-api'; +export * from './api/get-user-profile-api'; +export * from './api/list-favorite-api'; +export * from './api/logout-api'; +export * from './api/remove-favorite-api'; +export * from './api/user-registration-api'; + diff --git a/client/src/generated/api/add-favorite-api.ts b/client/src/generated/api/add-favorite-api.ts index 074e9c5a..67d7f21a 100644 --- a/client/src/generated/api/add-favorite-api.ts +++ b/client/src/generated/api/add-favorite-api.ts @@ -12,167 +12,107 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ClientError } from "../model"; +import type { ClientError } from '../model'; // @ts-ignore -import type { InstrumentId } from "../model"; +import type { InstrumentId } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * AddFavoriteApi - axios parameter creator * @export */ -export const AddFavoriteApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Add Favorite - * @summary Add Favorite - * @param {InstrumentId} instrumentId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - addFavorite: async ( - instrumentId: InstrumentId, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'instrumentId' is not null or undefined - assertParamExists("addFavorite", "instrumentId", instrumentId); - const localVarPath = `/api/favorite/add`; - // 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; - } +export const AddFavoriteApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Add Favorite + * @summary Add Favorite + * @param {InstrumentId} instrumentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addFavorite: async (instrumentId: InstrumentId, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'instrumentId' is not null or undefined + assertParamExists('addFavorite', 'instrumentId', instrumentId) + const localVarPath = `/api/favorite/add`; + // 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; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - localVarHeaderParameter["Content-Type"] = "application/json"; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - localVarRequestOptions.data = serializeDataIfNeeded( - instrumentId, - localVarRequestOptions, - configuration, - ); + + localVarHeaderParameter['Content-Type'] = 'application/json'; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(instrumentId, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * AddFavoriteApi - functional programming interface * @export */ -export const AddFavoriteApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = - AddFavoriteApiAxiosParamCreator(configuration); - return { - /** - * Add Favorite - * @summary Add Favorite - * @param {InstrumentId} instrumentId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async addFavorite( - instrumentId: InstrumentId, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.addFavorite( - instrumentId, - options, - ); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap["AddFavoriteApi.addFavorite"]?.[ - localVarOperationServerIndex - ]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const AddFavoriteApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AddFavoriteApiAxiosParamCreator(configuration) + return { + /** + * Add Favorite + * @summary Add Favorite + * @param {InstrumentId} instrumentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async addFavorite(instrumentId: InstrumentId, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addFavorite(instrumentId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AddFavoriteApi.addFavorite']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * AddFavoriteApi - factory interface * @export */ -export const AddFavoriteApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = AddFavoriteApiFp(configuration); - return { - /** - * Add Favorite - * @summary Add Favorite - * @param {InstrumentId} instrumentId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - addFavorite( - instrumentId: InstrumentId, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .addFavorite(instrumentId, options) - .then((request) => request(axios, basePath)); - }, - }; +export const AddFavoriteApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AddFavoriteApiFp(configuration) + return { + /** + * Add Favorite + * @summary Add Favorite + * @param {InstrumentId} instrumentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addFavorite(instrumentId: InstrumentId, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.addFavorite(instrumentId, options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -182,20 +122,16 @@ export const AddFavoriteApiFactory = function ( * @extends {BaseAPI} */ export class AddFavoriteApi extends BaseAPI { - /** - * Add Favorite - * @summary Add Favorite - * @param {InstrumentId} instrumentId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AddFavoriteApi - */ - public addFavorite( - instrumentId: InstrumentId, - options?: RawAxiosRequestConfig, - ) { - return AddFavoriteApiFp(this.configuration) - .addFavorite(instrumentId, options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Add Favorite + * @summary Add Favorite + * @param {InstrumentId} instrumentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AddFavoriteApi + */ + public addFavorite(instrumentId: InstrumentId, options?: RawAxiosRequestConfig) { + return AddFavoriteApiFp(this.configuration).addFavorite(instrumentId, options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/basic-login-api.ts b/client/src/generated/api/basic-login-api.ts index 33ec49bd..0401f03e 100644 --- a/client/src/generated/api/basic-login-api.ts +++ b/client/src/generated/api/basic-login-api.ts @@ -12,171 +12,107 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { JwtResponse } from "../model"; +import type { JwtResponse } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; // @ts-ignore -import type { UsernameAndPasswordRequestBody } from "../model"; +import type { UsernameAndPasswordRequestBody } from '../model'; /** * BasicLoginApi - axios parameter creator * @export */ -export const BasicLoginApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Basic Authentication - * @summary Basic Login - * @param {UsernameAndPasswordRequestBody} usernameAndPasswordRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - basicLogin: async ( - usernameAndPasswordRequestBody: UsernameAndPasswordRequestBody, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'usernameAndPasswordRequestBody' is not null or undefined - assertParamExists( - "basicLogin", - "usernameAndPasswordRequestBody", - usernameAndPasswordRequestBody, - ); - const localVarPath = `/api/auth/login`; - // 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; - } +export const BasicLoginApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Basic Authentication + * @summary Basic Login + * @param {UsernameAndPasswordRequestBody} usernameAndPasswordRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + basicLogin: async (usernameAndPasswordRequestBody: UsernameAndPasswordRequestBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'usernameAndPasswordRequestBody' is not null or undefined + assertParamExists('basicLogin', 'usernameAndPasswordRequestBody', usernameAndPasswordRequestBody) + const localVarPath = `/api/auth/login`; + // 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; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - localVarHeaderParameter["Content-Type"] = "application/json"; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - localVarRequestOptions.data = serializeDataIfNeeded( - usernameAndPasswordRequestBody, - localVarRequestOptions, - configuration, - ); + + localVarHeaderParameter['Content-Type'] = 'application/json'; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(usernameAndPasswordRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * BasicLoginApi - functional programming interface * @export */ -export const BasicLoginApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = - BasicLoginApiAxiosParamCreator(configuration); - return { - /** - * Basic Authentication - * @summary Basic Login - * @param {UsernameAndPasswordRequestBody} usernameAndPasswordRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async basicLogin( - usernameAndPasswordRequestBody: UsernameAndPasswordRequestBody, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.basicLogin( - usernameAndPasswordRequestBody, - options, - ); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap["BasicLoginApi.basicLogin"]?.[ - localVarOperationServerIndex - ]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const BasicLoginApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = BasicLoginApiAxiosParamCreator(configuration) + return { + /** + * Basic Authentication + * @summary Basic Login + * @param {UsernameAndPasswordRequestBody} usernameAndPasswordRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async basicLogin(usernameAndPasswordRequestBody: UsernameAndPasswordRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.basicLogin(usernameAndPasswordRequestBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['BasicLoginApi.basicLogin']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * BasicLoginApi - factory interface * @export */ -export const BasicLoginApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = BasicLoginApiFp(configuration); - return { - /** - * Basic Authentication - * @summary Basic Login - * @param {UsernameAndPasswordRequestBody} usernameAndPasswordRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - basicLogin( - usernameAndPasswordRequestBody: UsernameAndPasswordRequestBody, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .basicLogin(usernameAndPasswordRequestBody, options) - .then((request) => request(axios, basePath)); - }, - }; +export const BasicLoginApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = BasicLoginApiFp(configuration) + return { + /** + * Basic Authentication + * @summary Basic Login + * @param {UsernameAndPasswordRequestBody} usernameAndPasswordRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + basicLogin(usernameAndPasswordRequestBody: UsernameAndPasswordRequestBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.basicLogin(usernameAndPasswordRequestBody, options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -186,20 +122,16 @@ export const BasicLoginApiFactory = function ( * @extends {BaseAPI} */ export class BasicLoginApi extends BaseAPI { - /** - * Basic Authentication - * @summary Basic Login - * @param {UsernameAndPasswordRequestBody} usernameAndPasswordRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BasicLoginApi - */ - public basicLogin( - usernameAndPasswordRequestBody: UsernameAndPasswordRequestBody, - options?: RawAxiosRequestConfig, - ) { - return BasicLoginApiFp(this.configuration) - .basicLogin(usernameAndPasswordRequestBody, options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Basic Authentication + * @summary Basic Login + * @param {UsernameAndPasswordRequestBody} usernameAndPasswordRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BasicLoginApi + */ + public basicLogin(usernameAndPasswordRequestBody: UsernameAndPasswordRequestBody, options?: RawAxiosRequestConfig) { + return BasicLoginApiFp(this.configuration).basicLogin(usernameAndPasswordRequestBody, options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/create-instrument-api.ts b/client/src/generated/api/create-instrument-api.ts index 7744af87..225ba1b3 100644 --- a/client/src/generated/api/create-instrument-api.ts +++ b/client/src/generated/api/create-instrument-api.ts @@ -12,172 +12,107 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ClientError } from "../model"; +import type { ClientError } from '../model'; // @ts-ignore -import type { CreateInstrumentRequestBody } from "../model"; +import type { CreateInstrumentRequestBody } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * CreateInstrumentApi - axios parameter creator * @export */ -export const CreateInstrumentApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Create Instrument - * @summary Create Instrument - * @param {CreateInstrumentRequestBody} createInstrumentRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createInstrument: async ( - createInstrumentRequestBody: CreateInstrumentRequestBody, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'createInstrumentRequestBody' is not null or undefined - assertParamExists( - "createInstrument", - "createInstrumentRequestBody", - createInstrumentRequestBody, - ); - const localVarPath = `/api/instrument/create`; - // 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; - } +export const CreateInstrumentApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create Instrument + * @summary Create Instrument + * @param {CreateInstrumentRequestBody} createInstrumentRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createInstrument: async (createInstrumentRequestBody: CreateInstrumentRequestBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'createInstrumentRequestBody' is not null or undefined + assertParamExists('createInstrument', 'createInstrumentRequestBody', createInstrumentRequestBody) + const localVarPath = `/api/instrument/create`; + // 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; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - localVarHeaderParameter["Content-Type"] = "application/json"; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - localVarRequestOptions.data = serializeDataIfNeeded( - createInstrumentRequestBody, - localVarRequestOptions, - configuration, - ); + + localVarHeaderParameter['Content-Type'] = 'application/json'; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createInstrumentRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * CreateInstrumentApi - functional programming interface * @export */ -export const CreateInstrumentApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = - CreateInstrumentApiAxiosParamCreator(configuration); - return { - /** - * Create Instrument - * @summary Create Instrument - * @param {CreateInstrumentRequestBody} createInstrumentRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createInstrument( - createInstrumentRequestBody: CreateInstrumentRequestBody, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.createInstrument( - createInstrumentRequestBody, - options, - ); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap["CreateInstrumentApi.createInstrument"]?.[ - localVarOperationServerIndex - ]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const CreateInstrumentApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = CreateInstrumentApiAxiosParamCreator(configuration) + return { + /** + * Create Instrument + * @summary Create Instrument + * @param {CreateInstrumentRequestBody} createInstrumentRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createInstrument(createInstrumentRequestBody: CreateInstrumentRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createInstrument(createInstrumentRequestBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CreateInstrumentApi.createInstrument']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * CreateInstrumentApi - factory interface * @export */ -export const CreateInstrumentApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = CreateInstrumentApiFp(configuration); - return { - /** - * Create Instrument - * @summary Create Instrument - * @param {CreateInstrumentRequestBody} createInstrumentRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createInstrument( - createInstrumentRequestBody: CreateInstrumentRequestBody, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .createInstrument(createInstrumentRequestBody, options) - .then((request) => request(axios, basePath)); - }, - }; +export const CreateInstrumentApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = CreateInstrumentApiFp(configuration) + return { + /** + * Create Instrument + * @summary Create Instrument + * @param {CreateInstrumentRequestBody} createInstrumentRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createInstrument(createInstrumentRequestBody: CreateInstrumentRequestBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createInstrument(createInstrumentRequestBody, options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -187,20 +122,16 @@ export const CreateInstrumentApiFactory = function ( * @extends {BaseAPI} */ export class CreateInstrumentApi extends BaseAPI { - /** - * Create Instrument - * @summary Create Instrument - * @param {CreateInstrumentRequestBody} createInstrumentRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CreateInstrumentApi - */ - public createInstrument( - createInstrumentRequestBody: CreateInstrumentRequestBody, - options?: RawAxiosRequestConfig, - ) { - return CreateInstrumentApiFp(this.configuration) - .createInstrument(createInstrumentRequestBody, options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Create Instrument + * @summary Create Instrument + * @param {CreateInstrumentRequestBody} createInstrumentRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CreateInstrumentApi + */ + public createInstrument(createInstrumentRequestBody: CreateInstrumentRequestBody, options?: RawAxiosRequestConfig) { + return CreateInstrumentApiFp(this.configuration).createInstrument(createInstrumentRequestBody, options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/delete-instrument-by-id-api.ts b/client/src/generated/api/delete-instrument-by-id-api.ts index 0375c534..2e9f06b5 100644 --- a/client/src/generated/api/delete-instrument-by-id-api.ts +++ b/client/src/generated/api/delete-instrument-by-id-api.ts @@ -12,164 +12,103 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ClientError } from "../model"; +import type { ClientError } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * DeleteInstrumentByIdApi - axios parameter creator * @export */ -export const DeleteInstrumentByIdApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Get Instrument Types - * @summary Get Instrument Types - * @param {number} instrumentId Instrument ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteInstrumentById: async ( - instrumentId: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'instrumentId' is not null or undefined - assertParamExists("deleteInstrumentById", "instrumentId", instrumentId); - const localVarPath = `/api/instrument/{instrumentId}/delete`.replace( - `{${"instrumentId"}}`, - encodeURIComponent(String(instrumentId)), - ); - // 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; - } +export const DeleteInstrumentByIdApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get Instrument Types + * @summary Get Instrument Types + * @param {number} instrumentId Instrument ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteInstrumentById: async (instrumentId: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'instrumentId' is not null or undefined + assertParamExists('deleteInstrumentById', 'instrumentId', instrumentId) + const localVarPath = `/api/instrument/{instrumentId}/delete` + .replace(`{${"instrumentId"}}`, encodeURIComponent(String(instrumentId))); + // 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; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * DeleteInstrumentByIdApi - functional programming interface * @export */ -export const DeleteInstrumentByIdApiFp = function ( - configuration?: Configuration, -) { - const localVarAxiosParamCreator = - DeleteInstrumentByIdApiAxiosParamCreator(configuration); - return { - /** - * Get Instrument Types - * @summary Get Instrument Types - * @param {number} instrumentId Instrument ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteInstrumentById( - instrumentId: number, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.deleteInstrumentById( - instrumentId, - options, - ); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap["DeleteInstrumentByIdApi.deleteInstrumentById"]?.[ - localVarOperationServerIndex - ]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const DeleteInstrumentByIdApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = DeleteInstrumentByIdApiAxiosParamCreator(configuration) + return { + /** + * Get Instrument Types + * @summary Get Instrument Types + * @param {number} instrumentId Instrument ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteInstrumentById(instrumentId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteInstrumentById(instrumentId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DeleteInstrumentByIdApi.deleteInstrumentById']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * DeleteInstrumentByIdApi - factory interface * @export */ -export const DeleteInstrumentByIdApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = DeleteInstrumentByIdApiFp(configuration); - return { - /** - * Get Instrument Types - * @summary Get Instrument Types - * @param {number} instrumentId Instrument ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteInstrumentById( - instrumentId: number, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .deleteInstrumentById(instrumentId, options) - .then((request) => request(axios, basePath)); - }, - }; +export const DeleteInstrumentByIdApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = DeleteInstrumentByIdApiFp(configuration) + return { + /** + * Get Instrument Types + * @summary Get Instrument Types + * @param {number} instrumentId Instrument ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteInstrumentById(instrumentId: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteInstrumentById(instrumentId, options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -179,20 +118,16 @@ export const DeleteInstrumentByIdApiFactory = function ( * @extends {BaseAPI} */ export class DeleteInstrumentByIdApi extends BaseAPI { - /** - * Get Instrument Types - * @summary Get Instrument Types - * @param {number} instrumentId Instrument ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DeleteInstrumentByIdApi - */ - public deleteInstrumentById( - instrumentId: number, - options?: RawAxiosRequestConfig, - ) { - return DeleteInstrumentByIdApiFp(this.configuration) - .deleteInstrumentById(instrumentId, options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Get Instrument Types + * @summary Get Instrument Types + * @param {number} instrumentId Instrument ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DeleteInstrumentByIdApi + */ + public deleteInstrumentById(instrumentId: number, options?: RawAxiosRequestConfig) { + return DeleteInstrumentByIdApiFp(this.configuration).deleteInstrumentById(instrumentId, options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/edit-instrument-api.ts b/client/src/generated/api/edit-instrument-api.ts index 94cceeca..17f5ebfd 100644 --- a/client/src/generated/api/edit-instrument-api.ts +++ b/client/src/generated/api/edit-instrument-api.ts @@ -12,171 +12,107 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ClientError } from "../model"; +import type { ClientError } from '../model'; // @ts-ignore -import type { EditInstrumentRequestBody } from "../model"; +import type { EditInstrumentRequestBody } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * EditInstrumentApi - axios parameter creator * @export */ -export const EditInstrumentApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Edit Instrument - * @summary Edit Instrument - * @param {EditInstrumentRequestBody} editInstrumentRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - editInstrument: async ( - editInstrumentRequestBody: EditInstrumentRequestBody, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'editInstrumentRequestBody' is not null or undefined - assertParamExists( - "editInstrument", - "editInstrumentRequestBody", - editInstrumentRequestBody, - ); - const localVarPath = `/api/instrument/edit`; - // 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; - } +export const EditInstrumentApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Edit Instrument + * @summary Edit Instrument + * @param {EditInstrumentRequestBody} editInstrumentRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + editInstrument: async (editInstrumentRequestBody: EditInstrumentRequestBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'editInstrumentRequestBody' is not null or undefined + assertParamExists('editInstrument', 'editInstrumentRequestBody', editInstrumentRequestBody) + const localVarPath = `/api/instrument/edit`; + // 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; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - localVarHeaderParameter["Content-Type"] = "application/json"; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - localVarRequestOptions.data = serializeDataIfNeeded( - editInstrumentRequestBody, - localVarRequestOptions, - configuration, - ); + + localVarHeaderParameter['Content-Type'] = 'application/json'; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(editInstrumentRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * EditInstrumentApi - functional programming interface * @export */ -export const EditInstrumentApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = - EditInstrumentApiAxiosParamCreator(configuration); - return { - /** - * Edit Instrument - * @summary Edit Instrument - * @param {EditInstrumentRequestBody} editInstrumentRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async editInstrument( - editInstrumentRequestBody: EditInstrumentRequestBody, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.editInstrument( - editInstrumentRequestBody, - options, - ); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap["EditInstrumentApi.editInstrument"]?.[ - localVarOperationServerIndex - ]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const EditInstrumentApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = EditInstrumentApiAxiosParamCreator(configuration) + return { + /** + * Edit Instrument + * @summary Edit Instrument + * @param {EditInstrumentRequestBody} editInstrumentRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async editInstrument(editInstrumentRequestBody: EditInstrumentRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.editInstrument(editInstrumentRequestBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['EditInstrumentApi.editInstrument']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * EditInstrumentApi - factory interface * @export */ -export const EditInstrumentApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = EditInstrumentApiFp(configuration); - return { - /** - * Edit Instrument - * @summary Edit Instrument - * @param {EditInstrumentRequestBody} editInstrumentRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - editInstrument( - editInstrumentRequestBody: EditInstrumentRequestBody, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .editInstrument(editInstrumentRequestBody, options) - .then((request) => request(axios, basePath)); - }, - }; +export const EditInstrumentApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = EditInstrumentApiFp(configuration) + return { + /** + * Edit Instrument + * @summary Edit Instrument + * @param {EditInstrumentRequestBody} editInstrumentRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + editInstrument(editInstrumentRequestBody: EditInstrumentRequestBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.editInstrument(editInstrumentRequestBody, options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -186,20 +122,16 @@ export const EditInstrumentApiFactory = function ( * @extends {BaseAPI} */ export class EditInstrumentApi extends BaseAPI { - /** - * Edit Instrument - * @summary Edit Instrument - * @param {EditInstrumentRequestBody} editInstrumentRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof EditInstrumentApi - */ - public editInstrument( - editInstrumentRequestBody: EditInstrumentRequestBody, - options?: RawAxiosRequestConfig, - ) { - return EditInstrumentApiFp(this.configuration) - .editInstrument(editInstrumentRequestBody, options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Edit Instrument + * @summary Edit Instrument + * @param {EditInstrumentRequestBody} editInstrumentRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EditInstrumentApi + */ + public editInstrument(editInstrumentRequestBody: EditInstrumentRequestBody, options?: RawAxiosRequestConfig) { + return EditInstrumentApiFp(this.configuration).editInstrument(editInstrumentRequestBody, options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/get-countries-api.ts b/client/src/generated/api/get-countries-api.ts index 9e35be91..2bbd9bb2 100644 --- a/client/src/generated/api/get-countries-api.ts +++ b/client/src/generated/api/get-countries-api.ts @@ -12,153 +12,99 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ClientError } from "../model"; +import type { ClientError } from '../model'; // @ts-ignore -import type { GetCountriesResponse } from "../model"; +import type { GetCountriesResponse } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * GetCountriesApi - axios parameter creator * @export */ -export const GetCountriesApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Get Countries - * @summary Get Countries - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCountries: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/countries`; - // 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; - } +export const GetCountriesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get Countries + * @summary Get Countries + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCountries: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/countries`; + // 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; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * GetCountriesApi - functional programming interface * @export */ -export const GetCountriesApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = - GetCountriesApiAxiosParamCreator(configuration); - return { - /** - * Get Countries - * @summary Get Countries - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getCountries( - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.getCountries(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap["GetCountriesApi.getCountries"]?.[ - localVarOperationServerIndex - ]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const GetCountriesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = GetCountriesApiAxiosParamCreator(configuration) + return { + /** + * Get Countries + * @summary Get Countries + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCountries(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCountries(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GetCountriesApi.getCountries']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * GetCountriesApi - factory interface * @export */ -export const GetCountriesApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = GetCountriesApiFp(configuration); - return { - /** - * Get Countries - * @summary Get Countries - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCountries( - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .getCountries(options) - .then((request) => request(axios, basePath)); - }, - }; +export const GetCountriesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GetCountriesApiFp(configuration) + return { + /** + * Get Countries + * @summary Get Countries + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCountries(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getCountries(options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -168,16 +114,15 @@ export const GetCountriesApiFactory = function ( * @extends {BaseAPI} */ export class GetCountriesApi extends BaseAPI { - /** - * Get Countries - * @summary Get Countries - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GetCountriesApi - */ - public getCountries(options?: RawAxiosRequestConfig) { - return GetCountriesApiFp(this.configuration) - .getCountries(options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Get Countries + * @summary Get Countries + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GetCountriesApi + */ + public getCountries(options?: RawAxiosRequestConfig) { + return GetCountriesApiFp(this.configuration).getCountries(options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/get-instrument-basic-materials-api.ts b/client/src/generated/api/get-instrument-basic-materials-api.ts index dacf6a6e..a880302c 100644 --- a/client/src/generated/api/get-instrument-basic-materials-api.ts +++ b/client/src/generated/api/get-instrument-basic-materials-api.ts @@ -12,155 +12,99 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ClientError } from "../model"; +import type { ClientError } from '../model'; // @ts-ignore -import type { GetInstrumentBasicMaterialsResponse } from "../model"; +import type { GetInstrumentBasicMaterialsResponse } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * GetInstrumentBasicMaterialsApi - axios parameter creator * @export */ -export const GetInstrumentBasicMaterialsApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Get Instrument Basic Materials - * @summary Get Instrument Basic Materials - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInstrumentBasicMaterials: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/instrument/materials`; - // 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; - } +export const GetInstrumentBasicMaterialsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get Instrument Basic Materials + * @summary Get Instrument Basic Materials + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInstrumentBasicMaterials: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/instrument/materials`; + // 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; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * GetInstrumentBasicMaterialsApi - functional programming interface * @export */ -export const GetInstrumentBasicMaterialsApiFp = function ( - configuration?: Configuration, -) { - const localVarAxiosParamCreator = - GetInstrumentBasicMaterialsApiAxiosParamCreator(configuration); - return { - /** - * Get Instrument Basic Materials - * @summary Get Instrument Basic Materials - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getInstrumentBasicMaterials( - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.getInstrumentBasicMaterials(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap[ - "GetInstrumentBasicMaterialsApi.getInstrumentBasicMaterials" - ]?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const GetInstrumentBasicMaterialsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = GetInstrumentBasicMaterialsApiAxiosParamCreator(configuration) + return { + /** + * Get Instrument Basic Materials + * @summary Get Instrument Basic Materials + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getInstrumentBasicMaterials(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getInstrumentBasicMaterials(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GetInstrumentBasicMaterialsApi.getInstrumentBasicMaterials']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * GetInstrumentBasicMaterialsApi - factory interface * @export */ -export const GetInstrumentBasicMaterialsApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = GetInstrumentBasicMaterialsApiFp(configuration); - return { - /** - * Get Instrument Basic Materials - * @summary Get Instrument Basic Materials - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInstrumentBasicMaterials( - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .getInstrumentBasicMaterials(options) - .then((request) => request(axios, basePath)); - }, - }; +export const GetInstrumentBasicMaterialsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GetInstrumentBasicMaterialsApiFp(configuration) + return { + /** + * Get Instrument Basic Materials + * @summary Get Instrument Basic Materials + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInstrumentBasicMaterials(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getInstrumentBasicMaterials(options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -170,16 +114,15 @@ export const GetInstrumentBasicMaterialsApiFactory = function ( * @extends {BaseAPI} */ export class GetInstrumentBasicMaterialsApi extends BaseAPI { - /** - * Get Instrument Basic Materials - * @summary Get Instrument Basic Materials - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GetInstrumentBasicMaterialsApi - */ - public getInstrumentBasicMaterials(options?: RawAxiosRequestConfig) { - return GetInstrumentBasicMaterialsApiFp(this.configuration) - .getInstrumentBasicMaterials(options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Get Instrument Basic Materials + * @summary Get Instrument Basic Materials + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GetInstrumentBasicMaterialsApi + */ + public getInstrumentBasicMaterials(options?: RawAxiosRequestConfig) { + return GetInstrumentBasicMaterialsApiFp(this.configuration).getInstrumentBasicMaterials(options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/get-instrument-by-id-api.ts b/client/src/generated/api/get-instrument-by-id-api.ts index 4f17f44d..4e3d181b 100644 --- a/client/src/generated/api/get-instrument-by-id-api.ts +++ b/client/src/generated/api/get-instrument-by-id-api.ts @@ -12,167 +12,105 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ClientError } from "../model"; +import type { ClientError } from '../model'; // @ts-ignore -import type { InstrumentDetail } from "../model"; +import type { InstrumentDetail } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * GetInstrumentByIdApi - axios parameter creator * @export */ -export const GetInstrumentByIdApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Get Instrument by ID - * @summary Get Instrument by ID - * @param {number} instrumentId Instrument ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInstrumentById: async ( - instrumentId: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'instrumentId' is not null or undefined - assertParamExists("getInstrumentById", "instrumentId", instrumentId); - const localVarPath = `/api/instrument/{instrumentId}`.replace( - `{${"instrumentId"}}`, - encodeURIComponent(String(instrumentId)), - ); - // 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; - } +export const GetInstrumentByIdApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get Instrument by ID + * @summary Get Instrument by ID + * @param {number} instrumentId Instrument ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInstrumentById: async (instrumentId: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'instrumentId' is not null or undefined + assertParamExists('getInstrumentById', 'instrumentId', instrumentId) + const localVarPath = `/api/instrument/{instrumentId}` + .replace(`{${"instrumentId"}}`, encodeURIComponent(String(instrumentId))); + // 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; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * GetInstrumentByIdApi - functional programming interface * @export */ -export const GetInstrumentByIdApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = - GetInstrumentByIdApiAxiosParamCreator(configuration); - return { - /** - * Get Instrument by ID - * @summary Get Instrument by ID - * @param {number} instrumentId Instrument ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getInstrumentById( - instrumentId: number, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.getInstrumentById( - instrumentId, - options, - ); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap["GetInstrumentByIdApi.getInstrumentById"]?.[ - localVarOperationServerIndex - ]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const GetInstrumentByIdApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = GetInstrumentByIdApiAxiosParamCreator(configuration) + return { + /** + * Get Instrument by ID + * @summary Get Instrument by ID + * @param {number} instrumentId Instrument ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getInstrumentById(instrumentId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getInstrumentById(instrumentId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GetInstrumentByIdApi.getInstrumentById']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * GetInstrumentByIdApi - factory interface * @export */ -export const GetInstrumentByIdApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = GetInstrumentByIdApiFp(configuration); - return { - /** - * Get Instrument by ID - * @summary Get Instrument by ID - * @param {number} instrumentId Instrument ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInstrumentById( - instrumentId: number, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .getInstrumentById(instrumentId, options) - .then((request) => request(axios, basePath)); - }, - }; +export const GetInstrumentByIdApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GetInstrumentByIdApiFp(configuration) + return { + /** + * Get Instrument by ID + * @summary Get Instrument by ID + * @param {number} instrumentId Instrument ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInstrumentById(instrumentId: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getInstrumentById(instrumentId, options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -182,20 +120,16 @@ export const GetInstrumentByIdApiFactory = function ( * @extends {BaseAPI} */ export class GetInstrumentByIdApi extends BaseAPI { - /** - * Get Instrument by ID - * @summary Get Instrument by ID - * @param {number} instrumentId Instrument ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GetInstrumentByIdApi - */ - public getInstrumentById( - instrumentId: number, - options?: RawAxiosRequestConfig, - ) { - return GetInstrumentByIdApiFp(this.configuration) - .getInstrumentById(instrumentId, options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Get Instrument by ID + * @summary Get Instrument by ID + * @param {number} instrumentId Instrument ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GetInstrumentByIdApi + */ + public getInstrumentById(instrumentId: number, options?: RawAxiosRequestConfig) { + return GetInstrumentByIdApiFp(this.configuration).getInstrumentById(instrumentId, options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/get-instrument-photo-api.ts b/client/src/generated/api/get-instrument-photo-api.ts index 6cd7942b..eb0e10aa 100644 --- a/client/src/generated/api/get-instrument-photo-api.ts +++ b/client/src/generated/api/get-instrument-photo-api.ts @@ -12,169 +12,105 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ClientError } from "../model"; +import type { ClientError } from '../model'; // @ts-ignore -import type { InstrumentPhoto } from "../model"; +import type { InstrumentPhoto } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * GetInstrumentPhotoApi - axios parameter creator * @export */ -export const GetInstrumentPhotoApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Get Instrument Photo - * @summary Get Instrument Photo - * @param {number} instrumentId Instrument ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInstrumentPhoto: async ( - instrumentId: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'instrumentId' is not null or undefined - assertParamExists("getInstrumentPhoto", "instrumentId", instrumentId); - const localVarPath = `/api/instrument/photo/{instrumentId}`.replace( - `{${"instrumentId"}}`, - encodeURIComponent(String(instrumentId)), - ); - // 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; - } +export const GetInstrumentPhotoApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get Instrument Photo + * @summary Get Instrument Photo + * @param {number} instrumentId Instrument ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInstrumentPhoto: async (instrumentId: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'instrumentId' is not null or undefined + assertParamExists('getInstrumentPhoto', 'instrumentId', instrumentId) + const localVarPath = `/api/instrument/photo/{instrumentId}` + .replace(`{${"instrumentId"}}`, encodeURIComponent(String(instrumentId))); + // 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; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * GetInstrumentPhotoApi - functional programming interface * @export */ -export const GetInstrumentPhotoApiFp = function ( - configuration?: Configuration, -) { - const localVarAxiosParamCreator = - GetInstrumentPhotoApiAxiosParamCreator(configuration); - return { - /** - * Get Instrument Photo - * @summary Get Instrument Photo - * @param {number} instrumentId Instrument ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getInstrumentPhoto( - instrumentId: number, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.getInstrumentPhoto( - instrumentId, - options, - ); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap["GetInstrumentPhotoApi.getInstrumentPhoto"]?.[ - localVarOperationServerIndex - ]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const GetInstrumentPhotoApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = GetInstrumentPhotoApiAxiosParamCreator(configuration) + return { + /** + * Get Instrument Photo + * @summary Get Instrument Photo + * @param {number} instrumentId Instrument ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getInstrumentPhoto(instrumentId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getInstrumentPhoto(instrumentId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GetInstrumentPhotoApi.getInstrumentPhoto']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * GetInstrumentPhotoApi - factory interface * @export */ -export const GetInstrumentPhotoApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = GetInstrumentPhotoApiFp(configuration); - return { - /** - * Get Instrument Photo - * @summary Get Instrument Photo - * @param {number} instrumentId Instrument ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInstrumentPhoto( - instrumentId: number, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .getInstrumentPhoto(instrumentId, options) - .then((request) => request(axios, basePath)); - }, - }; +export const GetInstrumentPhotoApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GetInstrumentPhotoApiFp(configuration) + return { + /** + * Get Instrument Photo + * @summary Get Instrument Photo + * @param {number} instrumentId Instrument ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInstrumentPhoto(instrumentId: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getInstrumentPhoto(instrumentId, options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -184,20 +120,16 @@ export const GetInstrumentPhotoApiFactory = function ( * @extends {BaseAPI} */ export class GetInstrumentPhotoApi extends BaseAPI { - /** - * Get Instrument Photo - * @summary Get Instrument Photo - * @param {number} instrumentId Instrument ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GetInstrumentPhotoApi - */ - public getInstrumentPhoto( - instrumentId: number, - options?: RawAxiosRequestConfig, - ) { - return GetInstrumentPhotoApiFp(this.configuration) - .getInstrumentPhoto(instrumentId, options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Get Instrument Photo + * @summary Get Instrument Photo + * @param {number} instrumentId Instrument ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GetInstrumentPhotoApi + */ + public getInstrumentPhoto(instrumentId: number, options?: RawAxiosRequestConfig) { + return GetInstrumentPhotoApiFp(this.configuration).getInstrumentPhoto(instrumentId, options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/get-instrument-types-api.ts b/client/src/generated/api/get-instrument-types-api.ts index 44966f03..8e59373b 100644 --- a/client/src/generated/api/get-instrument-types-api.ts +++ b/client/src/generated/api/get-instrument-types-api.ts @@ -12,155 +12,99 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ClientError } from "../model"; +import type { ClientError } from '../model'; // @ts-ignore -import type { GetInstrumentTypesResponse } from "../model"; +import type { GetInstrumentTypesResponse } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * GetInstrumentTypesApi - axios parameter creator * @export */ -export const GetInstrumentTypesApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Get Instrument Types - * @summary Get Instrument Types - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInstrumentTypes: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/instrument/types`; - // 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; - } +export const GetInstrumentTypesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get Instrument Types + * @summary Get Instrument Types + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInstrumentTypes: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/instrument/types`; + // 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; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * GetInstrumentTypesApi - functional programming interface * @export */ -export const GetInstrumentTypesApiFp = function ( - configuration?: Configuration, -) { - const localVarAxiosParamCreator = - GetInstrumentTypesApiAxiosParamCreator(configuration); - return { - /** - * Get Instrument Types - * @summary Get Instrument Types - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getInstrumentTypes( - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.getInstrumentTypes(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap["GetInstrumentTypesApi.getInstrumentTypes"]?.[ - localVarOperationServerIndex - ]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const GetInstrumentTypesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = GetInstrumentTypesApiAxiosParamCreator(configuration) + return { + /** + * Get Instrument Types + * @summary Get Instrument Types + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getInstrumentTypes(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getInstrumentTypes(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GetInstrumentTypesApi.getInstrumentTypes']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * GetInstrumentTypesApi - factory interface * @export */ -export const GetInstrumentTypesApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = GetInstrumentTypesApiFp(configuration); - return { - /** - * Get Instrument Types - * @summary Get Instrument Types - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInstrumentTypes( - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .getInstrumentTypes(options) - .then((request) => request(axios, basePath)); - }, - }; +export const GetInstrumentTypesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GetInstrumentTypesApiFp(configuration) + return { + /** + * Get Instrument Types + * @summary Get Instrument Types + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInstrumentTypes(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getInstrumentTypes(options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -170,16 +114,15 @@ export const GetInstrumentTypesApiFactory = function ( * @extends {BaseAPI} */ export class GetInstrumentTypesApi extends BaseAPI { - /** - * Get Instrument Types - * @summary Get Instrument Types - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GetInstrumentTypesApi - */ - public getInstrumentTypes(options?: RawAxiosRequestConfig) { - return GetInstrumentTypesApiFp(this.configuration) - .getInstrumentTypes(options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Get Instrument Types + * @summary Get Instrument Types + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GetInstrumentTypesApi + */ + public getInstrumentTypes(options?: RawAxiosRequestConfig) { + return GetInstrumentTypesApiFp(this.configuration).getInstrumentTypes(options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/get-instruments-by-criteria-api.ts b/client/src/generated/api/get-instruments-by-criteria-api.ts index 5c640b61..ba63ce3f 100644 --- a/client/src/generated/api/get-instruments-by-criteria-api.ts +++ b/client/src/generated/api/get-instruments-by-criteria-api.ts @@ -12,179 +12,109 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ClientError } from "../model"; +import type { ClientError } from '../model'; // @ts-ignore -import type { GetInstrumentsByCriteriaRequestBody } from "../model"; +import type { GetInstrumentsByCriteriaRequestBody } from '../model'; // @ts-ignore -import type { GetInstrumentsByCriteriaResponse } from "../model"; +import type { GetInstrumentsByCriteriaResponse } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * GetInstrumentsByCriteriaApi - axios parameter creator * @export */ -export const GetInstrumentsByCriteriaApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Get Instruments by Criteria - * @summary Get Instruments by Criteria - * @param {GetInstrumentsByCriteriaRequestBody} getInstrumentsByCriteriaRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInstrumentsByCriteria: async ( - getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'getInstrumentsByCriteriaRequestBody' is not null or undefined - assertParamExists( - "getInstrumentsByCriteria", - "getInstrumentsByCriteriaRequestBody", - getInstrumentsByCriteriaRequestBody, - ); - const localVarPath = `/api/instruments`; - // 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; - } +export const GetInstrumentsByCriteriaApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get Instruments by Criteria + * @summary Get Instruments by Criteria + * @param {GetInstrumentsByCriteriaRequestBody} getInstrumentsByCriteriaRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInstrumentsByCriteria: async (getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'getInstrumentsByCriteriaRequestBody' is not null or undefined + assertParamExists('getInstrumentsByCriteria', 'getInstrumentsByCriteriaRequestBody', getInstrumentsByCriteriaRequestBody) + const localVarPath = `/api/instruments`; + // 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; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - localVarHeaderParameter["Content-Type"] = "application/json"; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - localVarRequestOptions.data = serializeDataIfNeeded( - getInstrumentsByCriteriaRequestBody, - localVarRequestOptions, - configuration, - ); + + localVarHeaderParameter['Content-Type'] = 'application/json'; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(getInstrumentsByCriteriaRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * GetInstrumentsByCriteriaApi - functional programming interface * @export */ -export const GetInstrumentsByCriteriaApiFp = function ( - configuration?: Configuration, -) { - const localVarAxiosParamCreator = - GetInstrumentsByCriteriaApiAxiosParamCreator(configuration); - return { - /** - * Get Instruments by Criteria - * @summary Get Instruments by Criteria - * @param {GetInstrumentsByCriteriaRequestBody} getInstrumentsByCriteriaRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getInstrumentsByCriteria( - getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.getInstrumentsByCriteria( - getInstrumentsByCriteriaRequestBody, - options, - ); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap[ - "GetInstrumentsByCriteriaApi.getInstrumentsByCriteria" - ]?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const GetInstrumentsByCriteriaApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = GetInstrumentsByCriteriaApiAxiosParamCreator(configuration) + return { + /** + * Get Instruments by Criteria + * @summary Get Instruments by Criteria + * @param {GetInstrumentsByCriteriaRequestBody} getInstrumentsByCriteriaRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getInstrumentsByCriteria(getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getInstrumentsByCriteria(getInstrumentsByCriteriaRequestBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GetInstrumentsByCriteriaApi.getInstrumentsByCriteria']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * GetInstrumentsByCriteriaApi - factory interface * @export */ -export const GetInstrumentsByCriteriaApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = GetInstrumentsByCriteriaApiFp(configuration); - return { - /** - * Get Instruments by Criteria - * @summary Get Instruments by Criteria - * @param {GetInstrumentsByCriteriaRequestBody} getInstrumentsByCriteriaRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInstrumentsByCriteria( - getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .getInstrumentsByCriteria(getInstrumentsByCriteriaRequestBody, options) - .then((request) => request(axios, basePath)); - }, - }; +export const GetInstrumentsByCriteriaApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GetInstrumentsByCriteriaApiFp(configuration) + return { + /** + * Get Instruments by Criteria + * @summary Get Instruments by Criteria + * @param {GetInstrumentsByCriteriaRequestBody} getInstrumentsByCriteriaRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInstrumentsByCriteria(getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getInstrumentsByCriteria(getInstrumentsByCriteriaRequestBody, options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -194,20 +124,16 @@ export const GetInstrumentsByCriteriaApiFactory = function ( * @extends {BaseAPI} */ export class GetInstrumentsByCriteriaApi extends BaseAPI { - /** - * Get Instruments by Criteria - * @summary Get Instruments by Criteria - * @param {GetInstrumentsByCriteriaRequestBody} getInstrumentsByCriteriaRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GetInstrumentsByCriteriaApi - */ - public getInstrumentsByCriteria( - getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody, - options?: RawAxiosRequestConfig, - ) { - return GetInstrumentsByCriteriaApiFp(this.configuration) - .getInstrumentsByCriteria(getInstrumentsByCriteriaRequestBody, options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Get Instruments by Criteria + * @summary Get Instruments by Criteria + * @param {GetInstrumentsByCriteriaRequestBody} getInstrumentsByCriteriaRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GetInstrumentsByCriteriaApi + */ + public getInstrumentsByCriteria(getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody, options?: RawAxiosRequestConfig) { + return GetInstrumentsByCriteriaApiFp(this.configuration).getInstrumentsByCriteria(getInstrumentsByCriteriaRequestBody, options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/get-instruments-by-criteria-paginated-api.ts b/client/src/generated/api/get-instruments-by-criteria-paginated-api.ts index 6675f52b..70f8125b 100644 --- a/client/src/generated/api/get-instruments-by-criteria-paginated-api.ts +++ b/client/src/generated/api/get-instruments-by-criteria-paginated-api.ts @@ -12,218 +12,127 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ClientError } from "../model"; +import type { ClientError } from '../model'; // @ts-ignore -import type { GetInstrumentByCriteriaPageResponse } from "../model"; +import type { GetInstrumentByCriteriaPageResponse } from '../model'; // @ts-ignore -import type { GetInstrumentsByCriteriaRequestBody } from "../model"; +import type { GetInstrumentsByCriteriaRequestBody } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * GetInstrumentsByCriteriaPaginatedApi - axios parameter creator * @export */ -export const GetInstrumentsByCriteriaPaginatedApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Get Instruments by Criteria Paginated - * @summary Get Instruments by Criteria Paginated - * @param {number} pageSize Page Size - * @param {number} pageNumber Page Number (1-based enumeration) - * @param {GetInstrumentsByCriteriaRequestBody} getInstrumentsByCriteriaRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInstrumentsByCriteriaPaginated: async ( - pageSize: number, - pageNumber: number, - getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'pageSize' is not null or undefined - assertParamExists( - "getInstrumentsByCriteriaPaginated", - "pageSize", - pageSize, - ); - // verify required parameter 'pageNumber' is not null or undefined - assertParamExists( - "getInstrumentsByCriteriaPaginated", - "pageNumber", - pageNumber, - ); - // verify required parameter 'getInstrumentsByCriteriaRequestBody' is not null or undefined - assertParamExists( - "getInstrumentsByCriteriaPaginated", - "getInstrumentsByCriteriaRequestBody", - getInstrumentsByCriteriaRequestBody, - ); - const localVarPath = `/api/instruments/paginated`; - // 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; - } +export const GetInstrumentsByCriteriaPaginatedApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get Instruments by Criteria Paginated + * @summary Get Instruments by Criteria Paginated + * @param {number} pageSize Page Size + * @param {number} pageNumber Page Number (1-based enumeration) + * @param {GetInstrumentsByCriteriaRequestBody} getInstrumentsByCriteriaRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInstrumentsByCriteriaPaginated: async (pageSize: number, pageNumber: number, getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'pageSize' is not null or undefined + assertParamExists('getInstrumentsByCriteriaPaginated', 'pageSize', pageSize) + // verify required parameter 'pageNumber' is not null or undefined + assertParamExists('getInstrumentsByCriteriaPaginated', 'pageNumber', pageNumber) + // verify required parameter 'getInstrumentsByCriteriaRequestBody' is not null or undefined + assertParamExists('getInstrumentsByCriteriaPaginated', 'getInstrumentsByCriteriaRequestBody', getInstrumentsByCriteriaRequestBody) + const localVarPath = `/api/instruments/paginated`; + // 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; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - if (pageSize !== undefined) { - localVarQueryParameter["page_size"] = pageSize; - } + if (pageSize !== undefined) { + localVarQueryParameter['page_size'] = pageSize; + } - if (pageNumber !== undefined) { - localVarQueryParameter["page_number"] = pageNumber; - } + if (pageNumber !== undefined) { + localVarQueryParameter['page_number'] = pageNumber; + } - localVarHeaderParameter["Content-Type"] = "application/json"; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - localVarRequestOptions.data = serializeDataIfNeeded( - getInstrumentsByCriteriaRequestBody, - localVarRequestOptions, - configuration, - ); + + localVarHeaderParameter['Content-Type'] = 'application/json'; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(getInstrumentsByCriteriaRequestBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * GetInstrumentsByCriteriaPaginatedApi - functional programming interface * @export */ -export const GetInstrumentsByCriteriaPaginatedApiFp = function ( - configuration?: Configuration, -) { - const localVarAxiosParamCreator = - GetInstrumentsByCriteriaPaginatedApiAxiosParamCreator(configuration); - return { - /** - * Get Instruments by Criteria Paginated - * @summary Get Instruments by Criteria Paginated - * @param {number} pageSize Page Size - * @param {number} pageNumber Page Number (1-based enumeration) - * @param {GetInstrumentsByCriteriaRequestBody} getInstrumentsByCriteriaRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getInstrumentsByCriteriaPaginated( - pageSize: number, - pageNumber: number, - getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.getInstrumentsByCriteriaPaginated( - pageSize, - pageNumber, - getInstrumentsByCriteriaRequestBody, - options, - ); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap[ - "GetInstrumentsByCriteriaPaginatedApi.getInstrumentsByCriteriaPaginated" - ]?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const GetInstrumentsByCriteriaPaginatedApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = GetInstrumentsByCriteriaPaginatedApiAxiosParamCreator(configuration) + return { + /** + * Get Instruments by Criteria Paginated + * @summary Get Instruments by Criteria Paginated + * @param {number} pageSize Page Size + * @param {number} pageNumber Page Number (1-based enumeration) + * @param {GetInstrumentsByCriteriaRequestBody} getInstrumentsByCriteriaRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getInstrumentsByCriteriaPaginated(pageSize: number, pageNumber: number, getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getInstrumentsByCriteriaPaginated(pageSize, pageNumber, getInstrumentsByCriteriaRequestBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GetInstrumentsByCriteriaPaginatedApi.getInstrumentsByCriteriaPaginated']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * GetInstrumentsByCriteriaPaginatedApi - factory interface * @export */ -export const GetInstrumentsByCriteriaPaginatedApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = GetInstrumentsByCriteriaPaginatedApiFp(configuration); - return { - /** - * Get Instruments by Criteria Paginated - * @summary Get Instruments by Criteria Paginated - * @param {number} pageSize Page Size - * @param {number} pageNumber Page Number (1-based enumeration) - * @param {GetInstrumentsByCriteriaRequestBody} getInstrumentsByCriteriaRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInstrumentsByCriteriaPaginated( - pageSize: number, - pageNumber: number, - getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .getInstrumentsByCriteriaPaginated( - pageSize, - pageNumber, - getInstrumentsByCriteriaRequestBody, - options, - ) - .then((request) => request(axios, basePath)); - }, - }; +export const GetInstrumentsByCriteriaPaginatedApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GetInstrumentsByCriteriaPaginatedApiFp(configuration) + return { + /** + * Get Instruments by Criteria Paginated + * @summary Get Instruments by Criteria Paginated + * @param {number} pageSize Page Size + * @param {number} pageNumber Page Number (1-based enumeration) + * @param {GetInstrumentsByCriteriaRequestBody} getInstrumentsByCriteriaRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInstrumentsByCriteriaPaginated(pageSize: number, pageNumber: number, getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getInstrumentsByCriteriaPaginated(pageSize, pageNumber, getInstrumentsByCriteriaRequestBody, options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -233,29 +142,18 @@ export const GetInstrumentsByCriteriaPaginatedApiFactory = function ( * @extends {BaseAPI} */ export class GetInstrumentsByCriteriaPaginatedApi extends BaseAPI { - /** - * Get Instruments by Criteria Paginated - * @summary Get Instruments by Criteria Paginated - * @param {number} pageSize Page Size - * @param {number} pageNumber Page Number (1-based enumeration) - * @param {GetInstrumentsByCriteriaRequestBody} getInstrumentsByCriteriaRequestBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GetInstrumentsByCriteriaPaginatedApi - */ - public getInstrumentsByCriteriaPaginated( - pageSize: number, - pageNumber: number, - getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody, - options?: RawAxiosRequestConfig, - ) { - return GetInstrumentsByCriteriaPaginatedApiFp(this.configuration) - .getInstrumentsByCriteriaPaginated( - pageSize, - pageNumber, - getInstrumentsByCriteriaRequestBody, - options, - ) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Get Instruments by Criteria Paginated + * @summary Get Instruments by Criteria Paginated + * @param {number} pageSize Page Size + * @param {number} pageNumber Page Number (1-based enumeration) + * @param {GetInstrumentsByCriteriaRequestBody} getInstrumentsByCriteriaRequestBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GetInstrumentsByCriteriaPaginatedApi + */ + public getInstrumentsByCriteriaPaginated(pageSize: number, pageNumber: number, getInstrumentsByCriteriaRequestBody: GetInstrumentsByCriteriaRequestBody, options?: RawAxiosRequestConfig) { + return GetInstrumentsByCriteriaPaginatedApiFp(this.configuration).getInstrumentsByCriteriaPaginated(pageSize, pageNumber, getInstrumentsByCriteriaRequestBody, options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/get-manufacturers-api.ts b/client/src/generated/api/get-manufacturers-api.ts index 2ffbec49..7effa08a 100644 --- a/client/src/generated/api/get-manufacturers-api.ts +++ b/client/src/generated/api/get-manufacturers-api.ts @@ -12,153 +12,99 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ClientError } from "../model"; +import type { ClientError } from '../model'; // @ts-ignore -import type { GetManufacturersResponse } from "../model"; +import type { GetManufacturersResponse } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * GetManufacturersApi - axios parameter creator * @export */ -export const GetManufacturersApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Get Manufacturers - * @summary Get Manufacturers - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getManufacturers: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/manufacturer`; - // 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; - } +export const GetManufacturersApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get Manufacturers + * @summary Get Manufacturers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getManufacturers: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/manufacturer`; + // 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; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * GetManufacturersApi - functional programming interface * @export */ -export const GetManufacturersApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = - GetManufacturersApiAxiosParamCreator(configuration); - return { - /** - * Get Manufacturers - * @summary Get Manufacturers - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getManufacturers( - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.getManufacturers(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap["GetManufacturersApi.getManufacturers"]?.[ - localVarOperationServerIndex - ]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const GetManufacturersApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = GetManufacturersApiAxiosParamCreator(configuration) + return { + /** + * Get Manufacturers + * @summary Get Manufacturers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getManufacturers(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getManufacturers(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GetManufacturersApi.getManufacturers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * GetManufacturersApi - factory interface * @export */ -export const GetManufacturersApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = GetManufacturersApiFp(configuration); - return { - /** - * Get Manufacturers - * @summary Get Manufacturers - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getManufacturers( - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .getManufacturers(options) - .then((request) => request(axios, basePath)); - }, - }; +export const GetManufacturersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GetManufacturersApiFp(configuration) + return { + /** + * Get Manufacturers + * @summary Get Manufacturers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getManufacturers(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getManufacturers(options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -168,16 +114,15 @@ export const GetManufacturersApiFactory = function ( * @extends {BaseAPI} */ export class GetManufacturersApi extends BaseAPI { - /** - * Get Manufacturers - * @summary Get Manufacturers - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GetManufacturersApi - */ - public getManufacturers(options?: RawAxiosRequestConfig) { - return GetManufacturersApiFp(this.configuration) - .getManufacturers(options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Get Manufacturers + * @summary Get Manufacturers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GetManufacturersApi + */ + public getManufacturers(options?: RawAxiosRequestConfig) { + return GetManufacturersApiFp(this.configuration).getManufacturers(options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/get-user-profile-api.ts b/client/src/generated/api/get-user-profile-api.ts index 797a0da0..feada3ad 100644 --- a/client/src/generated/api/get-user-profile-api.ts +++ b/client/src/generated/api/get-user-profile-api.ts @@ -12,146 +12,97 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ProfileDetails } from "../model"; +import type { ProfileDetails } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * GetUserProfileApi - axios parameter creator * @export */ -export const GetUserProfileApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Get User Profile - * @summary Get Profile Info - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getProfile: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/profile`; - // 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; - } +export const GetUserProfileApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get User Profile + * @summary Get Profile Info + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getProfile: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/profile`; + // 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; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * GetUserProfileApi - functional programming interface * @export */ -export const GetUserProfileApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = - GetUserProfileApiAxiosParamCreator(configuration); - return { - /** - * Get User Profile - * @summary Get Profile Info - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getProfile( - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.getProfile(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap["GetUserProfileApi.getProfile"]?.[ - localVarOperationServerIndex - ]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const GetUserProfileApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = GetUserProfileApiAxiosParamCreator(configuration) + return { + /** + * Get User Profile + * @summary Get Profile Info + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getProfile(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProfile(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GetUserProfileApi.getProfile']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * GetUserProfileApi - factory interface * @export */ -export const GetUserProfileApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = GetUserProfileApiFp(configuration); - return { - /** - * Get User Profile - * @summary Get Profile Info - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getProfile(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp - .getProfile(options) - .then((request) => request(axios, basePath)); - }, - }; +export const GetUserProfileApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GetUserProfileApiFp(configuration) + return { + /** + * Get User Profile + * @summary Get Profile Info + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getProfile(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getProfile(options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -161,16 +112,15 @@ export const GetUserProfileApiFactory = function ( * @extends {BaseAPI} */ export class GetUserProfileApi extends BaseAPI { - /** - * Get User Profile - * @summary Get Profile Info - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GetUserProfileApi - */ - public getProfile(options?: RawAxiosRequestConfig) { - return GetUserProfileApiFp(this.configuration) - .getProfile(options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Get User Profile + * @summary Get Profile Info + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GetUserProfileApi + */ + public getProfile(options?: RawAxiosRequestConfig) { + return GetUserProfileApiFp(this.configuration).getProfile(options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/list-favorite-api.ts b/client/src/generated/api/list-favorite-api.ts index 2e12e9ab..53088d68 100644 --- a/client/src/generated/api/list-favorite-api.ts +++ b/client/src/generated/api/list-favorite-api.ts @@ -12,153 +12,99 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ClientError } from "../model"; +import type { ClientError } from '../model'; // @ts-ignore -import type { ListFavoriteResponse } from "../model"; +import type { ListFavoriteResponse } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * ListFavoriteApi - axios parameter creator * @export */ -export const ListFavoriteApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * List Favorite - * @summary List Favorite - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFavorite: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/favorite/list`; - // 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; - } +export const ListFavoriteApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * List Favorite + * @summary List Favorite + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listFavorite: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/favorite/list`; + // 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; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * ListFavoriteApi - functional programming interface * @export */ -export const ListFavoriteApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = - ListFavoriteApiAxiosParamCreator(configuration); - return { - /** - * List Favorite - * @summary List Favorite - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listFavorite( - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.listFavorite(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap["ListFavoriteApi.listFavorite"]?.[ - localVarOperationServerIndex - ]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const ListFavoriteApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ListFavoriteApiAxiosParamCreator(configuration) + return { + /** + * List Favorite + * @summary List Favorite + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listFavorite(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listFavorite(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ListFavoriteApi.listFavorite']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * ListFavoriteApi - factory interface * @export */ -export const ListFavoriteApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = ListFavoriteApiFp(configuration); - return { - /** - * List Favorite - * @summary List Favorite - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFavorite( - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .listFavorite(options) - .then((request) => request(axios, basePath)); - }, - }; +export const ListFavoriteApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ListFavoriteApiFp(configuration) + return { + /** + * List Favorite + * @summary List Favorite + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listFavorite(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listFavorite(options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -168,16 +114,15 @@ export const ListFavoriteApiFactory = function ( * @extends {BaseAPI} */ export class ListFavoriteApi extends BaseAPI { - /** - * List Favorite - * @summary List Favorite - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ListFavoriteApi - */ - public listFavorite(options?: RawAxiosRequestConfig) { - return ListFavoriteApiFp(this.configuration) - .listFavorite(options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * List Favorite + * @summary List Favorite + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ListFavoriteApi + */ + public listFavorite(options?: RawAxiosRequestConfig) { + return ListFavoriteApiFp(this.configuration).listFavorite(options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/logout-api.ts b/client/src/generated/api/logout-api.ts index 1c6c45d1..ce5f4625 100644 --- a/client/src/generated/api/logout-api.ts +++ b/client/src/generated/api/logout-api.ts @@ -12,141 +12,95 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * LogoutApi - axios parameter creator * @export */ -export const LogoutApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Logout Endpoint - * @summary Logout Endpoint - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - logout: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/auth/logout`; - // 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; - } +export const LogoutApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Logout Endpoint + * @summary Logout Endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + logout: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/auth/logout`; + // 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; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * LogoutApi - functional programming interface * @export */ -export const LogoutApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = LogoutApiAxiosParamCreator(configuration); - return { - /** - * Logout Endpoint - * @summary Logout Endpoint - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async logout( - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.logout(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap["LogoutApi.logout"]?.[localVarOperationServerIndex] - ?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const LogoutApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = LogoutApiAxiosParamCreator(configuration) + return { + /** + * Logout Endpoint + * @summary Logout Endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async logout(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.logout(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LogoutApi.logout']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * LogoutApi - factory interface * @export */ -export const LogoutApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = LogoutApiFp(configuration); - return { - /** - * Logout Endpoint - * @summary Logout Endpoint - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - logout(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp - .logout(options) - .then((request) => request(axios, basePath)); - }, - }; +export const LogoutApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = LogoutApiFp(configuration) + return { + /** + * Logout Endpoint + * @summary Logout Endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + logout(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.logout(options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -156,16 +110,15 @@ export const LogoutApiFactory = function ( * @extends {BaseAPI} */ export class LogoutApi extends BaseAPI { - /** - * Logout Endpoint - * @summary Logout Endpoint - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LogoutApi - */ - public logout(options?: RawAxiosRequestConfig) { - return LogoutApiFp(this.configuration) - .logout(options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Logout Endpoint + * @summary Logout Endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LogoutApi + */ + public logout(options?: RawAxiosRequestConfig) { + return LogoutApiFp(this.configuration).logout(options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/remove-favorite-api.ts b/client/src/generated/api/remove-favorite-api.ts index b35a34a5..f9213e90 100644 --- a/client/src/generated/api/remove-favorite-api.ts +++ b/client/src/generated/api/remove-favorite-api.ts @@ -12,167 +12,107 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ClientError } from "../model"; +import type { ClientError } from '../model'; // @ts-ignore -import type { InstrumentId } from "../model"; +import type { InstrumentId } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * RemoveFavoriteApi - axios parameter creator * @export */ -export const RemoveFavoriteApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Remove Favorite - * @summary Remove Favorite - * @param {InstrumentId} instrumentId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - removeFavorite: async ( - instrumentId: InstrumentId, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'instrumentId' is not null or undefined - assertParamExists("removeFavorite", "instrumentId", instrumentId); - const localVarPath = `/api/favorite/remove`; - // 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; - } +export const RemoveFavoriteApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Remove Favorite + * @summary Remove Favorite + * @param {InstrumentId} instrumentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + removeFavorite: async (instrumentId: InstrumentId, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'instrumentId' is not null or undefined + assertParamExists('removeFavorite', 'instrumentId', instrumentId) + const localVarPath = `/api/favorite/remove`; + // 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; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - localVarHeaderParameter["Content-Type"] = "application/json"; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - localVarRequestOptions.data = serializeDataIfNeeded( - instrumentId, - localVarRequestOptions, - configuration, - ); + + localVarHeaderParameter['Content-Type'] = 'application/json'; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(instrumentId, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * RemoveFavoriteApi - functional programming interface * @export */ -export const RemoveFavoriteApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = - RemoveFavoriteApiAxiosParamCreator(configuration); - return { - /** - * Remove Favorite - * @summary Remove Favorite - * @param {InstrumentId} instrumentId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async removeFavorite( - instrumentId: InstrumentId, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.removeFavorite( - instrumentId, - options, - ); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap["RemoveFavoriteApi.removeFavorite"]?.[ - localVarOperationServerIndex - ]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const RemoveFavoriteApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = RemoveFavoriteApiAxiosParamCreator(configuration) + return { + /** + * Remove Favorite + * @summary Remove Favorite + * @param {InstrumentId} instrumentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async removeFavorite(instrumentId: InstrumentId, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.removeFavorite(instrumentId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RemoveFavoriteApi.removeFavorite']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * RemoveFavoriteApi - factory interface * @export */ -export const RemoveFavoriteApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = RemoveFavoriteApiFp(configuration); - return { - /** - * Remove Favorite - * @summary Remove Favorite - * @param {InstrumentId} instrumentId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - removeFavorite( - instrumentId: InstrumentId, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .removeFavorite(instrumentId, options) - .then((request) => request(axios, basePath)); - }, - }; +export const RemoveFavoriteApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = RemoveFavoriteApiFp(configuration) + return { + /** + * Remove Favorite + * @summary Remove Favorite + * @param {InstrumentId} instrumentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + removeFavorite(instrumentId: InstrumentId, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.removeFavorite(instrumentId, options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -182,20 +122,16 @@ export const RemoveFavoriteApiFactory = function ( * @extends {BaseAPI} */ export class RemoveFavoriteApi extends BaseAPI { - /** - * Remove Favorite - * @summary Remove Favorite - * @param {InstrumentId} instrumentId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RemoveFavoriteApi - */ - public removeFavorite( - instrumentId: InstrumentId, - options?: RawAxiosRequestConfig, - ) { - return RemoveFavoriteApiFp(this.configuration) - .removeFavorite(instrumentId, options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Remove Favorite + * @summary Remove Favorite + * @param {InstrumentId} instrumentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RemoveFavoriteApi + */ + public removeFavorite(instrumentId: InstrumentId, options?: RawAxiosRequestConfig) { + return RemoveFavoriteApiFp(this.configuration).removeFavorite(instrumentId, options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/api/user-registration-api.ts b/client/src/generated/api/user-registration-api.ts index 705cacf2..5c70f9f5 100644 --- a/client/src/generated/api/user-registration-api.ts +++ b/client/src/generated/api/user-registration-api.ts @@ -12,170 +12,105 @@ * Do not edit the class manually. */ -import type { Configuration } from "../configuration"; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import { - DUMMY_BASE_URL, - assertParamExists, - setApiKeyToObject, - setBasicAuthToObject, - setBearerAuthToObject, - setOAuthToObject, - setSearchParams, - serializeDataIfNeeded, - toPathString, - createRequestFunction, -} from "../common"; +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore -import { - BASE_PATH, - COLLECTION_FORMATS, - type RequestArgs, - BaseAPI, - RequiredError, - operationServerMap, -} from "../base"; +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { RegistrationRequest } from "../model"; +import type { RegistrationRequest } from '../model'; // @ts-ignore -import type { ServerError } from "../model"; +import type { ServerError } from '../model'; /** * UserRegistrationApi - axios parameter creator * @export */ -export const UserRegistrationApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Register User - * @summary User Registration - * @param {RegistrationRequest} registrationRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userRegistration: async ( - registrationRequest: RegistrationRequest, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'registrationRequest' is not null or undefined - assertParamExists( - "userRegistration", - "registrationRequest", - registrationRequest, - ); - const localVarPath = `/api/registration`; - // 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; - } +export const UserRegistrationApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Register User + * @summary User Registration + * @param {RegistrationRequest} registrationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userRegistration: async (registrationRequest: RegistrationRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'registrationRequest' is not null or undefined + assertParamExists('userRegistration', 'registrationRequest', registrationRequest) + const localVarPath = `/api/registration`; + // 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; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; - localVarHeaderParameter["Content-Type"] = "application/json"; - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - }; - localVarRequestOptions.data = serializeDataIfNeeded( - registrationRequest, - localVarRequestOptions, - configuration, - ); + + localVarHeaderParameter['Content-Type'] = 'application/json'; - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - }; + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(registrationRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } }; /** * UserRegistrationApi - functional programming interface * @export */ -export const UserRegistrationApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = - UserRegistrationApiAxiosParamCreator(configuration); - return { - /** - * Register User - * @summary User Registration - * @param {RegistrationRequest} registrationRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userRegistration( - registrationRequest: RegistrationRequest, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.userRegistration( - registrationRequest, - options, - ); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = - operationServerMap["UserRegistrationApi.userRegistration"]?.[ - localVarOperationServerIndex - ]?.url; - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath); - }, - }; +export const UserRegistrationApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = UserRegistrationApiAxiosParamCreator(configuration) + return { + /** + * Register User + * @summary User Registration + * @param {RegistrationRequest} registrationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userRegistration(registrationRequest: RegistrationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.userRegistration(registrationRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserRegistrationApi.userRegistration']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } }; /** * UserRegistrationApi - factory interface * @export */ -export const UserRegistrationApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = UserRegistrationApiFp(configuration); - return { - /** - * Register User - * @summary User Registration - * @param {RegistrationRequest} registrationRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userRegistration( - registrationRequest: RegistrationRequest, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .userRegistration(registrationRequest, options) - .then((request) => request(axios, basePath)); - }, - }; +export const UserRegistrationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UserRegistrationApiFp(configuration) + return { + /** + * Register User + * @summary User Registration + * @param {RegistrationRequest} registrationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userRegistration(registrationRequest: RegistrationRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.userRegistration(registrationRequest, options).then((request) => request(axios, basePath)); + }, + }; }; /** @@ -185,20 +120,16 @@ export const UserRegistrationApiFactory = function ( * @extends {BaseAPI} */ export class UserRegistrationApi extends BaseAPI { - /** - * Register User - * @summary User Registration - * @param {RegistrationRequest} registrationRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserRegistrationApi - */ - public userRegistration( - registrationRequest: RegistrationRequest, - options?: RawAxiosRequestConfig, - ) { - return UserRegistrationApiFp(this.configuration) - .userRegistration(registrationRequest, options) - .then((request) => request(this.axios, this.basePath)); - } + /** + * Register User + * @summary User Registration + * @param {RegistrationRequest} registrationRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserRegistrationApi + */ + public userRegistration(registrationRequest: RegistrationRequest, options?: RawAxiosRequestConfig) { + return UserRegistrationApiFp(this.configuration).userRegistration(registrationRequest, options).then((request) => request(this.axios, this.basePath)); + } } + diff --git a/client/src/generated/base.ts b/client/src/generated/base.ts index 9a867fc8..54eed7d9 100644 --- a/client/src/generated/base.ts +++ b/client/src/generated/base.ts @@ -12,11 +12,12 @@ * Do not edit the class manually. */ -import type { Configuration } from "./configuration"; + +import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; -import globalAxios from "axios"; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "http://localhost:8080".replace(/\/+$/, ""); @@ -25,10 +26,10 @@ export const BASE_PATH = "http://localhost:8080".replace(/\/+$/, ""); * @export */ export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; /** @@ -37,8 +38,8 @@ export const COLLECTION_FORMATS = { * @interface RequestArgs */ export interface RequestArgs { - url: string; - options: RawAxiosRequestConfig; + url: string; + options: RawAxiosRequestConfig; } /** @@ -47,19 +48,15 @@ export interface RequestArgs { * @class BaseAPI */ export class BaseAPI { - protected configuration: Configuration | undefined; + protected configuration: Configuration | undefined; - constructor( - configuration?: Configuration, - protected basePath: string = BASE_PATH, - protected axios: AxiosInstance = globalAxios, - ) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath ?? basePath; + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath ?? basePath; + } } - } -} +}; /** * @@ -68,24 +65,22 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor( - public field: string, - msg?: string, - ) { - super(msg); - this.name = "RequiredError"; - } + constructor(public field: string, msg?: string) { + super(msg); + this.name = "RequiredError" + } } interface ServerMap { - [key: string]: { - url: string; - description: string; - }[]; + [key: string]: { + url: string, + description: string, + }[]; } /** * * @export */ -export const operationServerMap: ServerMap = {}; +export const operationServerMap: ServerMap = { +} diff --git a/client/src/generated/common.ts b/client/src/generated/common.ts index 94df3f8f..98bf6297 100644 --- a/client/src/generated/common.ts +++ b/client/src/generated/common.ts @@ -12,132 +12,98 @@ * Do not edit the class manually. */ + import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from "axios"; +import type { AxiosInstance, AxiosResponse } from 'axios'; import { RequiredError } from "./base"; /** * * @export */ -export const DUMMY_BASE_URL = "https://example.com"; +export const DUMMY_BASE_URL = 'https://example.com' /** * * @throws {RequiredError} * @export */ -export const assertParamExists = function ( - functionName: string, - paramName: string, - paramValue: unknown, -) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError( - paramName, - `Required parameter ${paramName} was null or undefined when calling ${functionName}.`, - ); - } -}; +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} /** * * @export */ -export const setApiKeyToObject = async function ( - object: any, - keyParamName: string, - configuration?: Configuration, -) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = - typeof configuration.apiKey === "function" - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -}; +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} /** * * @export */ -export const setBasicAuthToObject = function ( - object: any, - configuration?: Configuration, -) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { - username: configuration.username, - password: configuration.password, - }; - } -}; +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} /** * * @export */ -export const setBearerAuthToObject = async function ( - object: any, - configuration?: Configuration, -) { - if (configuration && configuration.accessToken) { - const accessToken = - typeof configuration.accessToken === "function" - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -}; +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} /** * * @export */ -export const setOAuthToObject = async function ( - object: any, - name: string, - scopes: string[], - configuration?: Configuration, -) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = - typeof configuration.accessToken === "function" - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -}; - -function setFlattenedQueryParams( - urlSearchParams: URLSearchParams, - parameter: any, - key: string = "", -): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach((item) => - setFlattenedQueryParams(urlSearchParams, item, key), - ); - } else { - Object.keys(parameter).forEach((currentKey) => - setFlattenedQueryParams( - urlSearchParams, - parameter[currentKey], - `${key}${key !== "" ? "." : ""}${currentKey}`, - ), - ); +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; } - } else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } else { - urlSearchParams.set(key, parameter); +} + +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); + } + else { + Object.keys(parameter).forEach(currentKey => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) + ); + } + } + else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } + else { + urlSearchParams.set(key, parameter); + } } - } } /** @@ -145,58 +111,40 @@ function setFlattenedQueryParams( * @export */ export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -}; + const searchParams = new URLSearchParams(url.search); + setFlattenedQueryParams(searchParams, objects); + url.search = searchParams.toString(); +} /** * * @export */ -export const serializeDataIfNeeded = function ( - value: any, - requestOptions: any, - configuration?: Configuration, -) { - const nonString = typeof value !== "string"; - const needsSerialization = - nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : value || ""; -}; +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} /** * * @export */ export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash; -}; + return url.pathname + url.search + url.hash +} /** * * @export */ -export const createRequestFunction = function ( - axiosArgs: RequestArgs, - globalAxios: AxiosInstance, - BASE_PATH: string, - configuration?: Configuration, -) { - return >( - axios: AxiosInstance = globalAxios, - basePath: string = BASE_PATH, - ) => { - const axiosRequestArgs = { - ...axiosArgs.options, - url: - (axios.defaults.baseURL ? "" : (configuration?.basePath ?? basePath)) + - axiosArgs.url, +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); }; - return axios.request(axiosRequestArgs); - }; -}; +} diff --git a/client/src/generated/configuration.ts b/client/src/generated/configuration.ts index 48415d50..6ca4f951 100644 --- a/client/src/generated/configuration.ts +++ b/client/src/generated/configuration.ts @@ -12,121 +12,99 @@ * Do not edit the class manually. */ + export interface ConfigurationParameters { - apiKey?: - | string - | Promise - | ((name: string) => string) - | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string) - | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - serverIndex?: number; - baseOptions?: any; - formDataCtor?: new () => any; + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + serverIndex?: number; + baseOptions?: any; + formDataCtor?: new () => any; } export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: - | string - | Promise - | ((name: string) => string) - | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string) - | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * override server index - * - * @type {number} - * @memberof Configuration - */ - serverIndex?: number; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * override server index + * + * @type {number} + * @memberof Configuration + */ + serverIndex?: number; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.serverIndex = param.serverIndex; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.serverIndex = param.serverIndex; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp( - "^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$", - "i", - ); - return ( - mime !== null && - (jsonMime.test(mime) || - mime.toLowerCase() === "application/json-patch+json") - ); - } + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } } diff --git a/client/src/generated/index.ts b/client/src/generated/index.ts index da6703df..939130d1 100644 --- a/client/src/generated/index.ts +++ b/client/src/generated/index.ts @@ -12,6 +12,7 @@ * Do not edit the class manually. */ + export * from "./api"; export * from "./configuration"; export * from "./model"; diff --git a/client/src/generated/model/basic-material.ts b/client/src/generated/model/basic-material.ts index b3df3d7f..5ef08d21 100644 --- a/client/src/generated/model/basic-material.ts +++ b/client/src/generated/model/basic-material.ts @@ -12,16 +12,19 @@ * Do not edit the class manually. */ + + /** - * + * * @export * @interface BasicMaterial */ export interface BasicMaterial { - /** - * - * @type {string} - * @memberof BasicMaterial - */ - basic_material: string; + /** + * + * @type {string} + * @memberof BasicMaterial + */ + 'basic_material': string; } + diff --git a/client/src/generated/model/client-error.ts b/client/src/generated/model/client-error.ts index 46a4da70..00a74ee7 100644 --- a/client/src/generated/model/client-error.ts +++ b/client/src/generated/model/client-error.ts @@ -12,22 +12,25 @@ * Do not edit the class manually. */ + + /** - * + * * @export * @interface ClientError */ export interface ClientError { - /** - * Error description - * @type {string} - * @memberof ClientError - */ - message: string; - /** - * Exception stack trace - * @type {string} - * @memberof ClientError - */ - cause?: string; + /** + * Error description + * @type {string} + * @memberof ClientError + */ + 'message': string; + /** + * Exception stack trace + * @type {string} + * @memberof ClientError + */ + 'cause'?: string; } + diff --git a/client/src/generated/model/country.ts b/client/src/generated/model/country.ts index be09f105..233ac79f 100644 --- a/client/src/generated/model/country.ts +++ b/client/src/generated/model/country.ts @@ -12,16 +12,19 @@ * Do not edit the class manually. */ + + /** - * + * * @export * @interface Country */ export interface Country { - /** - * - * @type {string} - * @memberof Country - */ - country: string; + /** + * + * @type {string} + * @memberof Country + */ + 'country': string; } + diff --git a/client/src/generated/model/create-instrument-request-body.ts b/client/src/generated/model/create-instrument-request-body.ts index 0fe3181f..b8669886 100644 --- a/client/src/generated/model/create-instrument-request-body.ts +++ b/client/src/generated/model/create-instrument-request-body.ts @@ -12,29 +12,31 @@ * Do not edit the class manually. */ + // May contain unused imports in some cases // @ts-ignore -import type { InstrumentDetailWithoutId } from "./instrument-detail-without-id"; +import type { InstrumentDetailWithoutId } from './instrument-detail-without-id'; // May contain unused imports in some cases // @ts-ignore -import type { InstrumentPhoto } from "./instrument-photo"; +import type { InstrumentPhoto } from './instrument-photo'; /** - * + * * @export * @interface CreateInstrumentRequestBody */ export interface CreateInstrumentRequestBody { - /** - * - * @type {InstrumentDetailWithoutId} - * @memberof CreateInstrumentRequestBody - */ - instrument_detail: InstrumentDetailWithoutId; - /** - * - * @type {InstrumentPhoto} - * @memberof CreateInstrumentRequestBody - */ - instrument_photo: InstrumentPhoto; + /** + * + * @type {InstrumentDetailWithoutId} + * @memberof CreateInstrumentRequestBody + */ + 'instrument_detail': InstrumentDetailWithoutId; + /** + * + * @type {InstrumentPhoto} + * @memberof CreateInstrumentRequestBody + */ + 'instrument_photo': InstrumentPhoto; } + diff --git a/client/src/generated/model/edit-instrument-request-body.ts b/client/src/generated/model/edit-instrument-request-body.ts index 83379b48..27dc3b59 100644 --- a/client/src/generated/model/edit-instrument-request-body.ts +++ b/client/src/generated/model/edit-instrument-request-body.ts @@ -12,29 +12,31 @@ * Do not edit the class manually. */ + // May contain unused imports in some cases // @ts-ignore -import type { InstrumentDetail } from "./instrument-detail"; +import type { InstrumentDetail } from './instrument-detail'; // May contain unused imports in some cases // @ts-ignore -import type { InstrumentPhoto } from "./instrument-photo"; +import type { InstrumentPhoto } from './instrument-photo'; /** - * + * * @export * @interface EditInstrumentRequestBody */ export interface EditInstrumentRequestBody { - /** - * - * @type {InstrumentDetail} - * @memberof EditInstrumentRequestBody - */ - instrument_detail: InstrumentDetail; - /** - * - * @type {InstrumentPhoto} - * @memberof EditInstrumentRequestBody - */ - instrument_photo: InstrumentPhoto; + /** + * + * @type {InstrumentDetail} + * @memberof EditInstrumentRequestBody + */ + 'instrument_detail': InstrumentDetail; + /** + * + * @type {InstrumentPhoto} + * @memberof EditInstrumentRequestBody + */ + 'instrument_photo': InstrumentPhoto; } + diff --git a/client/src/generated/model/get-countries-response.ts b/client/src/generated/model/get-countries-response.ts index 3dc7b9bf..1f4c4320 100644 --- a/client/src/generated/model/get-countries-response.ts +++ b/client/src/generated/model/get-countries-response.ts @@ -12,20 +12,22 @@ * Do not edit the class manually. */ + // May contain unused imports in some cases // @ts-ignore -import type { Country } from "./country"; +import type { Country } from './country'; /** - * + * * @export * @interface GetCountriesResponse */ export interface GetCountriesResponse { - /** - * - * @type {Array} - * @memberof GetCountriesResponse - */ - content: Array; + /** + * + * @type {Array} + * @memberof GetCountriesResponse + */ + 'content': Array; } + diff --git a/client/src/generated/model/get-instrument-basic-materials-response.ts b/client/src/generated/model/get-instrument-basic-materials-response.ts index 1bc90b4f..f13547bd 100644 --- a/client/src/generated/model/get-instrument-basic-materials-response.ts +++ b/client/src/generated/model/get-instrument-basic-materials-response.ts @@ -12,20 +12,22 @@ * Do not edit the class manually. */ + // May contain unused imports in some cases // @ts-ignore -import type { BasicMaterial } from "./basic-material"; +import type { BasicMaterial } from './basic-material'; /** - * + * * @export * @interface GetInstrumentBasicMaterialsResponse */ export interface GetInstrumentBasicMaterialsResponse { - /** - * - * @type {Array} - * @memberof GetInstrumentBasicMaterialsResponse - */ - content: Array; + /** + * + * @type {Array} + * @memberof GetInstrumentBasicMaterialsResponse + */ + 'content': Array; } + diff --git a/client/src/generated/model/get-instrument-by-criteria-page-response.ts b/client/src/generated/model/get-instrument-by-criteria-page-response.ts index c0d97270..c8b9b3b4 100644 --- a/client/src/generated/model/get-instrument-by-criteria-page-response.ts +++ b/client/src/generated/model/get-instrument-by-criteria-page-response.ts @@ -12,50 +12,52 @@ * Do not edit the class manually. */ + // May contain unused imports in some cases // @ts-ignore -import type { InstrumentDetail } from "./instrument-detail"; +import type { InstrumentDetail } from './instrument-detail'; /** - * + * * @export * @interface GetInstrumentByCriteriaPageResponse */ export interface GetInstrumentByCriteriaPageResponse { - /** - * - * @type {Array} - * @memberof GetInstrumentByCriteriaPageResponse - */ - content: Array; - /** - * The number of items in the content. - * @type {number} - * @memberof GetInstrumentByCriteriaPageResponse - */ - content_size: number; - /** - * The number of items per page. - * @type {number} - * @memberof GetInstrumentByCriteriaPageResponse - */ - page_size: number; - /** - * The current page number (0-based index). - * @type {number} - * @memberof GetInstrumentByCriteriaPageResponse - */ - page_number: number; - /** - * The total number of elements across all pages. - * @type {number} - * @memberof GetInstrumentByCriteriaPageResponse - */ - total_elements: number; - /** - * The total number of pages. - * @type {number} - * @memberof GetInstrumentByCriteriaPageResponse - */ - total_pages: number; + /** + * + * @type {Array} + * @memberof GetInstrumentByCriteriaPageResponse + */ + 'content': Array; + /** + * The number of items in the content. + * @type {number} + * @memberof GetInstrumentByCriteriaPageResponse + */ + 'content_size': number; + /** + * The number of items per page. + * @type {number} + * @memberof GetInstrumentByCriteriaPageResponse + */ + 'page_size': number; + /** + * The current page number (0-based index). + * @type {number} + * @memberof GetInstrumentByCriteriaPageResponse + */ + 'page_number': number; + /** + * The total number of elements across all pages. + * @type {number} + * @memberof GetInstrumentByCriteriaPageResponse + */ + 'total_elements': number; + /** + * The total number of pages. + * @type {number} + * @memberof GetInstrumentByCriteriaPageResponse + */ + 'total_pages': number; } + diff --git a/client/src/generated/model/get-instrument-types-response.ts b/client/src/generated/model/get-instrument-types-response.ts index 3f6ab90f..70d546a0 100644 --- a/client/src/generated/model/get-instrument-types-response.ts +++ b/client/src/generated/model/get-instrument-types-response.ts @@ -12,20 +12,22 @@ * Do not edit the class manually. */ + // May contain unused imports in some cases // @ts-ignore -import type { InstrumentType } from "./instrument-type"; +import type { InstrumentType } from './instrument-type'; /** - * + * * @export * @interface GetInstrumentTypesResponse */ export interface GetInstrumentTypesResponse { - /** - * - * @type {Array} - * @memberof GetInstrumentTypesResponse - */ - content: Array; + /** + * + * @type {Array} + * @memberof GetInstrumentTypesResponse + */ + 'content': Array; } + diff --git a/client/src/generated/model/get-instruments-by-criteria-request-body.ts b/client/src/generated/model/get-instruments-by-criteria-request-body.ts index 6f0c0172..8bc4d84d 100644 --- a/client/src/generated/model/get-instruments-by-criteria-request-body.ts +++ b/client/src/generated/model/get-instruments-by-criteria-request-body.ts @@ -12,95 +12,97 @@ * Do not edit the class manually. */ + // May contain unused imports in some cases // @ts-ignore -import type { BasicMaterial } from "./basic-material"; +import type { BasicMaterial } from './basic-material'; // May contain unused imports in some cases // @ts-ignore -import type { Country } from "./country"; +import type { Country } from './country'; // May contain unused imports in some cases // @ts-ignore -import type { InstrumentId } from "./instrument-id"; +import type { InstrumentId } from './instrument-id'; // May contain unused imports in some cases // @ts-ignore -import type { InstrumentName } from "./instrument-name"; +import type { InstrumentName } from './instrument-name'; // May contain unused imports in some cases // @ts-ignore -import type { InstrumentType } from "./instrument-type"; +import type { InstrumentType } from './instrument-type'; // May contain unused imports in some cases // @ts-ignore -import type { ManufactureDate } from "./manufacture-date"; +import type { ManufactureDate } from './manufacture-date'; // May contain unused imports in some cases // @ts-ignore -import type { ManufacturerName } from "./manufacturer-name"; +import type { ManufacturerName } from './manufacturer-name'; // May contain unused imports in some cases // @ts-ignore -import type { ReleaseDate } from "./release-date"; +import type { ReleaseDate } from './release-date'; /** - * + * * @export * @interface GetInstrumentsByCriteriaRequestBody */ export interface GetInstrumentsByCriteriaRequestBody { - /** - * - * @type {InstrumentName} - * @memberof GetInstrumentsByCriteriaRequestBody - */ - instrument_name?: InstrumentName | null; - /** - * - * @type {Array} - * @memberof GetInstrumentsByCriteriaRequestBody - */ - instrument_types?: Array | null; - /** - * - * @type {Array} - * @memberof GetInstrumentsByCriteriaRequestBody - */ - manufacturer_names?: Array | null; - /** - * - * @type {ManufactureDate} - * @memberof GetInstrumentsByCriteriaRequestBody - */ - manufacture_date_from?: ManufactureDate | null; - /** - * - * @type {ManufactureDate} - * @memberof GetInstrumentsByCriteriaRequestBody - */ - manufacture_date_to?: ManufactureDate | null; - /** - * - * @type {ReleaseDate} - * @memberof GetInstrumentsByCriteriaRequestBody - */ - release_date_from?: ReleaseDate | null; - /** - * - * @type {ReleaseDate} - * @memberof GetInstrumentsByCriteriaRequestBody - */ - release_date_to?: ReleaseDate | null; - /** - * - * @type {Array} - * @memberof GetInstrumentsByCriteriaRequestBody - */ - countries?: Array | null; - /** - * - * @type {Array} - * @memberof GetInstrumentsByCriteriaRequestBody - */ - materials?: Array | null; - /** - * - * @type {Array} - * @memberof GetInstrumentsByCriteriaRequestBody - */ - instrument_ids?: Array | null; + /** + * + * @type {InstrumentName} + * @memberof GetInstrumentsByCriteriaRequestBody + */ + 'instrument_name'?: InstrumentName | null; + /** + * + * @type {Array} + * @memberof GetInstrumentsByCriteriaRequestBody + */ + 'instrument_types'?: Array | null; + /** + * + * @type {Array} + * @memberof GetInstrumentsByCriteriaRequestBody + */ + 'manufacturer_names'?: Array | null; + /** + * + * @type {ManufactureDate} + * @memberof GetInstrumentsByCriteriaRequestBody + */ + 'manufacture_date_from'?: ManufactureDate | null; + /** + * + * @type {ManufactureDate} + * @memberof GetInstrumentsByCriteriaRequestBody + */ + 'manufacture_date_to'?: ManufactureDate | null; + /** + * + * @type {ReleaseDate} + * @memberof GetInstrumentsByCriteriaRequestBody + */ + 'release_date_from'?: ReleaseDate | null; + /** + * + * @type {ReleaseDate} + * @memberof GetInstrumentsByCriteriaRequestBody + */ + 'release_date_to'?: ReleaseDate | null; + /** + * + * @type {Array} + * @memberof GetInstrumentsByCriteriaRequestBody + */ + 'countries'?: Array | null; + /** + * + * @type {Array} + * @memberof GetInstrumentsByCriteriaRequestBody + */ + 'materials'?: Array | null; + /** + * + * @type {Array} + * @memberof GetInstrumentsByCriteriaRequestBody + */ + 'instrument_ids'?: Array | null; } + diff --git a/client/src/generated/model/get-instruments-by-criteria-response.ts b/client/src/generated/model/get-instruments-by-criteria-response.ts index cd935e4e..65fcebca 100644 --- a/client/src/generated/model/get-instruments-by-criteria-response.ts +++ b/client/src/generated/model/get-instruments-by-criteria-response.ts @@ -12,20 +12,22 @@ * Do not edit the class manually. */ + // May contain unused imports in some cases // @ts-ignore -import type { InstrumentDetail } from "./instrument-detail"; +import type { InstrumentDetail } from './instrument-detail'; /** - * + * * @export * @interface GetInstrumentsByCriteriaResponse */ export interface GetInstrumentsByCriteriaResponse { - /** - * - * @type {Array} - * @memberof GetInstrumentsByCriteriaResponse - */ - content: Array; + /** + * + * @type {Array} + * @memberof GetInstrumentsByCriteriaResponse + */ + 'content': Array; } + diff --git a/client/src/generated/model/get-manufacturers-response.ts b/client/src/generated/model/get-manufacturers-response.ts index 225b73b6..63551326 100644 --- a/client/src/generated/model/get-manufacturers-response.ts +++ b/client/src/generated/model/get-manufacturers-response.ts @@ -12,20 +12,22 @@ * Do not edit the class manually. */ + // May contain unused imports in some cases // @ts-ignore -import type { Manufacturer } from "./manufacturer"; +import type { Manufacturer } from './manufacturer'; /** - * + * * @export * @interface GetManufacturersResponse */ export interface GetManufacturersResponse { - /** - * - * @type {Array} - * @memberof GetManufacturersResponse - */ - content: Array; + /** + * + * @type {Array} + * @memberof GetManufacturersResponse + */ + 'content': Array; } + diff --git a/client/src/generated/model/index.ts b/client/src/generated/model/index.ts index 0b0ad53d..414b451a 100644 --- a/client/src/generated/model/index.ts +++ b/client/src/generated/model/index.ts @@ -1,28 +1,28 @@ -export * from "./basic-material"; -export * from "./client-error"; -export * from "./country"; -export * from "./create-instrument-request-body"; -export * from "./edit-instrument-request-body"; -export * from "./get-countries-response"; -export * from "./get-instrument-basic-materials-response"; -export * from "./get-instrument-by-criteria-page-response"; -export * from "./get-instrument-types-response"; -export * from "./get-instruments-by-criteria-request-body"; -export * from "./get-instruments-by-criteria-response"; -export * from "./get-manufacturers-response"; -export * from "./instrument-detail"; -export * from "./instrument-detail-without-id"; -export * from "./instrument-id"; -export * from "./instrument-name"; -export * from "./instrument-photo"; -export * from "./instrument-type"; -export * from "./jwt-response"; -export * from "./list-favorite-response"; -export * from "./manufacture-date"; -export * from "./manufacturer"; -export * from "./manufacturer-name"; -export * from "./profile-details"; -export * from "./registration-request"; -export * from "./release-date"; -export * from "./server-error"; -export * from "./username-and-password-request-body"; +export * from './basic-material'; +export * from './client-error'; +export * from './country'; +export * from './create-instrument-request-body'; +export * from './edit-instrument-request-body'; +export * from './get-countries-response'; +export * from './get-instrument-basic-materials-response'; +export * from './get-instrument-by-criteria-page-response'; +export * from './get-instrument-types-response'; +export * from './get-instruments-by-criteria-request-body'; +export * from './get-instruments-by-criteria-response'; +export * from './get-manufacturers-response'; +export * from './instrument-detail'; +export * from './instrument-detail-without-id'; +export * from './instrument-id'; +export * from './instrument-name'; +export * from './instrument-photo'; +export * from './instrument-type'; +export * from './jwt-response'; +export * from './list-favorite-response'; +export * from './manufacture-date'; +export * from './manufacturer'; +export * from './manufacturer-name'; +export * from './profile-details'; +export * from './registration-request'; +export * from './release-date'; +export * from './server-error'; +export * from './username-and-password-request-body'; diff --git a/client/src/generated/model/instrument-detail-without-id.ts b/client/src/generated/model/instrument-detail-without-id.ts index 673af7bc..34c5e19f 100644 --- a/client/src/generated/model/instrument-detail-without-id.ts +++ b/client/src/generated/model/instrument-detail-without-id.ts @@ -12,74 +12,76 @@ * Do not edit the class manually. */ + // May contain unused imports in some cases // @ts-ignore -import type { BasicMaterial } from "./basic-material"; +import type { BasicMaterial } from './basic-material'; // May contain unused imports in some cases // @ts-ignore -import type { Country } from "./country"; +import type { Country } from './country'; // May contain unused imports in some cases // @ts-ignore -import type { InstrumentName } from "./instrument-name"; +import type { InstrumentName } from './instrument-name'; // May contain unused imports in some cases // @ts-ignore -import type { InstrumentType } from "./instrument-type"; +import type { InstrumentType } from './instrument-type'; // May contain unused imports in some cases // @ts-ignore -import type { ManufactureDate } from "./manufacture-date"; +import type { ManufactureDate } from './manufacture-date'; // May contain unused imports in some cases // @ts-ignore -import type { ManufacturerName } from "./manufacturer-name"; +import type { ManufacturerName } from './manufacturer-name'; // May contain unused imports in some cases // @ts-ignore -import type { ReleaseDate } from "./release-date"; +import type { ReleaseDate } from './release-date'; /** - * + * * @export * @interface InstrumentDetailWithoutId */ export interface InstrumentDetailWithoutId { - /** - * - * @type {InstrumentName} - * @memberof InstrumentDetailWithoutId - */ - instrument_name: InstrumentName; - /** - * - * @type {InstrumentType} - * @memberof InstrumentDetailWithoutId - */ - instrument_type: InstrumentType; - /** - * - * @type {ManufacturerName} - * @memberof InstrumentDetailWithoutId - */ - manufacturer_name: ManufacturerName; - /** - * - * @type {ManufactureDate} - * @memberof InstrumentDetailWithoutId - */ - manufacturer_date: ManufactureDate; - /** - * - * @type {ReleaseDate} - * @memberof InstrumentDetailWithoutId - */ - release_date: ReleaseDate; - /** - * - * @type {Country} - * @memberof InstrumentDetailWithoutId - */ - country: Country; - /** - * - * @type {Array} - * @memberof InstrumentDetailWithoutId - */ - basic_materials: Array; + /** + * + * @type {InstrumentName} + * @memberof InstrumentDetailWithoutId + */ + 'instrument_name': InstrumentName; + /** + * + * @type {InstrumentType} + * @memberof InstrumentDetailWithoutId + */ + 'instrument_type': InstrumentType; + /** + * + * @type {ManufacturerName} + * @memberof InstrumentDetailWithoutId + */ + 'manufacturer_name': ManufacturerName; + /** + * + * @type {ManufactureDate} + * @memberof InstrumentDetailWithoutId + */ + 'manufacturer_date': ManufactureDate; + /** + * + * @type {ReleaseDate} + * @memberof InstrumentDetailWithoutId + */ + 'release_date': ReleaseDate; + /** + * + * @type {Country} + * @memberof InstrumentDetailWithoutId + */ + 'country': Country; + /** + * + * @type {Array} + * @memberof InstrumentDetailWithoutId + */ + 'basic_materials': Array; } + diff --git a/client/src/generated/model/instrument-detail.ts b/client/src/generated/model/instrument-detail.ts index 4cecebcd..e5d366fe 100644 --- a/client/src/generated/model/instrument-detail.ts +++ b/client/src/generated/model/instrument-detail.ts @@ -12,83 +12,85 @@ * Do not edit the class manually. */ + // May contain unused imports in some cases // @ts-ignore -import type { BasicMaterial } from "./basic-material"; +import type { BasicMaterial } from './basic-material'; // May contain unused imports in some cases // @ts-ignore -import type { Country } from "./country"; +import type { Country } from './country'; // May contain unused imports in some cases // @ts-ignore -import type { InstrumentId } from "./instrument-id"; +import type { InstrumentId } from './instrument-id'; // May contain unused imports in some cases // @ts-ignore -import type { InstrumentName } from "./instrument-name"; +import type { InstrumentName } from './instrument-name'; // May contain unused imports in some cases // @ts-ignore -import type { InstrumentType } from "./instrument-type"; +import type { InstrumentType } from './instrument-type'; // May contain unused imports in some cases // @ts-ignore -import type { ManufactureDate } from "./manufacture-date"; +import type { ManufactureDate } from './manufacture-date'; // May contain unused imports in some cases // @ts-ignore -import type { ManufacturerName } from "./manufacturer-name"; +import type { ManufacturerName } from './manufacturer-name'; // May contain unused imports in some cases // @ts-ignore -import type { ReleaseDate } from "./release-date"; +import type { ReleaseDate } from './release-date'; /** - * + * * @export * @interface InstrumentDetail */ export interface InstrumentDetail { - /** - * - * @type {InstrumentId} - * @memberof InstrumentDetail - */ - instrument_id: InstrumentId; - /** - * - * @type {InstrumentName} - * @memberof InstrumentDetail - */ - instrument_name: InstrumentName; - /** - * - * @type {InstrumentType} - * @memberof InstrumentDetail - */ - instrument_type: InstrumentType; - /** - * - * @type {ManufacturerName} - * @memberof InstrumentDetail - */ - manufacturer_name: ManufacturerName; - /** - * - * @type {ManufactureDate} - * @memberof InstrumentDetail - */ - manufacturer_date: ManufactureDate; - /** - * - * @type {ReleaseDate} - * @memberof InstrumentDetail - */ - release_date: ReleaseDate; - /** - * - * @type {Country} - * @memberof InstrumentDetail - */ - country: Country; - /** - * - * @type {Array} - * @memberof InstrumentDetail - */ - basic_materials: Array; + /** + * + * @type {InstrumentId} + * @memberof InstrumentDetail + */ + 'instrument_id': InstrumentId; + /** + * + * @type {InstrumentName} + * @memberof InstrumentDetail + */ + 'instrument_name': InstrumentName; + /** + * + * @type {InstrumentType} + * @memberof InstrumentDetail + */ + 'instrument_type': InstrumentType; + /** + * + * @type {ManufacturerName} + * @memberof InstrumentDetail + */ + 'manufacturer_name': ManufacturerName; + /** + * + * @type {ManufactureDate} + * @memberof InstrumentDetail + */ + 'manufacturer_date': ManufactureDate; + /** + * + * @type {ReleaseDate} + * @memberof InstrumentDetail + */ + 'release_date': ReleaseDate; + /** + * + * @type {Country} + * @memberof InstrumentDetail + */ + 'country': Country; + /** + * + * @type {Array} + * @memberof InstrumentDetail + */ + 'basic_materials': Array; } + diff --git a/client/src/generated/model/instrument-id.ts b/client/src/generated/model/instrument-id.ts index 316ae6a4..7d959a92 100644 --- a/client/src/generated/model/instrument-id.ts +++ b/client/src/generated/model/instrument-id.ts @@ -12,16 +12,19 @@ * Do not edit the class manually. */ + + /** - * + * * @export * @interface InstrumentId */ export interface InstrumentId { - /** - * - * @type {number} - * @memberof InstrumentId - */ - instrument_id: number; + /** + * + * @type {number} + * @memberof InstrumentId + */ + 'instrument_id': number; } + diff --git a/client/src/generated/model/instrument-name.ts b/client/src/generated/model/instrument-name.ts index 3c2d867f..834c471d 100644 --- a/client/src/generated/model/instrument-name.ts +++ b/client/src/generated/model/instrument-name.ts @@ -12,16 +12,19 @@ * Do not edit the class manually. */ + + /** - * + * * @export * @interface InstrumentName */ export interface InstrumentName { - /** - * - * @type {string} - * @memberof InstrumentName - */ - instrument_name: string; + /** + * + * @type {string} + * @memberof InstrumentName + */ + 'instrument_name': string; } + diff --git a/client/src/generated/model/instrument-photo.ts b/client/src/generated/model/instrument-photo.ts index d90176c5..3319e164 100644 --- a/client/src/generated/model/instrument-photo.ts +++ b/client/src/generated/model/instrument-photo.ts @@ -12,16 +12,19 @@ * Do not edit the class manually. */ + + /** - * + * * @export * @interface InstrumentPhoto */ export interface InstrumentPhoto { - /** - * - * @type {string} - * @memberof InstrumentPhoto - */ - photo: string; + /** + * + * @type {string} + * @memberof InstrumentPhoto + */ + 'photo': string; } + diff --git a/client/src/generated/model/instrument-type.ts b/client/src/generated/model/instrument-type.ts index edbd5b2e..28f7f450 100644 --- a/client/src/generated/model/instrument-type.ts +++ b/client/src/generated/model/instrument-type.ts @@ -12,16 +12,19 @@ * Do not edit the class manually. */ + + /** - * + * * @export * @interface InstrumentType */ export interface InstrumentType { - /** - * - * @type {string} - * @memberof InstrumentType - */ - instrument_type: string; + /** + * + * @type {string} + * @memberof InstrumentType + */ + 'instrument_type': string; } + diff --git a/client/src/generated/model/jwt-response.ts b/client/src/generated/model/jwt-response.ts index 26a7bd55..b6736eb4 100644 --- a/client/src/generated/model/jwt-response.ts +++ b/client/src/generated/model/jwt-response.ts @@ -12,16 +12,19 @@ * Do not edit the class manually. */ + + /** - * + * * @export * @interface JwtResponse */ export interface JwtResponse { - /** - * - * @type {string} - * @memberof JwtResponse - */ - jwt: string; + /** + * + * @type {string} + * @memberof JwtResponse + */ + 'jwt': string; } + diff --git a/client/src/generated/model/manufacture-date.ts b/client/src/generated/model/manufacture-date.ts index 7cb47e3e..18e02201 100644 --- a/client/src/generated/model/manufacture-date.ts +++ b/client/src/generated/model/manufacture-date.ts @@ -12,16 +12,19 @@ * Do not edit the class manually. */ + + /** - * + * * @export * @interface ManufactureDate */ export interface ManufactureDate { - /** - * - * @type {string} - * @memberof ManufactureDate - */ - manufacture_date: string; + /** + * + * @type {string} + * @memberof ManufactureDate + */ + 'manufacture_date': string; } + diff --git a/client/src/generated/model/manufacturer-name.ts b/client/src/generated/model/manufacturer-name.ts index 3907cf53..1bdfe751 100644 --- a/client/src/generated/model/manufacturer-name.ts +++ b/client/src/generated/model/manufacturer-name.ts @@ -12,16 +12,19 @@ * Do not edit the class manually. */ + + /** - * + * * @export * @interface ManufacturerName */ export interface ManufacturerName { - /** - * - * @type {string} - * @memberof ManufacturerName - */ - manufacturer_name: string; + /** + * + * @type {string} + * @memberof ManufacturerName + */ + 'manufacturer_name': string; } + diff --git a/client/src/generated/model/manufacturer.ts b/client/src/generated/model/manufacturer.ts index b6e5b236..1b8ed8bc 100644 --- a/client/src/generated/model/manufacturer.ts +++ b/client/src/generated/model/manufacturer.ts @@ -12,16 +12,19 @@ * Do not edit the class manually. */ + + /** - * + * * @export * @interface Manufacturer */ export interface Manufacturer { - /** - * - * @type {string} - * @memberof Manufacturer - */ - manufacturer: string; + /** + * + * @type {string} + * @memberof Manufacturer + */ + 'manufacturer': string; } + diff --git a/client/src/generated/model/profile-details.ts b/client/src/generated/model/profile-details.ts index f2b06f9c..2b7ce67e 100644 --- a/client/src/generated/model/profile-details.ts +++ b/client/src/generated/model/profile-details.ts @@ -12,28 +12,31 @@ * Do not edit the class manually. */ + + /** - * + * * @export * @interface ProfileDetails */ export interface ProfileDetails { - /** - * - * @type {string} - * @memberof ProfileDetails - */ - username: string; - /** - * - * @type {string} - * @memberof ProfileDetails - */ - role: string; - /** - * - * @type {string} - * @memberof ProfileDetails - */ - full_name: string; + /** + * + * @type {string} + * @memberof ProfileDetails + */ + 'username': string; + /** + * + * @type {string} + * @memberof ProfileDetails + */ + 'role': string; + /** + * + * @type {string} + * @memberof ProfileDetails + */ + 'full_name': string; } + diff --git a/client/src/generated/model/registration-request.ts b/client/src/generated/model/registration-request.ts index c950674a..8b0b3a84 100644 --- a/client/src/generated/model/registration-request.ts +++ b/client/src/generated/model/registration-request.ts @@ -12,28 +12,31 @@ * Do not edit the class manually. */ + + /** - * + * * @export * @interface RegistrationRequest */ export interface RegistrationRequest { - /** - * - * @type {string} - * @memberof RegistrationRequest - */ - full_name: string; - /** - * - * @type {string} - * @memberof RegistrationRequest - */ - login: string; - /** - * - * @type {string} - * @memberof RegistrationRequest - */ - password: string; + /** + * + * @type {string} + * @memberof RegistrationRequest + */ + 'full_name': string; + /** + * + * @type {string} + * @memberof RegistrationRequest + */ + 'login': string; + /** + * + * @type {string} + * @memberof RegistrationRequest + */ + 'password': string; } + diff --git a/client/src/generated/model/release-date.ts b/client/src/generated/model/release-date.ts index 91560f8b..67015ab4 100644 --- a/client/src/generated/model/release-date.ts +++ b/client/src/generated/model/release-date.ts @@ -12,16 +12,19 @@ * Do not edit the class manually. */ + + /** - * + * * @export * @interface ReleaseDate */ export interface ReleaseDate { - /** - * - * @type {string} - * @memberof ReleaseDate - */ - release_date: string; + /** + * + * @type {string} + * @memberof ReleaseDate + */ + 'release_date': string; } + diff --git a/client/src/generated/model/server-error.ts b/client/src/generated/model/server-error.ts index bad8ada1..89e21d00 100644 --- a/client/src/generated/model/server-error.ts +++ b/client/src/generated/model/server-error.ts @@ -12,22 +12,25 @@ * Do not edit the class manually. */ + + /** - * + * * @export * @interface ServerError */ export interface ServerError { - /** - * A description of the error - * @type {string} - * @memberof ServerError - */ - message?: string; - /** - * Exception stack trace - * @type {string} - * @memberof ServerError - */ - cause?: string; + /** + * A description of the error + * @type {string} + * @memberof ServerError + */ + 'message'?: string; + /** + * Exception stack trace + * @type {string} + * @memberof ServerError + */ + 'cause'?: string; } + diff --git a/client/src/generated/model/username-and-password-request-body.ts b/client/src/generated/model/username-and-password-request-body.ts index 4e9cf8a7..4e627cb0 100644 --- a/client/src/generated/model/username-and-password-request-body.ts +++ b/client/src/generated/model/username-and-password-request-body.ts @@ -12,22 +12,25 @@ * Do not edit the class manually. */ + + /** - * + * * @export * @interface UsernameAndPasswordRequestBody */ export interface UsernameAndPasswordRequestBody { - /** - * - * @type {string} - * @memberof UsernameAndPasswordRequestBody - */ - username: string; - /** - * - * @type {string} - * @memberof UsernameAndPasswordRequestBody - */ - password: string; + /** + * + * @type {string} + * @memberof UsernameAndPasswordRequestBody + */ + 'username': string; + /** + * + * @type {string} + * @memberof UsernameAndPasswordRequestBody + */ + 'password': string; } + diff --git a/tools/docker/docker-compose.yml b/tools/docker/docker-compose.yml index f0574d7a..c9634511 100644 --- a/tools/docker/docker-compose.yml +++ b/tools/docker/docker-compose.yml @@ -13,7 +13,7 @@ services: POSTGRES_DB: ${POSTGRES_DB} POSTGRES_DSN: ${POSTGRES_DSN} volumes: - - ./store/pg/data:/var/lib/postgresql/data + - /var/lib/postgresql/data ports: - ${POSTGRES_PORT}:5432 networks: @@ -25,7 +25,7 @@ services: retries: 5 muse-server: - image: muse-server:${MUSE_SERVER_TAG-latest} + image: "${MUSE_SERVER_IMAGE:-muse-server}" container_name: muse-server ports: - ${SERVER_PORT}:8080 @@ -43,7 +43,7 @@ services: condition: service_healthy muse-client: - image: muse-client:${MUSE_CLIENT_TAG-latest} + image: "${MUSE_CLIENT_IMAGE:-muse-client}" container_name: muse-client ports: - ${CLIENT_PORT}:80 @@ -51,7 +51,7 @@ services: - muse muse-client-dev: - image: muse-client-dev:${MUSE_CLIENT_DEV_TAG-latest} + image: "${MUSE_CLIENT_DEV_IMAGE:-muse-client-dev}" container_name: muse-client-dev ports: - ${CLIENT_DEV_PORT}:3000 @@ -61,17 +61,17 @@ services: networks: - muse - portainer: - image: portainer/portainer-ce:linux-amd64-2.20.3-alpine - container_name: portainer - environment: - - TZ=Europe/Moscow - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - ./portainer_data:/data - ports: - - "8000:8000" - - "9443:9443" - restart: always - networks: - - muse +# portainer: +# image: portainer/portainer-ce:linux-amd64-2.20.3-alpine +# container_name: portainer +# environment: +# - TZ=Europe/Moscow +# volumes: +# - /var/run/docker.sock:/var/run/docker.sock +# - ./portainer_data:/data +# ports: +# - "8000:8000" +# - "9443:9443" +# restart: always +# networks: +# - muse diff --git a/tools/scripts/deploy.sh b/tools/scripts/deploy.sh index 789ba2f7..f88d003c 100755 --- a/tools/scripts/deploy.sh +++ b/tools/scripts/deploy.sh @@ -29,6 +29,7 @@ if [ -z "$SSH_PASS" ]; then exit 1 fi + dockerRepository=$1 if [ -z "$1" ] @@ -65,6 +66,8 @@ dockerTag="$stage-$gitCommitSha" (cd "$rootDir" && exec ./tools/scripts/pushImage.sh "$dockerRepository" "muse-client" "$dockerTag") sshpass -p "$SSH_PASS" ssh -p "$SSH_PORT" "$SSH_USER@$SSH_HOST" << EOF +set -e + export dockerRepository=$dockerRepository echo \$dockerRepository export stage=$stage @@ -74,16 +77,37 @@ echo \$dockerTag export DOCKER_HUB_TOKEN=$DOCKER_HUB_TOKEN echo \$DOCKER_HUB_TOKEN -docker login -u $dockerRepository -p $DOCKER_HUB_TOKEN +echo "one" + +#docker login -u $dockerRepository -p $DOCKER_HUB_TOKEN + +echo "two" cd /tmp -sudo rm -rf ./muse-project + +echo "three" +rm -rf /home/kiryuxa/github-deploy +mkdir -p /home/kiryuxa/github-deploy +echo "four" +cd /home/kiryuxa/github-deploy git clone https://github.com/bas-kirill/muse-project.git +echo "five" cd ./muse-project +echo "six" ./tools/scripts/clean.sh $stage -MUSE_SERVER_TAG="$dockerTag" MUSE_CLIENT_TAG="$dockerTag" MUSE_CLIENT_DEV_TAG="$dockerTag" docker compose \ +echo "seven" + +export MUSE_SERVER_IMAGE="$dockerRepository/muse-server:$dockerTag" +export MUSE_CLIENT_IMAGE="$dockerRepository/muse-client:$dockerTag" +export MUSE_CLIENT_DEV_IMAGE="$dockerRepository/muse-client-dev:$dockerTag" + +(cd ./tools/docker && docker compose config) + +echo "eight" + +docker compose \ -f ./tools/docker/docker-compose.yml \ --env-file ./tools/docker/env/$stage.env \ --project-name=muse-$stage \ @@ -91,7 +115,7 @@ MUSE_SERVER_TAG="$dockerTag" MUSE_CLIENT_TAG="$dockerTag" MUSE_CLIENT_DEV_TAG="$ --remove-orphans echo -e "\033[0;32mList of available ports:\n\033[0m" -echo ${PWD} cat ./tools/docker/env/$stage.env EOF + echo -e "\033[0;32mServices has been deployed to '$stage'.\033[0m" From 33db9539fdbd9a479f4d5f84a01d3541063f3730 Mon Sep 17 00:00:00 2001 From: skywalker Date: Mon, 26 Aug 2024 12:47:38 +0300 Subject: [PATCH 2/2] fix(dev): comment dev --- tools/docker/docker-compose.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/docker/docker-compose.yml b/tools/docker/docker-compose.yml index c9634511..94320438 100644 --- a/tools/docker/docker-compose.yml +++ b/tools/docker/docker-compose.yml @@ -50,16 +50,16 @@ services: networks: - muse - muse-client-dev: - image: "${MUSE_CLIENT_DEV_IMAGE:-muse-client-dev}" - container_name: muse-client-dev - ports: - - ${CLIENT_DEV_PORT}:3000 - volumes: - - ./../../client:/muse-client-dev - - ./node-modules:/muse-client-dev/node-modules - networks: - - muse +# muse-client-dev: +# image: "${MUSE_CLIENT_DEV_IMAGE:-muse-client-dev}" +# container_name: muse-client-dev +# ports: +# - ${CLIENT_DEV_PORT}:3000 +# volumes: +# - ./../../client:/muse-client-dev +# - ./node-modules:/muse-client-dev/node-modules +# networks: +# - muse # portainer: # image: portainer/portainer-ce:linux-amd64-2.20.3-alpine