com.atiproto.subscription
Schema Diff
+5 -0
Compatibility Analysis
Backward Compatible
Backward compatible. 2 non-breaking changes.
Non-Breaking Changes (2)
- AddedVertex AddedVertex { vertex_id: "com.atiproto.subscription#view.renewalDate" }
- AddedEdge AddedEdge { src: "com.atiproto.subscription#view", tgt: "com.atiproto.subscription#view.renewalDate", kind: "prop", name: Some("renewalDate") }
Migration Guidance
Added Elements
AddedVertex { vertex_id: "com.atiproto.subscription#view.renewalDate" }
Additional Notes
- Non-breaking: AddedEdge { src: "com.atiproto.subscription#view", tgt: "com.atiproto.subscription#view.renewalDate", kind: "prop", name: Some("renewalDate") }
1
1
{
2
2
"$type": "com.atproto.lexicon.schema",
3
3
"defs": {
4
4
"main": {
5
5
"description": "A record representing a subscription from one user to another",
6
6
"key": "any",
7
7
"record": {
8
8
"properties": {
9
9
"accessUntil": {
10
10
"description": "Date until which the subscriber retains access after cancellation",
11
11
"format": "datetime",
12
12
"type": "string"
13
13
},
14
14
"amount": {
15
15
"description": "Subscription amount in cents (0 for free subscriptions)",
16
16
"minimum": 0,
17
17
"type": "integer"
18
18
},
19
19
"billingStartDate": {
20
20
"description": "First billing period, can be used to determine recurrence",
21
21
"format": "datetime",
22
22
"type": "string"
23
23
},
24
24
"cancelledAt": {
25
25
"description": "Cancellation timestamp",
26
26
"format": "datetime",
27
27
"type": "string"
28
28
},
29
29
"createdAt": {
30
30
"description": "Creation timestamp",
31
31
"format": "datetime",
32
32
"type": "string"
33
33
},
34
34
"currency": {
35
35
"description": "ISO 4217 currency code",
36
36
"maxLength": 3,
37
37
"type": "string"
38
38
},
39
39
"interval": {
40
40
"description": "Billing interval",
41
41
"enum": [
42
42
"monthly",
43
43
"yearly"
44
44
],
45
45
"maxLength": 64,
46
46
"type": "string"
47
47
},
48
48
"status": {
49
49
"description": "Subscription status",
50
50
"enum": [
51
51
"pending",
52
52
"active",
53
53
"past_due",
54
54
"cancelled",
55
55
"expired"
56
56
],
57
57
"maxLength": 64,
58
58
"type": "string"
59
59
},
60
60
"subject": {
61
61
"description": "DID of the user being subscribed to",
62
62
"format": "did",
63
63
"type": "string"
64
64
}
65
65
},
66
66
"required": [
67
67
"subject",
68
68
"amount",
69
69
"currency",
70
70
"interval",
71
71
"status",
72
72
"billingStartDate",
73
73
"createdAt"
74
74
],
75
75
"type": "object"
76
76
},
77
77
"type": "record"
78
78
},
79
79
"view": {
80
80
"description": "View of a subscription record for use in API responses",
81
81
"properties": {
82
82
"accessUntil": {
83
83
"description": "Date until which the subscriber retains access after cancellation",
84
84
"format": "datetime",
85
85
"type": "string"
86
86
},
87
87
"amount": {
88
88
"description": "Subscription amount in cents (0 for free subscriptions)",
89
89
"minimum": 0,
90
90
"type": "integer"
91
91
},
92
92
"billingStartDate": {
93
93
"description": "First billing period, can be used to determine recurrence",
94
94
"format": "datetime",
95
95
"type": "string"
96
96
},
97
97
"cancelledAt": {
98
98
"description": "Cancellation timestamp",
99
99
"format": "datetime",
100
100
"type": "string"
101
101
},
102
102
"createdAt": {
103
103
"description": "Creation timestamp",
104
104
"format": "datetime",
105
105
"type": "string"
106
106
},
107
107
"currency": {
108
108
"description": "ISO 4217 currency code",
109
109
"maxLength": 3,
110
110
"type": "string"
111
111
},
112
112
"interval": {
113
113
"description": "Billing interval",
114
114
"enum": [
115
115
"monthly",
116
116
"yearly"
117
117
],
118
118
"maxLength": 64,
119
119
"type": "string"
120
120
},
121
+
"renewalDate": {
122
+
"description": "Next scheduled renewal/billing date. Server-derived from the billing schedule; not stored in PDS. Omitted when not applicable (e.g. cancelled or unauthenticated views).",
123
+
"format": "datetime",
124
+
"type": "string"
125
+
},
121
126
"status": {
122
127
"description": "Subscription status",
123
128
"enum": [
124
129
"pending",
125
130
"active",
126
131
"past_due",
127
132
"cancelled",
128
133
"expired"
129
134
],
130
135
"maxLength": 64,
131
136
"type": "string"
132
137
},
133
138
"subject": {
134
139
"description": "DID of the user being subscribed to",
135
140
"format": "did",
136
141
"type": "string"
137
142
},
138
143
"uri": {
139
144
"description": "AT-URI of the subscription record",
140
145
"format": "at-uri",
141
146
"type": "string"
142
147
}
143
148
},
144
149
"required": [
145
150
"uri",
146
151
"amount",
147
152
"currency",
148
153
"interval",
149
154
"status",
150
155
"billingStartDate",
151
156
"createdAt"
152
157
],
153
158
"type": "object"
154
159
}
155
160
},
156
161
"id": "com.atiproto.subscription",
157
162
"lexicon": 1
158
163
}