@atiproto/lexicons 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +20 -0
- package/dist/lexicons/com/atiproto/account/cart/clone.d.ts +2 -0
- package/dist/lexicons/com/atiproto/account/cart/clone.defs.d.ts +49 -0
- package/dist/lexicons/com/atiproto/account/cart/clone.defs.js +58 -0
- package/dist/lexicons/com/atiproto/account/cart/clone.js +44 -0
- package/dist/lexicons/com/atiproto/account/cart/create.d.ts +2 -0
- package/dist/lexicons/com/atiproto/account/cart/create.defs.d.ts +39 -0
- package/dist/lexicons/com/atiproto/account/cart/create.defs.js +54 -0
- package/dist/lexicons/com/atiproto/account/cart/create.js +44 -0
- package/dist/lexicons/com/atiproto/account/cart/get.d.ts +2 -0
- package/dist/lexicons/com/atiproto/account/cart/get.defs.d.ts +47 -0
- package/dist/lexicons/com/atiproto/account/cart/get.defs.js +56 -0
- package/dist/lexicons/com/atiproto/account/cart/get.js +44 -0
- package/dist/lexicons/com/atiproto/account/cart/list.d.ts +2 -0
- package/dist/lexicons/com/atiproto/account/cart/list.defs.d.ts +32 -0
- package/dist/lexicons/com/atiproto/account/cart/list.defs.js +56 -0
- package/dist/lexicons/com/atiproto/account/cart/list.js +44 -0
- package/dist/lexicons/com/atiproto/account/cart/put.d.ts +2 -0
- package/dist/lexicons/com/atiproto/account/cart/put.defs.d.ts +37 -0
- package/dist/lexicons/com/atiproto/account/cart/put.defs.js +53 -0
- package/dist/lexicons/com/atiproto/account/cart/put.js +44 -0
- package/dist/lexicons/com/atiproto/account/cart.d.ts +5 -0
- package/dist/lexicons/com/atiproto/account/cart.js +44 -0
- package/dist/lexicons/com/atiproto/account/profile/get.d.ts +2 -0
- package/dist/lexicons/com/atiproto/account/profile/get.defs.d.ts +31 -0
- package/dist/lexicons/com/atiproto/account/profile/get.defs.js +53 -0
- package/dist/lexicons/com/atiproto/account/profile/get.js +44 -0
- package/dist/lexicons/com/atiproto/account/profile/put.d.ts +2 -0
- package/dist/lexicons/com/atiproto/account/profile/put.defs.d.ts +47 -0
- package/dist/lexicons/com/atiproto/account/profile/put.defs.js +60 -0
- package/dist/lexicons/com/atiproto/account/profile/put.js +44 -0
- package/dist/lexicons/com/atiproto/account/profile.d.ts +2 -0
- package/dist/lexicons/com/atiproto/account/profile.js +41 -0
- package/dist/lexicons/com/atiproto/account.d.ts +2 -0
- package/dist/lexicons/com/atiproto/account.js +41 -0
- package/dist/lexicons/com/atiproto/cart.d.ts +2 -0
- package/dist/lexicons/com/atiproto/cart.defs.d.ts +147 -0
- package/dist/lexicons/com/atiproto/cart.defs.js +27 -0
- package/dist/lexicons/com/atiproto/cart.js +44 -0
- package/dist/lexicons/com/atiproto/feed/list.d.ts +2 -0
- package/dist/lexicons/com/atiproto/feed/list.defs.d.ts +18 -0
- package/dist/lexicons/com/atiproto/feed/list.defs.js +54 -0
- package/dist/lexicons/com/atiproto/feed/list.js +44 -0
- package/dist/lexicons/com/atiproto/feed/subscription/cancel.d.ts +2 -0
- package/dist/lexicons/com/atiproto/feed/subscription/cancel.defs.d.ts +37 -0
- package/dist/lexicons/com/atiproto/feed/subscription/cancel.defs.js +51 -0
- package/dist/lexicons/com/atiproto/feed/subscription/cancel.js +44 -0
- package/dist/lexicons/com/atiproto/feed/subscription/create.d.ts +2 -0
- package/dist/lexicons/com/atiproto/feed/subscription/create.defs.d.ts +52 -0
- package/dist/lexicons/com/atiproto/feed/subscription/create.defs.js +59 -0
- package/dist/lexicons/com/atiproto/feed/subscription/create.js +44 -0
- package/dist/lexicons/com/atiproto/feed/subscription/get.d.ts +2 -0
- package/dist/lexicons/com/atiproto/feed/subscription/get.defs.d.ts +35 -0
- package/dist/lexicons/com/atiproto/feed/subscription/get.defs.js +51 -0
- package/dist/lexicons/com/atiproto/feed/subscription/get.js +44 -0
- package/dist/lexicons/com/atiproto/feed/subscription/list.d.ts +2 -0
- package/dist/lexicons/com/atiproto/feed/subscription/list.defs.d.ts +28 -0
- package/dist/lexicons/com/atiproto/feed/subscription/list.defs.js +55 -0
- package/dist/lexicons/com/atiproto/feed/subscription/list.js +44 -0
- package/dist/lexicons/com/atiproto/feed/subscription/put.d.ts +2 -0
- package/dist/lexicons/com/atiproto/feed/subscription/put.defs.d.ts +37 -0
- package/dist/lexicons/com/atiproto/feed/subscription/put.defs.js +53 -0
- package/dist/lexicons/com/atiproto/feed/subscription/put.js +44 -0
- package/dist/lexicons/com/atiproto/feed/subscription.d.ts +5 -0
- package/dist/lexicons/com/atiproto/feed/subscription.js +44 -0
- package/dist/lexicons/com/atiproto/feed/tip/create.d.ts +2 -0
- package/dist/lexicons/com/atiproto/feed/tip/create.defs.d.ts +76 -0
- package/dist/lexicons/com/atiproto/feed/tip/create.defs.js +62 -0
- package/dist/lexicons/com/atiproto/feed/tip/create.js +44 -0
- package/dist/lexicons/com/atiproto/feed/tip/get.d.ts +2 -0
- package/dist/lexicons/com/atiproto/feed/tip/get.defs.d.ts +35 -0
- package/dist/lexicons/com/atiproto/feed/tip/get.defs.js +51 -0
- package/dist/lexicons/com/atiproto/feed/tip/get.js +44 -0
- package/dist/lexicons/com/atiproto/feed/tip/list.d.ts +2 -0
- package/dist/lexicons/com/atiproto/feed/tip/list.defs.d.ts +17 -0
- package/dist/lexicons/com/atiproto/feed/tip/list.defs.js +50 -0
- package/dist/lexicons/com/atiproto/feed/tip/list.js +44 -0
- package/dist/lexicons/com/atiproto/feed/tip/put.d.ts +2 -0
- package/dist/lexicons/com/atiproto/feed/tip/put.defs.d.ts +37 -0
- package/dist/lexicons/com/atiproto/feed/tip/put.defs.js +53 -0
- package/dist/lexicons/com/atiproto/feed/tip/put.js +44 -0
- package/dist/lexicons/com/atiproto/feed/tip.d.ts +4 -0
- package/dist/lexicons/com/atiproto/feed/tip.js +43 -0
- package/dist/lexicons/com/atiproto/feed.d.ts +3 -0
- package/dist/lexicons/com/atiproto/feed.js +42 -0
- package/dist/lexicons/com/atiproto/profile.d.ts +2 -0
- package/dist/lexicons/com/atiproto/profile.defs.d.ts +377 -0
- package/dist/lexicons/com/atiproto/profile.defs.js +32 -0
- package/dist/lexicons/com/atiproto/profile.js +44 -0
- package/dist/lexicons/com/atiproto/repo/profile/get.d.ts +2 -0
- package/dist/lexicons/com/atiproto/repo/profile/get.defs.d.ts +29 -0
- package/dist/lexicons/com/atiproto/repo/profile/get.defs.js +50 -0
- package/dist/lexicons/com/atiproto/repo/profile/get.js +44 -0
- package/dist/lexicons/com/atiproto/repo/profile.d.ts +1 -0
- package/dist/lexicons/com/atiproto/repo/profile.js +40 -0
- package/dist/lexicons/com/atiproto/repo/subscription/search.d.ts +2 -0
- package/dist/lexicons/com/atiproto/repo/subscription/search.defs.d.ts +40 -0
- package/dist/lexicons/com/atiproto/repo/subscription/search.defs.js +59 -0
- package/dist/lexicons/com/atiproto/repo/subscription/search.js +44 -0
- package/dist/lexicons/com/atiproto/repo/subscription/validate.d.ts +2 -0
- package/dist/lexicons/com/atiproto/repo/subscription/validate.defs.d.ts +36 -0
- package/dist/lexicons/com/atiproto/repo/subscription/validate.defs.js +22 -0
- package/dist/lexicons/com/atiproto/repo/subscription/validate.js +44 -0
- package/dist/lexicons/com/atiproto/repo/subscription.d.ts +2 -0
- package/dist/lexicons/com/atiproto/repo/subscription.js +41 -0
- package/dist/lexicons/com/atiproto/repo/tip/search.d.ts +2 -0
- package/dist/lexicons/com/atiproto/repo/tip/search.defs.d.ts +40 -0
- package/dist/lexicons/com/atiproto/repo/tip/search.defs.js +59 -0
- package/dist/lexicons/com/atiproto/repo/tip/search.js +44 -0
- package/dist/lexicons/com/atiproto/repo/tip/validate.d.ts +2 -0
- package/dist/lexicons/com/atiproto/repo/tip/validate.defs.d.ts +42 -0
- package/dist/lexicons/com/atiproto/repo/tip/validate.defs.js +23 -0
- package/dist/lexicons/com/atiproto/repo/tip/validate.js +44 -0
- package/dist/lexicons/com/atiproto/repo/tip.d.ts +2 -0
- package/dist/lexicons/com/atiproto/repo/tip.js +41 -0
- package/dist/lexicons/com/atiproto/repo.d.ts +3 -0
- package/dist/lexicons/com/atiproto/repo.js +42 -0
- package/dist/lexicons/com/atiproto/subscription.d.ts +2 -0
- package/dist/lexicons/com/atiproto/subscription.defs.d.ts +244 -0
- package/dist/lexicons/com/atiproto/subscription.defs.js +24 -0
- package/dist/lexicons/com/atiproto/subscription.js +44 -0
- package/dist/lexicons/com/atiproto/tip.d.ts +2 -0
- package/dist/lexicons/com/atiproto/tip.defs.d.ts +230 -0
- package/dist/lexicons/com/atiproto/tip.defs.js +29 -0
- package/dist/lexicons/com/atiproto/tip.js +44 -0
- package/dist/lexicons/com/atiproto.d.ts +7 -0
- package/dist/lexicons/com/atiproto.js +46 -0
- package/dist/lexicons/com.d.ts +1 -0
- package/dist/lexicons/com.js +40 -0
- package/dist/lexicons/index.d.ts +1 -0
- package/dist/lexicons/index.js +40 -0
- package/dist/schemas/account/cart/clone.json +75 -0
- package/dist/schemas/account/cart/create.json +52 -0
- package/dist/schemas/account/cart/get.json +66 -0
- package/dist/schemas/account/cart/list.json +73 -0
- package/dist/schemas/account/cart/put.json +47 -0
- package/dist/schemas/account/profile/get.json +42 -0
- package/dist/schemas/account/profile/put.json +84 -0
- package/dist/schemas/cart.json +74 -0
- package/dist/schemas/feed/list.json +49 -0
- package/dist/schemas/feed/subscription/cancel.json +48 -0
- package/dist/schemas/feed/subscription/create.json +76 -0
- package/dist/schemas/feed/subscription/get.json +45 -0
- package/dist/schemas/feed/subscription/list.json +64 -0
- package/dist/schemas/feed/subscription/put.json +47 -0
- package/dist/schemas/feed/tip/create.json +87 -0
- package/dist/schemas/feed/tip/get.json +45 -0
- package/dist/schemas/feed/tip/list.json +49 -0
- package/dist/schemas/feed/tip/put.json +47 -0
- package/dist/schemas/profile.json +88 -0
- package/dist/schemas/repo/profile/get.json +40 -0
- package/dist/schemas/repo/subscription/search.json +67 -0
- package/dist/schemas/repo/subscription/validate.json +55 -0
- package/dist/schemas/repo/tip/search.json +67 -0
- package/dist/schemas/repo/tip/validate.json +60 -0
- package/dist/schemas/subscription.json +67 -0
- package/dist/schemas/tip.json +57 -0
- package/dist/schemas.d.ts +2 -0
- package/dist/schemas.js +60 -0
- package/package.json +31 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.atiproto.repo.subscription.search",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "query",
|
|
7
|
+
"description": "Search for subscriptions to a user (subscriptions where subject matches the given DID)",
|
|
8
|
+
"parameters": {
|
|
9
|
+
"type": "params",
|
|
10
|
+
"properties": {
|
|
11
|
+
"subject": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"format": "did",
|
|
14
|
+
"description": "DID of the user being subscribed to"
|
|
15
|
+
},
|
|
16
|
+
"cursor": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Pagination cursor"
|
|
19
|
+
},
|
|
20
|
+
"limit": {
|
|
21
|
+
"type": "integer",
|
|
22
|
+
"minimum": 1,
|
|
23
|
+
"maximum": 100,
|
|
24
|
+
"default": 50,
|
|
25
|
+
"description": "Results per page (1-100, default: 50)"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": ["subject"]
|
|
29
|
+
},
|
|
30
|
+
"output": {
|
|
31
|
+
"encoding": "application/json",
|
|
32
|
+
"schema": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"required": ["subscriptions"],
|
|
35
|
+
"properties": {
|
|
36
|
+
"subscriptions": {
|
|
37
|
+
"type": "array",
|
|
38
|
+
"items": {
|
|
39
|
+
"type": "ref",
|
|
40
|
+
"ref": "#subscriptionResponse"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"cursor": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "Pagination cursor for next page"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"subscriptionResponse": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"required": ["uri", "record"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"uri": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"format": "at-uri",
|
|
58
|
+
"description": "AT-URI of the subscription record"
|
|
59
|
+
},
|
|
60
|
+
"record": {
|
|
61
|
+
"type": "ref",
|
|
62
|
+
"ref": "com.atiproto.subscription"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.atiproto.repo.subscription.validate",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "query",
|
|
7
|
+
"description": "Validate that a sender has an active, Stripe-verified subscription to a recipient. Optionally check that the subscription amount meets a minimum.",
|
|
8
|
+
"parameters": {
|
|
9
|
+
"type": "params",
|
|
10
|
+
"required": ["sender", "subject"],
|
|
11
|
+
"properties": {
|
|
12
|
+
"sender": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "did",
|
|
15
|
+
"description": "DID of the subscriber"
|
|
16
|
+
},
|
|
17
|
+
"subject": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"format": "did",
|
|
20
|
+
"description": "DID of the creator being subscribed to"
|
|
21
|
+
},
|
|
22
|
+
"minAmount": {
|
|
23
|
+
"type": "integer",
|
|
24
|
+
"description": "Minimum subscription amount in cents to consider valid"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"output": {
|
|
29
|
+
"encoding": "application/json",
|
|
30
|
+
"schema": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"required": ["valid"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"valid": {
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"description": "Whether the sender has an active, verified subscription"
|
|
37
|
+
},
|
|
38
|
+
"amount": {
|
|
39
|
+
"type": "integer",
|
|
40
|
+
"description": "Subscription amount in cents"
|
|
41
|
+
},
|
|
42
|
+
"currency": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "Currency of the subscription"
|
|
45
|
+
},
|
|
46
|
+
"reason": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "If invalid, reason for rejection"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.atiproto.repo.tip.search",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "query",
|
|
7
|
+
"description": "Search for tips sent to a user (tips where subject matches the given DID)",
|
|
8
|
+
"parameters": {
|
|
9
|
+
"type": "params",
|
|
10
|
+
"properties": {
|
|
11
|
+
"subject": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"format": "did",
|
|
14
|
+
"description": "DID of the user receiving tips"
|
|
15
|
+
},
|
|
16
|
+
"cursor": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Pagination cursor"
|
|
19
|
+
},
|
|
20
|
+
"limit": {
|
|
21
|
+
"type": "integer",
|
|
22
|
+
"minimum": 1,
|
|
23
|
+
"maximum": 100,
|
|
24
|
+
"default": 50,
|
|
25
|
+
"description": "Results per page (1-100, default: 50)"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": ["subject"]
|
|
29
|
+
},
|
|
30
|
+
"output": {
|
|
31
|
+
"encoding": "application/json",
|
|
32
|
+
"schema": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"required": ["tips"],
|
|
35
|
+
"properties": {
|
|
36
|
+
"tips": {
|
|
37
|
+
"type": "array",
|
|
38
|
+
"items": {
|
|
39
|
+
"type": "ref",
|
|
40
|
+
"ref": "#tipResponse"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"cursor": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "Pagination cursor for next page"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"tipResponse": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"required": ["uri", "record"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"uri": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"format": "at-uri",
|
|
58
|
+
"description": "AT-URI of the tip record"
|
|
59
|
+
},
|
|
60
|
+
"record": {
|
|
61
|
+
"type": "ref",
|
|
62
|
+
"ref": "com.atiproto.tip"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.atiproto.repo.tip.validate",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "query",
|
|
7
|
+
"description": "Validate that a sender has completed tip payment(s). Looks up by recordUri (sums all tips for that record) or by subject (recipient DID). These are mutually exclusive; if recordUri is provided, subject is ignored.",
|
|
8
|
+
"parameters": {
|
|
9
|
+
"type": "params",
|
|
10
|
+
"required": ["sender"],
|
|
11
|
+
"properties": {
|
|
12
|
+
"sender": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "did",
|
|
15
|
+
"description": "DID of the tip sender"
|
|
16
|
+
},
|
|
17
|
+
"subject": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"format": "did",
|
|
20
|
+
"description": "DID of the tip recipient. Ignored if recordUri is provided."
|
|
21
|
+
},
|
|
22
|
+
"recordUri": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"format": "at-uri",
|
|
25
|
+
"description": "AT-URI of the record being tipped. Takes precedence over subject."
|
|
26
|
+
},
|
|
27
|
+
"minAmount": {
|
|
28
|
+
"type": "integer",
|
|
29
|
+
"description": "Minimum total tip amount in cents to consider valid"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"output": {
|
|
34
|
+
"encoding": "application/json",
|
|
35
|
+
"schema": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"required": ["valid"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"valid": {
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"description": "Whether the sender has completed and verified tip(s)"
|
|
42
|
+
},
|
|
43
|
+
"amount": {
|
|
44
|
+
"type": "integer",
|
|
45
|
+
"description": "Sum of all verified completed tip amounts in cents"
|
|
46
|
+
},
|
|
47
|
+
"currency": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"description": "Currency of the tips"
|
|
50
|
+
},
|
|
51
|
+
"reason": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "If invalid, reason for rejection"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"defs": {
|
|
3
|
+
"main": {
|
|
4
|
+
"description": "A record representing a subscription from one user to another",
|
|
5
|
+
"key": "any",
|
|
6
|
+
"record": {
|
|
7
|
+
"properties": {
|
|
8
|
+
"subject": {
|
|
9
|
+
"description": "DID of the user being subscribed to",
|
|
10
|
+
"format": "did",
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"amount": {
|
|
14
|
+
"description": "Subscription amount in cents (0 for free subscriptions)",
|
|
15
|
+
"minimum": 0,
|
|
16
|
+
"type": "integer"
|
|
17
|
+
},
|
|
18
|
+
"currency": {
|
|
19
|
+
"description": "ISO 4217 currency code",
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
"interval": {
|
|
23
|
+
"description": "Billing interval: monthly or yearly",
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"status": {
|
|
27
|
+
"description": "Subscription status: pending, active, past_due, cancelled, expired",
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"billingStartDate": {
|
|
31
|
+
"description": "First billing period, can be used to determine recurrence",
|
|
32
|
+
"format": "datetime",
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
"cancelledAt": {
|
|
36
|
+
"description": "Cancellation timestamp",
|
|
37
|
+
"format": "datetime",
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"accessUntil": {
|
|
41
|
+
"description": "Date until which the subscriber retains access after cancellation",
|
|
42
|
+
"format": "datetime",
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"createdAt": {
|
|
46
|
+
"description": "Creation timestamp",
|
|
47
|
+
"format": "datetime",
|
|
48
|
+
"type": "string"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"required": [
|
|
52
|
+
"subject",
|
|
53
|
+
"amount",
|
|
54
|
+
"currency",
|
|
55
|
+
"interval",
|
|
56
|
+
"status",
|
|
57
|
+
"billingStartDate",
|
|
58
|
+
"createdAt"
|
|
59
|
+
],
|
|
60
|
+
"type": "object"
|
|
61
|
+
},
|
|
62
|
+
"type": "record"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"id": "com.atiproto.subscription",
|
|
66
|
+
"lexicon": 1
|
|
67
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"defs": {
|
|
3
|
+
"main": {
|
|
4
|
+
"description": "A record representing a tip given by one user to another",
|
|
5
|
+
"key": "any",
|
|
6
|
+
"record": {
|
|
7
|
+
"properties": {
|
|
8
|
+
"subject": {
|
|
9
|
+
"description": "DID of the user receiving the tip",
|
|
10
|
+
"format": "did",
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"recordUri": {
|
|
14
|
+
"description": "AT-URI of specific record being tipped",
|
|
15
|
+
"format": "at-uri",
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"amount": {
|
|
19
|
+
"description": "Tip amount in cents (0 when recipient allows zero tips)",
|
|
20
|
+
"minimum": 0,
|
|
21
|
+
"type": "integer"
|
|
22
|
+
},
|
|
23
|
+
"currency": {
|
|
24
|
+
"description": "ISO 4217 currency code",
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"status": {
|
|
28
|
+
"description": "Tip status: pending, authorized (payment held), completed, failed, refunded",
|
|
29
|
+
"type": "string",
|
|
30
|
+
"enum": ["pending", "authorized", "completed", "failed", "refunded"]
|
|
31
|
+
},
|
|
32
|
+
"message": {
|
|
33
|
+
"description": "Optional message (max 500 chars)",
|
|
34
|
+
"maxGraphemes": 500,
|
|
35
|
+
"maxLength": 5000,
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"createdAt": {
|
|
39
|
+
"description": "Creation timestamp",
|
|
40
|
+
"format": "datetime",
|
|
41
|
+
"type": "string"
|
|
42
|
+
},
|
|
43
|
+
"completedAt": {
|
|
44
|
+
"description": "Completion timestamp",
|
|
45
|
+
"format": "datetime",
|
|
46
|
+
"type": "string"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"required": ["subject", "amount", "currency", "status", "createdAt"],
|
|
50
|
+
"type": "object"
|
|
51
|
+
},
|
|
52
|
+
"type": "record"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"id": "com.atiproto.tip",
|
|
56
|
+
"lexicon": 1
|
|
57
|
+
}
|
package/dist/schemas.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.schemas = void 0;
|
|
7
|
+
const clone_json_1 = __importDefault(require("./schemas/account/cart/clone.json"));
|
|
8
|
+
const create_json_1 = __importDefault(require("./schemas/account/cart/create.json"));
|
|
9
|
+
const get_json_1 = __importDefault(require("./schemas/account/cart/get.json"));
|
|
10
|
+
const list_json_1 = __importDefault(require("./schemas/account/cart/list.json"));
|
|
11
|
+
const put_json_1 = __importDefault(require("./schemas/account/cart/put.json"));
|
|
12
|
+
const get_json_2 = __importDefault(require("./schemas/account/profile/get.json"));
|
|
13
|
+
const put_json_2 = __importDefault(require("./schemas/account/profile/put.json"));
|
|
14
|
+
const cart_json_1 = __importDefault(require("./schemas/cart.json"));
|
|
15
|
+
const list_json_2 = __importDefault(require("./schemas/feed/list.json"));
|
|
16
|
+
const cancel_json_1 = __importDefault(require("./schemas/feed/subscription/cancel.json"));
|
|
17
|
+
const create_json_2 = __importDefault(require("./schemas/feed/subscription/create.json"));
|
|
18
|
+
const get_json_3 = __importDefault(require("./schemas/feed/subscription/get.json"));
|
|
19
|
+
const list_json_3 = __importDefault(require("./schemas/feed/subscription/list.json"));
|
|
20
|
+
const put_json_3 = __importDefault(require("./schemas/feed/subscription/put.json"));
|
|
21
|
+
const create_json_3 = __importDefault(require("./schemas/feed/tip/create.json"));
|
|
22
|
+
const get_json_4 = __importDefault(require("./schemas/feed/tip/get.json"));
|
|
23
|
+
const list_json_4 = __importDefault(require("./schemas/feed/tip/list.json"));
|
|
24
|
+
const put_json_4 = __importDefault(require("./schemas/feed/tip/put.json"));
|
|
25
|
+
const profile_json_1 = __importDefault(require("./schemas/profile.json"));
|
|
26
|
+
const get_json_5 = __importDefault(require("./schemas/repo/profile/get.json"));
|
|
27
|
+
const search_json_1 = __importDefault(require("./schemas/repo/subscription/search.json"));
|
|
28
|
+
const validate_json_1 = __importDefault(require("./schemas/repo/subscription/validate.json"));
|
|
29
|
+
const search_json_2 = __importDefault(require("./schemas/repo/tip/search.json"));
|
|
30
|
+
const validate_json_2 = __importDefault(require("./schemas/repo/tip/validate.json"));
|
|
31
|
+
const subscription_json_1 = __importDefault(require("./schemas/subscription.json"));
|
|
32
|
+
const tip_json_1 = __importDefault(require("./schemas/tip.json"));
|
|
33
|
+
exports.schemas = [
|
|
34
|
+
clone_json_1.default,
|
|
35
|
+
create_json_1.default,
|
|
36
|
+
get_json_1.default,
|
|
37
|
+
list_json_1.default,
|
|
38
|
+
put_json_1.default,
|
|
39
|
+
get_json_2.default,
|
|
40
|
+
put_json_2.default,
|
|
41
|
+
cart_json_1.default,
|
|
42
|
+
list_json_2.default,
|
|
43
|
+
cancel_json_1.default,
|
|
44
|
+
create_json_2.default,
|
|
45
|
+
get_json_3.default,
|
|
46
|
+
list_json_3.default,
|
|
47
|
+
put_json_3.default,
|
|
48
|
+
create_json_3.default,
|
|
49
|
+
get_json_4.default,
|
|
50
|
+
list_json_4.default,
|
|
51
|
+
put_json_4.default,
|
|
52
|
+
profile_json_1.default,
|
|
53
|
+
get_json_5.default,
|
|
54
|
+
search_json_1.default,
|
|
55
|
+
validate_json_1.default,
|
|
56
|
+
search_json_2.default,
|
|
57
|
+
validate_json_2.default,
|
|
58
|
+
subscription_json_1.default,
|
|
59
|
+
tip_json_1.default,
|
|
60
|
+
];
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atiproto/lexicons",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "ATProto lexicon types and utilities",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"source": "./src/index.ts",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build:lexicons": "lex build --lexicons ./src/schemas --out ./src/lexicons --clear --indexFile",
|
|
19
|
+
"build": "npm run build:lexicons && tsc",
|
|
20
|
+
"prepack": "npm run build",
|
|
21
|
+
"test": "echo \"No tests yet\" && exit 0"
|
|
22
|
+
},
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@atproto/lex": "^0.0.23"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@atproto/lexicon": "^0.6.2",
|
|
29
|
+
"typescript": "^6.0.2"
|
|
30
|
+
}
|
|
31
|
+
}
|