mirror of
https://github.com/immich-app/immich.git
synced 2024-12-25 10:43:13 +02:00
chore(server): remove deprecated device endpoints (#1436)
* chore: remove endpoints * chore: generate open-api
This commit is contained in:
parent
c4e1bc35b4
commit
89aff7764d
BIN
mobile/openapi/README.md
generated
BIN
mobile/openapi/README.md
generated
Binary file not shown.
BIN
mobile/openapi/doc/DeviceInfoApi.md
generated
BIN
mobile/openapi/doc/DeviceInfoApi.md
generated
Binary file not shown.
BIN
mobile/openapi/lib/api/device_info_api.dart
generated
BIN
mobile/openapi/lib/api/device_info_api.dart
generated
Binary file not shown.
BIN
mobile/openapi/test/device_info_api_test.dart
generated
BIN
mobile/openapi/test/device_info_api_test.dart
generated
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
import { Body, Controller, Patch, Post, Put, ValidationPipe } from '@nestjs/common';
|
||||
import { Body, Controller, Put, ValidationPipe } from '@nestjs/common';
|
||||
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
|
||||
import { AuthUserDto, GetAuthUser } from '../../decorators/auth-user.decorator';
|
||||
import { Authenticated } from '../../decorators/authenticated.decorator';
|
||||
@ -13,24 +13,6 @@ import { DeviceInfoResponseDto, mapDeviceInfoResponse } from './response-dto/dev
|
||||
export class DeviceInfoController {
|
||||
constructor(private readonly deviceInfoService: DeviceInfoService) {}
|
||||
|
||||
/** @deprecated */
|
||||
@Post()
|
||||
public async createDeviceInfo(
|
||||
@GetAuthUser() user: AuthUserDto,
|
||||
@Body(ValidationPipe) dto: UpsertDeviceInfoDto,
|
||||
): Promise<DeviceInfoResponseDto> {
|
||||
return this.upsertDeviceInfo(user, dto);
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
@Patch()
|
||||
public async updateDeviceInfo(
|
||||
@GetAuthUser() user: AuthUserDto,
|
||||
@Body(ValidationPipe) dto: UpsertDeviceInfoDto,
|
||||
): Promise<DeviceInfoResponseDto> {
|
||||
return this.upsertDeviceInfo(user, dto);
|
||||
}
|
||||
|
||||
@Put()
|
||||
public async upsertDeviceInfo(
|
||||
@GetAuthUser() user: AuthUserDto,
|
||||
|
@ -2506,78 +2506,6 @@
|
||||
}
|
||||
},
|
||||
"/device-info": {
|
||||
"post": {
|
||||
"operationId": "createDeviceInfo",
|
||||
"description": "@deprecated",
|
||||
"deprecated": true,
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UpsertDeviceInfoDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/DeviceInfoResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"Device Info"
|
||||
],
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"patch": {
|
||||
"operationId": "updateDeviceInfo",
|
||||
"description": "@deprecated",
|
||||
"deprecated": true,
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UpsertDeviceInfoDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/DeviceInfoResponseDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"Device Info"
|
||||
],
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"put": {
|
||||
"operationId": "upsertDeviceInfo",
|
||||
"description": "",
|
||||
|
146
web/src/api/open-api/api.ts
generated
146
web/src/api/open-api/api.ts
generated
@ -5487,86 +5487,6 @@ export class AuthenticationApi extends BaseAPI {
|
||||
*/
|
||||
export const DeviceInfoApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
* @deprecated
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createDeviceInfo: async (upsertDeviceInfoDto: UpsertDeviceInfoDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'upsertDeviceInfoDto' is not null or undefined
|
||||
assertParamExists('createDeviceInfo', 'upsertDeviceInfoDto', upsertDeviceInfoDto)
|
||||
const localVarPath = `/device-info`;
|
||||
// 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;
|
||||
|
||||
// authentication bearer required
|
||||
// http bearer authentication required
|
||||
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
||||
|
||||
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(upsertDeviceInfoDto, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* @deprecated
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateDeviceInfo: async (upsertDeviceInfoDto: UpsertDeviceInfoDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'upsertDeviceInfoDto' is not null or undefined
|
||||
assertParamExists('updateDeviceInfo', 'upsertDeviceInfoDto', upsertDeviceInfoDto)
|
||||
const localVarPath = `/device-info`;
|
||||
// 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: 'PATCH', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication bearer required
|
||||
// http bearer authentication required
|
||||
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
||||
|
||||
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(upsertDeviceInfoDto, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
@ -5616,28 +5536,6 @@ export const DeviceInfoApiAxiosParamCreator = function (configuration?: Configur
|
||||
export const DeviceInfoApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = DeviceInfoApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
* @deprecated
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createDeviceInfo(upsertDeviceInfoDto: UpsertDeviceInfoDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeviceInfoResponseDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createDeviceInfo(upsertDeviceInfoDto, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
* @deprecated
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updateDeviceInfo(upsertDeviceInfoDto: UpsertDeviceInfoDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeviceInfoResponseDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateDeviceInfo(upsertDeviceInfoDto, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
@ -5658,26 +5556,6 @@ export const DeviceInfoApiFp = function(configuration?: Configuration) {
|
||||
export const DeviceInfoApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = DeviceInfoApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
* @deprecated
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createDeviceInfo(upsertDeviceInfoDto: UpsertDeviceInfoDto, options?: any): AxiosPromise<DeviceInfoResponseDto> {
|
||||
return localVarFp.createDeviceInfo(upsertDeviceInfoDto, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* @deprecated
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateDeviceInfo(upsertDeviceInfoDto: UpsertDeviceInfoDto, options?: any): AxiosPromise<DeviceInfoResponseDto> {
|
||||
return localVarFp.updateDeviceInfo(upsertDeviceInfoDto, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
@ -5697,30 +5575,6 @@ export const DeviceInfoApiFactory = function (configuration?: Configuration, bas
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class DeviceInfoApi extends BaseAPI {
|
||||
/**
|
||||
* @deprecated
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
* @memberof DeviceInfoApi
|
||||
*/
|
||||
public createDeviceInfo(upsertDeviceInfoDto: UpsertDeviceInfoDto, options?: AxiosRequestConfig) {
|
||||
return DeviceInfoApiFp(this.configuration).createDeviceInfo(upsertDeviceInfoDto, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
* @memberof DeviceInfoApi
|
||||
*/
|
||||
public updateDeviceInfo(upsertDeviceInfoDto: UpsertDeviceInfoDto, options?: AxiosRequestConfig) {
|
||||
return DeviceInfoApiFp(this.configuration).updateDeviceInfo(upsertDeviceInfoDto, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
|
Loading…
Reference in New Issue
Block a user