@atiproto/lexicons 0.3.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 (25) hide show
  1. package/dist/index.js +310 -52
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +310 -52
  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 +2 -2
  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 +1 -1
  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 +33 -0
  12. package/dist/lexicons/com/atiproto/feed/subscription/cancel.defs.d.ts +2 -2
  13. package/dist/lexicons/com/atiproto/feed/subscription/create.defs.d.ts +4 -4
  14. package/dist/lexicons/com/atiproto/feed/subscription/get.defs.d.ts +2 -2
  15. package/dist/lexicons/com/atiproto/feed/subscription/list.defs.d.ts +1 -1
  16. package/dist/lexicons/com/atiproto/feed/tip/create.defs.d.ts +4 -4
  17. package/dist/lexicons/com/atiproto/feed/tip/get.defs.d.ts +2 -2
  18. package/dist/lexicons/com/atiproto/feed/tip/list.defs.d.ts +2 -2
  19. package/dist/lexicons/com/atiproto/profile.defs.d.ts +28 -0
  20. package/dist/lexicons/com/atiproto/repo/profile/get.defs.d.ts +2 -2
  21. package/dist/lexicons/com/atiproto/repo/subscription/search.defs.d.ts +1 -1
  22. package/dist/lexicons/com/atiproto/repo/tip/search.defs.d.ts +1 -1
  23. package/dist/lexicons/com/atiproto/subscription.defs.d.ts +44 -0
  24. package/dist/lexicons/com/atiproto/tip.defs.d.ts +40 -0
  25. 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";
@@ -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";
@@ -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";
@@ -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
  })
@@ -279,7 +330,7 @@ var main5 = l5.procedure(
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
  })
@@ -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
  })
@@ -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
@@ -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
  })
@@ -833,11 +897,11 @@ var main16 = l16.procedure(
833
897
  l16.jsonPayload({
834
898
  subscriptionUri: l16.string({ format: "at-uri" }),
835
899
  subscription: l16.ref(
836
- (() => main3)
900
+ (() => view3)
837
901
  ),
838
902
  cartUri: l16.optional(l16.string({ format: "at-uri" })),
839
903
  cart: l16.optional(
840
- l16.ref((() => main))
904
+ l16.ref((() => view))
841
905
  ),
842
906
  checkoutUrl: l16.optional(l16.string({ format: "uri" }))
843
907
  })
@@ -876,7 +940,7 @@ var main17 = l17.query(
876
940
  uri: l17.string({ format: "at-uri" }),
877
941
  cid: l17.string({ format: "cid" }),
878
942
  record: l17.ref(
879
- (() => main3)
943
+ (() => view3)
880
944
  )
881
945
  })
882
946
  );
@@ -927,7 +991,7 @@ var subscriptionResponse = l18.typedObject(
927
991
  l18.object({
928
992
  uri: l18.string({ format: "at-uri" }),
929
993
  record: l18.ref(
930
- (() => main3)
994
+ (() => view3)
931
995
  )
932
996
  })
933
997
  );
@@ -1022,10 +1086,10 @@ var main20 = l20.procedure(
1022
1086
  }),
1023
1087
  l20.jsonPayload({
1024
1088
  tipUri: l20.string({ format: "at-uri" }),
1025
- tip: l20.ref((() => main2)),
1089
+ tip: l20.ref((() => view2)),
1026
1090
  cartUri: l20.optional(l20.string({ format: "at-uri" })),
1027
1091
  cart: l20.optional(
1028
- l20.ref((() => main))
1092
+ l20.ref((() => view))
1029
1093
  ),
1030
1094
  checkoutUrl: l20.optional(l20.string({ format: "uri" }))
1031
1095
  })
@@ -1063,7 +1127,7 @@ var main21 = l21.query(
1063
1127
  l21.jsonPayload({
1064
1128
  uri: l21.string({ format: "at-uri" }),
1065
1129
  cid: l21.string({ format: "cid" }),
1066
- value: l21.ref((() => main2))
1130
+ value: l21.ref((() => view2))
1067
1131
  })
1068
1132
  );
