mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
chore!: remove unused token response param (#27805)
This commit is contained in:
+1
-13
@@ -25,7 +25,6 @@ class SharedLinkResponseDto {
|
|||||||
required this.password,
|
required this.password,
|
||||||
required this.showMetadata,
|
required this.showMetadata,
|
||||||
required this.slug,
|
required this.slug,
|
||||||
this.token,
|
|
||||||
required this.type,
|
required this.type,
|
||||||
required this.userId,
|
required this.userId,
|
||||||
});
|
});
|
||||||
@@ -70,9 +69,6 @@ class SharedLinkResponseDto {
|
|||||||
/// Custom URL slug
|
/// Custom URL slug
|
||||||
String? slug;
|
String? slug;
|
||||||
|
|
||||||
/// Access token
|
|
||||||
String? token;
|
|
||||||
|
|
||||||
SharedLinkType type;
|
SharedLinkType type;
|
||||||
|
|
||||||
/// Owner user ID
|
/// Owner user ID
|
||||||
@@ -92,7 +88,6 @@ class SharedLinkResponseDto {
|
|||||||
other.password == password &&
|
other.password == password &&
|
||||||
other.showMetadata == showMetadata &&
|
other.showMetadata == showMetadata &&
|
||||||
other.slug == slug &&
|
other.slug == slug &&
|
||||||
other.token == token &&
|
|
||||||
other.type == type &&
|
other.type == type &&
|
||||||
other.userId == userId;
|
other.userId == userId;
|
||||||
|
|
||||||
@@ -111,12 +106,11 @@ class SharedLinkResponseDto {
|
|||||||
(password == null ? 0 : password!.hashCode) +
|
(password == null ? 0 : password!.hashCode) +
|
||||||
(showMetadata.hashCode) +
|
(showMetadata.hashCode) +
|
||||||
(slug == null ? 0 : slug!.hashCode) +
|
(slug == null ? 0 : slug!.hashCode) +
|
||||||
(token == null ? 0 : token!.hashCode) +
|
|
||||||
(type.hashCode) +
|
(type.hashCode) +
|
||||||
(userId.hashCode);
|
(userId.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'SharedLinkResponseDto[album=$album, allowDownload=$allowDownload, allowUpload=$allowUpload, assets=$assets, createdAt=$createdAt, description=$description, expiresAt=$expiresAt, id=$id, key=$key, password=$password, showMetadata=$showMetadata, slug=$slug, token=$token, type=$type, userId=$userId]';
|
String toString() => 'SharedLinkResponseDto[album=$album, allowDownload=$allowDownload, allowUpload=$allowUpload, assets=$assets, createdAt=$createdAt, description=$description, expiresAt=$expiresAt, id=$id, key=$key, password=$password, showMetadata=$showMetadata, slug=$slug, type=$type, userId=$userId]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@@ -155,11 +149,6 @@ class SharedLinkResponseDto {
|
|||||||
json[r'slug'] = this.slug;
|
json[r'slug'] = this.slug;
|
||||||
} else {
|
} else {
|
||||||
// json[r'slug'] = null;
|
// json[r'slug'] = null;
|
||||||
}
|
|
||||||
if (this.token != null) {
|
|
||||||
json[r'token'] = this.token;
|
|
||||||
} else {
|
|
||||||
// json[r'token'] = null;
|
|
||||||
}
|
}
|
||||||
json[r'type'] = this.type;
|
json[r'type'] = this.type;
|
||||||
json[r'userId'] = this.userId;
|
json[r'userId'] = this.userId;
|
||||||
@@ -187,7 +176,6 @@ class SharedLinkResponseDto {
|
|||||||
password: mapValueOfType<String>(json, r'password'),
|
password: mapValueOfType<String>(json, r'password'),
|
||||||
showMetadata: mapValueOfType<bool>(json, r'showMetadata')!,
|
showMetadata: mapValueOfType<bool>(json, r'showMetadata')!,
|
||||||
slug: mapValueOfType<String>(json, r'slug'),
|
slug: mapValueOfType<String>(json, r'slug'),
|
||||||
token: mapValueOfType<String>(json, r'token'),
|
|
||||||
type: SharedLinkType.fromJson(json[r'type'])!,
|
type: SharedLinkType.fromJson(json[r'type'])!,
|
||||||
userId: mapValueOfType<String>(json, r'userId')!,
|
userId: mapValueOfType<String>(json, r'userId')!,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -22127,27 +22127,6 @@
|
|||||||
"nullable": true,
|
"nullable": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"token": {
|
|
||||||
"deprecated": true,
|
|
||||||
"description": "Access token",
|
|
||||||
"nullable": true,
|
|
||||||
"type": "string",
|
|
||||||
"x-immich-history": [
|
|
||||||
{
|
|
||||||
"version": "v1",
|
|
||||||
"state": "Added"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"version": "v2",
|
|
||||||
"state": "Stable"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"version": "v2.6.0",
|
|
||||||
"state": "Deprecated"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"x-immich-state": "Deprecated"
|
|
||||||
},
|
|
||||||
"type": {
|
"type": {
|
||||||
"$ref": "#/components/schemas/SharedLinkType"
|
"$ref": "#/components/schemas/SharedLinkType"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2235,8 +2235,6 @@ export type SharedLinkResponseDto = {
|
|||||||
showMetadata: boolean;
|
showMetadata: boolean;
|
||||||
/** Custom URL slug */
|
/** Custom URL slug */
|
||||||
slug: string | null;
|
slug: string | null;
|
||||||
/** Access token */
|
|
||||||
token?: string | null;
|
|
||||||
"type": SharedLinkType;
|
"type": SharedLinkType;
|
||||||
/** Owner user ID */
|
/** Owner user ID */
|
||||||
userId: string;
|
userId: string;
|
||||||
|
|||||||
@@ -62,14 +62,6 @@ const SharedLinkResponseSchema = z
|
|||||||
id: z.string().describe('Shared link ID'),
|
id: z.string().describe('Shared link ID'),
|
||||||
description: z.string().nullable().describe('Link description'),
|
description: z.string().nullable().describe('Link description'),
|
||||||
password: z.string().nullable().describe('Has password'),
|
password: z.string().nullable().describe('Has password'),
|
||||||
token: z
|
|
||||||
.string()
|
|
||||||
.nullish()
|
|
||||||
.describe('Access token')
|
|
||||||
.meta({
|
|
||||||
...new HistoryBuilder().added('v1').stable('v2').deprecated('v2.6.0').getExtensions(),
|
|
||||||
deprecated: true,
|
|
||||||
}),
|
|
||||||
userId: z.string().describe('Owner user ID'),
|
userId: z.string().describe('Owner user ID'),
|
||||||
key: z.string().describe('Encryption key (base64url)'),
|
key: z.string().describe('Encryption key (base64url)'),
|
||||||
type: SharedLinkTypeSchema,
|
type: SharedLinkTypeSchema,
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ export const sharedLinkFactory = Sync.makeFactory<SharedLinkResponseDto>({
|
|||||||
id: Sync.each(() => faker.string.uuid()),
|
id: Sync.each(() => faker.string.uuid()),
|
||||||
description: Sync.each(() => faker.word.sample()),
|
description: Sync.each(() => faker.word.sample()),
|
||||||
password: Sync.each(() => faker.word.sample()),
|
password: Sync.each(() => faker.word.sample()),
|
||||||
token: Sync.each(() => faker.word.sample()),
|
|
||||||
userId: Sync.each(() => faker.string.uuid()),
|
userId: Sync.each(() => faker.string.uuid()),
|
||||||
key: Sync.each(() => faker.word.sample()),
|
key: Sync.each(() => faker.word.sample()),
|
||||||
type: Sync.each(() => faker.helpers.enumValue(SharedLinkType)),
|
type: Sync.each(() => faker.helpers.enumValue(SharedLinkType)),
|
||||||
|
|||||||
Reference in New Issue
Block a user