@panneau/protocol 5.0.0-alpha.1 → 5.0.0-alpha.11

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.
Files changed (114) hide show
  1. package/README.md +10 -9
  2. package/dist/conditions.d.ts +1 -1
  3. package/dist/conformance/index.d.ts.map +1 -1
  4. package/dist/conformance/index.js +288 -9
  5. package/dist/conformance/index.js.map +1 -1
  6. package/dist/constants.d.ts +25 -2
  7. package/dist/constants.d.ts.map +1 -1
  8. package/dist/constants.js +58 -3
  9. package/dist/constants.js.map +1 -1
  10. package/dist/index.d.ts +4 -4
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +12 -7
  13. package/dist/libraries.d.ts +16 -0
  14. package/dist/libraries.d.ts.map +1 -0
  15. package/dist/libraries.js +15 -0
  16. package/dist/libraries.js.map +1 -0
  17. package/dist/lint.d.ts +4 -3
  18. package/dist/lint.d.ts.map +1 -1
  19. package/dist/lint.js +34 -2
  20. package/dist/lint.js.map +1 -1
  21. package/dist/mock/example.d.ts +3 -2
  22. package/dist/mock/example.d.ts.map +1 -1
  23. package/dist/mock/example.js +223 -142
  24. package/dist/mock/example.js.map +1 -1
  25. package/dist/mock/index.d.ts +19 -5
  26. package/dist/mock/index.d.ts.map +1 -1
  27. package/dist/mock/index.js +378 -18
  28. package/dist/mock/index.js.map +1 -1
  29. package/dist/openapi.d.ts +2 -0
  30. package/dist/openapi.d.ts.map +1 -1
  31. package/dist/openapi.js +112 -108
  32. package/dist/openapi.js.map +1 -1
  33. package/dist/problem.d.ts +1 -1
  34. package/dist/query.d.ts +14 -0
  35. package/dist/query.d.ts.map +1 -1
  36. package/dist/query.js +11 -1
  37. package/dist/query.js.map +1 -1
  38. package/dist/rules.d.ts +6 -3
  39. package/dist/rules.d.ts.map +1 -1
  40. package/dist/rules.js +50 -8
  41. package/dist/rules.js.map +1 -1
  42. package/dist/runtime/index.d.ts +13 -9
  43. package/dist/runtime/index.d.ts.map +1 -1
  44. package/dist/runtime/index.js +7 -3
  45. package/dist/schemas/action.d.ts +69 -10
  46. package/dist/schemas/action.d.ts.map +1 -1
  47. package/dist/schemas/action.js +20 -3
  48. package/dist/schemas/action.js.map +1 -1
  49. package/dist/schemas/api.d.ts +224 -39
  50. package/dist/schemas/api.d.ts.map +1 -1
  51. package/dist/schemas/api.js +124 -30
  52. package/dist/schemas/api.js.map +1 -1
  53. package/dist/schemas/boot.d.ts +24 -1
  54. package/dist/schemas/boot.d.ts.map +1 -1
  55. package/dist/schemas/boot.js +2 -1
  56. package/dist/schemas/boot.js.map +1 -1
  57. package/dist/schemas/common.d.ts +1 -0
  58. package/dist/schemas/common.d.ts.map +1 -1
  59. package/dist/schemas/common.js +2 -1
  60. package/dist/schemas/common.js.map +1 -1
  61. package/dist/schemas/definition.d.ts +222 -20
  62. package/dist/schemas/definition.d.ts.map +1 -1
  63. package/dist/schemas/definition.js +16 -11
  64. package/dist/schemas/definition.js.map +1 -1
  65. package/dist/schemas/field.d.ts +162 -2
  66. package/dist/schemas/field.d.ts.map +1 -1
  67. package/dist/schemas/field.js +69 -16
  68. package/dist/schemas/field.js.map +1 -1
  69. package/dist/schemas/index.d.ts +955 -63
  70. package/dist/schemas/index.d.ts.map +1 -1
  71. package/dist/schemas/index.js +37 -8
  72. package/dist/schemas/index.js.map +1 -1
  73. package/dist/schemas/jsonRules.d.ts +83 -0
  74. package/dist/schemas/jsonRules.d.ts.map +1 -0
  75. package/dist/schemas/jsonRules.js +46 -0
  76. package/dist/schemas/jsonRules.js.map +1 -0
  77. package/dist/schemas/layout.d.ts +1 -1
  78. package/dist/schemas/list.d.ts +6 -0
  79. package/dist/schemas/list.d.ts.map +1 -1
  80. package/dist/schemas/list.js +1 -0
  81. package/dist/schemas/list.js.map +1 -1
  82. package/dist/schemas/resource.d.ts +144 -14
  83. package/dist/schemas/resource.d.ts.map +1 -1
  84. package/dist/schemas/resource.js +6 -1
  85. package/dist/schemas/resource.js.map +1 -1
  86. package/dist/schemas/theme.d.ts +179 -0
  87. package/dist/schemas/theme.d.ts.map +1 -0
  88. package/dist/schemas/theme.js +66 -0
  89. package/dist/schemas/theme.js.map +1 -0
  90. package/dist/search.d.ts +51 -0
  91. package/dist/search.d.ts.map +1 -0
  92. package/dist/search.js +53 -0
  93. package/dist/search.js.map +1 -0
  94. package/dist/themes.d.ts +11 -0
  95. package/dist/themes.d.ts.map +1 -0
  96. package/dist/themes.js +80 -0
  97. package/dist/themes.js.map +1 -0
  98. package/dist/transforms.d.ts +17 -0
  99. package/dist/transforms.d.ts.map +1 -0
  100. package/dist/transforms.js +34 -0
  101. package/dist/transforms.js.map +1 -0
  102. package/dist/validate.d.ts +4 -3
  103. package/dist/validate.d.ts.map +1 -1
  104. package/dist/validate.js +22 -2
  105. package/dist/validate.js.map +1 -1
  106. package/dist/values.d.ts +5 -1
  107. package/dist/values.d.ts.map +1 -1
  108. package/dist/values.js +16 -2
  109. package/dist/values.js.map +1 -1
  110. package/package.json +7 -3
  111. package/schema/boot.schema.json +580 -16
  112. package/schema/definition.schema.json +577 -16
  113. package/schema/openapi.json +1815 -541
  114. package/schema/theme.schema.json +234 -0
@@ -13,10 +13,16 @@ var Pagination = z.looseObject({
13
13
  total: z.number().int().nonnegative(),
14
14
  lastPage: z.number().int().positive()
15
15
  });
16
+ var CursorPagination = z.looseObject({
17
+ perPage: z.number().int().positive(),
18
+ nextCursor: z.string().min(1).nullable().meta({ description: "The `cursor` of the next page, or `null` on the last page." }),
19
+ previousCursor: z.string().min(1).nullable().optional().meta({ description: "The `cursor` of the previous page, or `null` when it is the first page, which has none (and on the first page). Without it, clients go back through the cursors they followed." }),
20
+ total: z.number().int().nonnegative().nullable().optional().meta({ description: "How many items match, when the backend counts them." })
21
+ }).meta({ description: "The meta of a page of a list whose `pagination` is `cursor`: no page numbers, and no total unless the backend has one." });
16
22
  var ItemResponse = z.looseObject({ data: Item });
17
23
  var ListResponse = z.looseObject({
18
24
  data: z.array(Item),
19
- meta: Pagination
25
+ meta: z.union([Pagination, CursorPagination])
20
26
  });
21
27
  var Problem = z.looseObject({
22
28
  type: z.string().meta({ description: "A URI reference that identifies the problem type." }),
@@ -36,7 +42,8 @@ var Selection = z.union([z.looseObject({ ids: z.array(Id).min(1) }), z.looseObje
36
42
  })]);
