# ai.newnal.mydata.resourcesMemberships

> Memberships and loyalty programmes the user holds, with their member number, tier and validity: frequent flyer and hotel programmes, retail and service memberships, professional and library memberships. Paid subscriptions to a service are kept in resources.subscriptions, and communities the user takes part in are kept in relationships.communities.

- Kind: record
- Record key: tid
- Authority: mydata.newnal.ai
- Lexicon: 1
- Published by [newnal-platform.newnal.id](https://lexicon.garden/identity/did:plc:vciktevzoffubdvdaajz2yp3), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:vciktevzoffubdvdaajz2yp3/ai.newnal.mydata.resourcesMemberships)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:vciktevzoffubdvdaajz2yp3/ai.newnal.mydata.resourcesMemberships/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:vciktevzoffubdvdaajz2yp3/ai.newnal.mydata.resourcesMemberships/analytics)

## Record (`ai.newnal.mydata.resourcesMemberships`)

Type: record · key tid

### Properties

- `_meta` (ref, required)
  - Reference: `ai.newnal.mydata.defs#recordMeta`
- `data` (union, required)
  - One of (closed): `#entry`

## #entry (`ai.newnal.mydata.resourcesMemberships#entry`)

Type: object

One membership.

### Properties

- `category` (string): The kind of membership.
  - Constraints: maxLength: 640, maxGraphemes: 64, knownValues: frequent_flyer | hotel_program | retail_membership | loyalty_program | professional_membership | library | gym | other
- `memberId` (string): The member number or identifier.
  - Constraints: maxLength: 2560, maxGraphemes: 256
- `name` (string): The name of the membership or programme.
  - Constraints: maxLength: 2560, maxGraphemes: 256
- `notes` (string): An additional note.
  - Constraints: maxLength: 30000, maxGraphemes: 3000
- `provider` (string): The organization that runs the membership or programme.
  - Constraints: maxLength: 2560, maxGraphemes: 256
- `status` (string): The status of the membership.
  - Constraints: maxLength: 640, maxGraphemes: 64, knownValues: active | expired | paused
- `tier` (string): The membership tier or level.
  - Constraints: maxLength: 2560, maxGraphemes: 256
- `time` (union): The period the membership is valid, or the point in time it started.
  - One of (closed): `ai.newnal.mydata.defs#instantTime`, `ai.newnal.mydata.defs#intervalTime`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "entry": {
      "description": "One membership.",
      "properties": {
        "category": {
          "description": "The kind of membership.",
          "knownValues": [
            "frequent_flyer",
            "hotel_program",
            "retail_membership",
            "loyalty_program",
            "professional_membership",
            "library",
            "gym",
            "other"
          ],
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "memberId": {
          "description": "The member number or identifier.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "name": {
          "description": "The name of the membership or programme.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "notes": {
          "description": "An additional note.",
          "maxGraphemes": 3000,
          "maxLength": 30000,
          "type": "string"
        },
        "provider": {
          "description": "The organization that runs the membership or programme.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "status": {
          "description": "The status of the membership.",
          "knownValues": [
            "active",
            "expired",
            "paused"
          ],
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "tier": {
          "description": "The membership tier or level.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "time": {
          "closed": true,
          "description": "The period the membership is valid, or the point in time it started.",
          "refs": [
            "ai.newnal.mydata.defs#instantTime",
            "ai.newnal.mydata.defs#intervalTime"
          ],
          "type": "union"
        }
      },
      "type": "object"
    },
    "main": {
      "description": "Memberships and loyalty programmes the user holds, with their member number, tier and validity: frequent flyer and hotel programmes, retail and service memberships, professional and library memberships. Paid subscriptions to a service are kept in resources.subscriptions, and communities the user takes part in are kept in relationships.communities.",
      "key": "tid",
      "record": {
        "properties": {
          "_meta": {
            "ref": "ai.newnal.mydata.defs#recordMeta",
            "type": "ref"
          },
          "data": {
            "closed": true,
            "refs": [
              "#entry"
            ],
            "type": "union"
          }
        },
        "required": [
          "data",
          "_meta"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "ai.newnal.mydata.resourcesMemberships",
  "lexicon": 1
}
```
