@atiproto/lexicons 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -118,6 +118,7 @@ var view = l.typedObject(
118
118
  $nsid,
119
119
  "view",
120
120
  l.object({
121
+ uri: l.string({ format: "at-uri" }),
121
122
  items: l.array(l.ref((() => cartItem))),
122
123
  currency: l.string({ maxLength: 3 }),
123
124
  total: l.integer(),
@@ -193,6 +194,7 @@ var view2 = l2.typedObject(
193
194
  $nsid2,
194
195
  "view",
195
196
  l2.object({
197
+ uri: l2.string({ format: "at-uri" }),
196
198
  subject: l2.optional(l2.string({ format: "did" })),
197
199
  recordUri: l2.optional(l2.string({ format: "at-uri" })),
198
200
  amount: l2.integer({ minimum: 0 }),
@@ -262,6 +264,7 @@ var view3 = l3.typedObject(
262
264
  $nsid3,
263
265
  "view",
264
266
  l3.object({
267
+ uri: l3.string({ format: "at-uri" }),
265
268
  subject: l3.optional(l3.string({ format: "did" })),
266
269
  amount: l3.integer({ minimum: 0 }),
267
270
  currency: l3.string({ maxLength: 3 }),
@@ -547,6 +550,7 @@ var view4 = l9.typedObject(
547
550
  $nsid9,
548
551
  "view",
549
552
  l9.object({
553
+ uri: l9.string({ format: "at-uri" }),
550
554
  acceptsTips: l9.optional(l9.boolean()),
551
555
  acceptsSubscriptions: l9.optional(l9.boolean()),
552
556
  disableReceiptNotifications: l9.optional(l9.boolean()),
@@ -1207,7 +1211,10 @@ import { l as l23 } from "@atproto/lex";
1207
1211
  var $nsid23 = "com.atiproto.feed.subscription.get";
1208
1212
  var main23 = l23.query(
1209
1213
  $nsid23,
1210
- l23.params({ uri: l23.string({ format: "at-uri" }) }),
1214
+ l23.params({
1215
+ uri: l23.optional(l23.string({ format: "at-uri" })),
1216
+ subject: l23.optional(l23.string({ format: "did" }))
1217
+ }),
1211
1218
  l23.jsonPayload({
1212
1219
  uri: l23.string({ format: "at-uri" }),
1213
1220
  cid: l23.string({ format: "cid" }),
@@ -1437,7 +1444,11 @@ import { l as l28 } from "@atproto/lex";
1437
1444
  var $nsid28 = "com.atiproto.feed.tip.get";
1438
1445
  var main28 = l28.query(
1439
1446
  $nsid28,
1440
- l28.params({ uri: l28.string({ format: "at-uri" }) }),
1447
+ l28.params({
1448
+ uri: l28.optional(l28.string({ format: "at-uri" })),
1449
+ subject: l28.optional(l28.string({ format: "did" })),
1450
+ recordUri: l28.optional(l28.string({ format: "at-uri" }))
1451
+ }),
1441
1452
  l28.jsonPayload({
1442
1453
  uri: l28.string({ format: "at-uri" }),
1443
1454
  cid: l28.string({ format: "cid" }),
@@ -2590,6 +2601,7 @@ var cart_default = {
2590
2601
  type: "object",
2591
2602
  description: "View of a cart record for use in API responses",
2592
2603
  required: [
2604
+ "uri",
2593
2605
  "items",
2594
2606
  "currency",
2595
2607
  "total",
@@ -2598,6 +2610,11 @@ var cart_default = {
2598
2610
  "expiresAt"
2599
2611
  ],
2600
2612
  properties: {
2613
+ uri: {
2614
+ type: "string",
2615
+ format: "at-uri",
2616
+ description: "AT-URI of the cart record"
2617
+ },
2601
2618
  items: {
2602
2619
  type: "array",
2603
2620
  items: {
@@ -2853,16 +2870,20 @@ var create_default2 = {
2853
2870
  var get_default5 = {
2854
2871
  defs: {
2855
2872
  main: {
2856
- description: "Get a specific subscription by URI",
2873
+ description: "Get a specific subscription sent by the authenticated user. Looks up by subscription record uri or subject (recipient) DID. These are mutually exclusive; uri takes precedence.",
2857
2874
  parameters: {
2858
2875
  properties: {
2859
2876
  uri: {
2860
- description: "AT-URI of the subscription record",
2877
+ description: "AT-URI of the subscription record. Takes precedence over subject.",
2861
2878
  format: "at-uri",
2862
2879
  type: "string"
2880
+ },
2881
+ subject: {
2882
+ description: "DID of the user being subscribed to. Ignored if uri is provided.",
2883
+ format: "did",
2884
+ type: "string"
2863
2885
  }
2864
2886
  },
2865
- required: ["uri"],
2866
2887
  type: "params"
2867
2888
  },
2868
2889
  output: {
@@ -3169,16 +3190,25 @@ var create_default3 = {
3169
3190
  var get_default6 = {
3170
3191
  defs: {
3171
3192
  main: {
3172
- description: "Get a specific tip by URI",
3193
+ description: "Get a specific tip sent by the authenticated user. Looks up by tip record uri, subject (recipient) DID, or record uri. These are mutually exclusive and resolved in that order.",
3173
3194
  parameters: {
3174
3195
  properties: {
3175
3196
  uri: {
3176
- description: "AT-URI of the tip record",
3197
+ description: "AT-URI of the tip record. Takes precedence over subject and recordUri.",
3198
+ format: "at-uri",
3199
+ type: "string"
3200
+ },
3201
+ subject: {
3202
+ description: "DID of the tip recipient. Takes precedence over recordUri.",
3203
+ format: "did",
3204
+ type: "string"
3205
+ },
3206
+ recordUri: {
3207
+ description: "AT-URI of the record being tipped. Ignored if uri or subject is provided.",
3177
3208
  format: "at-uri",
3178
3209
  type: "string"
3179
3210
  }
3180
3211
  },
3181
- required: ["uri"],
3182
3212
  type: "params"
3183
3213
  },
3184
3214
  output: {
@@ -3219,12 +3249,22 @@ var list_default6 = {
3219
3249
  defs: {
3220
3250
  main: {
3221
3251
  type: "query",
3222
- description: "List tips for the authenticated user",
3252
+ description: "List tips sent by the authenticated user",
3223
3253
  input: {
3224
3254
  encoding: "application/json",
3225
3255
  schema: {
3226
3256
  type: "object",
3227
3257
  properties: {
3258
+ subject: {
3259
+ type: "string",
3260
+ format: "did",
3261
+ description: "Optional: only return tips sent to this recipient DID"
3262
+ },
3263
+ recordUri: {
3264
+ type: "string",
3265
+ format: "at-uri",
3266
+ description: "Optional: only return tips for this specific record"
3267
+ },
3228
3268
  cursor: {
3229
3269
  type: "string",
3230
3270
  maxLength: 512,
@@ -3418,8 +3458,13 @@ var profile_default = {
3418
3458
  view: {
3419
3459
  type: "object",
3420
3460
  description: "View of a user's profile settings for use in API responses",
3421
- required: ["createdAt"],
3461
+ required: ["uri", "createdAt"],
3422
3462
  properties: {
3463
+ uri: {
3464
+ type: "string",
3465
+ format: "at-uri",
3466
+ description: "AT-URI of the profile record"
3467
+ },
3423
3468
  acceptsTips: {
3424
3469
  type: "boolean",
3425
3470
  description: "Whether user accepts tips (default: true)"
@@ -3792,6 +3837,7 @@ var subscription_default = {
3792
3837
  type: "object",
3793
3838
  description: "View of a subscription record for use in API responses",
3794
3839
  required: [
3840
+ "uri",
3795
3841
  "amount",
3796
3842
  "currency",
3797
3843
  "interval",
@@ -3800,6 +3846,11 @@ var subscription_default = {
3800
3846
  "createdAt"
3801
3847
  ],
3802
3848
  properties: {
3849
+ uri: {
3850
+ description: "AT-URI of the subscription record",
3851
+ format: "at-uri",
3852
+ type: "string"
3853
+ },
3803
3854
  subject: {
3804
3855
  description: "DID of the user being subscribed to",
3805
3856
  format: "did",
@@ -3913,8 +3964,13 @@ var tip_default = {
3913
3964
  view: {
3914
3965
  type: "object",
3915
3966
  description: "View of a tip record for use in API responses",
3916
- required: ["amount", "currency", "status", "createdAt"],
3967
+ required: ["uri", "amount", "currency", "status", "createdAt"],
3917
3968
  properties: {
3969
+ uri: {
3970
+ description: "AT-URI of the tip record",
3971
+ format: "at-uri",
3972
+ type: "string"
3973
+ },
3918
3974
  subject: {
3919
3975
  description: "DID of the user receiving the tip",
3920
3976
  format: "did",