@panneau/protocol 5.0.0-alpha.35 → 5.0.0-alpha.37
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 +9 -6
- package/dist/lint.d.ts.map +1 -1
- package/dist/lint.js +237 -15
- package/dist/lint.js.map +1 -1
- package/dist/mock/example.js +1 -1
- package/dist/mock/example.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 +89 -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/definition.d.ts +136 -0
- package/dist/schemas/definition.d.ts.map +1 -1
- package/dist/schemas/definition.js +15 -4
- package/dist/schemas/definition.js.map +1 -1
- package/dist/schemas/index.d.ts +287 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +13 -6
- 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 +98 -0
- package/dist/schemas/resource.d.ts.map +1 -1
- package/dist/schemas/resource.js +10 -2
- 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 +260 -66
- package/schema/definition.schema.json +260 -66
- package/schema/openapi.json +604 -8
package/dist/schemas/index.d.ts
CHANGED
|
@@ -555,6 +555,11 @@ export declare const namedSchemas: {
|
|
|
555
555
|
filter: z.ZodOptional<z.ZodString>;
|
|
556
556
|
perPage: z.ZodOptional<z.ZodNumber>;
|
|
557
557
|
}, z.core.$loose>;
|
|
558
|
+
ListAggregates: z.ZodObject<{
|
|
559
|
+
sum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
560
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
561
|
+
dates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
562
|
+
}, z.core.$loose>;
|
|
558
563
|
ListDefinition: z.ZodObject<{
|
|
559
564
|
columns: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
560
565
|
field: z.ZodOptional<z.ZodString>;
|
|
@@ -603,6 +608,11 @@ export declare const namedSchemas: {
|
|
|
603
608
|
filter: z.ZodOptional<z.ZodString>;
|
|
604
609
|
perPage: z.ZodOptional<z.ZodNumber>;
|
|
605
610
|
}, z.core.$loose>>;
|
|
611
|
+
aggregates: z.ZodOptional<z.ZodObject<{
|
|
612
|
+
sum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
613
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
614
|
+
dates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
615
|
+
}, z.core.$loose>>;
|
|
606
616
|
}, z.core.$loose>;
|
|
607
617
|
ActionScope: z.ZodEnum<{
|
|
608
618
|
resource: "resource";
|
|
@@ -886,6 +896,60 @@ export declare const namedSchemas: {
|
|
|
886
896
|
fields: z.ZodArray<typeof Field>;
|
|
887
897
|
abilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
888
898
|
}, z.core.$loose>;
|
|
899
|
+
SummaryPeriod: z.ZodObject<{
|
|
900
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
901
|
+
"7d": "7d";
|
|
902
|
+
"30d": "30d";
|
|
903
|
+
"90d": "90d";
|
|
904
|
+
month: "month";
|
|
905
|
+
year: "year";
|
|
906
|
+
}>>;
|
|
907
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
908
|
+
"7d": "7d";
|
|
909
|
+
"30d": "30d";
|
|
910
|
+
"90d": "90d";
|
|
911
|
+
month: "month";
|
|
912
|
+
year: "year";
|
|
913
|
+
}>>;
|
|
914
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
915
|
+
}, z.core.$loose>;
|
|
916
|
+
ResourceSummary: z.ZodObject<{
|
|
917
|
+
widgets: z.ZodArray<z.ZodObject<{
|
|
918
|
+
id: z.ZodString;
|
|
919
|
+
type: z.ZodString;
|
|
920
|
+
label: z.ZodOptional<z.ZodString>;
|
|
921
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
922
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
923
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
924
|
+
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]>>]>>>;
|
|
925
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
926
|
+
group: z.ZodOptional<z.ZodString>;
|
|
927
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
928
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
929
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
930
|
+
}, z.core.$loose>>;
|
|
931
|
+
}, z.core.$loose>>;
|
|
932
|
+
list: z.ZodOptional<z.ZodEnum<{
|
|
933
|
+
collapsed: "collapsed";
|
|
934
|
+
}>>;
|
|
935
|
+
period: z.ZodOptional<z.ZodObject<{
|
|
936
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
937
|
+
"7d": "7d";
|
|
938
|
+
"30d": "30d";
|
|
939
|
+
"90d": "90d";
|
|
940
|
+
month: "month";
|
|
941
|
+
year: "year";
|
|
942
|
+
}>>;
|
|
943
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
944
|
+
"7d": "7d";
|
|
945
|
+
"30d": "30d";
|
|
946
|
+
"90d": "90d";
|
|
947
|
+
month: "month";
|
|
948
|
+
year: "year";
|
|
949
|
+
}>>;
|
|
950
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
951
|
+
}, z.core.$loose>>;
|
|
952
|
+
}, z.core.$loose>;
|
|
889
953
|
Resource: z.ZodObject<{
|
|
890
954
|
id: z.ZodString;
|
|
891
955
|
kind: z.ZodOptional<z.ZodString>;
|
|
@@ -1163,6 +1227,11 @@ export declare const namedSchemas: {
|
|
|
1163
1227
|
filter: z.ZodOptional<z.ZodString>;
|
|
1164
1228
|
perPage: z.ZodOptional<z.ZodNumber>;
|
|
1165
1229
|
}, z.core.$loose>>;
|
|
1230
|
+
aggregates: z.ZodOptional<z.ZodObject<{
|
|
1231
|
+
sum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1232
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1233
|
+
dates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1234
|
+
}, z.core.$loose>>;
|
|
1166
1235
|
}, z.core.$loose>>;
|
|
1167
1236
|
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1168
1237
|
id: z.ZodString;
|
|
@@ -1430,6 +1499,43 @@ export declare const namedSchemas: {
|
|
|
1430
1499
|
fields: z.ZodArray<typeof Field>;
|
|
1431
1500
|
abilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1432
1501
|
}, z.core.$loose>>>;
|
|
1502
|
+
summary: z.ZodOptional<z.ZodObject<{
|
|
1503
|
+
widgets: z.ZodArray<z.ZodObject<{
|
|
1504
|
+
id: z.ZodString;
|
|
1505
|
+
type: z.ZodString;
|
|
1506
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1507
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1508
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
1509
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
1510
|
+
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]>>]>>>;
|
|
1511
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
1512
|
+
group: z.ZodOptional<z.ZodString>;
|
|
1513
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
1514
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
1515
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
1516
|
+
}, z.core.$loose>>;
|
|
1517
|
+
}, z.core.$loose>>;
|
|
1518
|
+
list: z.ZodOptional<z.ZodEnum<{
|
|
1519
|
+
collapsed: "collapsed";
|
|
1520
|
+
}>>;
|
|
1521
|
+
period: z.ZodOptional<z.ZodObject<{
|
|
1522
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
1523
|
+
"7d": "7d";
|
|
1524
|
+
"30d": "30d";
|
|
1525
|
+
"90d": "90d";
|
|
1526
|
+
month: "month";
|
|
1527
|
+
year: "year";
|
|
1528
|
+
}>>;
|
|
1529
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
1530
|
+
"7d": "7d";
|
|
1531
|
+
"30d": "30d";
|
|
1532
|
+
"90d": "90d";
|
|
1533
|
+
month: "month";
|
|
1534
|
+
year: "year";
|
|
1535
|
+
}>>;
|
|
1536
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
1537
|
+
}, z.core.$loose>>;
|
|
1538
|
+
}, z.core.$loose>>;
|
|
1433
1539
|
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1434
1540
|
}, z.core.$loose>;
|
|
1435
1541
|
User: z.ZodObject<{
|
|
@@ -1474,6 +1580,11 @@ export declare const namedSchemas: {
|
|
|
1474
1580
|
passkeys: z.ZodOptional<z.ZodBoolean>;
|
|
1475
1581
|
emailVerification: z.ZodOptional<z.ZodBoolean>;
|
|
1476
1582
|
}, z.core.$loose>;
|
|
1583
|
+
InterfaceLocale: z.ZodObject<{
|
|
1584
|
+
locale: z.ZodString;
|
|
1585
|
+
label: z.ZodString;
|
|
1586
|
+
url: z.ZodString;
|
|
1587
|
+
}, z.core.$loose>;
|
|
1477
1588
|
MenuItem: z.ZodObject<{
|
|
1478
1589
|
type: z.ZodString;
|
|
1479
1590
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -1494,10 +1605,62 @@ export declare const namedSchemas: {
|
|
|
1494
1605
|
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1495
1606
|
params: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1496
1607
|
abilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1608
|
+
widgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1609
|
+
id: z.ZodString;
|
|
1610
|
+
type: z.ZodString;
|
|
1611
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1612
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1613
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
1614
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
1615
|
+
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]>>]>>>;
|
|
1616
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
1617
|
+
group: z.ZodOptional<z.ZodString>;
|
|
1618
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
1619
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
1620
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
1621
|
+
}, z.core.$loose>>;
|
|
1622
|
+
}, z.core.$loose>>>;
|
|
1623
|
+
period: z.ZodOptional<z.ZodObject<{
|
|
1624
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
1625
|
+
"7d": "7d";
|
|
1626
|
+
"30d": "30d";
|
|
1627
|
+
"90d": "90d";
|
|
1628
|
+
month: "month";
|
|
1629
|
+
year: "year";
|
|
1630
|
+
}>>;
|
|
1631
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
1632
|
+
"7d": "7d";
|
|
1633
|
+
"30d": "30d";
|
|
1634
|
+
"90d": "90d";
|
|
1635
|
+
month: "month";
|
|
1636
|
+
year: "year";
|
|
1637
|
+
}>>;
|
|
1638
|
+
}, z.core.$loose>>;
|
|
1497
1639
|
}, z.core.$loose>;
|
|
1498
1640
|
WidgetSettings: z.ZodObject<{
|
|
1499
1641
|
resource: z.ZodOptional<z.ZodString>;
|
|
1500
1642
|
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]>>]>>>;
|
|
1643
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
1644
|
+
group: z.ZodOptional<z.ZodString>;
|
|
1645
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
1646
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
1647
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
1648
|
+
}, z.core.$loose>;
|
|
1649
|
+
OverviewPeriod: z.ZodObject<{
|
|
1650
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
1651
|
+
"7d": "7d";
|
|
1652
|
+
"30d": "30d";
|
|
1653
|
+
"90d": "90d";
|
|
1654
|
+
month: "month";
|
|
1655
|
+
year: "year";
|
|
1656
|
+
}>>;
|
|
1657
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
1658
|
+
"7d": "7d";
|
|
1659
|
+
"30d": "30d";
|
|
1660
|
+
"90d": "90d";
|
|
1661
|
+
month: "month";
|
|
1662
|
+
year: "year";
|
|
1663
|
+
}>>;
|
|
1501
1664
|
}, z.core.$loose>;
|
|
1502
1665
|
Widget: z.ZodObject<{
|
|
1503
1666
|
id: z.ZodString;
|
|
@@ -1507,6 +1670,11 @@ export declare const namedSchemas: {
|
|
|
1507
1670
|
settings: z.ZodOptional<z.ZodObject<{
|
|
1508
1671
|
resource: z.ZodOptional<z.ZodString>;
|
|
1509
1672
|
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]>>]>>>;
|
|
1673
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
1674
|
+
group: z.ZodOptional<z.ZodString>;
|
|
1675
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
1676
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
1677
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
1510
1678
|
}, z.core.$loose>>;
|
|
1511
1679
|
}, z.core.$loose>;
|
|
1512
1680
|
Uploads: z.ZodObject<{
|
|
@@ -1731,6 +1899,11 @@ export declare const namedSchemas: {
|
|
|
1731
1899
|
name: z.ZodString;
|
|
1732
1900
|
locale: z.ZodString;
|
|
1733
1901
|
locales: z.ZodArray<z.ZodString>;
|
|
1902
|
+
interfaceLocales: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1903
|
+
locale: z.ZodString;
|
|
1904
|
+
label: z.ZodString;
|
|
1905
|
+
url: z.ZodString;
|
|
1906
|
+
}, z.core.$loose>>>;
|
|
1734
1907
|
api: z.ZodObject<{
|
|
1735
1908
|
baseUrl: z.ZodString;
|
|
1736
1909
|
}, z.core.$loose>;
|
|
@@ -2011,6 +2184,11 @@ export declare const namedSchemas: {
|
|
|
2011
2184
|
filter: z.ZodOptional<z.ZodString>;
|
|
2012
2185
|
perPage: z.ZodOptional<z.ZodNumber>;
|
|
2013
2186
|
}, z.core.$loose>>;
|
|
2187
|
+
aggregates: z.ZodOptional<z.ZodObject<{
|
|
2188
|
+
sum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2189
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2190
|
+
dates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2191
|
+
}, z.core.$loose>>;
|
|
2014
2192
|
}, z.core.$loose>>;
|
|
2015
2193
|
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2016
2194
|
id: z.ZodString;
|
|
@@ -2278,6 +2456,43 @@ export declare const namedSchemas: {
|
|
|
2278
2456
|
fields: z.ZodArray<typeof Field>;
|
|
2279
2457
|
abilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
2280
2458
|
}, z.core.$loose>>>;
|
|
2459
|
+
summary: z.ZodOptional<z.ZodObject<{
|
|
2460
|
+
widgets: z.ZodArray<z.ZodObject<{
|
|
2461
|
+
id: z.ZodString;
|
|
2462
|
+
type: z.ZodString;
|
|
2463
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2464
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
2465
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
2466
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
2467
|
+
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]>>]>>>;
|
|
2468
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
2469
|
+
group: z.ZodOptional<z.ZodString>;
|
|
2470
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
2471
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
2472
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
2473
|
+
}, z.core.$loose>>;
|
|
2474
|
+
}, z.core.$loose>>;
|
|
2475
|
+
list: z.ZodOptional<z.ZodEnum<{
|
|
2476
|
+
collapsed: "collapsed";
|
|
2477
|
+
}>>;
|
|
2478
|
+
period: z.ZodOptional<z.ZodObject<{
|
|
2479
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
2480
|
+
"7d": "7d";
|
|
2481
|
+
"30d": "30d";
|
|
2482
|
+
"90d": "90d";
|
|
2483
|
+
month: "month";
|
|
2484
|
+
year: "year";
|
|
2485
|
+
}>>;
|
|
2486
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
2487
|
+
"7d": "7d";
|
|
2488
|
+
"30d": "30d";
|
|
2489
|
+
"90d": "90d";
|
|
2490
|
+
month: "month";
|
|
2491
|
+
year: "year";
|
|
2492
|
+
}>>;
|
|
2493
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
2494
|
+
}, z.core.$loose>>;
|
|
2495
|
+
}, z.core.$loose>>;
|
|
2281
2496
|
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2282
2497
|
}, z.core.$loose>>;
|
|
2283
2498
|
pages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -2287,6 +2502,37 @@ export declare const namedSchemas: {
|
|
|
2287
2502
|
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2288
2503
|
params: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2289
2504
|
abilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
2505
|
+
widgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2506
|
+
id: z.ZodString;
|
|
2507
|
+
type: z.ZodString;
|
|
2508
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2509
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
2510
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
2511
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
2512
|
+
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]>>]>>>;
|
|
2513
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
2514
|
+
group: z.ZodOptional<z.ZodString>;
|
|
2515
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
2516
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
2517
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
2518
|
+
}, z.core.$loose>>;
|
|
2519
|
+
}, z.core.$loose>>>;
|
|
2520
|
+
period: z.ZodOptional<z.ZodObject<{
|
|
2521
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
2522
|
+
"7d": "7d";
|
|
2523
|
+
"30d": "30d";
|
|
2524
|
+
"90d": "90d";
|
|
2525
|
+
month: "month";
|
|
2526
|
+
year: "year";
|
|
2527
|
+
}>>;
|
|
2528
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
2529
|
+
"7d": "7d";
|
|
2530
|
+
"30d": "30d";
|
|
2531
|
+
"90d": "90d";
|
|
2532
|
+
month: "month";
|
|
2533
|
+
year: "year";
|
|
2534
|
+
}>>;
|
|
2535
|
+
}, z.core.$loose>>;
|
|
2290
2536
|
}, z.core.$loose>>>;
|
|
2291
2537
|
menus: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
2292
2538
|
type: z.ZodString;
|
|
@@ -2335,8 +2581,29 @@ export declare const namedSchemas: {
|
|
|
2335
2581
|
settings: z.ZodOptional<z.ZodObject<{
|
|
2336
2582
|
resource: z.ZodOptional<z.ZodString>;
|
|
2337
2583
|
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]>>]>>>;
|
|
2584
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
2585
|
+
group: z.ZodOptional<z.ZodString>;
|
|
2586
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
2587
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
2588
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
2338
2589
|
}, z.core.$loose>>;
|
|
2339
2590
|
}, z.core.$loose>>;
|
|
2591
|
+
period: z.ZodOptional<z.ZodObject<{
|
|
2592
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
2593
|
+
"7d": "7d";
|
|
2594
|
+
"30d": "30d";
|
|
2595
|
+
"90d": "90d";
|
|
2596
|
+
month: "month";
|
|
2597
|
+
year: "year";
|
|
2598
|
+
}>>;
|
|
2599
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
2600
|
+
"7d": "7d";
|
|
2601
|
+
"30d": "30d";
|
|
2602
|
+
"90d": "90d";
|
|
2603
|
+
month: "month";
|
|
2604
|
+
year: "year";
|
|
2605
|
+
}>>;
|
|
2606
|
+
}, z.core.$loose>>;
|
|
2340
2607
|
}, z.core.$loose>>;
|
|
2341
2608
|
search: z.ZodOptional<z.ZodObject<{
|
|
2342
2609
|
enabled: z.ZodBoolean;
|
|
@@ -3069,6 +3336,7 @@ export declare const namedSchemas: {
|
|
|
3069
3336
|
help: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3070
3337
|
tone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3071
3338
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3339
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3072
3340
|
}, z.core.$loose>;
|
|
3073
3341
|
SeriesPoint: z.ZodObject<{
|
|
3074
3342
|
date: z.ZodString;
|
|
@@ -3076,9 +3344,9 @@ export declare const namedSchemas: {
|
|
|
3076
3344
|
}, z.core.$loose>;
|
|
3077
3345
|
SeriesWidgetData: z.ZodObject<{
|
|
3078
3346
|
period: z.ZodEnum<{
|
|
3347
|
+
month: "month";
|
|
3079
3348
|
day: "day";
|
|
3080
3349
|
week: "week";
|
|
3081
|
-
month: "month";
|
|
3082
3350
|
}>;
|
|
3083
3351
|
points: z.ZodArray<z.ZodObject<{
|
|
3084
3352
|
date: z.ZodString;
|
|
@@ -3110,6 +3378,24 @@ export declare const namedSchemas: {
|
|
|
3110
3378
|
empty: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3111
3379
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3112
3380
|
}, z.core.$loose>;
|
|
3381
|
+
BreakdownWidgetItem: z.ZodObject<{
|
|
3382
|
+
label: z.ZodString;
|
|
3383
|
+
value: z.ZodNumber;
|
|
3384
|
+
tone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3385
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3386
|
+
key: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3387
|
+
}, z.core.$loose>;
|
|
3388
|
+
BreakdownWidgetData: z.ZodObject<{
|
|
3389
|
+
items: z.ZodArray<z.ZodObject<{
|
|
3390
|
+
label: z.ZodString;
|
|
3391
|
+
value: z.ZodNumber;
|
|
3392
|
+
tone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3393
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3394
|
+
key: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3395
|
+
}, z.core.$loose>>;
|
|
3396
|
+
total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3397
|
+
other: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3398
|
+
}, z.core.$loose>;
|
|
3113
3399
|
};
|
|
3114
3400
|
/** A registry of the named schemas, used to reference them by name in generated files. */
|
|
3115
3401
|
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,
|
|
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,EAA8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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwGY,CAAC;AAEtC,0FAA0F;AAC1F,wBAAgB,oBAAoB;QACE,MAAM;4GAK3C"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -3,11 +3,11 @@ 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 {
|
|
10
|
-
import { Auth, AuthProvider, AuthToken, ContextOption, ContextParam, Definition, DefinitionContext, MenuItem, Page, Uploads, User } from "./definition.js";
|
|
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";
|
|
13
13
|
import { z } from "zod";
|
|
@@ -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,14 +42,18 @@ var namedSchemas = {
|
|
|
41
42
|
Action,
|
|
42
43
|
ResourceFeatures,
|
|
43
44
|
ResourceType,
|
|
45
|
+
SummaryPeriod,
|
|
46
|
+
ResourceSummary,
|
|
44
47
|
Resource,
|
|
45
48
|
User,
|
|
46
49
|
AuthProvider,
|
|
47
50
|
AuthToken,
|
|
48
51
|
Auth,
|
|
52
|
+
InterfaceLocale,
|
|
49
53
|
MenuItem,
|
|
50
54
|
Page,
|
|
51
55
|
WidgetSettings,
|
|
56
|
+
OverviewPeriod,
|
|
52
57
|
Widget,
|
|
53
58
|
Uploads,
|
|
54
59
|
ContextOption,
|
|
@@ -109,7 +114,9 @@ var namedSchemas = {
|
|
|
109
114
|
SeriesPoint,
|
|
110
115
|
SeriesWidgetData,
|
|
111
116
|
ListWidgetItem,
|
|
112
|
-
ListWidgetData
|
|
117
|
+
ListWidgetData,
|
|
118
|
+
BreakdownWidgetItem,
|
|
119
|
+
BreakdownWidgetData
|
|
113
120
|
};
|
|
114
121
|
/** A registry of the named schemas, used to reference them by name in generated files. */
|
|
115
122
|
function createSchemaRegistry() {
|
|
@@ -122,6 +129,6 @@ function createSchemaRegistry() {
|
|
|
122
129
|
return registry;
|
|
123
130
|
}
|
|
124
131
|
//#endregion
|
|
125
|
-
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, 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 };
|
|
126
133
|
|
|
127
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 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;CACl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'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,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,CAAC,CAAC,CAAC,SAAS;CACnD,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAChC,aACI,2FACR,CAAC;CACD,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAClC,aACI,gGACR,CAAC;AACL,CAAC,CAAC,CACD,QAAQ,WAAW,OAAO,UAAU,KAAA,KAAa,OAAO,OAAO,KAAA,GAAW,EACvE,SAAS,uCACb,CAAC;AAEL,IAAa,SAAS,EAAE,YAAY;CAChC,IAAI,EACC,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,MAAM,aAAa,sEAAsE,CAAC,CAC1F,KAAK,EACF,aACI,6HACR,CAAC;CACL,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EACzB,aACI,yNACR,CAAC;CACD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