@atproto/lex-document 0.0.4 → 0.0.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atproto/lex-document
2
2
 
3
+ ## 0.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#4416](https://github.com/bluesky-social/atproto/pull/4416) [`d551b0e`](https://github.com/bluesky-social/atproto/commit/d551b0e3527714c111c3ec6e4c90ad7f46369fab) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Align lexicon document validation with the spec
8
+
9
+ - Updated dependencies []:
10
+ - @atproto/lex-schema@0.0.4
11
+
3
12
  ## 0.0.4
4
13
 
5
14
  ### Patch Changes
@@ -607,132 +607,6 @@ export declare const lexiconPayload: l.ObjectSchema<{
607
607
  readonly description: l.OptionalSchema<string>;
608
608
  }>;
609
609
  export type LexiconPayload = l.Infer<typeof lexiconPayload>;
610
- export declare const lexiconSubscriptionMessage: l.ObjectSchema<{
611
- readonly description: l.OptionalSchema<string>;
612
- readonly schema: l.OptionalSchema<{
613
- type: "ref";
614
- ref: string;
615
- description?: string | undefined;
616
- } | {
617
- type: "union";
618
- refs: string[];
619
- closed?: boolean | undefined;
620
- description?: string | undefined;
621
- } | {
622
- type: "object";
623
- properties: l.DictSchemaOutput<l.StringSchema<{}>, l.DiscriminatedUnionSchema<"type", readonly [l.ObjectSchema<{
624
- readonly type: l.LiteralSchema<"boolean">;
625
- readonly default: l.OptionalSchema<boolean>;
626
- readonly const: l.OptionalSchema<boolean>;
627
- readonly description: l.OptionalSchema<string>;
628
- }>, l.ObjectSchema<{
629
- readonly type: l.LiteralSchema<"integer">;
630
- readonly default: l.OptionalSchema<number>;
631
- readonly minimum: l.OptionalSchema<number>;
632
- readonly maximum: l.OptionalSchema<number>;
633
- readonly enum: l.OptionalSchema<number[]>;
634
- readonly const: l.OptionalSchema<number>;
635
- readonly description: l.OptionalSchema<string>;
636
- }>, l.ObjectSchema<{
637
- readonly type: l.LiteralSchema<"string">;
638
- readonly format: l.OptionalSchema<"datetime" | "uri" | "at-uri" | "did" | "handle" | "at-identifier" | "nsid" | "cid" | "language" | "tid" | "record-key">;
639
- readonly default: l.OptionalSchema<string>;
640
- readonly minLength: l.OptionalSchema<number>;
641
- readonly maxLength: l.OptionalSchema<number>;
642
- readonly minGraphemes: l.OptionalSchema<number>;
643
- readonly maxGraphemes: l.OptionalSchema<number>;
644
- readonly enum: l.OptionalSchema<string[]>;
645
- readonly const: l.OptionalSchema<string>;
646
- readonly knownValues: l.OptionalSchema<string[]>;
647
- readonly description: l.OptionalSchema<string>;
648
- }>, l.ObjectSchema<{
649
- readonly type: l.LiteralSchema<"bytes">;
650
- readonly maxLength: l.OptionalSchema<number>;
651
- readonly minLength: l.OptionalSchema<number>;
652
- readonly description: l.OptionalSchema<string>;
653
- }>, l.ObjectSchema<{
654
- readonly type: l.LiteralSchema<"cid-link">;
655
- readonly description: l.OptionalSchema<string>;
656
- }>, l.ObjectSchema<{
657
- readonly type: l.LiteralSchema<"blob">;
658
- readonly accept: l.OptionalSchema<string[]>;
659
- readonly maxSize: l.OptionalSchema<number>;
660
- readonly description: l.OptionalSchema<string>;
661
- }>, l.ObjectSchema<{
662
- readonly type: l.LiteralSchema<"unknown">;
663
- readonly description: l.OptionalSchema<string>;
664
- }>, l.ObjectSchema<{
665
- readonly type: l.LiteralSchema<"ref">;
666
- readonly ref: l.StringSchema<{}>;
667
- readonly description: l.OptionalSchema<string>;
668
- }>, l.ObjectSchema<{
669
- readonly type: l.LiteralSchema<"union">;
670
- readonly refs: l.ArraySchema<l.StringSchema<{}>>;
671
- readonly closed: l.OptionalSchema<boolean>;
672
- readonly description: l.OptionalSchema<string>;
673
- }>, l.ObjectSchema<{
674
- readonly type: l.LiteralSchema<"array">;
675
- readonly items: l.DiscriminatedUnionSchema<"type", readonly [l.ObjectSchema<{
676
- readonly type: l.LiteralSchema<"boolean">;
677
- readonly default: l.OptionalSchema<boolean>;
678
- readonly const: l.OptionalSchema<boolean>;
679
- readonly description: l.OptionalSchema<string>;
680
- }>, l.ObjectSchema<{
681
- readonly type: l.LiteralSchema<"integer">;
682
- readonly default: l.OptionalSchema<number>;
683
- readonly minimum: l.OptionalSchema<number>;
684
- readonly maximum: l.OptionalSchema<number>;
685
- readonly enum: l.OptionalSchema<number[]>;
686
- readonly const: l.OptionalSchema<number>;
687
- readonly description: l.OptionalSchema<string>;
688
- }>, l.ObjectSchema<{
689
- readonly type: l.LiteralSchema<"string">;
690
- readonly format: l.OptionalSchema<"datetime" | "uri" | "at-uri" | "did" | "handle" | "at-identifier" | "nsid" | "cid" | "language" | "tid" | "record-key">;
691
- readonly default: l.OptionalSchema<string>;
692
- readonly minLength: l.OptionalSchema<number>;
693
- readonly maxLength: l.OptionalSchema<number>;
694
- readonly minGraphemes: l.OptionalSchema<number>;
695
- readonly maxGraphemes: l.OptionalSchema<number>;
696
- readonly enum: l.OptionalSchema<string[]>;
697
- readonly const: l.OptionalSchema<string>;
698
- readonly knownValues: l.OptionalSchema<string[]>;
699
- readonly description: l.OptionalSchema<string>;
700
- }>, l.ObjectSchema<{
701
- readonly type: l.LiteralSchema<"bytes">;
702
- readonly maxLength: l.OptionalSchema<number>;
703
- readonly minLength: l.OptionalSchema<number>;
704
- readonly description: l.OptionalSchema<string>;
705
- }>, l.ObjectSchema<{
706
- readonly type: l.LiteralSchema<"cid-link">;
707
- readonly description: l.OptionalSchema<string>;
708
- }>, l.ObjectSchema<{
709
- readonly type: l.LiteralSchema<"blob">;
710
- readonly accept: l.OptionalSchema<string[]>;
711
- readonly maxSize: l.OptionalSchema<number>;
712
- readonly description: l.OptionalSchema<string>;
713
- }>, l.ObjectSchema<{
714
- readonly type: l.LiteralSchema<"unknown">;
715
- readonly description: l.OptionalSchema<string>;
716
- }>, l.ObjectSchema<{
717
- readonly type: l.LiteralSchema<"ref">;
718
- readonly ref: l.StringSchema<{}>;
719
- readonly description: l.OptionalSchema<string>;
720
- }>, l.ObjectSchema<{
721
- readonly type: l.LiteralSchema<"union">;
722
- readonly refs: l.ArraySchema<l.StringSchema<{}>>;
723
- readonly closed: l.OptionalSchema<boolean>;
724
- readonly description: l.OptionalSchema<string>;
725
- }>]>;
726
- readonly minLength: l.OptionalSchema<number>;
727
- readonly maxLength: l.OptionalSchema<number>;
728
- readonly description: l.OptionalSchema<string>;
729
- }>]>>;
730
- required?: string[] | undefined;
731
- nullable?: string[] | undefined;
732
- description?: string | undefined;
733
- }>;
734
- }>;
735
- export type LexiconSubscriptionMessage = l.Infer<typeof lexiconSubscriptionMessage>;
736
610
  export declare const lexiconError: l.ObjectSchema<{
737
611
  readonly name: l.StringSchema<{
738
612
  readonly minLength: 1;
@@ -1325,130 +1199,14 @@ export declare const lexiconSubscriptionSchema: l.ObjectSchema<{
1325
1199
  required?: string[] | undefined;
1326
1200
  description?: string | undefined;
1327
1201
  }>;
1328
- readonly message: l.OptionalSchema<{
1329
- description?: string | undefined;
1330
- schema?: {
1331
- type: "ref";
1332
- ref: string;
1333
- description?: string | undefined;
1334
- } | {
1335
- type: "union";
1336
- refs: string[];
1337
- closed?: boolean | undefined;
1338
- description?: string | undefined;
1339
- } | {
1340
- type: "object";
1341
- properties: l.DictSchemaOutput<l.StringSchema<{}>, l.DiscriminatedUnionSchema<"type", readonly [l.ObjectSchema<{
1342
- readonly type: l.LiteralSchema<"boolean">;
1343
- readonly default: l.OptionalSchema<boolean>;
1344
- readonly const: l.OptionalSchema<boolean>;
1345
- readonly description: l.OptionalSchema<string>;
1346
- }>, l.ObjectSchema<{
1347
- readonly type: l.LiteralSchema<"integer">;
1348
- readonly default: l.OptionalSchema<number>;
1349
- readonly minimum: l.OptionalSchema<number>;
1350
- readonly maximum: l.OptionalSchema<number>;
1351
- readonly enum: l.OptionalSchema<number[]>;
1352
- readonly const: l.OptionalSchema<number>;
1353
- readonly description: l.OptionalSchema<string>;
1354
- }>, l.ObjectSchema<{
1355
- readonly type: l.LiteralSchema<"string">;
1356
- readonly format: l.OptionalSchema<"datetime" | "uri" | "at-uri" | "did" | "handle" | "at-identifier" | "nsid" | "cid" | "language" | "tid" | "record-key">;
1357
- readonly default: l.OptionalSchema<string>;
1358
- readonly minLength: l.OptionalSchema<number>;
1359
- readonly maxLength: l.OptionalSchema<number>;
1360
- readonly minGraphemes: l.OptionalSchema<number>;
1361
- readonly maxGraphemes: l.OptionalSchema<number>;
1362
- readonly enum: l.OptionalSchema<string[]>;
1363
- readonly const: l.OptionalSchema<string>;
1364
- readonly knownValues: l.OptionalSchema<string[]>;
1365
- readonly description: l.OptionalSchema<string>;
1366
- }>, l.ObjectSchema<{
1367
- readonly type: l.LiteralSchema<"bytes">;
1368
- readonly maxLength: l.OptionalSchema<number>;
1369
- readonly minLength: l.OptionalSchema<number>;
1370
- readonly description: l.OptionalSchema<string>;
1371
- }>, l.ObjectSchema<{
1372
- readonly type: l.LiteralSchema<"cid-link">;
1373
- readonly description: l.OptionalSchema<string>;
1374
- }>, l.ObjectSchema<{
1375
- readonly type: l.LiteralSchema<"blob">;
1376
- readonly accept: l.OptionalSchema<string[]>;
1377
- readonly maxSize: l.OptionalSchema<number>;
1378
- readonly description: l.OptionalSchema<string>;
1379
- }>, l.ObjectSchema<{
1380
- readonly type: l.LiteralSchema<"unknown">;
1381
- readonly description: l.OptionalSchema<string>;
1382
- }>, l.ObjectSchema<{
1383
- readonly type: l.LiteralSchema<"ref">;
1384
- readonly ref: l.StringSchema<{}>;
1385
- readonly description: l.OptionalSchema<string>;
1386
- }>, l.ObjectSchema<{
1387
- readonly type: l.LiteralSchema<"union">;
1388
- readonly refs: l.ArraySchema<l.StringSchema<{}>>;
1389
- readonly closed: l.OptionalSchema<boolean>;
1390
- readonly description: l.OptionalSchema<string>;
1391
- }>, l.ObjectSchema<{
1392
- readonly type: l.LiteralSchema<"array">;
1393
- readonly items: l.DiscriminatedUnionSchema<"type", readonly [l.ObjectSchema<{
1394
- readonly type: l.LiteralSchema<"boolean">;
1395
- readonly default: l.OptionalSchema<boolean>;
1396
- readonly const: l.OptionalSchema<boolean>;
1397
- readonly description: l.OptionalSchema<string>;
1398
- }>, l.ObjectSchema<{
1399
- readonly type: l.LiteralSchema<"integer">;
1400
- readonly default: l.OptionalSchema<number>;
1401
- readonly minimum: l.OptionalSchema<number>;
1402
- readonly maximum: l.OptionalSchema<number>;
1403
- readonly enum: l.OptionalSchema<number[]>;
1404
- readonly const: l.OptionalSchema<number>;
1405
- readonly description: l.OptionalSchema<string>;
1406
- }>, l.ObjectSchema<{
1407
- readonly type: l.LiteralSchema<"string">;
1408
- readonly format: l.OptionalSchema<"datetime" | "uri" | "at-uri" | "did" | "handle" | "at-identifier" | "nsid" | "cid" | "language" | "tid" | "record-key">;
1409
- readonly default: l.OptionalSchema<string>;
1410
- readonly minLength: l.OptionalSchema<number>;
1411
- readonly maxLength: l.OptionalSchema<number>;
1412
- readonly minGraphemes: l.OptionalSchema<number>;
1413
- readonly maxGraphemes: l.OptionalSchema<number>;
1414
- readonly enum: l.OptionalSchema<string[]>;
1415
- readonly const: l.OptionalSchema<string>;
1416
- readonly knownValues: l.OptionalSchema<string[]>;
1417
- readonly description: l.OptionalSchema<string>;
1418
- }>, l.ObjectSchema<{
1419
- readonly type: l.LiteralSchema<"bytes">;
1420
- readonly maxLength: l.OptionalSchema<number>;
1421
- readonly minLength: l.OptionalSchema<number>;
1422
- readonly description: l.OptionalSchema<string>;
1423
- }>, l.ObjectSchema<{
1424
- readonly type: l.LiteralSchema<"cid-link">;
1425
- readonly description: l.OptionalSchema<string>;
1426
- }>, l.ObjectSchema<{
1427
- readonly type: l.LiteralSchema<"blob">;
1428
- readonly accept: l.OptionalSchema<string[]>;
1429
- readonly maxSize: l.OptionalSchema<number>;
1430
- readonly description: l.OptionalSchema<string>;
1431
- }>, l.ObjectSchema<{
1432
- readonly type: l.LiteralSchema<"unknown">;
1433
- readonly description: l.OptionalSchema<string>;
1434
- }>, l.ObjectSchema<{
1435
- readonly type: l.LiteralSchema<"ref">;
1436
- readonly ref: l.StringSchema<{}>;
1437
- readonly description: l.OptionalSchema<string>;
1438
- }>, l.ObjectSchema<{
1439
- readonly type: l.LiteralSchema<"union">;
1440
- readonly refs: l.ArraySchema<l.StringSchema<{}>>;
1441
- readonly closed: l.OptionalSchema<boolean>;
1442
- readonly description: l.OptionalSchema<string>;
1443
- }>]>;
1444
- readonly minLength: l.OptionalSchema<number>;
1445
- readonly maxLength: l.OptionalSchema<number>;
1446
- readonly description: l.OptionalSchema<string>;
1447
- }>]>>;
1448
- required?: string[] | undefined;
1449
- nullable?: string[] | undefined;
1450
- description?: string | undefined;
1451
- } | undefined;
1202
+ readonly message: l.ObjectSchema<{
1203
+ readonly description: l.OptionalSchema<string>;
1204
+ readonly schema: l.ObjectSchema<{
1205
+ readonly type: l.LiteralSchema<"union">;
1206
+ readonly refs: l.ArraySchema<l.StringSchema<{}>>;
1207
+ readonly closed: l.OptionalSchema<boolean>;
1208
+ readonly description: l.OptionalSchema<string>;
1209
+ }>;
1452
1210
  }>;
1453
1211
  readonly errors: l.OptionalSchema<{
1454
1212
  name: string;
@@ -2416,130 +2174,14 @@ declare const MAIN_LEXICON_SCHEMAS: readonly [l.ObjectSchema<{
2416
2174
  required?: string[] | undefined;
2417
2175
  description?: string | undefined;
2418
2176
  }>;
2419
- readonly message: l.OptionalSchema<{
2420
- description?: string | undefined;
2421
- schema?: {
2422
- type: "ref";
2423
- ref: string;
2424
- description?: string | undefined;
2425
- } | {
2426
- type: "union";
2427
- refs: string[];
2428
- closed?: boolean | undefined;
2429
- description?: string | undefined;
2430
- } | {
2431
- type: "object";
2432
- properties: l.DictSchemaOutput<l.StringSchema<{}>, l.DiscriminatedUnionSchema<"type", readonly [l.ObjectSchema<{
2433
- readonly type: l.LiteralSchema<"boolean">;
2434
- readonly default: l.OptionalSchema<boolean>;
2435
- readonly const: l.OptionalSchema<boolean>;
2436
- readonly description: l.OptionalSchema<string>;
2437
- }>, l.ObjectSchema<{
2438
- readonly type: l.LiteralSchema<"integer">;
2439
- readonly default: l.OptionalSchema<number>;
2440
- readonly minimum: l.OptionalSchema<number>;
2441
- readonly maximum: l.OptionalSchema<number>;
2442
- readonly enum: l.OptionalSchema<number[]>;
2443
- readonly const: l.OptionalSchema<number>;
2444
- readonly description: l.OptionalSchema<string>;
2445
- }>, l.ObjectSchema<{
2446
- readonly type: l.LiteralSchema<"string">;
2447
- readonly format: l.OptionalSchema<"datetime" | "uri" | "at-uri" | "did" | "handle" | "at-identifier" | "nsid" | "cid" | "language" | "tid" | "record-key">;
2448
- readonly default: l.OptionalSchema<string>;
2449
- readonly minLength: l.OptionalSchema<number>;
2450
- readonly maxLength: l.OptionalSchema<number>;
2451
- readonly minGraphemes: l.OptionalSchema<number>;
2452
- readonly maxGraphemes: l.OptionalSchema<number>;
2453
- readonly enum: l.OptionalSchema<string[]>;
2454
- readonly const: l.OptionalSchema<string>;
2455
- readonly knownValues: l.OptionalSchema<string[]>;
2456
- readonly description: l.OptionalSchema<string>;
2457
- }>, l.ObjectSchema<{
2458
- readonly type: l.LiteralSchema<"bytes">;
2459
- readonly maxLength: l.OptionalSchema<number>;
2460
- readonly minLength: l.OptionalSchema<number>;
2461
- readonly description: l.OptionalSchema<string>;
2462
- }>, l.ObjectSchema<{
2463
- readonly type: l.LiteralSchema<"cid-link">;
2464
- readonly description: l.OptionalSchema<string>;
2465
- }>, l.ObjectSchema<{
2466
- readonly type: l.LiteralSchema<"blob">;
2467
- readonly accept: l.OptionalSchema<string[]>;
2468
- readonly maxSize: l.OptionalSchema<number>;
2469
- readonly description: l.OptionalSchema<string>;
2470
- }>, l.ObjectSchema<{
2471
- readonly type: l.LiteralSchema<"unknown">;
2472
- readonly description: l.OptionalSchema<string>;
2473
- }>, l.ObjectSchema<{
2474
- readonly type: l.LiteralSchema<"ref">;
2475
- readonly ref: l.StringSchema<{}>;
2476
- readonly description: l.OptionalSchema<string>;
2477
- }>, l.ObjectSchema<{
2478
- readonly type: l.LiteralSchema<"union">;
2479
- readonly refs: l.ArraySchema<l.StringSchema<{}>>;
2480
- readonly closed: l.OptionalSchema<boolean>;
2481
- readonly description: l.OptionalSchema<string>;
2482
- }>, l.ObjectSchema<{
2483
- readonly type: l.LiteralSchema<"array">;
2484
- readonly items: l.DiscriminatedUnionSchema<"type", readonly [l.ObjectSchema<{
2485
- readonly type: l.LiteralSchema<"boolean">;
2486
- readonly default: l.OptionalSchema<boolean>;
2487
- readonly const: l.OptionalSchema<boolean>;
2488
- readonly description: l.OptionalSchema<string>;
2489
- }>, l.ObjectSchema<{
2490
- readonly type: l.LiteralSchema<"integer">;
2491
- readonly default: l.OptionalSchema<number>;
2492
- readonly minimum: l.OptionalSchema<number>;
2493
- readonly maximum: l.OptionalSchema<number>;
2494
- readonly enum: l.OptionalSchema<number[]>;
2495
- readonly const: l.OptionalSchema<number>;
2496
- readonly description: l.OptionalSchema<string>;
2497
- }>, l.ObjectSchema<{
2498
- readonly type: l.LiteralSchema<"string">;
2499
- readonly format: l.OptionalSchema<"datetime" | "uri" | "at-uri" | "did" | "handle" | "at-identifier" | "nsid" | "cid" | "language" | "tid" | "record-key">;
2500
- readonly default: l.OptionalSchema<string>;
2501
- readonly minLength: l.OptionalSchema<number>;
2502
- readonly maxLength: l.OptionalSchema<number>;
2503
- readonly minGraphemes: l.OptionalSchema<number>;
2504
- readonly maxGraphemes: l.OptionalSchema<number>;
2505
- readonly enum: l.OptionalSchema<string[]>;
2506
- readonly const: l.OptionalSchema<string>;
2507
- readonly knownValues: l.OptionalSchema<string[]>;
2508
- readonly description: l.OptionalSchema<string>;
2509
- }>, l.ObjectSchema<{
2510
- readonly type: l.LiteralSchema<"bytes">;
2511
- readonly maxLength: l.OptionalSchema<number>;
2512
- readonly minLength: l.OptionalSchema<number>;
2513
- readonly description: l.OptionalSchema<string>;
2514
- }>, l.ObjectSchema<{
2515
- readonly type: l.LiteralSchema<"cid-link">;
2516
- readonly description: l.OptionalSchema<string>;
2517
- }>, l.ObjectSchema<{
2518
- readonly type: l.LiteralSchema<"blob">;
2519
- readonly accept: l.OptionalSchema<string[]>;
2520
- readonly maxSize: l.OptionalSchema<number>;
2521
- readonly description: l.OptionalSchema<string>;
2522
- }>, l.ObjectSchema<{
2523
- readonly type: l.LiteralSchema<"unknown">;
2524
- readonly description: l.OptionalSchema<string>;
2525
- }>, l.ObjectSchema<{
2526
- readonly type: l.LiteralSchema<"ref">;
2527
- readonly ref: l.StringSchema<{}>;
2528
- readonly description: l.OptionalSchema<string>;
2529
- }>, l.ObjectSchema<{
2530
- readonly type: l.LiteralSchema<"union">;
2531
- readonly refs: l.ArraySchema<l.StringSchema<{}>>;
2532
- readonly closed: l.OptionalSchema<boolean>;
2533
- readonly description: l.OptionalSchema<string>;
2534
- }>]>;
2535
- readonly minLength: l.OptionalSchema<number>;
2536
- readonly maxLength: l.OptionalSchema<number>;
2537
- readonly description: l.OptionalSchema<string>;
2538
- }>]>>;
2539
- required?: string[] | undefined;
2540
- nullable?: string[] | undefined;
2541
- description?: string | undefined;
2542
- } | undefined;
2177
+ readonly message: l.ObjectSchema<{
2178
+ readonly description: l.OptionalSchema<string>;
2179
+ readonly schema: l.ObjectSchema<{
2180
+ readonly type: l.LiteralSchema<"union">;
2181
+ readonly refs: l.ArraySchema<l.StringSchema<{}>>;
2182
+ readonly closed: l.OptionalSchema<boolean>;
2183
+ readonly description: l.OptionalSchema<string>;
2184
+ }>;
2543
2185
  }>;
2544
2186
  readonly errors: l.OptionalSchema<{
2545
2187
  name: string;
@@ -3612,6 +3254,15 @@ export declare const lexiconDocumentSchema: l.ObjectSchema<{
3612
3254
  description?: string | undefined;
3613
3255
  } | {
3614
3256
  type: "subscription";
3257
+ message: {
3258
+ schema: {
3259
+ type: "union";
3260
+ refs: string[];
3261
+ closed?: boolean | undefined;
3262
+ description?: string | undefined;
3263
+ };
3264
+ description?: string | undefined;
3265
+ };
3615
3266
  description?: string | undefined;
3616
3267
  parameters?: {
3617
3268
  type: "params";
@@ -3675,131 +3326,6 @@ export declare const lexiconDocumentSchema: l.ObjectSchema<{
3675
3326
  required?: string[] | undefined;
3676
3327
  description?: string | undefined;
3677
3328
  } | undefined;
3678
- message?: {
3679
- description?: string | undefined;
3680
- schema?: {
3681
- type: "ref";
3682
- ref: string;
3683
- description?: string | undefined;
3684
- } | {
3685
- type: "union";
3686
- refs: string[];
3687
- closed?: boolean | undefined;
3688
- description?: string | undefined;
3689
- } | {
3690
- type: "object";
3691
- properties: l.DictSchemaOutput<l.StringSchema<{}>, l.DiscriminatedUnionSchema<"type", readonly [l.ObjectSchema<{
3692
- readonly type: l.LiteralSchema<"boolean">;
3693
- readonly default: l.OptionalSchema<boolean>;
3694
- readonly const: l.OptionalSchema<boolean>;
3695
- readonly description: l.OptionalSchema<string>;
3696
- }>, l.ObjectSchema<{
3697
- readonly type: l.LiteralSchema<"integer">;
3698
- readonly default: l.OptionalSchema<number>;
3699
- readonly minimum: l.OptionalSchema<number>;
3700
- readonly maximum: l.OptionalSchema<number>;
3701
- readonly enum: l.OptionalSchema<number[]>;
3702
- readonly const: l.OptionalSchema<number>;
3703
- readonly description: l.OptionalSchema<string>;
3704
- }>, l.ObjectSchema<{
3705
- readonly type: l.LiteralSchema<"string">;
3706
- readonly format: l.OptionalSchema<"datetime" | "uri" | "at-uri" | "did" | "handle" | "at-identifier" | "nsid" | "cid" | "language" | "tid" | "record-key">;
3707
- readonly default: l.OptionalSchema<string>;
3708
- readonly minLength: l.OptionalSchema<number>;
3709
- readonly maxLength: l.OptionalSchema<number>;
3710
- readonly minGraphemes: l.OptionalSchema<number>;
3711
- readonly maxGraphemes: l.OptionalSchema<number>;
3712
- readonly enum: l.OptionalSchema<string[]>;
3713
- readonly const: l.OptionalSchema<string>;
3714
- readonly knownValues: l.OptionalSchema<string[]>;
3715
- readonly description: l.OptionalSchema<string>;
3716
- }>, l.ObjectSchema<{
3717
- readonly type: l.LiteralSchema<"bytes">;
3718
- readonly maxLength: l.OptionalSchema<number>;
3719
- readonly minLength: l.OptionalSchema<number>;
3720
- readonly description: l.OptionalSchema<string>;
3721
- }>, l.ObjectSchema<{
3722
- readonly type: l.LiteralSchema<"cid-link">;
3723
- readonly description: l.OptionalSchema<string>;
3724
- }>, l.ObjectSchema<{
3725
- readonly type: l.LiteralSchema<"blob">;
3726
- readonly accept: l.OptionalSchema<string[]>;
3727
- readonly maxSize: l.OptionalSchema<number>;
3728
- readonly description: l.OptionalSchema<string>;
3729
- }>, l.ObjectSchema<{
3730
- readonly type: l.LiteralSchema<"unknown">;
3731
- readonly description: l.OptionalSchema<string>;
3732
- }>, l.ObjectSchema<{
3733
- readonly type: l.LiteralSchema<"ref">;
3734
- readonly ref: l.StringSchema<{}>;
3735
- readonly description: l.OptionalSchema<string>;
3736
- }>, l.ObjectSchema<{
3737
- readonly type: l.LiteralSchema<"union">;
3738
- readonly refs: l.ArraySchema<l.StringSchema<{}>>;
3739
- readonly closed: l.OptionalSchema<boolean>;
3740
- readonly description: l.OptionalSchema<string>;
3741
- }>, l.ObjectSchema<{
3742
- readonly type: l.LiteralSchema<"array">;
3743
- readonly items: l.DiscriminatedUnionSchema<"type", readonly [l.ObjectSchema<{
3744
- readonly type: l.LiteralSchema<"boolean">;
3745
- readonly default: l.OptionalSchema<boolean>;
3746
- readonly const: l.OptionalSchema<boolean>;
3747
- readonly description: l.OptionalSchema<string>;
3748
- }>, l.ObjectSchema<{
3749
- readonly type: l.LiteralSchema<"integer">;
3750
- readonly default: l.OptionalSchema<number>;
3751
- readonly minimum: l.OptionalSchema<number>;
3752
- readonly maximum: l.OptionalSchema<number>;
3753
- readonly enum: l.OptionalSchema<number[]>;
3754
- readonly const: l.OptionalSchema<number>;
3755
- readonly description: l.OptionalSchema<string>;
3756
- }>, l.ObjectSchema<{
3757
- readonly type: l.LiteralSchema<"string">;
3758
- readonly format: l.OptionalSchema<"datetime" | "uri" | "at-uri" | "did" | "handle" | "at-identifier" | "nsid" | "cid" | "language" | "tid" | "record-key">;
3759
- readonly default: l.OptionalSchema<string>;
3760
- readonly minLength: l.OptionalSchema<number>;
3761
- readonly maxLength: l.OptionalSchema<number>;
3762
- readonly minGraphemes: l.OptionalSchema<number>;
3763
- readonly maxGraphemes: l.OptionalSchema<number>;
3764
- readonly enum: l.OptionalSchema<string[]>;
3765
- readonly const: l.OptionalSchema<string>;
3766
- readonly knownValues: l.OptionalSchema<string[]>;
3767
- readonly description: l.OptionalSchema<string>;
3768
- }>, l.ObjectSchema<{
3769
- readonly type: l.LiteralSchema<"bytes">;
3770
- readonly maxLength: l.OptionalSchema<number>;
3771
- readonly minLength: l.OptionalSchema<number>;
3772
- readonly description: l.OptionalSchema<string>;
3773
- }>, l.ObjectSchema<{
3774
- readonly type: l.LiteralSchema<"cid-link">;
3775
- readonly description: l.OptionalSchema<string>;
3776
- }>, l.ObjectSchema<{
3777
- readonly type: l.LiteralSchema<"blob">;
3778
- readonly accept: l.OptionalSchema<string[]>;
3779
- readonly maxSize: l.OptionalSchema<number>;
3780
- readonly description: l.OptionalSchema<string>;
3781
- }>, l.ObjectSchema<{
3782
- readonly type: l.LiteralSchema<"unknown">;
3783
- readonly description: l.OptionalSchema<string>;
3784
- }>, l.ObjectSchema<{
3785
- readonly type: l.LiteralSchema<"ref">;
3786
- readonly ref: l.StringSchema<{}>;
3787
- readonly description: l.OptionalSchema<string>;
3788
- }>, l.ObjectSchema<{
3789
- readonly type: l.LiteralSchema<"union">;
3790
- readonly refs: l.ArraySchema<l.StringSchema<{}>>;
3791
- readonly closed: l.OptionalSchema<boolean>;
3792
- readonly description: l.OptionalSchema<string>;
3793
- }>]>;
3794
- readonly minLength: l.OptionalSchema<number>;
3795
- readonly maxLength: l.OptionalSchema<number>;
3796
- readonly description: l.OptionalSchema<string>;
3797
- }>]>>;
3798
- required?: string[] | undefined;
3799
- nullable?: string[] | undefined;
3800
- description?: string | undefined;
3801
- } | undefined;
3802
- } | undefined;
3803
3329
  errors?: {
3804
3330
  name: string;
3805
3331
  description?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAchC,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.lexiconDocumentSchema = exports.lexiconIdentifierSchema = exports.lexiconSubscriptionSchema = exports.lexiconProcedureSchema = exports.lexiconQuerySchema = exports.lexiconError = exports.lexiconSubscriptionMessage = exports.lexiconPayload = exports.lexiconParameters = exports.lexiconRecordSchema = exports.lexiconRecordKeySchema = exports.lexiconObjectSchema = exports.lexiconArraySchema = exports.lexiconRefUnionSchema = exports.lexiconRefSchema = exports.lexiconTokenSchema = exports.lexiconUnknownSchema = exports.lexiconBlobSchema = exports.lexiconCidLinkSchema = exports.lexiconBytesSchema = exports.lexiconStringSchema = exports.lexiconIntegerSchema = exports.lexiconBooleanSchema = void 0;
3
+ exports.lexiconDocumentSchema = exports.lexiconIdentifierSchema = exports.lexiconSubscriptionSchema = exports.lexiconProcedureSchema = exports.lexiconQuerySchema = exports.lexiconError = exports.lexiconPayload = exports.lexiconParameters = exports.lexiconRecordSchema = exports.lexiconRecordKeySchema = exports.lexiconObjectSchema = exports.lexiconArraySchema = exports.lexiconRefUnionSchema = exports.lexiconRefSchema = exports.lexiconTokenSchema = exports.lexiconUnknownSchema = exports.lexiconBlobSchema = exports.lexiconCidLinkSchema = exports.lexiconBytesSchema = exports.lexiconStringSchema = exports.lexiconIntegerSchema = exports.lexiconBooleanSchema = void 0;
4
4
  const lex_schema_1 = require("@atproto/lex-schema");
5
5
  // Re-usable shortcuts (avoid creating too many schemas)
6
6
  const bool = lex_schema_1.l.boolean();
@@ -155,14 +155,6 @@ exports.lexiconPayload = lex_schema_1.l.object({
155
155
  ])),
156
156
  description: strOpt,
157
157
  });
158
- exports.lexiconSubscriptionMessage = lex_schema_1.l.object({
159
- description: strOpt,
160
- schema: lex_schema_1.l.optional(lex_schema_1.l.discriminatedUnion('type', [
161
- exports.lexiconRefSchema,
162
- exports.lexiconRefUnionSchema,
163
- exports.lexiconObjectSchema,
164
- ])),
165
- });
166
158
  exports.lexiconError = lex_schema_1.l.object({
167
159
  name: lex_schema_1.l.string({ minLength: 1 }),
168
160
  description: strOpt,
@@ -186,7 +178,10 @@ exports.lexiconSubscriptionSchema = lex_schema_1.l.object({
186
178
  type: lex_schema_1.l.literal('subscription'),
187
179
  description: strOpt,
188
180
  parameters: lex_schema_1.l.optional(exports.lexiconParameters),
189
- message: lex_schema_1.l.optional(exports.lexiconSubscriptionMessage),
181
+ message: lex_schema_1.l.object({
182
+ description: strOpt,
183
+ schema: exports.lexiconRefUnionSchema,
184
+ }),
190
185
  errors: lex_schema_1.l.optional(lex_schema_1.l.array(exports.lexiconError)),
191
186
  });
192
187
  // Permissions
@@ -1 +1 @@
1
- {"version":3,"file":"lexicon-document.js","sourceRoot":"","sources":["../src/lexicon-document.ts"],"names":[],"mappings":";;;AAAA,oDAAuC;AAEvC,wDAAwD;AAExD,MAAM,IAAI,GAAG,cAAC,CAAC,OAAO,EAAE,CAAA;AACxB,MAAM,GAAG,GAAG,cAAC,CAAC,OAAO,EAAE,CAAA;AACvB,MAAM,GAAG,GAAG,cAAC,CAAC,MAAM,EAAE,CAAA;AAEtB,MAAM,OAAO,GAAG,cAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;AAChC,MAAM,MAAM,GAAG,cA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1B,8BAAsB;IACtB,0BAAkB;IAClB,2BAAmB;IACnB,iCAAyB;IACzB,GAAG,qBAAqB;CAChB,CAAA;AAMG,QAAA,uBAAuB,GAAG,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;AAGtD,QAAA,qBAAqB,GAAG,cAAC,CAAC,MAAM,CAAC;IAC5C,OAAO,EAAE,cAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACrB,EAAE,EAAE,+BAAuB;IAC3B,QAAQ,EAAE,MAAM;IAChB,WAAW,EAAE,MAAM;IACnB,IAAI,EAAE,cAAC,CAAC,YAAY,CAClB,cAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,cAAC,CAAC,QAAQ,CAAC,cAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;KACrE,CAAC,EACF,cAAC,CAAC,IAAI,CACJ,cAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAC1B,cAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE,qBAAqB,CAAC,CACpD,CACF;CACF,CAAC,CAAA","sourcesContent":["import { l } from '@atproto/lex-schema'\n\n// Re-usable shortcuts (avoid creating too many schemas)\n\nconst bool = l.boolean()\nconst int = l.integer()\nconst str = l.string()\n\nconst boopOpt = l.optional(bool)\nconst intOpt = l.optional(int)\nconst strOpt = l.optional(str)\n\nconst strArrOpt = l.optional(l.array(str))\n\n// https://atproto.com/specs/lexicon\n\n// \"Concrete\" Types\n\nexport const lexiconBooleanSchema = l.object({\n type: l.literal('boolean'),\n default: boopOpt,\n const: boopOpt,\n description: strOpt,\n})\nexport type LexiconBoolean = l.Infer<typeof lexiconBooleanSchema>\n\nexport const lexiconIntegerSchema = l.object({\n type: l.literal('integer'),\n default: intOpt,\n minimum: intOpt,\n maximum: intOpt,\n enum: l.optional(l.array(l.integer())),\n const: intOpt,\n description: strOpt,\n})\nexport type LexiconInteger = l.Infer<typeof lexiconIntegerSchema>\n\nexport const lexiconStringSchema = l.object({\n type: l.literal('string'),\n format: l.optional(l.enum<l.StringFormat>(l.STRING_FORMATS)),\n default: strOpt,\n minLength: intOpt,\n maxLength: intOpt,\n minGraphemes: intOpt,\n maxGraphemes: intOpt,\n enum: strArrOpt,\n const: strOpt,\n knownValues: strArrOpt,\n description: strOpt,\n})\nexport type LexiconString = l.Infer<typeof lexiconStringSchema>\n\nexport const lexiconBytesSchema = l.object({\n type: l.literal('bytes'),\n maxLength: intOpt,\n minLength: intOpt,\n description: strOpt,\n})\nexport type LexiconBytes = l.Infer<typeof lexiconBytesSchema>\n\nexport const lexiconCidLinkSchema = l.object({\n type: l.literal('cid-link'),\n description: strOpt,\n})\nexport type LexiconCid = l.Infer<typeof lexiconCidLinkSchema>\n\nexport const lexiconBlobSchema = l.object({\n type: l.literal('blob'),\n accept: strArrOpt,\n maxSize: intOpt,\n description: strOpt,\n})\nexport type LexiconBlob = l.Infer<typeof lexiconBlobSchema>\n\nconst CONCRETE_TYPES = [\n lexiconBooleanSchema,\n lexiconIntegerSchema,\n lexiconStringSchema,\n // Lexicon (DAG-CBOR)\n lexiconBytesSchema,\n lexiconCidLinkSchema,\n // Lexicon Specific\n lexiconBlobSchema,\n] as const\n\n// Meta types\n\nexport const lexiconUnknownSchema = l.object({\n type: l.literal('unknown'),\n description: strOpt,\n})\nexport type LexiconUnknown = l.Infer<typeof lexiconUnknownSchema>\n\nexport const lexiconTokenSchema = l.object({\n type: l.literal('token'),\n description: strOpt,\n})\nexport type LexiconToken = l.Infer<typeof lexiconTokenSchema>\n\nexport const lexiconRefSchema = l.object({\n type: l.literal('ref'),\n ref: str,\n description: strOpt,\n})\nexport type LexiconRef = l.Infer<typeof lexiconRefSchema>\n\nexport const lexiconRefUnionSchema = l.object({\n type: l.literal('union'),\n refs: l.array(str),\n closed: boopOpt,\n description: strOpt,\n})\nexport type LexiconRefUnion = l.Infer<typeof lexiconRefUnionSchema>\n\n// Complex Types\n\nconst ARRAY_ITEMS_SCHEMAS = [\n ...CONCRETE_TYPES,\n // Meta\n lexiconUnknownSchema,\n lexiconRefSchema,\n lexiconRefUnionSchema,\n] as const\n\nexport type LexiconArrayItems = l.Infer<(typeof ARRAY_ITEMS_SCHEMAS)[number]>\n\nexport const lexiconArraySchema = l.object({\n type: l.literal('array'),\n items: l.discriminatedUnion('type', ARRAY_ITEMS_SCHEMAS),\n minLength: intOpt,\n maxLength: intOpt,\n description: strOpt,\n})\nexport type LexiconArray = l.Infer<typeof lexiconArraySchema>\n\nconst requirePropertiesRefinement: l.RefinementCheck<{\n required?: string[]\n properties: Record<string, unknown>\n}> = {\n check: (v) => !v.required || v.required.every((k) => k in v.properties),\n message: 'All required parameters must be defined in properties',\n path: 'required',\n}\n\nexport const lexiconObjectSchema = l.refine(\n l.object({\n type: l.literal('object'),\n properties: l.dict(\n str,\n l.discriminatedUnion('type', [\n ...ARRAY_ITEMS_SCHEMAS,\n lexiconArraySchema,\n ]),\n ),\n required: strArrOpt,\n nullable: strArrOpt,\n description: strOpt,\n }),\n requirePropertiesRefinement,\n)\nexport type LexiconObject = l.Infer<typeof lexiconObjectSchema>\n\n// Records\n\nexport const lexiconRecordKeySchema = l.custom(\n l.isLexiconRecordKey,\n 'Invalid record key definition (must be \"any\", \"nsid\", \"tid\", or \"literal:<string>\")',\n)\n\nexport type LexiconRecordKey = l.LexiconRecordKey\n\nexport const lexiconRecordSchema = l.object({\n type: l.literal('record'),\n record: lexiconObjectSchema,\n description: strOpt,\n key: lexiconRecordKeySchema,\n})\nexport type LexiconRecord = l.Infer<typeof lexiconRecordSchema>\n\n// XRPC Methods\n\nexport const lexiconParameters = l.refine(\n l.object({\n type: l.literal('params'),\n properties: l.dict(\n str,\n l.discriminatedUnion('type', [\n lexiconBooleanSchema,\n lexiconIntegerSchema,\n lexiconStringSchema,\n l.object({\n type: l.literal('array'),\n items: l.discriminatedUnion('type', [\n lexiconBooleanSchema,\n lexiconIntegerSchema,\n lexiconStringSchema,\n ]),\n minLength: intOpt,\n maxLength: intOpt,\n description: strOpt,\n }),\n ]),\n ),\n required: strArrOpt,\n description: strOpt,\n }),\n requirePropertiesRefinement,\n)\nexport type LexiconParameters = l.Infer<typeof lexiconParameters>\n\nexport const lexiconPayload = l.object({\n encoding: str,\n schema: l.optional(\n l.discriminatedUnion('type', [\n lexiconRefSchema,\n lexiconRefUnionSchema,\n lexiconObjectSchema,\n ]),\n ),\n description: strOpt,\n})\nexport type LexiconPayload = l.Infer<typeof lexiconPayload>\n\nexport const lexiconSubscriptionMessage = l.object({\n description: strOpt,\n schema: l.optional(\n l.discriminatedUnion('type', [\n lexiconRefSchema,\n lexiconRefUnionSchema,\n lexiconObjectSchema,\n ]),\n ),\n})\nexport type LexiconSubscriptionMessage = l.Infer<\n typeof lexiconSubscriptionMessage\n>\n\nexport const lexiconError = l.object({\n name: l.string({ minLength: 1 }),\n description: strOpt,\n})\nexport type LexiconError = l.Infer<typeof lexiconError>\n\nexport const lexiconQuerySchema = l.object({\n type: l.literal('query'),\n parameters: l.optional(lexiconParameters),\n output: l.optional(lexiconPayload),\n errors: l.optional(l.array(lexiconError)),\n description: strOpt,\n})\nexport type LexiconQuery = l.Infer<typeof lexiconQuerySchema>\n\nexport const lexiconProcedureSchema = l.object({\n type: l.literal('procedure'),\n parameters: l.optional(lexiconParameters),\n input: l.optional(lexiconPayload),\n output: l.optional(lexiconPayload),\n errors: l.optional(l.array(lexiconError)),\n description: strOpt,\n})\nexport type LexiconProcedure = l.Infer<typeof lexiconProcedureSchema>\n\nexport const lexiconSubscriptionSchema = l.object({\n type: l.literal('subscription'),\n description: strOpt,\n parameters: l.optional(lexiconParameters),\n message: l.optional(lexiconSubscriptionMessage),\n errors: l.optional(l.array(lexiconError)),\n})\n\nexport type LexiconSubscription = l.Infer<typeof lexiconSubscriptionSchema>\n\n// Permissions\n\nconst lexiconLanguageSchema = l.string({ format: 'language' })\n\nexport type LexiconLanguage = l.Infer<typeof lexiconLanguageSchema>\n\nconst lexiconLanguageDict = l.dict(lexiconLanguageSchema, str)\n\nexport type LexiconLanguageDict = l.Infer<typeof lexiconLanguageDict>\n\nconst lexiconPermissionSchema = l.intersection(\n l.object({\n type: l.literal('permission'),\n resource: l.string({ minLength: 1 }),\n }),\n l.paramsSchema,\n)\n\nexport type LexiconPermission = l.Infer<typeof lexiconPermissionSchema>\n\nconst lexiconPermissionSetSchema = l.object({\n type: l.literal('permission-set'),\n permissions: l.array(lexiconPermissionSchema),\n title: strOpt,\n 'title:lang': l.optional(lexiconLanguageDict),\n detail: strOpt,\n 'detail:lang': l.optional(lexiconLanguageDict),\n description: strOpt,\n})\n\nexport type LexiconPermissionSet = l.Infer<typeof lexiconPermissionSetSchema>\n\n// Schemas that can appear anywhere in the defs\nconst NAMED_LEXICON_SCHEMAS = [\n ...CONCRETE_TYPES,\n lexiconArraySchema,\n lexiconObjectSchema,\n lexiconTokenSchema,\n] as const\n\nexport type NamedLexiconDefinition = l.Infer<\n (typeof NAMED_LEXICON_SCHEMAS)[number]\n>\n\n// Schemas that can only appear as \"main\" def\nconst MAIN_LEXICON_SCHEMAS = [\n lexiconPermissionSetSchema,\n lexiconProcedureSchema,\n lexiconQuerySchema,\n lexiconRecordSchema,\n lexiconSubscriptionSchema,\n ...NAMED_LEXICON_SCHEMAS,\n] as const\n\nexport type MainLexiconDefinition = l.Infer<\n (typeof MAIN_LEXICON_SCHEMAS)[number]\n>\n\nexport const lexiconIdentifierSchema = l.string({ format: 'nsid' })\nexport type LexiconIdentifier = l.Infer<typeof lexiconIdentifierSchema>\n\nexport const lexiconDocumentSchema = l.object({\n lexicon: l.literal(1),\n id: lexiconIdentifierSchema,\n revision: intOpt,\n description: strOpt,\n defs: l.intersection(\n l.object({\n main: l.optional(l.discriminatedUnion('type', MAIN_LEXICON_SCHEMAS)),\n }),\n l.dict(\n l.string({ minLength: 1 }),\n l.discriminatedUnion('type', NAMED_LEXICON_SCHEMAS),\n ),\n ),\n})\nexport type LexiconDocument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,EAAE,MAAM;CACpB,CAAC,CAAA;AAIF,+CAA+C;AAC/C,MAAM,qBAAqB,GAAG;IAC5B,GAAG,cAAc;IACjB,0BAAkB;IAClB,2BAAmB;IACnB,0BAAkB;CACV,CAAA;AAMV,6CAA6C;AAC7C,MAAM,oBAAoB,GAAG;IAC3B,0BAA0B;IAC1B,8BAAsB;IACtB,0BAAkB;IAClB,2BAAmB;IACnB,iCAAyB;IACzB,GAAG,qBAAqB;CAChB,CAAA;AAMG,QAAA,uBAAuB,GAAG,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;AAGtD,QAAA,qBAAqB,GAAG,cAAC,CAAC,MAAM,CAAC;IAC5C,OAAO,EAAE,cAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACrB,EAAE,EAAE,+BAAuB;IAC3B,QAAQ,EAAE,MAAM;IAChB,WAAW,EAAE,MAAM;IACnB,IAAI,EAAE,cAAC,CAAC,YAAY,CAClB,cAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,cAAC,CAAC,QAAQ,CAAC,cAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;KACrE,CAAC,EACF,cAAC,CAAC,IAAI,CACJ,cAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAC1B,cAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE,qBAAqB,CAAC,CACpD,CACF;CACF,CAAC,CAAA","sourcesContent":["import { l } from '@atproto/lex-schema'\n\n// Re-usable shortcuts (avoid creating too many schemas)\n\nconst bool = l.boolean()\nconst int = l.integer()\nconst str = l.string()\n\nconst boopOpt = l.optional(bool)\nconst intOpt = l.optional(int)\nconst strOpt = l.optional(str)\n\nconst strArrOpt = l.optional(l.array(str))\n\n// https://atproto.com/specs/lexicon\n\n// \"Concrete\" Types\n\nexport const lexiconBooleanSchema = l.object({\n type: l.literal('boolean'),\n default: boopOpt,\n const: boopOpt,\n description: strOpt,\n})\nexport type LexiconBoolean = l.Infer<typeof lexiconBooleanSchema>\n\nexport const lexiconIntegerSchema = l.object({\n type: l.literal('integer'),\n default: intOpt,\n minimum: intOpt,\n maximum: intOpt,\n enum: l.optional(l.array(l.integer())),\n const: intOpt,\n description: strOpt,\n})\nexport type LexiconInteger = l.Infer<typeof lexiconIntegerSchema>\n\nexport const lexiconStringSchema = l.object({\n type: l.literal('string'),\n format: l.optional(l.enum<l.StringFormat>(l.STRING_FORMATS)),\n default: strOpt,\n minLength: intOpt,\n maxLength: intOpt,\n minGraphemes: intOpt,\n maxGraphemes: intOpt,\n enum: strArrOpt,\n const: strOpt,\n knownValues: strArrOpt,\n description: strOpt,\n})\nexport type LexiconString = l.Infer<typeof lexiconStringSchema>\n\nexport const lexiconBytesSchema = l.object({\n type: l.literal('bytes'),\n maxLength: intOpt,\n minLength: intOpt,\n description: strOpt,\n})\nexport type LexiconBytes = l.Infer<typeof lexiconBytesSchema>\n\nexport const lexiconCidLinkSchema = l.object({\n type: l.literal('cid-link'),\n description: strOpt,\n})\nexport type LexiconCid = l.Infer<typeof lexiconCidLinkSchema>\n\nexport const lexiconBlobSchema = l.object({\n type: l.literal('blob'),\n accept: strArrOpt,\n maxSize: intOpt,\n description: strOpt,\n})\nexport type LexiconBlob = l.Infer<typeof lexiconBlobSchema>\n\nconst CONCRETE_TYPES = [\n lexiconBooleanSchema,\n lexiconIntegerSchema,\n lexiconStringSchema,\n // Lexicon (DAG-CBOR)\n lexiconBytesSchema,\n lexiconCidLinkSchema,\n // Lexicon Specific\n lexiconBlobSchema,\n] as const\n\n// Meta types\n\nexport const lexiconUnknownSchema = l.object({\n type: l.literal('unknown'),\n description: strOpt,\n})\nexport type LexiconUnknown = l.Infer<typeof lexiconUnknownSchema>\n\nexport const lexiconTokenSchema = l.object({\n type: l.literal('token'),\n description: strOpt,\n})\nexport type LexiconToken = l.Infer<typeof lexiconTokenSchema>\n\nexport const lexiconRefSchema = l.object({\n type: l.literal('ref'),\n ref: str,\n description: strOpt,\n})\nexport type LexiconRef = l.Infer<typeof lexiconRefSchema>\n\nexport const lexiconRefUnionSchema = l.object({\n type: l.literal('union'),\n refs: l.array(str),\n closed: boopOpt,\n description: strOpt,\n})\nexport type LexiconRefUnion = l.Infer<typeof lexiconRefUnionSchema>\n\n// Complex Types\n\nconst ARRAY_ITEMS_SCHEMAS = [\n ...CONCRETE_TYPES,\n // Meta\n lexiconUnknownSchema,\n lexiconRefSchema,\n lexiconRefUnionSchema,\n] as const\n\nexport type LexiconArrayItems = l.Infer<(typeof ARRAY_ITEMS_SCHEMAS)[number]>\n\nexport const lexiconArraySchema = l.object({\n type: l.literal('array'),\n items: l.discriminatedUnion('type', ARRAY_ITEMS_SCHEMAS),\n minLength: intOpt,\n maxLength: intOpt,\n description: strOpt,\n})\nexport type LexiconArray = l.Infer<typeof lexiconArraySchema>\n\nconst requirePropertiesRefinement: l.RefinementCheck<{\n required?: string[]\n properties: Record<string, unknown>\n}> = {\n check: (v) => !v.required || v.required.every((k) => k in v.properties),\n message: 'All required parameters must be defined in properties',\n path: 'required',\n}\n\nexport const lexiconObjectSchema = l.refine(\n l.object({\n type: l.literal('object'),\n properties: l.dict(\n str,\n l.discriminatedUnion('type', [\n ...ARRAY_ITEMS_SCHEMAS,\n lexiconArraySchema,\n ]),\n ),\n required: strArrOpt,\n nullable: strArrOpt,\n description: strOpt,\n }),\n requirePropertiesRefinement,\n)\nexport type LexiconObject = l.Infer<typeof lexiconObjectSchema>\n\n// Records\n\nexport const lexiconRecordKeySchema = l.custom(\n l.isLexiconRecordKey,\n 'Invalid record key definition (must be \"any\", \"nsid\", \"tid\", or \"literal:<string>\")',\n)\n\nexport type LexiconRecordKey = l.LexiconRecordKey\n\nexport const lexiconRecordSchema = l.object({\n type: l.literal('record'),\n record: lexiconObjectSchema,\n description: strOpt,\n key: lexiconRecordKeySchema,\n})\nexport type LexiconRecord = l.Infer<typeof lexiconRecordSchema>\n\n// XRPC Methods\n\nexport const lexiconParameters = l.refine(\n l.object({\n type: l.literal('params'),\n properties: l.dict(\n str,\n l.discriminatedUnion('type', [\n lexiconBooleanSchema,\n lexiconIntegerSchema,\n lexiconStringSchema,\n l.object({\n type: l.literal('array'),\n items: l.discriminatedUnion('type', [\n lexiconBooleanSchema,\n lexiconIntegerSchema,\n lexiconStringSchema,\n ]),\n minLength: intOpt,\n maxLength: intOpt,\n description: strOpt,\n }),\n ]),\n ),\n required: strArrOpt,\n description: strOpt,\n }),\n requirePropertiesRefinement,\n)\nexport type LexiconParameters = l.Infer<typeof lexiconParameters>\n\nexport const lexiconPayload = l.object({\n encoding: str,\n schema: l.optional(\n l.discriminatedUnion('type', [\n lexiconRefSchema,\n lexiconRefUnionSchema,\n lexiconObjectSchema,\n ]),\n ),\n description: strOpt,\n})\nexport type LexiconPayload = l.Infer<typeof lexiconPayload>\n\nexport const lexiconError = l.object({\n name: l.string({ minLength: 1 }),\n description: strOpt,\n})\nexport type LexiconError = l.Infer<typeof lexiconError>\n\nexport const lexiconQuerySchema = l.object({\n type: l.literal('query'),\n parameters: l.optional(lexiconParameters),\n output: l.optional(lexiconPayload),\n errors: l.optional(l.array(lexiconError)),\n description: strOpt,\n})\nexport type LexiconQuery = l.Infer<typeof lexiconQuerySchema>\n\nexport const lexiconProcedureSchema = l.object({\n type: l.literal('procedure'),\n parameters: l.optional(lexiconParameters),\n input: l.optional(lexiconPayload),\n output: l.optional(lexiconPayload),\n errors: l.optional(l.array(lexiconError)),\n description: strOpt,\n})\nexport type LexiconProcedure = l.Infer<typeof lexiconProcedureSchema>\n\nexport const lexiconSubscriptionSchema = l.object({\n type: l.literal('subscription'),\n description: strOpt,\n parameters: l.optional(lexiconParameters),\n message: l.object({\n description: strOpt,\n schema: lexiconRefUnionSchema,\n }),\n errors: l.optional(l.array(lexiconError)),\n})\n\nexport type LexiconSubscription = l.Infer<typeof lexiconSubscriptionSchema>\n\n// Permissions\n\nconst lexiconLanguageSchema = l.string({ format: 'language' })\n\nexport type LexiconLanguage = l.Infer<typeof lexiconLanguageSchema>\n\nconst lexiconLanguageDict = l.dict(lexiconLanguageSchema, str)\n\nexport type LexiconLanguageDict = l.Infer<typeof lexiconLanguageDict>\n\nconst lexiconPermissionSchema = l.intersection(\n l.object({\n type: l.literal('permission'),\n resource: l.string({ minLength: 1 }),\n }),\n l.paramsSchema,\n)\n\nexport type LexiconPermission = l.Infer<typeof lexiconPermissionSchema>\n\nconst lexiconPermissionSetSchema = l.object({\n type: l.literal('permission-set'),\n permissions: l.array(lexiconPermissionSchema),\n title: strOpt,\n 'title:lang': l.optional(lexiconLanguageDict),\n detail: strOpt,\n 'detail:lang': l.optional(lexiconLanguageDict),\n description: strOpt,\n})\n\nexport type LexiconPermissionSet = l.Infer<typeof lexiconPermissionSetSchema>\n\n// Schemas that can appear anywhere in the defs\nconst NAMED_LEXICON_SCHEMAS = [\n ...CONCRETE_TYPES,\n lexiconArraySchema,\n lexiconObjectSchema,\n lexiconTokenSchema,\n] as const\n\nexport type NamedLexiconDefinition = l.Infer<\n (typeof NAMED_LEXICON_SCHEMAS)[number]\n>\n\n// Schemas that can only appear as \"main\" def\nconst MAIN_LEXICON_SCHEMAS = [\n lexiconPermissionSetSchema,\n lexiconProcedureSchema,\n lexiconQuerySchema,\n lexiconRecordSchema,\n lexiconSubscriptionSchema,\n ...NAMED_LEXICON_SCHEMAS,\n] as const\n\nexport type MainLexiconDefinition = l.Infer<\n (typeof MAIN_LEXICON_SCHEMAS)[number]\n>\n\nexport const lexiconIdentifierSchema = l.string({ format: 'nsid' })\nexport type LexiconIdentifier = l.Infer<typeof lexiconIdentifierSchema>\n\nexport const lexiconDocumentSchema = l.object({\n lexicon: l.literal(1),\n id: lexiconIdentifierSchema,\n revision: intOpt,\n description: strOpt,\n defs: l.intersection(\n l.object({\n main: l.optional(l.discriminatedUnion('type', MAIN_LEXICON_SCHEMAS)),\n }),\n l.dict(\n l.string({ minLength: 1 }),\n l.discriminatedUnion('type', NAMED_LEXICON_SCHEMAS),\n ),\n ),\n})\nexport type LexiconDocument = l.Infer<typeof lexiconDocumentSchema>\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/lex-document",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "license": "MIT",
5
5
  "description": "Lexicon document validation tools for AT",
6
6
  "keywords": [
@@ -38,11 +38,11 @@
38
38
  "dependencies": {
39
39
  "core-js": "^3",
40
40
  "tslib": "^2.8.1",
41
- "@atproto/lex-schema": "0.0.3"
41
+ "@atproto/lex-schema": "0.0.4"
42
42
  },
43
43
  "devDependencies": {
44
44
  "jest": "^28.1.2",
45
- "@atproto/lex-data": "0.0.2"
45
+ "@atproto/lex-data": "0.0.3"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "tsc --build tsconfig.build.json",
@@ -221,20 +221,6 @@ export const lexiconPayload = l.object({
221
221
  })
222
222
  export type LexiconPayload = l.Infer<typeof lexiconPayload>
223
223
 
224
- export const lexiconSubscriptionMessage = l.object({
225
- description: strOpt,
226
- schema: l.optional(
227
- l.discriminatedUnion('type', [
228
- lexiconRefSchema,
229
- lexiconRefUnionSchema,
230
- lexiconObjectSchema,
231
- ]),
232
- ),
233
- })
234
- export type LexiconSubscriptionMessage = l.Infer<
235
- typeof lexiconSubscriptionMessage
236
- >
237
-
238
224
  export const lexiconError = l.object({
239
225
  name: l.string({ minLength: 1 }),
240
226
  description: strOpt,
@@ -264,7 +250,10 @@ export const lexiconSubscriptionSchema = l.object({
264
250
  type: l.literal('subscription'),
265
251
  description: strOpt,
266
252
  parameters: l.optional(lexiconParameters),
267
- message: l.optional(lexiconSubscriptionMessage),
253
+ message: l.object({
254
+ description: strOpt,
255
+ schema: lexiconRefUnionSchema,
256
+ }),
268
257
  errors: l.optional(l.array(lexiconError)),
269
258
  })
270
259