feat: user's features preferences (#12099)

* feat: metadata in UserPreference

* feat: web metadata settings

* feat: web metadata settings

* fix: typo

* patch openapi

* fix: missing translation key

* new organization of preference strucutre

* feature settings on web

* localization

* added and used feature settings

* add default value to response dto

* patch openapi

* format en.json file

* implement helper method

* use tags preference logic

* Fix logic bug and add tests

* fix preference can be null in detail panel
This commit is contained in:
Alex
2024-08-29 14:29:04 -05:00
committed by GitHub
parent 9bfaa525db
commit ebecb60f39
32 changed files with 1418 additions and 296 deletions

View File

@@ -9164,6 +9164,34 @@
],
"type": "object"
},
"FoldersResponse": {
"properties": {
"enabled": {
"default": false,
"type": "boolean"
},
"sidebarWeb": {
"default": false,
"type": "boolean"
}
},
"required": [
"enabled",
"sidebarWeb"
],
"type": "object"
},
"FoldersUpdate": {
"properties": {
"enabled": {
"type": "boolean"
},
"sidebarWeb": {
"type": "boolean"
}
},
"type": "object"
},
"ImageFormat": {
"enum": [
"jpeg",
@@ -9534,6 +9562,26 @@
],
"type": "string"
},
"MemoriesResponse": {
"properties": {
"enabled": {
"default": true,
"type": "boolean"
}
},
"required": [
"enabled"
],
"type": "object"
},
"MemoriesUpdate": {
"properties": {
"enabled": {
"type": "boolean"
}
},
"type": "object"
},
"MemoryCreateDto": {
"properties": {
"assetIds": {
@@ -9586,17 +9634,6 @@
],
"type": "object"
},
"MemoryResponse": {
"properties": {
"enabled": {
"type": "boolean"
}
},
"required": [
"enabled"
],
"type": "object"
},
"MemoryResponseDto": {
"properties": {
"assets": {
@@ -9660,14 +9697,6 @@
],
"type": "string"
},
"MemoryUpdate": {
"properties": {
"enabled": {
"type": "boolean"
}
},
"type": "object"
},
"MemoryUpdateDto": {
"properties": {
"isSaved": {
@@ -9953,6 +9982,23 @@
],
"type": "string"
},
"PeopleResponse": {
"properties": {
"enabled": {
"default": true,
"type": "boolean"
},
"sidebarWeb": {
"default": false,
"type": "boolean"
}
},
"required": [
"enabled",
"sidebarWeb"
],
"type": "object"
},
"PeopleResponseDto": {
"properties": {
"hasNextPage": {
@@ -9979,6 +10025,17 @@
],
"type": "object"
},
"PeopleUpdate": {
"properties": {
"enabled": {
"type": "boolean"
},
"sidebarWeb": {
"type": "boolean"
}
},
"type": "object"
},
"PeopleUpdateDto": {
"properties": {
"people": {
@@ -10300,7 +10357,7 @@
],
"type": "object"
},
"RatingResponse": {
"RatingsResponse": {
"properties": {
"enabled": {
"default": false,
@@ -10312,7 +10369,7 @@
],
"type": "object"
},
"RatingUpdate": {
"RatingsUpdate": {
"properties": {
"enabled": {
"type": "boolean"
@@ -12002,6 +12059,34 @@
],
"type": "object"
},
"TagsResponse": {
"properties": {
"enabled": {
"default": true,
"type": "boolean"
},
"sidebarWeb": {
"default": true,
"type": "boolean"
}
},
"required": [
"enabled",
"sidebarWeb"
],
"type": "object"
},
"TagsUpdate": {
"properties": {
"enabled": {
"type": "boolean"
},
"sidebarWeb": {
"type": "boolean"
}
},
"type": "object"
},
"TimeBucketResponseDto": {
"properties": {
"count": {
@@ -12379,23 +12464,35 @@
"emailNotifications": {
"$ref": "#/components/schemas/EmailNotificationsResponse"
},
"folders": {
"$ref": "#/components/schemas/FoldersResponse"
},
"memories": {
"$ref": "#/components/schemas/MemoryResponse"
"$ref": "#/components/schemas/MemoriesResponse"
},
"people": {
"$ref": "#/components/schemas/PeopleResponse"
},
"purchase": {
"$ref": "#/components/schemas/PurchaseResponse"
},
"rating": {
"$ref": "#/components/schemas/RatingResponse"
"ratings": {
"$ref": "#/components/schemas/RatingsResponse"
},
"tags": {
"$ref": "#/components/schemas/TagsResponse"
}
},
"required": [
"avatar",
"download",
"emailNotifications",
"folders",
"memories",
"people",
"purchase",
"rating"
"ratings",
"tags"
],
"type": "object"
},
@@ -12410,14 +12507,23 @@
"emailNotifications": {
"$ref": "#/components/schemas/EmailNotificationsUpdate"
},
"folders": {
"$ref": "#/components/schemas/FoldersUpdate"
},
"memories": {
"$ref": "#/components/schemas/MemoryUpdate"
"$ref": "#/components/schemas/MemoriesUpdate"
},
"people": {
"$ref": "#/components/schemas/PeopleUpdate"
},
"purchase": {
"$ref": "#/components/schemas/PurchaseUpdate"
},
"rating": {
"$ref": "#/components/schemas/RatingUpdate"
"ratings": {
"$ref": "#/components/schemas/RatingsUpdate"
},
"tags": {
"$ref": "#/components/schemas/TagsUpdate"
}
},
"type": "object"