chore: add user profile to org user endpoints apiv2 (#18039)

This commit is contained in:
Morgan authored and GitHub committed 2024-12-09 10:21:28 +02:00
1 parent be3e580107
commit 3b1123a29a
6 files changed
+210 -62

No files matched your search

+41 -24
View File
@@ -2421,7 +2421,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetOrganizationUsersOutput"
"$ref": "#/components/schemas/GetOrganizationUsersResponseDTO"
}
}
}
@@ -3960,15 +3960,6 @@
"type": "string"
}
},
{
"name": "eventTypeId",
"required": false,
"in": "query",
"description": "Id of the event-type, if this is provided no other parameter is required",
"schema": {
"type": "number"
}
},
{
"name": "usernames",
"required": false,
@@ -3978,15 +3969,6 @@
"type": "string"
}
},
{
"name": "userId",
"required": false,
"in": "query",
"description": "ID of the user you want the get the event-types of, username is not needed when using this parameter",
"schema": {
"type": "number"
}
},
{
"name": "orgSlug",
"required": false,
@@ -8942,7 +8924,34 @@
},
"required": ["status"]
},
"GetUserOutput": {
"ProfileOutput": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The ID of the profile of user",
"example": 1
},
"organizationId": {
"type": "number",
"description": "The ID of the organization of user",
"example": 1
},
"userId": {
"type": "number",
"description": "The IDof the user",
"example": 1
},
"username": {
"type": "string",
"nullable": true,
"description": "The username of the user within the organization context",
"example": "john_doe"
}
},
"required": ["id", "organizationId", "userId"]
},
"GetOrgUsersWithProfileOutput": {
"type": "object",
"properties": {
"id": {
@@ -9066,11 +9075,19 @@
"nullable": true,
"description": "The ID of the user who invited this user",
"example": 1
},
"profile": {
"description": "organization user profile, contains user data within the organizaton context",
"allOf": [
{
"$ref": "#/components/schemas/ProfileOutput"
}
]
}
},
"required": ["id", "email", "timeZone", "weekStart", "hideBranding", "createdDate"]
"required": ["id", "email", "timeZone", "weekStart", "hideBranding", "createdDate", "profile"]
},
"GetOrganizationUsersOutput": {
"GetOrganizationUsersResponseDTO": {
"type": "object",
"properties": {
"status": {
@@ -9081,7 +9098,7 @@
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GetUserOutput"
"$ref": "#/components/schemas/GetOrgUsersWithProfileOutput"
}
}
},
@@ -9180,7 +9197,7 @@
"enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/GetUserOutput"
"$ref": "#/components/schemas/GetOrgUsersWithProfileOutput"
}
},
"required": ["status", "data"]