merge main
This commit is contained in:
+412
-326
@@ -206,6 +206,274 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/admin/users": {
|
||||
"get": {
|
||||
"operationId": "searchUsersAdmin",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "withDeleted",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/UserAdminResponseDto"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"operationId": "createUserAdmin",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserAdminCreateDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserAdminResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/admin/users/{id}": {
|
||||
"delete": {
|
||||
"operationId": "deleteUserAdmin",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserAdminDeleteDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserAdminResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
]
|
||||
},
|
||||
"get": {
|
||||
"operationId": "getUserAdmin",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserAdminResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
]
|
||||
},
|
||||
"put": {
|
||||
"operationId": "updateUserAdmin",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserAdminUpdateDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserAdminResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/admin/users/{id}/restore": {
|
||||
"post": {
|
||||
"operationId": "restoreUserAdmin",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserAdminResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/albums": {
|
||||
"get": {
|
||||
"operationId": "getAllAlbums",
|
||||
@@ -1879,7 +2147,7 @@
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserResponseDto"
|
||||
"$ref": "#/components/schemas/UserAdminResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1910,7 +2178,7 @@
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserResponseDto"
|
||||
"$ref": "#/components/schemas/UserAdminResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3200,7 +3468,7 @@
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserResponseDto"
|
||||
"$ref": "#/components/schemas/UserAdminResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3246,7 +3514,7 @@
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserResponseDto"
|
||||
"$ref": "#/components/schemas/UserAdminResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -6102,17 +6370,8 @@
|
||||
},
|
||||
"/users": {
|
||||
"get": {
|
||||
"operationId": "getAllUsers",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "isAll",
|
||||
"required": true,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
],
|
||||
"operationId": "searchUsers",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
@@ -6142,26 +6401,18 @@
|
||||
"tags": [
|
||||
"User"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"operationId": "createUser",
|
||||
}
|
||||
},
|
||||
"/users/me": {
|
||||
"get": {
|
||||
"operationId": "getMyUser",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CreateUserDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserResponseDto"
|
||||
"$ref": "#/components/schemas/UserAdminResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -6184,13 +6435,13 @@
|
||||
]
|
||||
},
|
||||
"put": {
|
||||
"operationId": "updateUser",
|
||||
"operationId": "updateMyUser",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UpdateUserDto"
|
||||
"$ref": "#/components/schemas/UserUpdateMeDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -6201,39 +6452,7 @@
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/users/me": {
|
||||
"get": {
|
||||
"operationId": "getMyUserInfo",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserResponseDto"
|
||||
"$ref": "#/components/schemas/UserAdminResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -6323,58 +6542,8 @@
|
||||
}
|
||||
},
|
||||
"/users/{id}": {
|
||||
"delete": {
|
||||
"operationId": "deleteUser",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/DeleteUserDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
]
|
||||
},
|
||||
"get": {
|
||||
"operationId": "getUserById",
|
||||
"operationId": "getUser",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
@@ -6456,48 +6625,6 @@
|
||||
"User"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/users/{id}/restore": {
|
||||
"post": {
|
||||
"operationId": "restoreUser",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
@@ -6639,7 +6766,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"user": {
|
||||
"$ref": "#/components/schemas/UserDto"
|
||||
"$ref": "#/components/schemas/UserResponseDto"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -7844,52 +7971,6 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"CreateUserDto": {
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"memoriesEnabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"notify": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"quotaSizeInBytes": {
|
||||
"format": "int64",
|
||||
"minimum": 1,
|
||||
"nullable": true,
|
||||
"type": "integer"
|
||||
},
|
||||
"shouldChangePassword": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"storageLabel": {
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"email",
|
||||
"name",
|
||||
"password"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"DeleteUserDto": {
|
||||
"properties": {
|
||||
"force": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"DownloadArchiveInfo": {
|
||||
"properties": {
|
||||
"assetIds": {
|
||||
@@ -8872,15 +8953,6 @@
|
||||
"avatarColor": {
|
||||
"$ref": "#/components/schemas/UserAvatarColor"
|
||||
},
|
||||
"createdAt": {
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
},
|
||||
"deletedAt": {
|
||||
"format": "date-time",
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -8890,62 +8962,19 @@
|
||||
"inTimeline": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isAdmin": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"memoriesEnabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"oauthId": {
|
||||
"type": "string"
|
||||
},
|
||||
"profileImagePath": {
|
||||
"type": "string"
|
||||
},
|
||||
"quotaSizeInBytes": {
|
||||
"format": "int64",
|
||||
"nullable": true,
|
||||
"type": "integer"
|
||||
},
|
||||
"quotaUsageInBytes": {
|
||||
"format": "int64",
|
||||
"nullable": true,
|
||||
"type": "integer"
|
||||
},
|
||||
"shouldChangePassword": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/components/schemas/UserStatus"
|
||||
},
|
||||
"storageLabel": {
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"avatarColor",
|
||||
"createdAt",
|
||||
"deletedAt",
|
||||
"email",
|
||||
"id",
|
||||
"isAdmin",
|
||||
"name",
|
||||
"oauthId",
|
||||
"profileImagePath",
|
||||
"quotaSizeInBytes",
|
||||
"quotaUsageInBytes",
|
||||
"shouldChangePassword",
|
||||
"status",
|
||||
"storageLabel",
|
||||
"updatedAt"
|
||||
"profileImagePath"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
@@ -10897,48 +10926,6 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"UpdateUserDto": {
|
||||
"properties": {
|
||||
"avatarColor": {
|
||||
"$ref": "#/components/schemas/UserAvatarColor"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
},
|
||||
"isAdmin": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"memoriesEnabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"quotaSizeInBytes": {
|
||||
"format": "int64",
|
||||
"minimum": 1,
|
||||
"nullable": true,
|
||||
"type": "integer"
|
||||
},
|
||||
"shouldChangePassword": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"storageLabel": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"UsageByUserDto": {
|
||||
"properties": {
|
||||
"photos": {
|
||||
@@ -10973,49 +10960,53 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"UserAvatarColor": {
|
||||
"enum": [
|
||||
"primary",
|
||||
"pink",
|
||||
"red",
|
||||
"yellow",
|
||||
"blue",
|
||||
"green",
|
||||
"purple",
|
||||
"orange",
|
||||
"gray",
|
||||
"amber"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"UserDto": {
|
||||
"UserAdminCreateDto": {
|
||||
"properties": {
|
||||
"avatarColor": {
|
||||
"$ref": "#/components/schemas/UserAvatarColor"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
"memoriesEnabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"profileImagePath": {
|
||||
"notify": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"quotaSizeInBytes": {
|
||||
"format": "int64",
|
||||
"minimum": 1,
|
||||
"nullable": true,
|
||||
"type": "integer"
|
||||
},
|
||||
"shouldChangePassword": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"storageLabel": {
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"avatarColor",
|
||||
"email",
|
||||
"id",
|
||||
"name",
|
||||
"profileImagePath"
|
||||
"password"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"UserResponseDto": {
|
||||
"UserAdminDeleteDto": {
|
||||
"properties": {
|
||||
"force": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"UserAdminResponseDto": {
|
||||
"properties": {
|
||||
"avatarColor": {
|
||||
"$ref": "#/components/schemas/UserAvatarColor"
|
||||
@@ -11094,6 +11085,81 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"UserAdminUpdateDto": {
|
||||
"properties": {
|
||||
"avatarColor": {
|
||||
"$ref": "#/components/schemas/UserAvatarColor"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"memoriesEnabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"quotaSizeInBytes": {
|
||||
"format": "int64",
|
||||
"minimum": 1,
|
||||
"nullable": true,
|
||||
"type": "integer"
|
||||
},
|
||||
"shouldChangePassword": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"storageLabel": {
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"UserAvatarColor": {
|
||||
"enum": [
|
||||
"primary",
|
||||
"pink",
|
||||
"red",
|
||||
"yellow",
|
||||
"blue",
|
||||
"green",
|
||||
"purple",
|
||||
"orange",
|
||||
"gray",
|
||||
"amber"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"UserResponseDto": {
|
||||
"properties": {
|
||||
"avatarColor": {
|
||||
"$ref": "#/components/schemas/UserAvatarColor"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"profileImagePath": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"avatarColor",
|
||||
"email",
|
||||
"id",
|
||||
"name",
|
||||
"profileImagePath"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"UserStatus": {
|
||||
"enum": [
|
||||
"active",
|
||||
@@ -11102,6 +11168,26 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"UserUpdateMeDto": {
|
||||
"properties": {
|
||||
"avatarColor": {
|
||||
"$ref": "#/components/schemas/UserAvatarColor"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"memoriesEnabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"ValidateAccessTokenResponseDto": {
|
||||
"properties": {
|
||||
"authStatus": {
|
||||
|
||||
@@ -13,13 +13,22 @@ npm i --save @immich/sdk
|
||||
For a more detailed example, check out the [`@immich/cli`](https://github.com/immich-app/immich/tree/main/cli).
|
||||
|
||||
```typescript
|
||||
<<<<<<< HEAD
|
||||
import { getAllAlbums, getAllAssets, getMyUser, init } from "@immich/sdk";
|
||||
=======
|
||||
import { getAllAlbums, getMyUserInfo, init } from "@immich/sdk";
|
||||
>>>>>>> e7c8501930a988dfb6c23ce1c48b0beb076a58c2
|
||||
|
||||
const API_KEY = "<API_KEY>"; // process.env.IMMICH_API_KEY
|
||||
|
||||
init({ baseUrl: "https://demo.immich.app/api", apiKey: API_KEY });
|
||||
|
||||
<<<<<<< HEAD
|
||||
const user = await getMyUser();
|
||||
const assets = await getAllAssets({ take: 1000 });
|
||||
=======
|
||||
const user = await getMyUserInfo();
|
||||
>>>>>>> e7c8501930a988dfb6c23ce1c48b0beb076a58c2
|
||||
const albums = await getAllAlbums({});
|
||||
|
||||
console.log({ user, albums });
|
||||
|
||||
@@ -14,7 +14,7 @@ const oazapfts = Oazapfts.runtime(defaults);
|
||||
export const servers = {
|
||||
server1: "/api"
|
||||
};
|
||||
export type UserDto = {
|
||||
export type UserResponseDto = {
|
||||
avatarColor: UserAvatarColor;
|
||||
email: string;
|
||||
id: string;
|
||||
@@ -27,7 +27,7 @@ export type ActivityResponseDto = {
|
||||
createdAt: string;
|
||||
id: string;
|
||||
"type": Type;
|
||||
user: UserDto;
|
||||
user: UserResponseDto;
|
||||
};
|
||||
export type ActivityCreateDto = {
|
||||
albumId: string;
|
||||
@@ -38,7 +38,7 @@ export type ActivityCreateDto = {
|
||||
export type ActivityStatisticsResponseDto = {
|
||||
comments: number;
|
||||
};
|
||||
export type UserResponseDto = {
|
||||
export type UserAdminResponseDto = {
|
||||
avatarColor: UserAvatarColor;
|
||||
createdAt: string;
|
||||
deletedAt: string | null;
|
||||
@@ -56,6 +56,29 @@ export type UserResponseDto = {
|
||||
storageLabel: string | null;
|
||||
updatedAt: string;
|
||||
};
|
||||
export type UserAdminCreateDto = {
|
||||
email: string;
|
||||
memoriesEnabled?: boolean;
|
||||
name: string;
|
||||
notify?: boolean;
|
||||
password: string;
|
||||
quotaSizeInBytes?: number | null;
|
||||
shouldChangePassword?: boolean;
|
||||
storageLabel?: string | null;
|
||||
};
|
||||
export type UserAdminDeleteDto = {
|
||||
force?: boolean;
|
||||
};
|
||||
export type UserAdminUpdateDto = {
|
||||
avatarColor?: UserAvatarColor;
|
||||
email?: string;
|
||||
memoriesEnabled?: boolean;
|
||||
name?: string;
|
||||
password?: string;
|
||||
quotaSizeInBytes?: number | null;
|
||||
shouldChangePassword?: boolean;
|
||||
storageLabel?: string | null;
|
||||
};
|
||||
export type AlbumUserResponseDto = {
|
||||
role: AlbumUserRole;
|
||||
user: UserResponseDto;
|
||||
@@ -521,22 +544,11 @@ export type OAuthCallbackDto = {
|
||||
};
|
||||
export type PartnerResponseDto = {
|
||||
avatarColor: UserAvatarColor;
|
||||
createdAt: string;
|
||||
deletedAt: string | null;
|
||||
email: string;
|
||||
id: string;
|
||||
inTimeline?: boolean;
|
||||
isAdmin: boolean;
|
||||
memoriesEnabled?: boolean;
|
||||
name: string;
|
||||
oauthId: string;
|
||||
profileImagePath: string;
|
||||
quotaSizeInBytes: number | null;
|
||||
quotaUsageInBytes: number | null;
|
||||
shouldChangePassword: boolean;
|
||||
status: UserStatus;
|
||||
storageLabel: string | null;
|
||||
updatedAt: string;
|
||||
};
|
||||
export type UpdatePartnerDto = {
|
||||
inTimeline: boolean;
|
||||
@@ -1064,27 +1076,12 @@ export type TimeBucketResponseDto = {
|
||||
count: number;
|
||||
timeBucket: string;
|
||||
};
|
||||
export type CreateUserDto = {
|
||||
email: string;
|
||||
memoriesEnabled?: boolean;
|
||||
name: string;
|
||||
notify?: boolean;
|
||||
password: string;
|
||||
quotaSizeInBytes?: number | null;
|
||||
shouldChangePassword?: boolean;
|
||||
storageLabel?: string | null;
|
||||
};
|
||||
export type UpdateUserDto = {
|
||||
export type UserUpdateMeDto = {
|
||||
avatarColor?: UserAvatarColor;
|
||||
email?: string;
|
||||
id: string;
|
||||
isAdmin?: boolean;
|
||||
memoriesEnabled?: boolean;
|
||||
name?: string;
|
||||
password?: string;
|
||||
quotaSizeInBytes?: number | null;
|
||||
shouldChangePassword?: boolean;
|
||||
storageLabel?: string;
|
||||
};
|
||||
export type CreateProfileImageDto = {
|
||||
file: Blob;
|
||||
@@ -1093,9 +1090,6 @@ export type CreateProfileImageResponseDto = {
|
||||
profileImagePath: string;
|
||||
userId: string;
|
||||
};
|
||||
export type DeleteUserDto = {
|
||||
force?: boolean;
|
||||
};
|
||||
export function getActivities({ albumId, assetId, level, $type, userId }: {
|
||||
albumId: string;
|
||||
assetId?: string;
|
||||
@@ -1150,6 +1144,77 @@ export function deleteActivity({ id }: {
|
||||
method: "DELETE"
|
||||
}));
|
||||
}
|
||||
export function searchUsersAdmin({ withDeleted }: {
|
||||
withDeleted?: boolean;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: UserAdminResponseDto[];
|
||||
}>(`/admin/users${QS.query(QS.explode({
|
||||
withDeleted
|
||||
}))}`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
export function createUserAdmin({ userAdminCreateDto }: {
|
||||
userAdminCreateDto: UserAdminCreateDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 201;
|
||||
data: UserAdminResponseDto;
|
||||
}>("/admin/users", oazapfts.json({
|
||||
...opts,
|
||||
method: "POST",
|
||||
body: userAdminCreateDto
|
||||
})));
|
||||
}
|
||||
export function deleteUserAdmin({ id, userAdminDeleteDto }: {
|
||||
id: string;
|
||||
userAdminDeleteDto: UserAdminDeleteDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: UserAdminResponseDto;
|
||||
}>(`/admin/users/${encodeURIComponent(id)}`, oazapfts.json({
|
||||
...opts,
|
||||
method: "DELETE",
|
||||
body: userAdminDeleteDto
|
||||
})));
|
||||
}
|
||||
export function getUserAdmin({ id }: {
|
||||
id: string;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: UserAdminResponseDto;
|
||||
}>(`/admin/users/${encodeURIComponent(id)}`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
export function updateUserAdmin({ id, userAdminUpdateDto }: {
|
||||
id: string;
|
||||
userAdminUpdateDto: UserAdminUpdateDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: UserAdminResponseDto;
|
||||
}>(`/admin/users/${encodeURIComponent(id)}`, oazapfts.json({
|
||||
...opts,
|
||||
method: "PUT",
|
||||
body: userAdminUpdateDto
|
||||
})));
|
||||
}
|
||||
export function restoreUserAdmin({ id }: {
|
||||
id: string;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 201;
|
||||
data: UserAdminResponseDto;
|
||||
}>(`/admin/users/${encodeURIComponent(id)}/restore`, {
|
||||
...opts,
|
||||
method: "POST"
|
||||
}));
|
||||
}
|
||||
export function getAllAlbums({ assetId, shared }: {
|
||||
assetId?: string;
|
||||
shared?: boolean;
|
||||
@@ -1593,7 +1658,7 @@ export function signUpAdmin({ signUpDto }: {
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 201;
|
||||
data: UserResponseDto;
|
||||
data: UserAdminResponseDto;
|
||||
}>("/auth/admin-sign-up", oazapfts.json({
|
||||
...opts,
|
||||
method: "POST",
|
||||
@@ -1605,7 +1670,7 @@ export function changePassword({ changePasswordDto }: {
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: UserResponseDto;
|
||||
data: UserAdminResponseDto;
|
||||
}>("/auth/change-password", oazapfts.json({
|
||||
...opts,
|
||||
method: "POST",
|
||||
@@ -1949,7 +2014,7 @@ export function linkOAuthAccount({ oAuthCallbackDto }: {
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 201;
|
||||
data: UserResponseDto;
|
||||
data: UserAdminResponseDto;
|
||||
}>("/oauth/link", oazapfts.json({
|
||||
...opts,
|
||||
method: "POST",
|
||||
@@ -1964,7 +2029,7 @@ export function redirectOAuthToMobile(opts?: Oazapfts.RequestOpts) {
|
||||
export function unlinkOAuthAccount(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 201;
|
||||
data: UserResponseDto;
|
||||
data: UserAdminResponseDto;
|
||||
}>("/oauth/unlink", {
|
||||
...opts,
|
||||
method: "POST"
|
||||
@@ -2714,50 +2779,34 @@ export function restoreAssets({ bulkIdsDto }: {
|
||||
body: bulkIdsDto
|
||||
})));
|
||||
}
|
||||
export function getAllUsers({ isAll }: {
|
||||
isAll: boolean;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
export function searchUsers(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: UserResponseDto[];
|
||||
}>(`/users${QS.query(QS.explode({
|
||||
isAll
|
||||
}))}`, {
|
||||
}>("/users", {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
export function createUser({ createUserDto }: {
|
||||
createUserDto: CreateUserDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 201;
|
||||
data: UserResponseDto;
|
||||
}>("/users", oazapfts.json({
|
||||
...opts,
|
||||
method: "POST",
|
||||
body: createUserDto
|
||||
})));
|
||||
}
|
||||
export function updateUser({ updateUserDto }: {
|
||||
updateUserDto: UpdateUserDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
export function getMyUser(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: UserResponseDto;
|
||||
}>("/users", oazapfts.json({
|
||||
...opts,
|
||||
method: "PUT",
|
||||
body: updateUserDto
|
||||
})));
|
||||
}
|
||||
export function getMyUserInfo(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: UserResponseDto;
|
||||
data: UserAdminResponseDto;
|
||||
}>("/users/me", {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
export function updateMyUser({ userUpdateMeDto }: {
|
||||
userUpdateMeDto: UserUpdateMeDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: UserAdminResponseDto;
|
||||
}>("/users/me", oazapfts.json({
|
||||
...opts,
|
||||
method: "PUT",
|
||||
body: userUpdateMeDto
|
||||
})));
|
||||
}
|
||||
export function deleteProfileImage(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchText("/users/profile-image", {
|
||||
...opts,
|
||||
@@ -2776,20 +2825,7 @@ export function createProfileImage({ createProfileImageDto }: {
|
||||
body: createProfileImageDto
|
||||
})));
|
||||
}
|
||||
export function deleteUser({ id, deleteUserDto }: {
|
||||
id: string;
|
||||
deleteUserDto: DeleteUserDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: UserResponseDto;
|
||||
}>(`/users/${encodeURIComponent(id)}`, oazapfts.json({
|
||||
...opts,
|
||||
method: "DELETE",
|
||||
body: deleteUserDto
|
||||
})));
|
||||
}
|
||||
export function getUserById({ id }: {
|
||||
export function getUser({ id }: {
|
||||
id: string;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
@@ -2809,17 +2845,6 @@ export function getProfileImage({ id }: {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
export function restoreUser({ id }: {
|
||||
id: string;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 201;
|
||||
data: UserResponseDto;
|
||||
}>(`/users/${encodeURIComponent(id)}/restore`, {
|
||||
...opts,
|
||||
method: "POST"
|
||||
}));
|
||||
}
|
||||
export enum ReactionLevel {
|
||||
Album = "album",
|
||||
Asset = "asset"
|
||||
@@ -2844,15 +2869,15 @@ export enum UserAvatarColor {
|
||||
Gray = "gray",
|
||||
Amber = "amber"
|
||||
}
|
||||
export enum AlbumUserRole {
|
||||
Editor = "editor",
|
||||
Viewer = "viewer"
|
||||
}
|
||||
export enum UserStatus {
|
||||
Active = "active",
|
||||
Removing = "removing",
|
||||
Deleted = "deleted"
|
||||
}
|
||||
export enum AlbumUserRole {
|
||||
Editor = "editor",
|
||||
Viewer = "viewer"
|
||||
}
|
||||
export enum TagTypeEnum {
|
||||
Object = "OBJECT",
|
||||
Face = "FACE",
|
||||
|
||||
Reference in New Issue
Block a user