37
43
  var ActionRequest = z.looseObject({
38
44
  selection: Selection.optional().meta({ description: "Omitted for actions on the whole resource." }),
39
- values: z.record(z.string(), z.unknown()).optional()
45
+ values: z.record(z.string(), z.unknown()).optional(),
46
+ dryRun: z.boolean().optional().meta({ description: "Answer what the action would do without running it: a `200` action result whose `summary` counts the items that would succeed and those that would be skipped. Only for actions with `dryRun: true`." })
40
47
  });
41
48
  var ActionItemResult = z.looseObject({
42
49
  id: Id,
@@ -85,56 +92,143 @@ var ActionRun = z.looseObject({
85
92
  var ActionRunResponse = z.looseObject({ run: ActionRun });
86
93
  var MediaTransform = z.looseObject({
87
94
  crop: z.looseObject({
88
- x: z.number(),
89
- y: z.number(),
90
- width: z.number(),
91
- height: z.number()
92
- }).optional().meta({ description: "In pixels of the original image." }),
95
+ x: z.number().int().nonnegative(),
96
+ y: z.number().int().nonnegative(),
97
+ width: z.number().int().positive(),
98
+ height: z.number().int().positive()
99
+ }).optional().meta({ description: "In whole pixels of the upright original image (after its EXIF orientation), from its top left corner." }),
93
100
  rotate: z.union([
94
101
  z.literal(0),
95
102
  z.literal(90),
96
103
  z.literal(180),
97
104
  z.literal(270)
98
- ]).optional(),
99
- flipX: z.boolean().optional(),
100
- flipY: z.boolean().optional(),
105
+ ]).optional().meta({ description: "Clockwise, in degrees." }),
106
+ flipX: z.boolean().optional().meta({ description: "Mirrors left to right (horizontal)." }),
107
+ flipY: z.boolean().optional().meta({ description: "Mirrors top to bottom (vertical)." }),
101
108
  focalPoint: z.looseObject({
102
109
  x: z.number().min(0).max(1),
103
110
  y: z.number().min(0).max(1)
104
- }).optional().meta({ description: "Relative to the width and height, from 0 to 1." })
105
- });
106
- var Media = Item.extend({
107
- type: z.string().meta({ description: "`image`, `video`, `audio`, `document`, `font`, or another type." }),
108
- name: z.string(),
109
- mime: z.string(),
110
- size: z.number().int().nonnegative(),
111
+ }).optional().meta({ description: "From 0 to 1, relative to the width and height of the upright original image, not of the crop: changing the crop does not move it. Renderers map it into the transformed image and clamp it to the crop." }),
112
+ base: z.enum(["media", "original"]).optional().meta({ description: "What a transform for one use starts from: the original file by default, or the media's own transform (`media`). With `media`, the crop and the focal point are relative to the media's version instead of the original (decision 0031)." }),
113
+ get baseTransform() {
114
+ return MediaTransform.optional().meta({ description: "With `base: \"media\"`: the media's own transform this one was made on. When the media's transform is no longer the same, clients ask to check the crop, and renderers clamp it." });
115
+ }
116
+ }).meta({ description: "Non-destructive edits of an image, applied in this order: crop, then rotate, then flip. Renderers ignore the keys they don't know, which editor tools can add." });
117
+ var UploadReference = z.looseObject({ upload: z.string().min(1) }).meta({ description: "A file uploaded directly to storage, by the id of its upload: in a file value, such as the `file` of a media, or an action parameter." });
118
+ var StoredFile = z.looseObject({
119
+ name: z.string().meta({ description: "The name of the file, as the user knows it." }),
120
+ url: z.string().nullable().optional().meta({ description: "Where to download it. A private file gets a temporary URL." }),
121
+ mime: z.string().nullable().optional(),
122
+ size: z.number().int().nonnegative().nullable().optional()
123
+ }).meta({ description: "A file stored by the backend: the value of a `file` field in items. Requests send it back to keep the file, `{ \"upload\" }` to replace it, or `null` to remove it." });
124
+ var Upload = z.looseObject({
125
+ id: z.string().min(1).meta({ description: "The id of the upload: `upl_…`." }),
126
+ key: z.string().optional().meta({ description: "The key of the object in storage." }),
127
+ name: z.string().optional(),
128
+ mime: z.string().optional(),
129
+ size: z.number().int().nonnegative().optional()
130
+ }).meta({ description: "A file the browser uploaded to storage, before it becomes a media, an import or another value." });
131
+ var UploadResponse = z.looseObject({ data: Upload });
132
+ var UploadSignRequest = z.looseObject({
133
+ method: z.enum([
134
+ "GET",
135
+ "POST",
136
+ "PUT",
137
+ "DELETE"
138
+ ]),
139
+ key: z.string().min(1),
140
+ uploadId: z.string().optional().meta({ description: "The S3 multipart upload." }),
141
+ partNumber: z.number().int().positive().optional(),
142
+ contentType: z.string().optional(),
143
+ expiresIn: z.number().int().positive().optional()
144
+ }).meta({ description: "A request of the browser's S3 client to sign (Uppy 6's `signRequest`)." });
145
+ var UploadSignResponse = z.looseObject({
111
146
  url: z.string(),
147
+ key: z.string().optional().meta({ description: "The key the backend chose, for the first request of a file." }),
148
+ headers: z.record(z.string(), z.string()).optional().meta({ description: "Headers the URL was signed with, which the browser sends." }),
149
+ upload: z.string().optional().meta({ description: "The upload the first request of a file created: `upl_…`." })
150
+ }).meta({ description: "A presigned request." });
151
+ var MediaInfo = z.looseObject({
152
+ type: z.string().meta({ description: "`image`, `video`, `audio`, `document`, `font`, or another type the backend knows." }),
153
+ mime: z.string().nullable().optional(),
154
+ size: z.number().int().nonnegative().nullable().optional(),
155
+ url: z.string().nullable().optional().meta({ description: "The main file to show or play: a rendition, or the original until it exists." }),
112
156
  thumbnailUrl: z.string().nullable().optional(),
113
157
  variants: z.record(z.string(), z.looseObject({
114
158
  url: z.string(),
115
159
  width: z.number().optional(),
116
160
  height: z.number().optional()
117
- })).optional(),
161
+ })).optional().meta({ description: "Named renditions: sizes of an image, qualities of a video." }),
162
+ width: z.number().nullable().optional(),
163
+ height: z.number().nullable().optional(),
164
+ duration: z.number().nullable().optional().meta({ description: "In seconds." }),
165
+ status: z.enum([
166
+ "pending",
167
+ "processing",
168
+ "ready",
169
+ "failed"
170
+ ]).optional().meta({ description: "Where the processing of the file is: `pending` and `processing` until its renditions are made, then `ready` or `failed`. Without it, the media is ready." }),
171
+ error: z.looseObject({
172
+ code: z.string().meta({ description: "The code of the step that failed, such as a transcoder task code (`timeout`, `input_unreadable`)." }),
173
+ message: z.string().optional().meta({ description: "Why it failed, for people." })
174
+ }).nullable().optional().meta({ description: "Why the processing failed, when `status` is `failed`, so that editors see it without the backend's monitoring." }),
118
175
  metadata: z.record(z.string(), z.unknown()).optional(),
