@panneau/protocol 5.0.0-alpha.36 → 5.0.0-alpha.38
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/aggregates.d.ts +135 -0
- package/dist/aggregates.d.ts.map +1 -0
- package/dist/aggregates.js +236 -0
- package/dist/aggregates.js.map +1 -0
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +201 -24
- package/dist/conformance/index.js.map +1 -1
- package/dist/dashboards.d.ts +95 -0
- package/dist/dashboards.d.ts.map +1 -0
- package/dist/dashboards.js +140 -0
- package/dist/dashboards.js.map +1 -0
- package/dist/index.js +8 -5
- package/dist/lint.d.ts.map +1 -1
- package/dist/lint.js +249 -15
- package/dist/lint.js.map +1 -1
- package/dist/mock/index.d.ts +27 -8
- package/dist/mock/index.d.ts.map +1 -1
- package/dist/mock/index.js +42 -6
- package/dist/mock/index.js.map +1 -1
- package/dist/openapi.d.ts.map +1 -1
- package/dist/openapi.js +77 -3
- package/dist/openapi.js.map +1 -1
- package/dist/periods.d.ts +49 -0
- package/dist/periods.d.ts.map +1 -0
- package/dist/periods.js +93 -0
- package/dist/periods.js.map +1 -0
- package/dist/runtime/index.d.ts +4 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +5 -2
- package/dist/schemas/action.d.ts +1 -0
- package/dist/schemas/action.d.ts.map +1 -1
- package/dist/schemas/definition.d.ts +127 -0
- package/dist/schemas/definition.d.ts.map +1 -1
- package/dist/schemas/definition.js +8 -3
- package/dist/schemas/definition.js.map +1 -1
- package/dist/schemas/field.d.ts +1 -0
- package/dist/schemas/field.d.ts.map +1 -1
- package/dist/schemas/field.js +1 -0
- package/dist/schemas/field.js.map +1 -1
- package/dist/schemas/index.d.ts +283 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +11 -5
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/list.d.ts +11 -0
- package/dist/schemas/list.d.ts.map +1 -1
- package/dist/schemas/list.js +8 -2
- package/dist/schemas/list.js.map +1 -1
- package/dist/schemas/resource.d.ts +100 -0
- package/dist/schemas/resource.d.ts.map +1 -1
- package/dist/schemas/resource.js +9 -1
- package/dist/schemas/resource.js.map +1 -1
- package/dist/schemas/widget.d.ts +62 -2
- package/dist/schemas/widget.d.ts.map +1 -1
- package/dist/schemas/widget.js +36 -8
- package/dist/schemas/widget.js.map +1 -1
- package/dist/widgets.d.ts +48 -9
- package/dist/widgets.d.ts.map +1 -1
- package/dist/widgets.js +81 -10
- package/dist/widgets.js.map +1 -1
- package/package.json +1 -1
- package/schema/boot.schema.json +235 -66
- package/schema/definition.schema.json +235 -66
- package/schema/openapi.json +508 -7
package/dist/schemas/index.d.ts
CHANGED
|
@@ -365,6 +365,7 @@ export declare const namedSchemas: {
|
|
|
365
365
|
original: "original";
|
|
366
366
|
choose: "choose";
|
|
367
367
|
}>>;
|
|
368
|
+
transforms: z.ZodOptional<z.ZodBoolean>;
|
|
368
369
|
from: z.ZodOptional<z.ZodString>;
|
|
369
370
|
check: z.ZodOptional<z.ZodBoolean>;
|
|
370
371
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -555,6 +556,11 @@ export declare const namedSchemas: {
|
|
|
555
556
|
filter: z.ZodOptional<z.ZodString>;
|
|
556
557
|
perPage: z.ZodOptional<z.ZodNumber>;
|
|
557
558
|
}, z.core.$loose>;
|
|
559
|
+
ListAggregates: z.ZodObject<{
|
|
560
|
+
sum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
561
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
562
|
+
dates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
563
|
+
}, z.core.$loose>;
|
|
558
564
|
ListDefinition: z.ZodObject<{
|
|
559
565
|
columns: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
560
566
|
field: z.ZodOptional<z.ZodString>;
|
|
@@ -603,6 +609,11 @@ export declare const namedSchemas: {
|
|
|
603
609
|
filter: z.ZodOptional<z.ZodString>;
|
|
604
610
|
perPage: z.ZodOptional<z.ZodNumber>;
|
|
605
611
|
}, z.core.$loose>>;
|
|
612
|
+
aggregates: z.ZodOptional<z.ZodObject<{
|
|
613
|
+
sum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
614
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
615
|
+
dates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
616
|
+
}, z.core.$loose>>;
|
|
606
617
|
}, z.core.$loose>;
|
|
607
618
|
ActionScope: z.ZodEnum<{
|
|
608
619
|
resource: "resource";
|
|
@@ -828,6 +839,7 @@ export declare const namedSchemas: {
|
|
|
828
839
|
original: "original";
|
|
829
840
|
choose: "choose";
|
|
830
841
|
}>>;
|
|
842
|
+
transforms: z.ZodOptional<z.ZodBoolean>;
|
|
831
843
|
from: z.ZodOptional<z.ZodString>;
|
|
832
844
|
check: z.ZodOptional<z.ZodBoolean>;
|
|
833
845
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -886,6 +898,60 @@ export declare const namedSchemas: {
|
|
|
886
898
|
fields: z.ZodArray<typeof Field>;
|
|
887
899
|
abilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
888
900
|
}, z.core.$loose>;
|
|
901
|
+
SummaryPeriod: z.ZodObject<{
|
|
902
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
903
|
+
"7d": "7d";
|
|
904
|
+
"30d": "30d";
|
|
905
|
+
"90d": "90d";
|
|
906
|
+
month: "month";
|
|
907
|
+
year: "year";
|
|
908
|
+
}>>;
|
|
909
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
910
|
+
"7d": "7d";
|
|
911
|
+
"30d": "30d";
|
|
912
|
+
"90d": "90d";
|
|
913
|
+
month: "month";
|
|
914
|
+
year: "year";
|
|
915
|
+
}>>;
|
|
916
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
917
|
+
}, z.core.$loose>;
|
|
918
|
+
ResourceSummary: z.ZodObject<{
|
|
919
|
+
widgets: z.ZodArray<z.ZodObject<{
|
|
920
|
+
id: z.ZodString;
|
|
921
|
+
type: z.ZodString;
|
|
922
|
+
label: z.ZodOptional<z.ZodString>;
|
|
923
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
924
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
925
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
926
|
+
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>;
|
|
927
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
928
|
+
group: z.ZodOptional<z.ZodString>;
|
|
929
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
930
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
931
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
932
|
+
}, z.core.$loose>>;
|
|
933
|
+
}, z.core.$loose>>;
|
|
934
|
+
list: z.ZodOptional<z.ZodEnum<{
|
|
935
|
+
collapsed: "collapsed";
|
|
936
|
+
}>>;
|
|
937
|
+
period: z.ZodOptional<z.ZodObject<{
|
|
938
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
939
|
+
"7d": "7d";
|
|
940
|
+
"30d": "30d";
|
|
941
|
+
"90d": "90d";
|
|
942
|
+
month: "month";
|
|
943
|
+
year: "year";
|
|
944
|
+
}>>;
|
|
945
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
946
|
+
"7d": "7d";
|
|
947
|
+
"30d": "30d";
|
|
948
|
+
"90d": "90d";
|
|
949
|
+
month: "month";
|
|
950
|
+
year: "year";
|
|
951
|
+
}>>;
|
|
952
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
953
|
+
}, z.core.$loose>>;
|
|
954
|
+
}, z.core.$loose>;
|
|
889
955
|
Resource: z.ZodObject<{
|
|
890
956
|
id: z.ZodString;
|
|
891
957
|
kind: z.ZodOptional<z.ZodString>;
|
|
@@ -1083,6 +1149,7 @@ export declare const namedSchemas: {
|
|
|
1083
1149
|
original: "original";
|
|
1084
1150
|
choose: "choose";
|
|
1085
1151
|
}>>;
|
|
1152
|
+
transforms: z.ZodOptional<z.ZodBoolean>;
|
|
1086
1153
|
from: z.ZodOptional<z.ZodString>;
|
|
1087
1154
|
check: z.ZodOptional<z.ZodBoolean>;
|
|
1088
1155
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -1163,6 +1230,11 @@ export declare const namedSchemas: {
|
|
|
1163
1230
|
filter: z.ZodOptional<z.ZodString>;
|
|
1164
1231
|
perPage: z.ZodOptional<z.ZodNumber>;
|
|
1165
1232
|
}, z.core.$loose>>;
|
|
1233
|
+
aggregates: z.ZodOptional<z.ZodObject<{
|
|
1234
|
+
sum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1235
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1236
|
+
dates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1237
|
+
}, z.core.$loose>>;
|
|
1166
1238
|
}, z.core.$loose>>;
|
|
1167
1239
|
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1168
1240
|
id: z.ZodString;
|
|
@@ -1371,6 +1443,7 @@ export declare const namedSchemas: {
|
|
|
1371
1443
|
original: "original";
|
|
1372
1444
|
choose: "choose";
|
|
1373
1445
|
}>>;
|
|
1446
|
+
transforms: z.ZodOptional<z.ZodBoolean>;
|
|
1374
1447
|
from: z.ZodOptional<z.ZodString>;
|
|
1375
1448
|
check: z.ZodOptional<z.ZodBoolean>;
|
|
1376
1449
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -1430,6 +1503,43 @@ export declare const namedSchemas: {
|
|
|
1430
1503
|
fields: z.ZodArray<typeof Field>;
|
|
1431
1504
|
abilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1432
1505
|
}, z.core.$loose>>>;
|
|
1506
|
+
summary: z.ZodOptional<z.ZodObject<{
|
|
1507
|
+
widgets: z.ZodArray<z.ZodObject<{
|
|
1508
|
+
id: z.ZodString;
|
|
1509
|
+
type: z.ZodString;
|
|
1510
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1511
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1512
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
1513
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
1514
|
+
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>;
|
|
1515
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
1516
|
+
group: z.ZodOptional<z.ZodString>;
|
|
1517
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
1518
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
1519
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
1520
|
+
}, z.core.$loose>>;
|
|
1521
|
+
}, z.core.$loose>>;
|
|
1522
|
+
list: z.ZodOptional<z.ZodEnum<{
|
|
1523
|
+
collapsed: "collapsed";
|
|
1524
|
+
}>>;
|
|
1525
|
+
period: z.ZodOptional<z.ZodObject<{
|
|
1526
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
1527
|
+
"7d": "7d";
|
|
1528
|
+
"30d": "30d";
|
|
1529
|
+
"90d": "90d";
|
|
1530
|
+
month: "month";
|
|
1531
|
+
year: "year";
|
|
1532
|
+
}>>;
|
|
1533
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
1534
|
+
"7d": "7d";
|
|
1535
|
+
"30d": "30d";
|
|
1536
|
+
"90d": "90d";
|
|
1537
|
+
month: "month";
|
|
1538
|
+
year: "year";
|
|
1539
|
+
}>>;
|
|
1540
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
1541
|
+
}, z.core.$loose>>;
|
|
1542
|
+
}, z.core.$loose>>;
|
|
1433
1543
|
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1434
1544
|
}, z.core.$loose>;
|
|
1435
1545
|
User: z.ZodObject<{
|
|
@@ -1499,10 +1609,62 @@ export declare const namedSchemas: {
|
|
|
1499
1609
|
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1500
1610
|
params: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1501
1611
|
abilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1612
|
+
widgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1613
|
+
id: z.ZodString;
|
|
1614
|
+
type: z.ZodString;
|
|
1615
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1616
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1617
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
1618
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
1619
|
+
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>;
|
|
1620
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
1621
|
+
group: z.ZodOptional<z.ZodString>;
|
|
1622
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
1623
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
1624
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
1625
|
+
}, z.core.$loose>>;
|
|
1626
|
+
}, z.core.$loose>>>;
|
|
1627
|
+
period: z.ZodOptional<z.ZodObject<{
|
|
1628
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
1629
|
+
"7d": "7d";
|
|
1630
|
+
"30d": "30d";
|
|
1631
|
+
"90d": "90d";
|
|
1632
|
+
month: "month";
|
|
1633
|
+
year: "year";
|
|
1634
|
+
}>>;
|
|
1635
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
1636
|
+
"7d": "7d";
|
|
1637
|
+
"30d": "30d";
|
|
1638
|
+
"90d": "90d";
|
|
1639
|
+
month: "month";
|
|
1640
|
+
year: "year";
|
|
1641
|
+
}>>;
|
|
1642
|
+
}, z.core.$loose>>;
|
|
1502
1643
|
}, z.core.$loose>;
|
|
1503
1644
|
WidgetSettings: z.ZodObject<{
|
|
1504
1645
|
resource: z.ZodOptional<z.ZodString>;
|
|
1505
1646
|
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>;
|
|
1647
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
1648
|
+
group: z.ZodOptional<z.ZodString>;
|
|
1649
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
1650
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
1651
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
1652
|
+
}, z.core.$loose>;
|
|
1653
|
+
OverviewPeriod: z.ZodObject<{
|
|
1654
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
1655
|
+
"7d": "7d";
|
|
1656
|
+
"30d": "30d";
|
|
1657
|
+
"90d": "90d";
|
|
1658
|
+
month: "month";
|
|
1659
|
+
year: "year";
|
|
1660
|
+
}>>;
|
|
1661
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
1662
|
+
"7d": "7d";
|
|
1663
|
+
"30d": "30d";
|
|
1664
|
+
"90d": "90d";
|
|
1665
|
+
month: "month";
|
|
1666
|
+
year: "year";
|
|
1667
|
+
}>>;
|
|
1506
1668
|
}, z.core.$loose>;
|
|
1507
1669
|
Widget: z.ZodObject<{
|
|
1508
1670
|
id: z.ZodString;
|
|
@@ -1512,6 +1674,11 @@ export declare const namedSchemas: {
|
|
|
1512
1674
|
settings: z.ZodOptional<z.ZodObject<{
|
|
1513
1675
|
resource: z.ZodOptional<z.ZodString>;
|
|
1514
1676
|
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>;
|
|
1677
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
1678
|
+
group: z.ZodOptional<z.ZodString>;
|
|
1679
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
1680
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
1681
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
1515
1682
|
}, z.core.$loose>>;
|
|
1516
1683
|
}, z.core.$loose>;
|
|
1517
1684
|
Uploads: z.ZodObject<{
|
|
@@ -1941,6 +2108,7 @@ export declare const namedSchemas: {
|
|
|
1941
2108
|
original: "original";
|
|
1942
2109
|
choose: "choose";
|
|
1943
2110
|
}>>;
|
|
2111
|
+
transforms: z.ZodOptional<z.ZodBoolean>;
|
|
1944
2112
|
from: z.ZodOptional<z.ZodString>;
|
|
1945
2113
|
check: z.ZodOptional<z.ZodBoolean>;
|
|
1946
2114
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -2021,6 +2189,11 @@ export declare const namedSchemas: {
|
|
|
2021
2189
|
filter: z.ZodOptional<z.ZodString>;
|
|
2022
2190
|
perPage: z.ZodOptional<z.ZodNumber>;
|
|
2023
2191
|
}, z.core.$loose>>;
|
|
2192
|
+
aggregates: z.ZodOptional<z.ZodObject<{
|
|
2193
|
+
sum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2194
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2195
|
+
dates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2196
|
+
}, z.core.$loose>>;
|
|
2024
2197
|
}, z.core.$loose>>;
|
|
2025
2198
|
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2026
2199
|
id: z.ZodString;
|
|
@@ -2229,6 +2402,7 @@ export declare const namedSchemas: {
|
|
|
2229
2402
|
original: "original";
|
|
2230
2403
|
choose: "choose";
|
|
2231
2404
|
}>>;
|
|
2405
|
+
transforms: z.ZodOptional<z.ZodBoolean>;
|
|
2232
2406
|
from: z.ZodOptional<z.ZodString>;
|
|
2233
2407
|
check: z.ZodOptional<z.ZodBoolean>;
|
|
2234
2408
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -2288,6 +2462,43 @@ export declare const namedSchemas: {
|
|
|
2288
2462
|
fields: z.ZodArray<typeof Field>;
|
|
2289
2463
|
abilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
2290
2464
|
}, z.core.$loose>>>;
|
|
2465
|
+
summary: z.ZodOptional<z.ZodObject<{
|
|
2466
|
+
widgets: z.ZodArray<z.ZodObject<{
|
|
2467
|
+
id: z.ZodString;
|
|
2468
|
+
type: z.ZodString;
|
|
2469
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2470
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
2471
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
2472
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
2473
|
+
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>;
|
|
2474
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
2475
|
+
group: z.ZodOptional<z.ZodString>;
|
|
2476
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
2477
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
2478
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
2479
|
+
}, z.core.$loose>>;
|
|
2480
|
+
}, z.core.$loose>>;
|
|
2481
|
+
list: z.ZodOptional<z.ZodEnum<{
|
|
2482
|
+
collapsed: "collapsed";
|
|
2483
|
+
}>>;
|
|
2484
|
+
period: z.ZodOptional<z.ZodObject<{
|
|
2485
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
2486
|
+
"7d": "7d";
|
|
2487
|
+
"30d": "30d";
|
|
2488
|
+
"90d": "90d";
|
|
2489
|
+
month: "month";
|
|
2490
|
+
year: "year";
|
|
2491
|
+
}>>;
|
|
2492
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
2493
|
+
"7d": "7d";
|
|
2494
|
+
"30d": "30d";
|
|
2495
|
+
"90d": "90d";
|
|
2496
|
+
month: "month";
|
|
2497
|
+
year: "year";
|
|
2498
|
+
}>>;
|
|
2499
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
2500
|
+
}, z.core.$loose>>;
|
|
2501
|
+
}, z.core.$loose>>;
|
|
2291
2502
|
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2292
2503
|
}, z.core.$loose>>;
|
|
2293
2504
|
pages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -2297,6 +2508,37 @@ export declare const namedSchemas: {
|
|
|
2297
2508
|
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2298
2509
|
params: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2299
2510
|
abilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
2511
|
+
widgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2512
|
+
id: z.ZodString;
|
|
2513
|
+
type: z.ZodString;
|
|
2514
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2515
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
2516
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
2517
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
2518
|
+
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>;
|
|
2519
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
2520
|
+
group: z.ZodOptional<z.ZodString>;
|
|
2521
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
2522
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
2523
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
2524
|
+
}, z.core.$loose>>;
|
|
2525
|
+
}, z.core.$loose>>>;
|
|
2526
|
+
period: z.ZodOptional<z.ZodObject<{
|
|
2527
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
2528
|
+
"7d": "7d";
|
|
2529
|
+
"30d": "30d";
|
|
2530
|
+
"90d": "90d";
|
|
2531
|
+
month: "month";
|
|
2532
|
+
year: "year";
|
|
2533
|
+
}>>;
|
|
2534
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
2535
|
+
"7d": "7d";
|
|
2536
|
+
"30d": "30d";
|
|
2537
|
+
"90d": "90d";
|
|
2538
|
+
month: "month";
|
|
2539
|
+
year: "year";
|
|
2540
|
+
}>>;
|
|
2541
|
+
}, z.core.$loose>>;
|
|
2300
2542
|
}, z.core.$loose>>>;
|
|
2301
2543
|
menus: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
2302
2544
|
type: z.ZodString;
|
|
@@ -2345,8 +2587,29 @@ export declare const namedSchemas: {
|
|
|
2345
2587
|
settings: z.ZodOptional<z.ZodObject<{
|
|
2346
2588
|
resource: z.ZodOptional<z.ZodString>;
|
|
2347
2589
|
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>;
|
|
2590
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
2591
|
+
group: z.ZodOptional<z.ZodString>;
|
|
2592
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
2593
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
2594
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
2348
2595
|
}, z.core.$loose>>;
|
|
2349
2596
|
}, z.core.$loose>>;
|
|
2597
|
+
period: z.ZodOptional<z.ZodObject<{
|
|
2598
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
2599
|
+
"7d": "7d";
|
|
2600
|
+
"30d": "30d";
|
|
2601
|
+
"90d": "90d";
|
|
2602
|
+
month: "month";
|
|
2603
|
+
year: "year";
|
|
2604
|
+
}>>;
|
|
2605
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
2606
|
+
"7d": "7d";
|
|
2607
|
+
"30d": "30d";
|
|
2608
|
+
"90d": "90d";
|
|
2609
|
+
month: "month";
|
|
2610
|
+
year: "year";
|
|
2611
|
+
}>>;
|
|
2612
|
+
}, z.core.$loose>>;
|
|
2350
2613
|
}, z.core.$loose>>;
|
|
2351
2614
|
search: z.ZodOptional<z.ZodObject<{
|
|
2352
2615
|
enabled: z.ZodBoolean;
|
|
@@ -3079,6 +3342,7 @@ export declare const namedSchemas: {
|
|
|
3079
3342
|
help: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3080
3343
|
tone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3081
3344
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3345
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3082
3346
|
}, z.core.$loose>;
|
|
3083
3347
|
SeriesPoint: z.ZodObject<{
|
|
3084
3348
|
date: z.ZodString;
|
|
@@ -3086,9 +3350,9 @@ export declare const namedSchemas: {
|
|
|
3086
3350
|
}, z.core.$loose>;
|
|
3087
3351
|
SeriesWidgetData: z.ZodObject<{
|
|
3088
3352
|
period: z.ZodEnum<{
|
|
3353
|
+
month: "month";
|
|
3089
3354
|
day: "day";
|
|
3090
3355
|
week: "week";
|
|
3091
|
-
month: "month";
|
|
3092
3356
|
}>;
|
|
3093
3357
|
points: z.ZodArray<z.ZodObject<{
|
|
3094
3358
|
date: z.ZodString;
|
|
@@ -3120,6 +3384,24 @@ export declare const namedSchemas: {
|
|
|
3120
3384
|
empty: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3121
3385
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3122
3386
|
}, z.core.$loose>;
|
|
3387
|
+
BreakdownWidgetItem: z.ZodObject<{
|
|
3388
|
+
label: z.ZodString;
|
|
3389
|
+
value: z.ZodNumber;
|
|
3390
|
+
tone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3391
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3392
|
+
key: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3393
|
+
}, z.core.$loose>;
|
|
3394
|
+
BreakdownWidgetData: z.ZodObject<{
|
|
3395
|
+
items: z.ZodArray<z.ZodObject<{
|
|
3396
|
+
label: z.ZodString;
|
|
3397
|
+
value: z.ZodNumber;
|
|
3398
|
+
tone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3399
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3400
|
+
key: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3401
|
+
}, z.core.$loose>>;
|
|
3402
|
+
total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3403
|
+
other: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3404
|
+
}, z.core.$loose>;
|
|
3123
3405
|
};
|
|
3124
3406
|
/** A registry of the named schemas, used to reference them by name in generated files. */
|
|
3125
3407
|
export declare function createSchemaRegistry(): z.core.$ZodRegistry<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAsBH,cAAc,EAoBjB,MAAM,OAAO,CAAC;AACf,OAAO,EAAa,SAAS,EAA8B,MAAM,UAAU,CAAC;AAC5E,OAAO,EASH,QAAQ,EAIX,MAAM,cAAc,CAAC;AACtB,OAAO,EAEH,SAAS,EAGT,KAAK,EAOR,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAsBH,cAAc,EAoBjB,MAAM,OAAO,CAAC;AACf,OAAO,EAAa,SAAS,EAA8B,MAAM,UAAU,CAAC;AAC5E,OAAO,EASH,QAAQ,EAIX,MAAM,cAAc,CAAC;AACtB,OAAO,EAEH,SAAS,EAGT,KAAK,EAOR,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,UAAU,EAAE,MAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwGY,CAAC;AAEtC,0FAA0F;AAC1F,wBAAgB,oBAAoB;QACE,MAAM;4GAK3C"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -3,10 +3,10 @@ import { AddressSettings, BlockType, DateRangeSettings, DurationSettings, Field,
|
|
|
3
3
|
import { actionJsonRules } from "./jsonRules.js";
|
|
4
4
|
import { LayoutNode } from "./layout.js";
|
|
5
5
|
import { Action, ActionConfirm, ActionPlacement, ActionScope } from "./action.js";
|
|
6
|
-
import { Column, Filter, ListCalendar, ListDefinition } from "./list.js";
|
|
7
|
-
import {
|
|
6
|
+
import { Column, Filter, ListAggregates, ListCalendar, ListDefinition } from "./list.js";
|
|
7
|
+
import { BreakdownWidgetData, BreakdownWidgetItem, ListWidgetData, ListWidgetItem, OverviewPeriod, SeriesPoint, SeriesWidgetData, StatWidgetData, Widget, WidgetBadge, WidgetSettings, widgetDataSchemas } from "./widget.js";
|
|
8
|
+
import { Resource, ResourceFeatures, ResourceSummary, ResourceType, SummaryPeriod } from "./resource.js";
|
|
8
9
|
import { DefinitionTheme, Theme, ThemeFont, ThemeFontFace, ThemeFontStylesheet, ThemeTokens, ToneInput, ToneValues } from "./theme.js";
|
|
9
|
-
import { ListWidgetData, ListWidgetItem, SeriesPoint, SeriesWidgetData, StatWidgetData, Widget, WidgetBadge, WidgetSettings, widgetDataSchemas } from "./widget.js";
|
|
10
10
|
import { Auth, AuthProvider, AuthToken, ContextOption, ContextParam, Definition, DefinitionContext, InterfaceLocale, MenuItem, Page, Uploads, User } from "./definition.js";
|
|
11
11
|
import { ActionItemResult, ActionRequest, ActionResult, ActionRun, ActionRunResponse, AddressValue, ContextOptionsResponse, CursorPagination, DateRangeValue, EmbedResponse, EmbedValue, FieldCheckRequest, FieldCheckResponse, Item, ItemResponse, LinkValue, ListResponse, LocationValue, MediaInfo, MediaItem, MediaReference, MediaTransform, MoneyValue, Pagination, Passkey, PreviewResponse, Problem, RecoveryCodes, SearchResponse, Selection, Session, StoredFile, TwoFactorChallenge, TwoFactorSetup, TwoFactorStatus, Upload, UploadReference, UploadResponse, UploadSignRequest, UploadSignResponse, WebAuthnOptions } from "./api.js";
|
|
12
12
|
import { BootConfig } from "./boot.js";
|
|
@@ -34,6 +34,7 @@ var namedSchemas = {
|
|
|
34
34
|
Column,
|
|
35
35
|
Filter,
|
|
36
36
|
ListCalendar,
|
|
37
|
+
ListAggregates,
|
|
37
38
|
ListDefinition,
|
|
38
39
|
ActionScope,
|
|
39
40
|
ActionPlacement,
|
|
@@ -41,6 +42,8 @@ var namedSchemas = {
|
|
|
41
42
|
Action,
|
|
42
43
|
ResourceFeatures,
|
|
43
44
|
ResourceType,
|
|
45
|
+
SummaryPeriod,
|
|
46
|
+
ResourceSummary,
|
|
44
47
|
Resource,
|
|
45
48
|
User,
|
|
46
49
|
AuthProvider,
|
|
@@ -50,6 +53,7 @@ var namedSchemas = {
|
|
|
50
53
|
MenuItem,
|
|
51
54
|
Page,
|
|
52
55
|
WidgetSettings,
|
|
56
|
+
OverviewPeriod,
|
|
53
57
|
Widget,
|
|
54
58
|
Uploads,
|
|
55
59
|
ContextOption,
|
|
@@ -110,7 +114,9 @@ var namedSchemas = {
|
|
|
110
114
|
SeriesPoint,
|
|
111
115
|
SeriesWidgetData,
|
|
112
116
|
ListWidgetItem,
|
|
113
|
-
ListWidgetData
|
|
117
|
+
ListWidgetData,
|
|
118
|
+
BreakdownWidgetItem,
|
|
119
|
+
BreakdownWidgetData
|
|
114
120
|
};
|
|
115
121
|
/** A registry of the named schemas, used to reference them by name in generated files. */
|
|
116
122
|
function createSchemaRegistry() {
|
|
@@ -123,6 +129,6 @@ function createSchemaRegistry() {
|
|
|
123
129
|
return registry;
|
|
124
130
|
}
|
|
125
131
|
//#endregion
|
|
126
|
-
export { Abilities, Action, ActionConfirm, ActionItemResult, ActionPlacement, ActionRequest, ActionResult, ActionRun, ActionRunResponse, ActionScope, AddressSettings, AddressValue, Auth, AuthProvider, AuthToken, BlockType, BootConfig, Column, Condition, ContextOption, ContextOptionsResponse, ContextParam, CursorPagination, DateRangeSettings, DateRangeValue, Definition, DefinitionContext, DefinitionTheme, DurationSettings, EmbedResponse, EmbedValue, Field, FieldCheckRequest, FieldCheckResponse, Filter, Id, InterfaceLocale, Item, ItemResponse, LayoutNode, LinkSettings, LinkTypeSetting, LinkValue, ListCalendar, ListDefinition, ListResponse, ListWidgetData, ListWidgetItem, LocationValue, MediaInfo, MediaItem, MediaReference, MediaTransform, MenuItem, MoneySettings, MoneyValue, Option, Page, Pagination, Passkey, PreviewResponse, Problem, RecoveryCodes, Resource, ResourceFeatures, ResourceType, RichTextSettings, RichTextStyle, RouteReference, Rule, SearchResponse, Selection, SeriesPoint, SeriesWidgetData, Session, StatWidgetData, StoredFile, Theme, ThemeFont, ThemeFontFace, ThemeFontStylesheet, ThemeTokens, ToneInput, ToneValues, TwoFactorChallenge, TwoFactorSetup, TwoFactorStatus, Upload, UploadReference, UploadResponse, UploadSignRequest, UploadSignResponse, Uploads, User, WebAuthnOptions, Widget, WidgetBadge, WidgetSettings, createSchemaRegistry, namedSchemas, widgetDataSchemas };
|
|
132
|
+
export { Abilities, Action, ActionConfirm, ActionItemResult, ActionPlacement, ActionRequest, ActionResult, ActionRun, ActionRunResponse, ActionScope, AddressSettings, AddressValue, Auth, AuthProvider, AuthToken, BlockType, BootConfig, BreakdownWidgetData, BreakdownWidgetItem, Column, Condition, ContextOption, ContextOptionsResponse, ContextParam, CursorPagination, DateRangeSettings, DateRangeValue, Definition, DefinitionContext, DefinitionTheme, DurationSettings, EmbedResponse, EmbedValue, Field, FieldCheckRequest, FieldCheckResponse, Filter, Id, InterfaceLocale, Item, ItemResponse, LayoutNode, LinkSettings, LinkTypeSetting, LinkValue, ListAggregates, ListCalendar, ListDefinition, ListResponse, ListWidgetData, ListWidgetItem, LocationValue, MediaInfo, MediaItem, MediaReference, MediaTransform, MenuItem, MoneySettings, MoneyValue, Option, OverviewPeriod, Page, Pagination, Passkey, PreviewResponse, Problem, RecoveryCodes, Resource, ResourceFeatures, ResourceSummary, ResourceType, RichTextSettings, RichTextStyle, RouteReference, Rule, SearchResponse, Selection, SeriesPoint, SeriesWidgetData, Session, StatWidgetData, StoredFile, SummaryPeriod, Theme, ThemeFont, ThemeFontFace, ThemeFontStylesheet, ThemeTokens, ToneInput, ToneValues, TwoFactorChallenge, TwoFactorSetup, TwoFactorStatus, Upload, UploadReference, UploadResponse, UploadSignRequest, UploadSignResponse, Uploads, User, WebAuthnOptions, Widget, WidgetBadge, WidgetSettings, createSchemaRegistry, namedSchemas, widgetDataSchemas };
|
|
127
133
|
|
|
128
134
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/schemas/index.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { Action, ActionConfirm, ActionPlacement, ActionScope } from './action';\nimport {\n ActionItemResult,\n ActionRequest,\n ActionResult,\n ActionRun,\n ActionRunResponse,\n AddressValue,\n ContextOptionsResponse,\n CursorPagination,\n DateRangeValue,\n EmbedResponse,\n EmbedValue,\n FieldCheckRequest,\n FieldCheckResponse,\n Item,\n ItemResponse,\n LinkValue,\n ListResponse,\n LocationValue,\n MediaInfo,\n MediaItem,\n MediaReference,\n MediaTransform,\n MoneyValue,\n Pagination,\n Passkey,\n PreviewResponse,\n Problem,\n RecoveryCodes,\n SearchResponse,\n Selection,\n Session,\n StoredFile,\n TwoFactorChallenge,\n TwoFactorSetup,\n TwoFactorStatus,\n Upload,\n UploadReference,\n UploadResponse,\n UploadSignRequest,\n UploadSignResponse,\n WebAuthnOptions,\n} from './api';\nimport { Abilities, Condition, Id, Option, RouteReference } from './common';\nimport {\n Auth,\n AuthProvider,\n AuthToken,\n ContextOption,\n ContextParam,\n Definition,\n DefinitionContext,\n InterfaceLocale,\n MenuItem,\n Page,\n Uploads,\n User,\n} from './definition';\nimport {\n AddressSettings,\n BlockType,\n DateRangeSettings,\n DurationSettings,\n Field,\n LinkSettings,\n LinkTypeSetting,\n MoneySettings,\n RichTextSettings,\n RichTextStyle,\n Rule,\n} from './field';\nimport { actionJsonRules } from './jsonRules';\nimport { LayoutNode } from './layout';\nimport { Column, Filter, ListCalendar, ListDefinition } from './list';\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/schemas/index.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { Action, ActionConfirm, ActionPlacement, ActionScope } from './action';\nimport {\n ActionItemResult,\n ActionRequest,\n ActionResult,\n ActionRun,\n ActionRunResponse,\n AddressValue,\n ContextOptionsResponse,\n CursorPagination,\n DateRangeValue,\n EmbedResponse,\n EmbedValue,\n FieldCheckRequest,\n FieldCheckResponse,\n Item,\n ItemResponse,\n LinkValue,\n ListResponse,\n LocationValue,\n MediaInfo,\n MediaItem,\n MediaReference,\n MediaTransform,\n MoneyValue,\n Pagination,\n Passkey,\n PreviewResponse,\n Problem,\n RecoveryCodes,\n SearchResponse,\n Selection,\n Session,\n StoredFile,\n TwoFactorChallenge,\n TwoFactorSetup,\n TwoFactorStatus,\n Upload,\n UploadReference,\n UploadResponse,\n UploadSignRequest,\n UploadSignResponse,\n WebAuthnOptions,\n} from './api';\nimport { Abilities, Condition, Id, Option, RouteReference } from './common';\nimport {\n Auth,\n AuthProvider,\n AuthToken,\n ContextOption,\n ContextParam,\n Definition,\n DefinitionContext,\n InterfaceLocale,\n MenuItem,\n Page,\n Uploads,\n User,\n} from './definition';\nimport {\n AddressSettings,\n BlockType,\n DateRangeSettings,\n DurationSettings,\n Field,\n LinkSettings,\n LinkTypeSetting,\n MoneySettings,\n RichTextSettings,\n RichTextStyle,\n Rule,\n} from './field';\nimport { actionJsonRules } from './jsonRules';\nimport { LayoutNode } from './layout';\nimport { Column, Filter, ListAggregates, ListCalendar, ListDefinition } from './list';\nimport {\n Resource,\n ResourceFeatures,\n ResourceSummary,\n ResourceType,\n SummaryPeriod,\n} from './resource';\nimport {\n DefinitionTheme,\n Theme,\n ThemeFont,\n ThemeFontFace,\n ThemeFontStylesheet,\n ThemeTokens,\n ToneInput,\n ToneValues,\n} from './theme';\nimport {\n BreakdownWidgetData,\n BreakdownWidgetItem,\n ListWidgetData,\n ListWidgetItem,\n OverviewPeriod,\n SeriesPoint,\n SeriesWidgetData,\n StatWidgetData,\n Widget,\n WidgetBadge,\n WidgetSettings,\n} from './widget';\n\nexport * from './common';\nexport * from './field';\nexport * from './layout';\nexport * from './list';\nexport * from './action';\nexport * from './resource';\nexport * from './theme';\nexport * from './widget';\nexport * from './definition';\nexport * from './api';\nexport * from './boot';\n\n/** The named schemas of the protocol, as they appear in the generated JSON Schema and OpenAPI files. */\nexport const namedSchemas = {\n Id,\n Abilities,\n RouteReference,\n Condition,\n Option,\n Rule,\n BlockType,\n Field,\n RichTextStyle,\n RichTextSettings,\n LinkTypeSetting,\n LinkSettings,\n AddressSettings,\n DateRangeSettings,\n MoneySettings,\n DurationSettings,\n LayoutNode,\n Column,\n Filter,\n ListCalendar,\n ListAggregates,\n ListDefinition,\n ActionScope,\n ActionPlacement,\n ActionConfirm,\n Action,\n ResourceFeatures,\n ResourceType,\n SummaryPeriod,\n ResourceSummary,\n Resource,\n User,\n AuthProvider,\n AuthToken,\n Auth,\n InterfaceLocale,\n MenuItem,\n Page,\n WidgetSettings,\n OverviewPeriod,\n Widget,\n Uploads,\n ContextOption,\n ContextParam,\n DefinitionContext,\n ThemeTokens,\n ToneValues,\n ToneInput,\n ThemeFontFace,\n ThemeFontStylesheet,\n ThemeFont,\n Theme,\n DefinitionTheme,\n Definition,\n Item,\n Pagination,\n CursorPagination,\n ItemResponse,\n ListResponse,\n Problem,\n Selection,\n ActionRequest,\n ActionItemResult,\n ActionResult,\n ActionRun,\n ActionRunResponse,\n MediaTransform,\n StoredFile,\n UploadReference,\n Upload,\n UploadResponse,\n UploadSignRequest,\n UploadSignResponse,\n FieldCheckRequest,\n FieldCheckResponse,\n MediaInfo,\n MediaItem,\n MediaReference,\n Session,\n TwoFactorChallenge,\n TwoFactorStatus,\n TwoFactorSetup,\n RecoveryCodes,\n WebAuthnOptions,\n Passkey,\n SearchResponse,\n ContextOptionsResponse,\n PreviewResponse,\n EmbedValue,\n EmbedResponse,\n LocationValue,\n AddressValue,\n LinkValue,\n DateRangeValue,\n MoneyValue,\n WidgetBadge,\n StatWidgetData,\n SeriesPoint,\n SeriesWidgetData,\n ListWidgetItem,\n ListWidgetData,\n BreakdownWidgetItem,\n BreakdownWidgetData,\n} satisfies Record<string, z.ZodType>;\n\n/** A registry of the named schemas, used to reference them by name in generated files. */\nexport function createSchemaRegistry() {\n const registry = z.registry<{ id: string } & Record<string, unknown>>();\n Object.entries(namedSchemas).forEach(([id, schema]) => registry.add(schema, { id }));\n // Checks that Zod makes in code, which the JSON Schema of the definition must make too.\n registry.add(Action, { id: 'Action', ...actionJsonRules });\n return registry;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAyHA,IAAa,eAAe;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;;AAGA,SAAgB,uBAAuB;CACnC,MAAM,WAAW,EAAE,SAAmD;CACtE,OAAO,QAAQ,YAAY,CAAC,CAAC,SAAS,CAAC,IAAI,YAAY,SAAS,IAAI,QAAQ,EAAE,GAAG,CAAC,CAAC;CAEnF,SAAS,IAAI,QAAQ;EAAE,IAAI;EAAU,GAAG;CAAgB,CAAC;CACzD,OAAO;AACX"}
|
package/dist/schemas/list.d.ts
CHANGED
|
@@ -34,6 +34,11 @@ export declare const ListCalendar: z.ZodObject<{
|
|
|
34
34
|
filter: z.ZodOptional<z.ZodString>;
|
|
35
35
|
perPage: z.ZodOptional<z.ZodNumber>;
|
|
36
36
|
}, z.core.$loose>;
|
|
37
|
+
export declare const ListAggregates: z.ZodObject<{
|
|
38
|
+
sum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
39
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
|
+
dates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
|
+
}, z.core.$loose>;
|
|
37
42
|
export declare const ListDefinition: z.ZodObject<{
|
|
38
43
|
columns: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
39
44
|
field: z.ZodOptional<z.ZodString>;
|
|
@@ -82,9 +87,15 @@ export declare const ListDefinition: z.ZodObject<{
|
|
|
82
87
|
filter: z.ZodOptional<z.ZodString>;
|
|
83
88
|
perPage: z.ZodOptional<z.ZodNumber>;
|
|
84
89
|
}, z.core.$loose>>;
|
|
90
|
+
aggregates: z.ZodOptional<z.ZodObject<{
|
|
91
|
+
sum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
92
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
93
|
+
dates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
94
|
+
}, z.core.$loose>>;
|
|
85
95
|
}, z.core.$loose>;
|
|
86
96
|
export type Column = z.infer<typeof Column>;
|
|
87
97
|
export type Filter = z.infer<typeof Filter>;
|
|
88
98
|
export type ListDefinition = z.infer<typeof ListDefinition>;
|
|
89
99
|
export type ListCalendar = z.infer<typeof ListCalendar>;
|
|
100
|
+
export type ListAggregates = z.infer<typeof ListAggregates>;
|
|
90
101
|
//# sourceMappingURL=list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/schemas/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;iBAwBb,CAAC;AAEP,eAAO,MAAM,MAAM;;;;;;;;;;;;;;iBAkBjB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;iBAavB,CAAC;AAEH,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/schemas/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;iBAwBb,CAAC;AAEP,eAAO,MAAM,MAAM;;;;;;;;;;;;;;iBAkBjB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;iBAavB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;iBAkBrB,CAAC;AAEP,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmCzB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAC5C,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AAC5C,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC5D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACxD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
package/dist/schemas/list.js
CHANGED
|
@@ -30,6 +30,11 @@ var ListCalendar = z.looseObject({
|
|
|
30
30
|
filter: z.string().min(1).optional().meta({ description: "The id of the list's `date-range` filter on that field, through which the calendar asks for the days around a month. Defaults to the field's name." }),
|
|
31
31
|
perPage: z.number().int().positive().optional().meta({ description: "How many items the calendar asks for a month, in one request. Defaults to 100." })
|
|
32
32
|
});
|
|
33
|
+
var ListAggregates = z.looseObject({
|
|
34
|
+
sum: z.array(z.string().min(1)).optional().meta({ description: "Fields that can be summed (`measure=sum:{field}`): `number`, `range` and `duration` fields, and `money` fields of one `currency`." }),
|
|
35
|
+
groupBy: z.array(z.string().min(1)).optional().meta({ description: "Fields whose values the items can be grouped by, in a `breakdown` (`group={field}`)." }),
|
|
36
|
+
dates: z.array(z.string().min(1)).optional().meta({ description: "`date` and `datetime` fields whose days, weeks or months the items can be grouped by, in a `series` (`group={period}:{field}`)." })
|
|
37
|
+
}).meta({ description: "What `GET /resources/{resource}/aggregate` can count, sum and group by (decision 0084): nothing that is not declared." });
|
|
33
38
|
var ListDefinition = z.looseObject({
|
|
34
39
|
columns: z.array(Column).optional(),
|
|
35
40
|
filters: z.array(Filter).optional(),
|
|
@@ -42,9 +47,10 @@ var ListDefinition = z.looseObject({
|
|
|
42
47
|
pagination: z.enum(["pages", "cursor"]).optional().meta({ description: "`pages` (the default): numbered pages, with a total. `cursor`: the list follows `nextCursor` of each page with the `cursor` parameter, without page numbers, for large lists that the backend can't count (decision 0039)." }),
|
|
43
48
|
inlineEdit: z.array(z.string().min(1)).optional().meta({ description: "Fields that columns edit in place, on items that can be updated: `text`, `number`, `select`, `boolean` and `date`. Each change is a `PATCH` with the one field and `If-Match` (decision 0043)." }),
|
|
44
49
|
selectable: z.boolean().optional(),
|
|
45
|
-
calendar: ListCalendar.optional().meta({ description: "The calendar of the list: the items of a month on the days of a date field, asked for through a `date-range` filter instead of pages (decision 0044)." })
|
|
50
|
+
calendar: ListCalendar.optional().meta({ description: "The calendar of the list: the items of a month on the days of a date field, asked for through a `date-range` filter instead of pages (decision 0044)." }),
|
|
51
|
+
aggregates: ListAggregates.optional().meta({ description: "The fields that `GET /resources/{resource}/aggregate` sums and groups by (decision 0084). Without it, the resource has no aggregates." })
|
|
46
52
|
});
|
|
47
53
|
//#endregion
|
|
48
|
-
export { Column, Filter, ListCalendar, ListDefinition };
|
|
54
|
+
export { Column, Filter, ListAggregates, ListCalendar, ListDefinition };
|
|
49
55
|
|
|
50
56
|
//# sourceMappingURL=list.js.map
|
package/dist/schemas/list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","names":[],"sources":["../../src/schemas/list.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { Option } from './common';\n\nexport const Column = z\n .looseObject({\n field: z.string().min(1).optional().meta({ description: 'The field shown in the column.' }),\n id: z\n .string()\n .min(1)\n .optional()\n .meta({ description: 'Id of a column that is not a field.' }),\n label: z.string().optional(),\n display: z.string().optional().meta({ description: 'How the value is displayed.' }),\n sortable: z.boolean().optional(),\n width: z.union([z.number(), z.string()]).optional(),\n align: z.enum(['start', 'center', 'end']).optional(),\n hidden: z.boolean().optional().meta({\n description:\n 'Not shown by default: the user can show it from the columns of the list (decision 0042).',\n }),\n hideable: z.boolean().optional().meta({\n description:\n '`false`: always shown, the user can move it but not hide it. Columns are hideable by default.',\n }),\n })\n .refine((column) => column.field !== undefined || column.id !== undefined, {\n message: 'A column needs a `field` or an `id`.',\n });\n\nexport const Filter = z.looseObject({\n id: z\n .string()\n .min(1)\n .regex(/^(?!ids$)/, 'The filter id `ids` is reserved for the filter of every list on ids.')\n .meta({\n description:\n 'Sent as `filter[id]`. `ids` is reserved: every list has a filter on the ids of its items, `filter[ids][]` (decision 0069).',\n }),\n type: z.string().min(1).meta({\n description:\n 'Built-in: `text`, `select`, `toggle`, `date`, `date-range`, `relation`. A `date-range` value is the bounds of a range: `filter[id][from]` and `filter[id][to]`, days (`2026-01-31`), both inclusive and both optional.',\n }),\n label: z.string().optional(),\n options: z.array(Option).optional(),\n resource: z.string().optional(),\n multiple: z.boolean().optional(),\n default: z.unknown().optional(),\n});\n\nexport const ListCalendar = z.looseObject({\n field: z\n .string()\n .min(1)\n .meta({ description: 'The `date` or `datetime` field each item is shown on the day of.' }),\n filter: z.string().min(1).optional().meta({\n description:\n \"The id of the list's `date-range` filter on that field, through which the calendar asks for the days around a month. Defaults to the field's name.\",\n }),\n perPage: z.number().int().positive().optional().meta({\n description:\n 'How many items the calendar asks for a month, in one request. Defaults to 100.',\n }),\n});\n\nexport const ListDefinition = z.looseObject({\n columns: z.array(Column).optional(),\n filters: z.array(Filter).optional(),\n sorts: z\n .array(z.string().min(1))\n .optional()\n .meta({ description: 'Fields the list can be sorted by.' }),\n defaultSort: z\n .string()\n .optional()\n .meta({ description: 'Same format as the `sort` query parameter: `-published_at,title`.' }),\n search: z.boolean().optional().meta({ description: 'Whether the `q` parameter is supported.' }),\n layouts: z.array(z.string().min(1)).optional().meta({\n description:\n 'The layouts the list offers, the first being the default. Built in: `table`, `cards`, `gallery` (on the `itemImage` of the resource) and `calendar` (with `calendar`).',\n }),\n perPage: z.number().int().positive().optional(),\n perPageOptions: z.array(z.number().int().positive()).optional(),\n pagination: z.enum(['pages', 'cursor']).optional().meta({\n description:\n \"`pages` (the default): numbered pages, with a total. `cursor`: the list follows `nextCursor` of each page with the `cursor` parameter, without page numbers, for large lists that the backend can't count (decision 0039).\",\n }),\n inlineEdit: z.array(z.string().min(1)).optional().meta({\n description:\n 'Fields that columns edit in place, on items that can be updated: `text`, `number`, `select`, `boolean` and `date`. Each change is a `PATCH` with the one field and `If-Match` (decision 0043).',\n }),\n selectable: z.boolean().optional(),\n calendar: ListCalendar.optional().meta({\n description:\n 'The calendar of the list: the items of a month on the days of a date field, asked for through a `date-range` filter instead of pages (decision 0044).',\n }),\n});\n\nexport type Column = z.infer<typeof Column>;\nexport type Filter = z.infer<typeof Filter>;\nexport type ListDefinition = z.infer<typeof ListDefinition>;\nexport type ListCalendar = z.infer<typeof ListCalendar>;\n"],"mappings":";;;AAIA,IAAa,SAAS,EACjB,YAAY;CACT,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,aAAa,iCAAiC,CAAC;CAC1F,IAAI,EACC,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,SAAS,CAAC,CACV,KAAK,EAAE,aAAa,sCAAsC,CAAC;CAChE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS;CAC3B,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,aAAa,8BAA8B,CAAC;CAClF,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS;CAC/B,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS;CAClD,OAAO,EAAE,KAAK;EAAC;EAAS;EAAU;CAAK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AM,CAAC,CAAC,SAAS;CAClC,OAAO,EACF,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACxB,SAAS,CAAC,CACV,KAAK,EAAE,aAAa,oCAAoC,CAAC;CAC9D,aAAa,EACR,OAAO,CAAC,CACR,SAAS,CAAC,CACV,KAAK,EAAE,aAAa,oEAAoE,CAAC;CAC9F,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,aAAa,0CAA0C,CAAC;CAC9F,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAChD,aACI,yKACR,CAAC;CACD,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9C,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;CAC9D,YAAY,EAAE,KAAK,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EACpD,aACI,6NACR,CAAC;CACD,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EACnD,aACI,iMACR,CAAC;CACD,YAAY,EAAE,QAAQ,CAAC,CAAC,SAAS;CACjC,UAAU,aAAa,SAAS,CAAC,CAAC,KAAK,EACnC,aACI,wJACR,CAAC;AACL,CAAC"}
|
|
1
|
+
{"version":3,"file":"list.js","names":[],"sources":["../../src/schemas/list.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { Option } from './common';\n\nexport const Column = z\n .looseObject({\n field: z.string().min(1).optional().meta({ description: 'The field shown in the column.' }),\n id: z\n .string()\n .min(1)\n .optional()\n .meta({ description: 'Id of a column that is not a field.' }),\n label: z.string().optional(),\n display: z.string().optional().meta({ description: 'How the value is displayed.' }),\n sortable: z.boolean().optional(),\n width: z.union([z.number(), z.string()]).optional(),\n align: z.enum(['start', 'center', 'end']).optional(),\n hidden: z.boolean().optional().meta({\n description:\n 'Not shown by default: the user can show it from the columns of the list (decision 0042).',\n }),\n hideable: z.boolean().optional().meta({\n description:\n '`false`: always shown, the user can move it but not hide it. Columns are hideable by default.',\n }),\n })\n .refine((column) => column.field !== undefined || column.id !== undefined, {\n message: 'A column needs a `field` or an `id`.',\n });\n\nexport const Filter = z.looseObject({\n id: z\n .string()\n .min(1)\n .regex(/^(?!ids$)/, 'The filter id `ids` is reserved for the filter of every list on ids.')\n .meta({\n description:\n 'Sent as `filter[id]`. `ids` is reserved: every list has a filter on the ids of its items, `filter[ids][]` (decision 0069).',\n }),\n type: z.string().min(1).meta({\n description:\n 'Built-in: `text`, `select`, `toggle`, `date`, `date-range`, `relation`. A `date-range` value is the bounds of a range: `filter[id][from]` and `filter[id][to]`, days (`2026-01-31`), both inclusive and both optional.',\n }),\n label: z.string().optional(),\n options: z.array(Option).optional(),\n resource: z.string().optional(),\n multiple: z.boolean().optional(),\n default: z.unknown().optional(),\n});\n\nexport const ListCalendar = z.looseObject({\n field: z\n .string()\n .min(1)\n .meta({ description: 'The `date` or `datetime` field each item is shown on the day of.' }),\n filter: z.string().min(1).optional().meta({\n description:\n \"The id of the list's `date-range` filter on that field, through which the calendar asks for the days around a month. Defaults to the field's name.\",\n }),\n perPage: z.number().int().positive().optional().meta({\n description:\n 'How many items the calendar asks for a month, in one request. Defaults to 100.',\n }),\n});\n\nexport const ListAggregates = z\n .looseObject({\n sum: z.array(z.string().min(1)).optional().meta({\n description:\n 'Fields that can be summed (`measure=sum:{field}`): `number`, `range` and `duration` fields, and `money` fields of one `currency`.',\n }),\n groupBy: z.array(z.string().min(1)).optional().meta({\n description:\n 'Fields whose values the items can be grouped by, in a `breakdown` (`group={field}`).',\n }),\n dates: z.array(z.string().min(1)).optional().meta({\n description:\n '`date` and `datetime` fields whose days, weeks or months the items can be grouped by, in a `series` (`group={period}:{field}`).',\n }),\n })\n .meta({\n description:\n 'What `GET /resources/{resource}/aggregate` can count, sum and group by (decision 0084): nothing that is not declared.',\n });\n\nexport const ListDefinition = z.looseObject({\n columns: z.array(Column).optional(),\n filters: z.array(Filter).optional(),\n sorts: z\n .array(z.string().min(1))\n .optional()\n .meta({ description: 'Fields the list can be sorted by.' }),\n defaultSort: z\n .string()\n .optional()\n .meta({ description: 'Same format as the `sort` query parameter: `-published_at,title`.' }),\n search: z.boolean().optional().meta({ description: 'Whether the `q` parameter is supported.' }),\n layouts: z.array(z.string().min(1)).optional().meta({\n description:\n 'The layouts the list offers, the first being the default. Built in: `table`, `cards`, `gallery` (on the `itemImage` of the resource) and `calendar` (with `calendar`).',\n }),\n perPage: z.number().int().positive().optional(),\n perPageOptions: z.array(z.number().int().positive()).optional(),\n pagination: z.enum(['pages', 'cursor']).optional().meta({\n description:\n \"`pages` (the default): numbered pages, with a total. `cursor`: the list follows `nextCursor` of each page with the `cursor` parameter, without page numbers, for large lists that the backend can't count (decision 0039).\",\n }),\n inlineEdit: z.array(z.string().min(1)).optional().meta({\n description:\n 'Fields that columns edit in place, on items that can be updated: `text`, `number`, `select`, `boolean` and `date`. Each change is a `PATCH` with the one field and `If-Match` (decision 0043).',\n }),\n selectable: z.boolean().optional(),\n calendar: ListCalendar.optional().meta({\n description:\n 'The calendar of the list: the items of a month on the days of a date field, asked for through a `date-range` filter instead of pages (decision 0044).',\n }),\n aggregates: ListAggregates.optional().meta({\n description:\n 'The fields that `GET /resources/{resource}/aggregate` sums and groups by (decision 0084). Without it, the resource has no aggregates.',\n }),\n});\n\nexport type Column = z.infer<typeof Column>;\nexport type Filter = z.infer<typeof Filter>;\nexport type ListDefinition = z.infer<typeof ListDefinition>;\nexport type ListCalendar = z.infer<typeof ListCalendar>;\nexport type ListAggregates = z.infer<typeof ListAggregates>;\n"],"mappings":";;;AAIA,IAAa,SAAS,EACjB,YAAY;CACT,OAAO,EAA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