# com.livtet.giveaway.event

> An author's giveaway for one catalogue edition. Entry is a separate com.livtet.giveaway.entry record in each entrant's own repo.

- Kind: record
- Record key: tid
- Authority: giveaway.livtet.com
- Lexicon: 1
- Published by [biblio.livtet.com](https://lexicon.garden/identity/did:plc:e2x3ihw2ntxt7pcgzmtu3abi), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/com.livtet.giveaway.event)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/com.livtet.giveaway.event/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/com.livtet.giveaway.event/analytics)

## Record (`com.livtet.giveaway.event`)

Type: record · key tid

### Properties

- `closesAt` (string · datetime, required)
- `closingNote` (string)
  - Constraints: maxLength: 500
- `countries` (array, required): ISO-3166 alpha-2 codes this giveaway is open to. The single value `*` means worldwide.
  - Constraints: maxLength: 250
  - `items` (string)
    - Constraints: minLength: 1, maxLength: 2
- `coverUrl` (string · uri)
- `createdAt` (string · datetime, required)
- `edition` (string · at-uri, required): The edition being given away. A plain at-uri rather than a strongRef: the giveaway follows the edition, it does not pin one revision of it.
- `opensAt` (string · datetime, required)
- `prizeQuantity` (integer, required)
  - Constraints: minimum: 1, maximum: 250
- `prizeType` (string, required)
  - Constraints: knownValues: print | digital | audio
- `rulesText` (string, required)
  - Constraints: maxLength: 4000
- `title` (string, required)
  - Constraints: maxLength: 200

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "An author's giveaway for one catalogue edition. Entry is a separate com.livtet.giveaway.entry record in each entrant's own repo.",
      "key": "tid",
      "record": {
        "properties": {
          "closesAt": {
            "format": "datetime",
            "type": "string"
          },
          "closingNote": {
            "maxLength": 500,
            "type": "string"
          },
          "countries": {
            "description": "ISO-3166 alpha-2 codes this giveaway is open to. The single value `*` means worldwide.",
            "items": {
              "maxLength": 2,
              "minLength": 1,
              "type": "string"
            },
            "maxLength": 250,
            "type": "array"
          },
          "coverUrl": {
            "format": "uri",
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "edition": {
            "description": "The edition being given away. A plain at-uri rather than a strongRef: the giveaway follows the edition, it does not pin one revision of it.",
            "format": "at-uri",
            "type": "string"
          },
          "opensAt": {
            "format": "datetime",
            "type": "string"
          },
          "prizeQuantity": {
            "maximum": 250,
            "minimum": 1,
            "type": "integer"
          },
          "prizeType": {
            "knownValues": [
              "print",
              "digital",
              "audio"
            ],
            "type": "string"
          },
          "rulesText": {
            "maxLength": 4000,
            "type": "string"
          },
          "title": {
            "maxLength": 200,
            "type": "string"
          }
        },
        "required": [
          "edition",
          "title",
          "prizeType",
          "prizeQuantity",
          "countries",
          "rulesText",
          "opensAt",
          "closesAt",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "com.livtet.giveaway.event",
  "lexicon": 1
}
```