119
- transform: MediaTransform.nullable().optional(),
120
- tags: z.array(z.string()).optional()
121
- });
122
- var MediaResponse = z.looseObject({ data: Media });
123
- var MediaListResponse = z.looseObject({
124
- data: z.array(Media),
125
- meta: Pagination
126
- });
176
+ transform: MediaTransform.nullable().optional().meta({ description: "The media's own transform, from its library, which clients need to draw a transform for one use made over it (decision 0031)." })
177
+ }).meta({ description: "What the backend computed about the file of a media item: the `media` of the items of a `media` resource, and of the values of `media` fields. Read-only: the editable properties of a media are the fields of its resource." });
178
+ var MediaItem = Item.extend({ media: MediaInfo }).meta({ description: "An item of a resource of kind `media`: the values of its fields (`file`, the original, and those of the project), and the `media` the backend computed." });
179
+ var MediaReference = z.looseObject({
180
+ id: Id,
181
+ resource: z.string().optional().meta({ description: "The library of the media. Required for a field that allows several libraries, since ids are unique only within their resource (decision 0027)." }),
182
+ label: z.string().optional().meta({ description: "The `itemTitle` of the media." }),
183
+ media: MediaInfo.optional(),
184
+ transform: MediaTransform.nullable().optional().meta({ description: "The edits of the image for this use only: from the original file, or over the media's own transform with `base: \"media\"`." })
185
+ }).meta({ description: "The value of a `media` or `image` field in items: the media, with what lists and fields show, and its edits for this use. Requests send the id, or `{ id, resource, transform }`: `resource` is required when the field allows several libraries." });
186
+ var FieldCheckRequest = z.looseObject({
187
+ value: z.string().meta({ description: "The value to check, as it is typed." }),
188
+ locale: z.string().optional().meta({ description: "The locale of the value, for a localized field." }),
189
+ id: Id.nullable().optional().meta({ description: "The item being edited, or null when creating one." }),
190
+ values: z.record(z.string(), z.unknown()).optional().meta({ description: "The form's current values, as they would be sent to save, for what the check depends on (a page's parent)." })
191
+ }).meta({ description: "A value of a field with `check`, to check with the backend." });
192
+ var FieldCheckResponse = z.looseObject({
193
+ available: z.boolean().meta({ description: "Whether no other item of the resource, in its scope and the same locale, has the value." }),
194
+ suggestion: z.string().nullable().optional().meta({ description: "An available value close to the one checked, when it is taken." }),
195
+ prefix: z.string().nullable().optional().meta({ description: "What the field shows in front of the value: the start of its URL." }),
196
+ url: z.string().nullable().optional().meta({ description: "The URL the value gives the item, which the field links to." }),
197
+ disabled: z.boolean().optional().meta({ description: "The field doesn't apply to this item (the home page has no slug): the field is read-only." })
198
+ }).meta({ description: "What the backend says about a value: not authoritative, since saving still validates it." });
127
199
  var Session = z.looseObject({ user: User });
128
200
  var SearchResponse = z.looseObject({ data: z.array(z.looseObject({
129
- resource: z.string(),
201
+ resource: z.string().meta({ description: "The id of the resource." }),
130
202
  items: z.array(Item),
131
- total: z.number().int().nonnegative().optional()
132
- })) });
203
+ total: z.number().int().nonnegative().optional().meta({ description: "How many items of the resource match, when the backend counts them: the list of the resource, searched, shows them all." })
204
+ })) }).meta({ description: "The results of the global search: the resources with results, in the order of the definition." });
133
205
  var PreviewResponse = z.looseObject({
134
206
  url: z.string(),
135
207
  expiresAt: z.string().optional()
136
208
  });
209
+ var EmbedValue = z.looseObject({
210
+ url: z.string().meta({ description: "The URL of the video, sound or post." }),
211
+ type: z.enum([
212
+ "video",
213
+ "audio",
214
+ "photo",
215
+ "rich",
216
+ "link"
217
+ ]).optional(),
218
+ title: z.string().optional(),
219
+ provider: z.string().optional().meta({ description: "The name of the provider." }),
220
+ thumbnailUrl: z.string().optional(),
221
+ html: z.string().optional().meta({ description: "The HTML that embeds it, from the oEmbed of its provider." }),
222
+ width: z.number().optional(),
223
+ height: z.number().optional()
224
+ }).meta({ description: "The value of an `embed` field: its URL, and what the backend got from its oEmbed." });
225
+ var EmbedResponse = z.looseObject({ data: EmbedValue });
226
+ var LocationValue = z.looseObject({
227
+ lat: z.number().min(-90).max(90),
228
+ lng: z.number().min(-180).max(180),
229
+ address: z.string().optional()
230
+ }).meta({ description: "The value of a `location` field: a point, and its address." });
137
231
  //#endregion
138
- export { ActionItemResult, ActionRequest, ActionResult, ActionRun, ActionRunResponse, Item, ItemResponse, ListResponse, Media, MediaListResponse, MediaResponse, MediaTransform, Pagination, PreviewResponse, Problem, SearchResponse, Selection, Session };
232
+ export { ActionItemResult, ActionRequest, ActionResult, ActionRun, ActionRunResponse, CursorPagination, EmbedResponse, EmbedValue, FieldCheckRequest, FieldCheckResponse, Item, ItemResponse, ListResponse, LocationValue, MediaInfo, MediaItem, MediaReference, MediaTransform, Pagination, PreviewResponse, Problem, SearchResponse, Selection, Session, StoredFile, Upload, UploadReference, UploadResponse, UploadSignRequest, UploadSignResponse };
139
233
 
