@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.
Files changed (161) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.js +20 -0
  3. package/dist/lexicons/com/atiproto/account/cart/clone.d.ts +2 -0
  4. package/dist/lexicons/com/atiproto/account/cart/clone.defs.d.ts +49 -0
  5. package/dist/lexicons/com/atiproto/account/cart/clone.defs.js +58 -0
  6. package/dist/lexicons/com/atiproto/account/cart/clone.js +44 -0
  7. package/dist/lexicons/com/atiproto/account/cart/create.d.ts +2 -0
  8. package/dist/lexicons/com/atiproto/account/cart/create.defs.d.ts +39 -0
  9. package/dist/lexicons/com/atiproto/account/cart/create.defs.js +54 -0
  10. package/dist/lexicons/com/atiproto/account/cart/create.js +44 -0
  11. package/dist/lexicons/com/atiproto/account/cart/get.d.ts +2 -0
  12. package/dist/lexicons/com/atiproto/account/cart/get.defs.d.ts +47 -0
  13. package/dist/lexicons/com/atiproto/account/cart/get.defs.js +56 -0
  14. package/dist/lexicons/com/atiproto/account/cart/get.js +44 -0
  15. package/dist/lexicons/com/atiproto/account/cart/list.d.ts +2 -0
  16. package/dist/lexicons/com/atiproto/account/cart/list.defs.d.ts +32 -0
  17. package/dist/lexicons/com/atiproto/account/cart/list.defs.js +56 -0
  18. package/dist/lexicons/com/atiproto/account/cart/list.js +44 -0
  19. package/dist/lexicons/com/atiproto/account/cart/put.d.ts +2 -0
  20. package/dist/lexicons/com/atiproto/account/cart/put.defs.d.ts +37 -0
  21. package/dist/lexicons/com/atiproto/account/cart/put.defs.js +53 -0
  22. package/dist/lexicons/com/atiproto/account/cart/put.js +44 -0
  23. package/dist/lexicons/com/atiproto/account/cart.d.ts +5 -0
  24. package/dist/lexicons/com/atiproto/account/cart.js +44 -0
  25. package/dist/lexicons/com/atiproto/account/profile/get.d.ts +2 -0
  26. package/dist/lexicons/com/atiproto/account/profile/get.defs.d.ts +31 -0
  27. package/dist/lexicons/com/atiproto/account/profile/get.defs.js +53 -0
  28. package/dist/lexicons/com/atiproto/account/profile/get.js +44 -0
  29. package/dist/lexicons/com/atiproto/account/profile/put.d.ts +2 -0
  30. package/dist/lexicons/com/atiproto/account/profile/put.defs.d.ts +47 -0
  31. package/dist/lexicons/com/atiproto/account/profile/put.defs.js +60 -0
  32. package/dist/lexicons/com/atiproto/account/profile/put.js +44 -0
  33. package/dist/lexicons/com/atiproto/account/profile.d.ts +2 -0
  34. package/dist/lexicons/com/atiproto/account/profile.js +41 -0
  35. package/dist/lexicons/com/atiproto/account.d.ts +2 -0
  36. package/dist/lexicons/com/atiproto/account.js +41 -0
  37. package/dist/lexicons/com/atiproto/cart.d.ts +2 -0
  38. package/dist/lexicons/com/atiproto/cart.defs.d.ts +147 -0
  39. package/dist/lexicons/com/atiproto/cart.defs.js +27 -0
  40. package/dist/lexicons/com/atiproto/cart.js +44 -0
  41. package/dist/lexicons/com/atiproto/feed/list.d.ts +2 -0
  42. package/dist/lexicons/com/atiproto/feed/list.defs.d.ts +18 -0
  43. package/dist/lexicons/com/atiproto/feed/list.defs.js +54 -0
  44. package/dist/lexicons/com/atiproto/feed/list.js +44 -0
  45. package/dist/lexicons/com/atiproto/feed/subscription/cancel.d.ts +2 -0
  46. package/dist/lexicons/com/atiproto/feed/subscription/cancel.defs.d.ts +37 -0
  47. package/dist/lexicons/com/atiproto/feed/subscription/cancel.defs.js +51 -0
  48. package/dist/lexicons/com/atiproto/feed/subscription/cancel.js +44 -0
  49. package/dist/lexicons/com/atiproto/feed/subscription/create.d.ts +2 -0
  50. package/dist/lexicons/com/atiproto/feed/subscription/create.defs.d.ts +52 -0
  51. package/dist/lexicons/com/atiproto/feed/subscription/create.defs.js +59 -0
  52. package/dist/lexicons/com/atiproto/feed/subscription/create.js +44 -0
  53. package/dist/lexicons/com/atiproto/feed/subscription/get.d.ts +2 -0
  54. package/dist/lexicons/com/atiproto/feed/subscription/get.defs.d.ts +35 -0
  55. package/dist/lexicons/com/atiproto/feed/subscription/get.defs.js +51 -0
  56. package/dist/lexicons/com/atiproto/feed/subscription/get.js +44 -0
  57. package/dist/lexicons/com/atiproto/feed/subscription/list.d.ts +2 -0
  58. package/dist/lexicons/com/atiproto/feed/subscription/list.defs.d.ts +28 -0
  59. package/dist/lexicons/com/atiproto/feed/subscription/list.defs.js +55 -0
  60. package/dist/lexicons/com/atiproto/feed/subscription/list.js +44 -0
  61. package/dist/lexicons/com/atiproto/feed/subscription/put.d.ts +2 -0
  62. package/dist/lexicons/com/atiproto/feed/subscription/put.defs.d.ts +37 -0
  63. package/dist/lexicons/com/atiproto/feed/subscription/put.defs.js +53 -0
  64. package/dist/lexicons/com/atiproto/feed/subscription/put.js +44 -0
  65. package/dist/lexicons/com/atiproto/feed/subscription.d.ts +5 -0
  66. package/dist/lexicons/com/atiproto/feed/subscription.js +44 -0
  67. package/dist/lexicons/com/atiproto/feed/tip/create.d.ts +2 -0
  68. package/dist/lexicons/com/atiproto/feed/tip/create.defs.d.ts +76 -0
  69. package/dist/lexicons/com/atiproto/feed/tip/create.defs.js +62 -0
  70. package/dist/lexicons/com/atiproto/feed/tip/create.js +44 -0
  71. package/dist/lexicons/com/atiproto/feed/tip/get.d.ts +2 -0
  72. package/dist/lexicons/com/atiproto/feed/tip/get.defs.d.ts +35 -0
  73. package/dist/lexicons/com/atiproto/feed/tip/get.defs.js +51 -0
  74. package/dist/lexicons/com/atiproto/feed/tip/get.js +44 -0
  75. package/dist/lexicons/com/atiproto/feed/tip/list.d.ts +2 -0
  76. package/dist/lexicons/com/atiproto/feed/tip/list.defs.d.ts +17 -0
  77. package/dist/lexicons/com/atiproto/feed/tip/list.defs.js +50 -0
  78. package/dist/lexicons/com/atiproto/feed/tip/list.js +44 -0
  79. package/dist/lexicons/com/atiproto/feed/tip/put.d.ts +2 -0
  80. package/dist/lexicons/com/atiproto/feed/tip/put.defs.d.ts +37 -0
  81. package/dist/lexicons/com/atiproto/feed/tip/put.defs.js +53 -0
  82. package/dist/lexicons/com/atiproto/feed/tip/put.js +44 -0
  83. package/dist/lexicons/com/atiproto/feed/tip.d.ts +4 -0
  84. package/dist/lexicons/com/atiproto/feed/tip.js +43 -0
  85. package/dist/lexicons/com/atiproto/feed.d.ts +3 -0
  86. package/dist/lexicons/com/atiproto/feed.js +42 -0
  87. package/dist/lexicons/com/atiproto/profile.d.ts +2 -0
  88. package/dist/lexicons/com/atiproto/profile.defs.d.ts +377 -0
  89. package/dist/lexicons/com/atiproto/profile.defs.js +32 -0
  90. package/dist/lexicons/com/atiproto/profile.js +44 -0
  91. package/dist/lexicons/com/atiproto/repo/profile/get.d.ts +2 -0
  92. package/dist/lexicons/com/atiproto/repo/profile/get.defs.d.ts +29 -0
  93. package/dist/lexicons/com/atiproto/repo/profile/get.defs.js +50 -0
  94. package/dist/lexicons/com/atiproto/repo/profile/get.js +44 -0
  95. package/dist/lexicons/com/atiproto/repo/profile.d.ts +1 -0
  96. package/dist/lexicons/com/atiproto/repo/profile.js +40 -0
  97. package/dist/lexicons/com/atiproto/repo/subscription/search.d.ts +2 -0
  98. package/dist/lexicons/com/atiproto/repo/subscription/search.defs.d.ts +40 -0
  99. package/dist/lexicons/com/atiproto/repo/subscription/search.defs.js +59 -0
  100. package/dist/lexicons/com/atiproto/repo/subscription/search.js +44 -0
  101. package/dist/lexicons/com/atiproto/repo/subscription/validate.d.ts +2 -0
  102. package/dist/lexicons/com/atiproto/repo/subscription/validate.defs.d.ts +36 -0
  103. package/dist/lexicons/com/atiproto/repo/subscription/validate.defs.js +22 -0
  104. package/dist/lexicons/com/atiproto/repo/subscription/validate.js +44 -0
  105. package/dist/lexicons/com/atiproto/repo/subscription.d.ts +2 -0
  106. package/dist/lexicons/com/atiproto/repo/subscription.js +41 -0
  107. package/dist/lexicons/com/atiproto/repo/tip/search.d.ts +2 -0
  108. package/dist/lexicons/com/atiproto/repo/tip/search.defs.d.ts +40 -0
  109. package/dist/lexicons/com/atiproto/repo/tip/search.defs.js +59 -0
  110. package/dist/lexicons/com/atiproto/repo/tip/search.js +44 -0
  111. package/dist/lexicons/com/atiproto/repo/tip/validate.d.ts +2 -0
  112. package/dist/lexicons/com/atiproto/repo/tip/validate.defs.d.ts +42 -0
  113. package/dist/lexicons/com/atiproto/repo/tip/validate.defs.js +23 -0
  114. package/dist/lexicons/com/atiproto/repo/tip/validate.js +44 -0
  115. package/dist/lexicons/com/atiproto/repo/tip.d.ts +2 -0
  116. package/dist/lexicons/com/atiproto/repo/tip.js +41 -0
  117. package/dist/lexicons/com/atiproto/repo.d.ts +3 -0
  118. package/dist/lexicons/com/atiproto/repo.js +42 -0
  119. package/dist/lexicons/com/atiproto/subscription.d.ts +2 -0
  120. package/dist/lexicons/com/atiproto/subscription.defs.d.ts +244 -0
  121. package/dist/lexicons/com/atiproto/subscription.defs.js +24 -0
  122. package/dist/lexicons/com/atiproto/subscription.js +44 -0
  123. package/dist/lexicons/com/atiproto/tip.d.ts +2 -0
  124. package/dist/lexicons/com/atiproto/tip.defs.d.ts +230 -0
  125. package/dist/lexicons/com/atiproto/tip.defs.js +29 -0
  126. package/dist/lexicons/com/atiproto/tip.js +44 -0
  127. package/dist/lexicons/com/atiproto.d.ts +7 -0
  128. package/dist/lexicons/com/atiproto.js +46 -0
  129. package/dist/lexicons/com.d.ts +1 -0
  130. package/dist/lexicons/com.js +40 -0
  131. package/dist/lexicons/index.d.ts +1 -0
  132. package/dist/lexicons/index.js +40 -0
  133. package/dist/schemas/account/cart/clone.json +75 -0
  134. package/dist/schemas/account/cart/create.json +52 -0
  135. package/dist/schemas/account/cart/get.json +66 -0
  136. package/dist/schemas/account/cart/list.json +73 -0
  137. package/dist/schemas/account/cart/put.json +47 -0
  138. package/dist/schemas/account/profile/get.json +42 -0
  139. package/dist/schemas/account/profile/put.json +84 -0
  140. package/dist/schemas/cart.json +74 -0
  141. package/dist/schemas/feed/list.json +49 -0
  142. package/dist/schemas/feed/subscription/cancel.json +48 -0
  143. package/dist/schemas/feed/subscription/create.json +76 -0
  144. package/dist/schemas/feed/subscription/get.json +45 -0
  145. package/dist/schemas/feed/subscription/list.json +64 -0
  146. package/dist/schemas/feed/subscription/put.json +47 -0
  147. package/dist/schemas/feed/tip/create.json +87 -0
  148. package/dist/schemas/feed/tip/get.json +45 -0
  149. package/dist/schemas/feed/tip/list.json +49 -0
  150. package/dist/schemas/feed/tip/put.json +47 -0
  151. package/dist/schemas/profile.json +88 -0
  152. package/dist/schemas/repo/profile/get.json +40 -0
  153. package/dist/schemas/repo/subscription/search.json +67 -0
  154. package/dist/schemas/repo/subscription/validate.json +55 -0
  155. package/dist/schemas/repo/tip/search.json +67 -0
  156. package/dist/schemas/repo/tip/validate.json +60 -0
  157. package/dist/schemas/subscription.json +67 -0
  158. package/dist/schemas/tip.json +57 -0
  159. package/dist/schemas.d.ts +2 -0
  160. package/dist/schemas.js +60 -0
  161. package/package.json +31 -0
