feat: v2 membership attributes (#21131)

* refactor: getByUserId.handler.ts

* feat: return org membership attributes

* docs

* export new library function

* test: attributes

* chore: bump libraries

* refactor: value -> option
This commit is contained in:
Lauris Skraucis authored and GitHub committed 2025-05-08 23:37:24 +01:00
1 parent ae2d85d81b
commit dddbd7dad4
20 files changed
+4258 -136

No files matched your search

+203 -7
View File
@@ -18260,6 +18260,143 @@
"type": "object",
"properties": {}
},
"BaseAttribute": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
]
},
"TextAttribute": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"value": {
"type": "string"
},
"valueId": {
"type": "string"
}
},
"required": [
"id",
"name",
"type",
"value",
"valueId"
]
},
"NumberAttribute": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"value": {
"type": "number"
},
"valueId": {
"type": "string"
}
},
"required": [
"id",
"name",
"type",
"value",
"valueId"
]
},
"SingleSelectAttribute": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"value": {
"type": "string"
},
"valueId": {
"type": "string"
}
},
"required": [
"id",
"name",
"type",
"value",
"valueId"
]
},
"MultiSelectAttributeValue": {
"type": "object",
"properties": {
"valueId": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"valueId",
"value"
]
},
"MultiSelectAttribute": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"values": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MultiSelectAttributeValue"
}
}
},
"required": [
"id",
"name",
"type",
"values"
]
},
"MembershipUserOutputDto": {
"type": "object",
"properties": {
@@ -18289,7 +18426,7 @@
"email"
]
},
"TeamMembershipOutput": {
"OrganizationMembershipOutput": {
"type": "object",
"properties": {
"id": {
@@ -18317,6 +18454,25 @@
},
"user": {
"$ref": "#/components/schemas/MembershipUserOutputDto"
},
"attributes": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/TextAttribute"
},
{
"$ref": "#/components/schemas/NumberAttribute"
},
{
"$ref": "#/components/schemas/SingleSelectAttribute"
},
{
"$ref": "#/components/schemas/MultiSelectAttribute"
}
]
}
}
},
"required": [
@@ -18325,7 +18481,8 @@
"teamId",
"accepted",
"role",
"user"
"user",
"attributes"
]
},
"GetAllOrgMemberships": {
@@ -18340,7 +18497,7 @@
]
},
"data": {
"$ref": "#/components/schemas/TeamMembershipOutput"
"$ref": "#/components/schemas/OrganizationMembershipOutput"
}
},
"required": [
@@ -18390,7 +18547,7 @@
]
},
"data": {
"$ref": "#/components/schemas/TeamMembershipOutput"
"$ref": "#/components/schemas/OrganizationMembershipOutput"
}
},
"required": [
@@ -18410,7 +18567,7 @@
]
},
"data": {
"$ref": "#/components/schemas/TeamMembershipOutput"
"$ref": "#/components/schemas/OrganizationMembershipOutput"
}
},
"required": [
@@ -18430,7 +18587,7 @@
]
},
"data": {
"$ref": "#/components/schemas/TeamMembershipOutput"
"$ref": "#/components/schemas/OrganizationMembershipOutput"
}
},
"required": [
@@ -18469,7 +18626,7 @@
]
},
"data": {
"$ref": "#/components/schemas/TeamMembershipOutput"
"$ref": "#/components/schemas/OrganizationMembershipOutput"
}
},
"required": [
@@ -19692,6 +19849,45 @@
"data"
]
},
"TeamMembershipOutput": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"userId": {
"type": "number"
},
"teamId": {
"type": "number"
},
"accepted": {
"type": "boolean"
},
"role": {
"type": "string",
"enum": [
"MEMBER",
"OWNER",
"ADMIN"
]
},
"disableImpersonation": {
"type": "boolean"
},
"user": {
"$ref": "#/components/schemas/MembershipUserOutputDto"
}
},
"required": [
"id",
"userId",
"teamId",
"accepted",
"role",
"user"
]
},
"OrgTeamMembershipsOutputResponseDto": {
"type": "object",
"properties": {