# app.studynext.studyTeam

> Owner-authored study-team configuration stored in the owner's PDS. The record is publicly readable; invitedDids and membership rules are application data, not repository access control.

- Kind: record
- Record key: tid
- 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.studyTeam)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:nstib2qjcu3tyun7cxz4dxcm/app.studynext.studyTeam/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:nstib2qjcu3tyun7cxz4dxcm/app.studynext.studyTeam/analytics)

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

Type: record · key tid

### Properties

- `bannedDids` (array)
  - Constraints: maxLength: 500
  - `items` (string · did)
- `createdAt` (string · datetime, required)
- `description` (string)
  - Constraints: maxLength: 1120
- `goal` (ref)
  - Reference: `#goal`
- `goalDays` (integer, required)
  - Constraints: minimum: 1, maximum: 7
- `inviteRevision` (string)
  - Constraints: minLength: 16, maxLength: 80
- `invitedDids` (array, required)
  - Constraints: minLength: 1, maxLength: 20
  - `items` (string · did)
- `kind` (string, required)
  - Constraints: knownValues: pair | group
- `memberRevisions` (unknown): Map from member DID to the current nonnegative membership revision.
- `mode` (string)
  - Constraints: knownValues: cooperation | competition
- `name` (string, required)
  - Constraints: minLength: 1, maxLength: 240
- `removedRevision` (unknown): Map from removed member DID to the revision marker used to reject stale memberships.
- `updatedAt` (string · datetime, required)
- `version` (integer, required)
  - Constraints: minimum: 1, maximum: 1

## #goal (`app.studynext.studyTeam#goal`)

Type: object

### Properties

- `completion` (string)
  - Constraints: knownValues: daily
- `metric` (string, required)
  - Constraints: knownValues: days | minutes | tasks | streak
- `target` (integer, required)
  - Constraints: minimum: 1, maximum: 10080

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "goal": {
      "properties": {
        "completion": {
          "knownValues": [
            "daily"
          ],
          "type": "string"
        },
        "metric": {
          "knownValues": [
            "days",
            "minutes",
            "tasks",
            "streak"
          ],
          "type": "string"
        },
        "target": {
          "maximum": 10080,
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "metric",
        "target"
      ],
      "type": "object"
    },
    "main": {
      "description": "Owner-authored study-team configuration stored in the owner's PDS. The record is publicly readable; invitedDids and membership rules are application data, not repository access control.",
      "key": "tid",
      "record": {
        "properties": {
          "bannedDids": {
            "items": {
              "format": "did",
              "type": "string"
            },
            "maxLength": 500,
            "type": "array"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "maxLength": 1120,
            "type": "string"
          },
          "goal": {
            "ref": "#goal",
            "type": "ref"
          },
          "goalDays": {
            "maximum": 7,
            "minimum": 1,
            "type": "integer"
          },
          "inviteRevision": {
            "maxLength": 80,
            "minLength": 16,
            "type": "string"
          },
          "invitedDids": {
            "items": {
              "format": "did",
              "type": "string"
            },
            "maxLength": 20,
            "minLength": 1,
            "type": "array"
          },
          "kind": {
            "knownValues": [
              "pair",
              "group"
            ],
            "type": "string"
          },
          "memberRevisions": {
            "description": "Map from member DID to the current nonnegative membership revision.",
            "type": "unknown"
          },
          "mode": {
            "knownValues": [
              "cooperation",
              "competition"
            ],
            "type": "string"
          },
          "name": {
            "maxLength": 240,
            "minLength": 1,
            "type": "string"
          },
          "removedRevision": {
            "description": "Map from removed member DID to the revision marker used to reject stale memberships.",
            "type": "unknown"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          },
          "version": {
            "maximum": 1,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "version",
          "name",
          "kind",
          "goalDays",
          "invitedDids",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "app.studynext.studyTeam",
  "lexicon": 1
}
```
