# org.swappulse.challenge

> Published by [bridge.swappulse.org](https://lexicon.garden/identity/did:plc:jwoatauidzr4lollmro2gh35)

## Description

A community challenge definition, mirrored to AT Protocol so challenges are discoverable across instances. Participation model is set by mode: collective, competitive, or guild.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:jwoatauidzr4lollmro2gh35/org.swappulse.challenge)
- [Documentation](https://lexicon.garden/lexicon/did:plc:jwoatauidzr4lollmro2gh35/org.swappulse.challenge/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:jwoatauidzr4lollmro2gh35/org.swappulse.challenge/examples)

## Definitions

### `org.swappulse.challenge`

**Type**: `record`

A community challenge.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `goal` | `object` | No |  |
| `mode` | `string` | No |  |
| `tags` | `array` | No |  |
| `rules` | `string` | No |  |
| `scope` | `string` | No |  |
| `title` | `string` | Yes |  |
| `endsAt` | `string` (datetime) | No |  |
| `reward` | `object` | No |  |
| `status` | `string` | Yes |  |
| `category` | `string` | No |  |
| `imageUrl` | `string` (uri) | No |  |
| `startsAt` | `string` (datetime) | No |  |
| `circleRef` | `string` (at-uri) | No |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `creatorDid` | `string` (did) | No |  |
| `winnerDids` | `array` | No |  |
| `budgetLimit` | `number` | No |  |
| `description` | `string` | No |  |
| `rewardBadge` | `string` | No |  |
| `votingEndsAt` | `string` (datetime) | No |  |
| `challengeType` | `string` | Yes |  |
| `guildApproved` | `boolean` | No |  |
| `publisherName` | `string` | No |  |
| `targetSetCode` | `string` | No |  |
| `leaderboardConfig` | `object` | No |  |

## Raw Schema

```json
{
  "id": "org.swappulse.challenge",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "challengeType",
          "title",
          "status",
          "createdAt"
        ],
        "properties": {
          "goal": {
            "type": "object",
            "properties": {
              "metric": {
                "type": "string"
              },
              "target": {
                "type": "integer"
              },
              "filters": {
                "type": "object"
              }
            }
          },
          "mode": {
            "type": "string",
            "knownValues": [
              "collective",
              "guild",
              "competitive"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxLength": 10
          },
          "rules": {
            "type": "string",
            "maxLength": 2000
          },
          "scope": {
            "type": "string",
            "knownValues": [
              "global",
              "circle"
            ]
          },
          "title": {
            "type": "string",
            "maxLength": 100
          },
          "endsAt": {
            "type": "string",
            "format": "datetime"
          },
          "reward": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "shared": {
                "type": "boolean"
              },
              "badgeId": {
                "type": "string"
              },
              "themeId": {
                "type": "string"
              }
            }
          },
          "status": {
            "type": "string",
            "knownValues": [
              "upcoming",
              "active",
              "voting",
              "completed",
              "cancelled"
            ]
          },
          "category": {
            "type": "string",
            "knownValues": [
              "helpful-trader",
              "accuracy-champion",
              "community-builder",
              "set-completer",
              "shiny-hunter",
              "journal-writer",
              "meetup-organiser"
            ]
          },
          "imageUrl": {
            "type": "string",
            "format": "uri"
          },
          "startsAt": {
            "type": "string",
            "format": "datetime"
          },
          "circleRef": {
            "type": "string",
            "format": "at-uri"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "creatorDid": {
            "type": "string",
            "format": "did"
          },
          "winnerDids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "did"
            }
          },
          "budgetLimit": {
            "type": "number"
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "rewardBadge": {
            "type": "string",
            "maxLength": 50
          },
          "votingEndsAt": {
            "type": "string",
            "format": "datetime"
          },
          "challengeType": {
            "type": "string",
            "knownValues": [
              "set_sprint",
              "budget_deck",
              "pull_of_week",
              "community_goal"
            ]
          },
          "guildApproved": {
            "type": "boolean"
          },
          "publisherName": {
            "type": "string"
          },
          "targetSetCode": {
            "type": "string"
          },
          "leaderboardConfig": {
            "type": "object"
          }
        }
      },
      "description": "A community challenge."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1,
  "description": "A community challenge definition, mirrored to AT Protocol so challenges are discoverable across instances. Participation model is set by mode: collective, competitive, or guild."
}
```
