diff options
author | Kate <26026535+provokateurin@users.noreply.github.com> | 2024-05-11 16:27:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-11 16:27:13 +0200 |
commit | b0429e7ef48b261f91786f3d0b011e57c8736ac1 (patch) | |
tree | 477c262a4f0664c1cff5074c7b3edfd623802efc /apps | |
parent | 4dc73b3354946e065ea72b8d2554038d3fea699d (diff) | |
parent | aff7798fc1d22302c1ab920c81b4f4b8613f3289 (diff) | |
download | nextcloud-server-b0429e7ef48b261f91786f3d0b011e57c8736ac1.tar.gz nextcloud-server-b0429e7ef48b261f91786f3d0b011e57c8736ac1.zip |
Merge pull request #45270 from nextcloud/refactor/provisioning_api/type-scopes
Diffstat (limited to 'apps')
-rw-r--r-- | apps/provisioning_api/lib/ResponseDefinitions.php | 30 | ||||
-rw-r--r-- | apps/provisioning_api/openapi-full.json | 40 | ||||
-rw-r--r-- | apps/provisioning_api/openapi.json | 40 |
3 files changed, 68 insertions, 42 deletions
diff --git a/apps/provisioning_api/lib/ResponseDefinitions.php b/apps/provisioning_api/lib/ResponseDefinitions.php index 07777f1f35f..9912fbe586a 100644 --- a/apps/provisioning_api/lib/ResponseDefinitions.php +++ b/apps/provisioning_api/lib/ResponseDefinitions.php @@ -35,30 +35,32 @@ namespace OCA\Provisioning_API; * used?: float|int, * } * + * @psalm-type Provisioning_APIUserDetailsScope = 'v2-private'|'v2-local'|'v2-federated'|'v2-published'|'private'|'contacts'|'public' + * * @psalm-type Provisioning_APIUserDetails = array{ * additional_mail: string[], - * additional_mailScope?: string[], + * additional_mailScope?: Provisioning_APIUserDetailsScope[], * address: string, - * addressScope?: string, - * avatarScope?: string, + * addressScope?: Provisioning_APIUserDetailsScope, + * avatarScope?: Provisioning_APIUserDetailsScope, * backend: string, * backendCapabilities: array{ * setDisplayName: bool, * setPassword: bool * }, * biography: string, - * biographyScope?: string, + * biographyScope?: Provisioning_APIUserDetailsScope, * display-name: string, * displayname: string, - * displaynameScope?: string, + * displaynameScope?: Provisioning_APIUserDetailsScope, * email: ?string, - * emailScope?: string, + * emailScope?: Provisioning_APIUserDetailsScope, * enabled?: bool, * fediverse: string, - * fediverseScope?: string, + * fediverseScope?: Provisioning_APIUserDetailsScope, * groups: string[], * headline: string, - * headlineScope?: string, + * headlineScope?: Provisioning_APIUserDetailsScope, * id: string, * language: string, * lastLogin: int, @@ -66,20 +68,20 @@ namespace OCA\Provisioning_API; * manager: string, * notify_email: ?string, * organisation: string, - * organisationScope?: string, + * organisationScope?: Provisioning_APIUserDetailsScope, * phone: string, - * phoneScope?: string, + * phoneScope?: Provisioning_APIUserDetailsScope, * profile_enabled: string, - * profile_enabledScope?: string, + * profile_enabledScope?: Provisioning_APIUserDetailsScope, * quota: Provisioning_APIUserDetailsQuota, * role: string, - * roleScope?: string, + * roleScope?: Provisioning_APIUserDetailsScope, * storageLocation?: string, * subadmin: string[], * twitter: string, - * twitterScope?: string, + * twitterScope?: Provisioning_APIUserDetailsScope, * website: string, - * websiteScope?: string, + * websiteScope?: Provisioning_APIUserDetailsScope, * } * * @psalm-type Provisioning_APIGroupDetails = array{ diff --git a/apps/provisioning_api/openapi-full.json b/apps/provisioning_api/openapi-full.json index 522375a966b..2b219416c8d 100644 --- a/apps/provisioning_api/openapi-full.json +++ b/apps/provisioning_api/openapi-full.json @@ -162,17 +162,17 @@ "additional_mailScope": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" } }, "address": { "type": "string" }, "addressScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "avatarScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "backend": { "type": "string" @@ -196,7 +196,7 @@ "type": "string" }, "biographyScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "display-name": { "type": "string" @@ -205,14 +205,14 @@ "type": "string" }, "displaynameScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "email": { "type": "string", "nullable": true }, "emailScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "enabled": { "type": "boolean" @@ -221,7 +221,7 @@ "type": "string" }, "fediverseScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "groups": { "type": "array", @@ -233,7 +233,7 @@ "type": "string" }, "headlineScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "id": { "type": "string" @@ -259,19 +259,19 @@ "type": "string" }, "organisationScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "phone": { "type": "string" }, "phoneScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "profile_enabled": { "type": "string" }, "profile_enabledScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "quota": { "$ref": "#/components/schemas/UserDetailsQuota" @@ -280,7 +280,7 @@ "type": "string" }, "roleScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "storageLocation": { "type": "string" @@ -295,13 +295,13 @@ "type": "string" }, "twitterScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "website": { "type": "string" }, "websiteScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" } } }, @@ -372,6 +372,18 @@ ] } } + }, + "UserDetailsScope": { + "type": "string", + "enum": [ + "v2-private", + "v2-local", + "v2-federated", + "v2-published", + "private", + "contacts", + "public" + ] } } }, diff --git a/apps/provisioning_api/openapi.json b/apps/provisioning_api/openapi.json index 3119a813832..ee48da07658 100644 --- a/apps/provisioning_api/openapi.json +++ b/apps/provisioning_api/openapi.json @@ -162,17 +162,17 @@ "additional_mailScope": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" } }, "address": { "type": "string" }, "addressScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "avatarScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "backend": { "type": "string" @@ -196,7 +196,7 @@ "type": "string" }, "biographyScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "display-name": { "type": "string" @@ -205,14 +205,14 @@ "type": "string" }, "displaynameScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "email": { "type": "string", "nullable": true }, "emailScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "enabled": { "type": "boolean" @@ -221,7 +221,7 @@ "type": "string" }, "fediverseScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "groups": { "type": "array", @@ -233,7 +233,7 @@ "type": "string" }, "headlineScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "id": { "type": "string" @@ -259,19 +259,19 @@ "type": "string" }, "organisationScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "phone": { "type": "string" }, "phoneScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "profile_enabled": { "type": "string" }, "profile_enabledScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "quota": { "$ref": "#/components/schemas/UserDetailsQuota" @@ -280,7 +280,7 @@ "type": "string" }, "roleScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "storageLocation": { "type": "string" @@ -295,13 +295,13 @@ "type": "string" }, "twitterScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" }, "website": { "type": "string" }, "websiteScope": { - "type": "string" + "$ref": "#/components/schemas/UserDetailsScope" } } }, @@ -372,6 +372,18 @@ ] } } + }, + "UserDetailsScope": { + "type": "string", + "enum": [ + "v2-private", + "v2-local", + "v2-federated", + "v2-published", + "private", + "contacts", + "public" + ] } } }, |