@atiproto/lexicons 0.2.0 → 0.4.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.
Files changed (28) hide show
  1. package/dist/index.js +400 -98
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +400 -98
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/lexicons/com/atiproto/account/cart/clone.defs.d.ts +6 -6
  6. package/dist/lexicons/com/atiproto/account/cart/create.defs.d.ts +8 -4
  7. package/dist/lexicons/com/atiproto/account/cart/get.defs.d.ts +6 -6
  8. package/dist/lexicons/com/atiproto/account/cart/list.defs.d.ts +7 -3
  9. package/dist/lexicons/com/atiproto/account/profile/get.defs.d.ts +2 -2
  10. package/dist/lexicons/com/atiproto/account/profile/put.defs.d.ts +2 -2
  11. package/dist/lexicons/com/atiproto/cart.defs.d.ts +45 -12
  12. package/dist/lexicons/com/atiproto/feed/list.defs.d.ts +6 -2
  13. package/dist/lexicons/com/atiproto/feed/subscription/cancel.defs.d.ts +2 -2
  14. package/dist/lexicons/com/atiproto/feed/subscription/create.defs.d.ts +32 -16
  15. package/dist/lexicons/com/atiproto/feed/subscription/get.defs.d.ts +2 -2
  16. package/dist/lexicons/com/atiproto/feed/subscription/list.defs.d.ts +7 -3
  17. package/dist/lexicons/com/atiproto/feed/tip/create.defs.d.ts +18 -14
  18. package/dist/lexicons/com/atiproto/feed/tip/get.defs.d.ts +2 -2
  19. package/dist/lexicons/com/atiproto/feed/tip/list.defs.d.ts +8 -4
  20. package/dist/lexicons/com/atiproto/profile.defs.d.ts +28 -0
  21. package/dist/lexicons/com/atiproto/repo/profile/get.defs.d.ts +2 -2
  22. package/dist/lexicons/com/atiproto/repo/subscription/search.defs.d.ts +13 -5
  23. package/dist/lexicons/com/atiproto/repo/subscription/validate.defs.d.ts +12 -4
  24. package/dist/lexicons/com/atiproto/repo/tip/search.defs.d.ts +13 -5
  25. package/dist/lexicons/com/atiproto/repo/tip/validate.defs.d.ts +12 -4
  26. package/dist/lexicons/com/atiproto/subscription.defs.d.ts +68 -24
  27. package/dist/lexicons/com/atiproto/tip.defs.d.ts +41 -1
  28. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -82,7 +82,8 @@ __export(cart_defs_exports, {
82
82
  $type: () => $type,
83
83
  $validate: () => $validate,
84
84
  cartItem: () => cartItem,
85
- main: () => main
85
+ main: () => main,
86
+ view: () => view
86
87
  });
87
88
  import { l } from "@atproto/lex";
88
89
  var $nsid = "com.atiproto.cart";
