diff --git a/app/openapi/openapi.json b/app/openapi/openapi.json index 4c7176c2..b45f6c9e 100644 --- a/app/openapi/openapi.json +++ b/app/openapi/openapi.json @@ -251,7 +251,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ImageInsertRequest" + "$ref" : "#/components/schemas/ImagePatchRequest" } } }, @@ -394,6 +394,26 @@ "schema" : { "type" : "string" } + }, { + "name" : "private", + "in" : "query", + "description" : "isPrivate", + "required" : false, + "deprecated" : false, + "explode" : false, + "schema" : { + "type" : "boolean" + } + }, { + "name" : "search", + "in" : "query", + "description" : "search content", + "required" : false, + "deprecated" : false, + "explode" : false, + "schema" : { + "type" : "string" + } } ], "responses" : { "200" : { @@ -2484,7 +2504,7 @@ }, "required" : [ "code", "isSuccessful", "message" ] }, - "ImageInsertRequest" : { + "ImagePatchRequest" : { "type" : "object", "properties" : { "albumId" : { diff --git a/app/src/main/kotlin/io/sakurasou/controller/request/ImageRequest.kt b/app/src/main/kotlin/io/sakurasou/controller/request/ImageRequest.kt index 1a3543c9..782e1d1c 100644 --- a/app/src/main/kotlin/io/sakurasou/controller/request/ImageRequest.kt +++ b/app/src/main/kotlin/io/sakurasou/controller/request/ImageRequest.kt @@ -37,7 +37,7 @@ data class ImageRawFile( } @Serializable -@Name("ImageInsertRequest") +@Name("ImagePatchRequest") data class ImagePatchRequest( val albumId: Long? = null, val displayName: String? = null, diff --git a/ui/packages/api-client/src/apis/image-api.ts b/ui/packages/api-client/src/apis/image-api.ts index 84d2c9a7..26db4db0 100644 --- a/ui/packages/api-client/src/apis/image-api.ts +++ b/ui/packages/api-client/src/apis/image-api.ts @@ -32,9 +32,9 @@ import type { CommonResponseKotlinUnit } from '../models'; // @ts-ignore import type { CommonResponsePageResultImagePageVO } from '../models'; // @ts-ignore -import type { ImageInsertRequest } from '../models'; -// @ts-ignore import type { ImageManagePatchRequest } from '../models'; +// @ts-ignore +import type { ImagePatchRequest } from '../models'; /** * ImageApi - axios parameter creator * @export @@ -155,15 +155,15 @@ export const ImageApiAxiosParamCreator = function (configuration?: Configuration /** * * @param {number} imageId image id - * @param {ImageInsertRequest} imageInsertRequest + * @param {ImagePatchRequest} imagePatchRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - apiImageImageIdPatch: async (imageId: number, imageInsertRequest: ImageInsertRequest, options: RawAxiosRequestConfig = {}): Promise => { + apiImageImageIdPatch: async (imageId: number, imagePatchRequest: ImagePatchRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'imageId' is not null or undefined assertParamExists('apiImageImageIdPatch', 'imageId', imageId) - // verify required parameter 'imageInsertRequest' is not null or undefined - assertParamExists('apiImageImageIdPatch', 'imageInsertRequest', imageInsertRequest) + // verify required parameter 'imagePatchRequest' is not null or undefined + assertParamExists('apiImageImageIdPatch', 'imagePatchRequest', imagePatchRequest) const localVarPath = `/api/image/{imageId}` .replace(`{${"imageId"}}`, encodeURIComponent(String(imageId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -188,7 +188,7 @@ export const ImageApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(imageInsertRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(imagePatchRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -486,10 +486,12 @@ export const ImageApiAxiosParamCreator = function (configuration?: Configuration * @param {number} pageSize pageSize * @param {string} [order] order * @param {string} [orderBy] orderBy + * @param {boolean} [_private] isPrivate + * @param {string} [search] search content * @param {*} [options] Override http request option. * @throws {RequiredError} */ - apiImagePageGet: async (page: number, pageSize: number, order?: string, orderBy?: string, options: RawAxiosRequestConfig = {}): Promise => { + apiImagePageGet: async (page: number, pageSize: number, order?: string, orderBy?: string, _private?: boolean, search?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'page' is not null or undefined assertParamExists('apiImagePageGet', 'page', page) // verify required parameter 'pageSize' is not null or undefined @@ -526,6 +528,14 @@ export const ImageApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['orderBy'] = orderBy; } + if (_private !== undefined) { + localVarQueryParameter['private'] = _private; + } + + if (search !== undefined) { + localVarQueryParameter['search'] = search; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -619,12 +629,12 @@ export const ImageApiFp = function(configuration?: Configuration) { /** * * @param {number} imageId image id - * @param {ImageInsertRequest} imageInsertRequest + * @param {ImagePatchRequest} imagePatchRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async apiImageImageIdPatch(imageId: number, imageInsertRequest: ImageInsertRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.apiImageImageIdPatch(imageId, imageInsertRequest, options); + async apiImageImageIdPatch(imageId: number, imagePatchRequest: ImagePatchRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.apiImageImageIdPatch(imageId, imagePatchRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ImageApi.apiImageImageIdPatch']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -723,11 +733,13 @@ export const ImageApiFp = function(configuration?: Configuration) { * @param {number} pageSize pageSize * @param {string} [order] order * @param {string} [orderBy] orderBy + * @param {boolean} [_private] isPrivate + * @param {string} [search] search content * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async apiImagePageGet(page: number, pageSize: number, order?: string, orderBy?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.apiImagePageGet(page, pageSize, order, orderBy, options); + async apiImagePageGet(page: number, pageSize: number, order?: string, orderBy?: string, _private?: boolean, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.apiImagePageGet(page, pageSize, order, orderBy, _private, search, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ImageApi.apiImagePageGet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -787,7 +799,7 @@ export const ImageApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ apiImageImageIdPatch(requestParameters: ImageApiApiImageImageIdPatchRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.apiImageImageIdPatch(requestParameters.imageId, requestParameters.imageInsertRequest, options).then((request) => request(axios, basePath)); + return localVarFp.apiImageImageIdPatch(requestParameters.imageId, requestParameters.imagePatchRequest, options).then((request) => request(axios, basePath)); }, /** * @@ -859,7 +871,7 @@ export const ImageApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ apiImagePageGet(requestParameters: ImageApiApiImagePageGetRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.apiImagePageGet(requestParameters.page, requestParameters.pageSize, requestParameters.order, requestParameters.orderBy, options).then((request) => request(axios, basePath)); + return localVarFp.apiImagePageGet(requestParameters.page, requestParameters.pageSize, requestParameters.order, requestParameters.orderBy, requestParameters._private, requestParameters.search, options).then((request) => request(axios, basePath)); }, /** * @@ -929,10 +941,10 @@ export interface ImageApiApiImageImageIdPatchRequest { /** * - * @type {ImageInsertRequest} + * @type {ImagePatchRequest} * @memberof ImageApiApiImageImageIdPatch */ - readonly imageInsertRequest: ImageInsertRequest + readonly imagePatchRequest: ImagePatchRequest } /** @@ -1094,6 +1106,20 @@ export interface ImageApiApiImagePageGetRequest { * @memberof ImageApiApiImagePageGet */ readonly orderBy?: string + + /** + * isPrivate + * @type {boolean} + * @memberof ImageApiApiImagePageGet + */ + readonly _private?: boolean + + /** + * search content + * @type {string} + * @memberof ImageApiApiImagePageGet + */ + readonly search?: string } /** @@ -1144,7 +1170,7 @@ export class ImageApi extends BaseAPI { * @memberof ImageApi */ public apiImageImageIdPatch(requestParameters: ImageApiApiImageImageIdPatchRequest, options?: RawAxiosRequestConfig) { - return ImageApiFp(this.configuration).apiImageImageIdPatch(requestParameters.imageId, requestParameters.imageInsertRequest, options).then((request) => request(this.axios, this.basePath)); + return ImageApiFp(this.configuration).apiImageImageIdPatch(requestParameters.imageId, requestParameters.imagePatchRequest, options).then((request) => request(this.axios, this.basePath)); } /** @@ -1232,7 +1258,7 @@ export class ImageApi extends BaseAPI { * @memberof ImageApi */ public apiImagePageGet(requestParameters: ImageApiApiImagePageGetRequest, options?: RawAxiosRequestConfig) { - return ImageApiFp(this.configuration).apiImagePageGet(requestParameters.page, requestParameters.pageSize, requestParameters.order, requestParameters.orderBy, options).then((request) => request(this.axios, this.basePath)); + return ImageApiFp(this.configuration).apiImagePageGet(requestParameters.page, requestParameters.pageSize, requestParameters.order, requestParameters.orderBy, requestParameters._private, requestParameters.search, options).then((request) => request(this.axios, this.basePath)); } /** diff --git a/ui/packages/api-client/src/models/image-insert-request.ts b/ui/packages/api-client/src/models/image-patch-request.ts similarity index 76% rename from ui/packages/api-client/src/models/image-insert-request.ts rename to ui/packages/api-client/src/models/image-patch-request.ts index bc27085c..a2507046 100644 --- a/ui/packages/api-client/src/models/image-insert-request.ts +++ b/ui/packages/api-client/src/models/image-patch-request.ts @@ -17,31 +17,31 @@ /** * * @export - * @interface ImageInsertRequest + * @interface ImagePatchRequest */ -export interface ImageInsertRequest { +export interface ImagePatchRequest { /** * * @type {number} - * @memberof ImageInsertRequest + * @memberof ImagePatchRequest */ 'albumId'?: number | null; /** * * @type {string} - * @memberof ImageInsertRequest + * @memberof ImagePatchRequest */ 'description'?: string | null; /** * * @type {string} - * @memberof ImageInsertRequest + * @memberof ImagePatchRequest */ 'displayName'?: string | null; /** * * @type {boolean} - * @memberof ImageInsertRequest + * @memberof ImagePatchRequest */ 'isPrivate'?: boolean | null; } diff --git a/ui/packages/api-client/src/models/index.ts b/ui/packages/api-client/src/models/index.ts index 9e670cd8..dcadcc96 100644 --- a/ui/packages/api-client/src/models/index.ts +++ b/ui/packages/api-client/src/models/index.ts @@ -31,10 +31,10 @@ export * from './group-page-vo'; export * from './group-patch-request'; export * from './group-strategy-config'; export * from './group-vo'; -export * from './image-insert-request'; export * from './image-manage-patch-request'; export * from './image-manage-vo'; export * from './image-page-vo'; +export * from './image-patch-request'; export * from './image-type-enum'; export * from './image-vo'; export * from './java-time-day-of-week';