@atiproto/lexicons 0.5.1 → 0.5.3

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.js CHANGED
@@ -1232,11 +1232,12 @@ var import_lex23 = require("@atproto/lex");
1232
1232
  var $nsid23 = "com.atiproto.feed.subscription.get";
1233
1233
  var main23 = import_lex23.l.query(
1234
1234
  $nsid23,
1235
- import_lex23.l.params({ uri: import_lex23.l.string({ format: "at-uri" }) }),
1235
+ import_lex23.l.params({
1236
+ uri: import_lex23.l.optional(import_lex23.l.string({ format: "at-uri" })),
1237
+ subject: import_lex23.l.optional(import_lex23.l.string({ format: "did" }))
1238
+ }),
1236
1239
  import_lex23.l.jsonPayload({
1237
- uri: import_lex23.l.string({ format: "at-uri" }),
1238
- cid: import_lex23.l.string({ format: "cid" }),
1239
- record: import_lex23.l.ref(
1240
+ subscription: import_lex23.l.ref(
1240
1241
  (() => view3)
1241
1242
  )
1242
1243
  })
@@ -1253,8 +1254,7 @@ __export(list_exports5, {
1253
1254
  $nsid: () => $nsid24,
1254
1255
  $output: () => $output18,
1255
1256
  $params: () => $params18,
1256
- main: () => main24,
1257
- subscriptionResponse: () => subscriptionResponse
1257
+ main: () => main24
1258
1258
  });
1259
1259
 
1260
1260
  // src/lexicons/com/atiproto/feed/subscription/list.defs.ts
@@ -1264,8 +1264,7 @@ __export(list_defs_exports5, {
1264
1264
  $nsid: () => $nsid24,
1265
1265
  $output: () => $output18,
1266
1266
  $params: () => $params18,
1267
- main: () => main24,
1268
- subscriptionResponse: () => subscriptionResponse
1267
+ main: () => main24
1269
1268
  });
1270
1269
  var import_lex24 = require("@atproto/lex");
1271
1270
  var $nsid24 = "com.atiproto.feed.subscription.list";
@@ -1274,7 +1273,9 @@ var main24 = import_lex24.l.query(
1274
1273
  import_lex24.l.params(),
1275
1274
  import_lex24.l.jsonPayload({
1276
1275
  subscriptions: import_lex24.l.array(
1277
- import_lex24.l.ref((() => subscriptionResponse))
1276
+ import_lex24.l.ref(
1277
+ (() => view3)
1278
+ )
1278
1279
  ),
1279
1280
  cursor: import_lex24.l.optional(import_lex24.l.string({ maxLength: 512 }))
1280
1281
  })
@@ -1282,16 +1283,6 @@ var main24 = import_lex24.l.query(
1282
1283
  var $lxm18 = main24.nsid;
1283
1284
  var $params18 = main24.parameters;
1284
1285
  var $output18 = main24.output;
1285
- var subscriptionResponse = import_lex24.l.typedObject(
1286
- $nsid24,
1287
- "subscriptionResponse",
1288
- import_lex24.l.object({
1289
- uri: import_lex24.l.string({ format: "at-uri" }),
1290
- record: import_lex24.l.ref(
1291
- (() => view3)
1292
- )
1293
- })
1294
- );
1295
1286
 
1296
1287
  // src/lexicons/com/atiproto/feed/subscription/put.ts
1297
1288
  var put_exports3 = {};
@@ -1462,11 +1453,13 @@ var import_lex28 = require("@atproto/lex");
1462
1453
  var $nsid28 = "com.atiproto.feed.tip.get";
1463
1454
  var main28 = import_lex28.l.query(
1464
1455
  $nsid28,
1465
- import_lex28.l.params({ uri: import_lex28.l.string({ format: "at-uri" }) }),
1456
+ import_lex28.l.params({
1457
+ uri: import_lex28.l.optional(import_lex28.l.string({ format: "at-uri" })),
1458
+ subject: import_lex28.l.optional(import_lex28.l.string({ format: "did" })),
1459
+ recordUri: import_lex28.l.optional(import_lex28.l.string({ format: "at-uri" }))
1460
+ }),
1466
1461
  import_lex28.l.jsonPayload({
1467
- uri: import_lex28.l.string({ format: "at-uri" }),
1468
- cid: import_lex28.l.string({ format: "cid" }),
1469
- value: import_lex28.l.ref((() => view2))
1462
+ tip: import_lex28.l.ref((() => view2))
1470
1463
  })
1471
1464
  );
1472
1465
  var $lxm22 = main28.nsid;
@@ -1499,7 +1492,7 @@ var main29 = import_lex29.l.query(
1499
1492
  $nsid29,
1500
1493
  import_lex29.l.params(),
1501
1494
  import_lex29.l.jsonPayload({
1502
- records: import_lex29.l.array(import_lex29.l.ref((() => view2))),
1495
+ tips: import_lex29.l.array(import_lex29.l.ref((() => view2))),
1503
1496
  cursor: import_lex29.l.optional(import_lex29.l.string({ maxLength: 512 }))
1504
1497
  })
1505
1498
  );
@@ -2884,40 +2877,34 @@ var create_default2 = {
2884
2877
  var get_default5 = {
2885
2878
  defs: {
2886
2879
  main: {
2887
- description: "Get a specific subscription by URI",
2880
+ 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.",
2888
2881
  parameters: {
2889
2882
  properties: {
2890
2883
  uri: {
2891
- description: "AT-URI of the subscription record",
2884
+ description: "AT-URI of the subscription record. Takes precedence over subject.",
2892
2885
  format: "at-uri",
2893
2886
  type: "string"
2887
+ },
2888
+ subject: {
2889
+ description: "DID of the user being subscribed to. Ignored if uri is provided.",
2890
+ format: "did",
2891
+ type: "string"
2894
2892
  }
2895
2893
  },
2896
- required: ["uri"],
2897
2894
  type: "params"
2898
2895
  },
2899
2896
  output: {
2900
2897
  encoding: "application/json",
2901
2898
  schema: {
2899
+ type: "object",
2900
+ required: ["subscription"],
2902
2901
  properties: {
2903
- uri: {
2904
- description: "Subscription record URI",
2905
- format: "at-uri",
2906
- type: "string"
2907
- },
2908
- cid: {
2909
- description: "Subscription record CID",
2910
- format: "cid",
2911
- type: "string"
2912
- },
2913
- record: {
2914
- description: "The subscription record data",
2902
+ subscription: {
2915
2903
  type: "ref",
2916
- ref: "com.atiproto.subscription#view"
2904
+ ref: "com.atiproto.subscription#view",
2905
+ description: "The subscription record data"
2917
2906
  }
2918
- },
2919
- required: ["uri", "cid", "record"],
2920
- type: "object"
2907
+ }
2921
2908
  }
2922
2909
  },
2923
2910
  type: "query"
@@ -2965,7 +2952,7 @@ var list_default5 = {
2965
2952
  type: "array",
2966
2953
  items: {
2967
2954
  type: "ref",
2968
- ref: "#subscriptionResponse"
2955
+ ref: "com.atiproto.subscription#view"
2969
2956
  }
2970
2957
  },
2971
2958
  cursor: {
@@ -2976,21 +2963,6 @@ var list_default5 = {
2976
2963
  }
2977
2964
  }
2978
2965
  }
2979
- },
2980
- subscriptionResponse: {
2981
- type: "object",
2982
- required: ["uri", "record"],
2983
- properties: {
2984
- uri: {
2985
- type: "string",
2986
- format: "at-uri",
2987
- description: "AT-URI of the subscription record"
2988
- },
2989
- record: {
2990
- type: "ref",
2991
- ref: "com.atiproto.subscription#view"
2992
- }
2993
- }
2994
2966
  }
2995
2967
  }
2996
2968
  };
@@ -3200,40 +3172,39 @@ var create_default3 = {
3200
3172
  var get_default6 = {
3201
3173
  defs: {
3202
3174
  main: {
3203
- description: "Get a specific tip by URI",
3175
+ 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.",
3204
3176
  parameters: {
3205
3177
  properties: {
3206
3178
  uri: {
3207
- description: "AT-URI of the tip record",
3179
+ description: "AT-URI of the tip record. Takes precedence over subject and recordUri.",
3180
+ format: "at-uri",
3181
+ type: "string"
3182
+ },
3183
+ subject: {
3184
+ description: "DID of the tip recipient. Takes precedence over recordUri.",
3185
+ format: "did",
3186
+ type: "string"
3187
+ },
3188
+ recordUri: {
3189
+ description: "AT-URI of the record being tipped. Ignored if uri or subject is provided.",
3208
3190
  format: "at-uri",
3209
3191
  type: "string"
3210
3192
  }
3211
3193
  },
3212
- required: ["uri"],
3213
3194
  type: "params"
3214
3195
  },
3215
3196
  output: {
3216
3197
  encoding: "application/json",
3217
3198
  schema: {
3199
+ type: "object",
3200
+ required: ["tip"],
3218
3201
  properties: {
3219
- uri: {
3220
- description: "Tip record URI",
3221
- format: "at-uri",
3222
- type: "string"
3223
- },
3224
- cid: {
3225
- description: "Tip record CID",
3226
- format: "cid",
3227
- type: "string"
3228
- },
3229
- value: {
3230
- description: "The tip record data",
3202
+ tip: {
3231
3203
  type: "ref",
3232
- ref: "com.atiproto.tip#view"
3204
+ ref: "com.atiproto.tip#view",
3205
+ description: "The tip record data"
3233
3206
  }
3234
- },
3235
- required: ["uri", "cid", "value"],
3236
- type: "object"
3207
+ }
3237
3208
  }
3238
3209
  },
3239
3210
  type: "query"
@@ -3250,12 +3221,22 @@ var list_default6 = {
3250
3221
  defs: {
3251
3222
  main: {
3252
3223
  type: "query",
3253
- description: "List tips for the authenticated user",
3224
+ description: "List tips sent by the authenticated user",
3254
3225
  input: {
3255
3226
  encoding: "application/json",
3256
3227
  schema: {
3257
3228
  type: "object",
3258
3229
  properties: {
3230
+ subject: {
3231
+ type: "string",
3232
+ format: "did",
3233
+ description: "Optional: only return tips sent to this recipient DID"
3234
+ },
3235
+ recordUri: {
3236
+ type: "string",
3237
+ format: "at-uri",
3238
+ description: "Optional: only return tips for this specific record"
3239
+ },
3259
3240
  cursor: {
3260
3241
  type: "string",
3261
3242
  maxLength: 512,
@@ -3275,9 +3256,9 @@ var list_default6 = {
3275
3256
  encoding: "application/json",
3276
3257
  schema: {
3277
3258
  type: "object",
3278
- required: ["records"],
3259
+ required: ["tips"],
3279
3260
  properties: {
3280
- records: {
3261
+ tips: {
3281
3262
  type: "array",
3282
3263
  items: {
3283
3264
  type: "ref",