@@ -91,9 +92,9 @@ var main = l.record(
91
92
  $nsid,
92
93
  l.object({
93
94
  items: l.array(l.ref((() => cartItem))),
94
- currency: l.string(),
95
+ currency: l.string({ maxLength: 3 }),
95
96
  total: l.integer(),
96
- status: l.string(),
97
+ status: l.enum(["open", "completed", "expired", "abandoned"]),
97
98
  createdAt: l.string({ format: "datetime" }),
98
99
  expiresAt: l.string({ format: "datetime" }),
99
100
  completedAt: l.optional(l.string({ format: "datetime" }))
@@ -111,6 +112,19 @@ var $parse = /* @__PURE__ */ main.parse.bind(main);
111
112
  var $safeParse = /* @__PURE__ */ main.safeParse.bind(main);
112
113
  var $validate = /* @__PURE__ */ main.validate.bind(main);
113
114
  var $safeValidate = /* @__PURE__ */ main.safeValidate.bind(main);
115
+ var view = l.typedObject(
116
+ $nsid,
117
+ "view",
118
+ l.object({
119
+ items: l.array(l.ref((() => cartItem))),
120
+ currency: l.string({ maxLength: 3 }),
121
+ total: l.integer(),
122
+ status: l.enum(["open", "completed", "expired", "abandoned"]),
123
+ createdAt: l.string({ format: "datetime" }),
124
+ expiresAt: l.string({ format: "datetime" }),
125
+ completedAt: l.optional(l.string({ format: "datetime" }))
126
+ })
127
+ );
114
128
  var cartItem = l.typedObject(
115
129
  $nsid,
116
130
  "cartItem",
@@ -136,7 +150,8 @@ __export(tip_defs_exports, {
136
150
  $safeValidate: () => $safeValidate2,
137
151
  $type: () => $type2,
138
152
  $validate: () => $validate2,
139
- main: () => main2
153
+ main: () => main2,
154
+ view: () => view2
140
155
  });
141
156
  import { l as l2 } from "@atproto/lex";
142
157
  var $nsid2 = "com.atiproto.tip";
@@ -147,7 +162,7 @@ var main2 = l2.record(
147
162
  subject: l2.string({ format: "did" }),
148
163
  recordUri: l2.optional(l2.string({ format: "at-uri" })),
149
164
  amount: l2.integer({ minimum: 0 }),
150
- currency: l2.string(),
165
+ currency: l2.string({ maxLength: 3 }),
151
166
  status: l2.enum([
152
167
  "pending",
153
168
  "authorized",
@@ -172,6 +187,26 @@ var $parse2 = /* @__PURE__ */ main2.parse.bind(main2);
172
187
  var $safeParse2 = /* @__PURE__ */ main2.safeParse.bind(main2);
173
188
  var $validate2 = /* @__PURE__ */ main2.validate.bind(main2);
174
189
  var $safeValidate2 = /* @__PURE__ */ main2.safeValidate.bind(main2);
190
+ var view2 = l2.typedObject(
191
+ $nsid2,
192
+ "view",
193
+ l2.object({
194
+ subject: l2.string({ format: "did" }),
195
+ recordUri: l2.optional(l2.string({ format: "at-uri" })),
196
+ amount: l2.integer({ minimum: 0 }),
197
+ currency: l2.string({ maxLength: 3 }),
198
+ status: l2.enum([
199
+ "pending",
200
+ "authorized",
201
+ "completed",
202
+ "failed",
203
+ "refunded"
204
+ ]),
205
+ message: l2.optional(l2.string({ maxGraphemes: 500, maxLength: 5e3 })),
206
+ createdAt: l2.string({ format: "datetime" }),
207
+ completedAt: l2.optional(l2.string({ format: "datetime" }))
208
+ })
209
+ );
175
210
 
176
211
  // src/lexicons/com/atiproto/subscription.defs.ts
177
212
  var subscription_defs_exports = {};
@@ -189,7 +224,8 @@ __export(subscription_defs_exports, {
189
224
  $safeValidate: () => $safeValidate3,
190
225
  $type: () => $type3,
191
226
  $validate: () => $validate3,
192
- main: () => main3
227
+ main: () => main3,
228
+ view: () => view3
193
229
  });
194
230
  import { l as l3 } from "@atproto/lex";
195
231
  var $nsid3 = "com.atiproto.subscription";
@@ -199,9 +235,9 @@ var main3 = l3.record(
199
235
  l3.object({
200
236
  subject: l3.string({ format: "did" }),
201
237
  amount: l3.integer({ minimum: 0 }),
202
- currency: l3.string(),
203
- interval: l3.string(),
204
- status: l3.string(),
238
+ currency: l3.string({ maxLength: 3 }),
239
+ interval: l3.enum(["monthly", "yearly"]),
240
+ status: l3.enum(["pending", "active", "past_due", "cancelled", "expired"]),
205
241
  billingStartDate: l3.string({ format: "datetime" }),
206
242
  cancelledAt: l3.optional(l3.string({ format: "datetime" })),
207
243
  accessUntil: l3.optional(l3.string({ format: "datetime" })),
@@ -220,6 +256,21 @@ var $parse3 = /* @__PURE__ */ main3.parse.bind(main3);
220
256
  var $safeParse3 = /* @__PURE__ */ main3.safeParse.bind(main3);
221
257
  var $validate3 = /* @__PURE__ */ main3.validate.bind(main3);
222
258
  var $safeValidate3 = /* @__PURE__ */ main3.safeValidate.bind(main3);
259
+ var view3 = l3.typedObject(
260
+ $nsid3,
261
+ "view",
262
+ l3.object({
263
+ subject: l3.string({ format: "did" }),
264
+ amount: l3.integer({ minimum: 0 }),
265
+ currency: l3.string({ maxLength: 3 }),
266
+ interval: l3.enum(["monthly", "yearly"]),
267
+ status: l3.enum(["pending", "active", "past_due", "cancelled", "expired"]),
268
+ billingStartDate: l3.string({ format: "datetime" }),
269
+ cancelledAt: l3.optional(l3.string({ format: "datetime" })),
270
+ accessUntil: l3.optional(l3.string({ format: "datetime" })),
271
+ createdAt: l3.string({ format: "datetime" })
272
+ })
273
+ );
223
274
 
224
275
  // src/lexicons/com/atiproto/account/cart/clone.defs.ts
225
276
  var $nsid4 = "com.atiproto.account.cart.clone";
@@ -231,13 +282,13 @@ var main4 = l4.procedure(
231
282
  redirectUrl: l4.optional(l4.string({ format: "uri" }))
232
283
  }),
233
284
  l4.jsonPayload({
234
- cart: l4.ref((() => main)),
285
+ cart: l4.ref((() => view)),
235
286
  cartUri: l4.string({ format: "at-uri" }),
236
287
  checkoutUrl: l4.string({ format: "uri" }),
237
- tips: l4.array(l4.ref((() => main2))),
288
+ tips: l4.array(l4.ref((() => view2))),
238
289
  subscriptions: l4.array(
239
290
  l4.ref(
240
- (() => main3)
291
+ (() => view3)
241
292
  )
242
293
  )
243
294
  })
@@ -275,11 +326,11 @@ var main5 = l5.procedure(
275
326
  $nsid5,
276
327
  l5.params(),
277
328
  l5.jsonPayload({
278
- currency: l5.string(),
329
+ currency: l5.string({ maxLength: 3 }),
279
330
  redirectUrl: l5.optional(l5.string({ format: "uri" }))
280
331
  }),
281
332
  l5.jsonPayload({
282
- cart: l5.ref((() => main)),
333
+ cart: l5.ref((() => view)),
283
334
  cartUri: l5.string({ format: "at-uri" }),
284
335
  checkoutUrl: l5.string({ format: "uri" })
285
336
  })
@@ -317,12 +368,12 @@ var main6 = l6.query(
317
368
  l6.jsonPayload({
318
369
  uri: l6.string({ format: "at-uri" }),
319
370
  cid: l6.optional(l6.string({ format: "cid" })),
320
- cart: l6.ref((() => main)),
371
+ cart: l6.ref((() => view)),
321
372
  checkoutUrl: l6.optional(l6.string({ format: "uri" })),
322
- tips: l6.array(l6.ref((() => main2))),
373
+ tips: l6.array(l6.ref((() => view2))),
323
374
  subscriptions: l6.array(
324
375
  l6.ref(
325
- (() => main3)
376
+ (() => view3)
326
377
  )
327
378
  )
328
379
  })
@@ -360,7 +411,7 @@ var main7 = l7.query(
360
411
  l7.params(),
361
412
  l7.jsonPayload({
362
413
  carts: l7.array(l7.ref((() => cartResponse))),
363
- cursor: l7.optional(l7.string())
414
+ cursor: l7.optional(l7.string({ maxLength: 512 }))
364
415
  })
365
416
  );
366
417
  var $lxm4 = main7.nsid;
@@ -372,7 +423,7 @@ var cartResponse = l7.typedObject(
372
423
  l7.object({
373
424
  uri: l7.string({ format: "at-uri" }),
374
425
  cid: l7.string({ format: "cid" }),
375
- record: l7.ref((() => main))
426
+ record: l7.ref((() => view))
376
427
  })
377
428
  );
378
429
 
@@ -462,7 +513,8 @@ __export(profile_defs_exports, {
462
513
  $safeValidate: () => $safeValidate4,
463
514
  $type: () => $type4,
464
515
  $validate: () => $validate4,
465
- main: () => main9
516
+ main: () => main9,
517
+ view: () => view4
466
518
  });
467
519
  import { l as l9 } from "@atproto/lex";
468
520
  var $nsid9 = "com.atiproto.profile";
@@ -489,6 +541,17 @@ var $parse4 = /* @__PURE__ */ main9.parse.bind(main9);
489
541
  var $safeParse4 = /* @__PURE__ */ main9.safeParse.bind(main9);
490
542
  var $validate4 = /* @__PURE__ */ main9.validate.bind(main9);
491
543
  var $safeValidate4 = /* @__PURE__ */ main9.safeValidate.bind(main9);
544
+ var view4 = l9.typedObject(
545
+ $nsid9,
546
+ "view",
547
+ l9.object({
548
+ acceptsTips: l9.optional(l9.boolean()),
549
+ acceptsSubscriptions: l9.optional(l9.boolean()),
550
+ disableReceiptNotifications: l9.optional(l9.boolean()),
551
+ createdAt: l9.string({ format: "datetime" }),
552
+ updatedAt: l9.optional(l9.string({ format: "datetime" }))
553
+ })
554
+ );
492
555
 
493
556
  // src/lexicons/com/atiproto/account/profile/get.defs.ts
494
557
  var $nsid10 = "com.atiproto.account.profile.get";
@@ -498,7 +561,7 @@ var main10 = l10.query(
498
561
  l10.jsonPayload({
499
562
  uri: l10.optional(l10.string({ format: "at-uri" })),
500
563
  cid: l10.optional(l10.string({ format: "cid" })),
501
- profile: l10.ref((() => main9)),
564
+ profile: l10.ref((() => view4)),
502
565
  hasProfile: l10.boolean(),
503
566
  readyForPayment: l10.boolean()
504
567
  })
@@ -542,7 +605,7 @@ var main11 = l11.procedure(
542
605
  l11.jsonPayload({
543
606
  uri: l11.string({ format: "at-uri" }),
544
607
  cid: l11.string({ format: "cid" }),
545
- profile: l11.ref((() => main9)),
608
+ profile: l11.ref((() => view4)),
546
609
  hasProfile: l11.boolean(),
547
610
  readyForPayment: l11.boolean()
548
611
  })
@@ -580,7 +643,7 @@ var main12 = l12.permissionSet(
580
643
  ]
581
644
  }),
582
645
  l12.permission("rpc", {
583
- aud: "did:web:atiproto.com#payments",
646
+ inheritAud: true,
584
647
  lxm: [
585
648
  "com.atiproto.account.cart.clone",
586
649
  "com.atiproto.account.cart.create",
@@ -640,7 +703,7 @@ var main13 = l13.permissionSet(
640
703
  ]
641
704
  }),
642
705
  l13.permission("rpc", {
643
- aud: "did:web:atiproto.com#payments",
706
+ inheritAud: true,
644
707
  lxm: [
645
708
  "com.atiproto.account.cart.clone",
646
709
  "com.atiproto.account.cart.create",
@@ -667,7 +730,7 @@ var main13 = l13.permissionSet(
667
730
  ],
668
731
  {
669
732
  title: "General Access",
670
- detail: "Write access to cart, subscription, and tip records, plus RPC access to all non-profile endpoints."
733
+ detail: "Write access to cart, subscription, and tip records, plus RPC access to payment, feed, and public profile lookup endpoints."
671
734
  }
672
735
  );
673
736
 
@@ -689,7 +752,8 @@ __export(cart_exports2, {
689
752
  $type: () => $type,
690
753
  $validate: () => $validate,
691
754
  cartItem: () => cartItem,
692
- main: () => main
755
+ main: () => main,
756
+ view: () => view
693
757
  });
694
758
 
695
759
  // src/lexicons/com/atiproto/feed.ts
@@ -737,7 +801,7 @@ var main14 = l14.query(
737
801
  false
738
802
  )
739
803
  ),
740
- cursor: l14.optional(l14.string())
804
+ cursor: l14.optional(l14.string({ maxLength: 512 }))
741
805
  })
742
806
  );
743
807
  var $lxm8 = main14.nsid;
@@ -785,7 +849,7 @@ var main15 = l15.procedure(
785
849
  l15.jsonPayload({
786
850
  subscriptionUri: l15.string({ format: "at-uri" }),
787
851
  subscription: l15.ref(
788
- (() => main3)
852
+ (() => view3)
789
853
  ),
790
854
  accessUntil: l15.string({ format: "datetime" })
791
855
  })
@@ -825,17 +889,21 @@ var main16 = l16.procedure(
825
889
  l16.jsonPayload({
826
890
  subject: l16.string({ format: "did" }),
827
891
  amount: l16.optional(l16.integer()),
828
- currency: l16.string(),
829
- interval: l16.string()
892
+ currency: l16.string({ maxLength: 3 }),
893
+ interval: l16.enum(["monthly", "yearly"]),
894
+ cartUri: l16.optional(l16.string({ format: "at-uri" })),
895
+ redirectUrl: l16.optional(l16.string({ format: "uri" }))
830
896
  }),
831
897
  l16.jsonPayload({
832
898
  subscriptionUri: l16.string({ format: "at-uri" }),
833
899
  subscription: l16.ref(
834
- (() => main3)
900
+ (() => view3)
901
+ ),
902
+ cartUri: l16.optional(l16.string({ format: "at-uri" })),
903
+ cart: l16.optional(
904
+ l16.ref((() => view))
835
905
  ),
836
- cartUri: l16.string({ format: "at-uri" }),
837
- cart: l16.ref((() => main)),
838
- checkoutUrl: l16.string({ format: "uri" })
906
+ checkoutUrl: l16.optional(l16.string({ format: "uri" }))
839
907
  })
840
908
  );
841
909
  var $lxm10 = main16.nsid;
@@ -872,7 +940,7 @@ var main17 = l17.query(
872
940
  uri: l17.string({ format: "at-uri" }),
873
941
  cid: l17.string({ format: "cid" }),
874
942
  record: l17.ref(
875
- (() => main3)
943
+ (() => view3)
876
944
  )
877
945
  })
878
946
  );
@@ -911,7 +979,7 @@ var main18 = l18.query(
911
979
  subscriptions: l18.array(
912
980
  l18.ref((() => subscriptionResponse))
913
981
  ),
914
- cursor: l18.optional(l18.string())
982
+ cursor: l18.optional(l18.string({ maxLength: 512 }))
915
983
  })
916
984
  );
917
985
  var $lxm12 = main18.nsid;
@@ -923,7 +991,7 @@ var subscriptionResponse = l18.typedObject(
923
991
  l18.object({
924
992
  uri: l18.string({ format: "at-uri" }),
925
993
  record: l18.ref(
926
- (() => main3)
994
+ (() => view3)
927
995
  )
928
996
  })
929
997
  );
@@ -1011,17 +1079,19 @@ var main20 = l20.procedure(
1011
1079
  subject: l20.string({ format: "did" }),
1012
1080
  recordUri: l20.optional(l20.string({ format: "at-uri" })),
1013
1081
  amount: l20.integer(),
1014
- currency: l20.string(),
1082
+ currency: l20.string({ maxLength: 3 }),
1015
1083
  cartUri: l20.optional(l20.string({ format: "at-uri" })),
1016
1084
  redirectUrl: l20.optional(l20.string({ format: "uri" })),
1017
1085
  message: l20.optional(l20.string({ maxGraphemes: 500, maxLength: 5e3 }))
1018
1086
  }),
1019
1087
  l20.jsonPayload({
1020
1088
  tipUri: l20.string({ format: "at-uri" }),
1021
- tip: l20.ref((() => main2)),
1022
- cartUri: l20.string({ format: "at-uri" }),
1023
- cart: l20.ref((() => main)),
1024
- checkoutUrl: l20.string({ format: "uri" })
1089
+ tip: l20.ref((() => view2)),
1090
+ cartUri: l20.optional(l20.string({ format: "at-uri" })),
1091
+ cart: l20.optional(
1092
+ l20.ref((() => view))
1093
+ ),
1094
+ checkoutUrl: l20.optional(l20.string({ format: "uri" }))
1025
1095
  })
1026
1096
  );
1027
1097
  var $lxm14 = main20.nsid;
@@ -1057,7 +1127,7 @@ var main21 = l21.query(
1057
1127
  l21.jsonPayload({
1058
1128
  uri: l21.string({ format: "at-uri" }),
1059
1129
  cid: l21.string({ format: "cid" }),
1060
- value: l21.ref((() => main2))
1130
+ value: l21.ref((() => view2))
1061
1131
  })
1062
1132
  );
1063
1133
  var $lxm15 = main21.nsid;
@@ -1090,8 +1160,8 @@ var main22 = l22.query(
1090
1160
  $nsid22,
1091
1161
  l22.params(),
1092
1162
  l22.jsonPayload({
1093
- records: l22.array(l22.ref((() => main2))),
1094
- cursor: l22.optional(l22.string())
1163
+ records: l22.array(l22.ref((() => view2))),
1164
+ cursor: l22.optional(l22.string({ maxLength: 512 }))
1095
1165
  })
1096
1166
  );
1097
1167
  var $lxm16 = main22.nsid;
@@ -1156,7 +1226,8 @@ __export(profile_exports2, {
1156
1226
  $safeValidate: () => $safeValidate4,
1157
1227
  $type: () => $type4,
1158
1228
  $validate: () => $validate4,
1159
- main: () => main9
1229
+ main: () => main9,
1230
+ view: () => view4
1160
1231
  });
1161
1232
 
1162
1233
  // src/lexicons/com/atiproto/repo.ts
@@ -1200,7 +1271,7 @@ var main24 = l24.query(
1200
1271
  l24.params({ did: l24.string({ format: "did" }) }),
1201
1272
  l24.jsonPayload({
1202
1273
  did: l24.string({ format: "did" }),
1203
- profile: l24.ref((() => main9))
1274
+ profile: l24.ref((() => view4))
1204
1275
  })
1205
1276
  );
1206
1277
  var $lxm18 = main24.nsid;
@@ -1242,7 +1313,7 @@ var main25 = l25.query(
1242
1313
  $nsid25,
1243
1314
  l25.params({
1244
1315
  subject: l25.string({ format: "did" }),
1245
- cursor: l25.optional(l25.string()),
1316
+ cursor: l25.optional(l25.string({ maxLength: 512 })),
1246
1317
  limit: l25.optional(
1247
1318
  l25.withDefault(l25.integer({ minimum: 1, maximum: 100 }), 50)
1248
1319
  )
@@ -1251,7 +1322,7 @@ var main25 = l25.query(
1251
1322
  subscriptions: l25.array(
1252
1323
  l25.ref((() => subscriptionResponse2))
1253
1324
  ),
1254
- cursor: l25.optional(l25.string())
1325
+ cursor: l25.optional(l25.string({ maxLength: 512 }))
1255
1326
  })
1256
1327
  );
1257
1328
  var $lxm19 = main25.nsid;
@@ -1263,7 +1334,7 @@ var subscriptionResponse2 = l25.typedObject(
1263
1334
  l25.object({
1264
1335
  uri: l25.string({ format: "at-uri" }),
1265
1336
  record: l25.ref(
1266
- (() => main3)
1337
+ (() => view3)
1267
1338
  )
1268
1339
  })
1269
1340
  );
@@ -1301,8 +1372,8 @@ var main26 = l26.query(
1301
1372
  l26.jsonPayload({
1302
1373
  valid: l26.boolean(),
1303
1374
  amount: l26.optional(l26.integer()),
1304
- currency: l26.optional(l26.string()),
1305
- reason: l26.optional(l26.string())
1375
+ currency: l26.optional(l26.string({ maxLength: 3 })),
1376
+ reason: l26.optional(l26.string({ maxLength: 1024 }))
1306
1377
  })
1307
1378
  );
1308
1379
  var $lxm20 = main26.nsid;
@@ -1344,14 +1415,14 @@ var main27 = l27.query(
1344
1415
  $nsid27,
1345
1416
  l27.params({
1346
1417
  subject: l27.string({ format: "did" }),
1347
- cursor: l27.optional(l27.string()),
1418
+ cursor: l27.optional(l27.string({ maxLength: 512 })),
1348
1419
  limit: l27.optional(
1349
1420
  l27.withDefault(l27.integer({ minimum: 1, maximum: 100 }), 50)
1350
1421
  )
1351
1422
  }),
1352
1423
  l27.jsonPayload({
1353
1424
  tips: l27.array(l27.ref((() => tipResponse))),
1354
- cursor: l27.optional(l27.string())
1425
+ cursor: l27.optional(l27.string({ maxLength: 512 }))
1355
1426
  })
1356
1427
  );
1357
1428
  var $lxm21 = main27.nsid;
@@ -1362,7 +1433,7 @@ var tipResponse = l27.typedObject(
1362
1433
  "tipResponse",
1363
1434
  l27.object({
1364
1435
  uri: l27.string({ format: "at-uri" }),
1365
- record: l27.ref((() => main2))
1436
+ record: l27.ref((() => view2))
1366
1437
  })
1367
1438
  );
1368
1439
 
@@ -1400,8 +1471,8 @@ var main28 = l28.query(
1400
1471
  l28.jsonPayload({
1401
1472
  valid: l28.boolean(),
1402
1473
  amount: l28.optional(l28.integer()),
1403
- currency: l28.optional(l28.string()),
1404
- reason: l28.optional(l28.string())
1474
+ currency: l28.optional(l28.string({ maxLength: 3 })),
1475
+ reason: l28.optional(l28.string({ maxLength: 1024 }))
1405
1476
  })
1406
1477
  );
1407
1478
  var $lxm22 = main28.nsid;
@@ -1425,7 +1496,8 @@ __export(subscription_exports3, {
1425
1496
  $safeValidate: () => $safeValidate3,
1426
1497
  $type: () => $type3,
1427
1498
  $validate: () => $validate3,
1428
- main: () => main3
1499
+ main: () => main3,
1500
+ view: () => view3
1429
1501
  });
1430
1502
 
1431
1503
  // src/lexicons/com/atiproto/tip.ts
@@ -1445,7 +1517,8 @@ __export(tip_exports3, {
1445
1517
  $safeValidate: () => $safeValidate2,
1446
1518
  $type: () => $type2,
1447
1519
  $validate: () => $validate2,
1448
- main: () => main2
1520
+ main: () => main2,
1521
+ view: () => view2
1449
1522
  });
1450
1523
 
1451
1524
  // src/schemas/account/cart/clone.json
@@ -1489,7 +1562,7 @@ var clone_default = {
1489
1562
  properties: {
1490
1563
  cart: {
1491
1564
  type: "ref",
1492
- ref: "com.atiproto.cart",
1565
+ ref: "com.atiproto.cart#view",
1493
1566
  description: "The new cart record"
1494
1567
  },
1495
1568
  cartUri: {
@@ -1506,7 +1579,7 @@ var clone_default = {
1506
1579
  type: "array",
1507
1580
  items: {
1508
1581
  type: "ref",
1509
- ref: "com.atiproto.tip"
1582
+ ref: "com.atiproto.tip#view"
1510
1583
  },
1511
1584
  description: "Newly created tip records"
1512
1585
  },
@@ -1514,7 +1587,7 @@ var clone_default = {
1514
1587
  type: "array",
1515
1588
  items: {
1516
1589
  type: "ref",
1517
- ref: "com.atiproto.subscription"
1590
+ ref: "com.atiproto.subscription#view"
1518
1591
  },
1519
1592
  description: "Newly created subscription records"
1520
1593
  }
@@ -1541,6 +1614,7 @@ var create_default = {
1541
1614
  properties: {
1542
1615
  currency: {
1543
1616
  type: "string",
1617
+ maxLength: 3,
1544
1618
  description: "ISO 4217 currency code"
1545
1619
  },
1546
1620
  redirectUrl: {
@@ -1559,7 +1633,7 @@ var create_default = {
1559
1633
  properties: {
1560
1634
  cart: {
1561
1635
  type: "ref",
1562
- ref: "com.atiproto.cart",
1636
+ ref: "com.atiproto.cart#view",
1563
1637
  description: "The created cart record"
1564
1638
  },
1565
1639
  cartUri: {
@@ -1616,7 +1690,7 @@ var get_default = {
1616
1690
  },
1617
1691
  cart: {
1618
1692
  type: "ref",
1619
- ref: "com.atiproto.cart",
1693
+ ref: "com.atiproto.cart#view",
1620
1694
  description: "The cart record data"
1621
1695
  },
1622
1696
  checkoutUrl: {
@@ -1628,7 +1702,7 @@ var get_default = {
1628
1702
  type: "array",
1629
1703
  items: {
1630
1704
  type: "ref",
1631
- ref: "com.atiproto.tip"
1705
+ ref: "com.atiproto.tip#view"
1632
1706
  },
1633
1707
  description: "Resolved tip records referenced by this cart"
1634
1708
  },
@@ -1636,7 +1710,7 @@ var get_default = {
1636
1710
  type: "array",
1637
1711
  items: {
1638
1712
  type: "ref",
1639
- ref: "com.atiproto.subscription"
1713
+ ref: "com.atiproto.subscription#view"
1640
1714
  },
1641
1715
  description: "Resolved subscription records referenced by this cart"
1642
1716
  }
@@ -1662,10 +1736,13 @@ var list_default = {
1662
1736
  properties: {
1663
1737
  status: {
1664
1738
  type: "string",
1665
- description: "Filter: open, completed, expired, abandoned"
1739
+ maxLength: 64,
1740
+ enum: ["open", "completed", "expired", "abandoned"],
1741
+ description: "Filter by cart status"
1666
1742
  },
1667
1743
  cursor: {
1668
1744
  type: "string",
1745
+ maxLength: 512,
1669
1746
  description: "Pagination cursor"
1670
1747
  },
1671
1748
  limit: {
@@ -1692,6 +1769,7 @@ var list_default = {
1692
1769
  },
1693
1770
  cursor: {
1694
1771
  type: "string",
1772
+ maxLength: 512,
1695
1773
  description: "Pagination cursor for next page"
1696
1774
  }
1697
1775
  },
@@ -1715,7 +1793,7 @@ var list_default = {
1715
1793
  },
1716
1794
  record: {
1717
1795
  type: "ref",
1718
- ref: "com.atiproto.cart"
1796
+ ref: "com.atiproto.cart#view"
1719
1797
  }
1720
1798
  }
1721
1799
  }
@@ -1797,7 +1875,7 @@ var get_default2 = {
1797
1875
  },
1798
1876
  profile: {
1799
1877
  type: "ref",
1800
- ref: "com.atiproto.profile",
1878
+ ref: "com.atiproto.profile#view",
1801
1879
  description: "The profile record data (defaults if not configured)"
1802
1880
  },
1803
1881
  hasProfile: {
@@ -1867,7 +1945,7 @@ var put_default2 = {
1867
1945
  },
1868
1946
  profile: {
1869
1947
  type: "ref",
1870
- ref: "com.atiproto.profile",
1948
+ ref: "com.atiproto.profile#view",
1871
1949
  description: "The profile record data"
1872
1950
  },
1873
1951
  hasProfile: {
@@ -1914,6 +1992,7 @@ var cart_default = {
1914
1992
  },
1915
1993
  currency: {
1916
1994
  type: "string",
1995
+ maxLength: 3,
1917
1996
  description: "ISO 4217 currency code"
1918
1997
  },
1919
1998
  total: {
@@ -1922,7 +2001,9 @@ var cart_default = {
1922
2001
  },
1923
2002
  status: {
1924
2003
  type: "string",
1925
- description: "Cart status: open, completed, expired, abandoned"
2004
+ maxLength: 64,
2005
+ enum: ["open", "completed", "expired", "abandoned"],
2006
+ description: "Cart status"
1926
2007
  },
1927
2008
  createdAt: {
1928
2009
  type: "string",
@@ -1942,12 +2023,64 @@ var cart_default = {
1942
2023
  }
1943
2024
  }
1944
2025
  },
2026
+ view: {
2027
+ type: "object",
2028
+ description: "View of a cart record for use in API responses",
2029
+ required: [
2030
+ "items",
2031
+ "currency",
2032
+ "total",
2033
+ "status",
2034
+ "createdAt",
2035
+ "expiresAt"
2036
+ ],
2037
+ properties: {
2038
+ items: {
2039
+ type: "array",
2040
+ items: {
2041
+ type: "ref",
2042
+ ref: "#cartItem"
2043
+ }
2044
+ },
2045
+ currency: {
2046
+ type: "string",
2047
+ maxLength: 3,
2048
+ description: "ISO 4217 currency code"
2049
+ },
2050
+ total: {
2051
+ type: "integer",
2052
+ description: "Total amount in cents"
2053
+ },
2054
+ status: {
2055
+ type: "string",
2056
+ maxLength: 64,
2057
+ enum: ["open", "completed", "expired", "abandoned"],
2058
+ description: "Cart status"
2059
+ },
2060
+ createdAt: {
2061
+ type: "string",
2062
+ format: "datetime",
2063
+ description: "Creation timestamp"
2064
+ },
2065
+ expiresAt: {
2066
+ type: "string",
2067
+ format: "datetime",
2068
+ description: "Expiration timestamp"
2069
+ },
2070
+ completedAt: {
2071
+ type: "string",
2072
+ format: "datetime",
2073
+ description: "Completion timestamp"
2074
+ }
2075
+ }
2076
+ },
1945
2077
  cartItem: {
1946
2078
  type: "object",
1947
2079
  required: ["type", "recordUri"],
1948
2080
  properties: {
1949
2081
  type: {
1950
2082
  type: "string",
2083
+ maxLength: 128,
1951
2084
  description: "Item type: tip or subscription",
1952
2085
  enum: ["com.atiproto.tip", "com.atiproto.subscription"]
1953
2086
  },
@@ -1976,6 +2109,7 @@ var list_default2 = {
1976
2109
  properties: {
1977
2110
  cursor: {
1978
2111
  type: "string",
2112
+ maxLength: 512,
1979
2113
  description: "Pagination cursor"
1980
2114
  },
1981
2115
  limit: {
@@ -2003,6 +2137,7 @@ var list_default2 = {
2003
2137
  },
2004
2138
  cursor: {
2005
2139
  type: "string",
2140
+ maxLength: 512,
2006
2141
  description: "Pagination cursor for next page"
2007
2142
  }
2008
2143
  }
@@ -2047,7 +2182,7 @@ var cancel_default = {
2047
2182
  },
2048
2183
  subscription: {
2049
2184
  type: "ref",
2050
- ref: "com.atiproto.subscription",
2185
+ ref: "com.atiproto.subscription#view",
2051
2186
  description: "Updated subscription record"
2052
2187
  },
2053
2188
  accessUntil: {
@@ -2082,10 +2217,23 @@ var create_default2 = {
2082
2217
  },
2083
2218
  currency: {
2084
2219
  description: "ISO 4217 currency code",
2220
+ maxLength: 3,
2085
2221
  type: "string"
2086
2222
  },
2087
2223
  interval: {
2088
- description: "Billing interval: monthly or yearly",
2224
+ description: "Billing interval",
2225
+ maxLength: 64,
2226
+ enum: ["monthly", "yearly"],
2227
+ type: "string"
2228
+ },
2229
+ cartUri: {
2230
+ description: "AT-URI of an existing cart to add this subscription to. If omitted, a new cart is created.",
2231
+ format: "at-uri",
2232
+ type: "string"
2233
+ },
2234
+ redirectUrl: {
2235
+ description: "URL to redirect to after checkout completes",
2236
+ format: "uri",
2089
2237
  type: "string"
2090
2238
  }
2091
2239
  },
@@ -2105,7 +2253,7 @@ var create_default2 = {
2105
2253
  subscription: {
2106
2254
  description: "The created subscription record (status: pending)",
2107
2255
  type: "ref",
2108
- ref: "com.atiproto.subscription"
2256
+ ref: "com.atiproto.subscription#view"
2109
2257
  },
2110
2258
  cartUri: {
2111
2259
  description: "URI of the cart record in PDS",
@@ -2115,7 +2263,7 @@ var create_default2 = {
2115
2263
  cart: {
2116
2264
  description: "The created cart record (status: open)",
2117
2265
  type: "ref",
2118
- ref: "com.atiproto.cart"
2266
+ ref: "com.atiproto.cart#view"
2119
2267
  },
2120
2268
  checkoutUrl: {
2121
2269
  description: "Checkout URL hosted by atiproto",
@@ -2123,13 +2271,7 @@ var create_default2 = {
2123
2271
  type: "string"
2124
2272
  }
2125
2273
  },
2126
- required: [
2127
- "subscriptionUri",
2128
- "subscription",
2129
- "cartUri",
2130
- "cart",
2131
- "checkoutUrl"
2132
- ],
2274
+ required: ["subscriptionUri", "subscription"],
2133
2275
  type: "object"
2134
2276
  }
2135
2277
  },
@@ -2173,7 +2315,7 @@ var get_default3 = {
2173
2315
  record: {
2174
2316
  description: "The subscription record data",
2175
2317
  type: "ref",
2176
- ref: "com.atiproto.subscription"
2318
+ ref: "com.atiproto.subscription#view"
2177
2319
  }
2178
2320
  },
2179
2321
  required: ["uri", "cid", "record"],
@@ -2202,6 +2344,7 @@ var list_default3 = {
2202
2344
  properties: {
2203
2345
  cursor: {
2204
2346
  type: "string",
2347
+ maxLength: 512,
2205
2348
  description: "Pagination cursor"
2206
2349
  },
2207
2350
  limit: {
@@ -2229,6 +2372,7 @@ var list_default3 = {
2229
2372
  },
2230
2373
  cursor: {
2231
2374
  type: "string",
2375
+ maxLength: 512,
2232
2376
  description: "Pagination cursor for next page"
2233
2377
  }
2234
2378
  }
@@ -2246,7 +2390,7 @@ var list_default3 = {
2246
2390
  },
2247
2391
  record: {
2248
2392
  type: "ref",
2249
- ref: "com.atiproto.subscription"
2393
+ ref: "com.atiproto.subscription#view"
2250
2394
  }
2251
2395
  }
2252
2396
  }
@@ -2332,6 +2476,7 @@ var create_default3 = {
2332
2476
  },
2333
2477
  currency: {
2334
2478
  type: "string",
2479
+ maxLength: 3,
2335
2480
  description: "ISO 4217 currency code"
2336
2481
  },
2337
2482
  cartUri: {
@@ -2357,7 +2502,7 @@ var create_default3 = {
2357
2502
  encoding: "application/json",
2358
2503
  schema: {
2359
2504
  type: "object",
2360
- required: ["tipUri", "tip", "cartUri", "cart", "checkoutUrl"],
2505
+ required: ["tipUri", "tip"],
2361
2506
  properties: {
2362
2507
  tipUri: {
2363
2508
  type: "string",
@@ -2366,7 +2511,7 @@ var create_default3 = {
2366
2511
  },
2367
2512
  tip: {
2368
2513
  type: "ref",
2369
- ref: "com.atiproto.tip",
2514
+ ref: "com.atiproto.tip#view",
2370
2515
  description: "The created tip record (status: pending)"
2371
2516
  },
2372
2517
  cartUri: {
@@ -2376,7 +2521,7 @@ var create_default3 = {
2376
2521
  },
2377
2522
  cart: {
2378
2523
  type: "ref",
2379
- ref: "com.atiproto.cart",
2524
+ ref: "com.atiproto.cart#view",
2380
2525
  description: "The cart record (new or updated)"
2381
2526
  },
2382
2527
  checkoutUrl: {
@@ -2424,7 +2569,7 @@ var get_default4 = {
2424
2569
  value: {
2425
2570
  description: "The tip record data",
2426
2571
  type: "ref",
2427
- ref: "com.atiproto.tip"
2572
+ ref: "com.atiproto.tip#view"
2428
2573
  }
2429
2574
  },
2430
2575
  required: ["uri", "cid", "value"],
@@ -2453,6 +2598,7 @@ var list_default4 = {
2453
2598
  properties: {
2454
2599
  cursor: {
2455
2600
  type: "string",
2601
+ maxLength: 512,
2456
2602
  description: "Pagination cursor"
2457
2603
  },
2458
2604
  limit: {
@@ -2475,11 +2621,12 @@ var list_default4 = {
2475
2621
  type: "array",
2476
2622
  items: {
2477
2623
  type: "ref",
2478
- ref: "com.atiproto.tip"
2624
+ ref: "com.atiproto.tip#view"
2479
2625
  }
2480
2626
  },
2481
2627
  cursor: {
2482
2628
  type: "string",
2629
+ maxLength: 512,
2483
2630
  description: "Pagination cursor for next page"
2484
2631
  }
2485
2632
  }
@@ -2575,6 +2722,35 @@ var profile_default = {
2575
2722
  }
2576
2723
  }
2577
2724
  }
2725
+ },
2726
+ view: {
2727
+ type: "object",
2728
+ description: "View of a user's profile settings for use in API responses",
2729
+ required: ["createdAt"],
2730
+ properties: {
2731
+ acceptsTips: {
2732
+ type: "boolean",
2733
+ description: "Whether user accepts tips (default: true)"
2734
+ },
2735
+ acceptsSubscriptions: {
2736
+ type: "boolean",
2737
+ description: "Whether user accepts subscriptions (default: true)"
2738
+ },
2739
+ disableReceiptNotifications: {
2740
+ type: "boolean",
2741
+ description: "Opt out of payment receipt DMs (default: false)"
2742
+ },
2743
+ createdAt: {
2744
+ type: "string",
2745
+ format: "datetime",
2746
+ description: "Creation timestamp"
2747
+ },
2748
+ updatedAt: {
2749
+ type: "string",
2750
+ format: "datetime",
2751
+ description: "Last update timestamp"
2752
+ }
2753
+ }
2578
2754
  }
2579
2755
  }
2580
2756
  };
@@ -2611,7 +2787,7 @@ var get_default5 = {
2611
2787
  },
2612
2788
  profile: {
2613
2789
  type: "ref",
2614
- ref: "com.atiproto.profile",
2790
+ ref: "com.atiproto.profile#view",
2615
2791
  description: "Public profile data"
2616
2792
  }
2617
2793
  }
@@ -2639,6 +2815,7 @@ var search_default = {
2639
2815
  },
2640
2816
  cursor: {
2641
2817
  type: "string",
2818
+ maxLength: 512,
2642
2819
  description: "Pagination cursor"
2643
2820
  },
2644
2821
  limit: {
@@ -2666,6 +2843,7 @@ var search_default = {
2666
2843
  },
2667
2844
  cursor: {
2668
2845
  type: "string",
2846
+ maxLength: 512,
2669
2847
  description: "Pagination cursor for next page"
2670
2848
  }
2671
2849
  }
@@ -2683,7 +2861,7 @@ var search_default = {
2683
2861
  },
2684
2862
  record: {
2685
2863
  type: "ref",
2686
- ref: "com.atiproto.subscription"
2864
+ ref: "com.atiproto.subscription#view"
2687
2865
  }
2688
2866
  }
2689
2867
  }
@@ -2739,10 +2917,12 @@ var validate_default = {
2739
2917
  },
2740
2918
  currency: {
2741
2919
  type: "string",
2920
+ maxLength: 3,
2742
2921
  description: "Currency of the subscription"
2743
2922
  },
2744
2923
  reason: {
2745
2924
  type: "string",
2925
+ maxLength: 1024,
2746
2926
  description: "If invalid, reason for rejection"
2747
2927
  }
2748
2928
  }
@@ -2770,6 +2950,7 @@ var search_default2 = {
2770
2950
  },
2771
2951
  cursor: {
2772
2952
  type: "string",
2953
+ maxLength: 512,
2773
2954
  description: "Pagination cursor"
2774
2955
  },
2775
2956
  limit: {
@@ -2797,6 +2978,7 @@ var search_default2 = {
2797
2978
  },
2798
2979
  cursor: {
2799
2980
  type: "string",
2981
+ maxLength: 512,
2800
2982
  description: "Pagination cursor for next page"
2801
2983
  }
2802
2984
  }
@@ -2814,7 +2996,7 @@ var search_default2 = {
2814
2996
  },
2815
2997
  record: {
2816
2998
  type: "ref",
2817
- ref: "com.atiproto.tip"
2999
+ ref: "com.atiproto.tip#view"
2818
3000
  }
2819
3001
  }
2820
3002
  }
@@ -2875,10 +3057,12 @@ var validate_default2 = {
2875
3057
  },
2876
3058
  currency: {
2877
3059
  type: "string",
3060
+ maxLength: 3,
2878
3061
  description: "Currency of the tips"
2879
3062
  },
2880
3063
  reason: {
2881
3064
  type: "string",
3065
+ maxLength: 1024,
2882
3066
  description: "If invalid, reason for rejection"
2883
3067
  }
2884
3068
  }
@@ -2911,7 +3095,7 @@ var authEnhanced_default = {
2911
3095
  {
2912
3096
  type: "permission",
2913
3097
  resource: "rpc",
2914
- aud: "did:web:atiproto.com#payments",
3098
+ inheritAud: true,
2915
3099
  lxm: [
2916
3100
  "com.atiproto.account.cart.clone",
2917
3101
  "com.atiproto.account.cart.create",
@@ -2950,7 +3134,7 @@ var authGeneral_default = {
2950
3134
  main: {
2951
3135
  type: "permission-set",
2952
3136
  title: "General Access",
2953
- detail: "Write access to cart, subscription, and tip records, plus RPC access to all non-profile endpoints.",
3137
+ detail: "Write access to cart, subscription, and tip records, plus RPC access to payment, feed, and public profile lookup endpoints.",
2954
3138
  permissions: [
2955
3139
  {
2956
3140
  type: "permission",
@@ -2964,7 +3148,7 @@ var authGeneral_default = {
2964
3148
  {
2965
3149
  type: "permission",
2966
3150
  resource: "rpc",
2967
- aud: "did:web:atiproto.com#payments",
3151
+ inheritAud: true,
2968
3152
  lxm: [
2969
3153
  "com.atiproto.account.cart.clone",
2970
3154
  "com.atiproto.account.cart.create",
@@ -3013,14 +3197,19 @@ var subscription_default = {
3013
3197
  },
3014
3198
  currency: {
3015
3199
  description: "ISO 4217 currency code",
3200
+ maxLength: 3,
3016
3201
  type: "string"
3017
3202
  },
3018
3203
  interval: {
3019
- description: "Billing interval: monthly or yearly",
3204
+ description: "Billing interval",
3205
+ maxLength: 64,
3206
+ enum: ["monthly", "yearly"],
3020
3207
  type: "string"
3021
3208
  },
3022
3209
  status: {
3023
- description: "Subscription status: pending, active, past_due, cancelled, expired",
3210
+ description: "Subscription status",
3211
+ maxLength: 64,
3212
+ enum: ["pending", "active", "past_due", "cancelled", "expired"],
3024
3213
  type: "string"
3025
3214
  },
3026
3215
  billingStartDate: {
@@ -3056,6 +3245,68 @@ var subscription_default = {
3056
3245
  type: "object"
3057
3246
  },
3058
3247
  type: "record"
3248
+ },
3249
+ view: {
3250
+ type: "object",
3251
+ description: "View of a subscription record for use in API responses",
3252
+ required: [
3253
+ "subject",
3254
+ "amount",
3255
+ "currency",
3256
+ "interval",
3257
+ "status",
3258
+ "billingStartDate",
3259
+ "createdAt"
3260
+ ],
3261
+ properties: {
3262
+ subject: {
3263
+ description: "DID of the user being subscribed to",
3264
+ format: "did",
3265
+ type: "string"
3266
+ },
3267
+ amount: {
3268
+ description: "Subscription amount in cents (0 for free subscriptions)",
3269
+ minimum: 0,
3270
+ type: "integer"
3271
+ },
3272
+ currency: {
3273
+ description: "ISO 4217 currency code",
3274
+ maxLength: 3,
3275
+ type: "string"
3276
+ },
3277
+ interval: {
3278
+ description: "Billing interval",
3279
+ maxLength: 64,
3280
+ enum: ["monthly", "yearly"],
3281
+ type: "string"
3282
+ },
3283
+ status: {
3284
+ description: "Subscription status",
3285
+ maxLength: 64,
3286
+ enum: ["pending", "active", "past_due", "cancelled", "expired"],
3287
+ type: "string"
3288
+ },
3289
+ billingStartDate: {
3290
+ description: "First billing period, can be used to determine recurrence",
3291
+ format: "datetime",
3292
+ type: "string"
3293
+ },
3294
+ cancelledAt: {
3295
+ description: "Cancellation timestamp",
3296
+ format: "datetime",
3297
+ type: "string"
3298
+ },
3299
+ accessUntil: {
3300
+ description: "Date until which the subscriber retains access after cancellation",
3301
+ format: "datetime",
3302
+ type: "string"
3303
+ },
3304
+ createdAt: {
3305
+ description: "Creation timestamp",
3306
+ format: "datetime",
3307
+ type: "string"
3308
+ }
3309
+ }
3059
3310
  }
3060
3311
  },
3061
3312
  id: "com.atiproto.subscription",
@@ -3087,10 +3338,12 @@ var tip_default = {
3087
3338
  },
3088
3339
  currency: {
3089
3340
  description: "ISO 4217 currency code",
3341
+ maxLength: 3,
3090
3342
  type: "string"
3091
3343
  },
3092
3344
  status: {
3093
- description: "Tip status: pending, authorized (payment held), completed, failed, refunded",
3345
+ description: "Tip status",
3346
+ maxLength: 64,
3094
3347
  type: "string",
3095
3348
  enum: ["pending", "authorized", "completed", "failed", "refunded"]
3096
3349
  },
@@ -3115,6 +3368,55 @@ var tip_default = {
3115
3368
  type: "object"
3116
3369
  },
3117
3370
  type: "record"
3371
+ },
3372
+ view: {
3373
+ type: "object",
3374
+ description: "View of a tip record for use in API responses",
3375
+ required: ["subject", "amount", "currency", "status", "createdAt"],
3376
+ properties: {
3377
+ subject: {
3378
+ description: "DID of the user receiving the tip",
3379
+ format: "did",
3380
+ type: "string"
3381
+ },
3382
+ recordUri: {
3383
+ description: "AT-URI of specific record being tipped",
3384
+ format: "at-uri",
3385
+ type: "string"
3386
+ },
3387
+ amount: {
3388
+ description: "Tip amount in cents (0 when recipient allows zero tips)",
3389
+ minimum: 0,
3390
+ type: "integer"
3391
+ },
3392
+ currency: {
3393
+ description: "ISO 4217 currency code",
3394
+ maxLength: 3,
3395
+ type: "string"
3396
+ },
3397
+ status: {
3398
+ description: "Tip status",
3399
+ maxLength: 64,
3400
+ type: "string",
3401
+ enum: ["pending", "authorized", "completed", "failed", "refunded"]
3402
+ },
3403
+ message: {
3404
+ description: "Optional message (max 500 chars)",
3405
+ maxGraphemes: 500,
3406
+ maxLength: 5e3,
3407
+ type: "string"
3408
+ },
3409
+ createdAt: {
3410
+ description: "Creation timestamp",
3411
+ format: "datetime",
3412
+ type: "string"
3413
+ },
3414
+ completedAt: {
3415
+ description: "Completion timestamp",
3416
+ format: "datetime",
3417
+ type: "string"
3418
+ }
3419
+ }
3118
3420
  }
3119
3421
  },
3120
3422
  id: "com.atiproto.tip",