feat(web/server) public album sharing (#1266)

This commit is contained in:
Alex
2023-01-09 14:16:08 -06:00
committed by GitHub
parent fd15cdbf40
commit 10789503c1
101 changed files with 4879 additions and 347 deletions

View File

@@ -473,6 +473,147 @@
]
}
},
"/share": {
"get": {
"operationId": "getAllSharedLinks",
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SharedLinkResponseDto"
}
}
}
}
}
},
"tags": [
"share"
]
}
},
"/share/me": {
"get": {
"operationId": "getMySharedLink",
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SharedLinkResponseDto"
}
}
}
}
},
"tags": [
"share"
]
}
},
"/share/{id}": {
"get": {
"operationId": "getSharedLinkById",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SharedLinkResponseDto"
}
}
}
}
},
"tags": [
"share"
]
},
"delete": {
"operationId": "removeSharedLink",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
},
"tags": [
"share"
]
},
"patch": {
"operationId": "editSharedLink",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EditSharedLinkDto"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SharedLinkResponseDto"
}
}
}
}
},
"tags": [
"share"
]
}
},
"/asset/upload": {
"post": {
"operationId": "uploadFile",
@@ -563,6 +704,42 @@
]
}
},
"/asset/download-files": {
"post": {
"operationId": "downloadFiles",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DownloadFilesDto"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
},
"tags": [
"Asset"
],
"security": [
{
"bearer": []
}
]
}
},
"/asset/download-library": {
"get": {
"operationId": "downloadLibrary",
@@ -1616,6 +1793,42 @@
]
}
},
"/album/create-shared-link": {
"post": {
"operationId": "createAlbumSharedLink",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateAlbumShareLinkDto"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SharedLinkResponseDto"
}
}
}
}
},
"tags": [
"Album"
],
"security": [
{
"bearer": []
}
]
}
},
"/tag": {
"post": {
"operationId": "create",
@@ -2666,99 +2879,11 @@
"name"
]
},
"AssetFileUploadDto": {
"type": "object",
"properties": {
"assetData": {
"type": "string",
"format": "binary"
}
},
"required": [
"assetData"
]
},
"AssetFileUploadResponseDto": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
},
"ThumbnailFormat": {
"SharedLinkType": {
"type": "string",
"enum": [
"JPEG",
"WEBP"
]
},
"CuratedObjectsResponseDto": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"resizePath": {
"type": "string"
},
"deviceAssetId": {
"type": "string"
},
"deviceId": {
"type": "string"
}
},
"required": [
"id",
"object",
"resizePath",
"deviceAssetId",
"deviceId"
]
},
"CuratedLocationsResponseDto": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"resizePath": {
"type": "string"
},
"deviceAssetId": {
"type": "string"
},
"deviceId": {
"type": "string"
}
},
"required": [
"id",
"city",
"resizePath",
"deviceAssetId",
"deviceId"
]
},
"SearchAssetDto": {
"type": "object",
"properties": {
"searchTerm": {
"type": "string"
}
},
"required": [
"searchTerm"
"ALBUM",
"INDIVIDUAL"
]
},
"AssetTypeEnum": {
@@ -3019,6 +3144,232 @@
"tags"
]
},
"AlbumResponseDto": {
"type": "object",
"properties": {
"assetCount": {
"type": "integer"
},
"id": {
"type": "string"
},
"ownerId": {
"type": "string"
},
"albumName": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"albumThumbnailAssetId": {
"type": "string",
"nullable": true
},
"shared": {
"type": "boolean"
},
"sharedUsers": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserResponseDto"
}
},
"assets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AssetResponseDto"
}
}
},
"required": [
"assetCount",
"id",
"ownerId",
"albumName",
"createdAt",
"albumThumbnailAssetId",
"shared",
"sharedUsers",
"assets"
]
},
"SharedLinkResponseDto": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/SharedLinkType"
},
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"userId": {
"type": "string"
},
"key": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"expiresAt": {
"type": "string",
"nullable": true
},
"assets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AssetResponseDto"
}
},
"album": {
"$ref": "#/components/schemas/AlbumResponseDto"
},
"allowUpload": {
"type": "boolean"
}
},
"required": [
"type",
"id",
"userId",
"key",
"createdAt",
"expiresAt",
"assets",
"allowUpload"
]
},
"EditSharedLinkDto": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"expiredAt": {
"type": "string"
},
"allowUpload": {
"type": "boolean"
},
"isEditExpireTime": {
"type": "boolean"
}
}
},
"AssetFileUploadDto": {
"type": "object",
"properties": {
"assetData": {
"type": "string",
"format": "binary"
}
},
"required": [
"assetData"
]
},
"AssetFileUploadResponseDto": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
},
"DownloadFilesDto": {
"type": "object",
"properties": {
"assetIds": {
"title": "Array of asset ids to be downloaded",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"assetIds"
]
},
"ThumbnailFormat": {
"type": "string",
"enum": [
"JPEG",
"WEBP"
]
},
"CuratedObjectsResponseDto": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"resizePath": {
"type": "string"
},
"deviceAssetId": {
"type": "string"
},
"deviceId": {
"type": "string"
}
},
"required": [
"id",
"object",
"resizePath",
"deviceAssetId",
"deviceId"
]
},
"CuratedLocationsResponseDto": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"city": {
"type": "string"
},
"resizePath": {
"type": "string"
},
"deviceAssetId": {
"type": "string"
},
"deviceId": {
"type": "string"
}
},
"required": [
"id",
"city",
"resizePath",
"deviceAssetId",
"deviceId"
]
},
"SearchAssetDto": {
"type": "object",
"properties": {
"searchTerm": {
"type": "string"
}
},
"required": [
"searchTerm"
]
},
"TimeGroupEnum": {
"type": "string",
"enum": [
@@ -3287,56 +3638,6 @@
"albumName"
]
},
"AlbumResponseDto": {
"type": "object",
"properties": {
"assetCount": {
"type": "integer"
},
"id": {
"type": "string"
},
"ownerId": {
"type": "string"
},
"albumName": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"albumThumbnailAssetId": {
"type": "string",
"nullable": true
},
"shared": {
"type": "boolean"
},
"sharedUsers": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserResponseDto"
}
},
"assets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AssetResponseDto"
}
}
},
"required": [
"assetCount",
"id",
"ownerId",
"albumName",
"createdAt",
"albumThumbnailAssetId",
"shared",
"sharedUsers",
"assets"
]
},
"AddUsersDto": {
"type": "object",
"properties": {
@@ -3411,6 +3712,26 @@
}
}
},
"CreateAlbumShareLinkDto": {
"type": "object",
"properties": {
"albumId": {
"type": "string"
},
"expiredAt": {
"type": "string"
},
"allowUpload": {
"type": "boolean"
},
"description": {
"type": "string"
}
},
"required": [
"albumId"
]
},
"CreateTagDto": {
"type": "object",
"properties": {