mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore(server,mobile): remove device info entity (#1527)
* chore(server): remove unused device info code * chore: generate open api * remove any DeviceTypeEnum usage from mobile * chore: coverage * fix: drop device info table --------- Co-authored-by: Fynn Petersen-Frey <zody22@gmail.com>
This commit is contained in:
parent
1e97407025
commit
e22cdea485
46 changed files with 34 additions and 1315 deletions
196
web/src/api/open-api/api.ts
generated
196
web/src/api/open-api/api.ts
generated
|
|
@ -1021,66 +1021,6 @@ export const DeleteAssetStatus = {
|
|||
export type DeleteAssetStatus = typeof DeleteAssetStatus[keyof typeof DeleteAssetStatus];
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DeviceInfoResponseDto
|
||||
*/
|
||||
export interface DeviceInfoResponseDto {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DeviceInfoResponseDto
|
||||
*/
|
||||
'id': number;
|
||||
/**
|
||||
*
|
||||
* @type {DeviceTypeEnum}
|
||||
* @memberof DeviceInfoResponseDto
|
||||
*/
|
||||
'deviceType': DeviceTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DeviceInfoResponseDto
|
||||
*/
|
||||
'userId': string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DeviceInfoResponseDto
|
||||
*/
|
||||
'deviceId': string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DeviceInfoResponseDto
|
||||
*/
|
||||
'createdAt': string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof DeviceInfoResponseDto
|
||||
*/
|
||||
'isAutoBackup': boolean;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
|
||||
export const DeviceTypeEnum = {
|
||||
Ios: 'IOS',
|
||||
Android: 'ANDROID',
|
||||
Web: 'WEB'
|
||||
} as const;
|
||||
|
||||
export type DeviceTypeEnum = typeof DeviceTypeEnum[keyof typeof DeviceTypeEnum];
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
|
|
@ -2465,33 +2405,6 @@ export interface UpdateUserDto {
|
|||
*/
|
||||
'shouldChangePassword'?: boolean;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface UpsertDeviceInfoDto
|
||||
*/
|
||||
export interface UpsertDeviceInfoDto {
|
||||
/**
|
||||
*
|
||||
* @type {DeviceTypeEnum}
|
||||
* @memberof UpsertDeviceInfoDto
|
||||
*/
|
||||
'deviceType': DeviceTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpsertDeviceInfoDto
|
||||
*/
|
||||
'deviceId': string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof UpsertDeviceInfoDto
|
||||
*/
|
||||
'isAutoBackup'?: boolean;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
|
|
@ -6406,115 +6319,6 @@ export class AuthenticationApi extends BaseAPI {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* DeviceInfoApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const DeviceInfoApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
upsertDeviceInfo: async (upsertDeviceInfoDto: UpsertDeviceInfoDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'upsertDeviceInfoDto' is not null or undefined
|
||||
assertParamExists('upsertDeviceInfo', '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: 'PUT', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication cookie required
|
||||
|
||||
// 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,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* DeviceInfoApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const DeviceInfoApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = DeviceInfoApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async upsertDeviceInfo(upsertDeviceInfoDto: UpsertDeviceInfoDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeviceInfoResponseDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.upsertDeviceInfo(upsertDeviceInfoDto, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* DeviceInfoApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const DeviceInfoApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = DeviceInfoApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
upsertDeviceInfo(upsertDeviceInfoDto: UpsertDeviceInfoDto, options?: any): AxiosPromise<DeviceInfoResponseDto> {
|
||||
return localVarFp.upsertDeviceInfo(upsertDeviceInfoDto, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* DeviceInfoApi - object-oriented interface
|
||||
* @export
|
||||
* @class DeviceInfoApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class DeviceInfoApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DeviceInfoApi
|
||||
*/
|
||||
public upsertDeviceInfo(upsertDeviceInfoDto: UpsertDeviceInfoDto, options?: AxiosRequestConfig) {
|
||||
return DeviceInfoApiFp(this.configuration).upsertDeviceInfo(upsertDeviceInfoDto, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* JobApi - axios parameter creator
|
||||
* @export
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue