{
"id": "com.atiproto.cart",
"defs": {
"main": {
"key": "any",
"type": "record",
"record": {
"type": "object",
"required": [
"items",
"currency",
"total",
"status",
"createdAt",
"expiresAt"
],
"properties": {
"items": {
"type": "array",
"items": {
"ref": "#cartItem",
"type": "ref"
}
},
"total": {
"type": "integer",
"description": "Total amount in cents"
},
"status": {
"enum": [
"open",
"completed",
"expired",
"abandoned"
],
"type": "string",
"maxLength": 64,
"description": "Cart status"
},
"currency": {
"type": "string",
"maxLength": 3,
"description": "ISO 4217 currency code"
},
"createdAt": {
"type": "string",
"format": "datetime",
"description": "Creation timestamp"
},
"expiresAt": {
"type": "string",
"format": "datetime",
"description": "Expiration timestamp"
},
"completedAt": {
"type": "string",
"format": "datetime",
"description": "Completion timestamp"
}
}
},
"description": "A record representing a shopping cart for tips/subscriptions"
},
"view": {
"type": "object",
"required": [
"uri",
"items",
"currency",
"total",
"status",
"createdAt",
"expiresAt"
],
"properties": {
"uri": {
"type": "string",
"format": "at-uri",
"description": "AT-URI of the cart record"
},
"items": {
"type": "array",
"items": {
"ref": "#cartItem",
"type": "ref"
}
},
"total": {
"type": "integer",
"description": "Total amount in cents"
},
"status": {
"enum": [
"open",
"completed",
"expired",
"abandoned"
],
"type": "string",
"maxLength": 64,
"description": "Cart status"
},
"currency": {
"type": "string",
"maxLength": 3,
"description": "ISO 4217 currency code"
},
"createdAt": {
"type": "string",
"format": "datetime",
"description": "Creation timestamp"
},
"expiresAt": {
"type": "string",
"format": "datetime",
"description": "Expiration timestamp"
},
"completedAt": {
"type": "string",
"format": "datetime",
"description": "Completion timestamp"
}
},
"description": "View of a cart record for use in API responses"
},
"cartItem": {
"type": "object",
"required": [
"type",
"recordUri"
],
"properties": {
"type": {
"enum": [
"com.atiproto.tip",
"com.atiproto.subscription"
],
"type": "string",
"maxLength": 128,
"description": "Item type: tip or subscription"
},
"recordUri": {
"type": "string",
"format": "at-uri",
"description": "AT-URI for tip on record"
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}