1069
1133
  var $lxm15 = main21.nsid;
@@ -1096,7 +1160,7 @@ var main22 = l22.query(
1096
1160
  $nsid22,
1097
1161
  l22.params(),
1098
1162
  l22.jsonPayload({
1099
- records: l22.array(l22.ref((() => main2))),
1163
+ records: l22.array(l22.ref((() => view2))),
1100
1164
  cursor: l22.optional(l22.string({ maxLength: 512 }))
1101
1165
  })
1102
1166
  );
@@ -1162,7 +1226,8 @@ __export(profile_exports2, {
1162
1226
  $safeValidate: () => $safeValidate4,
1163
1227
  $type: () => $type4,
1164
1228
  $validate: () => $validate4,
1165
- main: () => main9
1229
+ main: () => main9,
1230
+ view: () => view4
1166
1231
  });
1167
1232
 
1168
1233
  // src/lexicons/com/atiproto/repo.ts
@@ -1206,7 +1271,7 @@ var main24 = l24.query(
1206
1271
  l24.params({ did: l24.string({ format: "did" }) }),
1207
1272
  l24.jsonPayload({
1208
1273
  did: l24.string({ format: "did" }),
1209
- profile: l24.ref((() => main9))
1274
+ profile: l24.ref((() => view4))
1210
1275
  })
1211
1276
  );
1212
1277
  var $lxm18 = main24.nsid;
@@ -1269,7 +1334,7 @@ var subscriptionResponse2 = l25.typedObject(
1269
1334
  l25.object({
1270
1335
  uri: l25.string({ format: "at-uri" }),
1271
1336
  record: l25.ref(
1272
- (() => main3)
1337
+ (() => view3)
1273
1338
  )
1274
1339
  })
1275
1340
  );
@@ -1368,7 +1433,7 @@ var tipResponse = l27.typedObject(
1368
1433
  "tipResponse",
1369
1434
  l27.object({
1370
1435
  uri: l27.string({ format: "at-uri" }),
1371
- record: l27.ref((() => main2))
1436
+ record: l27.ref((() => view2))
1372
1437
  })
1373
1438
  );
1374
1439
 
@@ -1431,7 +1496,8 @@ __export(subscription_exports3, {
1431
1496
  $safeValidate: () => $safeValidate3,
1432
1497
  $type: () => $type3,
1433
1498
  $validate: () => $validate3,
1434
- main: () => main3
1499
+ main: () => main3,
1500
+ view: () => view3
1435
1501
  });
1436
1502
 
1437
1503
  // src/lexicons/com/atiproto/tip.ts
@@ -1451,7 +1517,8 @@ __export(tip_exports3, {
1451
1517
  $safeValidate: () => $safeValidate2,
1452
1518
  $type: () => $type2,
1453
1519
  $validate: () => $validate2,
1454
- main: () => main2
1520
+ main: () => main2,
1521
+ view: () => view2
1455
1522
  });
1456
1523
 
1457
1524
  // src/schemas/account/cart/clone.json
