@atiproto/lexicons 0.0.1 → 0.1.0
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/lexicons/com/atiproto/account/profile/put.defs.d.ts +2 -8
- package/dist/lexicons/com/atiproto/account/profile/put.defs.js +1 -4
- package/dist/lexicons/com/atiproto/profile.defs.d.ts +20 -169
- package/dist/lexicons/com/atiproto/profile.defs.js +1 -13
- package/dist/lexicons/com/atiproto/repo/subscription/validate.defs.d.ts +3 -3
- package/dist/lexicons/com/atiproto/repo/subscription/validate.defs.js +2 -2
- package/dist/lexicons/com/atiproto/repo/tip/validate.defs.d.ts +2 -2
- package/dist/lexicons/com/atiproto/repo/tip/validate.defs.js +1 -1
- package/dist/schemas/account/profile/put.json +2 -18
- package/dist/schemas/profile.json +0 -49
- package/dist/schemas/repo/subscription/validate.json +3 -3
- package/dist/schemas/repo/tip/validate.json +2 -2
- package/package.json +1 -1
|
@@ -6,10 +6,7 @@ export { $nsid };
|
|
|
6
6
|
declare const main: l.Procedure<"com.atiproto.account.profile.put", l.ParamsSchema<{}>, l.Payload<"application/json", l.ObjectSchema<{
|
|
7
7
|
acceptsTips: l.OptionalSchema<l.BooleanSchema>;
|
|
8
8
|
acceptsSubscriptions: l.OptionalSchema<l.BooleanSchema>;
|
|
9
|
-
|
|
10
|
-
allowZeroTips: l.OptionalSchema<l.BooleanSchema>;
|
|
11
|
-
minimumTip: l.OptionalSchema<l.IntegerSchema>;
|
|
12
|
-
subscriptionTiers: l.OptionalSchema<l.ArraySchema<l.RefSchema<l.Validator<AtiprotoProfile.SubscriptionTier, AtiprotoProfile.SubscriptionTier>>>>;
|
|
9
|
+
disableReceiptNotifications: l.OptionalSchema<l.BooleanSchema>;
|
|
13
10
|
}>>, l.Payload<"application/json", l.ObjectSchema<{
|
|
14
11
|
uri: l.StringSchema<{
|
|
15
12
|
readonly format: "at-uri";
|
|
@@ -30,10 +27,7 @@ export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main,
|
|
|
30
27
|
export declare const $lxm: "com.atiproto.account.profile.put", $params: l.ParamsSchema<{}>, $input: l.Payload<"application/json", l.ObjectSchema<{
|
|
31
28
|
acceptsTips: l.OptionalSchema<l.BooleanSchema>;
|
|
32
29
|
acceptsSubscriptions: l.OptionalSchema<l.BooleanSchema>;
|
|
33
|
-
|
|
34
|
-
allowZeroTips: l.OptionalSchema<l.BooleanSchema>;
|
|
35
|
-
minimumTip: l.OptionalSchema<l.IntegerSchema>;
|
|
36
|
-
subscriptionTiers: l.OptionalSchema<l.ArraySchema<l.RefSchema<l.Validator<AtiprotoProfile.SubscriptionTier, AtiprotoProfile.SubscriptionTier>>>>;
|
|
30
|
+
disableReceiptNotifications: l.OptionalSchema<l.BooleanSchema>;
|
|
37
31
|
}>>, $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
38
32
|
uri: l.StringSchema<{
|
|
39
33
|
readonly format: "at-uri";
|
|
@@ -45,10 +45,7 @@ exports.$nsid = $nsid;
|
|
|
45
45
|
const main = lex_1.l.procedure($nsid, lex_1.l.params(), lex_1.l.jsonPayload({
|
|
46
46
|
acceptsTips: lex_1.l.optional(lex_1.l.boolean()),
|
|
47
47
|
acceptsSubscriptions: lex_1.l.optional(lex_1.l.boolean()),
|
|
48
|
-
|
|
49
|
-
allowZeroTips: lex_1.l.optional(lex_1.l.boolean()),
|
|
50
|
-
minimumTip: lex_1.l.optional(lex_1.l.integer()),
|
|
51
|
-
subscriptionTiers: lex_1.l.optional(lex_1.l.array(lex_1.l.ref((() => AtiprotoProfile.subscriptionTier)))),
|
|
48
|
+
disableReceiptNotifications: lex_1.l.optional(lex_1.l.boolean()),
|
|
52
49
|
}), lex_1.l.jsonPayload({
|
|
53
50
|
uri: lex_1.l.string({ format: 'at-uri' }),
|
|
54
51
|
cid: lex_1.l.string({ format: 'cid' }),
|
|
@@ -12,19 +12,10 @@ type Main = {
|
|
|
12
12
|
* Whether user accepts subscriptions (default: true)
|
|
13
13
|
*/
|
|
14
14
|
acceptsSubscriptions?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Allow $0 tips (default: false)
|
|
17
|
-
*/
|
|
18
|
-
allowZeroTips?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Minimum tip amount in cents (default: 100)
|
|
21
|
-
*/
|
|
22
|
-
minimumTip?: number;
|
|
23
15
|
/**
|
|
24
16
|
* Opt out of payment receipt DMs (default: false)
|
|
25
17
|
*/
|
|
26
18
|
disableReceiptNotifications?: boolean;
|
|
27
|
-
subscriptionTiers?: SubscriptionTier[];
|
|
28
19
|
/**
|
|
29
20
|
* Creation timestamp
|
|
30
21
|
*/
|
|
@@ -42,336 +33,196 @@ export declare const $isTypeOf: <TValue extends {
|
|
|
42
33
|
$type?: unknown;
|
|
43
34
|
}>(value: TValue) => value is l.TypedRecord<"com.atiproto.profile", TValue>, $build: {
|
|
44
35
|
(input: Omit<Omit<Main, "$type">, "$type">): {
|
|
45
|
-
createdAt: l.DatetimeString;
|
|
46
36
|
acceptsTips?: boolean
|
|
47
37
|
/**
|
|
48
38
|
* Whether user accepts subscriptions (default: true)
|
|
49
39
|
*/
|
|
50
40
|
| undefined;
|
|
51
41
|
acceptsSubscriptions?: boolean
|
|
52
|
-
/**
|
|
53
|
-
* Allow $0 tips (default: false)
|
|
54
|
-
*/
|
|
55
|
-
| undefined;
|
|
56
|
-
allowZeroTips?: boolean
|
|
57
|
-
/**
|
|
58
|
-
* Minimum tip amount in cents (default: 100)
|
|
59
|
-
*/
|
|
60
|
-
| undefined;
|
|
61
|
-
minimumTip?: number
|
|
62
42
|
/**
|
|
63
43
|
* Opt out of payment receipt DMs (default: false)
|
|
64
44
|
*/
|
|
65
45
|
| undefined;
|
|
66
|
-
disableReceiptNotifications?: boolean
|
|
67
|
-
subscriptionTiers?: SubscriptionTier[]
|
|
46
|
+
disableReceiptNotifications?: boolean
|
|
68
47
|
/**
|
|
69
48
|
* Creation timestamp
|
|
70
49
|
*/
|
|
71
50
|
| undefined;
|
|
51
|
+
createdAt: l.DatetimeString;
|
|
72
52
|
updatedAt?: l.DatetimeString | undefined;
|
|
73
53
|
$type: "com.atiproto.profile";
|
|
74
54
|
};
|
|
75
55
|
(input: Omit<Omit<Main, "$type">, "$type">): {
|
|
76
|
-
createdAt: l.DatetimeString;
|
|
77
56
|
acceptsTips?: boolean
|
|
78
57
|
/**
|
|
79
58
|
* Whether user accepts subscriptions (default: true)
|
|
80
59
|
*/
|
|
81
60
|
| undefined;
|
|
82
61
|
acceptsSubscriptions?: boolean
|
|
83
|
-
/**
|
|
84
|
-
* Allow $0 tips (default: false)
|
|
85
|
-
*/
|
|
86
|
-
| undefined;
|
|
87
|
-
allowZeroTips?: boolean
|
|
88
|
-
/**
|
|
89
|
-
* Minimum tip amount in cents (default: 100)
|
|
90
|
-
*/
|
|
91
|
-
| undefined;
|
|
92
|
-
minimumTip?: number
|
|
93
62
|
/**
|
|
94
63
|
* Opt out of payment receipt DMs (default: false)
|
|
95
64
|
*/
|
|
96
65
|
| undefined;
|
|
97
|
-
disableReceiptNotifications?: boolean
|
|
98
|
-
subscriptionTiers?: SubscriptionTier[]
|
|
66
|
+
disableReceiptNotifications?: boolean
|
|
99
67
|
/**
|
|
100
68
|
* Creation timestamp
|
|
101
69
|
*/
|
|
102
70
|
| undefined;
|
|
71
|
+
createdAt: l.DatetimeString;
|
|
103
72
|
updatedAt?: l.DatetimeString | undefined;
|
|
104
73
|
$type: "com.atiproto.profile";
|
|
105
74
|
};
|
|
106
75
|
}, $type: "com.atiproto.profile";
|
|
107
76
|
export declare const $assert: (input: unknown, options?: l.ValidateOptions) => asserts input is {
|
|
108
|
-
createdAt: l.DatetimeString;
|
|
109
77
|
acceptsTips?: boolean
|
|
110
78
|
/**
|
|
111
79
|
* Whether user accepts subscriptions (default: true)
|
|
112
80
|
*/
|
|
113
81
|
| undefined;
|
|
114
82
|
acceptsSubscriptions?: boolean
|
|
115
|
-
/**
|
|
116
|
-
* Allow $0 tips (default: false)
|
|
117
|
-
*/
|
|
118
|
-
| undefined;
|
|
119
|
-
allowZeroTips?: boolean
|
|
120
|
-
/**
|
|
121
|
-
* Minimum tip amount in cents (default: 100)
|
|
122
|
-
*/
|
|
123
|
-
| undefined;
|
|
124
|
-
minimumTip?: number
|
|
125
83
|
/**
|
|
126
84
|
* Opt out of payment receipt DMs (default: false)
|
|
127
85
|
*/
|
|
128
86
|
| undefined;
|
|
129
|
-
disableReceiptNotifications?: boolean
|
|
130
|
-
subscriptionTiers?: SubscriptionTier[]
|
|
87
|
+
disableReceiptNotifications?: boolean
|
|
131
88
|
/**
|
|
132
89
|
* Creation timestamp
|
|
133
90
|
*/
|
|
134
91
|
| undefined;
|
|
92
|
+
createdAt: l.DatetimeString;
|
|
135
93
|
updatedAt?: l.DatetimeString | undefined;
|
|
136
94
|
$type: "com.atiproto.profile";
|
|
137
95
|
}, $check: (input: unknown, options?: l.ValidateOptions) => void, $cast: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
138
|
-
createdAt: l.DatetimeString;
|
|
139
96
|
acceptsTips?: boolean
|
|
140
97
|
/**
|
|
141
98
|
* Whether user accepts subscriptions (default: true)
|
|
142
99
|
*/
|
|
143
100
|
| undefined;
|
|
144
101
|
acceptsSubscriptions?: boolean
|
|
145
|
-
/**
|
|
146
|
-
* Allow $0 tips (default: false)
|
|
147
|
-
*/
|
|
148
|
-
| undefined;
|
|
149
|
-
allowZeroTips?: boolean
|
|
150
|
-
/**
|
|
151
|
-
* Minimum tip amount in cents (default: 100)
|
|
152
|
-
*/
|
|
153
|
-
| undefined;
|
|
154
|
-
minimumTip?: number
|
|
155
102
|
/**
|
|
156
103
|
* Opt out of payment receipt DMs (default: false)
|
|
157
104
|
*/
|
|
158
105
|
| undefined;
|
|
159
|
-
disableReceiptNotifications?: boolean
|
|
160
|
-
subscriptionTiers?: SubscriptionTier[]
|
|
106
|
+
disableReceiptNotifications?: boolean
|
|
161
107
|
/**
|
|
162
108
|
* Creation timestamp
|
|
163
109
|
*/
|
|
164
110
|
| undefined;
|
|
111
|
+
createdAt: l.DatetimeString;
|
|
165
112
|
updatedAt?: l.DatetimeString | undefined;
|
|
166
113
|
$type: "com.atiproto.profile";
|
|
167
114
|
}, $ifMatches: <I>(input: I, options?: l.ValidateOptions) => (I & {
|
|
168
|
-
createdAt: l.DatetimeString;
|
|
169
115
|
acceptsTips?: boolean
|
|
170
116
|
/**
|
|
171
117
|
* Whether user accepts subscriptions (default: true)
|
|
172
118
|
*/
|
|
173
119
|
| undefined;
|
|
174
120
|
acceptsSubscriptions?: boolean
|
|
175
|
-
/**
|
|
176
|
-
* Allow $0 tips (default: false)
|
|
177
|
-
*/
|
|
178
|
-
| undefined;
|
|
179
|
-
allowZeroTips?: boolean
|
|
180
|
-
/**
|
|
181
|
-
* Minimum tip amount in cents (default: 100)
|
|
182
|
-
*/
|
|
183
|
-
| undefined;
|
|
184
|
-
minimumTip?: number
|
|
185
121
|
/**
|
|
186
122
|
* Opt out of payment receipt DMs (default: false)
|
|
187
123
|
*/
|
|
188
124
|
| undefined;
|
|
189
|
-
disableReceiptNotifications?: boolean
|
|
190
|
-
subscriptionTiers?: SubscriptionTier[]
|
|
125
|
+
disableReceiptNotifications?: boolean
|
|
191
126
|
/**
|
|
192
127
|
* Creation timestamp
|
|
193
128
|
*/
|
|
194
129
|
| undefined;
|
|
130
|
+
createdAt: l.DatetimeString;
|
|
195
131
|
updatedAt?: l.DatetimeString | undefined;
|
|
196
132
|
$type: "com.atiproto.profile";
|
|
197
133
|
}) | undefined, $matches: <I>(input: I, options?: l.ValidateOptions) => input is I & {
|
|
198
|
-
createdAt: l.DatetimeString;
|
|
199
134
|
acceptsTips?: boolean
|
|
200
135
|
/**
|
|
201
136
|
* Whether user accepts subscriptions (default: true)
|
|
202
137
|
*/
|
|
203
138
|
| undefined;
|
|
204
139
|
acceptsSubscriptions?: boolean
|
|
205
|
-
/**
|
|
206
|
-
* Allow $0 tips (default: false)
|
|
207
|
-
*/
|
|
208
|
-
| undefined;
|
|
209
|
-
allowZeroTips?: boolean
|
|
210
|
-
/**
|
|
211
|
-
* Minimum tip amount in cents (default: 100)
|
|
212
|
-
*/
|
|
213
|
-
| undefined;
|
|
214
|
-
minimumTip?: number
|
|
215
140
|
/**
|
|
216
141
|
* Opt out of payment receipt DMs (default: false)
|
|
217
142
|
*/
|
|
218
143
|
| undefined;
|
|
219
|
-
disableReceiptNotifications?: boolean
|
|
220
|
-
subscriptionTiers?: SubscriptionTier[]
|
|
144
|
+
disableReceiptNotifications?: boolean
|
|
221
145
|
/**
|
|
222
146
|
* Creation timestamp
|
|
223
147
|
*/
|
|
224
148
|
| undefined;
|
|
149
|
+
createdAt: l.DatetimeString;
|
|
225
150
|
updatedAt?: l.DatetimeString | undefined;
|
|
226
151
|
$type: "com.atiproto.profile";
|
|
227
152
|
}, $parse: (input: unknown, options?: l.ParseOptions) => {
|
|
228
|
-
createdAt: l.DatetimeString;
|
|
229
153
|
acceptsTips?: boolean
|
|
230
154
|
/**
|
|
231
155
|
* Whether user accepts subscriptions (default: true)
|
|
232
156
|
*/
|
|
233
157
|
| undefined;
|
|
234
158
|
acceptsSubscriptions?: boolean
|
|
235
|
-
/**
|
|
236
|
-
* Allow $0 tips (default: false)
|
|
237
|
-
*/
|
|
238
|
-
| undefined;
|
|
239
|
-
allowZeroTips?: boolean
|
|
240
|
-
/**
|
|
241
|
-
* Minimum tip amount in cents (default: 100)
|
|
242
|
-
*/
|
|
243
|
-
| undefined;
|
|
244
|
-
minimumTip?: number
|
|
245
159
|
/**
|
|
246
160
|
* Opt out of payment receipt DMs (default: false)
|
|
247
161
|
*/
|
|
248
162
|
| undefined;
|
|
249
|
-
disableReceiptNotifications?: boolean
|
|
250
|
-
subscriptionTiers?: SubscriptionTier[]
|
|
163
|
+
disableReceiptNotifications?: boolean
|
|
251
164
|
/**
|
|
252
165
|
* Creation timestamp
|
|
253
166
|
*/
|
|
254
167
|
| undefined;
|
|
168
|
+
createdAt: l.DatetimeString;
|
|
255
169
|
updatedAt?: l.DatetimeString | undefined;
|
|
256
170
|
$type: "com.atiproto.profile";
|
|
257
171
|
}, $safeParse: (input: unknown, options?: l.ParseOptions) => l.ValidationResult<{
|
|
258
|
-
createdAt: l.DatetimeString;
|
|
259
172
|
acceptsTips?: boolean
|
|
260
173
|
/**
|
|
261
174
|
* Whether user accepts subscriptions (default: true)
|
|
262
175
|
*/
|
|
263
176
|
| undefined;
|
|
264
177
|
acceptsSubscriptions?: boolean
|
|
265
|
-
/**
|
|
266
|
-
* Allow $0 tips (default: false)
|
|
267
|
-
*/
|
|
268
|
-
| undefined;
|
|
269
|
-
allowZeroTips?: boolean
|
|
270
|
-
/**
|
|
271
|
-
* Minimum tip amount in cents (default: 100)
|
|
272
|
-
*/
|
|
273
|
-
| undefined;
|
|
274
|
-
minimumTip?: number
|
|
275
178
|
/**
|
|
276
179
|
* Opt out of payment receipt DMs (default: false)
|
|
277
180
|
*/
|
|
278
181
|
| undefined;
|
|
279
|
-
disableReceiptNotifications?: boolean
|
|
280
|
-
subscriptionTiers?: SubscriptionTier[]
|
|
182
|
+
disableReceiptNotifications?: boolean
|
|
281
183
|
/**
|
|
282
184
|
* Creation timestamp
|
|
283
185
|
*/
|
|
284
186
|
| undefined;
|
|
187
|
+
createdAt: l.DatetimeString;
|
|
285
188
|
updatedAt?: l.DatetimeString | undefined;
|
|
286
189
|
$type: "com.atiproto.profile";
|
|
287
190
|
}>, $validate: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
288
|
-
createdAt: l.DatetimeString;
|
|
289
191
|
acceptsTips?: boolean
|
|
290
192
|
/**
|
|
291
193
|
* Whether user accepts subscriptions (default: true)
|
|
292
194
|
*/
|
|
293
195
|
| undefined;
|
|
294
196
|
acceptsSubscriptions?: boolean
|
|
295
|
-
/**
|
|
296
|
-
* Allow $0 tips (default: false)
|
|
297
|
-
*/
|
|
298
|
-
| undefined;
|
|
299
|
-
allowZeroTips?: boolean
|
|
300
|
-
/**
|
|
301
|
-
* Minimum tip amount in cents (default: 100)
|
|
302
|
-
*/
|
|
303
|
-
| undefined;
|
|
304
|
-
minimumTip?: number
|
|
305
197
|
/**
|
|
306
198
|
* Opt out of payment receipt DMs (default: false)
|
|
307
199
|
*/
|
|
308
200
|
| undefined;
|
|
309
|
-
disableReceiptNotifications?: boolean
|
|
310
|
-
subscriptionTiers?: SubscriptionTier[]
|
|
201
|
+
disableReceiptNotifications?: boolean
|
|
311
202
|
/**
|
|
312
203
|
* Creation timestamp
|
|
313
204
|
*/
|
|
314
205
|
| undefined;
|
|
206
|
+
createdAt: l.DatetimeString;
|
|
315
207
|
updatedAt?: l.DatetimeString | undefined;
|
|
316
208
|
$type: "com.atiproto.profile";
|
|
317
209
|
}, $safeValidate: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
|
|
318
|
-
createdAt: l.DatetimeString;
|
|
319
210
|
acceptsTips?: boolean
|
|
320
211
|
/**
|
|
321
212
|
* Whether user accepts subscriptions (default: true)
|
|
322
213
|
*/
|
|
323
214
|
| undefined;
|
|
324
215
|
acceptsSubscriptions?: boolean
|
|
325
|
-
/**
|
|
326
|
-
* Allow $0 tips (default: false)
|
|
327
|
-
*/
|
|
328
|
-
| undefined;
|
|
329
|
-
allowZeroTips?: boolean
|
|
330
|
-
/**
|
|
331
|
-
* Minimum tip amount in cents (default: 100)
|
|
332
|
-
*/
|
|
333
|
-
| undefined;
|
|
334
|
-
minimumTip?: number
|
|
335
216
|
/**
|
|
336
217
|
* Opt out of payment receipt DMs (default: false)
|
|
337
218
|
*/
|
|
338
219
|
| undefined;
|
|
339
|
-
disableReceiptNotifications?: boolean
|
|
340
|
-
subscriptionTiers?: SubscriptionTier[]
|
|
220
|
+
disableReceiptNotifications?: boolean
|
|
341
221
|
/**
|
|
342
222
|
* Creation timestamp
|
|
343
223
|
*/
|
|
344
224
|
| undefined;
|
|
225
|
+
createdAt: l.DatetimeString;
|
|
345
226
|
updatedAt?: l.DatetimeString | undefined;
|
|
346
227
|
$type: "com.atiproto.profile";
|
|
347
228
|
}>;
|
|
348
|
-
type SubscriptionTier = {
|
|
349
|
-
$type?: 'com.atiproto.profile#subscriptionTier';
|
|
350
|
-
/**
|
|
351
|
-
* Unique tier identifier
|
|
352
|
-
*/
|
|
353
|
-
id: string;
|
|
354
|
-
/**
|
|
355
|
-
* Display name
|
|
356
|
-
*/
|
|
357
|
-
name: string;
|
|
358
|
-
/**
|
|
359
|
-
* Amount in cents (0 for free tiers)
|
|
360
|
-
*/
|
|
361
|
-
amount: number;
|
|
362
|
-
/**
|
|
363
|
-
* Billing interval: monthly or yearly
|
|
364
|
-
*/
|
|
365
|
-
interval: string;
|
|
366
|
-
/**
|
|
367
|
-
* Tier description
|
|
368
|
-
*/
|
|
369
|
-
description?: string;
|
|
370
|
-
/**
|
|
371
|
-
* List of benefit strings
|
|
372
|
-
*/
|
|
373
|
-
benefits?: string[];
|
|
374
|
-
};
|
|
375
|
-
export type { SubscriptionTier };
|
|
376
|
-
declare const subscriptionTier: l.TypedObjectSchema<"com.atiproto.profile#subscriptionTier", l.Validator<SubscriptionTier, SubscriptionTier>>;
|
|
377
|
-
export { subscriptionTier };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports
|
|
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
7
|
const lex_1 = require("@atproto/lex");
|
|
8
8
|
const $nsid = 'com.atiproto.profile';
|
|
9
9
|
exports.$nsid = $nsid;
|
|
@@ -11,22 +11,10 @@ exports.$nsid = $nsid;
|
|
|
11
11
|
const main = lex_1.l.record('literal:self', $nsid, lex_1.l.object({
|
|
12
12
|
acceptsTips: lex_1.l.optional(lex_1.l.boolean()),
|
|
13
13
|
acceptsSubscriptions: lex_1.l.optional(lex_1.l.boolean()),
|
|
14
|
-
allowZeroTips: lex_1.l.optional(lex_1.l.boolean()),
|
|
15
|
-
minimumTip: lex_1.l.optional(lex_1.l.integer()),
|
|
16
14
|
disableReceiptNotifications: lex_1.l.optional(lex_1.l.boolean()),
|
|
17
|
-
subscriptionTiers: lex_1.l.optional(lex_1.l.array(lex_1.l.ref((() => subscriptionTier)))),
|
|
18
15
|
createdAt: lex_1.l.string({ format: 'datetime' }),
|
|
19
16
|
updatedAt: lex_1.l.optional(lex_1.l.string({ format: 'datetime' })),
|
|
20
17
|
}));
|
|
21
18
|
exports.main = main;
|
|
22
19
|
exports.$isTypeOf = main.isTypeOf.bind(main), exports.$build = main.build.bind(main), exports.$type = main.$type;
|
|
23
20
|
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);
|
|
24
|
-
const subscriptionTier = lex_1.l.typedObject($nsid, 'subscriptionTier', lex_1.l.object({
|
|
25
|
-
id: lex_1.l.string(),
|
|
26
|
-
name: lex_1.l.string(),
|
|
27
|
-
amount: lex_1.l.integer({ minimum: 0 }),
|
|
28
|
-
interval: lex_1.l.string(),
|
|
29
|
-
description: lex_1.l.optional(lex_1.l.string()),
|
|
30
|
-
benefits: lex_1.l.optional(lex_1.l.array(lex_1.l.string())),
|
|
31
|
-
}));
|
|
32
|
-
exports.subscriptionTier = subscriptionTier;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { l } from '@atproto/lex';
|
|
2
2
|
declare const $nsid = "com.atiproto.repo.subscription.validate";
|
|
3
3
|
export { $nsid };
|
|
4
|
-
/** Validate that a sender has an active, Stripe-verified subscription to a recipient. Optionally check
|
|
4
|
+
/** Validate that a sender has an active, Stripe-verified subscription to a recipient. Optionally check the subscription amount. */
|
|
5
5
|
declare const main: l.Query<"com.atiproto.repo.subscription.validate", l.ParamsSchema<{
|
|
6
6
|
readonly sender: l.StringSchema<{
|
|
7
7
|
readonly format: "did";
|
|
@@ -9,7 +9,7 @@ declare const main: l.Query<"com.atiproto.repo.subscription.validate", l.ParamsS
|
|
|
9
9
|
readonly subject: l.StringSchema<{
|
|
10
10
|
readonly format: "did";
|
|
11
11
|
}>;
|
|
12
|
-
readonly
|
|
12
|
+
readonly amount: l.OptionalSchema<l.IntegerSchema>;
|
|
13
13
|
}>, l.Payload<"application/json", l.ObjectSchema<{
|
|
14
14
|
valid: l.BooleanSchema;
|
|
15
15
|
amount: l.OptionalSchema<l.IntegerSchema>;
|
|
@@ -27,7 +27,7 @@ export declare const $lxm: "com.atiproto.repo.subscription.validate", $params: l
|
|
|
27
27
|
readonly subject: l.StringSchema<{
|
|
28
28
|
readonly format: "did";
|
|
29
29
|
}>;
|
|
30
|
-
readonly
|
|
30
|
+
readonly amount: l.OptionalSchema<l.IntegerSchema>;
|
|
31
31
|
}>, $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
32
32
|
valid: l.BooleanSchema;
|
|
33
33
|
amount: l.OptionalSchema<l.IntegerSchema>;
|
|
@@ -7,11 +7,11 @@ exports.$output = exports.$params = exports.$lxm = exports.main = exports.$nsid
|
|
|
7
7
|
const lex_1 = require("@atproto/lex");
|
|
8
8
|
const $nsid = 'com.atiproto.repo.subscription.validate';
|
|
9
9
|
exports.$nsid = $nsid;
|
|
10
|
-
/** Validate that a sender has an active, Stripe-verified subscription to a recipient. Optionally check
|
|
10
|
+
/** Validate that a sender has an active, Stripe-verified subscription to a recipient. Optionally check the subscription amount. */
|
|
11
11
|
const main = lex_1.l.query($nsid, lex_1.l.params({
|
|
12
12
|
sender: lex_1.l.string({ format: 'did' }),
|
|
13
13
|
subject: lex_1.l.string({ format: 'did' }),
|
|
14
|
-
|
|
14
|
+
amount: lex_1.l.optional(lex_1.l.integer()),
|
|
15
15
|
}), lex_1.l.jsonPayload({
|
|
16
16
|
valid: lex_1.l.boolean(),
|
|
17
17
|
amount: lex_1.l.optional(lex_1.l.integer()),
|
|
@@ -12,7 +12,7 @@ declare const main: l.Query<"com.atiproto.repo.tip.validate", l.ParamsSchema<{
|
|
|
12
12
|
readonly recordUri: l.OptionalSchema<l.StringSchema<{
|
|
13
13
|
readonly format: "at-uri";
|
|
14
14
|
}>>;
|
|
15
|
-
readonly
|
|
15
|
+
readonly amount: l.OptionalSchema<l.IntegerSchema>;
|
|
16
16
|
}>, l.Payload<"application/json", l.ObjectSchema<{
|
|
17
17
|
valid: l.BooleanSchema;
|
|
18
18
|
amount: l.OptionalSchema<l.IntegerSchema>;
|
|
@@ -33,7 +33,7 @@ export declare const $lxm: "com.atiproto.repo.tip.validate", $params: l.ParamsSc
|
|
|
33
33
|
readonly recordUri: l.OptionalSchema<l.StringSchema<{
|
|
34
34
|
readonly format: "at-uri";
|
|
35
35
|
}>>;
|
|
36
|
-
readonly
|
|
36
|
+
readonly amount: l.OptionalSchema<l.IntegerSchema>;
|
|
37
37
|
}>, $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
38
38
|
valid: l.BooleanSchema;
|
|
39
39
|
amount: l.OptionalSchema<l.IntegerSchema>;
|
|
@@ -12,7 +12,7 @@ const main = lex_1.l.query($nsid, lex_1.l.params({
|
|
|
12
12
|
sender: lex_1.l.string({ format: 'did' }),
|
|
13
13
|
subject: lex_1.l.optional(lex_1.l.string({ format: 'did' })),
|
|
14
14
|
recordUri: lex_1.l.optional(lex_1.l.string({ format: 'at-uri' })),
|
|
15
|
-
|
|
15
|
+
amount: lex_1.l.optional(lex_1.l.integer()),
|
|
16
16
|
}), lex_1.l.jsonPayload({
|
|
17
17
|
valid: lex_1.l.boolean(),
|
|
18
18
|
amount: lex_1.l.optional(lex_1.l.integer()),
|
|
@@ -18,25 +18,9 @@
|
|
|
18
18
|
"type": "boolean",
|
|
19
19
|
"description": "Enable accepting subscriptions"
|
|
20
20
|
},
|
|
21
|
-
"
|
|
21
|
+
"disableReceiptNotifications": {
|
|
22
22
|
"type": "boolean",
|
|
23
|
-
"description": "
|
|
24
|
-
},
|
|
25
|
-
"allowZeroTips": {
|
|
26
|
-
"type": "boolean",
|
|
27
|
-
"description": "Enable $0 tips"
|
|
28
|
-
},
|
|
29
|
-
"minimumTip": {
|
|
30
|
-
"type": "integer",
|
|
31
|
-
"description": "Minimum tip amount in cents"
|
|
32
|
-
},
|
|
33
|
-
"subscriptionTiers": {
|
|
34
|
-
"type": "array",
|
|
35
|
-
"description": "Subscription tier configurations",
|
|
36
|
-
"items": {
|
|
37
|
-
"type": "ref",
|
|
38
|
-
"ref": "com.atiproto.profile#subscriptionTier"
|
|
39
|
-
}
|
|
23
|
+
"description": "Opt out of payment receipt DMs"
|
|
40
24
|
}
|
|
41
25
|
}
|
|
42
26
|
}
|
|
@@ -18,25 +18,10 @@
|
|
|
18
18
|
"type": "boolean",
|
|
19
19
|
"description": "Whether user accepts subscriptions (default: true)"
|
|
20
20
|
},
|
|
21
|
-
"allowZeroTips": {
|
|
22
|
-
"type": "boolean",
|
|
23
|
-
"description": "Allow $0 tips (default: false)"
|
|
24
|
-
},
|
|
25
|
-
"minimumTip": {
|
|
26
|
-
"type": "integer",
|
|
27
|
-
"description": "Minimum tip amount in cents (default: 100)"
|
|
28
|
-
},
|
|
29
21
|
"disableReceiptNotifications": {
|
|
30
22
|
"type": "boolean",
|
|
31
23
|
"description": "Opt out of payment receipt DMs (default: false)"
|
|
32
24
|
},
|
|
33
|
-
"subscriptionTiers": {
|
|
34
|
-
"type": "array",
|
|
35
|
-
"items": {
|
|
36
|
-
"type": "ref",
|
|
37
|
-
"ref": "#subscriptionTier"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
25
|
"createdAt": {
|
|
41
26
|
"type": "string",
|
|
42
27
|
"format": "datetime",
|
|
@@ -49,40 +34,6 @@
|
|
|
49
34
|
}
|
|
50
35
|
}
|
|
51
36
|
}
|
|
52
|
-
},
|
|
53
|
-
"subscriptionTier": {
|
|
54
|
-
"type": "object",
|
|
55
|
-
"required": ["id", "name", "amount", "interval"],
|
|
56
|
-
"properties": {
|
|
57
|
-
"id": {
|
|
58
|
-
"type": "string",
|
|
59
|
-
"description": "Unique tier identifier"
|
|
60
|
-
},
|
|
61
|
-
"name": {
|
|
62
|
-
"type": "string",
|
|
63
|
-
"description": "Display name"
|
|
64
|
-
},
|
|
65
|
-
"amount": {
|
|
66
|
-
"type": "integer",
|
|
67
|
-
"minimum": 0,
|
|
68
|
-
"description": "Amount in cents (0 for free tiers)"
|
|
69
|
-
},
|
|
70
|
-
"interval": {
|
|
71
|
-
"type": "string",
|
|
72
|
-
"description": "Billing interval: monthly or yearly"
|
|
73
|
-
},
|
|
74
|
-
"description": {
|
|
75
|
-
"type": "string",
|
|
76
|
-
"description": "Tier description"
|
|
77
|
-
},
|
|
78
|
-
"benefits": {
|
|
79
|
-
"type": "array",
|
|
80
|
-
"items": {
|
|
81
|
-
"type": "string"
|
|
82
|
-
},
|
|
83
|
-
"description": "List of benefit strings"
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
37
|
}
|
|
87
38
|
}
|
|
88
39
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"defs": {
|
|
5
5
|
"main": {
|
|
6
6
|
"type": "query",
|
|
7
|
-
"description": "Validate that a sender has an active, Stripe-verified subscription to a recipient. Optionally check
|
|
7
|
+
"description": "Validate that a sender has an active, Stripe-verified subscription to a recipient. Optionally check the subscription amount.",
|
|
8
8
|
"parameters": {
|
|
9
9
|
"type": "params",
|
|
10
10
|
"required": ["sender", "subject"],
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"format": "did",
|
|
20
20
|
"description": "DID of the creator being subscribed to"
|
|
21
21
|
},
|
|
22
|
-
"
|
|
22
|
+
"amount": {
|
|
23
23
|
"type": "integer",
|
|
24
|
-
"description": "
|
|
24
|
+
"description": "Expected subscription amount in cents. If omitted, only checks that a subscription exists."
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
},
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"format": "at-uri",
|
|
25
25
|
"description": "AT-URI of the record being tipped. Takes precedence over subject."
|
|
26
26
|
},
|
|
27
|
-
"
|
|
27
|
+
"amount": {
|
|
28
28
|
"type": "integer",
|
|
29
|
-
"description": "
|
|
29
|
+
"description": "Expected tip amount in cents. If omitted, only checks that a tip exists."
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
},
|