Skip to content

High performance self-hosted photo and video management solution.

chore!: remove unused token response param (#27805)

Jason Rasmussen5f5e3344d5db
diff --git a/mobile/openapi/lib/model/shared_link_response_dto.dart b/mobile/openapi/lib/model/shared_link_response_dto.dart
index 3312651296..bad0966ca2 100644
--- a/mobile/openapi/lib/model/shared_link_response_dto.dart
+++ b/mobile/openapi/lib/model/shared_link_response_dto.dart
@@ -25,7 +25,6 @@ class SharedLinkResponseDto {
required this.password,
required this.showMetadata,
required this.slug,
- this.token,
required this.type,
required this.userId,
});
@@ -70,9 +69,6 @@ class SharedLinkResponseDto {
/// Custom URL slug
String? slug;
- /// Access token
- String? token;
-
SharedLinkType type;
/// Owner user ID
@@ -92,7 +88,6 @@ class SharedLinkResponseDto {
other.password == password &&
other.showMetadata == showMetadata &&
other.slug == slug &&
- other.token == token &&
other.type == type &&
other.userId == userId;
@@ -111,12 +106,11 @@ class SharedLinkResponseDto {
(password == null ? 0 : password!.hashCode) +
(showMetadata.hashCode) +
(slug == null ? 0 : slug!.hashCode) +
- (token == null ? 0 : token!.hashCode) +
(type.hashCode) +
(userId.hashCode);
@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() {
final json = <String, dynamic>{};
@@ -155,11 +149,6 @@ class SharedLinkResponseDto {
json[r'slug'] = this.slug;
} else {
// 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'userId'] = this.userId;
@@ -187,7 +176,6 @@ class SharedLinkResponseDto {
password: mapValueOfType<String>(json, r'password'),
showMetadata: mapValueOfType<bool>(json, r'showMetadata')!,
slug: mapValueOfType<String>(json, r'slug'),
- token: mapValueOfType<String>(json, r'token'),
type: SharedLinkType.fromJson(json[r'type'])!,
userId: mapValueOfType<String>(json, r'userId')!,
);
diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json
index 9422786605..7fecc8a647 100644
--- a/open-api/immich-openapi-specs.json
+++ b/open-api/immich-openapi-specs.json
@@ -22127,27 +22127,6 @@
"nullable": true,
"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": {
"$ref": "#/components/schemas/SharedLinkType"
},
diff --git a/open-api/typescript-sdk/src/fetch-client.ts b/open-api/typescript-sdk/src/fetch-client.ts
index bd96223cb9..de6e2383e9 100644
--- a/open-api/typescript-sdk/src/fetch-client.ts
+++ b/open-api/typescript-sdk/src/fetch-client.ts
@@ -2235,8 +2235,6 @@ export type SharedLinkResponseDto = {
showMetadata: boolean;
/** Custom URL slug */
slug: string | null;
- /** Access token */
- token?: string | null;
"type": SharedLinkType;
/** Owner user ID */
userId: string;
diff --git a/server/src/dtos/shared-link.dto.ts b/server/src/dtos/shared-link.dto.ts
index 95f52dd24d..aa58c0833e 100644
--- a/server/src/dtos/shared-link.dto.ts
+++ b/server/src/dtos/shared-link.dto.ts
@@ -62,14 +62,6 @@ const SharedLinkResponseSchema = z
id: z.string().describe('Shared link ID'),
description: z.string().nullable().describe('Link description'),
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'),
key: z.string().describe('Encryption key (base64url)'),
type: SharedLinkTypeSchema,
diff --git a/web/src/test-data/factories/shared-link-factory.ts b/web/src/test-data/factories/shared-link-factory.ts
index 5768a5f9f7..7c646a8e8e 100644
--- a/web/src/test-data/factories/shared-link-factory.ts
+++ b/web/src/test-data/factories/shared-link-factory.ts
@@ -6,7 +6,6 @@ export const sharedLinkFactory = Sync.makeFactory<SharedLinkResponseDto>({
id: Sync.each(() => faker.string.uuid()),
description: Sync.each(() => faker.word.sample()),
password: Sync.each(() => faker.word.sample()),
- token: Sync.each(() => faker.word.sample()),
userId: Sync.each(() => faker.string.uuid()),
key: Sync.each(() => faker.word.sample()),
type: Sync.each(() => faker.helpers.enumValue(SharedLinkType)),