@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
|
@@ -41,6 +41,11 @@ export declare const Auth: z.ZodObject<{
|
|
|
41
41
|
passkeys: z.ZodOptional<z.ZodBoolean>;
|
|
42
42
|
emailVerification: z.ZodOptional<z.ZodBoolean>;
|
|
43
43
|
}, z.core.$loose>;
|
|
44
|
+
export declare const InterfaceLocale: z.ZodObject<{
|
|
45
|
+
locale: z.ZodString;
|
|
46
|
+
label: z.ZodString;
|
|
47
|
+
url: z.ZodString;
|
|
48
|
+
}, z.core.$loose>;
|
|
44
49
|
export declare const MenuItem: z.ZodObject<{
|
|
45
50
|
type: z.ZodString;
|
|
46
51
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -61,6 +66,37 @@ export declare const Page: z.ZodObject<{
|
|
|
61
66
|
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
62
67
|
params: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
63
68
|
abilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
69
|
+
widgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
70
|
+
id: z.ZodString;
|
|
71
|
+
type: z.ZodString;
|
|
72
|
+
label: z.ZodOptional<z.ZodString>;
|
|
73
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
76
|
+
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]>>]>>>;
|
|
77
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
78
|
+
group: z.ZodOptional<z.ZodString>;
|
|
79
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
81
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
82
|
+
}, z.core.$loose>>;
|
|
83
|
+
}, z.core.$loose>>>;
|
|
84
|
+
period: z.ZodOptional<z.ZodObject<{
|
|
85
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
86
|
+
"7d": "7d";
|
|
87
|
+
"30d": "30d";
|
|
88
|
+
"90d": "90d";
|
|
89
|
+
month: "month";
|
|
90
|
+
year: "year";
|
|
91
|
+
}>>;
|
|
92
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
93
|
+
"7d": "7d";
|
|
94
|
+
"30d": "30d";
|
|
95
|
+
"90d": "90d";
|
|
96
|
+
month: "month";
|
|
97
|
+
year: "year";
|
|
98
|
+
}>>;
|
|
99
|
+
}, z.core.$loose>>;
|
|
64
100
|
}, z.core.$loose>;
|
|
65
101
|
export declare const ContextOption: z.ZodObject<{
|
|
66
102
|
value: z.ZodString;
|
|
@@ -111,6 +147,11 @@ export declare const Definition: z.ZodObject<{
|
|
|
111
147
|
name: z.ZodString;
|
|
112
148
|
locale: z.ZodString;
|
|
113
149
|
locales: z.ZodArray<z.ZodString>;
|
|
150
|
+
interfaceLocales: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
151
|
+
locale: z.ZodString;
|
|
152
|
+
label: z.ZodString;
|
|
153
|
+
url: z.ZodString;
|
|
154
|
+
}, z.core.$loose>>>;
|
|
114
155
|
api: z.ZodObject<{
|
|
115
156
|
baseUrl: z.ZodString;
|
|
116
157
|
}, z.core.$loose>;
|
|
@@ -391,6 +432,11 @@ export declare const Definition: z.ZodObject<{
|
|
|
391
432
|
filter: z.ZodOptional<z.ZodString>;
|
|
392
433
|
perPage: z.ZodOptional<z.ZodNumber>;
|
|
393
434
|
}, z.core.$loose>>;
|
|
435
|
+
aggregates: z.ZodOptional<z.ZodObject<{
|
|
436
|
+
sum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
437
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
438
|
+
dates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
439
|
+
}, z.core.$loose>>;
|
|
394
440
|
}, z.core.$loose>>;
|
|
395
441
|
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
396
442
|
id: z.ZodString;
|
|
@@ -658,6 +704,43 @@ export declare const Definition: z.ZodObject<{
|
|
|
658
704
|
fields: z.ZodArray<typeof import("./field.js").Field>;
|
|
659
705
|
abilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
660
706
|
}, z.core.$loose>>>;
|
|
707
|
+
summary: z.ZodOptional<z.ZodObject<{
|
|
708
|
+
widgets: z.ZodArray<z.ZodObject<{
|
|
709
|
+
id: z.ZodString;
|
|
710
|
+
type: z.ZodString;
|
|
711
|
+
label: z.ZodOptional<z.ZodString>;
|
|
712
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
713
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
714
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
715
|
+
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]>>]>>>;
|
|
716
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
717
|
+
group: z.ZodOptional<z.ZodString>;
|
|
718
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
719
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
720
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
721
|
+
}, z.core.$loose>>;
|
|
722
|
+
}, z.core.$loose>>;
|
|
723
|
+
list: z.ZodOptional<z.ZodEnum<{
|
|
724
|
+
collapsed: "collapsed";
|
|
725
|
+
}>>;
|
|
726
|
+
period: z.ZodOptional<z.ZodObject<{
|
|
727
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
728
|
+
"7d": "7d";
|
|
729
|
+
"30d": "30d";
|
|
730
|
+
"90d": "90d";
|
|
731
|
+
month: "month";
|
|
732
|
+
year: "year";
|
|
733
|
+
}>>;
|
|
734
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
735
|
+
"7d": "7d";
|
|
736
|
+
"30d": "30d";
|
|
737
|
+
"90d": "90d";
|
|
738
|
+
month: "month";
|
|
739
|
+
year: "year";
|
|
740
|
+
}>>;
|
|
741
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
742
|
+
}, z.core.$loose>>;
|
|
743
|
+
}, z.core.$loose>>;
|
|
661
744
|
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
662
745
|
}, z.core.$loose>>;
|
|
663
746
|
pages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -667,6 +750,37 @@ export declare const Definition: z.ZodObject<{
|
|
|
667
750
|
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
668
751
|
params: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
669
752
|
abilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
753
|
+
widgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
754
|
+
id: z.ZodString;
|
|
755
|
+
type: z.ZodString;
|
|
756
|
+
label: z.ZodOptional<z.ZodString>;
|
|
757
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
758
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
759
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
760
|
+
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]>>]>>>;
|
|
761
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
762
|
+
group: z.ZodOptional<z.ZodString>;
|
|
763
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
764
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
765
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
766
|
+
}, z.core.$loose>>;
|
|
767
|
+
}, z.core.$loose>>>;
|
|
768
|
+
period: z.ZodOptional<z.ZodObject<{
|
|
769
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
770
|
+
"7d": "7d";
|
|
771
|
+
"30d": "30d";
|
|
772
|
+
"90d": "90d";
|
|
773
|
+
month: "month";
|
|
774
|
+
year: "year";
|
|
775
|
+
}>>;
|
|
776
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
777
|
+
"7d": "7d";
|
|
778
|
+
"30d": "30d";
|
|
779
|
+
"90d": "90d";
|
|
780
|
+
month: "month";
|
|
781
|
+
year: "year";
|
|
782
|
+
}>>;
|
|
783
|
+
}, z.core.$loose>>;
|
|
670
784
|
}, z.core.$loose>>>;
|
|
671
785
|
menus: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
672
786
|
type: z.ZodString;
|
|
@@ -715,8 +829,29 @@ export declare const Definition: z.ZodObject<{
|
|
|
715
829
|
settings: z.ZodOptional<z.ZodObject<{
|
|
716
830
|
resource: z.ZodOptional<z.ZodString>;
|
|
717
831
|
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]>>]>>>;
|
|
832
|
+
measure: z.ZodOptional<z.ZodString>;
|
|
833
|
+
group: z.ZodOptional<z.ZodString>;
|
|
834
|
+
target: z.ZodOptional<z.ZodNumber>;
|
|
835
|
+
period: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
836
|
+
followsList: z.ZodOptional<z.ZodBoolean>;
|
|
718
837
|
}, z.core.$loose>>;
|
|
719
838
|
}, z.core.$loose>>;
|
|
839
|
+
period: z.ZodOptional<z.ZodObject<{
|
|
840
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
841
|
+
"7d": "7d";
|
|
842
|
+
"30d": "30d";
|
|
843
|
+
"90d": "90d";
|
|
844
|
+
month: "month";
|
|
845
|
+
year: "year";
|
|
846
|
+
}>>;
|
|
847
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
848
|
+
"7d": "7d";
|
|
849
|
+
"30d": "30d";
|
|
850
|
+
"90d": "90d";
|
|
851
|
+
month: "month";
|
|
852
|
+
year: "year";
|
|
853
|
+
}>>;
|
|
854
|
+
}, z.core.$loose>>;
|
|
720
855
|
}, z.core.$loose>>;
|
|
721
856
|
search: z.ZodOptional<z.ZodObject<{
|
|
722
857
|
enabled: z.ZodBoolean;
|
|
@@ -823,6 +958,7 @@ export type User = z.infer<typeof User>;
|
|
|
823
958
|
export type AuthProvider = z.infer<typeof AuthProvider>;
|
|
824
959
|
export type AuthToken = z.infer<typeof AuthToken>;
|
|
825
960
|
export type Auth = z.infer<typeof Auth>;
|
|
961
|
+
export type InterfaceLocale = z.infer<typeof InterfaceLocale>;
|
|
826
962
|
export type MenuItem = z.infer<typeof MenuItem>;
|
|
827
963
|
export type Page = z.infer<typeof Page>;
|
|
828
964
|
export type ContextOption = z.infer<typeof ContextOption>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/schemas/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,IAAI;;;;;;;iBAUf,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;iBAQvB,CAAC;AAEH,eAAO,MAAM,SAAS;;;iBAGpB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;iBA0Cf,CAAC;AAEH,eAAO,MAAM,QAAQ;;;;;;;;;;;cAuBG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;iBAIjB,CAAC;AAElD,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/schemas/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,IAAI;;;;;;;iBAUf,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;iBAQvB,CAAC;AAEH,eAAO,MAAM,SAAS;;;iBAGpB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;iBA0Cf,CAAC;AAEH,eAAO,MAAM,eAAe;;;;iBAWkD,CAAC;AAE/E,eAAO,MAAM,QAAQ;;;;;;;;;;;cAuBG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;iBAIjB,CAAC;AAElD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2Bf,CAAC;AAEH,eAAO,MAAM,aAAa;;;;iBAMuC,CAAC;AAElE,eAAO,MAAM,YAAY;;;;;;;;;;;;;iBAqCoD,CAAC;AAE9E,eAAO,MAAM,iBAAiB;;;;;;;;;;;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AC,CAAC;AACxC,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACxD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAClD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AACxC,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC9D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AACxC,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACxD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAClE,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;AAC9C,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACpD,wEAAwE;AACxE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../version.js";
|
|
2
2
|
import { RESERVED_ROUTE_SEGMENTS } from "../constants.js";
|
|
3
3
|
import { Abilities, Id } from "./common.js";
|
|
4
|
+
import { OverviewPeriod, Widget } from "./widget.js";
|
|
4
5
|
import { Resource } from "./resource.js";
|
|
5
6
|
import { DefinitionTheme } from "./theme.js";
|
|
6
|
-
import { Widget } from "./widget.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
//#region src/schemas/definition.ts
|
|
9
9
|
var User = z.looseObject({
|
|
@@ -37,6 +37,11 @@ var Auth = z.looseObject({
|
|
|
37
37
|
passkeys: z.boolean().optional().meta({ description: "`panneau`: logins with a passkey (WebAuthn), which users add on the account page." }),
|
|
38
38
|
emailVerification: z.boolean().optional().meta({ description: "`panneau`: the backend refuses users whose email address isn't verified with a `403` problem of type `urn:panneau:problem:email-unverified`, and verifies it through `POST /auth/email/verification` and `POST /auth/email/verify`." })
|
|
39
39
|
});
|
|
40
|
+
var InterfaceLocale = z.looseObject({
|
|
41
|
+
locale: z.string().min(2).meta({ description: "BCP 47 locale of the interface." }),
|
|
42
|
+
label: z.string().meta({ description: "The name of the language in that language, such as \"Français\"." }),
|
|
43
|
+
url: z.string().min(1).meta({ description: "Where the browser goes to switch to this locale, with a full navigation. The app adds `next`, the path and query to come back to (decision 0083)." })
|
|
44
|
+
}).meta({ description: "A language the user can switch the interface to." });
|
|
40
45
|
var MenuItem = z.looseObject({
|
|
41
46
|
type: z.string().min(1).meta({ description: "Built-in: `resources`, `resource`, `page`, `link`, `separator`, `group`." }),
|
|
42
47
|
label: z.string().optional(),
|
|
@@ -58,7 +63,9 @@ var Page = z.looseObject({
|
|
|
58
63
|
label: z.string().optional(),
|
|
59
64
|
props: z.record(z.string(), z.unknown()).optional(),
|
|
60
65
|
params: z.array(z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/)).optional().meta({ description: "Names of the path segments after the page: `[\"id\"]` makes `{basePath}/pages/{page}/{id}`. The component gets them as `params`, and route references (`{ \"route\": \"<page>\", \"params\": { \"id\": … } }`) can link to the page. A page with `params` is not in menus." }),
|
|
61
|
-
abilities: Abilities.optional().meta({ description: "What the current user can do with the page (decision 0046). `view: false` leaves it out of menus, and its route shows a forbidden state; `pages.home` falls back to the built-in home. Without it, the page is allowed." })
|
|
66
|
+
abilities: Abilities.optional().meta({ description: "What the current user can do with the page (decision 0046). `view: false` leaves it out of menus, and its route shows a forbidden state; `pages.home` falls back to the built-in home. Without it, the page is allowed." }),
|
|
67
|
+
widgets: z.array(Widget).optional().meta({ description: "A page whose component is the built-in `dashboard`: its widgets for the user, in order (decision 0084), fed by `GET /dashboard/widgets/{widget}?page={page}`. On `pages.home`, they replace `dashboard.widgets`." }),
|
|
68
|
+
period: OverviewPeriod.optional().meta({ description: "A page whose component is the built-in `dashboard`: one period for its widgets (decision 0084). On `pages.home`, it replaces `dashboard.period`." })
|
|
62
69
|
});
|
|
63
70
|
var ContextOption = z.looseObject({
|
|
64
71
|
value: z.string().min(1),
|
|
@@ -90,13 +97,17 @@ var Definition = z.looseObject({
|
|
|
90
97
|
name: z.string(),
|
|
91
98
|
locale: z.string().min(2).meta({ description: "BCP 47 locale of the labels and messages." }),
|
|
92
99
|
locales: z.array(z.string().min(2)).min(1).meta({ description: "Locales of localized content fields." }),
|
|
100
|
+
interfaceLocales: z.array(InterfaceLocale).optional().meta({ description: "The languages of the interface, `locale` among them: with two or more, the shell has a switcher (decision 0083). Not the locales of the content, which are `locales`." }),
|
|
93
101
|
api: z.looseObject({ baseUrl: z.string() }),
|
|
94
102
|
resources: z.array(Resource),
|
|
95
103
|
pages: z.record(z.string(), Page).optional(),
|
|
96
104
|
menus: z.record(z.string(), z.array(MenuItem)).optional(),
|
|
97
105
|
routes: z.record(z.string(), z.string()).optional().meta({ description: "Named paths of the frontend, for `link` actions and redirects." }),
|
|
98
106
|
auth: Auth.optional(),
|
|
99
|
-
dashboard: z.looseObject({
|
|
107
|
+
dashboard: z.looseObject({
|
|
108
|
+
widgets: z.array(Widget),
|
|
109
|
+
period: OverviewPeriod.optional()
|
|
110
|
+
}).optional().meta({ description: "The widgets of the home page for the user, in order, when `pages.home` is the `dashboard` (decision 0064): the shorthand of `pages.home.widgets`, which wins when set." }),
|
|
100
111
|
search: z.looseObject({ enabled: z.boolean() }).optional(),
|
|
101
112
|
uploads: Uploads.optional(),
|
|
102
113
|
context: DefinitionContext.optional(),
|
|
@@ -142,6 +153,6 @@ var Definition = z.looseObject({
|
|
|
142
153
|
});
|
|
143
154
|
}).meta({ description: "Everything a frontend needs to render the admin for the current user." });
|
|
144
155
|
//#endregion
|
|
145
|
-
export { Auth, AuthProvider, AuthToken, ContextOption, ContextParam, Definition, DefinitionContext, MenuItem, Page, Uploads, User };
|
|
156
|
+
export { Auth, AuthProvider, AuthToken, ContextOption, ContextParam, Definition, DefinitionContext, InterfaceLocale, MenuItem, Page, Uploads, User };
|
|
146
157
|
|
|
147
158
|
//# sourceMappingURL=definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.js","names":[],"sources":["../../src/schemas/definition.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { RESERVED_ROUTE_SEGMENTS } from '../constants';\nimport { PROTOCOL_VERSION } from '../version';\nimport { Abilities, Id } from './common';\nimport { Resource } from './resource';\nimport { DefinitionTheme } from './theme';\nimport { Widget } from './widget';\n\nexport const User = z.looseObject({\n id: Id,\n name: z.string(),\n email: z.string().optional(),\n avatarUrl: z.string().optional(),\n abilities: Abilities.optional(),\n resource: z.string().nullable().optional().meta({\n description:\n 'The resource of users: its item with this `id` is the profile of the user. Without it, clients look for a resource `users`. `null` when the user has no item they can edit in a resource: clients show no link to a profile.',\n }),\n});\n\nexport const AuthProvider = z.looseObject({\n id: z.string().min(1),\n label: z.string(),\n url: z.string().optional().meta({\n description:\n 'Where the login with this provider starts, with a full navigation. The app adds `next`, the path to come back to.',\n }),\n icon: z.string().optional(),\n});\n\nexport const AuthToken = z.looseObject({\n label: z.string().optional().meta({ description: 'Label of the field. Defaults to \"Token\".' }),\n help: z.string().optional().meta({ description: 'Help under the field: where to find it.' }),\n});\n\nexport const Auth = z.looseObject({\n mode: z.enum(['panneau', 'external']).meta({\n description: \"`panneau`: Panneau's own login pages. `external`: the site handles login.\",\n }),\n loginUrl: z\n .string()\n .nullable()\n .optional()\n .meta({ description: '`external`: where unauthenticated users are sent.' }),\n logoutUrl: z.string().nullable().optional().meta({\n description:\n \"`external`: where the browser goes to log out, the site's own logout. Without it, the app offers no logout.\",\n }),\n password: z.boolean().optional().meta({\n description:\n '`panneau`: a login with an email and a password. Defaults to true without `token`.',\n }),\n token: AuthToken.optional().meta({\n description:\n '`panneau`: a login with a single secret, such as an access token, sent as `token` to `POST /auth/login`.',\n }),\n providers: z.array(AuthProvider).optional(),\n account: z.boolean().optional().meta({\n description:\n '`panneau`: the account page of the user, on `/account`: their name and email, their password, their two-factor authentication.',\n }),\n passwordReset: z.boolean().optional().meta({\n description:\n '`panneau`: a \"Forgot your password?\" link on the login page, through `POST /auth/password/forgot` and `POST /auth/password/reset`.',\n }),\n twoFactor: z.boolean().optional().meta({\n description:\n '`panneau`: two-factor authentication, which users set up through `/account/two-factor`, and which a password login asks for with a `202`.',\n }),\n passkeys: z.boolean().optional().meta({\n description:\n '`panneau`: logins with a passkey (WebAuthn), which users add on the account page.',\n }),\n emailVerification: z.boolean().optional().meta({\n description:\n \"`panneau`: the backend refuses users whose email address isn't verified with a `403` problem of type `urn:panneau:problem:email-unverified`, and verifies it through `POST /auth/email/verification` and `POST /auth/email/verify`.\",\n }),\n});\n\nexport const MenuItem = z\n .looseObject({\n type: z.string().min(1).meta({\n description: 'Built-in: `resources`, `resource`, `page`, `link`, `separator`, `group`.',\n }),\n label: z.string().optional(),\n icon: z.string().optional(),\n resource: z.string().optional(),\n page: z.string().optional(),\n url: z.string().optional(),\n external: z.boolean().optional(),\n collapsible: z.boolean().optional().meta({\n description:\n '`group` with a `label`: the user shows or hides its links, and the browser remembers it (decision 0079).',\n }),\n collapsed: z.boolean().optional().meta({\n description:\n '`group`: collapsible, and closed until the user opens it, unless it holds the current page.',\n }),\n emphasis: z.boolean().optional().meta({\n description: '`resource`, `page` or `link`: its label is bold, for the main entries.',\n }),\n // The return type is written out so that declaration files keep the recursion.\n get children(): z.ZodOptional<z.ZodArray<typeof MenuItem>> {\n return z.array(MenuItem).optional();\n },\n })\n .meta({ description: 'An entry of a menu.' });\n\nexport const Page = z.looseObject({\n component: z\n .string()\n .min(1)\n .meta({ description: 'A page provided by a plugin, or a built-in page.' }),\n path: z.string().optional().meta({ description: 'Path of a custom page.' }),\n label: z.string().optional(),\n props: z.record(z.string(), z.unknown()).optional(),\n params: z\n .array(z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/))\n .optional()\n .meta({\n description:\n 'Names of the path segments after the page: `[\"id\"]` makes `{basePath}/pages/{page}/{id}`. The component gets them as `params`, and route references (`{ \"route\": \"<page>\", \"params\": { \"id\": … } }`) can link to the page. A page with `params` is not in menus.',\n }),\n abilities: Abilities.optional().meta({\n description:\n 'What the current user can do with the page (decision 0046). `view: false` leaves it out of menus, and its route shows a forbidden state; `pages.home` falls back to the built-in home. Without it, the page is allowed.',\n }),\n});\n\nexport const ContextOption = z\n .looseObject({\n value: z.string().min(1),\n label: z.string(),\n description: z.string().optional(),\n })\n .meta({ description: 'A choice of a param of the context.' });\n\nexport const ContextParam = z\n .looseObject({\n name: z\n .string()\n .regex(\n new RegExp(`^(?!(?:${RESERVED_ROUTE_SEGMENTS.join('|')})$)[A-Za-z_][A-Za-z0-9_]*$`),\n )\n .meta({\n description:\n 'The name of the param, in the `Panneau-Context` header and in the client routes (`{basePath}/{name}/{value}/…`): an identifier, not a reserved first segment of the routes.',\n }),\n label: z.string(),\n required: z.boolean().optional().meta({\n description:\n 'Whether the app needs a value: without one, it shows a page to pick it in place of the page of the route.',\n }),\n fixed: z.boolean().optional().meta({\n description:\n 'The backend sets the value from the request, such as its domain: the app shows it without a picker, and leaves it out of the path and of the `Panneau-Context` header. Another value in the header is a `403` context problem. A fixed param has a `value`.',\n }),\n allLabel: z.string().optional().meta({\n description: 'An optional param: the label of no value, such as \"All clients\".',\n }),\n options: z.array(ContextOption).optional().meta({\n description:\n 'The choices, inline. Without them, the client searches them with `GET /context/{name}/options`.',\n }),\n value: z.string().min(1).nullable().optional().meta({\n description:\n 'The value the definition was built for: the one the client sent, checked, or the one the backend chose for a required param.',\n }),\n valueLabel: z\n .string()\n .nullable()\n .optional()\n .meta({ description: 'The label of `value`, for the picker.' }),\n })\n .meta({ description: 'A param of the current context (decision 0045).' });\n\nexport const DefinitionContext = z\n .looseObject({\n params: z.array(ContextParam).min(1).meta({\n description:\n 'In order: each param depends on the params before it. The params are the same whatever the values.',\n }),\n })\n .meta({\n description:\n 'The current context the user picks in the app, sent with every request in the `Panneau-Context` header (decision 0045).',\n });\n\nexport const Uploads = z.looseObject({\n mode: z.enum(['multipart', 'tus', 'presigned']).meta({\n description:\n '`multipart`: files go through `POST /media` and the requests that take them. `presigned`: the browser also sends files to storage itself, with URLs that `POST /uploads/sign` signs, then `POST /uploads/{upload}/complete` gives an upload that values reference.',\n }),\n endpoint: z.string().optional().meta({\n description:\n '`presigned`: the base URL of the upload routes, when they are not `{api.baseUrl}/uploads`.',\n }),\n maxSize: z.number().int().positive().optional(),\n});\n\nexport const Definition = z\n .looseObject({\n protocol: z.literal(PROTOCOL_VERSION),\n name: z.string(),\n locale: z\n .string()\n .min(2)\n .meta({ description: 'BCP 47 locale of the labels and messages.' }),\n locales: z\n .array(z.string().min(2))\n .min(1)\n .meta({ description: 'Locales of localized content fields.' }),\n api: z.looseObject({ baseUrl: z.string() }),\n resources: z.array(Resource),\n pages: z.record(z.string(), Page).optional(),\n menus: z.record(z.string(), z.array(MenuItem)).optional(),\n routes: z.record(z.string(), z.string()).optional().meta({\n description: 'Named paths of the frontend, for `link` actions and redirects.',\n }),\n auth: Auth.optional(),\n dashboard: z\n .looseObject({ widgets: z.array(Widget) })\n .optional()\n .meta({\n description:\n 'The widgets of the home page for the user, in order, when `pages.home` is the `dashboard` (decision 0064).',\n }),\n search: z.looseObject({ enabled: z.boolean() }).optional(),\n uploads: Uploads.optional(),\n context: DefinitionContext.optional(),\n theme: DefinitionTheme.optional(),\n user: User.nullable().optional(),\n })\n .superRefine((definition, context) => {\n const ids = new Set<string>();\n definition.resources.forEach((resource, index) => {\n if (ids.has(resource.id)) {\n context.addIssue({\n code: 'custom',\n message: `Duplicate resource id \\`${resource.id}\\`.`,\n path: ['resources', index, 'id'],\n });\n }\n ids.add(resource.id);\n });\n const names = new Set<string>();\n definition.context?.params.forEach((param, index) => {\n if (names.has(param.name)) {\n context.addIssue({\n code: 'custom',\n message: `Duplicate context param \\`${param.name}\\`.`,\n path: ['context', 'params', index, 'name'],\n });\n }\n names.add(param.name);\n if (param.fixed === true && (param.value ?? null) === null) {\n context.addIssue({\n code: 'custom',\n message: `The context param \\`${param.name}\\` is fixed without a value.`,\n path: ['context', 'params', index, 'value'],\n });\n }\n });\n })\n .meta({ description: 'Everything a frontend needs to render the admin for the current user.' });\n\nexport type User = z.infer<typeof User>;\nexport type AuthProvider = z.infer<typeof AuthProvider>;\nexport type AuthToken = z.infer<typeof AuthToken>;\nexport type Auth = z.infer<typeof Auth>;\nexport type MenuItem = z.infer<typeof MenuItem>;\nexport type Page = z.infer<typeof Page>;\nexport type ContextOption = z.infer<typeof ContextOption>;\nexport type ContextParam = z.infer<typeof ContextParam>;\nexport type DefinitionContext = z.infer<typeof DefinitionContext>;\nexport type Uploads = z.infer<typeof Uploads>;\nexport type Definition = z.infer<typeof Definition>;\n/** A definition as a backend writes it, before defaults are applied. */\nexport type DefinitionInput = z.input<typeof Definition>;\n"],"mappings":";;;;;;;;AASA,IAAa,OAAO,EAAE,YAAY;CAC9B,IAAI;CACJ,MAAM,EAAE,OAAO;CACf,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS;CAC3B,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,WAAW,UAAU,SAAS;CAC9B,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAC5C,aACI,+NACR,CAAC;AACL,CAAC;AAED,IAAa,eAAe,EAAE,YAAY;CACtC,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CACpB,OAAO,EA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YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;CACzD,SAAS,QAAQ,SAAS;CAC1B,SAAS,kBAAkB,SAAS;CACpC,OAAO,gBAAgB,SAAS;CAChC,MAAM,KAAK,SAAS,CAAC,CAAC,SAAS;AACnC,CAAC,CAAC,CACD,aAAa,YAAY,YAAY;CAClC,MAAM,sBAAM,IAAI,IAAY;CAC5B,WAAW,UAAU,SAAS,UAAU,UAAU;EAC9C,IAAI,IAAI,IAAI,SAAS,EAAE,GACnB,QAAQ,SAAS;GACb,MAAM;GACN,SAAS,2BAA2B,SAAS,GAAG;GAChD,MAAM;IAAC;IAAa;IAAO;GAAI;EACnC,CAAC;EAEL,IAAI,IAAI,SAAS,EAAE;CACvB,CAAC;CACD,MAAM,wBAAQ,IAAI,IAAY;CAC9B,WAAW,SAAS,OAAO,SAAS,OAAO,UAAU;EACjD,IAAI,MAAM,IAAI,MAAM,IAAI,GACpB,QAAQ,SAAS;GACb,MAAM;GACN,SAAS,6BAA6B,MAAM,KAAK;GACjD,MAAM;IAAC;IAAW;IAAU;IAAO;GAAM;EAC7C,CAAC;EAEL,MAAM,IAAI,MAAM,IAAI;EACpB,IAAI,MAAM,UAAU,SAAS,MAAM,SAAS,UAAU,MAClD,QAAQ,SAAS;GACb,MAAM;GACN,SAAS,uBAAuB,MAAM,KAAK;GAC3C,MAAM;IAAC;IAAW;IAAU;IAAO;GAAO;EAC9C,CAAC;CAET,CAAC;AACL,CAAC,CAAC,CACD,KAAK,EAAE,aAAa,wEAAwE,CAAC"}
|
|
1
|
+
{"version":3,"file":"definition.js","names":[],"sources":["../../src/schemas/definition.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { RESERVED_ROUTE_SEGMENTS } from '../constants';\nimport { PROTOCOL_VERSION } from '../version';\nimport { Abilities, Id } from './common';\nimport { Resource } from './resource';\nimport { DefinitionTheme } from './theme';\nimport { OverviewPeriod, Widget } from './widget';\n\nexport const User = z.looseObject({\n id: Id,\n name: z.string(),\n email: z.string().optional(),\n avatarUrl: z.string().optional(),\n abilities: Abilities.optional(),\n resource: z.string().nullable().optional().meta({\n description:\n 'The resource of users: its item with this `id` is the profile of the user. Without it, clients look for a resource `users`. `null` when the user has no item they can edit in a resource: clients show no link to a profile.',\n }),\n});\n\nexport const AuthProvider = z.looseObject({\n id: z.string().min(1),\n label: z.string(),\n url: z.string().optional().meta({\n description:\n 'Where the login with this provider starts, with a full navigation. The app adds `next`, the path to come back to.',\n }),\n icon: z.string().optional(),\n});\n\nexport const AuthToken = z.looseObject({\n label: z.string().optional().meta({ description: 'Label of the field. Defaults to \"Token\".' }),\n help: z.string().optional().meta({ description: 'Help under the field: where to find it.' }),\n});\n\nexport const Auth = z.looseObject({\n mode: z.enum(['panneau', 'external']).meta({\n description: \"`panneau`: Panneau's own login pages. `external`: the site handles login.\",\n }),\n loginUrl: z\n .string()\n .nullable()\n .optional()\n .meta({ description: '`external`: where unauthenticated users are sent.' }),\n logoutUrl: z.string().nullable().optional().meta({\n description:\n \"`external`: where the browser goes to log out, the site's own logout. Without it, the app offers no logout.\",\n }),\n password: z.boolean().optional().meta({\n description:\n '`panneau`: a login with an email and a password. Defaults to true without `token`.',\n }),\n token: AuthToken.optional().meta({\n description:\n '`panneau`: a login with a single secret, such as an access token, sent as `token` to `POST /auth/login`.',\n }),\n providers: z.array(AuthProvider).optional(),\n account: z.boolean().optional().meta({\n description:\n '`panneau`: the account page of the user, on `/account`: their name and email, their password, their two-factor authentication.',\n }),\n passwordReset: z.boolean().optional().meta({\n description:\n '`panneau`: a \"Forgot your password?\" link on the login page, through `POST /auth/password/forgot` and `POST /auth/password/reset`.',\n }),\n twoFactor: z.boolean().optional().meta({\n description:\n '`panneau`: two-factor authentication, which users set up through `/account/two-factor`, and which a password login asks for with a `202`.',\n }),\n passkeys: z.boolean().optional().meta({\n description:\n '`panneau`: logins with a passkey (WebAuthn), which users add on the account page.',\n }),\n emailVerification: z.boolean().optional().meta({\n description:\n \"`panneau`: the backend refuses users whose email address isn't verified with a `403` problem of type `urn:panneau:problem:email-unverified`, and verifies it through `POST /auth/email/verification` and `POST /auth/email/verify`.\",\n }),\n});\n\nexport const InterfaceLocale = z\n .looseObject({\n locale: z.string().min(2).meta({ description: 'BCP 47 locale of the interface.' }),\n label: z.string().meta({\n description: 'The name of the language in that language, such as \"Français\".',\n }),\n url: z.string().min(1).meta({\n description:\n 'Where the browser goes to switch to this locale, with a full navigation. The app adds `next`, the path and query to come back to (decision 0083).',\n }),\n })\n .meta({ description: 'A language the user can switch the interface to.' });\n\nexport const MenuItem = z\n .looseObject({\n type: z.string().min(1).meta({\n description: 'Built-in: `resources`, `resource`, `page`, `link`, `separator`, `group`.',\n }),\n label: z.string().optional(),\n icon: z.string().optional(),\n resource: z.string().optional(),\n page: z.string().optional(),\n url: z.string().optional(),\n external: z.boolean().optional(),\n collapsible: z.boolean().optional().meta({\n description:\n '`group` with a `label`: the user shows or hides its links, and the browser remembers it (decision 0079).',\n }),\n collapsed: z.boolean().optional().meta({\n description:\n '`group`: collapsible, and closed until the user opens it, unless it holds the current page.',\n }),\n emphasis: z.boolean().optional().meta({\n description: '`resource`, `page` or `link`: its label is bold, for the main entries.',\n }),\n // The return type is written out so that declaration files keep the recursion.\n get children(): z.ZodOptional<z.ZodArray<typeof MenuItem>> {\n return z.array(MenuItem).optional();\n },\n })\n .meta({ description: 'An entry of a menu.' });\n\nexport const Page = z.looseObject({\n component: z\n .string()\n .min(1)\n .meta({ description: 'A page provided by a plugin, or a built-in page.' }),\n path: z.string().optional().meta({ description: 'Path of a custom page.' }),\n label: z.string().optional(),\n props: z.record(z.string(), z.unknown()).optional(),\n params: z\n .array(z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/))\n .optional()\n .meta({\n description:\n 'Names of the path segments after the page: `[\"id\"]` makes `{basePath}/pages/{page}/{id}`. The component gets them as `params`, and route references (`{ \"route\": \"<page>\", \"params\": { \"id\": … } }`) can link to the page. A page with `params` is not in menus.',\n }),\n abilities: Abilities.optional().meta({\n description:\n 'What the current user can do with the page (decision 0046). `view: false` leaves it out of menus, and its route shows a forbidden state; `pages.home` falls back to the built-in home. Without it, the page is allowed.',\n }),\n widgets: z.array(Widget).optional().meta({\n description:\n 'A page whose component is the built-in `dashboard`: its widgets for the user, in order (decision 0084), fed by `GET /dashboard/widgets/{widget}?page={page}`. On `pages.home`, they replace `dashboard.widgets`.',\n }),\n period: OverviewPeriod.optional().meta({\n description:\n 'A page whose component is the built-in `dashboard`: one period for its widgets (decision 0084). On `pages.home`, it replaces `dashboard.period`.',\n }),\n});\n\nexport const ContextOption = z\n .looseObject({\n value: z.string().min(1),\n label: z.string(),\n description: z.string().optional(),\n })\n .meta({ description: 'A choice of a param of the context.' });\n\nexport const ContextParam = z\n .looseObject({\n name: z\n .string()\n .regex(\n new RegExp(`^(?!(?:${RESERVED_ROUTE_SEGMENTS.join('|')})$)[A-Za-z_][A-Za-z0-9_]*$`),\n )\n .meta({\n description:\n 'The name of the param, in the `Panneau-Context` header and in the client routes (`{basePath}/{name}/{value}/…`): an identifier, not a reserved first segment of the routes.',\n }),\n label: z.string(),\n required: z.boolean().optional().meta({\n description:\n 'Whether the app needs a value: without one, it shows a page to pick it in place of the page of the route.',\n }),\n fixed: z.boolean().optional().meta({\n description:\n 'The backend sets the value from the request, such as its domain: the app shows it without a picker, and leaves it out of the path and of the `Panneau-Context` header. Another value in the header is a `403` context problem. A fixed param has a `value`.',\n }),\n allLabel: z.string().optional().meta({\n description: 'An optional param: the label of no value, such as \"All clients\".',\n }),\n options: z.array(ContextOption).optional().meta({\n description:\n 'The choices, inline. Without them, the client searches them with `GET /context/{name}/options`.',\n }),\n value: z.string().min(1).nullable().optional().meta({\n description:\n 'The value the definition was built for: the one the client sent, checked, or the one the backend chose for a required param.',\n }),\n valueLabel: z\n .string()\n .nullable()\n .optional()\n .meta({ description: 'The label of `value`, for the picker.' }),\n })\n .meta({ description: 'A param of the current context (decision 0045).' });\n\nexport const DefinitionContext = z\n .looseObject({\n params: z.array(ContextParam).min(1).meta({\n description:\n 'In order: each param depends on the params before it. The params are the same whatever the values.',\n }),\n })\n .meta({\n description:\n 'The current context the user picks in the app, sent with every request in the `Panneau-Context` header (decision 0045).',\n });\n\nexport const Uploads = z.looseObject({\n mode: z.enum(['multipart', 'tus', 'presigned']).meta({\n description:\n '`multipart`: files go through `POST /media` and the requests that take them. `presigned`: the browser also sends files to storage itself, with URLs that `POST /uploads/sign` signs, then `POST /uploads/{upload}/complete` gives an upload that values reference.',\n }),\n endpoint: z.string().optional().meta({\n description:\n '`presigned`: the base URL of the upload routes, when they are not `{api.baseUrl}/uploads`.',\n }),\n maxSize: z.number().int().positive().optional(),\n});\n\nexport const Definition = z\n .looseObject({\n protocol: z.literal(PROTOCOL_VERSION),\n name: z.string(),\n locale: z\n .string()\n .min(2)\n .meta({ description: 'BCP 47 locale of the labels and messages.' }),\n locales: z\n .array(z.string().min(2))\n .min(1)\n .meta({ description: 'Locales of localized content fields.' }),\n interfaceLocales: z.array(InterfaceLocale).optional().meta({\n description:\n 'The languages of the interface, `locale` among them: with two or more, the shell has a switcher (decision 0083). Not the locales of the content, which are `locales`.',\n }),\n api: z.looseObject({ baseUrl: z.string() }),\n resources: z.array(Resource),\n pages: z.record(z.string(), Page).optional(),\n menus: z.record(z.string(), z.array(MenuItem)).optional(),\n routes: z.record(z.string(), z.string()).optional().meta({\n description: 'Named paths of the frontend, for `link` actions and redirects.',\n }),\n auth: Auth.optional(),\n dashboard: z\n .looseObject({ widgets: z.array(Widget), period: OverviewPeriod.optional() })\n .optional()\n .meta({\n description:\n 'The widgets of the home page for the user, in order, when `pages.home` is the `dashboard` (decision 0064): the shorthand of `pages.home.widgets`, which wins when set.',\n }),\n search: z.looseObject({ enabled: z.boolean() }).optional(),\n uploads: Uploads.optional(),\n context: DefinitionContext.optional(),\n theme: DefinitionTheme.optional(),\n user: User.nullable().optional(),\n })\n .superRefine((definition, context) => {\n const ids = new Set<string>();\n definition.resources.forEach((resource, index) => {\n if (ids.has(resource.id)) {\n context.addIssue({\n code: 'custom',\n message: `Duplicate resource id \\`${resource.id}\\`.`,\n path: ['resources', index, 'id'],\n });\n }\n ids.add(resource.id);\n });\n const names = new Set<string>();\n definition.context?.params.forEach((param, index) => {\n if (names.has(param.name)) {\n context.addIssue({\n code: 'custom',\n message: `Duplicate context param \\`${param.name}\\`.`,\n path: ['context', 'params', index, 'name'],\n });\n }\n names.add(param.name);\n if (param.fixed === true && (param.value ?? null) === null) {\n context.addIssue({\n code: 'custom',\n message: `The context param \\`${param.name}\\` is fixed without a value.`,\n path: ['context', 'params', index, 'value'],\n });\n }\n });\n })\n .meta({ description: 'Everything a frontend needs to render the admin for the current user.' });\n\nexport type User = z.infer<typeof User>;\nexport type AuthProvider = z.infer<typeof AuthProvider>;\nexport type AuthToken = z.infer<typeof AuthToken>;\nexport type Auth = z.infer<typeof Auth>;\nexport type InterfaceLocale = z.infer<typeof InterfaceLocale>;\nexport type MenuItem = z.infer<typeof MenuItem>;\nexport type Page = z.infer<typeof Page>;\nexport type ContextOption = z.infer<typeof ContextOption>;\nexport type ContextParam = z.infer<typeof ContextParam>;\nexport type DefinitionContext = z.infer<typeof DefinitionContext>;\nexport type Uploads = z.infer<typeof Uploads>;\nexport type Definition = z.infer<typeof Definition>;\n/** A definition as a backend writes it, before defaults are applied. */\nexport type DefinitionInput = z.input<typeof Definition>;\n"],"mappings":";;;;;;;;AASA,IAAa,OAAO,EAAE,YAAY;CAC9B,IAAI;CACJ,MAAM,EAAE,OAAO;CACf,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS;CAC3B,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,WAAW,UAAU,SAAS;CAC9B,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAC5C,aACI,+NACR,CAAC;AACL,CAAC;AAED,IAAa,eAAe,EAAE,YAAY;CACtC,IAAI,EAAE,OAAO,C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