From 107ffc3f7b745a8d09b3dd577cc986a69b647216 Mon Sep 17 00:00:00 2001 From: Roy Jeong Date: Wed, 11 Dec 2024 21:57:24 -0800 Subject: [PATCH] Delete unused dcsvprojection/scsvprojection api client libraries --- frontend/src/services/vdyp-api/api.ts | 2 - .../vdyp-api/apis/run-dcsvprojection-api.ts | 148 ----------- .../vdyp-api/apis/run-scsvprojection-api.ts | 237 ------------------ .../services/vdyp-api/models/root-resource.ts | 1 - 4 files changed, 388 deletions(-) delete mode 100644 frontend/src/services/vdyp-api/apis/run-dcsvprojection-api.ts delete mode 100644 frontend/src/services/vdyp-api/apis/run-scsvprojection-api.ts diff --git a/frontend/src/services/vdyp-api/api.ts b/frontend/src/services/vdyp-api/api.ts index 9996851f..3f974b97 100644 --- a/frontend/src/services/vdyp-api/api.ts +++ b/frontend/src/services/vdyp-api/api.ts @@ -1,5 +1,3 @@ export * from './apis/get-help-api' export * from './apis/get-root-api' -export * from './apis/run-dcsvprojection-api' export * from './apis/run-hcsvprojection-api' -export * from './apis/run-scsvprojection-api' diff --git a/frontend/src/services/vdyp-api/apis/run-dcsvprojection-api.ts b/frontend/src/services/vdyp-api/apis/run-dcsvprojection-api.ts deleted file mode 100644 index 51d8d3c0..00000000 --- a/frontend/src/services/vdyp-api/apis/run-dcsvprojection-api.ts +++ /dev/null @@ -1,148 +0,0 @@ -import globalAxios from 'axios' -import type { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios' -import { Configuration } from '../configuration' -import { BASE_PATH, BaseAPI } from '../base' -import type { RequestArgs } from '../base' -import type { FileUpload, Parameters } from '../models' -import { env } from '@/env' - -export const RunDCSVProjectionApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - projectionDcsvPostForm: async ( - dcsvInputData?: FileUpload, - projectionParameters?: Parameters, - trialRun?: boolean, - options: AxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/v8/projection/dcsv` - const localVarUrlObj = new URL(localVarPath, env.VITE_API_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - const localVarRequestOptions: AxiosRequestConfig = { - method: 'POST', - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - const localVarFormParams = new FormData() - - if (trialRun !== undefined) { - localVarQueryParameter['trialRun'] = trialRun - } - - if (dcsvInputData !== undefined) { - localVarFormParams.append('dcsvInputData', dcsvInputData as any) - } - - if (projectionParameters !== undefined) { - localVarFormParams.append( - 'projectionParameters', - projectionParameters as any, - ) - } - - localVarHeaderParameter['Content-Type'] = 'multipart/form-data' - const query = new URLSearchParams(localVarUrlObj.search) - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]) - } - for (const key in options.params) { - query.set(key, options.params[key]) - } - localVarUrlObj.search = new URLSearchParams(query).toString() - const headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - localVarRequestOptions.data = localVarFormParams - - return { - url: - localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - } - }, - } -} - -export const RunDCSVProjectionApiFp = function (configuration?: Configuration) { - return { - async projectionDcsvPostForm( - dcsvInputData?: FileUpload, - projectionParameters?: Parameters, - trialRun?: boolean, - options?: AxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => Promise> - > { - const localVarAxiosArgs = await RunDCSVProjectionApiAxiosParamCreator( - configuration, - ).projectionDcsvPostForm( - dcsvInputData, - projectionParameters, - trialRun, - options, - ) - return ( - axios: AxiosInstance = globalAxios, - basePath: string = BASE_PATH, - ) => { - const axiosRequestArgs: AxiosRequestConfig = { - ...localVarAxiosArgs.options, - url: basePath + localVarAxiosArgs.url, - } - return axios.request(axiosRequestArgs) - } - }, - } -} - -export const RunDCSVProjectionApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - return { - async projectionDcsvPostForm( - dcsvInputData?: FileUpload, - projectionParameters?: Parameters, - trialRun?: boolean, - options?: AxiosRequestConfig, - ): Promise> { - return RunDCSVProjectionApiFp(configuration) - .projectionDcsvPostForm( - dcsvInputData, - projectionParameters, - trialRun, - options, - ) - .then((request) => request(axios, basePath)) - }, - } -} - -export class RunDCSVProjectionApi extends BaseAPI { - public async projectionDcsvPostForm( - dcsvInputData?: FileUpload, - projectionParameters?: Parameters, - trialRun?: boolean, - options?: AxiosRequestConfig, - ): Promise> { - return RunDCSVProjectionApiFp(this.configuration) - .projectionDcsvPostForm( - dcsvInputData, - projectionParameters, - trialRun, - options, - ) - .then((request) => request(this.axios, this.basePath)) - } -} diff --git a/frontend/src/services/vdyp-api/apis/run-scsvprojection-api.ts b/frontend/src/services/vdyp-api/apis/run-scsvprojection-api.ts deleted file mode 100644 index e9618153..00000000 --- a/frontend/src/services/vdyp-api/apis/run-scsvprojection-api.ts +++ /dev/null @@ -1,237 +0,0 @@ -import globalAxios from 'axios' -import type { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios' -import { Configuration } from '../configuration' -import { BASE_PATH, BaseAPI } from '../base' -import type { RequestArgs } from '../base' -import type { FileUpload, Parameters } from '../models' -import { env } from '@/env' - -export const RunSCSVProjectionApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - projectionScsvPostForm: async ( - polygonInputData?: FileUpload, - layersInputData?: FileUpload, - historyInputData?: FileUpload, - nonVegetationInputData?: FileUpload, - otherVegetationInputData?: FileUpload, - polygonIdInputData?: FileUpload, - speciesInputData?: FileUpload, - vriAdjustInputData?: FileUpload, - projectionParameters?: Parameters, - trialRun?: boolean, - options: AxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/api/v8/projection/scsv` - const localVarUrlObj = new URL(localVarPath, env.VITE_API_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - const localVarRequestOptions: AxiosRequestConfig = { - method: 'POST', - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - const localVarFormParams = new FormData() - - if (trialRun !== undefined) { - localVarQueryParameter['trialRun'] = trialRun - } - - if (polygonInputData !== undefined) { - localVarFormParams.append('polygonInputData', polygonInputData as any) - } - - if (layersInputData !== undefined) { - localVarFormParams.append('layersInputData', layersInputData as any) - } - - if (historyInputData !== undefined) { - localVarFormParams.append('historyInputData', historyInputData as any) - } - - if (nonVegetationInputData !== undefined) { - localVarFormParams.append( - 'nonVegetationInputData', - nonVegetationInputData as any, - ) - } - - if (otherVegetationInputData !== undefined) { - localVarFormParams.append( - 'otherVegetationInputData', - otherVegetationInputData as any, - ) - } - - if (polygonIdInputData !== undefined) { - localVarFormParams.append( - 'polygonIdInputData', - polygonIdInputData as any, - ) - } - - if (speciesInputData !== undefined) { - localVarFormParams.append('speciesInputData', speciesInputData as any) - } - - if (vriAdjustInputData !== undefined) { - localVarFormParams.append( - 'vriAdjustInputData', - vriAdjustInputData as any, - ) - } - - if (projectionParameters !== undefined) { - localVarFormParams.append( - 'projectionParameters', - projectionParameters as any, - ) - } - - localVarHeaderParameter['Content-Type'] = 'multipart/form-data' - const query = new URLSearchParams(localVarUrlObj.search) - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]) - } - for (const key in options.params) { - query.set(key, options.params[key]) - } - localVarUrlObj.search = new URLSearchParams(query).toString() - const headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - localVarRequestOptions.data = localVarFormParams - - return { - url: - localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - } - }, - } -} - -export const RunSCSVProjectionApiFp = function (configuration?: Configuration) { - return { - async projectionScsvPostForm( - polygonInputData?: FileUpload, - layersInputData?: FileUpload, - historyInputData?: FileUpload, - nonVegetationInputData?: FileUpload, - otherVegetationInputData?: FileUpload, - polygonIdInputData?: FileUpload, - speciesInputData?: FileUpload, - vriAdjustInputData?: FileUpload, - projectionParameters?: Parameters, - trialRun?: boolean, - options?: AxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => Promise> - > { - const localVarAxiosArgs = await RunSCSVProjectionApiAxiosParamCreator( - configuration, - ).projectionScsvPostForm( - polygonInputData, - layersInputData, - historyInputData, - nonVegetationInputData, - otherVegetationInputData, - polygonIdInputData, - speciesInputData, - vriAdjustInputData, - projectionParameters, - trialRun, - options, - ) - return ( - axios: AxiosInstance = globalAxios, - basePath: string = BASE_PATH, - ) => { - const axiosRequestArgs: AxiosRequestConfig = { - ...localVarAxiosArgs.options, - url: basePath + localVarAxiosArgs.url, - } - return axios.request(axiosRequestArgs) - } - }, - } -} - -export const RunSCSVProjectionApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - return { - async projectionScsvPostForm( - polygonInputData?: FileUpload, - layersInputData?: FileUpload, - historyInputData?: FileUpload, - nonVegetationInputData?: FileUpload, - otherVegetationInputData?: FileUpload, - polygonIdInputData?: FileUpload, - speciesInputData?: FileUpload, - vriAdjustInputData?: FileUpload, - projectionParameters?: Parameters, - trialRun?: boolean, - options?: AxiosRequestConfig, - ): Promise> { - return RunSCSVProjectionApiFp(configuration) - .projectionScsvPostForm( - polygonInputData, - layersInputData, - historyInputData, - nonVegetationInputData, - otherVegetationInputData, - polygonIdInputData, - speciesInputData, - vriAdjustInputData, - projectionParameters, - trialRun, - options, - ) - .then((request) => request(axios, basePath)) - }, - } -} - -export class RunSCSVProjectionApi extends BaseAPI { - public async projectionScsvPostForm( - polygonInputData?: FileUpload, - layersInputData?: FileUpload, - historyInputData?: FileUpload, - nonVegetationInputData?: FileUpload, - otherVegetationInputData?: FileUpload, - polygonIdInputData?: FileUpload, - speciesInputData?: FileUpload, - vriAdjustInputData?: FileUpload, - projectionParameters?: Parameters, - trialRun?: boolean, - options?: AxiosRequestConfig, - ): Promise> { - return RunSCSVProjectionApiFp(this.configuration) - .projectionScsvPostForm( - polygonInputData, - layersInputData, - historyInputData, - nonVegetationInputData, - otherVegetationInputData, - polygonIdInputData, - speciesInputData, - vriAdjustInputData, - projectionParameters, - trialRun, - options, - ) - .then((request) => request(this.axios, this.basePath)) - } -} diff --git a/frontend/src/services/vdyp-api/models/root-resource.ts b/frontend/src/services/vdyp-api/models/root-resource.ts index 28185298..170a461d 100644 --- a/frontend/src/services/vdyp-api/models/root-resource.ts +++ b/frontend/src/services/vdyp-api/models/root-resource.ts @@ -1,5 +1,4 @@ import type { Link } from './link' - export interface RootResource { links: Link[] }