140
234
  //# sourceMappingURL=api.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","names":[],"sources":["../../src/schemas/api.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { Abilities, Id, RouteReference } from './common';\nimport { User } from './definition';\n\nexport const Item = z\n .looseObject({\n id: Id,\n version: z.string().nullable().meta({\n description: 'Changes on every update. `null` when the backend has no versions.',\n }),\n abilities: Abilities,\n })\n .meta({\n description: 'An item of a resource. Its other properties are the values of its fields.',\n });\n\nexport const Pagination = z.looseObject({\n page: z.number().int().positive(),\n perPage: z.number().int().positive(),\n total: z.number().int().nonnegative(),\n lastPage: z.number().int().positive(),\n});\n\nexport const ItemResponse = z.looseObject({ data: Item });\n\nexport const ListResponse = z.looseObject({ data: z.array(Item), meta: Pagination });\n\nexport const Problem = z\n .looseObject({\n type: z.string().meta({ description: 'A URI reference that identifies the problem type.' }),\n title: z.string(),\n status: z.number().int().min(400).max(599),\n detail: z.string().optional(),\n instance: z.string().optional(),\n errors: z\n .record(z.string(), z.array(z.string()))\n .optional()\n .meta({ description: '`422`: messages keyed by the dot path of the invalid value.' }),\n current: Item.optional().meta({ description: '`412`: the current version of the item.' }),\n })\n .meta({ description: 'An error, as RFC 9457 problem details (`application/problem+json`).' });\n\nexport const Selection = z.union([\n z.looseObject({ ids: z.array(Id).min(1) }),\n z.looseObject({\n query: z.looseObject({\n filter: z.record(z.string(), z.unknown()).optional().meta({\n description:\n 'The `filter` of the list query, by filter id: a value, a list of values, or the bounds of a range (`{ \"from\": \"2026-01-01\", \"to\": \"2026-01-31\" }`).',\n }),\n q: z.string().optional(),\n }),\n except: z.array(Id).optional(),\n }),\n]);\n\nexport const ActionRequest = z.looseObject({\n selection: Selection.optional().meta({\n description: 'Omitted for actions on the whole resource.',\n }),\n values: z.record(z.string(), z.unknown()).optional(),\n});\n\nexport const ActionItemResult = z.looseObject({\n id: Id,\n status: z.enum(['failed', 'skipped']),\n message: z.string().optional(),\n reason: z\n .string()\n .optional()\n .meta({ description: '`skipped`: `forbidden`, `not_found` or `unchanged`.' }),\n});\n\nexport const ActionResult = z.looseObject({\n message: z.string().optional(),\n summary: z\n .looseObject({\n succeeded: z.number().int().nonnegative(),\n failed: z.number().int().nonnegative(),\n skipped: z.number().int().nonnegative(),\n })\n .optional(),\n results: z\n .array(ActionItemResult)\n .optional()\n .meta({ description: 'The items that did not succeed.' }),\n refresh: z.enum(['none', 'items', 'list']).optional(),\n redirect: z.union([z.string(), RouteReference]).nullable().optional(),\n download: z\n .looseObject({\n url: z.string(),\n filename: z.string().optional(),\n expiresAt: z.string().optional(),\n })\n .nullable()\n .optional(),\n});\n\nexport const ActionRun = z.looseObject({\n id: Id,\n action: z.string(),\n resource: z.string(),\n status: z.enum(['queued', 'running', 'succeeded', 'partial', 'failed', 'cancelled']),\n progress: z.number().int().nonnegative(),\n total: z.number().int().nonnegative().nullable(),\n result: ActionResult.optional().meta({ description: 'Set once the run has finished.' }),\n createdAt: z.string().optional(),\n finishedAt: z.string().nullable().optional(),\n});\n\nexport const ActionRunResponse = z.looseObject({ run: ActionRun });\n\nexport const MediaTransform = z.looseObject({\n crop: z\n .looseObject({ x: z.number(), y: z.number(), width: z.number(), height: z.number() })\n .optional()\n .meta({ description: 'In pixels of the original image.' }),\n rotate: z.union([z.literal(0), z.literal(90), z.literal(180), z.literal(270)]).optional(),\n flipX: z.boolean().optional(),\n flipY: z.boolean().optional(),\n focalPoint: z\n .looseObject({ x: z.number().min(0).max(1), y: z.number().min(0).max(1) })\n .optional()\n .meta({ description: 'Relative to the width and height, from 0 to 1.' }),\n});\n\nexport const Media = Item.extend({\n type: z\n .string()\n .meta({ description: '`image`, `video`, `audio`, `document`, `font`, or another type.' }),\n name: z.string(),\n mime: z.string(),\n size: z.number().int().nonnegative(),\n url: z.string(),\n thumbnailUrl: z.string().nullable().optional(),\n variants: z\n .record(\n z.string(),\n z.looseObject({\n url: z.string(),\n width: z.number().optional(),\n height: z.number().optional(),\n }),\n )\n .optional(),\n metadata: z.record(z.string(), z.unknown()).optional(),\n transform: MediaTransform.nullable().optional(),\n tags: z.array(z.string()).optional(),\n});\n\nexport const MediaResponse = z.looseObject({ data: Media });\n\nexport const MediaListResponse = z.looseObject({ data: z.array(Media), meta: Pagination });\n\nexport const Session = z.looseObject({ user: User });\n\nexport const SearchResponse = z.looseObject({\n data: z.array(\n z.looseObject({\n resource: z.string(),\n items: z.array(Item),\n total: z.number().int().nonnegative().optional(),\n }),\n ),\n});\n\nexport const PreviewResponse = z.looseObject({ url: z.string(), expiresAt: z.string().optional() });\n\nexport type Item = z.infer<typeof Item>;\nexport type Pagination = z.infer<typeof Pagination>;\nexport type ItemResponse = z.infer<typeof ItemResponse>;\nexport type ListResponse = z.infer<typeof ListResponse>;\nexport type Problem = z.infer<typeof Problem>;\nexport type Selection = z.infer<typeof Selection>;\nexport type ActionRequest = z.infer<typeof ActionRequest>;\nexport type ActionItemResult = z.infer<typeof ActionItemResult>;\nexport type ActionResult = z.infer<typeof ActionResult>;\nexport type ActionRun = z.infer<typeof ActionRun>;\nexport type ActionRunResponse = z.infer<typeof ActionRunResponse>;\nexport type MediaTransform = z.infer<typeof MediaTransform>;\nexport type Media = z.infer<typeof Media>;\nexport type MediaResponse = z.infer<typeof MediaResponse>;\nexport type MediaListResponse = z.infer<typeof MediaListResponse>;\nexport type Session = z.infer<typeof Session>;\nexport type SearchResponse = z.infer<typeof SearchResponse>;\nexport type PreviewResponse = z.infer<typeof PreviewResponse>;\n"],"mappings":";;;;AAKA,IAAa,OAAO,EACf,YAAY;CACT,IAAI;CACJ,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC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AM,IAAI;CACnB,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS;AACnD,CAAC,CACL,EACJ,CAAC;AAED,IAAa,kBAAkB,EAAE,YAAY;CAAE,KAAK,EAAE,OAAO;CAAG,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;AAAE,CAAC"}