@@ -0,0 +1,244 @@
1
+ import { l } from '@atproto/lex';
2
+ declare const $nsid = "com.atiproto.subscription";
3
+ export { $nsid };
4
+ /** A record representing a subscription from one user to another */
5
+ type Main = {
6
+ $type: 'com.atiproto.subscription';
7
+ /**
8
+ * DID of the user being subscribed to
9
+ */
10
+ subject: l.DidString;
11
+ /**
12
+ * Subscription amount in cents (0 for free subscriptions)
13
+ */
14
+ amount: number;
15
+ /**
16
+ * ISO 4217 currency code
17
+ */
18
+ currency: string;
19
+ /**
20
+ * Billing interval: monthly or yearly
21
+ */
22
+ interval: string;
23
+ /**
24
+ * Subscription status: pending, active, past_due, cancelled, expired
25
+ */
26
+ status: string;
27
+ /**
28
+ * First billing period, can be used to determine recurrence
29
+ */
30
+ billingStartDate: l.DatetimeString;
31
+ /**
32
+ * Cancellation timestamp
33
+ */
34
+ cancelledAt?: l.DatetimeString;
35
+ /**
36
+ * Date until which the subscriber retains access after cancellation
37
+ */
38
+ accessUntil?: l.DatetimeString;
39
+ /**
40
+ * Creation timestamp
41
+ */
42
+ createdAt: l.DatetimeString;
43
+ };
44
+ export type { Main };
45
+ /** A record representing a subscription from one user to another */
46
+ declare const main: l.RecordSchema<"any", "com.atiproto.subscription", l.Validator<Omit<Main, "$type">, Omit<Main, "$type">>>;
47
+ export { main };
48
+ export declare const $isTypeOf: <TValue extends {
49
+ $type?: unknown;
50
+ }>(value: TValue) => value is l.TypedRecord<"com.atiproto.subscription", TValue>, $build: {
51
+ (input: Omit<Omit<Main, "$type">, "$type">): {
52
+ subject: l.DidString;
53
+ amount: number;
54
+ currency: string;
55
+ status: string;
56
+ createdAt: l.DatetimeString;
57
+ interval: string;
58
+ billingStartDate: l.DatetimeString;
59
+ cancelledAt?: l.DatetimeString
60
+ /**
61
+ * Date until which the subscriber retains access after cancellation
62
+ */
63
+ | undefined;
64
+ accessUntil?: l.DatetimeString
65
+ /**
66
+ * Creation timestamp
67
+ */
68
+ | undefined;
69
+ $type: "com.atiproto.subscription";
70
+ };
71
+ (input: Omit<Omit<Main, "$type">, "$type">): {
72
+ subject: l.DidString;
73
+ amount: number;
74
+ currency: string;
75
+ status: string;
76
+ createdAt: l.DatetimeString;
77
+ interval: string;
78
+ billingStartDate: l.DatetimeString;
79
+ cancelledAt?: l.DatetimeString
80
+ /**
81
+ * Date until which the subscriber retains access after cancellation
82
+ */
83
+ | undefined;
84
+ accessUntil?: l.DatetimeString
85
+ /**
86
+ * Creation timestamp
87
+ */
88
+ | undefined;
89
+ $type: "com.atiproto.subscription";
90
+ };
91
+ }, $type: "com.atiproto.subscription";
92
+ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => asserts input is {
93
+ subject: l.DidString;
94
+ amount: number;
95
+ currency: string;
96
+ status: string;
97
+ createdAt: l.DatetimeString;
98
+ interval: string;
99
+ billingStartDate: l.DatetimeString;
100
+ cancelledAt?: l.DatetimeString
101
+ /**
102
+ * Date until which the subscriber retains access after cancellation
103
+ */
104
+ | undefined;
105
+ accessUntil?: l.DatetimeString
106
+ /**
107
+ * Creation timestamp
108
+ */
109
+ | undefined;
110
+ $type: "com.atiproto.subscription";
111
+ }, $check: (input: unknown, options?: l.ValidateOptions) => void, $cast: <I>(input: I, options?: l.ValidateOptions) => I & {
112
+ subject: l.DidString;
113
+ amount: number;
114
+ currency: string;
115
+ status: string;
116
+ createdAt: l.DatetimeString;
117
+ interval: string;
118
+ billingStartDate: l.DatetimeString;
119
+ cancelledAt?: l.DatetimeString
120
+ /**
121
+ * Date until which the subscriber retains access after cancellation
122
+ */
123
+ | undefined;
124
+ accessUntil?: l.DatetimeString
125
+ /**
126
+ * Creation timestamp
127
+ */
128
+ | undefined;
129
+ $type: "com.atiproto.subscription";
130
+ }, $ifMatches: <I>(input: I, options?: l.ValidateOptions) => (I & {
131
+ subject: l.DidString;
132
+ amount: number;
133
+ currency: string;
134
+ status: string;
135
+ createdAt: l.DatetimeString;
136
+ interval: string;
137
+ billingStartDate: l.DatetimeString;
138
+ cancelledAt?: l.DatetimeString
139
+ /**
140
+ * Date until which the subscriber retains access after cancellation
141
+ */
142
+ | undefined;
143
+ accessUntil?: l.DatetimeString
144
+ /**
145
+ * Creation timestamp
146
+ */
147
+ | undefined;
148
+ $type: "com.atiproto.subscription";
149
+ }) | undefined, $matches: <I>(input: I, options?: l.ValidateOptions) => input is I & {
150
+ subject: l.DidString;
151
+ amount: number;
152
+ currency: string;
153
+ status: string;
154
+ createdAt: l.DatetimeString;
155
+ interval: string;
156
+ billingStartDate: l.DatetimeString;
157
+ cancelledAt?: l.DatetimeString
158
+ /**
159
+ * Date until which the subscriber retains access after cancellation
160
+ */
161
+ | undefined;
162
+ accessUntil?: l.DatetimeString
163
+ /**
164
+ * Creation timestamp
165
+ */
166
+ | undefined;
167
+ $type: "com.atiproto.subscription";
168
+ }, $parse: (input: unknown, options?: l.ParseOptions) => {
169
+ subject: l.DidString;
170
+ amount: number;
171
+ currency: string;
172
+ status: string;
173
+ createdAt: l.DatetimeString;
174
+ interval: string;
175
+ billingStartDate: l.DatetimeString;
176
+ cancelledAt?: l.DatetimeString
177
+ /**
178
+ * Date until which the subscriber retains access after cancellation
179
+ */
180
+ | undefined;
181
+ accessUntil?: l.DatetimeString
182
+ /**
183
+ * Creation timestamp
184
+ */
185
+ | undefined;
186
+ $type: "com.atiproto.subscription";
187
+ }, $safeParse: (input: unknown, options?: l.ParseOptions) => l.ValidationResult<{
188
+ subject: l.DidString;
189
+ amount: number;
190
+ currency: string;
191
+ status: string;
192
+ createdAt: l.DatetimeString;
193
+ interval: string;
194
+ billingStartDate: l.DatetimeString;
195
+ cancelledAt?: l.DatetimeString
196
+ /**
197
+ * Date until which the subscriber retains access after cancellation
198
+ */
199
+ | undefined;
200
+ accessUntil?: l.DatetimeString
201
+ /**
202
+ * Creation timestamp
203
+ */
204
+ | undefined;
205
+ $type: "com.atiproto.subscription";
206
+ }>, $validate: <I>(input: I, options?: l.ValidateOptions) => I & {
207
+ subject: l.DidString;
208
+ amount: number;
209
+ currency: string;
210
+ status: string;
211
+ createdAt: l.DatetimeString;
212
+ interval: string;
213
+ billingStartDate: l.DatetimeString;
214
+ cancelledAt?: l.DatetimeString
215
+ /**
216
+ * Date until which the subscriber retains access after cancellation
217
+ */
218
+ | undefined;
219
+ accessUntil?: l.DatetimeString
220
+ /**
221
+ * Creation timestamp
222
+ */
223
+ | undefined;
224
+ $type: "com.atiproto.subscription";
225
+ }, $safeValidate: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
226
+ subject: l.DidString;
227
+ amount: number;
228
+ currency: string;
229
+ status: string;
230
+ createdAt: l.DatetimeString;
231
+ interval: string;
232
+ billingStartDate: l.DatetimeString;
233
+ cancelledAt?: l.DatetimeString
234
+ /**
235
+ * Date until which the subscriber retains access after cancellation
236
+ */
237
+ | undefined;
238
+ accessUntil?: l.DatetimeString
239
+ /**
240
+ * Creation timestamp
241
+ */
242
+ | undefined;
243
+ $type: "com.atiproto.subscription";
244
+ }>;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /*
3
+ * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.$safeValidate = exports.$validate = exports.$safeParse = exports.$parse = exports.$matches = exports.$ifMatches = exports.$cast = exports.$check = exports.$assert = exports.$type = exports.$build = exports.$isTypeOf = exports.main = exports.$nsid = void 0;
7
+ const lex_1 = require("@atproto/lex");
8
+ const $nsid = 'com.atiproto.subscription';
9
+ exports.$nsid = $nsid;
10
+ /** A record representing a subscription from one user to another */
11
+ const main = lex_1.l.record('any', $nsid, lex_1.l.object({
12
+ subject: lex_1.l.string({ format: 'did' }),
13
+ amount: lex_1.l.integer({ minimum: 0 }),
14
+ currency: lex_1.l.string(),
15
+ interval: lex_1.l.string(),
16
+ status: lex_1.l.string(),
17
+ billingStartDate: lex_1.l.string({ format: 'datetime' }),
18
+ cancelledAt: lex_1.l.optional(lex_1.l.string({ format: 'datetime' })),
19
+ accessUntil: lex_1.l.optional(lex_1.l.string({ format: 'datetime' })),
20
+ createdAt: lex_1.l.string({ format: 'datetime' }),
21
+ }));
22
+ exports.main = main;
23
+ exports.$isTypeOf = main.isTypeOf.bind(main), exports.$build = main.build.bind(main), exports.$type = main.$type;
24
+ exports.$assert = main.assert.bind(main), exports.$check = main.check.bind(main), exports.$cast = main.cast.bind(main), exports.$ifMatches = main.ifMatches.bind(main), exports.$matches = main.matches.bind(main), exports.$parse = main.parse.bind(main), exports.$safeParse = main.safeParse.bind(main), exports.$validate = main.validate.bind(main), exports.$safeValidate = main.safeValidate.bind(main);
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /*
3
+ * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
23
+ };
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.$defs = void 0;
43
+ __exportStar(require("./subscription.defs.js"), exports);
44
+ exports.$defs = __importStar(require("./subscription.defs.js"));
@@ -0,0 +1,2 @@
1
+ export * from './tip.defs.js';
2
+ export * as $defs from './tip.defs.js';
@@ -0,0 +1,230 @@
1
+ import { l } from '@atproto/lex';
2
+ declare const $nsid = "com.atiproto.tip";
3
+ export { $nsid };
4
+ /** A record representing a tip given by one user to another */
5
+ type Main = {
6
+ $type: 'com.atiproto.tip';
7
+ /**
8
+ * DID of the user receiving the tip
9
+ */
10
+ subject: l.DidString;
11
+ /**
12
+ * AT-URI of specific record being tipped
13
+ */
14
+ recordUri?: l.AtUriString;
15
+ /**
16
+ * Tip amount in cents (0 when recipient allows zero tips)
17
+ */
18
+ amount: number;
19
+ /**
20
+ * ISO 4217 currency code
21
+ */
22
+ currency: string;
23
+ /**
24
+ * Tip status: pending, authorized (payment held), completed, failed, refunded
25
+ */
26
+ status: 'pending' | 'authorized' | 'completed' | 'failed' | 'refunded';
27
+ /**
28
+ * Optional message (max 500 chars)
29
+ */
30
+ message?: string;
31
+ /**
32
+ * Creation timestamp
33
+ */
34
+ createdAt: l.DatetimeString;
35
+ /**
36
+ * Completion timestamp
37
+ */
38
+ completedAt?: l.DatetimeString;
39
+ };
40
+ export type { Main };
41
+ /** A record representing a tip given by one user to another */
42
+ declare const main: l.RecordSchema<"any", "com.atiproto.tip", l.Validator<Omit<Main, "$type">, Omit<Main, "$type">>>;
43
+ export { main };
44
+ export declare const $isTypeOf: <TValue extends {
45
+ $type?: unknown;
46
+ }>(value: TValue) => value is l.TypedRecord<"com.atiproto.tip", TValue>, $build: {
47
+ (input: Omit<Omit<Main, "$type">, "$type">): {
48
+ subject: l.DidString;
49
+ recordUri?: l.AtUriString
50
+ /**
51
+ * Tip amount in cents (0 when recipient allows zero tips)
52
+ */
53
+ | undefined;
54
+ amount: number;
55
+ currency: string;
56
+ status: "pending" | "authorized" | "completed" | "failed" | "refunded";
57
+ message?: string
58
+ /**
59
+ * Creation timestamp
60
+ */
61
+ | undefined;
62
+ createdAt: l.DatetimeString;
63
+ completedAt?: l.DatetimeString | undefined;
64
+ $type: "com.atiproto.tip";
65
+ };
66
+ (input: Omit<Omit<Main, "$type">, "$type">): {
67
+ subject: l.DidString;
68
+ recordUri?: l.AtUriString
69
+ /**
70
+ * Tip amount in cents (0 when recipient allows zero tips)
71
+ */
72
+ | undefined;
73
+ amount: number;
74
+ currency: string;
75
+ status: "pending" | "authorized" | "completed" | "failed" | "refunded";
76
+ message?: string
77
+ /**
78
+ * Creation timestamp
79
+ */
80
+ | undefined;
81
+ createdAt: l.DatetimeString;
82
+ completedAt?: l.DatetimeString | undefined;
83
+ $type: "com.atiproto.tip";
84
+ };
85
+ }, $type: "com.atiproto.tip";
86
+ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => asserts input is {
87
+ subject: l.DidString;
88
+ recordUri?: l.AtUriString
89
+ /**
90
+ * Tip amount in cents (0 when recipient allows zero tips)
91
+ */
92
+ | undefined;
93
+ amount: number;
94
+ currency: string;
95
+ status: "pending" | "authorized" | "completed" | "failed" | "refunded";
96
+ message?: string
97
+ /**
98
+ * Creation timestamp
99
+ */
100
+ | undefined;
101
+ createdAt: l.DatetimeString;
102
+ completedAt?: l.DatetimeString | undefined;
103
+ $type: "com.atiproto.tip";
104
+ }, $check: (input: unknown, options?: l.ValidateOptions) => void, $cast: <I>(input: I, options?: l.ValidateOptions) => I & {
105
+ subject: l.DidString;
106
+ recordUri?: l.AtUriString
107
+ /**
108
+ * Tip amount in cents (0 when recipient allows zero tips)
109
+ */
110
+ | undefined;
111
+ amount: number;
112
+ currency: string;
113
+ status: "pending" | "authorized" | "completed" | "failed" | "refunded";
114
+ message?: string
115
+ /**
116
+ * Creation timestamp
117
+ */
118
+ | undefined;
119
+ createdAt: l.DatetimeString;
120
+ completedAt?: l.DatetimeString | undefined;
121
+ $type: "com.atiproto.tip";
122
+ }, $ifMatches: <I>(input: I, options?: l.ValidateOptions) => (I & {
123
+ subject: l.DidString;
124
+ recordUri?: l.AtUriString
125
+ /**
126
+ * Tip amount in cents (0 when recipient allows zero tips)
127
+ */
128
+ | undefined;
129
+ amount: number;
130
+ currency: string;
131
+ status: "pending" | "authorized" | "completed" | "failed" | "refunded";
132
+ message?: string
133
+ /**
134
+ * Creation timestamp
135
+ */
136
+ | undefined;
137
+ createdAt: l.DatetimeString;
138
+ completedAt?: l.DatetimeString | undefined;
139
+ $type: "com.atiproto.tip";
140
+ }) | undefined, $matches: <I>(input: I, options?: l.ValidateOptions) => input is I & {
141
+ subject: l.DidString;
142
+ recordUri?: l.AtUriString
143
+ /**
144
+ * Tip amount in cents (0 when recipient allows zero tips)
145
+ */
146
+ | undefined;
147
+ amount: number;
148
+ currency: string;
149
+ status: "pending" | "authorized" | "completed" | "failed" | "refunded";
150
+ message?: string
151
+ /**
152
+ * Creation timestamp
153
+ */
154
+ | undefined;
155
+ createdAt: l.DatetimeString;
156
+ completedAt?: l.DatetimeString | undefined;
157
+ $type: "com.atiproto.tip";
158
+ }, $parse: (input: unknown, options?: l.ParseOptions) => {
159
+ subject: l.DidString;
160
+ recordUri?: l.AtUriString
161
+ /**
162
+ * Tip amount in cents (0 when recipient allows zero tips)
163
+ */
164
+ | undefined;
165
+ amount: number;
166
+ currency: string;
167
+ status: "pending" | "authorized" | "completed" | "failed" | "refunded";
168
+ message?: string
169
+ /**
170
+ * Creation timestamp
171
+ */
172
+ | undefined;
173
+ createdAt: l.DatetimeString;
174
+ completedAt?: l.DatetimeString | undefined;
175
+ $type: "com.atiproto.tip";
176
+ }, $safeParse: (input: unknown, options?: l.ParseOptions) => l.ValidationResult<{
177
+ subject: l.DidString;
178
+ recordUri?: l.AtUriString
179
+ /**
180
+ * Tip amount in cents (0 when recipient allows zero tips)
181
+ */
182
+ | undefined;
183
+ amount: number;
184
+ currency: string;
185
+ status: "pending" | "authorized" | "completed" | "failed" | "refunded";
186
+ message?: string
187
+ /**
188
+ * Creation timestamp
189
+ */
190
+ | undefined;
191
+ createdAt: l.DatetimeString;
192
+ completedAt?: l.DatetimeString | undefined;
193
+ $type: "com.atiproto.tip";
194
+ }>, $validate: <I>(input: I, options?: l.ValidateOptions) => I & {
195
+ subject: l.DidString;
196
+ recordUri?: l.AtUriString
197
+ /**
198
+ * Tip amount in cents (0 when recipient allows zero tips)
199
+ */
200
+ | undefined;
201
+ amount: number;
202
+ currency: string;
203
+ status: "pending" | "authorized" | "completed" | "failed" | "refunded";
204
+ message?: string
205
+ /**
206
+ * Creation timestamp
207
+ */
208
+ | undefined;
209
+ createdAt: l.DatetimeString;
210
+ completedAt?: l.DatetimeString | undefined;
211
+ $type: "com.atiproto.tip";
212
+ }, $safeValidate: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
213
+ subject: l.DidString;
214
+ recordUri?: l.AtUriString
215
+ /**
216
+ * Tip amount in cents (0 when recipient allows zero tips)
217
+ */
218
+ | undefined;
219
+ amount: number;
220
+ currency: string;
221
+ status: "pending" | "authorized" | "completed" | "failed" | "refunded";
222
+ message?: string
223
+ /**
224
+ * Creation timestamp
225
+ */
226
+ | undefined;
227
+ createdAt: l.DatetimeString;
228
+ completedAt?: l.DatetimeString | undefined;
229
+ $type: "com.atiproto.tip";
230
+ }>;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ /*
3
+ * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.$safeValidate = exports.$validate = exports.$safeParse = exports.$parse = exports.$matches = exports.$ifMatches = exports.$cast = exports.$check = exports.$assert = exports.$type = exports.$build = exports.$isTypeOf = exports.main = exports.$nsid = void 0;
7
+ const lex_1 = require("@atproto/lex");
8
+ const $nsid = 'com.atiproto.tip';
9
+ exports.$nsid = $nsid;
10
+ /** A record representing a tip given by one user to another */
11
+ const main = lex_1.l.record('any', $nsid, lex_1.l.object({
12
+ subject: lex_1.l.string({ format: 'did' }),
13
+ recordUri: lex_1.l.optional(lex_1.l.string({ format: 'at-uri' })),
14
+ amount: lex_1.l.integer({ minimum: 0 }),
15
+ currency: lex_1.l.string(),
16
+ status: lex_1.l.enum([
17
+ 'pending',
18
+ 'authorized',
19
+ 'completed',
20
+ 'failed',
21
+ 'refunded',
22
+ ]),
23
+ message: lex_1.l.optional(lex_1.l.string({ maxGraphemes: 500, maxLength: 5000 })),
24
+ createdAt: lex_1.l.string({ format: 'datetime' }),
25
+ completedAt: lex_1.l.optional(lex_1.l.string({ format: 'datetime' })),
26
+ }));
27
+ exports.main = main;
28
+ exports.$isTypeOf = main.isTypeOf.bind(main), exports.$build = main.build.bind(main), exports.$type = main.$type;
29
+ exports.$assert = main.assert.bind(main), exports.$check = main.check.bind(main), exports.$cast = main.cast.bind(main), exports.$ifMatches = main.ifMatches.bind(main), exports.$matches = main.matches.bind(main), exports.$parse = main.parse.bind(main), exports.$safeParse = main.safeParse.bind(main), exports.$validate = main.validate.bind(main), exports.$safeValidate = main.safeValidate.bind(main);
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /*
3
+ * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
23
+ };
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.$defs = void 0;
43
+ __exportStar(require("./tip.defs.js"), exports);
44
+ exports.$defs = __importStar(require("./tip.defs.js"));
@@ -0,0 +1,7 @@
1
+ export * as account from './atiproto/account.js';
2
+ export * as cart from './atiproto/cart.js';
3
+ export * as feed from './atiproto/feed.js';
4
+ export * as profile from './atiproto/profile.js';
5
+ export * as repo from './atiproto/repo.js';
6
+ export * as subscription from './atiproto/subscription.js';
7
+ export * as tip from './atiproto/tip.js';
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ /*
3
+ * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.tip = exports.subscription = exports.repo = exports.profile = exports.feed = exports.cart = exports.account = void 0;
40
+ exports.account = __importStar(require("./atiproto/account.js"));
41
+ exports.cart = __importStar(require("./atiproto/cart.js"));
42
+ exports.feed = __importStar(require("./atiproto/feed.js"));
43
+ exports.profile = __importStar(require("./atiproto/profile.js"));
44
+ exports.repo = __importStar(require("./atiproto/repo.js"));
45
+ exports.subscription = __importStar(require("./atiproto/subscription.js"));
46
+ exports.tip = __importStar(require("./atiproto/tip.js"));
@@ -0,0 +1 @@
1
+ export * as atiproto from './com/atiproto.js';