@@ -1495,7 +1562,7 @@ var clone_default = {
1495
1562
  properties: {
1496
1563
  cart: {
1497
1564
  type: "ref",
1498
- ref: "com.atiproto.cart",
1565
+ ref: "com.atiproto.cart#view",
1499
1566
  description: "The new cart record"
1500
1567
  },
1501
1568
  cartUri: {
@@ -1512,7 +1579,7 @@ var clone_default = {
1512
1579
  type: "array",
1513
1580
  items: {
1514
1581
  type: "ref",
1515
- ref: "com.atiproto.tip"
1582
+ ref: "com.atiproto.tip#view"
1516
1583
  },
1517
1584
  description: "Newly created tip records"
1518
1585
  },
@@ -1520,7 +1587,7 @@ var clone_default = {
1520
1587
  type: "array",
1521
1588
  items: {
1522
1589
  type: "ref",
1523
- ref: "com.atiproto.subscription"
1590
+ ref: "com.atiproto.subscription#view"
1524
1591
  },
1525
1592
  description: "Newly created subscription records"
1526
1593
  }
@@ -1566,7 +1633,7 @@ var create_default = {
1566
1633
  properties: {
1567
1634
  cart: {
1568
1635
  type: "ref",
1569
- ref: "com.atiproto.cart",
1636
+ ref: "com.atiproto.cart#view",
1570
1637
  description: "The created cart record"
1571
1638
  },
1572
1639
  cartUri: {
@@ -1623,7 +1690,7 @@ var get_default = {
1623
1690
  },
1624
1691
  cart: {
1625
1692
  type: "ref",
1626
- ref: "com.atiproto.cart",
1693
+ ref: "com.atiproto.cart#view",
1627
1694
  description: "The cart record data"
1628
1695
  },
1629
1696
  checkoutUrl: {
@@ -1635,7 +1702,7 @@ var get_default = {
1635
1702
  type: "array",
1636
1703
  items: {
1637
1704
  type: "ref",
1638
- ref: "com.atiproto.tip"
1705
+ ref: "com.atiproto.tip#view"
1639
1706
  },
1640
1707
  description: "Resolved tip records referenced by this cart"
1641
1708
  },
@@ -1643,7 +1710,7 @@ var get_default = {
1643
1710
  type: "array",
1644
1711
  items: {
1645
1712
  type: "ref",
1646
- ref: "com.atiproto.subscription"
1713
+ ref: "com.atiproto.subscription#view"
1647
1714
  },
1648
1715
  description: "Resolved subscription records referenced by this cart"
1649
1716
  }
@@ -1726,7 +1793,7 @@ var list_default = {
1726
1793
  },
1727
1794
  record: {
1728
1795
  type: "ref",
1729
- ref: "com.atiproto.cart"
1796
+ ref: "com.atiproto.cart#view"
1730
1797
  }
1731
1798
  }
1732
1799
  }
@@ -1808,7 +1875,7 @@ var get_default2 = {
1808
1875
  },
1809
1876
  profile: {
1810
1877
  type: "ref",
1811
- ref: "com.atiproto.profile",
1878
+ ref: "com.atiproto.profile#view",
1812
1879
  description: "The profile record data (defaults if not configured)"
1813
1880
  },
1814
1881
  hasProfile: {
@@ -1878,7 +1945,7 @@ var put_default2 = {
1878
1945
  },
1879
1946
  profile: {
1880
1947
  type: "ref",
1881
- ref: "com.atiproto.profile",
1948
+ ref: "com.atiproto.profile#view",
1882
1949
  description: "The profile record data"
1883
1950
  },
1884
1951
  hasProfile: {
@@ -1956,6 +2023,57 @@ var cart_default = {
1956
2023
  }
1957
2024
  }
1958
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
+ },
1959
2077
  cartItem: {
1960
2078
  type: "object",
1961
2079
  required: ["type", "recordUri"],
@@ -2064,7 +2182,7 @@ var cancel_default = {
2064
2182
  },
2065
2183
  subscription: {
2066
2184
  type: "ref",
2067
- ref: "com.atiproto.subscription",
2185
+ ref: "com.atiproto.subscription#view",
2068
2186
  description: "Updated subscription record"
2069
2187
  },
2070
2188
  accessUntil: {
@@ -2135,7 +2253,7 @@ var create_default2 = {
2135
2253
  subscription: {
2136
2254
  description: "The created subscription record (status: pending)",
2137
2255
  type: "ref",
2138
- ref: "com.atiproto.subscription"
2256
+ ref: "com.atiproto.subscription#view"
2139
2257
  },
2140
2258
  cartUri: {
2141
2259
  description: "URI of the cart record in PDS",
@@ -2145,7 +2263,7 @@ var create_default2 = {
2145
2263
  cart: {
2146
2264
  description: "The created cart record (status: open)",
2147
2265
  type: "ref",
2148
- ref: "com.atiproto.cart"
2266
+ ref: "com.atiproto.cart#view"
2149
2267
  },
2150
2268
  checkoutUrl: {
2151
2269
  description: "Checkout URL hosted by atiproto",
@@ -2197,7 +2315,7 @@ var get_default3 = {
2197
2315
  record: {
2198
2316
  description: "The subscription record data",
2199
2317
  type: "ref",
2200
- ref: "com.atiproto.subscription"
2318
+ ref: "com.atiproto.subscription#view"
2201
2319
  }
2202
2320
  },
2203
2321
  required: ["uri", "cid", "record"],
@@ -2272,7 +2390,7 @@ var list_default3 = {
2272
2390
  },
2273
2391
  record: {
2274
2392
  type: "ref",
2275
- ref: "com.atiproto.subscription"
2393
+ ref: "com.atiproto.subscription#view"
2276
2394
  }
2277
2395
  }
2278
2396
  }
@@ -2393,7 +2511,7 @@ var create_default3 = {
2393
2511
  },
2394
2512
  tip: {
2395
2513
  type: "ref",
2396
- ref: "com.atiproto.tip",
2514
+ ref: "com.atiproto.tip#view",
2397
2515
  description: "The created tip record (status: pending)"
2398
2516
  },
2399
2517
  cartUri: {
@@ -2403,7 +2521,7 @@ var create_default3 = {
2403
2521
  },
2404
2522
  cart: {
2405
2523
  type: "ref",
2406
- ref: "com.atiproto.cart",
2524
+ ref: "com.atiproto.cart#view",
2407
2525
  description: "The cart record (new or updated)"
2408
2526
  },
2409
2527
  checkoutUrl: {
@@ -2451,7 +2569,7 @@ var get_default4 = {
2451
2569
  value: {
2452
2570
  description: "The tip record data",
2453
2571
  type: "ref",
2454
- ref: "com.atiproto.tip"
2572
+ ref: "com.atiproto.tip#view"
2455
2573
  }
2456
2574
  },
2457
2575
  required: ["uri", "cid", "value"],
@@ -2503,7 +2621,7 @@ var list_default4 = {
2503
2621
  type: "array",
2504
2622
  items: {
2505
2623
  type: "ref",
2506
- ref: "com.atiproto.tip"
2624
+ ref: "com.atiproto.tip#view"
2507
2625
  }
2508
2626
  },
2509
2627
  cursor: {
@@ -2604,6 +2722,35 @@ var profile_default = {
2604
2722
  }
2605
2723
  }
2606
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
+ }
2607
2754
  }
2608
2755
  }
2609
2756
  };
@@ -2640,7 +2787,7 @@ var get_default5 = {
2640
2787
  },
2641
2788
  profile: {
2642
2789
  type: "ref",
2643
- ref: "com.atiproto.profile",
2790
+ ref: "com.atiproto.profile#view",
2644
2791
  description: "Public profile data"
2645
2792
  }
2646
2793
  }
@@ -2714,7 +2861,7 @@ var search_default = {
2714
2861
  },
2715
2862
  record: {
2716
2863
  type: "ref",
2717
- ref: "com.atiproto.subscription"
2864
+ ref: "com.atiproto.subscription#view"
2718
2865
  }
2719
2866
  }
2720
2867
  }
@@ -2849,7 +2996,7 @@ var search_default2 = {
2849
2996
  },
2850
2997
  record: {
2851
2998
  type: "ref",
2852
- ref: "com.atiproto.tip"
2999
+ ref: "com.atiproto.tip#view"
2853
3000
  }
2854
3001
  }
2855
3002
  }
@@ -3098,6 +3245,68 @@ var subscription_default = {
3098
3245
  type: "object"
3099
3246
  },
3100
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
+ }
3101
3310
  }
3102
3311
  },
3103
3312
  id: "com.atiproto.subscription",
@@ -3159,6 +3368,55 @@ var tip_default = {
3159
3368
  type: "object"
3160
3369
  },
3161
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
+ }
3162
3420
  }
3163
3421
  },
3164
3422
  id: "com.atiproto.tip",