1
+ {"version":3,"file":"api.js","names":[],"sources":["../../src/schemas/api.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { Abilities, Id, RouteReference } from './common';\nimport { User } from './definition';\n\nexport const Item = z\n .looseObject({\n id: Id,\n version: z.string().nullable().meta({\n description: 'Changes on every update. `null` when the backend has no versions.',\n }),\n abilities: Abilities,\n })\n .meta({\n description: 'An item of a resource. Its other properties are the values of its fields.',\n });\n\nexport const Pagination = z.looseObject({\n page: z.number().int().positive(),\n perPage: z.number().int().positive(),\n total: z.number().int().nonnegative(),\n lastPage: z.number().int().positive(),\n});\n\nexport const CursorPagination = z\n .looseObject({\n perPage: z.number().int().positive(),\n nextCursor: z.string().min(1).nullable().meta({\n description: 'The `cursor` of the next page, or `null` on the last page.',\n }),\n previousCursor: z.string().min(1).nullable().optional().meta({\n description:\n 'The `cursor` of the previous page, or `null` when it is the first page, which has none (and on the first page). Without it, clients go back through the cursors they followed.',\n }),\n total: z.number().int().nonnegative().nullable().optional().meta({\n description: 'How many items match, when the backend counts them.',\n }),\n })\n .meta({\n description:\n 'The meta of a page of a list whose `pagination` is `cursor`: no page numbers, and no total unless the backend has one.',\n });\n\nexport const ItemResponse = z.looseObject({ data: Item });\n\nexport const ListResponse = z.looseObject({\n data: z.array(Item),\n meta: z.union([Pagination, CursorPagination]),\n});\n\nexport const Problem = z\n .looseObject({\n type: z.string().meta({ description: 'A URI reference that identifies the problem type.' }),\n title: z.string(),\n status: z.number().int().min(400).max(599),\n detail: z.string().optional(),\n instance: z.string().optional(),\n errors: z\n .record(z.string(), z.array(z.string()))\n .optional()\n .meta({ description: '`422`: messages keyed by the dot path of the invalid value.' }),\n current: Item.optional().meta({ description: '`412`: the current version of the item.' }),\n })\n .meta({ description: 'An error, as RFC 9457 problem details (`application/problem+json`).' });\n\nexport const Selection = z.union([\n z.looseObject({ ids: z.array(Id).min(1) }),\n z.looseObject({\n query: z.looseObject({\n filter: z.record(z.string(), z.unknown()).optional().meta({\n description:\n 'The `filter` of the list query, by filter id: a value, a list of values, or the bounds of a range (`{ \"from\": \"2026-01-01\", \"to\": \"2026-01-31\" }`).',\n }),\n q: z.string().optional(),\n }),\n except: z.array(Id).optional(),\n }),\n]);\n\nexport const ActionRequest = z.looseObject({\n selection: Selection.optional().meta({\n description: 'Omitted for actions on the whole resource.',\n }),\n values: z.record(z.string(), z.unknown()).optional(),\n dryRun: z.boolean().optional().meta({\n description:\n 'Answer what the action would do without running it: a `200` action result whose `summary` counts the items that would succeed and those that would be skipped. Only for actions with `dryRun: true`.',\n }),\n});\n\nexport const ActionItemResult = z.looseObject({\n id: Id,\n status: z.enum(['failed', 'skipped']),\n message: z.string().optional(),\n reason: z\n .string()\n .optional()\n .meta({ description: '`skipped`: `forbidden`, `not_found` or `unchanged`.' }),\n});\n\nexport const ActionResult = z.looseObject({\n message: z.string().optional(),\n summary: z\n .looseObject({\n succeeded: z.number().int().nonnegative(),\n failed: z.number().int().nonnegative(),\n skipped: z.number().int().nonnegative(),\n })\n .optional(),\n results: z\n .array(ActionItemResult)\n .optional()\n .meta({ description: 'The items that did not succeed.' }),\n refresh: z.enum(['none', 'items', 'list']).optional(),\n redirect: z.union([z.string(), RouteReference]).nullable().optional(),\n download: z\n .looseObject({\n url: z.string(),\n filename: z.string().optional(),\n expiresAt: z.string().optional(),\n })\n .nullable()\n .optional(),\n});\n\nexport const ActionRun = z.looseObject({\n id: Id,\n action: z.string(),\n resource: z.string(),\n status: z.enum(['queued', 'running', 'succeeded', 'partial', 'failed', 'cancelled']),\n progress: z.number().int().nonnegative(),\n total: z.number().int().nonnegative().nullable(),\n result: ActionResult.optional().meta({ description: 'Set once the run has finished.' }),\n createdAt: z.string().optional(),\n finishedAt: z.string().nullable().optional(),\n});\n\nexport const ActionRunResponse = z.looseObject({ run: ActionRun });\n\nexport const MediaTransform = z\n .looseObject({\n crop: z\n .looseObject({\n x: z.number().int().nonnegative(),\n y: z.number().int().nonnegative(),\n width: z.number().int().positive(),\n height: z.number().int().positive(),\n })\n .optional()\n .meta({\n description:\n 'In whole pixels of the upright original image (after its EXIF orientation), from its top left corner.',\n }),\n rotate: z\n .union([z.literal(0), z.literal(90), z.literal(180), z.literal(270)])\n .optional()\n .meta({ description: 'Clockwise, in degrees.' }),\n flipX: z.boolean().optional().meta({ description: 'Mirrors left to right (horizontal).' }),\n flipY: z.boolean().optional().meta({ description: 'Mirrors top to bottom (vertical).' }),\n focalPoint: z\n .looseObject({ x: z.number().min(0).max(1), y: z.number().min(0).max(1) })\n .optional()\n .meta({\n description:\n 'From 0 to 1, relative to the width and height of the upright original image, not of the crop: changing the crop does not move it. Renderers map it into the transformed image and clamp it to the crop.',\n }),\n base: z.enum(['media', 'original']).optional().meta({\n description:\n \"What a transform for one use starts from: the original file by default, or the media's own transform (`media`). With `media`, the crop and the focal point are relative to the media's version instead of the original (decision 0031).\",\n }),\n // Return types are written out so that declaration files keep the recursion.\n get baseTransform(): z.ZodOptional<typeof MediaTransform> {\n return MediaTransform.optional().meta({\n description:\n 'With `base: \"media\"`: the media\\'s own transform this one was made on. When the media\\'s transform is no longer the same, clients ask to check the crop, and renderers clamp it.',\n });\n },\n })\n .meta({\n description:\n \"Non-destructive edits of an image, applied in this order: crop, then rotate, then flip. Renderers ignore the keys they don't know, which editor tools can add.\",\n });\n\nexport const UploadReference = z.looseObject({ upload: z.string().min(1) }).meta({\n description:\n 'A file uploaded directly to storage, by the id of its upload: in a file value, such as the `file` of a media, or an action parameter.',\n});\n\nexport const StoredFile = z\n .looseObject({\n name: z.string().meta({ description: 'The name of the file, as the user knows it.' }),\n url: z.string().nullable().optional().meta({\n description: 'Where to download it. A private file gets a temporary URL.',\n }),\n mime: z.string().nullable().optional(),\n size: z.number().int().nonnegative().nullable().optional(),\n })\n .meta({\n description:\n 'A file stored by the backend: the value of a `file` field in items. Requests send it back to keep the file, `{ \"upload\" }` to replace it, or `null` to remove it.',\n });\n\nexport const Upload = z\n .looseObject({\n id: z.string().min(1).meta({ description: 'The id of the upload: `upl_…`.' }),\n key: z.string().optional().meta({ description: 'The key of the object in storage.' }),\n name: z.string().optional(),\n mime: z.string().optional(),\n size: z.number().int().nonnegative().optional(),\n })\n .meta({\n description:\n 'A file the browser uploaded to storage, before it becomes a media, an import or another value.',\n });\n\nexport const UploadResponse = z.looseObject({ data: Upload });\n\nexport const UploadSignRequest = z\n .looseObject({\n method: z.enum(['GET', 'POST', 'PUT', 'DELETE']),\n key: z.string().min(1),\n uploadId: z.string().optional().meta({ description: 'The S3 multipart upload.' }),\n partNumber: z.number().int().positive().optional(),\n contentType: z.string().optional(),\n expiresIn: z.number().int().positive().optional(),\n })\n .meta({\n description: \"A request of the browser's S3 client to sign (Uppy 6's `signRequest`).\",\n });\n\nexport const UploadSignResponse = z\n .looseObject({\n url: z.string(),\n key: z\n .string()\n .optional()\n .meta({ description: 'The key the backend chose, for the first request of a file.' }),\n headers: z.record(z.string(), z.string()).optional().meta({\n description: 'Headers the URL was signed with, which the browser sends.',\n }),\n upload: z\n .string()\n .optional()\n .meta({ description: 'The upload the first request of a file created: `upl_…`.' }),\n })\n .meta({ description: 'A presigned request.' });\n\nexport const MediaInfo = z\n .looseObject({\n type: z.string().meta({\n description:\n '`image`, `video`, `audio`, `document`, `font`, or another type the backend knows.',\n }),\n mime: z.string().nullable().optional(),\n size: z.number().int().nonnegative().nullable().optional(),\n url: z.string().nullable().optional().meta({\n description:\n 'The main file to show or play: a rendition, or the original until it exists.',\n }),\n thumbnailUrl: z.string().nullable().optional(),\n variants: z\n .record(\n z.string(),\n z.looseObject({\n url: z.string(),\n width: z.number().optional(),\n height: z.number().optional(),\n }),\n )\n .optional()\n .meta({ description: 'Named renditions: sizes of an image, qualities of a video.' }),\n width: z.number().nullable().optional(),\n height: z.number().nullable().optional(),\n duration: z.number().nullable().optional().meta({ description: 'In seconds.' }),\n status: z.enum(['pending', 'processing', 'ready', 'failed']).optional().meta({\n description:\n 'Where the processing of the file is: `pending` and `processing` until its renditions are made, then `ready` or `failed`. Without it, the media is ready.',\n }),\n error: z\n .looseObject({\n code: z.string().meta({\n description:\n 'The code of the step that failed, such as a transcoder task code (`timeout`, `input_unreadable`).',\n }),\n message: z.string().optional().meta({ description: 'Why it failed, for people.' }),\n })\n .nullable()\n .optional()\n .meta({\n description:\n \"Why the processing failed, when `status` is `failed`, so that editors see it without the backend's monitoring.\",\n }),\n metadata: z.record(z.string(), z.unknown()).optional(),\n transform: MediaTransform.nullable().optional().meta({\n description:\n \"The media's own transform, from its library, which clients need to draw a transform for one use made over it (decision 0031).\",\n }),\n })\n .meta({\n description:\n 'What the backend computed about the file of a media item: the `media` of the items of a `media` resource, and of the values of `media` fields. Read-only: the editable properties of a media are the fields of its resource.',\n });\n\nexport const MediaItem = Item.extend({\n media: MediaInfo,\n}).meta({\n description:\n 'An item of a resource of kind `media`: the values of its fields (`file`, the original, and those of the project), and the `media` the backend computed.',\n});\n\nexport const MediaReference = z\n .looseObject({\n id: Id,\n resource: z.string().optional().meta({\n description:\n 'The library of the media. Required for a field that allows several libraries, since ids are unique only within their resource (decision 0027).',\n }),\n label: z.string().optional().meta({ description: 'The `itemTitle` of the media.' }),\n media: MediaInfo.optional(),\n transform: MediaTransform.nullable().optional().meta({\n description:\n 'The edits of the image for this use only: from the original file, or over the media\\'s own transform with `base: \"media\"`.',\n }),\n })\n .meta({\n description:\n 'The value of a `media` or `image` field in items: the media, with what lists and fields show, and its edits for this use. Requests send the id, or `{ id, resource, transform }`: `resource` is required when the field allows several libraries.',\n });\n\nexport const FieldCheckRequest = z\n .looseObject({\n value: z.string().meta({ description: 'The value to check, as it is typed.' }),\n locale: z\n .string()\n .optional()\n .meta({ description: 'The locale of the value, for a localized field.' }),\n id: Id.nullable()\n .optional()\n .meta({ description: 'The item being edited, or null when creating one.' }),\n values: z.record(z.string(), z.unknown()).optional().meta({\n description:\n \"The form's current values, as they would be sent to save, for what the check depends on (a page's parent).\",\n }),\n })\n .meta({ description: 'A value of a field with `check`, to check with the backend.' });\n\nexport const FieldCheckResponse = z\n .looseObject({\n available: z.boolean().meta({\n description:\n 'Whether no other item of the resource, in its scope and the same locale, has the value.',\n }),\n suggestion: z.string().nullable().optional().meta({\n description: 'An available value close to the one checked, when it is taken.',\n }),\n prefix: z.string().nullable().optional().meta({\n description: 'What the field shows in front of the value: the start of its URL.',\n }),\n url: z\n .string()\n .nullable()\n .optional()\n .meta({ description: 'The URL the value gives the item, which the field links to.' }),\n disabled: z.boolean().optional().meta({\n description:\n \"The field doesn't apply to this item (the home page has no slug): the field is read-only.\",\n }),\n })\n .meta({\n description:\n 'What the backend says about a value: not authoritative, since saving still validates it.',\n });\n\nexport const Session = z.looseObject({ user: User });\n\nexport const SearchResponse = z\n .looseObject({\n data: z.array(\n z.looseObject({\n resource: z.string().meta({ description: 'The id of the resource.' }),\n items: z.array(Item),\n total: z.number().int().nonnegative().optional().meta({\n description:\n 'How many items of the resource match, when the backend counts them: the list of the resource, searched, shows them all.',\n }),\n }),\n ),\n })\n .meta({\n description:\n 'The results of the global search: the resources with results, in the order of the definition.',\n });\n\nexport const PreviewResponse = z.looseObject({ url: z.string(), expiresAt: z.string().optional() });\n\nexport const EmbedValue = z\n .looseObject({\n url: z.string().meta({ description: 'The URL of the video, sound or post.' }),\n type: z.enum(['video', 'audio', 'photo', 'rich', 'link']).optional(),\n title: z.string().optional(),\n provider: z.string().optional().meta({ description: 'The name of the provider.' }),\n thumbnailUrl: z.string().optional(),\n html: z\n .string()\n .optional()\n .meta({ description: 'The HTML that embeds it, from the oEmbed of its provider.' }),\n width: z.number().optional(),\n height: z.number().optional(),\n })\n .meta({\n description:\n 'The value of an `embed` field: its URL, and what the backend got from its oEmbed.',\n });\n\nexport const EmbedResponse = z.looseObject({ data: EmbedValue });\n\nexport const LocationValue = z\n .looseObject({\n lat: z.number().min(-90).max(90),\n lng: z.number().min(-180).max(180),\n address: z.string().optional(),\n })\n .meta({ description: 'The value of a `location` field: a point, and its address.' });\n\nexport type Item = z.infer<typeof Item>;\nexport type Pagination = z.infer<typeof Pagination>;\nexport type ItemResponse = z.infer<typeof ItemResponse>;\nexport type CursorPagination = z.infer<typeof CursorPagination>;\nexport type ListResponse = z.infer<typeof ListResponse>;\nexport type Problem = z.infer<typeof Problem>;\nexport type Selection = z.infer<typeof Selection>;\nexport type ActionRequest = z.infer<typeof ActionRequest>;\nexport type ActionItemResult = z.infer<typeof ActionItemResult>;\nexport type ActionResult = z.infer<typeof ActionResult>;\nexport type ActionRun = z.infer<typeof ActionRun>;\nexport type ActionRunResponse = z.infer<typeof ActionRunResponse>;\nexport type MediaTransform = z.infer<typeof MediaTransform>;\nexport type UploadReference = z.infer<typeof UploadReference>;\nexport type StoredFile = z.infer<typeof StoredFile>;\nexport type Upload = z.infer<typeof Upload>;\nexport type UploadResponse = z.infer<typeof UploadResponse>;\nexport type UploadSignRequest = z.infer<typeof UploadSignRequest>;\nexport type UploadSignResponse = z.infer<typeof UploadSignResponse>;\nexport type FieldCheckRequest = z.infer<typeof FieldCheckRequest>;\nexport type FieldCheckResponse = z.infer<typeof FieldCheckResponse>;\nexport type MediaInfo = z.infer<typeof MediaInfo>;\nexport type MediaItem = z.infer<typeof MediaItem>;\nexport type MediaReference = z.infer<typeof MediaReference>;\nexport type Session = z.infer<typeof Session>;\nexport type SearchResponse = z.infer<typeof SearchResponse>;\nexport type PreviewResponse = z.infer<typeof PreviewResponse>;\nexport type EmbedValue = z.infer<typeof EmbedValue>;\nexport type EmbedResponse = z.infer<typeof EmbedResponse>;\nexport type LocationValue = z.infer<typeof LocationValue>;\n"],"mappings":";;;;AAKA,IAAa,OAAO,EACf,YAAY;CACT,IAAI;CACJ,SAAS,EAAE,OA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B,EACxB,YAAY;CACT,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE;CAC/B,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,GAAG;CACjC,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS;AACjC,CAAC,CAAC,CACD,KAAK,EAAE,aAAa,6DAA6D,CAAC"}
@@ -1,11 +1,34 @@
1
1
  import { z } from 'zod';
