app.chronosky.plan.redeemTicket
Redeem a ticket code and assign a plan to the authenticated user
Details · procedure
| Kind | procedure |
|---|---|
| Authority | plan.chronosky.app |
| Indexed |
Checks
Valid Lint pass{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "Redeem a ticket code and assign a plan to the authenticated user",
"errors": [
{
"description": "Ticket code not found",
"name": "TicketNotFound"
},
{
"description": "Ticket has already been redeemed",
"name": "TicketAlreadyRedeemed"
},
{
"description": "Ticket has expired",
"name": "TicketExpired"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"code": {
"description": "Ticket redemption code",
"maxLength": 100,
"minLength": 1,
"type": "string"
}
},
"required": [
"code"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"assignment": {
"ref": "#redeemedAssignment",
"type": "ref"
},
"message": {
"description": "Success message",
"maxLength": 1000,
"type": "string"
}
},
"required": [
"assignment",
"message"
],
"type": "object"
}
},
"type": "procedure"
},
"redeemedAssignment": {
"description": "Redeemed plan assignment.",
"properties": {
"activatedAt": {
"description": "Plan activation timestamp",
"format": "datetime",
"maxLength": 100,
"type": "string"
},
"expiresAt": {
"description": "Plan expiration timestamp",
"format": "datetime",
"maxLength": 100,
"type": "string"
},
"id": {
"description": "Plan assignment ID",
"maxLength": 100,
"type": "string"
},
"planId": {
"description": "Plan ID",
"maxLength": 100,
"type": "string"
},
"status": {
"description": "Plan assignment status",
"enum": [
"ACTIVE",
"EXPIRED",
"CANCELLED"
],
"maxLength": 20,
"type": "string"
}
},
"required": [
"id",
"planId",
"activatedAt",
"expiresAt",
"status"
],
"type": "object"
}
},
"id": "app.chronosky.plan.redeemTicket",
"lexicon": 1
}