@sequenceholdings/orm 2.2.0 → 2.3.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.
- package/dist/cli.cjs +38 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +38 -1
- package/dist/cli.js.map +1 -1
- package/dist/compiler.cjs +38 -1
- package/dist/compiler.cjs.map +1 -1
- package/dist/compiler.js +38 -1
- package/dist/compiler.js.map +1 -1
- package/dist/index.cjs +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/ir.cjs +9 -1
- package/dist/ir.cjs.map +1 -1
- package/dist/ir.d.cts +89 -3
- package/dist/ir.d.ts +89 -3
- package/dist/ir.js +8 -2
- package/dist/ir.js.map +1 -1
- package/dist/predicate-v2.cjs +38 -1
- package/dist/predicate-v2.cjs.map +1 -1
- package/dist/predicate-v2.d.cts +10 -2
- package/dist/predicate-v2.d.ts +10 -2
- package/dist/predicate-v2.js +38 -1
- package/dist/predicate-v2.js.map +1 -1
- package/dist/sdl.cjs +2 -1
- package/dist/sdl.cjs.map +1 -1
- package/dist/sdl.js +2 -1
- package/dist/sdl.js.map +1 -1
- package/package.json +1 -1
package/dist/ir.d.ts
CHANGED
|
@@ -34,14 +34,28 @@ declare const RUNTIME_SQL_IR_VERSION: 5;
|
|
|
34
34
|
declare const irVersionSchema: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
|
|
35
35
|
/** Keep v1 artifact identity when assembling only legacy operations from registry rows. */
|
|
36
36
|
declare function requiredArtifactIrVersion(operations: readonly unknown[]): z.infer<typeof irVersionSchema>;
|
|
37
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* The exact claim keys the platform stamps — mirrors claims.ts.
|
|
39
|
+
*
|
|
40
|
+
* `ext_subject` and `ext_email` are verified-borrower claims: the subject and
|
|
41
|
+
* (verified, lowercased) email of an external principal that reached the ORM
|
|
42
|
+
* through an Artifact Next ingress. Only an embedding host's in-process
|
|
43
|
+
* delegated credential carries them — never a bearer, data token or header —
|
|
44
|
+
* and every other caller has them absent, which matches no row.
|
|
45
|
+
*/
|
|
38
46
|
declare const CLAIMS_CONTRACT: {
|
|
39
47
|
readonly sub: "string";
|
|
40
48
|
readonly org: "string?";
|
|
49
|
+
readonly ext_subject: "string?";
|
|
50
|
+
readonly ext_email: "string?";
|
|
41
51
|
readonly roles: "string[]";
|
|
42
52
|
readonly capabilities: "string[]";
|
|
43
53
|
};
|
|
44
|
-
|
|
54
|
+
/** Verified-borrower claim keys; text-typed, compared to text columns with = only. */
|
|
55
|
+
declare const EXTERNAL_POLICY_CLAIM_KEYS: readonly ["ext_subject", "ext_email"];
|
|
56
|
+
type ExternalPolicyClaimKey = (typeof EXTERNAL_POLICY_CLAIM_KEYS)[number];
|
|
57
|
+
type ClaimKey = 'sub' | 'org' | ExternalPolicyClaimKey;
|
|
58
|
+
declare function isExternalPolicyClaimKey(key: string): key is ExternalPolicyClaimKey;
|
|
45
59
|
declare const valueIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
46
60
|
kind: z.ZodLiteral<"literal">;
|
|
47
61
|
value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
|
|
@@ -52,6 +66,8 @@ declare const valueIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
52
66
|
kind: z.ZodLiteral<"claim">;
|
|
53
67
|
key: z.ZodEnum<{
|
|
54
68
|
sub: "sub";
|
|
69
|
+
ext_subject: "ext_subject";
|
|
70
|
+
ext_email: "ext_email";
|
|
55
71
|
org: "org";
|
|
56
72
|
}>;
|
|
57
73
|
}, z.core.$strip>], "kind">;
|
|
@@ -213,6 +229,8 @@ declare const prefetchPlanIrSchema: z.ZodObject<{
|
|
|
213
229
|
kind: z.ZodLiteral<"claim">;
|
|
214
230
|
key: z.ZodEnum<{
|
|
215
231
|
sub: "sub";
|
|
232
|
+
ext_subject: "ext_subject";
|
|
233
|
+
ext_email: "ext_email";
|
|
216
234
|
org: "org";
|
|
217
235
|
}>;
|
|
218
236
|
}, z.core.$strip>], "kind">;
|
|
@@ -227,6 +245,8 @@ declare const prefetchPlanIrSchema: z.ZodObject<{
|
|
|
227
245
|
kind: z.ZodLiteral<"claim">;
|
|
228
246
|
key: z.ZodEnum<{
|
|
229
247
|
sub: "sub";
|
|
248
|
+
ext_subject: "ext_subject";
|
|
249
|
+
ext_email: "ext_email";
|
|
230
250
|
org: "org";
|
|
231
251
|
}>;
|
|
232
252
|
}, z.core.$strip>], "kind">;
|
|
@@ -312,6 +332,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
312
332
|
kind: z.ZodLiteral<"claim">;
|
|
313
333
|
key: z.ZodEnum<{
|
|
314
334
|
sub: "sub";
|
|
335
|
+
ext_subject: "ext_subject";
|
|
336
|
+
ext_email: "ext_email";
|
|
315
337
|
org: "org";
|
|
316
338
|
}>;
|
|
317
339
|
}, z.core.$strip>], "kind">;
|
|
@@ -326,6 +348,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
326
348
|
kind: z.ZodLiteral<"claim">;
|
|
327
349
|
key: z.ZodEnum<{
|
|
328
350
|
sub: "sub";
|
|
351
|
+
ext_subject: "ext_subject";
|
|
352
|
+
ext_email: "ext_email";
|
|
329
353
|
org: "org";
|
|
330
354
|
}>;
|
|
331
355
|
}, z.core.$strip>], "kind">;
|
|
@@ -348,6 +372,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
348
372
|
kind: z.ZodLiteral<"claim">;
|
|
349
373
|
key: z.ZodEnum<{
|
|
350
374
|
sub: "sub";
|
|
375
|
+
ext_subject: "ext_subject";
|
|
376
|
+
ext_email: "ext_email";
|
|
351
377
|
org: "org";
|
|
352
378
|
}>;
|
|
353
379
|
}, z.core.$strip>], "kind">;
|
|
@@ -371,6 +397,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
371
397
|
kind: z.ZodLiteral<"claim">;
|
|
372
398
|
key: z.ZodEnum<{
|
|
373
399
|
sub: "sub";
|
|
400
|
+
ext_subject: "ext_subject";
|
|
401
|
+
ext_email: "ext_email";
|
|
374
402
|
org: "org";
|
|
375
403
|
}>;
|
|
376
404
|
}, z.core.$strip>], "kind">;
|
|
@@ -385,6 +413,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
385
413
|
kind: z.ZodLiteral<"claim">;
|
|
386
414
|
key: z.ZodEnum<{
|
|
387
415
|
sub: "sub";
|
|
416
|
+
ext_subject: "ext_subject";
|
|
417
|
+
ext_email: "ext_email";
|
|
388
418
|
org: "org";
|
|
389
419
|
}>;
|
|
390
420
|
}, z.core.$strip>], "kind">;
|
|
@@ -494,6 +524,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
494
524
|
kind: z.ZodLiteral<"claim">;
|
|
495
525
|
key: z.ZodEnum<{
|
|
496
526
|
sub: "sub";
|
|
527
|
+
ext_subject: "ext_subject";
|
|
528
|
+
ext_email: "ext_email";
|
|
497
529
|
org: "org";
|
|
498
530
|
}>;
|
|
499
531
|
}, z.core.$strip>], "kind">;
|
|
@@ -511,6 +543,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
511
543
|
kind: z.ZodLiteral<"claim">;
|
|
512
544
|
key: z.ZodEnum<{
|
|
513
545
|
sub: "sub";
|
|
546
|
+
ext_subject: "ext_subject";
|
|
547
|
+
ext_email: "ext_email";
|
|
514
548
|
org: "org";
|
|
515
549
|
}>;
|
|
516
550
|
}, z.core.$strip>], "kind">;
|
|
@@ -536,6 +570,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
536
570
|
kind: z.ZodLiteral<"claim">;
|
|
537
571
|
key: z.ZodEnum<{
|
|
538
572
|
sub: "sub";
|
|
573
|
+
ext_subject: "ext_subject";
|
|
574
|
+
ext_email: "ext_email";
|
|
539
575
|
org: "org";
|
|
540
576
|
}>;
|
|
541
577
|
}, z.core.$strip>], "kind">;
|
|
@@ -556,6 +592,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
556
592
|
kind: z.ZodLiteral<"claim">;
|
|
557
593
|
key: z.ZodEnum<{
|
|
558
594
|
sub: "sub";
|
|
595
|
+
ext_subject: "ext_subject";
|
|
596
|
+
ext_email: "ext_email";
|
|
559
597
|
org: "org";
|
|
560
598
|
}>;
|
|
561
599
|
}, z.core.$strip>], "kind">;
|
|
@@ -576,6 +614,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
576
614
|
kind: z.ZodLiteral<"claim">;
|
|
577
615
|
key: z.ZodEnum<{
|
|
578
616
|
sub: "sub";
|
|
617
|
+
ext_subject: "ext_subject";
|
|
618
|
+
ext_email: "ext_email";
|
|
579
619
|
org: "org";
|
|
580
620
|
}>;
|
|
581
621
|
}, z.core.$strip>], "kind">;
|
|
@@ -594,6 +634,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
594
634
|
kind: z.ZodLiteral<"claim">;
|
|
595
635
|
key: z.ZodEnum<{
|
|
596
636
|
sub: "sub";
|
|
637
|
+
ext_subject: "ext_subject";
|
|
638
|
+
ext_email: "ext_email";
|
|
597
639
|
org: "org";
|
|
598
640
|
}>;
|
|
599
641
|
}, z.core.$strip>], "kind">;
|
|
@@ -806,6 +848,8 @@ declare const compiledOperationSchema: z.ZodObject<{
|
|
|
806
848
|
kind: z.ZodLiteral<"claim">;
|
|
807
849
|
key: z.ZodEnum<{
|
|
808
850
|
sub: "sub";
|
|
851
|
+
ext_subject: "ext_subject";
|
|
852
|
+
ext_email: "ext_email";
|
|
809
853
|
org: "org";
|
|
810
854
|
}>;
|
|
811
855
|
}, z.core.$strip>], "kind">;
|
|
@@ -820,6 +864,8 @@ declare const compiledOperationSchema: z.ZodObject<{
|
|
|
820
864
|
kind: z.ZodLiteral<"claim">;
|
|
821
865
|
key: z.ZodEnum<{
|
|
822
866
|
sub: "sub";
|
|
867
|
+
ext_subject: "ext_subject";
|
|
868
|
+
ext_email: "ext_email";
|
|
823
869
|
org: "org";
|
|
824
870
|
}>;
|
|
825
871
|
}, z.core.$strip>], "kind">;
|
|
@@ -842,6 +888,8 @@ declare const compiledOperationSchema: z.ZodObject<{
|
|
|
842
888
|
kind: z.ZodLiteral<"claim">;
|
|
843
889
|
key: z.ZodEnum<{
|
|
844
890
|
sub: "sub";
|
|
891
|
+
ext_subject: "ext_subject";
|
|
892
|
+
ext_email: "ext_email";
|
|
845
893
|
org: "org";
|
|
846
894
|
}>;
|
|
847
895
|
}, z.core.$strip>], "kind">;
|
|
@@ -865,6 +913,8 @@ declare const compiledOperationSchema: z.ZodObject<{
|
|
|
865
913
|
kind: z.ZodLiteral<"claim">;
|
|
866
914
|
key: z.ZodEnum<{
|
|
867
915
|
sub: "sub";
|
|
916
|
+
ext_subject: "ext_subject";
|
|
917
|
+
ext_email: "ext_email";
|
|
868
918
|
org: "org";
|
|
869
919
|
}>;
|
|
870
920
|
}, z.core.$strip>], "kind">;
|
|
@@ -879,6 +929,8 @@ declare const compiledOperationSchema: z.ZodObject<{
|
|
|
879
929
|
kind: z.ZodLiteral<"claim">;
|
|
880
930
|
key: z.ZodEnum<{
|
|
881
931
|
sub: "sub";
|
|
932
|
+
ext_subject: "ext_subject";
|
|
933
|
+
ext_email: "ext_email";
|
|
882
934
|
org: "org";
|
|
883
935
|
}>;
|
|
884
936
|
}, z.core.$strip>], "kind">;
|
|
@@ -988,6 +1040,8 @@ declare const compiledOperationSchema: z.ZodObject<{
|
|
|
988
1040
|
kind: z.ZodLiteral<"claim">;
|
|
989
1041
|
key: z.ZodEnum<{
|
|
990
1042
|
sub: "sub";
|
|
1043
|
+
ext_subject: "ext_subject";
|
|
1044
|
+
ext_email: "ext_email";
|
|
991
1045
|
org: "org";
|
|
992
1046
|
}>;
|
|
993
1047
|
}, z.core.$strip>], "kind">;
|
|
@@ -1005,6 +1059,8 @@ declare const compiledOperationSchema: z.ZodObject<{
|
|
|
1005
1059
|
kind: z.ZodLiteral<"claim">;
|
|
1006
1060
|
key: z.ZodEnum<{
|
|
1007
1061
|
sub: "sub";
|
|
1062
|
+
ext_subject: "ext_subject";
|
|
1063
|
+
ext_email: "ext_email";
|
|
1008
1064
|
org: "org";
|
|
1009
1065
|
}>;
|
|
1010
1066
|
}, z.core.$strip>], "kind">;
|
|
@@ -1030,6 +1086,8 @@ declare const compiledOperationSchema: z.ZodObject<{
|
|
|
1030
1086
|
kind: z.ZodLiteral<"claim">;
|
|
1031
1087
|
key: z.ZodEnum<{
|
|
1032
1088
|
sub: "sub";
|
|
1089
|
+
ext_subject: "ext_subject";
|
|
1090
|
+
ext_email: "ext_email";
|
|
1033
1091
|
org: "org";
|
|
1034
1092
|
}>;
|
|
1035
1093
|
}, z.core.$strip>], "kind">;
|
|
@@ -1050,6 +1108,8 @@ declare const compiledOperationSchema: z.ZodObject<{
|
|
|
1050
1108
|
kind: z.ZodLiteral<"claim">;
|
|
1051
1109
|
key: z.ZodEnum<{
|
|
1052
1110
|
sub: "sub";
|
|
1111
|
+
ext_subject: "ext_subject";
|
|
1112
|
+
ext_email: "ext_email";
|
|
1053
1113
|
org: "org";
|
|
1054
1114
|
}>;
|
|
1055
1115
|
}, z.core.$strip>], "kind">;
|
|
@@ -1070,6 +1130,8 @@ declare const compiledOperationSchema: z.ZodObject<{
|
|
|
1070
1130
|
kind: z.ZodLiteral<"claim">;
|
|
1071
1131
|
key: z.ZodEnum<{
|
|
1072
1132
|
sub: "sub";
|
|
1133
|
+
ext_subject: "ext_subject";
|
|
1134
|
+
ext_email: "ext_email";
|
|
1073
1135
|
org: "org";
|
|
1074
1136
|
}>;
|
|
1075
1137
|
}, z.core.$strip>], "kind">;
|
|
@@ -1088,6 +1150,8 @@ declare const compiledOperationSchema: z.ZodObject<{
|
|
|
1088
1150
|
kind: z.ZodLiteral<"claim">;
|
|
1089
1151
|
key: z.ZodEnum<{
|
|
1090
1152
|
sub: "sub";
|
|
1153
|
+
ext_subject: "ext_subject";
|
|
1154
|
+
ext_email: "ext_email";
|
|
1091
1155
|
org: "org";
|
|
1092
1156
|
}>;
|
|
1093
1157
|
}, z.core.$strip>], "kind">;
|
|
@@ -1604,6 +1668,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
|
|
|
1604
1668
|
kind: z.ZodLiteral<"claim">;
|
|
1605
1669
|
key: z.ZodEnum<{
|
|
1606
1670
|
sub: "sub";
|
|
1671
|
+
ext_subject: "ext_subject";
|
|
1672
|
+
ext_email: "ext_email";
|
|
1607
1673
|
org: "org";
|
|
1608
1674
|
}>;
|
|
1609
1675
|
}, z.core.$strip>], "kind">;
|
|
@@ -1618,6 +1684,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
|
|
|
1618
1684
|
kind: z.ZodLiteral<"claim">;
|
|
1619
1685
|
key: z.ZodEnum<{
|
|
1620
1686
|
sub: "sub";
|
|
1687
|
+
ext_subject: "ext_subject";
|
|
1688
|
+
ext_email: "ext_email";
|
|
1621
1689
|
org: "org";
|
|
1622
1690
|
}>;
|
|
1623
1691
|
}, z.core.$strip>], "kind">;
|
|
@@ -1640,6 +1708,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
|
|
|
1640
1708
|
kind: z.ZodLiteral<"claim">;
|
|
1641
1709
|
key: z.ZodEnum<{
|
|
1642
1710
|
sub: "sub";
|
|
1711
|
+
ext_subject: "ext_subject";
|
|
1712
|
+
ext_email: "ext_email";
|
|
1643
1713
|
org: "org";
|
|
1644
1714
|
}>;
|
|
1645
1715
|
}, z.core.$strip>], "kind">;
|
|
@@ -1663,6 +1733,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
|
|
|
1663
1733
|
kind: z.ZodLiteral<"claim">;
|
|
1664
1734
|
key: z.ZodEnum<{
|
|
1665
1735
|
sub: "sub";
|
|
1736
|
+
ext_subject: "ext_subject";
|
|
1737
|
+
ext_email: "ext_email";
|
|
1666
1738
|
org: "org";
|
|
1667
1739
|
}>;
|
|
1668
1740
|
}, z.core.$strip>], "kind">;
|
|
@@ -1677,6 +1749,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
|
|
|
1677
1749
|
kind: z.ZodLiteral<"claim">;
|
|
1678
1750
|
key: z.ZodEnum<{
|
|
1679
1751
|
sub: "sub";
|
|
1752
|
+
ext_subject: "ext_subject";
|
|
1753
|
+
ext_email: "ext_email";
|
|
1680
1754
|
org: "org";
|
|
1681
1755
|
}>;
|
|
1682
1756
|
}, z.core.$strip>], "kind">;
|
|
@@ -1786,6 +1860,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
|
|
|
1786
1860
|
kind: z.ZodLiteral<"claim">;
|
|
1787
1861
|
key: z.ZodEnum<{
|
|
1788
1862
|
sub: "sub";
|
|
1863
|
+
ext_subject: "ext_subject";
|
|
1864
|
+
ext_email: "ext_email";
|
|
1789
1865
|
org: "org";
|
|
1790
1866
|
}>;
|
|
1791
1867
|
}, z.core.$strip>], "kind">;
|
|
@@ -1803,6 +1879,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
|
|
|
1803
1879
|
kind: z.ZodLiteral<"claim">;
|
|
1804
1880
|
key: z.ZodEnum<{
|
|
1805
1881
|
sub: "sub";
|
|
1882
|
+
ext_subject: "ext_subject";
|
|
1883
|
+
ext_email: "ext_email";
|
|
1806
1884
|
org: "org";
|
|
1807
1885
|
}>;
|
|
1808
1886
|
}, z.core.$strip>], "kind">;
|
|
@@ -1828,6 +1906,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
|
|
|
1828
1906
|
kind: z.ZodLiteral<"claim">;
|
|
1829
1907
|
key: z.ZodEnum<{
|
|
1830
1908
|
sub: "sub";
|
|
1909
|
+
ext_subject: "ext_subject";
|
|
1910
|
+
ext_email: "ext_email";
|
|
1831
1911
|
org: "org";
|
|
1832
1912
|
}>;
|
|
1833
1913
|
}, z.core.$strip>], "kind">;
|
|
@@ -1848,6 +1928,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
|
|
|
1848
1928
|
kind: z.ZodLiteral<"claim">;
|
|
1849
1929
|
key: z.ZodEnum<{
|
|
1850
1930
|
sub: "sub";
|
|
1931
|
+
ext_subject: "ext_subject";
|
|
1932
|
+
ext_email: "ext_email";
|
|
1851
1933
|
org: "org";
|
|
1852
1934
|
}>;
|
|
1853
1935
|
}, z.core.$strip>], "kind">;
|
|
@@ -1868,6 +1950,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
|
|
|
1868
1950
|
kind: z.ZodLiteral<"claim">;
|
|
1869
1951
|
key: z.ZodEnum<{
|
|
1870
1952
|
sub: "sub";
|
|
1953
|
+
ext_subject: "ext_subject";
|
|
1954
|
+
ext_email: "ext_email";
|
|
1871
1955
|
org: "org";
|
|
1872
1956
|
}>;
|
|
1873
1957
|
}, z.core.$strip>], "kind">;
|
|
@@ -1886,6 +1970,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
|
|
|
1886
1970
|
kind: z.ZodLiteral<"claim">;
|
|
1887
1971
|
key: z.ZodEnum<{
|
|
1888
1972
|
sub: "sub";
|
|
1973
|
+
ext_subject: "ext_subject";
|
|
1974
|
+
ext_email: "ext_email";
|
|
1889
1975
|
org: "org";
|
|
1890
1976
|
}>;
|
|
1891
1977
|
}, z.core.$strip>], "kind">;
|
|
@@ -1915,4 +2001,4 @@ declare function normalizeIr(raw: unknown): CompiledArtifact;
|
|
|
1915
2001
|
/** Index an artifact's operations by opHash (the wire selector). */
|
|
1916
2002
|
declare function indexByHash(artifact: CompiledArtifact): Map<string, CompiledOperation>;
|
|
1917
2003
|
|
|
1918
|
-
export { CLAIMS_CONTRACT, CMP_OPS, COMPOSED_IR_VERSION, type CellSelectionIr, type ClaimKey, type CmpOp, type CompiledArtifact, type CompiledOperation, DATE_BUCKETS, type DateBucket, GUARDED_IR_VERSION, type GroupByKeyIr, INPUT_REF_KINDS, IR_VERSION, type InputRefKind, IrVersionError, LEGACY_IR_VERSION, type LimitIr, type OrderIr, type PredIr, type PrefetchPlanIr, RUNTIME_SQL_IR_VERSION, type ResolvedMetaIr, type ResolvedSourceIr, type RootIr, SQL_IR_VERSION, type SelectionIr, type TableMetaIr, type ValueIr, type VariableDefaultIr, type VariableIr, compiledArtifactSchema, compiledOperationSchema, indexByHash, limitIrSchema, normalizeIr, orderIrSchema, predIrSchema, prefetchPlanIrSchema, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, rootIrSchema, selectionIrSchema, tableMetaIrSchema, valueIrSchema, variableDefaultIrSchema, variableIrSchema };
|
|
2004
|
+
export { CLAIMS_CONTRACT, CMP_OPS, COMPOSED_IR_VERSION, type CellSelectionIr, type ClaimKey, type CmpOp, type CompiledArtifact, type CompiledOperation, DATE_BUCKETS, type DateBucket, EXTERNAL_POLICY_CLAIM_KEYS, type ExternalPolicyClaimKey, GUARDED_IR_VERSION, type GroupByKeyIr, INPUT_REF_KINDS, IR_VERSION, type InputRefKind, IrVersionError, LEGACY_IR_VERSION, type LimitIr, type OrderIr, type PredIr, type PrefetchPlanIr, RUNTIME_SQL_IR_VERSION, type ResolvedMetaIr, type ResolvedSourceIr, type RootIr, SQL_IR_VERSION, type SelectionIr, type TableMetaIr, type ValueIr, type VariableDefaultIr, type VariableIr, compiledArtifactSchema, compiledOperationSchema, indexByHash, isExternalPolicyClaimKey, limitIrSchema, normalizeIr, orderIrSchema, predIrSchema, prefetchPlanIrSchema, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, rootIrSchema, selectionIrSchema, tableMetaIrSchema, valueIrSchema, variableDefaultIrSchema, variableIrSchema };
|
package/dist/ir.js
CHANGED
|
@@ -1039,14 +1039,20 @@ function requiredArtifactIrVersion(operations) {
|
|
|
1039
1039
|
var CLAIMS_CONTRACT = {
|
|
1040
1040
|
sub: "string",
|
|
1041
1041
|
org: "string?",
|
|
1042
|
+
ext_subject: "string?",
|
|
1043
|
+
ext_email: "string?",
|
|
1042
1044
|
roles: "string[]",
|
|
1043
1045
|
capabilities: "string[]"
|
|
1044
1046
|
};
|
|
1047
|
+
var EXTERNAL_POLICY_CLAIM_KEYS = ["ext_subject", "ext_email"];
|
|
1048
|
+
function isExternalPolicyClaimKey(key) {
|
|
1049
|
+
return EXTERNAL_POLICY_CLAIM_KEYS.includes(key);
|
|
1050
|
+
}
|
|
1045
1051
|
var scalarLiteral = z.union([z.string(), z.number(), z.boolean(), z.null()]);
|
|
1046
1052
|
var valueIrSchema = z.discriminatedUnion("kind", [
|
|
1047
1053
|
z.object({ kind: z.literal("literal"), value: z.union([scalarLiteral, z.array(scalarLiteral)]) }),
|
|
1048
1054
|
z.object({ kind: z.literal("variable"), name: z.string() }),
|
|
1049
|
-
z.object({ kind: z.literal("claim"), key: z.enum(["sub", "org"]) })
|
|
1055
|
+
z.object({ kind: z.literal("claim"), key: z.enum(["sub", "org", ...EXTERNAL_POLICY_CLAIM_KEYS]) })
|
|
1050
1056
|
]);
|
|
1051
1057
|
var CMP_OPS = [
|
|
1052
1058
|
"eq",
|
|
@@ -1502,6 +1508,6 @@ function indexByHash(artifact) {
|
|
|
1502
1508
|
return map;
|
|
1503
1509
|
}
|
|
1504
1510
|
|
|
1505
|
-
export { CELLS_FIELD, CELL_PARTS, CLAIMS_CONTRACT, CMP_OPS, COMPOSED_IR_VERSION, DATE_BUCKETS, GUARDED_IR_VERSION, INPUT_REF_KINDS, IR_VERSION, IrVersionError, LEGACY_IR_VERSION, RUNTIME_SQL_IR_VERSION, SQL_IR_VERSION, cellColumnName, compiledArtifactSchema, compiledOperationSchema, indexByHash, limitIrSchema, normalizeIr, orderIrSchema, predIrSchema, prefetchPlanIrSchema, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, rootIrSchema, selectionIrSchema, tableMetaIrSchema, valueIrSchema, variableDefaultIrSchema, variableIrSchema };
|
|
1511
|
+
export { CELLS_FIELD, CELL_PARTS, CLAIMS_CONTRACT, CMP_OPS, COMPOSED_IR_VERSION, DATE_BUCKETS, EXTERNAL_POLICY_CLAIM_KEYS, GUARDED_IR_VERSION, INPUT_REF_KINDS, IR_VERSION, IrVersionError, LEGACY_IR_VERSION, RUNTIME_SQL_IR_VERSION, SQL_IR_VERSION, cellColumnName, compiledArtifactSchema, compiledOperationSchema, indexByHash, isExternalPolicyClaimKey, limitIrSchema, normalizeIr, orderIrSchema, predIrSchema, prefetchPlanIrSchema, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, rootIrSchema, selectionIrSchema, tableMetaIrSchema, valueIrSchema, variableDefaultIrSchema, variableIrSchema };
|
|
1506
1512
|
//# sourceMappingURL=ir.js.map
|
|
1507
1513
|
//# sourceMappingURL=ir.js.map
|