2
- import { Definition } from './definition';
2
+ import { Definition } from './definition.js';
3
3
  export declare const BootConfig: z.ZodObject<{
4
4
  protocol: z.ZodLiteral<1>;
5
5
  apiBaseUrl: z.ZodString;
6
6
  basePath: z.ZodString;
7
7
  locale: z.ZodString;
8
8
  definition: z.ZodOptional<typeof Definition>;
9
+ auth: z.ZodOptional<z.ZodObject<{
10
+ mode: z.ZodEnum<{
11
+ external: "external";
12
+ panneau: "panneau";
13
+ }>;
14
+ loginUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ logoutUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ password: z.ZodOptional<z.ZodBoolean>;
17
+ token: z.ZodOptional<z.ZodObject<{
18
+ label: z.ZodOptional<z.ZodString>;
19
+ help: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$loose>>;
21
+ providers: z.ZodOptional<z.ZodArray<z.ZodObject<{
22
+ id: z.ZodString;
23
+ label: z.ZodString;
24
+ url: z.ZodOptional<z.ZodString>;
25
+ icon: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$loose>>>;
27
+ passwordReset: z.ZodOptional<z.ZodBoolean>;
28
+ twoFactor: z.ZodOptional<z.ZodBoolean>;
29
+ passkeys: z.ZodOptional<z.ZodBoolean>;
30
+ emailVerification: z.ZodOptional<z.ZodBoolean>;
31
+ }, z.core.$loose>>;
9
32
  loginUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
33
  }, z.core.$loose>;
11
34
  export type BootConfig = z.infer<typeof BootConfig>;
@@ -1 +1 @@
1
- {"version":3,"file":"boot.d.ts","sourceRoot":"","sources":["../../src/schemas/boot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,eAAO,MAAM,UAAU;;;;;gBAsBT,CAAC,CAAC,WAAW,CAAC,OAAO,UAAU,CAAC;;iBASxC,CAAC;AAEP,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACpD,yEAAyE;AACzE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"boot.d.ts","sourceRoot":"","sources":["../../src/schemas/boot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAQ,UAAU,EAAE,MAAM,cAAc,CAAC;AAEhD,eAAO,MAAM,UAAU;;;;;gBAsBT,CAAC,CAAC,WAAW,CAAC,OAAO,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;iBAaxC,CAAC;AAEP,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACpD,yEAAyE;AACzE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import "../version.js";
2
- import { Definition } from "./definition.js";
2
+ import { Auth, Definition } from "./definition.js";
3
3
  import { z } from "zod";
4
4
  //#region src/schemas/boot.ts
5
5
  var BootConfig = z.looseObject({
@@ -8,6 +8,7 @@ var BootConfig = z.looseObject({
8
8
  basePath: z.string().regex(/^\/([^/?#]+(\/[^/?#]+)*)?\/?$/, "A path that starts with `/`.").meta({ description: "Path of the app in the site (`/panneau`, or `/` on its own domain). Client routes are under it." }),
9
9
  locale: z.string().min(2).meta({ description: "BCP 47 locale of the UI, used before the definition loads." }),
10
10
  definition: Definition.optional().meta({ description: "The definition for the current user, inlined so the app skips the first `GET /definition`." }),
11
+ auth: Auth.optional().meta({ description: "The `auth` of the definition, for the login page of the `panneau` auth mode, which shows before the definition can be loaded." }),
11
12
  loginUrl: z.string().nullable().optional().meta({ description: "Where to send unauthenticated users when the API answers `401` before the definition is loaded. Afterwards, `auth.loginUrl` of the definition is used." })
12
13
  }).meta({ description: "What a server writes in the page so the app can start, in the element `#panneau-boot`." });
13
14
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"boot.js","names":[],"sources":["../../src/schemas/boot.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { PROTOCOL_VERSION } from '../version';\nimport { Definition } from './definition';\n\nexport const BootConfig = z\n .looseObject({\n protocol: z.literal(PROTOCOL_VERSION),\n apiBaseUrl: z.string().min(1).meta({\n description:\n 'URL of the API (`/panneau/api`), where the app fetches `{apiBaseUrl}/definition`. A path or an absolute URL.',\n }),\n basePath: z\n .string()\n .regex(/^\\/([^/?#]+(\\/[^/?#]+)*)?\\/?$/, 'A path that starts with `/`.')\n .meta({\n description:\n 'Path of the app in the site (`/panneau`, or `/` on its own domain). Client routes are under it.',\n }),\n locale: z\n .string()\n .min(2)\n .meta({ description: 'BCP 47 locale of the UI, used before the definition loads.' }),\n // The type is written out so that declaration files reference the definition's schema.\n definition: Definition.optional().meta({\n description:\n 'The definition for the current user, inlined so the app skips the first `GET /definition`.',\n }) as z.ZodOptional<typeof Definition>,\n loginUrl: z.string().nullable().optional().meta({\n description:\n 'Where to send unauthenticated users when the API answers `401` before the definition is loaded. Afterwards, `auth.loginUrl` of the definition is used.',\n }),\n })\n .meta({\n description:\n 'What a server writes in the page so the app can start, in the element `#panneau-boot`.',\n });\n\nexport type BootConfig = z.infer<typeof BootConfig>;\n/** A boot config as a backend writes it, before defaults are applied. */\nexport type BootConfigInput = z.input<typeof BootConfig>;\n"],"mappings":";;;;AAKA,IAAa,aAAa,EACrB,YAAY;CACT,UAAU,EAAE,QAAA,CAAwB;CACpC,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAC/B,aACI,+GACR,CAAC;CACD,UAAU,EACL,OAAO,CAAC,CACR,MAAM,iCAAiC,8BAA8B,CAAC,CACtE,KAAK,EACF,aACI,kGACR,CAAC;CACL,QAAQ,EACH,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,KAAK,EAAE,aAAa,6DAA6D,CAAC;CAEvF,YAAY,WAAW,SAAS,CAAC,CAAC,KAAK,EACnC,aACI,6FACR,CAAC;CACD,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAC5C,aACI,yJACR,CAAC;AACL,CAAC,CAAC,CACD,KAAK,EACF,aACI,yFACR,CAAC"}
1
+ {"version":3,"file":"boot.js","names":[],"sources":["../../src/schemas/boot.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { PROTOCOL_VERSION } from '../version';\nimport { Auth, Definition } from './definition';\n\nexport const BootConfig = z\n .looseObject({\n protocol: z.literal(PROTOCOL_VERSION),\n apiBaseUrl: z.string().min(1).meta({\n description:\n 'URL of the API (`/panneau/api`), where the app fetches `{apiBaseUrl}/definition`. A path or an absolute URL.',\n }),\n basePath: z\n .string()\n .regex(/^\\/([^/?#]+(\\/[^/?#]+)*)?\\/?$/, 'A path that starts with `/`.')\n .meta({\n description:\n 'Path of the app in the site (`/panneau`, or `/` on its own domain). Client routes are under it.',\n }),\n locale: z\n .string()\n .min(2)\n .meta({ description: 'BCP 47 locale of the UI, used before the definition loads.' }),\n // The type is written out so that declaration files reference the definition's schema.\n definition: Definition.optional().meta({\n description:\n 'The definition for the current user, inlined so the app skips the first `GET /definition`.',\n }) as z.ZodOptional<typeof Definition>,\n auth: Auth.optional().meta({\n description:\n 'The `auth` of the definition, for the login page of the `panneau` auth mode, which shows before the definition can be loaded.',\n }),\n loginUrl: z.string().nullable().optional().meta({\n description:\n 'Where to send unauthenticated users when the API answers `401` before the definition is loaded. Afterwards, `auth.loginUrl` of the definition is used.',\n }),\n })\n .meta({\n description:\n 'What a server writes in the page so the app can start, in the element `#panneau-boot`.',\n });\n\nexport type BootConfig = z.infer<typeof BootConfig>;\n/** A boot config as a backend writes it, before defaults are applied. */\nexport type BootConfigInput = z.input<typeof BootConfig>;\n"],"mappings":";;;;AAKA,IAAa,aAAa,EACrB,YAAY;CACT,UAAU,EAAE,QAAA,CAAwB;CACpC,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAC/B,aACI,+GACR,CAAC;CACD,UAAU,EACL,OAAO,CAAC,CACR,MAAM,iCAAiC,8BAA8B,CAAC,CACtE,KAAK,EACF,aACI,kGACR,CAAC;CACL,QAAQ,EACH,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,KAAK,EAAE,aAAa,6DAA6D,CAAC;CAEvF,YAAY,WAAW,SAAS,CAAC,CAAC,KAAK,EACnC,aACI,6FACR,CAAC;CACD,MAAM,KAAK,SAAS,CAAC,CAAC,KAAK,EACvB,aACI,gIACR,CAAC;CACD,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAC5C,aACI,yJACR,CAAC;AACL,CAAC,CAAC,CACD,KAAK,EACF,aACI,yFACR,CAAC"}
@@ -19,6 +19,7 @@ export declare const Option: z.ZodObject<{
19
19
  label: z.ZodString;
20
20
  description: z.ZodOptional<z.ZodString>;
21
21
  disabled: z.ZodOptional<z.ZodBoolean>;
22
+ tone: z.ZodOptional<z.ZodString>;
22
23
  }, z.core.$loose>;
23
24
  export type Id = z.infer<typeof Id>;
24
25
  export type Abilities = z.infer<typeof Abilities>;
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/schemas/common.ts"],"names":[],"mappings":"A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C;iBAOxD,CAAC;AAEP,eAAO,MAAM,MAAM;;;;;;iBAajB,CAAC;AAEH,MAAM,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;AACpC,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAClD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC5D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAClD,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC"}
@@ -27,7 +27,8 @@ var Option = z.looseObject({
27
27
  ]),
28
28
  label: z.string(),
29
29
  description: z.string().optional(),
30
- disabled: z.boolean().optional()
30
+ disabled: z.boolean().optional(),
31
+ tone: z.string().regex(/^[a-z0-9-]+$/).optional().meta({ description: "The tone of the option where it shows as a badge, in lists and details: `neutral` (the default), `accent`, `success`, `warning`, `danger`, `info`, or a tone of the theme." })
31
32
  });
32
33
  //#endregion
33
34
  export { Abilities, Condition, Id, Option, RouteReference };
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","names":[],"sources":["../../src/schemas/common.ts"],"sourcesContent":["import { z } from 'zod';\n\nexport const Id = z\n .string()\n .min(1)\n .meta({ description: 'Opaque identifier. Clients never parse or generate ids.' });\n\nexport const Abilities = z.record(z.string(), z.boolean()).meta({\n description:\n 'What the current user can do, keyed by ability (`viewAny`, `create`, `update`, `delete`, or an action id).',\n});\n\nexport const RouteReference = z.looseObject({\n route: z.string().min(1).meta({ description: 'Name of a route in the definition.' }),\n params: z.record(z.string(), z.union([z.string(), z.number()])).optional(),\n});\n\nexport const Condition = z\n .looseObject({\n field: z.string().min(1).optional().meta({ description: 'Field name, or a dot path.' }),\n equals: z.unknown().optional(),\n in: z.array(z.unknown()).optional(),\n notIn: z.array(z.unknown()).optional(),\n filled: z.boolean().optional(),\n // Return types are written out so that declaration files keep the recursion.\n get all(): z.ZodOptional<z.ZodArray<typeof Condition>> {\n return z.array(Condition).optional();\n },\n get any(): z.ZodOptional<z.ZodArray<typeof Condition>> {\n return z.array(Condition).optional();\n },\n })\n .meta({\n description:\n 'A condition on form values: compare one field (`equals`, `in`, `notIn`, `filled`), or combine conditions with `all` or `any`.',\n });\n\nexport const Option = z.looseObject({\n value: z.union([z.string(), z.number(), z.boolean()]),\n label: z.string(),\n description: z.string().optional(),\n disabled: z.boolean().optional(),\n});\n\nexport type Id = z.infer<typeof Id>;\nexport type Abilities = z.infer<typeof Abilities>;\nexport type RouteReference = z.infer<typeof RouteReference>;\nexport type Condition = z.infer<typeof Condition>;\nexport type Option = z.infer<typeof Option>;\n"],"mappings":";;AAEA,IAAa,KAAK,EACb,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,KAAK,EAAE,aAAa,0DAA0D,CAAC;AAEpF,IAAa,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,EAC5D,aACI,6GACR,CAAC;AAED,IAAa,iBAAiB,EAAE,YAAY;CACxC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,aAAa,qCAAqC,CAAC;CACnF,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;AAC7E,CAAC;AAED,IAAa,YAAY,EACpB,YAAY;CACT,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,aAAa,6BAA6B,CAAC;CACtF,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS;CAC7B,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS;CAClC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS;CACrC,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS;CAE7B,IAAI,MAAmD;EACnD,OAAO,EAAE,MAAM,SAAS,CAAC,CAAC,SAAS;CACvC;CACA,IAAI,MAAmD;EACnD,OAAO,EAAE,MAAM,SAAS,CAAC,CAAC,SAAS;CACvC;AACJ,CAAC,CAAC,CACD,KAAK,EACF,aACI,gIACR,CAAC;AAEL,IAAa,SAAS,EAAE,YAAY;CAChC,OAAO,EAAE,MAAM;EAAC,EAAE,OAAO;EAAG,EAAE,OAAO;EAAG,EAAE,QAAQ;CAAC,CAAC;CACpD,OAAO,EAAE,OAAO;CAChB,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS;CACjC,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS;AACnC,CAAC"}
1
+ {"version":3,"file":"common.js","names":[],"sources":["../../src/schemas/common.ts"],"sourcesContent":["import { z } from 'zod';\n\nexport const Id = z\n .string()\n .min(1)\n .meta({ description: 'Opaque identifier. Clients never parse or generate ids.' });\n\nexport const Abilities = z.record(z.string(), z.boolean()).meta({\n description:\n 'What the current user can do, keyed by ability (`viewAny`, `create`, `update`, `delete`, or an action id).',\n});\n\nexport const RouteReference = z.looseObject({\n route: z.string().min(1).meta({ description: 'Name of a route in the definition.' }),\n params: z.record(z.string(), z.union([z.string(), z.number()])).optional(),\n});\n\nexport const Condition = z\n .looseObject({\n field: z.string().min(1).optional().meta({ description: 'Field name, or a dot path.' }),\n equals: z.unknown().optional(),\n in: z.array(z.unknown()).optional(),\n notIn: z.array(z.unknown()).optional(),\n filled: z.boolean().optional(),\n // Return types are written out so that declaration files keep the recursion.\n get all(): z.ZodOptional<z.ZodArray<typeof Condition>> {\n return z.array(Condition).optional();\n },\n get any(): z.ZodOptional<z.ZodArray<typeof Condition>> {\n return z.array(Condition).optional();\n },\n })\n .meta({\n description:\n 'A condition on form values: compare one field (`equals`, `in`, `notIn`, `filled`), or combine conditions with `all` or `any`.',\n });\n\nexport const Option = z.looseObject({\n value: z.union([z.string(), z.number(), z.boolean()]),\n label: z.string(),\n description: z.string().optional(),\n disabled: z.boolean().optional(),\n tone: z\n .string()\n .regex(/^[a-z0-9-]+$/)\n .optional()\n .meta({\n description:\n 'The tone of the option where it shows as a badge, in lists and details: `neutral` (the default), `accent`, `success`, `warning`, `danger`, `info`, or a tone of the theme.',\n }),\n});\n\nexport type Id = z.infer<typeof Id>;\nexport type Abilities = z.infer<typeof Abilities>;\nexport type RouteReference = z.infer<typeof RouteReference>;\nexport type Condition = z.infer<typeof Condition>;\nexport type Option = z.infer<typeof Option>;\n"],"mappings":";;AAEA,IAAa,KAAK,EACb,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,KAAK,EAAE,aAAa,0DAA0D,CAAC;AAEpF,IAAa,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,EAC5D,aACI,6GACR,CAAC;AAED,IAAa,iBAAiB,EAAE,YAAY;CACxC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,aAAa,qCAAqC,CAAC;CACnF,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;AAC7E,CAAC;AAED,IAAa,YAAY,EACpB,YAAY;CACT,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,aAAa,6BAA6B,CAAC;CACtF,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS;CAC7B,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS;CAClC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS;CACrC,QAAQ,EAAE,QAAQ,C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