The provided JSON structure defines a detailed schema for user-team relationships, serving as a comprehensive data model for managing users within a system. Here's a breakdown of the key components:
-
Root Object:
- Type: "object"
- Description: Represents the membership of an authenticated User in relation to a Team.
-
Properties:
- uid: Unique identifier for the user, type string.
- entitlements: Object containing entitlement details.
- items: Array of objects, each with a "type" string and "entitlement" string.
- required: Array ["entitlement"], indicating necessary permissions.
- confirmed: Boolean to confirm user account status.
- confirmedAt: Timestamp (number) when confirmation occurred.
- accessRequestedAt: Timestamp (number) of access request.
- role: Object with role type and enum values (OWNER, MEMBER, etc.).
- teamId: String identifier for the team.
- createdAt and created: Timestamps for team creation.
-
Required Properties:
- Lists essential fields like limited, id, slug, name, avatar, membership, created, and createdAt, indicating basic team data in a limited form.
-
Descriptions:
- Provides context for fields like "created" (to be removed in v3) and "createdAt" (UNIX timestamp).