mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
chore!: remove deviceId and deviceAssetId (#27818)
chore: remove deviceId and deviceAssetId
This commit is contained in:
@@ -49,12 +49,5 @@ const AssetBulkUploadCheckResponseSchema = z
|
||||
})
|
||||
.meta({ id: 'AssetBulkUploadCheckResponseDto' });
|
||||
|
||||
const CheckExistingAssetsResponseSchema = z
|
||||
.object({
|
||||
existingIds: z.array(z.string()).describe('Existing asset IDs'),
|
||||
})
|
||||
.meta({ id: 'CheckExistingAssetsResponseDto' });
|
||||
|
||||
export class AssetMediaResponseDto extends createZodDto(AssetMediaResponseSchema) {}
|
||||
export class AssetBulkUploadCheckResponseDto extends createZodDto(AssetBulkUploadCheckResponseSchema) {}
|
||||
export class CheckExistingAssetsResponseDto extends createZodDto(CheckExistingAssetsResponseSchema) {}
|
||||
|
||||
@@ -36,8 +36,6 @@ export enum UploadFieldName {
|
||||
}
|
||||
|
||||
const AssetMediaBaseSchema = z.object({
|
||||
deviceAssetId: z.string().describe('Device asset ID'),
|
||||
deviceId: z.string().describe('Device ID'),
|
||||
fileCreatedAt: isoDatetimeToDate.describe('File creation date'),
|
||||
fileModifiedAt: isoDatetimeToDate.describe('File modification date'),
|
||||
duration: z.string().optional().describe('Duration (for videos)'),
|
||||
@@ -71,14 +69,6 @@ const AssetBulkUploadCheckSchema = z
|
||||
})
|
||||
.meta({ id: 'AssetBulkUploadCheckDto' });
|
||||
|
||||
const CheckExistingAssetsSchema = z
|
||||
.object({
|
||||
deviceAssetIds: z.array(z.string()).min(1).describe('Device asset IDs to check'),
|
||||
deviceId: z.string().describe('Device ID'),
|
||||
})
|
||||
.meta({ id: 'CheckExistingAssetsDto' });
|
||||
|
||||
export class AssetMediaOptionsDto extends createZodDto(AssetMediaOptionsSchema) {}
|
||||
export class AssetMediaCreateDto extends createZodDto(AssetMediaCreateSchema) {}
|
||||
export class AssetBulkUploadCheckDto extends createZodDto(AssetBulkUploadCheckSchema) {}
|
||||
export class CheckExistingAssetsDto extends createZodDto(CheckExistingAssetsSchema) {}
|
||||
|
||||
@@ -72,8 +72,6 @@ export const AssetResponseSchema = SanitizedAssetResponseSchema.extend(
|
||||
.string()
|
||||
.meta({ format: 'date-time' })
|
||||
.describe('The UTC timestamp when the asset was originally uploaded to Immich.'),
|
||||
deviceAssetId: z.string().describe('Device asset ID'),
|
||||
deviceId: z.string().describe('Device ID'),
|
||||
ownerId: z.string().describe('Owner user ID'),
|
||||
owner: UserResponseSchema.optional(),
|
||||
libraryId: z
|
||||
@@ -137,8 +135,6 @@ export type MapAsset = {
|
||||
status: AssetStatus;
|
||||
checksum: Buffer<ArrayBufferLike>;
|
||||
checksumAlgorithm: ChecksumAlgorithm;
|
||||
deviceAssetId: string;
|
||||
deviceId: string;
|
||||
duplicateId: string | null;
|
||||
duration: string | null;
|
||||
edits?: ShallowDehydrateObject<AssetEditActionItem>[];
|
||||
@@ -239,10 +235,8 @@ export function mapAsset(entity: MaybeDehydrated<MapAsset>, options: AssetMapOpt
|
||||
return {
|
||||
id: entity.id,
|
||||
createdAt: asDateString(entity.createdAt),
|
||||
deviceAssetId: entity.deviceAssetId,
|
||||
ownerId: entity.ownerId,
|
||||
owner: entity.owner ? mapUser(entity.owner) : undefined,
|
||||
deviceId: entity.deviceId,
|
||||
libraryId: entity.libraryId,
|
||||
type: entity.type,
|
||||
originalPath: entity.originalPath,
|
||||
|
||||
@@ -6,12 +6,6 @@ import { AssetStats } from 'src/repositories/asset.repository';
|
||||
import { IsNotSiblingOf, isoDatetimeToDate, latitudeSchema, longitudeSchema, stringToBool } from 'src/validation';
|
||||
import z from 'zod';
|
||||
|
||||
const DeviceIdSchema = z
|
||||
.object({
|
||||
deviceId: z.string().describe('Device ID'),
|
||||
})
|
||||
.meta({ id: 'DeviceIdDto' });
|
||||
|
||||
const UpdateAssetBaseSchema = z
|
||||
.object({
|
||||
isFavorite: z.boolean().optional().describe('Mark as favorite'),
|
||||
@@ -182,7 +176,6 @@ export const mapStats = (stats: AssetStats): AssetStatsResponseDto => {
|
||||
};
|
||||
};
|
||||
|
||||
export class DeviceIdDto extends createZodDto(DeviceIdSchema) {}
|
||||
export class AssetBulkUpdateDto extends createZodDto(AssetBulkUpdateSchema) {}
|
||||
export class UpdateAssetDto extends createZodDto(UpdateAssetSchema) {}
|
||||
export class AssetBulkDeleteDto extends createZodDto(AssetBulkDeleteSchema) {}
|
||||
|
||||
@@ -9,7 +9,6 @@ import z from 'zod';
|
||||
|
||||
const BaseSearchSchema = z.object({
|
||||
libraryId: z.uuidv4().nullish().describe('Library ID to filter by'),
|
||||
deviceId: z.string().optional().describe('Device ID to filter by'),
|
||||
type: AssetTypeSchema.optional(),
|
||||
isEncoded: z.boolean().optional().describe('Filter by encoded status'),
|
||||
isFavorite: z.boolean().optional().describe('Filter by favorite status'),
|
||||
@@ -68,7 +67,6 @@ const LargeAssetSearchSchema = BaseSearchWithResultsSchema.extend({
|
||||
|
||||
const MetadataSearchSchema = RandomSearchSchema.extend({
|
||||
id: z.uuidv4().optional().describe('Filter by asset ID'),
|
||||
deviceAssetId: z.string().optional().describe('Filter by device asset ID'),
|
||||
description: z.string().trim().optional().describe('Filter by description text'),
|
||||
checksum: z.string().optional().describe('Filter by file checksum'),
|
||||
originalFileName: z.string().trim().optional().describe('Filter by original file name'),
|
||||
|
||||
Reference in New Issue
Block a user