fix(files_sharing): Fix sharee search result types

Signed-off-by: provokateurin <kate@provokateurin.de>
pull/50052/head
provokateurin 2025-01-06 12:47:57 +07:00
parent 9f59204148
commit 90c608bdc7
No known key found for this signature in database
2 changed files with 56 additions and 19 deletions

@ -99,7 +99,6 @@ namespace OCA\Files_Sharing;
* }
*
* @psalm-type Files_SharingSharee = array{
* count: int|null,
* label: string,
* }
*
@ -108,6 +107,14 @@ namespace OCA\Files_Sharing;
* shareWith: string,
* }
*
* @psalm-type Files_SharingShareeGroup = Files_SharingSharee&array{
* value: Files_SharingShareeValue,
* }
*
* @psalm-type Files_SharingShareeRoom = Files_SharingSharee&array{
* value: Files_SharingShareeValue,
* }
*
* @psalm-type Files_SharingShareeUser = Files_SharingSharee&array{
* subline: string,
* icon: string,
@ -180,19 +187,19 @@ namespace OCA\Files_Sharing;
* exact: array{
* circles: list<Files_SharingShareeCircle>,
* emails: list<Files_SharingShareeEmail>,
* groups: list<Files_SharingSharee>,
* groups: list<Files_SharingShareeGroup>,
* remote_groups: list<Files_SharingShareeRemoteGroup>,
* remotes: list<Files_SharingShareeRemote>,
* rooms: list<Files_SharingSharee>,
* rooms: list<Files_SharingShareeRoom>,
* users: list<Files_SharingShareeUser>,
* },
* circles: list<Files_SharingShareeCircle>,
* emails: list<Files_SharingShareeEmail>,
* groups: list<Files_SharingSharee>,
* groups: list<Files_SharingShareeGroup>,
* lookup: list<Files_SharingShareeLookup>,
* remote_groups: list<Files_SharingShareeRemoteGroup>,
* remotes: list<Files_SharingShareeRemote>,
* rooms: list<Files_SharingSharee>,
* rooms: list<Files_SharingShareeRoom>,
* users: list<Files_SharingShareeUser>,
* lookupEnabled: bool,
* }
@ -200,13 +207,13 @@ namespace OCA\Files_Sharing;
* @psalm-type Files_SharingShareesRecommendedResult = array{
* exact: array{
* emails: list<Files_SharingShareeEmail>,
* groups: list<Files_SharingSharee>,
* groups: list<Files_SharingShareeGroup>,
* remote_groups: list<Files_SharingShareeRemoteGroup>,
* remotes: list<Files_SharingShareeRemote>,
* users: list<Files_SharingShareeUser>,
* },
* emails: list<Files_SharingShareeEmail>,
* groups: list<Files_SharingSharee>,
* groups: list<Files_SharingShareeGroup>,
* remote_groups: list<Files_SharingShareeRemoteGroup>,
* remotes: list<Files_SharingShareeRemote>,
* users: list<Files_SharingShareeUser>,

@ -766,15 +766,9 @@
"Sharee": {
"type": "object",
"required": [
"count",
"label"
],
"properties": {
"count": {
"type": "integer",
"format": "int64",
"nullable": true
},
"label": {
"type": "string"
}
@ -851,6 +845,24 @@
}
]
},
"ShareeGroup": {
"allOf": [
{
"$ref": "#/components/schemas/Sharee"
},
{
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"$ref": "#/components/schemas/ShareeValue"
}
}
}
]
},
"ShareeLookup": {
"allOf": [
{
@ -1027,6 +1039,24 @@
}
]
},
"ShareeRoom": {
"allOf": [
{
"$ref": "#/components/schemas/Sharee"
},
{
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"$ref": "#/components/schemas/ShareeValue"
}
}
}
]
},
"ShareeUser": {
"allOf": [
{
@ -1129,7 +1159,7 @@
"groups": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Sharee"
"$ref": "#/components/schemas/ShareeGroup"
}
},
"remote_groups": {
@ -1161,7 +1191,7 @@
"groups": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Sharee"
"$ref": "#/components/schemas/ShareeGroup"
}
},
"remote_groups": {
@ -1226,7 +1256,7 @@
"groups": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Sharee"
"$ref": "#/components/schemas/ShareeGroup"
}
},
"remote_groups": {
@ -1244,7 +1274,7 @@
"rooms": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Sharee"
"$ref": "#/components/schemas/ShareeRoom"
}
},
"users": {
@ -1270,7 +1300,7 @@
"groups": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Sharee"
"$ref": "#/components/schemas/ShareeGroup"
}
},
"lookup": {
@ -1294,7 +1324,7 @@
"rooms": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Sharee"
"$ref": "#/components/schemas/ShareeRoom"
}
},
"users": {