mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +00:00
refactor(server): device info service (#1071)
* refactor(server): device info service * use upsertDeviceInfo in mobile app * fix: return types and dedupe code Co-authored-by: Fynn Petersen-Frey <zoodyy@users.noreply.github.com>
This commit is contained in:
parent
b8e26a2112
commit
cefdd86b7f
23 changed files with 285 additions and 197 deletions
|
|
@ -376,8 +376,8 @@ class BackupService {
|
||||||
DeviceTypeEnum deviceType,
|
DeviceTypeEnum deviceType,
|
||||||
) async {
|
) async {
|
||||||
try {
|
try {
|
||||||
var updatedDeviceInfo = await _apiService.deviceInfoApi.updateDeviceInfo(
|
var updatedDeviceInfo = await _apiService.deviceInfoApi.upsertDeviceInfo(
|
||||||
UpdateDeviceInfoDto(
|
UpsertDeviceInfoDto(
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
deviceType: deviceType,
|
deviceType: deviceType,
|
||||||
isAutoBackup: status,
|
isAutoBackup: status,
|
||||||
|
|
|
||||||
|
|
@ -210,8 +210,8 @@ class AuthenticationNotifier extends StateNotifier<AuthenticationState> {
|
||||||
// Register device info
|
// Register device info
|
||||||
try {
|
try {
|
||||||
DeviceInfoResponseDto? deviceInfo =
|
DeviceInfoResponseDto? deviceInfo =
|
||||||
await _apiService.deviceInfoApi.createDeviceInfo(
|
await _apiService.deviceInfoApi.upsertDeviceInfo(
|
||||||
CreateDeviceInfoDto(
|
UpsertDeviceInfoDto(
|
||||||
deviceId: state.deviceId,
|
deviceId: state.deviceId,
|
||||||
deviceType: state.deviceType,
|
deviceType: state.deviceType,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
9
mobile/openapi/.openapi-generator/FILES
generated
9
mobile/openapi/.openapi-generator/FILES
generated
|
|
@ -24,7 +24,6 @@ doc/CheckDuplicateAssetResponseDto.md
|
||||||
doc/CheckExistingAssetsDto.md
|
doc/CheckExistingAssetsDto.md
|
||||||
doc/CheckExistingAssetsResponseDto.md
|
doc/CheckExistingAssetsResponseDto.md
|
||||||
doc/CreateAlbumDto.md
|
doc/CreateAlbumDto.md
|
||||||
doc/CreateDeviceInfoDto.md
|
|
||||||
doc/CreateProfileImageResponseDto.md
|
doc/CreateProfileImageResponseDto.md
|
||||||
doc/CreateTagDto.md
|
doc/CreateTagDto.md
|
||||||
doc/CreateUserDto.md
|
doc/CreateUserDto.md
|
||||||
|
|
@ -72,9 +71,9 @@ doc/ThumbnailFormat.md
|
||||||
doc/TimeGroupEnum.md
|
doc/TimeGroupEnum.md
|
||||||
doc/UpdateAlbumDto.md
|
doc/UpdateAlbumDto.md
|
||||||
doc/UpdateAssetDto.md
|
doc/UpdateAssetDto.md
|
||||||
doc/UpdateDeviceInfoDto.md
|
|
||||||
doc/UpdateTagDto.md
|
doc/UpdateTagDto.md
|
||||||
doc/UpdateUserDto.md
|
doc/UpdateUserDto.md
|
||||||
|
doc/UpsertDeviceInfoDto.md
|
||||||
doc/UsageByUserDto.md
|
doc/UsageByUserDto.md
|
||||||
doc/UserApi.md
|
doc/UserApi.md
|
||||||
doc/UserCountResponseDto.md
|
doc/UserCountResponseDto.md
|
||||||
|
|
@ -118,7 +117,6 @@ lib/model/check_duplicate_asset_response_dto.dart
|
||||||
lib/model/check_existing_assets_dto.dart
|
lib/model/check_existing_assets_dto.dart
|
||||||
lib/model/check_existing_assets_response_dto.dart
|
lib/model/check_existing_assets_response_dto.dart
|
||||||
lib/model/create_album_dto.dart
|
lib/model/create_album_dto.dart
|
||||||
lib/model/create_device_info_dto.dart
|
|
||||||
lib/model/create_profile_image_response_dto.dart
|
lib/model/create_profile_image_response_dto.dart
|
||||||
lib/model/create_tag_dto.dart
|
lib/model/create_tag_dto.dart
|
||||||
lib/model/create_user_dto.dart
|
lib/model/create_user_dto.dart
|
||||||
|
|
@ -160,9 +158,9 @@ lib/model/thumbnail_format.dart
|
||||||
lib/model/time_group_enum.dart
|
lib/model/time_group_enum.dart
|
||||||
lib/model/update_album_dto.dart
|
lib/model/update_album_dto.dart
|
||||||
lib/model/update_asset_dto.dart
|
lib/model/update_asset_dto.dart
|
||||||
lib/model/update_device_info_dto.dart
|
|
||||||
lib/model/update_tag_dto.dart
|
lib/model/update_tag_dto.dart
|
||||||
lib/model/update_user_dto.dart
|
lib/model/update_user_dto.dart
|
||||||
|
lib/model/upsert_device_info_dto.dart
|
||||||
lib/model/usage_by_user_dto.dart
|
lib/model/usage_by_user_dto.dart
|
||||||
lib/model/user_count_response_dto.dart
|
lib/model/user_count_response_dto.dart
|
||||||
lib/model/user_response_dto.dart
|
lib/model/user_response_dto.dart
|
||||||
|
|
@ -189,7 +187,6 @@ test/check_duplicate_asset_response_dto_test.dart
|
||||||
test/check_existing_assets_dto_test.dart
|
test/check_existing_assets_dto_test.dart
|
||||||
test/check_existing_assets_response_dto_test.dart
|
test/check_existing_assets_response_dto_test.dart
|
||||||
test/create_album_dto_test.dart
|
test/create_album_dto_test.dart
|
||||||
test/create_device_info_dto_test.dart
|
|
||||||
test/create_profile_image_response_dto_test.dart
|
test/create_profile_image_response_dto_test.dart
|
||||||
test/create_tag_dto_test.dart
|
test/create_tag_dto_test.dart
|
||||||
test/create_user_dto_test.dart
|
test/create_user_dto_test.dart
|
||||||
|
|
@ -237,9 +234,9 @@ test/thumbnail_format_test.dart
|
||||||
test/time_group_enum_test.dart
|
test/time_group_enum_test.dart
|
||||||
test/update_album_dto_test.dart
|
test/update_album_dto_test.dart
|
||||||
test/update_asset_dto_test.dart
|
test/update_asset_dto_test.dart
|
||||||
test/update_device_info_dto_test.dart
|
|
||||||
test/update_tag_dto_test.dart
|
test/update_tag_dto_test.dart
|
||||||
test/update_user_dto_test.dart
|
test/update_user_dto_test.dart
|
||||||
|
test/upsert_device_info_dto_test.dart
|
||||||
test/usage_by_user_dto_test.dart
|
test/usage_by_user_dto_test.dart
|
||||||
test/user_api_test.dart
|
test/user_api_test.dart
|
||||||
test/user_count_response_dto_test.dart
|
test/user_count_response_dto_test.dart
|
||||||
|
|
|
||||||
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/doc/UpdateDeviceInfoDto.md
generated
BIN
mobile/openapi/doc/UpdateDeviceInfoDto.md
generated
Binary file not shown.
Binary file not shown.
BIN
mobile/openapi/lib/api.dart
generated
BIN
mobile/openapi/lib/api.dart
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/lib/api_client.dart
generated
BIN
mobile/openapi/lib/api_client.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/create_device_info_dto.dart
generated
BIN
mobile/openapi/lib/model/create_device_info_dto.dart
generated
Binary file not shown.
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.
BIN
mobile/openapi/test/update_device_info_dto_test.dart
generated
BIN
mobile/openapi/test/update_device_info_dto_test.dart
generated
Binary file not shown.
Binary file not shown.
|
|
@ -1,11 +1,10 @@
|
||||||
import { Controller, Post, Body, Patch, ValidationPipe } from '@nestjs/common';
|
import { Body, Controller, Patch, Post, Put, ValidationPipe } from '@nestjs/common';
|
||||||
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
|
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
|
||||||
import { AuthUserDto, GetAuthUser } from '../../decorators/auth-user.decorator';
|
import { AuthUserDto, GetAuthUser } from '../../decorators/auth-user.decorator';
|
||||||
import { Authenticated } from '../../decorators/authenticated.decorator';
|
import { Authenticated } from '../../decorators/authenticated.decorator';
|
||||||
import { DeviceInfoService } from './device-info.service';
|
import { DeviceInfoService } from './device-info.service';
|
||||||
import { CreateDeviceInfoDto } from './dto/create-device-info.dto';
|
import { UpsertDeviceInfoDto } from './dto/upsert-device-info.dto';
|
||||||
import { UpdateDeviceInfoDto } from './dto/update-device-info.dto';
|
import { DeviceInfoResponseDto, mapDeviceInfoResponse } from './response-dto/device-info-response.dto';
|
||||||
import { DeviceInfoResponseDto } from './response-dto/create-device-info-response.dto';
|
|
||||||
|
|
||||||
@Authenticated()
|
@Authenticated()
|
||||||
@ApiBearerAuth()
|
@ApiBearerAuth()
|
||||||
|
|
@ -14,19 +13,30 @@ import { DeviceInfoResponseDto } from './response-dto/create-device-info-respons
|
||||||
export class DeviceInfoController {
|
export class DeviceInfoController {
|
||||||
constructor(private readonly deviceInfoService: DeviceInfoService) {}
|
constructor(private readonly deviceInfoService: DeviceInfoService) {}
|
||||||
|
|
||||||
|
/** @deprecated */
|
||||||
@Post()
|
@Post()
|
||||||
async createDeviceInfo(
|
public async createDeviceInfo(
|
||||||
@Body(ValidationPipe) createDeviceInfoDto: CreateDeviceInfoDto,
|
@GetAuthUser() user: AuthUserDto,
|
||||||
@GetAuthUser() authUser: AuthUserDto,
|
@Body(ValidationPipe) dto: UpsertDeviceInfoDto,
|
||||||
): Promise<DeviceInfoResponseDto> {
|
): Promise<DeviceInfoResponseDto> {
|
||||||
return this.deviceInfoService.create(createDeviceInfoDto, authUser);
|
return this.upsertDeviceInfo(user, dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @deprecated */
|
||||||
@Patch()
|
@Patch()
|
||||||
async updateDeviceInfo(
|
public async updateDeviceInfo(
|
||||||
@Body(ValidationPipe) updateDeviceInfoDto: UpdateDeviceInfoDto,
|
@GetAuthUser() user: AuthUserDto,
|
||||||
@GetAuthUser() authUser: AuthUserDto,
|
@Body(ValidationPipe) dto: UpsertDeviceInfoDto,
|
||||||
): Promise<DeviceInfoResponseDto> {
|
): Promise<DeviceInfoResponseDto> {
|
||||||
return this.deviceInfoService.update(authUser.id, updateDeviceInfoDto);
|
return this.upsertDeviceInfo(user, dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Put()
|
||||||
|
public async upsertDeviceInfo(
|
||||||
|
@GetAuthUser() user: AuthUserDto,
|
||||||
|
@Body(ValidationPipe) dto: UpsertDeviceInfoDto,
|
||||||
|
): Promise<DeviceInfoResponseDto> {
|
||||||
|
const deviceInfo = await this.deviceInfoService.upsert({ ...dto, userId: user.id });
|
||||||
|
return mapDeviceInfoResponse(deviceInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
import { DeviceInfoEntity, DeviceType } from '@app/database/entities/device-info.entity';
|
||||||
|
import { Repository } from 'typeorm';
|
||||||
|
import { DeviceInfoService } from './device-info.service';
|
||||||
|
|
||||||
|
const deviceId = 'device-123';
|
||||||
|
const userId = 'user-123';
|
||||||
|
|
||||||
|
describe('DeviceInfoService', () => {
|
||||||
|
let sut: DeviceInfoService;
|
||||||
|
let repositoryMock: jest.Mocked<Repository<DeviceInfoEntity>>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
repositoryMock = {
|
||||||
|
findOne: jest.fn(),
|
||||||
|
save: jest.fn(),
|
||||||
|
} as unknown as jest.Mocked<Repository<DeviceInfoEntity>>;
|
||||||
|
|
||||||
|
sut = new DeviceInfoService(repositoryMock);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be defined', () => {
|
||||||
|
expect(sut).toBeDefined();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('upsert', () => {
|
||||||
|
it('should create a new record', async () => {
|
||||||
|
const request = { deviceId, userId, deviceType: DeviceType.IOS } as DeviceInfoEntity;
|
||||||
|
const response = { ...request, id: 1 } as DeviceInfoEntity;
|
||||||
|
|
||||||
|
repositoryMock.findOne.mockResolvedValue(null);
|
||||||
|
repositoryMock.save.mockResolvedValue(response);
|
||||||
|
|
||||||
|
await expect(sut.upsert(request)).resolves.toEqual(response);
|
||||||
|
|
||||||
|
expect(repositoryMock.findOne).toHaveBeenCalledTimes(1);
|
||||||
|
expect(repositoryMock.save).toHaveBeenCalledTimes(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should update an existing record', async () => {
|
||||||
|
const request = { deviceId, userId, deviceType: DeviceType.IOS, isAutoBackup: true } as DeviceInfoEntity;
|
||||||
|
const response = { ...request, id: 1 } as DeviceInfoEntity;
|
||||||
|
|
||||||
|
repositoryMock.findOne.mockResolvedValue(response);
|
||||||
|
repositoryMock.save.mockResolvedValue(response);
|
||||||
|
|
||||||
|
await expect(sut.upsert(request)).resolves.toEqual(response);
|
||||||
|
|
||||||
|
expect(repositoryMock.findOne).toHaveBeenCalledTimes(1);
|
||||||
|
expect(repositoryMock.save).toHaveBeenCalledTimes(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should keep properties that were not updated', async () => {
|
||||||
|
const request = { deviceId, userId } as DeviceInfoEntity;
|
||||||
|
const response = { id: 1, isAutoBackup: true, deviceId, userId, deviceType: DeviceType.WEB } as DeviceInfoEntity;
|
||||||
|
|
||||||
|
repositoryMock.findOne.mockResolvedValue(response);
|
||||||
|
repositoryMock.save.mockResolvedValue(response);
|
||||||
|
|
||||||
|
await expect(sut.upsert(request)).resolves.toEqual(response);
|
||||||
|
|
||||||
|
expect(repositoryMock.findOne).toHaveBeenCalledTimes(1);
|
||||||
|
expect(repositoryMock.save).toHaveBeenCalledTimes(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
@ -1,70 +1,29 @@
|
||||||
import { BadRequestException, Injectable, Logger, NotFoundException } from '@nestjs/common';
|
import { DeviceInfoEntity } from '@app/database/entities/device-info.entity';
|
||||||
|
import { Injectable } from '@nestjs/common';
|
||||||
import { InjectRepository } from '@nestjs/typeorm';
|
import { InjectRepository } from '@nestjs/typeorm';
|
||||||
import { Repository } from 'typeorm';
|
import { Repository } from 'typeorm';
|
||||||
import { AuthUserDto } from '../../decorators/auth-user.decorator';
|
|
||||||
import { CreateDeviceInfoDto } from './dto/create-device-info.dto';
|
type EntityKeys = Pick<DeviceInfoEntity, 'deviceId' | 'userId'>;
|
||||||
import { UpdateDeviceInfoDto } from './dto/update-device-info.dto';
|
type Entity = EntityKeys & Partial<DeviceInfoEntity>;
|
||||||
import { DeviceInfoEntity } from '@app/database/entities/device-info.entity';
|
|
||||||
import { DeviceInfoResponseDto, mapDeviceInfoResponse } from './response-dto/create-device-info-response.dto';
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DeviceInfoService {
|
export class DeviceInfoService {
|
||||||
constructor(
|
constructor(
|
||||||
@InjectRepository(DeviceInfoEntity)
|
@InjectRepository(DeviceInfoEntity)
|
||||||
private deviceRepository: Repository<DeviceInfoEntity>,
|
private repository: Repository<DeviceInfoEntity>,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async create(createDeviceInfoDto: CreateDeviceInfoDto, authUser: AuthUserDto): Promise<DeviceInfoResponseDto> {
|
public async upsert(entity: Entity): Promise<DeviceInfoEntity> {
|
||||||
const res = await this.deviceRepository.findOne({
|
const { deviceId, userId } = entity;
|
||||||
where: {
|
const exists = await this.repository.findOne({ where: { userId, deviceId } });
|
||||||
deviceId: createDeviceInfoDto.deviceId,
|
|
||||||
userId: authUser.id,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
if (res) {
|
if (!exists) {
|
||||||
Logger.log('Device Info Exist', 'createDeviceInfo');
|
return await this.repository.save(entity);
|
||||||
return mapDeviceInfoResponse(res);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const deviceInfo = new DeviceInfoEntity();
|
exists.isAutoBackup = entity.isAutoBackup ?? exists.isAutoBackup;
|
||||||
deviceInfo.deviceId = createDeviceInfoDto.deviceId;
|
exists.deviceType = entity.deviceType ?? exists.deviceType;
|
||||||
deviceInfo.deviceType = createDeviceInfoDto.deviceType;
|
|
||||||
deviceInfo.userId = authUser.id;
|
|
||||||
|
|
||||||
const newDeviceInfo = await this.deviceRepository.save(deviceInfo);
|
return await this.repository.save(exists);
|
||||||
|
|
||||||
return mapDeviceInfoResponse(newDeviceInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
async update(userId: string, updateDeviceInfoDto: UpdateDeviceInfoDto): Promise<DeviceInfoResponseDto> {
|
|
||||||
const deviceInfo = await this.deviceRepository.findOne({
|
|
||||||
where: { deviceId: updateDeviceInfoDto.deviceId, userId: userId },
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!deviceInfo) {
|
|
||||||
throw new NotFoundException('Device Not Found');
|
|
||||||
}
|
|
||||||
|
|
||||||
const res = await this.deviceRepository.update(
|
|
||||||
{
|
|
||||||
id: deviceInfo.id,
|
|
||||||
},
|
|
||||||
updateDeviceInfoDto,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (res.affected == 1) {
|
|
||||||
const updatedDeviceInfo = await this.deviceRepository.findOne({
|
|
||||||
where: { deviceId: updateDeviceInfoDto.deviceId, userId: userId },
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!updatedDeviceInfo) {
|
|
||||||
throw new NotFoundException('Device Not Found');
|
|
||||||
}
|
|
||||||
|
|
||||||
return mapDeviceInfoResponse(updatedDeviceInfo);
|
|
||||||
} else {
|
|
||||||
throw new BadRequestException('Bad Request');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
import { DeviceType } from '@app/database/entities/device-info.entity';
|
|
||||||
import { ApiProperty } from '@nestjs/swagger';
|
|
||||||
import { IsNotEmpty, IsOptional } from 'class-validator';
|
|
||||||
|
|
||||||
export class UpdateDeviceInfoDto {
|
|
||||||
@IsNotEmpty()
|
|
||||||
deviceId!: string;
|
|
||||||
|
|
||||||
@IsNotEmpty()
|
|
||||||
@ApiProperty({ enumName: 'DeviceTypeEnum', enum: DeviceType })
|
|
||||||
deviceType!: DeviceType;
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
isAutoBackup?: boolean;
|
|
||||||
}
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { IsNotEmpty, IsOptional } from 'class-validator';
|
||||||
import { DeviceType } from '@app/database/entities/device-info.entity';
|
import { DeviceType } from '@app/database/entities/device-info.entity';
|
||||||
import { ApiProperty } from '@nestjs/swagger';
|
import { ApiProperty } from '@nestjs/swagger';
|
||||||
|
|
||||||
export class CreateDeviceInfoDto {
|
export class UpsertDeviceInfoDto {
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
deviceId!: string;
|
deviceId!: string;
|
||||||
|
|
||||||
|
|
@ -1783,13 +1783,15 @@
|
||||||
"/device-info": {
|
"/device-info": {
|
||||||
"post": {
|
"post": {
|
||||||
"operationId": "createDeviceInfo",
|
"operationId": "createDeviceInfo",
|
||||||
|
"summary": "",
|
||||||
|
"description": "@deprecated",
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"required": true,
|
"required": true,
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/CreateDeviceInfoDto"
|
"$ref": "#/components/schemas/UpsertDeviceInfoDto"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1817,13 +1819,49 @@
|
||||||
},
|
},
|
||||||
"patch": {
|
"patch": {
|
||||||
"operationId": "updateDeviceInfo",
|
"operationId": "updateDeviceInfo",
|
||||||
|
"summary": "",
|
||||||
|
"description": "@deprecated",
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"required": true,
|
"required": true,
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/UpdateDeviceInfoDto"
|
"$ref": "#/components/schemas/UpsertDeviceInfoDto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DeviceInfoResponseDto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"Device Info"
|
||||||
|
],
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"bearer": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"operationId": "upsertDeviceInfo",
|
||||||
|
"parameters": [],
|
||||||
|
"requestBody": {
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/UpsertDeviceInfoDto"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3227,7 +3265,7 @@
|
||||||
"WEB"
|
"WEB"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"CreateDeviceInfoDto": {
|
"UpsertDeviceInfoDto": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"deviceType": {
|
"deviceType": {
|
||||||
|
|
@ -3276,24 +3314,6 @@
|
||||||
"isAutoBackup"
|
"isAutoBackup"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"UpdateDeviceInfoDto": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"deviceType": {
|
|
||||||
"$ref": "#/components/schemas/DeviceTypeEnum"
|
|
||||||
},
|
|
||||||
"deviceId": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"isAutoBackup": {
|
|
||||||
"type": "boolean"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"deviceType",
|
|
||||||
"deviceId"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"ServerInfoResponseDto": {
|
"ServerInfoResponseDto": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
|
||||||
218
web/src/api/open-api/api.ts
generated
218
web/src/api/open-api/api.ts
generated
|
|
@ -564,31 +564,6 @@ export interface CreateAlbumDto {
|
||||||
*/
|
*/
|
||||||
'assetIds'?: Array<string>;
|
'assetIds'?: Array<string>;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface CreateDeviceInfoDto
|
|
||||||
*/
|
|
||||||
export interface CreateDeviceInfoDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {DeviceTypeEnum}
|
|
||||||
* @memberof CreateDeviceInfoDto
|
|
||||||
*/
|
|
||||||
'deviceType': DeviceTypeEnum;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CreateDeviceInfoDto
|
|
||||||
*/
|
|
||||||
'deviceId': string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof CreateDeviceInfoDto
|
|
||||||
*/
|
|
||||||
'isAutoBackup'?: boolean;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
|
|
@ -1629,31 +1604,6 @@ export interface UpdateAssetDto {
|
||||||
*/
|
*/
|
||||||
'isFavorite'?: boolean;
|
'isFavorite'?: boolean;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface UpdateDeviceInfoDto
|
|
||||||
*/
|
|
||||||
export interface UpdateDeviceInfoDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {DeviceTypeEnum}
|
|
||||||
* @memberof UpdateDeviceInfoDto
|
|
||||||
*/
|
|
||||||
'deviceType': DeviceTypeEnum;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof UpdateDeviceInfoDto
|
|
||||||
*/
|
|
||||||
'deviceId': string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof UpdateDeviceInfoDto
|
|
||||||
*/
|
|
||||||
'isAutoBackup'?: boolean;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
|
|
@ -1722,6 +1672,31 @@ export interface UpdateUserDto {
|
||||||
*/
|
*/
|
||||||
'profileImagePath'?: string;
|
'profileImagePath'?: string;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @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
|
* @export
|
||||||
|
|
@ -4321,14 +4296,15 @@ export class AuthenticationApi extends BaseAPI {
|
||||||
export const DeviceInfoApiAxiosParamCreator = function (configuration?: Configuration) {
|
export const DeviceInfoApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
*
|
* @deprecated
|
||||||
* @param {CreateDeviceInfoDto} createDeviceInfoDto
|
* @summary
|
||||||
|
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createDeviceInfo: async (createDeviceInfoDto: CreateDeviceInfoDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
createDeviceInfo: async (upsertDeviceInfoDto: UpsertDeviceInfoDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'createDeviceInfoDto' is not null or undefined
|
// verify required parameter 'upsertDeviceInfoDto' is not null or undefined
|
||||||
assertParamExists('createDeviceInfo', 'createDeviceInfoDto', createDeviceInfoDto)
|
assertParamExists('createDeviceInfo', 'upsertDeviceInfoDto', upsertDeviceInfoDto)
|
||||||
const localVarPath = `/device-info`;
|
const localVarPath = `/device-info`;
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
|
|
@ -4352,7 +4328,7 @@ export const DeviceInfoApiAxiosParamCreator = function (configuration?: Configur
|
||||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
localVarRequestOptions.data = serializeDataIfNeeded(createDeviceInfoDto, localVarRequestOptions, configuration)
|
localVarRequestOptions.data = serializeDataIfNeeded(upsertDeviceInfoDto, localVarRequestOptions, configuration)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
url: toPathString(localVarUrlObj),
|
url: toPathString(localVarUrlObj),
|
||||||
|
|
@ -4360,14 +4336,15 @@ export const DeviceInfoApiAxiosParamCreator = function (configuration?: Configur
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
* @deprecated
|
||||||
* @param {UpdateDeviceInfoDto} updateDeviceInfoDto
|
* @summary
|
||||||
|
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updateDeviceInfo: async (updateDeviceInfoDto: UpdateDeviceInfoDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
updateDeviceInfo: async (upsertDeviceInfoDto: UpsertDeviceInfoDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'updateDeviceInfoDto' is not null or undefined
|
// verify required parameter 'upsertDeviceInfoDto' is not null or undefined
|
||||||
assertParamExists('updateDeviceInfo', 'updateDeviceInfoDto', updateDeviceInfoDto)
|
assertParamExists('updateDeviceInfo', 'upsertDeviceInfoDto', upsertDeviceInfoDto)
|
||||||
const localVarPath = `/device-info`;
|
const localVarPath = `/device-info`;
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
|
|
@ -4391,7 +4368,46 @@ export const DeviceInfoApiAxiosParamCreator = function (configuration?: Configur
|
||||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
localVarRequestOptions.data = serializeDataIfNeeded(updateDeviceInfoDto, localVarRequestOptions, configuration)
|
localVarRequestOptions.data = serializeDataIfNeeded(upsertDeviceInfoDto, localVarRequestOptions, configuration)
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: toPathString(localVarUrlObj),
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @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 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 {
|
return {
|
||||||
url: toPathString(localVarUrlObj),
|
url: toPathString(localVarUrlObj),
|
||||||
|
|
@ -4409,23 +4425,35 @@ export const DeviceInfoApiFp = function(configuration?: Configuration) {
|
||||||
const localVarAxiosParamCreator = DeviceInfoApiAxiosParamCreator(configuration)
|
const localVarAxiosParamCreator = DeviceInfoApiAxiosParamCreator(configuration)
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
*
|
* @deprecated
|
||||||
* @param {CreateDeviceInfoDto} createDeviceInfoDto
|
* @summary
|
||||||
|
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async createDeviceInfo(createDeviceInfoDto: CreateDeviceInfoDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeviceInfoResponseDto>> {
|
async createDeviceInfo(upsertDeviceInfoDto: UpsertDeviceInfoDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeviceInfoResponseDto>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createDeviceInfo(createDeviceInfoDto, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createDeviceInfo(upsertDeviceInfoDto, options);
|
||||||
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
* @summary
|
||||||
|
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @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);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {UpdateDeviceInfoDto} updateDeviceInfoDto
|
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async updateDeviceInfo(updateDeviceInfoDto: UpdateDeviceInfoDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeviceInfoResponseDto>> {
|
async upsertDeviceInfo(upsertDeviceInfoDto: UpsertDeviceInfoDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeviceInfoResponseDto>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateDeviceInfo(updateDeviceInfoDto, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.upsertDeviceInfo(upsertDeviceInfoDto, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
@ -4439,22 +4467,33 @@ export const DeviceInfoApiFactory = function (configuration?: Configuration, bas
|
||||||
const localVarFp = DeviceInfoApiFp(configuration)
|
const localVarFp = DeviceInfoApiFp(configuration)
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
*
|
* @deprecated
|
||||||
* @param {CreateDeviceInfoDto} createDeviceInfoDto
|
* @summary
|
||||||
|
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createDeviceInfo(createDeviceInfoDto: CreateDeviceInfoDto, options?: any): AxiosPromise<DeviceInfoResponseDto> {
|
createDeviceInfo(upsertDeviceInfoDto: UpsertDeviceInfoDto, options?: any): AxiosPromise<DeviceInfoResponseDto> {
|
||||||
return localVarFp.createDeviceInfo(createDeviceInfoDto, options).then((request) => request(axios, basePath));
|
return localVarFp.createDeviceInfo(upsertDeviceInfoDto, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
* @summary
|
||||||
|
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
updateDeviceInfo(upsertDeviceInfoDto: UpsertDeviceInfoDto, options?: any): AxiosPromise<DeviceInfoResponseDto> {
|
||||||
|
return localVarFp.updateDeviceInfo(upsertDeviceInfoDto, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {UpdateDeviceInfoDto} updateDeviceInfoDto
|
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updateDeviceInfo(updateDeviceInfoDto: UpdateDeviceInfoDto, options?: any): AxiosPromise<DeviceInfoResponseDto> {
|
upsertDeviceInfo(upsertDeviceInfoDto: UpsertDeviceInfoDto, options?: any): AxiosPromise<DeviceInfoResponseDto> {
|
||||||
return localVarFp.updateDeviceInfo(updateDeviceInfoDto, options).then((request) => request(axios, basePath));
|
return localVarFp.upsertDeviceInfo(upsertDeviceInfoDto, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -4467,25 +4506,38 @@ export const DeviceInfoApiFactory = function (configuration?: Configuration, bas
|
||||||
*/
|
*/
|
||||||
export class DeviceInfoApi extends BaseAPI {
|
export class DeviceInfoApi extends BaseAPI {
|
||||||
/**
|
/**
|
||||||
*
|
* @deprecated
|
||||||
* @param {CreateDeviceInfoDto} createDeviceInfoDto
|
* @summary
|
||||||
|
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof DeviceInfoApi
|
* @memberof DeviceInfoApi
|
||||||
*/
|
*/
|
||||||
public createDeviceInfo(createDeviceInfoDto: CreateDeviceInfoDto, options?: AxiosRequestConfig) {
|
public createDeviceInfo(upsertDeviceInfoDto: UpsertDeviceInfoDto, options?: AxiosRequestConfig) {
|
||||||
return DeviceInfoApiFp(this.configuration).createDeviceInfo(createDeviceInfoDto, options).then((request) => request(this.axios, this.basePath));
|
return DeviceInfoApiFp(this.configuration).createDeviceInfo(upsertDeviceInfoDto, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
* @summary
|
||||||
|
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @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 {UpdateDeviceInfoDto} updateDeviceInfoDto
|
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof DeviceInfoApi
|
* @memberof DeviceInfoApi
|
||||||
*/
|
*/
|
||||||
public updateDeviceInfo(updateDeviceInfoDto: UpdateDeviceInfoDto, options?: AxiosRequestConfig) {
|
public upsertDeviceInfo(upsertDeviceInfoDto: UpsertDeviceInfoDto, options?: AxiosRequestConfig) {
|
||||||
return DeviceInfoApiFp(this.configuration).updateDeviceInfo(updateDeviceInfoDto, options).then((request) => request(this.axios, this.basePath));
|
return DeviceInfoApiFp(this.configuration).upsertDeviceInfo(upsertDeviceInfoDto, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue