# app.studynext.teamMembership

> A member's participation and sharing preferences for a study team. One record per membership in the member's PDS; new writes use a TID rkey, while pre-TID legacy keys remain readable. PDS records are public; shareProgress/shareTotals are application-level consent, not access control.

- Kind: record
- Record key: any
- Authority: studynext.app
- Lexicon: 1
- Published by [studynext.app](https://lexicon.garden/identity/did:plc:nstib2qjcu3tyun7cxz4dxcm), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:nstib2qjcu3tyun7cxz4dxcm/app.studynext.teamMembership)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:nstib2qjcu3tyun7cxz4dxcm/app.studynext.teamMembership/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:nstib2qjcu3tyun7cxz4dxcm/app.studynext.teamMembership/analytics)

## Record (`app.studynext.teamMembership`)

Type: record · key any

### Properties

- `active` (boolean, required)
- `admissionId` (string)
  - Constraints: minLength: 16, maxLength: 80
- `goal` (ref)
  - Reference: `app.studynext.studyTeam#goal`
- `goalDays` (integer, required)
  - Constraints: minimum: 1, maximum: 7
- `inviteRevision` (string)
  - Constraints: minLength: 16, maxLength: 80
- `joinedAt` (string · datetime, required)
- `memberRevision` (integer)
  - Constraints: minimum: 0
- `shareProgress` (boolean, required): Application-level consent to share progress with this team; it cannot make the PDS record private.
- `shareTotals` (boolean): Application-level consent to share time/task totals. Absent in older records; consumers should treat it as false.
- `teamUri` (string · at-uri, required): AT-URI of the owner's app.studynext.studyTeam record.
- `updatedAt` (string · datetime, required)
- `version` (integer, required)
  - Constraints: minimum: 1, maximum: 1

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A member's participation and sharing preferences for a study team. One record per membership in the member's PDS; new writes use a TID rkey, while pre-TID legacy keys remain readable. PDS records are public; shareProgress/shareTotals are application-level consent, not access control.",
      "key": "any",
      "record": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "admissionId": {
            "maxLength": 80,
            "minLength": 16,
            "type": "string"
          },
          "goal": {
            "ref": "app.studynext.studyTeam#goal",
            "type": "ref"
          },
          "goalDays": {
            "maximum": 7,
            "minimum": 1,
            "type": "integer"
          },
          "inviteRevision": {
            "maxLength": 80,
            "minLength": 16,
            "type": "string"
          },
          "joinedAt": {
            "format": "datetime",
            "type": "string"
          },
          "memberRevision": {
            "minimum": 0,
            "type": "integer"
          },
          "shareProgress": {
            "description": "Application-level consent to share progress with this team; it cannot make the PDS record private.",
            "type": "boolean"
          },
          "shareTotals": {
            "description": "Application-level consent to share time/task totals. Absent in older records; consumers should treat it as false.",
            "type": "boolean"
          },
          "teamUri": {
            "description": "AT-URI of the owner's app.studynext.studyTeam record.",
            "format": "at-uri",
            "type": "string"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          },
          "version": {
            "maximum": 1,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "version",
          "teamUri",
          "active",
          "shareProgress",
          "goalDays",
          "joinedAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "app.studynext.teamMembership",
  "lexicon": 1
}
```
