@open-commune/core 0.2.14 → 0.2.16

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.
@@ -0,0 +1,2585 @@
1
+ import * as drizzle_zod from 'drizzle-zod';
2
+ import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
3
+ import { z } from 'zod';
4
+ import { FIELD_TYPES, FieldType, PUBLICATION_STATUSES } from '../domains/collections/constants.mjs';
5
+ import { FieldDefinition, fieldDefinitionSchema } from '../domains/collections/utils.mjs';
6
+
7
+ declare const definitionCreateDto: z.ZodObject<{
8
+ name: z.ZodString;
9
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ editor: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
11
+ display: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
12
+ headings: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
13
+ fields: z.ZodArray<z.ZodObject<{
14
+ name: z.ZodString;
15
+ label: z.ZodString;
16
+ type: z.ZodEnum<{
17
+ number: "number";
18
+ boolean: "boolean";
19
+ text: "text";
20
+ "rich-text": "rich-text";
21
+ date: "date";
22
+ media: "media";
23
+ relation: "relation";
24
+ select: "select";
25
+ steps: "steps";
26
+ json: "json";
27
+ }>;
28
+ required: z.ZodDefault<z.ZodBoolean>;
29
+ hidden: z.ZodDefault<z.ZodBoolean>;
30
+ options: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
+ target: z.ZodOptional<z.ZodString>;
32
+ }, z.core.$strip>>;
33
+ slug: z.ZodOptional<z.ZodString>;
34
+ }, {
35
+ out: {};
36
+ in: {};
37
+ }>;
38
+ declare const definitionUpdateDto: z.ZodObject<{
39
+ name: z.ZodOptional<z.ZodString>;
40
+ slug: z.ZodOptional<z.ZodString>;
41
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
42
+ editor: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
43
+ display: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
44
+ headings: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
45
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
46
+ name: z.ZodString;
47
+ label: z.ZodString;
48
+ type: z.ZodEnum<{
49
+ number: "number";
50
+ boolean: "boolean";
51
+ text: "text";
52
+ "rich-text": "rich-text";
53
+ date: "date";
54
+ media: "media";
55
+ relation: "relation";
56
+ select: "select";
57
+ steps: "steps";
58
+ json: "json";
59
+ }>;
60
+ required: z.ZodDefault<z.ZodBoolean>;
61
+ hidden: z.ZodDefault<z.ZodBoolean>;
62
+ options: z.ZodOptional<z.ZodArray<z.ZodString>>;
63
+ target: z.ZodOptional<z.ZodString>;
64
+ }, z.core.$strip>>>;
65
+ }, {
66
+ out: {};
67
+ in: {};
68
+ }>;
69
+ declare const definitionDto: drizzle_zod.BuildSchema<"select", {
70
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
71
+ name: "id";
72
+ tableName: "collection_definitions";
73
+ dataType: "string";
74
+ columnType: "SQLiteText";
75
+ data: string;
76
+ driverParam: string;
77
+ notNull: true;
78
+ hasDefault: true;
79
+ isPrimaryKey: true;
80
+ isAutoincrement: false;
81
+ hasRuntimeDefault: true;
82
+ enumValues: [string, ...string[]];
83
+ baseColumn: never;
84
+ identity: undefined;
85
+ generated: undefined;
86
+ }, {}, {
87
+ length: number | undefined;
88
+ }>;
89
+ name: drizzle_orm_sqlite_core.SQLiteColumn<{
90
+ name: "name";
91
+ tableName: "collection_definitions";
92
+ dataType: "string";
93
+ columnType: "SQLiteText";
94
+ data: string;
95
+ driverParam: string;
96
+ notNull: true;
97
+ hasDefault: false;
98
+ isPrimaryKey: false;
99
+ isAutoincrement: false;
100
+ hasRuntimeDefault: false;
101
+ enumValues: [string, ...string[]];
102
+ baseColumn: never;
103
+ identity: undefined;
104
+ generated: undefined;
105
+ }, {}, {
106
+ length: number | undefined;
107
+ }>;
108
+ slug: drizzle_orm_sqlite_core.SQLiteColumn<{
109
+ name: "slug";
110
+ tableName: "collection_definitions";
111
+ dataType: "string";
112
+ columnType: "SQLiteText";
113
+ data: string;
114
+ driverParam: string;
115
+ notNull: true;
116
+ hasDefault: false;
117
+ isPrimaryKey: false;
118
+ isAutoincrement: false;
119
+ hasRuntimeDefault: false;
120
+ enumValues: [string, ...string[]];
121
+ baseColumn: never;
122
+ identity: undefined;
123
+ generated: undefined;
124
+ }, {}, {
125
+ length: number | undefined;
126
+ }>;
127
+ description: drizzle_orm_sqlite_core.SQLiteColumn<{
128
+ name: "description";
129
+ tableName: "collection_definitions";
130
+ dataType: "string";
131
+ columnType: "SQLiteText";
132
+ data: string;
133
+ driverParam: string;
134
+ notNull: false;
135
+ hasDefault: false;
136
+ isPrimaryKey: false;
137
+ isAutoincrement: false;
138
+ hasRuntimeDefault: false;
139
+ enumValues: [string, ...string[]];
140
+ baseColumn: never;
141
+ identity: undefined;
142
+ generated: undefined;
143
+ }, {}, {
144
+ length: number | undefined;
145
+ }>;
146
+ fields: drizzle_orm_sqlite_core.SQLiteColumn<{
147
+ name: "fields";
148
+ tableName: "collection_definitions";
149
+ dataType: "json";
150
+ columnType: "SQLiteTextJson";
151
+ data: {
152
+ name: string;
153
+ label: string;
154
+ type: "number" | "boolean" | "text" | "rich-text" | "date" | "media" | "relation" | "select" | "steps" | "json";
155
+ required: boolean;
156
+ hidden: boolean;
157
+ options?: string[] | undefined;
158
+ target?: string | undefined;
159
+ }[];
160
+ driverParam: string;
161
+ notNull: true;
162
+ hasDefault: false;
163
+ isPrimaryKey: false;
164
+ isAutoincrement: false;
165
+ hasRuntimeDefault: false;
166
+ enumValues: undefined;
167
+ baseColumn: never;
168
+ identity: undefined;
169
+ generated: undefined;
170
+ }, {}, {
171
+ $type: {
172
+ name: string;
173
+ label: string;
174
+ type: "number" | "boolean" | "text" | "rich-text" | "date" | "media" | "relation" | "select" | "steps" | "json";
175
+ required: boolean;
176
+ hidden: boolean;
177
+ options?: string[] | undefined;
178
+ target?: string | undefined;
179
+ }[];
180
+ }>;
181
+ editor: drizzle_orm_sqlite_core.SQLiteColumn<{
182
+ name: "editor";
183
+ tableName: "collection_definitions";
184
+ dataType: "json";
185
+ columnType: "SQLiteTextJson";
186
+ data: Record<string, unknown>;
187
+ driverParam: string;
188
+ notNull: false;
189
+ hasDefault: false;
190
+ isPrimaryKey: false;
191
+ isAutoincrement: false;
192
+ hasRuntimeDefault: false;
193
+ enumValues: undefined;
194
+ baseColumn: never;
195
+ identity: undefined;
196
+ generated: undefined;
197
+ }, {}, {
198
+ $type: Record<string, unknown>;
199
+ }>;
200
+ display: drizzle_orm_sqlite_core.SQLiteColumn<{
201
+ name: "display";
202
+ tableName: "collection_definitions";
203
+ dataType: "json";
204
+ columnType: "SQLiteTextJson";
205
+ data: Record<string, unknown>;
206
+ driverParam: string;
207
+ notNull: false;
208
+ hasDefault: false;
209
+ isPrimaryKey: false;
210
+ isAutoincrement: false;
211
+ hasRuntimeDefault: false;
212
+ enumValues: undefined;
213
+ baseColumn: never;
214
+ identity: undefined;
215
+ generated: undefined;
216
+ }, {}, {
217
+ $type: Record<string, unknown>;
218
+ }>;
219
+ headings: drizzle_orm_sqlite_core.SQLiteColumn<{
220
+ name: "headings";
221
+ tableName: "collection_definitions";
222
+ dataType: "json";
223
+ columnType: "SQLiteTextJson";
224
+ data: Record<string, unknown>;
225
+ driverParam: string;
226
+ notNull: false;
227
+ hasDefault: false;
228
+ isPrimaryKey: false;
229
+ isAutoincrement: false;
230
+ hasRuntimeDefault: false;
231
+ enumValues: undefined;
232
+ baseColumn: never;
233
+ identity: undefined;
234
+ generated: undefined;
235
+ }, {}, {
236
+ $type: Record<string, unknown>;
237
+ }>;
238
+ createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
239
+ name: "created_by";
240
+ tableName: "collection_definitions";
241
+ dataType: "string";
242
+ columnType: "SQLiteText";
243
+ data: string;
244
+ driverParam: string;
245
+ notNull: false;
246
+ hasDefault: false;
247
+ isPrimaryKey: false;
248
+ isAutoincrement: false;
249
+ hasRuntimeDefault: false;
250
+ enumValues: [string, ...string[]];
251
+ baseColumn: never;
252
+ identity: undefined;
253
+ generated: undefined;
254
+ }, {}, {
255
+ length: number | undefined;
256
+ }>;
257
+ updatedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
258
+ name: "updated_by";
259
+ tableName: "collection_definitions";
260
+ dataType: "string";
261
+ columnType: "SQLiteText";
262
+ data: string;
263
+ driverParam: string;
264
+ notNull: false;
265
+ hasDefault: false;
266
+ isPrimaryKey: false;
267
+ isAutoincrement: false;
268
+ hasRuntimeDefault: false;
269
+ enumValues: [string, ...string[]];
270
+ baseColumn: never;
271
+ identity: undefined;
272
+ generated: undefined;
273
+ }, {}, {
274
+ length: number | undefined;
275
+ }>;
276
+ legacyExtra: drizzle_orm_sqlite_core.SQLiteColumn<{
277
+ name: "legacy_extra";
278
+ tableName: "collection_definitions";
279
+ dataType: "json";
280
+ columnType: "SQLiteTextJson";
281
+ data: Record<string, unknown> | null;
282
+ driverParam: string;
283
+ notNull: false;
284
+ hasDefault: false;
285
+ isPrimaryKey: false;
286
+ isAutoincrement: false;
287
+ hasRuntimeDefault: false;
288
+ enumValues: undefined;
289
+ baseColumn: never;
290
+ identity: undefined;
291
+ generated: undefined;
292
+ }, {}, {
293
+ $type: Record<string, unknown> | null;
294
+ }>;
295
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
296
+ name: "created_at";
297
+ tableName: "collection_definitions";
298
+ dataType: "string";
299
+ columnType: "SQLiteText";
300
+ data: string;
301
+ driverParam: string;
302
+ notNull: true;
303
+ hasDefault: true;
304
+ isPrimaryKey: false;
305
+ isAutoincrement: false;
306
+ hasRuntimeDefault: true;
307
+ enumValues: [string, ...string[]];
308
+ baseColumn: never;
309
+ identity: undefined;
310
+ generated: undefined;
311
+ }, {}, {
312
+ length: number | undefined;
313
+ }>;
314
+ updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
315
+ name: "updated_at";
316
+ tableName: "collection_definitions";
317
+ dataType: "string";
318
+ columnType: "SQLiteText";
319
+ data: string;
320
+ driverParam: string;
321
+ notNull: true;
322
+ hasDefault: true;
323
+ isPrimaryKey: false;
324
+ isAutoincrement: false;
325
+ hasRuntimeDefault: true;
326
+ enumValues: [string, ...string[]];
327
+ baseColumn: never;
328
+ identity: undefined;
329
+ generated: undefined;
330
+ }, {}, {
331
+ length: number | undefined;
332
+ }>;
333
+ }, {
334
+ fields: z.ZodArray<z.ZodObject<{
335
+ name: z.ZodString;
336
+ label: z.ZodString;
337
+ type: z.ZodUnion<[z.ZodEnum<{
338
+ number: "number";
339
+ boolean: "boolean";
340
+ text: "text";
341
+ "rich-text": "rich-text";
342
+ date: "date";
343
+ media: "media";
344
+ relation: "relation";
345
+ select: "select";
346
+ steps: "steps";
347
+ json: "json";
348
+ }>, z.ZodString]>;
349
+ required: z.ZodDefault<z.ZodBoolean>;
350
+ hidden: z.ZodDefault<z.ZodBoolean>;
351
+ options: z.ZodOptional<z.ZodArray<z.ZodString>>;
352
+ target: z.ZodOptional<z.ZodString>;
353
+ }, z.core.$loose>>;
354
+ }, undefined>;
355
+ type DefinitionCreateDto = z.infer<typeof definitionCreateDto>;
356
+ type DefinitionUpdateDto = z.infer<typeof definitionUpdateDto>;
357
+
358
+ declare const entryCreateDto: z.ZodObject<{
359
+ data: z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>;
360
+ title: z.ZodString;
361
+ status: z.ZodOptional<z.ZodEnum<{
362
+ draft: "draft";
363
+ waiting: "waiting";
364
+ ready: "ready";
365
+ scheduled: "scheduled";
366
+ published: "published";
367
+ }>>;
368
+ publishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
369
+ slug: z.ZodOptional<z.ZodString>;
370
+ }, {
371
+ out: {};
372
+ in: {};
373
+ }>;
374
+ declare const entryUpdateDto: z.ZodObject<{
375
+ data: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
376
+ slug: z.ZodOptional<z.ZodString>;
377
+ title: z.ZodOptional<z.ZodString>;
378
+ status: z.ZodOptional<z.ZodEnum<{
379
+ draft: "draft";
380
+ waiting: "waiting";
381
+ ready: "ready";
382
+ scheduled: "scheduled";
383
+ published: "published";
384
+ }>>;
385
+ publishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
386
+ related: z.ZodOptional<z.ZodArray<z.ZodString>>;
387
+ }, {
388
+ out: {};
389
+ in: {};
390
+ }>;
391
+ declare const entryDto: drizzle_zod.BuildSchema<"select", {
392
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
393
+ name: "id";
394
+ tableName: "entries";
395
+ dataType: "string";
396
+ columnType: "SQLiteText";
397
+ data: string;
398
+ driverParam: string;
399
+ notNull: true;
400
+ hasDefault: true;
401
+ isPrimaryKey: true;
402
+ isAutoincrement: false;
403
+ hasRuntimeDefault: true;
404
+ enumValues: [string, ...string[]];
405
+ baseColumn: never;
406
+ identity: undefined;
407
+ generated: undefined;
408
+ }, {}, {
409
+ length: number | undefined;
410
+ }>;
411
+ collectionId: drizzle_orm_sqlite_core.SQLiteColumn<{
412
+ name: "collection_id";
413
+ tableName: "entries";
414
+ dataType: "string";
415
+ columnType: "SQLiteText";
416
+ data: string;
417
+ driverParam: string;
418
+ notNull: true;
419
+ hasDefault: false;
420
+ isPrimaryKey: false;
421
+ isAutoincrement: false;
422
+ hasRuntimeDefault: false;
423
+ enumValues: [string, ...string[]];
424
+ baseColumn: never;
425
+ identity: undefined;
426
+ generated: undefined;
427
+ }, {}, {
428
+ length: number | undefined;
429
+ }>;
430
+ title: drizzle_orm_sqlite_core.SQLiteColumn<{
431
+ name: "title";
432
+ tableName: "entries";
433
+ dataType: "string";
434
+ columnType: "SQLiteText";
435
+ data: string;
436
+ driverParam: string;
437
+ notNull: true;
438
+ hasDefault: false;
439
+ isPrimaryKey: false;
440
+ isAutoincrement: false;
441
+ hasRuntimeDefault: false;
442
+ enumValues: [string, ...string[]];
443
+ baseColumn: never;
444
+ identity: undefined;
445
+ generated: undefined;
446
+ }, {}, {
447
+ length: number | undefined;
448
+ }>;
449
+ slug: drizzle_orm_sqlite_core.SQLiteColumn<{
450
+ name: "slug";
451
+ tableName: "entries";
452
+ dataType: "string";
453
+ columnType: "SQLiteText";
454
+ data: string;
455
+ driverParam: string;
456
+ notNull: true;
457
+ hasDefault: false;
458
+ isPrimaryKey: false;
459
+ isAutoincrement: false;
460
+ hasRuntimeDefault: false;
461
+ enumValues: [string, ...string[]];
462
+ baseColumn: never;
463
+ identity: undefined;
464
+ generated: undefined;
465
+ }, {}, {
466
+ length: number | undefined;
467
+ }>;
468
+ data: drizzle_orm_sqlite_core.SQLiteColumn<{
469
+ name: "data";
470
+ tableName: "entries";
471
+ dataType: "json";
472
+ columnType: "SQLiteTextJson";
473
+ data: Record<string, unknown>;
474
+ driverParam: string;
475
+ notNull: true;
476
+ hasDefault: false;
477
+ isPrimaryKey: false;
478
+ isAutoincrement: false;
479
+ hasRuntimeDefault: false;
480
+ enumValues: undefined;
481
+ baseColumn: never;
482
+ identity: undefined;
483
+ generated: undefined;
484
+ }, {}, {
485
+ $type: Record<string, unknown>;
486
+ }>;
487
+ related: drizzle_orm_sqlite_core.SQLiteColumn<{
488
+ name: "related";
489
+ tableName: "entries";
490
+ dataType: "json";
491
+ columnType: "SQLiteTextJson";
492
+ data: string[];
493
+ driverParam: string;
494
+ notNull: false;
495
+ hasDefault: false;
496
+ isPrimaryKey: false;
497
+ isAutoincrement: false;
498
+ hasRuntimeDefault: false;
499
+ enumValues: undefined;
500
+ baseColumn: never;
501
+ identity: undefined;
502
+ generated: undefined;
503
+ }, {}, {
504
+ $type: string[];
505
+ }>;
506
+ createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
507
+ name: "created_by";
508
+ tableName: "entries";
509
+ dataType: "string";
510
+ columnType: "SQLiteText";
511
+ data: string;
512
+ driverParam: string;
513
+ notNull: false;
514
+ hasDefault: false;
515
+ isPrimaryKey: false;
516
+ isAutoincrement: false;
517
+ hasRuntimeDefault: false;
518
+ enumValues: [string, ...string[]];
519
+ baseColumn: never;
520
+ identity: undefined;
521
+ generated: undefined;
522
+ }, {}, {
523
+ length: number | undefined;
524
+ }>;
525
+ updatedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
526
+ name: "updated_by";
527
+ tableName: "entries";
528
+ dataType: "string";
529
+ columnType: "SQLiteText";
530
+ data: string;
531
+ driverParam: string;
532
+ notNull: false;
533
+ hasDefault: false;
534
+ isPrimaryKey: false;
535
+ isAutoincrement: false;
536
+ hasRuntimeDefault: false;
537
+ enumValues: [string, ...string[]];
538
+ baseColumn: never;
539
+ identity: undefined;
540
+ generated: undefined;
541
+ }, {}, {
542
+ length: number | undefined;
543
+ }>;
544
+ status: drizzle_orm_sqlite_core.SQLiteColumn<{
545
+ name: "status";
546
+ tableName: "entries";
547
+ dataType: "string";
548
+ columnType: "SQLiteText";
549
+ data: "draft" | "waiting" | "ready" | "scheduled" | "published";
550
+ driverParam: string;
551
+ notNull: true;
552
+ hasDefault: true;
553
+ isPrimaryKey: false;
554
+ isAutoincrement: false;
555
+ hasRuntimeDefault: false;
556
+ enumValues: ["draft", "waiting", "ready", "scheduled", "published"];
557
+ baseColumn: never;
558
+ identity: undefined;
559
+ generated: undefined;
560
+ }, {}, {
561
+ length: number | undefined;
562
+ }>;
563
+ publishedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
564
+ name: "published_at";
565
+ tableName: "entries";
566
+ dataType: "string";
567
+ columnType: "SQLiteText";
568
+ data: string;
569
+ driverParam: string;
570
+ notNull: false;
571
+ hasDefault: false;
572
+ isPrimaryKey: false;
573
+ isAutoincrement: false;
574
+ hasRuntimeDefault: false;
575
+ enumValues: [string, ...string[]];
576
+ baseColumn: never;
577
+ identity: undefined;
578
+ generated: undefined;
579
+ }, {}, {
580
+ length: number | undefined;
581
+ }>;
582
+ legacyExtra: drizzle_orm_sqlite_core.SQLiteColumn<{
583
+ name: "legacy_extra";
584
+ tableName: "entries";
585
+ dataType: "json";
586
+ columnType: "SQLiteTextJson";
587
+ data: Record<string, unknown> | null;
588
+ driverParam: string;
589
+ notNull: false;
590
+ hasDefault: false;
591
+ isPrimaryKey: false;
592
+ isAutoincrement: false;
593
+ hasRuntimeDefault: false;
594
+ enumValues: undefined;
595
+ baseColumn: never;
596
+ identity: undefined;
597
+ generated: undefined;
598
+ }, {}, {
599
+ $type: Record<string, unknown> | null;
600
+ }>;
601
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
602
+ name: "created_at";
603
+ tableName: "entries";
604
+ dataType: "string";
605
+ columnType: "SQLiteText";
606
+ data: string;
607
+ driverParam: string;
608
+ notNull: true;
609
+ hasDefault: true;
610
+ isPrimaryKey: false;
611
+ isAutoincrement: false;
612
+ hasRuntimeDefault: true;
613
+ enumValues: [string, ...string[]];
614
+ baseColumn: never;
615
+ identity: undefined;
616
+ generated: undefined;
617
+ }, {}, {
618
+ length: number | undefined;
619
+ }>;
620
+ updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
621
+ name: "updated_at";
622
+ tableName: "entries";
623
+ dataType: "string";
624
+ columnType: "SQLiteText";
625
+ data: string;
626
+ driverParam: string;
627
+ notNull: true;
628
+ hasDefault: true;
629
+ isPrimaryKey: false;
630
+ isAutoincrement: false;
631
+ hasRuntimeDefault: true;
632
+ enumValues: [string, ...string[]];
633
+ baseColumn: never;
634
+ identity: undefined;
635
+ generated: undefined;
636
+ }, {}, {
637
+ length: number | undefined;
638
+ }>;
639
+ }, {
640
+ collectionId: (schema: z.ZodString) => z.ZodString;
641
+ slug: (schema: z.ZodString) => z.ZodString;
642
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
643
+ related: z.ZodNullable<z.ZodArray<z.ZodString>>;
644
+ status: (schema: z.ZodEnum<{
645
+ draft: "draft";
646
+ waiting: "waiting";
647
+ ready: "ready";
648
+ scheduled: "scheduled";
649
+ published: "published";
650
+ }>) => z.ZodEnum<{
651
+ draft: "draft";
652
+ waiting: "waiting";
653
+ ready: "ready";
654
+ scheduled: "scheduled";
655
+ published: "published";
656
+ }>;
657
+ }, undefined>;
658
+ /** A search hit: the entry, and which collection it comes from. */
659
+ declare const entrySearchHitDto: z.ZodObject<{
660
+ id: z.ZodString;
661
+ collectionId: z.ZodString;
662
+ title: z.ZodString;
663
+ slug: z.ZodString;
664
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
665
+ related: z.ZodNullable<z.ZodArray<z.ZodString>>;
666
+ createdBy: z.ZodNullable<z.ZodString>;
667
+ updatedBy: z.ZodNullable<z.ZodString>;
668
+ status: z.ZodEnum<{
669
+ draft: "draft";
670
+ waiting: "waiting";
671
+ ready: "ready";
672
+ scheduled: "scheduled";
673
+ published: "published";
674
+ }>;
675
+ publishedAt: z.ZodNullable<z.ZodString>;
676
+ legacyExtra: z.ZodNullable<z.ZodType<drizzle_zod.Json, unknown, z.core.$ZodTypeInternals<drizzle_zod.Json, unknown>>>;
677
+ createdAt: z.ZodString;
678
+ updatedAt: z.ZodString;
679
+ collectionSlug: z.ZodString;
680
+ }, {
681
+ out: {};
682
+ in: {};
683
+ }>;
684
+ type EntryCreateDto = z.infer<typeof entryCreateDto>;
685
+ type EntryUpdateDto = z.infer<typeof entryUpdateDto>;
686
+ type EntrySearchHit = z.infer<typeof entrySearchHitDto>;
687
+
688
+ declare const mediaRequestUploadDto: z.ZodObject<{
689
+ filename: z.ZodString;
690
+ mime: z.ZodString;
691
+ metaData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
692
+ }, z.core.$strip>;
693
+ declare const mediaFinalizeDto: z.ZodObject<{
694
+ key: z.ZodString;
695
+ filename: z.ZodString;
696
+ mime: z.ZodString;
697
+ alt: z.ZodOptional<z.ZodString>;
698
+ metaData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
699
+ }, z.core.$strip>;
700
+ type MediaRequestUploadDto = z.infer<typeof mediaRequestUploadDto>;
701
+ type MediaFinalizeDto = z.infer<typeof mediaFinalizeDto>;
702
+
703
+ declare const mediaUpdateDto: z.ZodObject<{
704
+ filename: z.ZodOptional<z.ZodString>;
705
+ alt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
706
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
707
+ }, {
708
+ out: {};
709
+ in: {};
710
+ }>;
711
+ type MediaUpdateDto = z.infer<typeof mediaUpdateDto>;
712
+
713
+ declare const organizationInitDto: z.ZodObject<{
714
+ type: z.ZodOptional<z.ZodEnum<{
715
+ commune: "commune";
716
+ intercommunality: "intercommunality";
717
+ syndicate: "syndicate";
718
+ other: "other";
719
+ }>>;
720
+ name: z.ZodString;
721
+ slug: z.ZodString;
722
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
723
+ address: z.ZodOptional<z.ZodNullable<z.ZodType<{
724
+ street?: string | undefined;
725
+ postalCode?: string | undefined;
726
+ city?: string | undefined;
727
+ }, {
728
+ street?: string | undefined;
729
+ postalCode?: string | undefined;
730
+ city?: string | undefined;
731
+ }, z.core.$ZodTypeInternals<{
732
+ street?: string | undefined;
733
+ postalCode?: string | undefined;
734
+ city?: string | undefined;
735
+ }, {
736
+ street?: string | undefined;
737
+ postalCode?: string | undefined;
738
+ city?: string | undefined;
739
+ }>>>>;
740
+ deployment: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
741
+ settings: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
742
+ }, {
743
+ out: {};
744
+ in: {};
745
+ }>;
746
+ declare const organizationUpdateDto: z.ZodObject<{
747
+ type: z.ZodOptional<z.ZodEnum<{
748
+ commune: "commune";
749
+ intercommunality: "intercommunality";
750
+ syndicate: "syndicate";
751
+ other: "other";
752
+ }>>;
753
+ name: z.ZodOptional<z.ZodString>;
754
+ slug: z.ZodOptional<z.ZodString>;
755
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
756
+ address: z.ZodOptional<z.ZodNullable<z.ZodType<{
757
+ street?: string | undefined;
758
+ postalCode?: string | undefined;
759
+ city?: string | undefined;
760
+ }, {
761
+ street?: string | undefined;
762
+ postalCode?: string | undefined;
763
+ city?: string | undefined;
764
+ }, z.core.$ZodTypeInternals<{
765
+ street?: string | undefined;
766
+ postalCode?: string | undefined;
767
+ city?: string | undefined;
768
+ }, {
769
+ street?: string | undefined;
770
+ postalCode?: string | undefined;
771
+ city?: string | undefined;
772
+ }>>>>;
773
+ deployment: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
774
+ settings: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
775
+ }, {
776
+ out: {};
777
+ in: {};
778
+ }>;
779
+ type OrganizationInitDto = z.infer<typeof organizationInitDto>;
780
+ type OrganizationUpdateDto = z.infer<typeof organizationUpdateDto>;
781
+
782
+ declare const loginDto: z.ZodObject<{
783
+ email: z.ZodEmail;
784
+ password: z.ZodString;
785
+ }, z.core.$strip>;
786
+ declare const acceptInvitationDto: z.ZodObject<{
787
+ token: z.ZodString;
788
+ name: z.ZodOptional<z.ZodString>;
789
+ password: z.ZodString;
790
+ }, z.core.$strip>;
791
+ declare const requestPasswordResetDto: z.ZodObject<{
792
+ email: z.ZodEmail;
793
+ }, z.core.$strip>;
794
+ type LoginDto = z.infer<typeof loginDto>;
795
+ type AcceptInvitationDto = z.infer<typeof acceptInvitationDto>;
796
+ type RequestPasswordResetDto = z.infer<typeof requestPasswordResetDto>;
797
+
798
+ /** Postal address, as a typed JSON field. */
799
+ declare const addressSchema: z.ZodObject<{
800
+ street: z.ZodOptional<z.ZodString>;
801
+ postalCode: z.ZodOptional<z.ZodString>;
802
+ city: z.ZodOptional<z.ZodString>;
803
+ }, z.core.$strip>;
804
+ type Address = z.infer<typeof addressSchema>;
805
+ /**
806
+ * Instance settings — a singleton row (id = 1, enforced by the queries).
807
+ * Single-tenant by design: one instance = one local authority; no table
808
+ * anywhere carries a tenant key.
809
+ */
810
+ declare const organization: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
811
+ name: "organization";
812
+ schema: undefined;
813
+ columns: {
814
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
815
+ name: "id";
816
+ tableName: "organization";
817
+ dataType: "number";
818
+ columnType: "SQLiteInteger";
819
+ data: number;
820
+ driverParam: number;
821
+ notNull: true;
822
+ hasDefault: true;
823
+ isPrimaryKey: true;
824
+ isAutoincrement: false;
825
+ hasRuntimeDefault: false;
826
+ enumValues: undefined;
827
+ baseColumn: never;
828
+ identity: undefined;
829
+ generated: undefined;
830
+ }, {}, {}>;
831
+ name: drizzle_orm_sqlite_core.SQLiteColumn<{
832
+ name: "name";
833
+ tableName: "organization";
834
+ dataType: "string";
835
+ columnType: "SQLiteText";
836
+ data: string;
837
+ driverParam: string;
838
+ notNull: true;
839
+ hasDefault: false;
840
+ isPrimaryKey: false;
841
+ isAutoincrement: false;
842
+ hasRuntimeDefault: false;
843
+ enumValues: [string, ...string[]];
844
+ baseColumn: never;
845
+ identity: undefined;
846
+ generated: undefined;
847
+ }, {}, {
848
+ length: number | undefined;
849
+ }>;
850
+ type: drizzle_orm_sqlite_core.SQLiteColumn<{
851
+ name: "type";
852
+ tableName: "organization";
853
+ dataType: "string";
854
+ columnType: "SQLiteText";
855
+ data: "commune" | "intercommunality" | "syndicate" | "other";
856
+ driverParam: string;
857
+ notNull: true;
858
+ hasDefault: true;
859
+ isPrimaryKey: false;
860
+ isAutoincrement: false;
861
+ hasRuntimeDefault: false;
862
+ enumValues: ["commune", "intercommunality", "syndicate", "other"];
863
+ baseColumn: never;
864
+ identity: undefined;
865
+ generated: undefined;
866
+ }, {}, {
867
+ length: number | undefined;
868
+ }>;
869
+ slug: drizzle_orm_sqlite_core.SQLiteColumn<{
870
+ name: "slug";
871
+ tableName: "organization";
872
+ dataType: "string";
873
+ columnType: "SQLiteText";
874
+ data: string;
875
+ driverParam: string;
876
+ notNull: true;
877
+ hasDefault: false;
878
+ isPrimaryKey: false;
879
+ isAutoincrement: false;
880
+ hasRuntimeDefault: false;
881
+ enumValues: [string, ...string[]];
882
+ baseColumn: never;
883
+ identity: undefined;
884
+ generated: undefined;
885
+ }, {}, {
886
+ length: number | undefined;
887
+ }>;
888
+ description: drizzle_orm_sqlite_core.SQLiteColumn<{
889
+ name: "description";
890
+ tableName: "organization";
891
+ dataType: "string";
892
+ columnType: "SQLiteText";
893
+ data: string;
894
+ driverParam: string;
895
+ notNull: false;
896
+ hasDefault: false;
897
+ isPrimaryKey: false;
898
+ isAutoincrement: false;
899
+ hasRuntimeDefault: false;
900
+ enumValues: [string, ...string[]];
901
+ baseColumn: never;
902
+ identity: undefined;
903
+ generated: undefined;
904
+ }, {}, {
905
+ length: number | undefined;
906
+ }>;
907
+ address: drizzle_orm_sqlite_core.SQLiteColumn<{
908
+ name: "address";
909
+ tableName: "organization";
910
+ dataType: "json";
911
+ columnType: "SQLiteTextJson";
912
+ data: {
913
+ street?: string | undefined;
914
+ postalCode?: string | undefined;
915
+ city?: string | undefined;
916
+ };
917
+ driverParam: string;
918
+ notNull: false;
919
+ hasDefault: false;
920
+ isPrimaryKey: false;
921
+ isAutoincrement: false;
922
+ hasRuntimeDefault: false;
923
+ enumValues: undefined;
924
+ baseColumn: never;
925
+ identity: undefined;
926
+ generated: undefined;
927
+ }, {}, {
928
+ $type: {
929
+ street?: string | undefined;
930
+ postalCode?: string | undefined;
931
+ city?: string | undefined;
932
+ };
933
+ }>;
934
+ deployment: drizzle_orm_sqlite_core.SQLiteColumn<{
935
+ name: "deployment";
936
+ tableName: "organization";
937
+ dataType: "json";
938
+ columnType: "SQLiteTextJson";
939
+ data: Record<string, unknown>;
940
+ driverParam: string;
941
+ notNull: false;
942
+ hasDefault: false;
943
+ isPrimaryKey: false;
944
+ isAutoincrement: false;
945
+ hasRuntimeDefault: false;
946
+ enumValues: undefined;
947
+ baseColumn: never;
948
+ identity: undefined;
949
+ generated: undefined;
950
+ }, {}, {
951
+ $type: Record<string, unknown>;
952
+ }>;
953
+ settings: drizzle_orm_sqlite_core.SQLiteColumn<{
954
+ name: "settings";
955
+ tableName: "organization";
956
+ dataType: "json";
957
+ columnType: "SQLiteTextJson";
958
+ data: Record<string, unknown>;
959
+ driverParam: string;
960
+ notNull: false;
961
+ hasDefault: false;
962
+ isPrimaryKey: false;
963
+ isAutoincrement: false;
964
+ hasRuntimeDefault: false;
965
+ enumValues: undefined;
966
+ baseColumn: never;
967
+ identity: undefined;
968
+ generated: undefined;
969
+ }, {}, {
970
+ $type: Record<string, unknown>;
971
+ }>;
972
+ updatedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
973
+ name: "updated_by";
974
+ tableName: "organization";
975
+ dataType: "string";
976
+ columnType: "SQLiteText";
977
+ data: string;
978
+ driverParam: string;
979
+ notNull: false;
980
+ hasDefault: false;
981
+ isPrimaryKey: false;
982
+ isAutoincrement: false;
983
+ hasRuntimeDefault: false;
984
+ enumValues: [string, ...string[]];
985
+ baseColumn: never;
986
+ identity: undefined;
987
+ generated: undefined;
988
+ }, {}, {
989
+ length: number | undefined;
990
+ }>;
991
+ legacyExtra: drizzle_orm_sqlite_core.SQLiteColumn<{
992
+ name: "legacy_extra";
993
+ tableName: "organization";
994
+ dataType: "json";
995
+ columnType: "SQLiteTextJson";
996
+ data: Record<string, unknown> | null;
997
+ driverParam: string;
998
+ notNull: false;
999
+ hasDefault: false;
1000
+ isPrimaryKey: false;
1001
+ isAutoincrement: false;
1002
+ hasRuntimeDefault: false;
1003
+ enumValues: undefined;
1004
+ baseColumn: never;
1005
+ identity: undefined;
1006
+ generated: undefined;
1007
+ }, {}, {
1008
+ $type: Record<string, unknown> | null;
1009
+ }>;
1010
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1011
+ name: "created_at";
1012
+ tableName: "organization";
1013
+ dataType: "string";
1014
+ columnType: "SQLiteText";
1015
+ data: string;
1016
+ driverParam: string;
1017
+ notNull: true;
1018
+ hasDefault: true;
1019
+ isPrimaryKey: false;
1020
+ isAutoincrement: false;
1021
+ hasRuntimeDefault: true;
1022
+ enumValues: [string, ...string[]];
1023
+ baseColumn: never;
1024
+ identity: undefined;
1025
+ generated: undefined;
1026
+ }, {}, {
1027
+ length: number | undefined;
1028
+ }>;
1029
+ updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1030
+ name: "updated_at";
1031
+ tableName: "organization";
1032
+ dataType: "string";
1033
+ columnType: "SQLiteText";
1034
+ data: string;
1035
+ driverParam: string;
1036
+ notNull: true;
1037
+ hasDefault: true;
1038
+ isPrimaryKey: false;
1039
+ isAutoincrement: false;
1040
+ hasRuntimeDefault: true;
1041
+ enumValues: [string, ...string[]];
1042
+ baseColumn: never;
1043
+ identity: undefined;
1044
+ generated: undefined;
1045
+ }, {}, {
1046
+ length: number | undefined;
1047
+ }>;
1048
+ };
1049
+ dialect: "sqlite";
1050
+ }>;
1051
+ type Organization = typeof organization.$inferSelect;
1052
+ type NewOrganization = typeof organization.$inferInsert;
1053
+ declare const users: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
1054
+ name: "users";
1055
+ schema: undefined;
1056
+ columns: {
1057
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
1058
+ name: "id";
1059
+ tableName: "users";
1060
+ dataType: "string";
1061
+ columnType: "SQLiteText";
1062
+ data: string;
1063
+ driverParam: string;
1064
+ notNull: true;
1065
+ hasDefault: true;
1066
+ isPrimaryKey: true;
1067
+ isAutoincrement: false;
1068
+ hasRuntimeDefault: true;
1069
+ enumValues: [string, ...string[]];
1070
+ baseColumn: never;
1071
+ identity: undefined;
1072
+ generated: undefined;
1073
+ }, {}, {
1074
+ length: number | undefined;
1075
+ }>;
1076
+ email: drizzle_orm_sqlite_core.SQLiteColumn<{
1077
+ name: "email";
1078
+ tableName: "users";
1079
+ dataType: "string";
1080
+ columnType: "SQLiteText";
1081
+ data: string;
1082
+ driverParam: string;
1083
+ notNull: true;
1084
+ hasDefault: false;
1085
+ isPrimaryKey: false;
1086
+ isAutoincrement: false;
1087
+ hasRuntimeDefault: false;
1088
+ enumValues: [string, ...string[]];
1089
+ baseColumn: never;
1090
+ identity: undefined;
1091
+ generated: undefined;
1092
+ }, {}, {
1093
+ length: number | undefined;
1094
+ }>;
1095
+ name: drizzle_orm_sqlite_core.SQLiteColumn<{
1096
+ name: "name";
1097
+ tableName: "users";
1098
+ dataType: "string";
1099
+ columnType: "SQLiteText";
1100
+ data: string;
1101
+ driverParam: string;
1102
+ notNull: true;
1103
+ hasDefault: false;
1104
+ isPrimaryKey: false;
1105
+ isAutoincrement: false;
1106
+ hasRuntimeDefault: false;
1107
+ enumValues: [string, ...string[]];
1108
+ baseColumn: never;
1109
+ identity: undefined;
1110
+ generated: undefined;
1111
+ }, {}, {
1112
+ length: number | undefined;
1113
+ }>;
1114
+ passwordHash: drizzle_orm_sqlite_core.SQLiteColumn<{
1115
+ name: "password_hash";
1116
+ tableName: "users";
1117
+ dataType: "string";
1118
+ columnType: "SQLiteText";
1119
+ data: string;
1120
+ driverParam: string;
1121
+ notNull: false;
1122
+ hasDefault: false;
1123
+ isPrimaryKey: false;
1124
+ isAutoincrement: false;
1125
+ hasRuntimeDefault: false;
1126
+ enumValues: [string, ...string[]];
1127
+ baseColumn: never;
1128
+ identity: undefined;
1129
+ generated: undefined;
1130
+ }, {}, {
1131
+ length: number | undefined;
1132
+ }>;
1133
+ role: drizzle_orm_sqlite_core.SQLiteColumn<{
1134
+ name: "role";
1135
+ tableName: "users";
1136
+ dataType: "string";
1137
+ columnType: "SQLiteText";
1138
+ data: "admin" | "redacteur";
1139
+ driverParam: string;
1140
+ notNull: true;
1141
+ hasDefault: true;
1142
+ isPrimaryKey: false;
1143
+ isAutoincrement: false;
1144
+ hasRuntimeDefault: false;
1145
+ enumValues: ["admin", "redacteur"];
1146
+ baseColumn: never;
1147
+ identity: undefined;
1148
+ generated: undefined;
1149
+ }, {}, {
1150
+ length: number | undefined;
1151
+ }>;
1152
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1153
+ name: "created_at";
1154
+ tableName: "users";
1155
+ dataType: "string";
1156
+ columnType: "SQLiteText";
1157
+ data: string;
1158
+ driverParam: string;
1159
+ notNull: true;
1160
+ hasDefault: true;
1161
+ isPrimaryKey: false;
1162
+ isAutoincrement: false;
1163
+ hasRuntimeDefault: true;
1164
+ enumValues: [string, ...string[]];
1165
+ baseColumn: never;
1166
+ identity: undefined;
1167
+ generated: undefined;
1168
+ }, {}, {
1169
+ length: number | undefined;
1170
+ }>;
1171
+ updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1172
+ name: "updated_at";
1173
+ tableName: "users";
1174
+ dataType: "string";
1175
+ columnType: "SQLiteText";
1176
+ data: string;
1177
+ driverParam: string;
1178
+ notNull: true;
1179
+ hasDefault: true;
1180
+ isPrimaryKey: false;
1181
+ isAutoincrement: false;
1182
+ hasRuntimeDefault: true;
1183
+ enumValues: [string, ...string[]];
1184
+ baseColumn: never;
1185
+ identity: undefined;
1186
+ generated: undefined;
1187
+ }, {}, {
1188
+ length: number | undefined;
1189
+ }>;
1190
+ };
1191
+ dialect: "sqlite";
1192
+ }>;
1193
+ /**
1194
+ * Server-side sessions. The client carries a signed JWT holding `{ session }`,
1195
+ * but revocation lives HERE: a valid JWT whose row is revoked is refused.
1196
+ */
1197
+ declare const sessions: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
1198
+ name: "sessions";
1199
+ schema: undefined;
1200
+ columns: {
1201
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
1202
+ name: "id";
1203
+ tableName: "sessions";
1204
+ dataType: "string";
1205
+ columnType: "SQLiteText";
1206
+ data: string;
1207
+ driverParam: string;
1208
+ notNull: true;
1209
+ hasDefault: true;
1210
+ isPrimaryKey: true;
1211
+ isAutoincrement: false;
1212
+ hasRuntimeDefault: true;
1213
+ enumValues: [string, ...string[]];
1214
+ baseColumn: never;
1215
+ identity: undefined;
1216
+ generated: undefined;
1217
+ }, {}, {
1218
+ length: number | undefined;
1219
+ }>;
1220
+ userId: drizzle_orm_sqlite_core.SQLiteColumn<{
1221
+ name: "user_id";
1222
+ tableName: "sessions";
1223
+ dataType: "string";
1224
+ columnType: "SQLiteText";
1225
+ data: string;
1226
+ driverParam: string;
1227
+ notNull: true;
1228
+ hasDefault: false;
1229
+ isPrimaryKey: false;
1230
+ isAutoincrement: false;
1231
+ hasRuntimeDefault: false;
1232
+ enumValues: [string, ...string[]];
1233
+ baseColumn: never;
1234
+ identity: undefined;
1235
+ generated: undefined;
1236
+ }, {}, {
1237
+ length: number | undefined;
1238
+ }>;
1239
+ expiresAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1240
+ name: "expires_at";
1241
+ tableName: "sessions";
1242
+ dataType: "string";
1243
+ columnType: "SQLiteText";
1244
+ data: string;
1245
+ driverParam: string;
1246
+ notNull: true;
1247
+ hasDefault: false;
1248
+ isPrimaryKey: false;
1249
+ isAutoincrement: false;
1250
+ hasRuntimeDefault: false;
1251
+ enumValues: [string, ...string[]];
1252
+ baseColumn: never;
1253
+ identity: undefined;
1254
+ generated: undefined;
1255
+ }, {}, {
1256
+ length: number | undefined;
1257
+ }>;
1258
+ revokedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1259
+ name: "revoked_at";
1260
+ tableName: "sessions";
1261
+ dataType: "string";
1262
+ columnType: "SQLiteText";
1263
+ data: string;
1264
+ driverParam: string;
1265
+ notNull: false;
1266
+ hasDefault: false;
1267
+ isPrimaryKey: false;
1268
+ isAutoincrement: false;
1269
+ hasRuntimeDefault: false;
1270
+ enumValues: [string, ...string[]];
1271
+ baseColumn: never;
1272
+ identity: undefined;
1273
+ generated: undefined;
1274
+ }, {}, {
1275
+ length: number | undefined;
1276
+ }>;
1277
+ ua: drizzle_orm_sqlite_core.SQLiteColumn<{
1278
+ name: "ua";
1279
+ tableName: "sessions";
1280
+ dataType: "string";
1281
+ columnType: "SQLiteText";
1282
+ data: string;
1283
+ driverParam: string;
1284
+ notNull: false;
1285
+ hasDefault: false;
1286
+ isPrimaryKey: false;
1287
+ isAutoincrement: false;
1288
+ hasRuntimeDefault: false;
1289
+ enumValues: [string, ...string[]];
1290
+ baseColumn: never;
1291
+ identity: undefined;
1292
+ generated: undefined;
1293
+ }, {}, {
1294
+ length: number | undefined;
1295
+ }>;
1296
+ ip: drizzle_orm_sqlite_core.SQLiteColumn<{
1297
+ name: "ip";
1298
+ tableName: "sessions";
1299
+ dataType: "string";
1300
+ columnType: "SQLiteText";
1301
+ data: string;
1302
+ driverParam: string;
1303
+ notNull: false;
1304
+ hasDefault: false;
1305
+ isPrimaryKey: false;
1306
+ isAutoincrement: false;
1307
+ hasRuntimeDefault: false;
1308
+ enumValues: [string, ...string[]];
1309
+ baseColumn: never;
1310
+ identity: undefined;
1311
+ generated: undefined;
1312
+ }, {}, {
1313
+ length: number | undefined;
1314
+ }>;
1315
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1316
+ name: "created_at";
1317
+ tableName: "sessions";
1318
+ dataType: "string";
1319
+ columnType: "SQLiteText";
1320
+ data: string;
1321
+ driverParam: string;
1322
+ notNull: true;
1323
+ hasDefault: true;
1324
+ isPrimaryKey: false;
1325
+ isAutoincrement: false;
1326
+ hasRuntimeDefault: true;
1327
+ enumValues: [string, ...string[]];
1328
+ baseColumn: never;
1329
+ identity: undefined;
1330
+ generated: undefined;
1331
+ }, {}, {
1332
+ length: number | undefined;
1333
+ }>;
1334
+ };
1335
+ dialect: "sqlite";
1336
+ }>;
1337
+ /** Single-use, time-limited invitations (crypto-random token, stored hashed). */
1338
+ declare const invitations: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
1339
+ name: "invitations";
1340
+ schema: undefined;
1341
+ columns: {
1342
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
1343
+ name: "id";
1344
+ tableName: "invitations";
1345
+ dataType: "string";
1346
+ columnType: "SQLiteText";
1347
+ data: string;
1348
+ driverParam: string;
1349
+ notNull: true;
1350
+ hasDefault: true;
1351
+ isPrimaryKey: true;
1352
+ isAutoincrement: false;
1353
+ hasRuntimeDefault: true;
1354
+ enumValues: [string, ...string[]];
1355
+ baseColumn: never;
1356
+ identity: undefined;
1357
+ generated: undefined;
1358
+ }, {}, {
1359
+ length: number | undefined;
1360
+ }>;
1361
+ email: drizzle_orm_sqlite_core.SQLiteColumn<{
1362
+ name: "email";
1363
+ tableName: "invitations";
1364
+ dataType: "string";
1365
+ columnType: "SQLiteText";
1366
+ data: string;
1367
+ driverParam: string;
1368
+ notNull: true;
1369
+ hasDefault: false;
1370
+ isPrimaryKey: false;
1371
+ isAutoincrement: false;
1372
+ hasRuntimeDefault: false;
1373
+ enumValues: [string, ...string[]];
1374
+ baseColumn: never;
1375
+ identity: undefined;
1376
+ generated: undefined;
1377
+ }, {}, {
1378
+ length: number | undefined;
1379
+ }>;
1380
+ tokenHash: drizzle_orm_sqlite_core.SQLiteColumn<{
1381
+ name: "token_hash";
1382
+ tableName: "invitations";
1383
+ dataType: "string";
1384
+ columnType: "SQLiteText";
1385
+ data: string;
1386
+ driverParam: string;
1387
+ notNull: true;
1388
+ hasDefault: false;
1389
+ isPrimaryKey: false;
1390
+ isAutoincrement: false;
1391
+ hasRuntimeDefault: false;
1392
+ enumValues: [string, ...string[]];
1393
+ baseColumn: never;
1394
+ identity: undefined;
1395
+ generated: undefined;
1396
+ }, {}, {
1397
+ length: number | undefined;
1398
+ }>;
1399
+ role: drizzle_orm_sqlite_core.SQLiteColumn<{
1400
+ name: "role";
1401
+ tableName: "invitations";
1402
+ dataType: "string";
1403
+ columnType: "SQLiteText";
1404
+ data: "admin" | "redacteur";
1405
+ driverParam: string;
1406
+ notNull: true;
1407
+ hasDefault: true;
1408
+ isPrimaryKey: false;
1409
+ isAutoincrement: false;
1410
+ hasRuntimeDefault: false;
1411
+ enumValues: ["admin", "redacteur"];
1412
+ baseColumn: never;
1413
+ identity: undefined;
1414
+ generated: undefined;
1415
+ }, {}, {
1416
+ length: number | undefined;
1417
+ }>;
1418
+ expiresAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1419
+ name: "expires_at";
1420
+ tableName: "invitations";
1421
+ dataType: "string";
1422
+ columnType: "SQLiteText";
1423
+ data: string;
1424
+ driverParam: string;
1425
+ notNull: true;
1426
+ hasDefault: false;
1427
+ isPrimaryKey: false;
1428
+ isAutoincrement: false;
1429
+ hasRuntimeDefault: false;
1430
+ enumValues: [string, ...string[]];
1431
+ baseColumn: never;
1432
+ identity: undefined;
1433
+ generated: undefined;
1434
+ }, {}, {
1435
+ length: number | undefined;
1436
+ }>;
1437
+ usedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1438
+ name: "used_at";
1439
+ tableName: "invitations";
1440
+ dataType: "string";
1441
+ columnType: "SQLiteText";
1442
+ data: string;
1443
+ driverParam: string;
1444
+ notNull: false;
1445
+ hasDefault: false;
1446
+ isPrimaryKey: false;
1447
+ isAutoincrement: false;
1448
+ hasRuntimeDefault: false;
1449
+ enumValues: [string, ...string[]];
1450
+ baseColumn: never;
1451
+ identity: undefined;
1452
+ generated: undefined;
1453
+ }, {}, {
1454
+ length: number | undefined;
1455
+ }>;
1456
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1457
+ name: "created_at";
1458
+ tableName: "invitations";
1459
+ dataType: "string";
1460
+ columnType: "SQLiteText";
1461
+ data: string;
1462
+ driverParam: string;
1463
+ notNull: true;
1464
+ hasDefault: true;
1465
+ isPrimaryKey: false;
1466
+ isAutoincrement: false;
1467
+ hasRuntimeDefault: true;
1468
+ enumValues: [string, ...string[]];
1469
+ baseColumn: never;
1470
+ identity: undefined;
1471
+ generated: undefined;
1472
+ }, {}, {
1473
+ length: number | undefined;
1474
+ }>;
1475
+ };
1476
+ dialect: "sqlite";
1477
+ }>;
1478
+ /** Machine tokens for site builds — shown once, stored hashed, revocable. */
1479
+ declare const apiTokens: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
1480
+ name: "api_tokens";
1481
+ schema: undefined;
1482
+ columns: {
1483
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
1484
+ name: "id";
1485
+ tableName: "api_tokens";
1486
+ dataType: "string";
1487
+ columnType: "SQLiteText";
1488
+ data: string;
1489
+ driverParam: string;
1490
+ notNull: true;
1491
+ hasDefault: true;
1492
+ isPrimaryKey: true;
1493
+ isAutoincrement: false;
1494
+ hasRuntimeDefault: true;
1495
+ enumValues: [string, ...string[]];
1496
+ baseColumn: never;
1497
+ identity: undefined;
1498
+ generated: undefined;
1499
+ }, {}, {
1500
+ length: number | undefined;
1501
+ }>;
1502
+ name: drizzle_orm_sqlite_core.SQLiteColumn<{
1503
+ name: "name";
1504
+ tableName: "api_tokens";
1505
+ dataType: "string";
1506
+ columnType: "SQLiteText";
1507
+ data: string;
1508
+ driverParam: string;
1509
+ notNull: true;
1510
+ hasDefault: false;
1511
+ isPrimaryKey: false;
1512
+ isAutoincrement: false;
1513
+ hasRuntimeDefault: false;
1514
+ enumValues: [string, ...string[]];
1515
+ baseColumn: never;
1516
+ identity: undefined;
1517
+ generated: undefined;
1518
+ }, {}, {
1519
+ length: number | undefined;
1520
+ }>;
1521
+ tokenHash: drizzle_orm_sqlite_core.SQLiteColumn<{
1522
+ name: "token_hash";
1523
+ tableName: "api_tokens";
1524
+ dataType: "string";
1525
+ columnType: "SQLiteText";
1526
+ data: string;
1527
+ driverParam: string;
1528
+ notNull: true;
1529
+ hasDefault: false;
1530
+ isPrimaryKey: false;
1531
+ isAutoincrement: false;
1532
+ hasRuntimeDefault: false;
1533
+ enumValues: [string, ...string[]];
1534
+ baseColumn: never;
1535
+ identity: undefined;
1536
+ generated: undefined;
1537
+ }, {}, {
1538
+ length: number | undefined;
1539
+ }>;
1540
+ lastUsedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1541
+ name: "last_used_at";
1542
+ tableName: "api_tokens";
1543
+ dataType: "string";
1544
+ columnType: "SQLiteText";
1545
+ data: string;
1546
+ driverParam: string;
1547
+ notNull: false;
1548
+ hasDefault: false;
1549
+ isPrimaryKey: false;
1550
+ isAutoincrement: false;
1551
+ hasRuntimeDefault: false;
1552
+ enumValues: [string, ...string[]];
1553
+ baseColumn: never;
1554
+ identity: undefined;
1555
+ generated: undefined;
1556
+ }, {}, {
1557
+ length: number | undefined;
1558
+ }>;
1559
+ revokedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1560
+ name: "revoked_at";
1561
+ tableName: "api_tokens";
1562
+ dataType: "string";
1563
+ columnType: "SQLiteText";
1564
+ data: string;
1565
+ driverParam: string;
1566
+ notNull: false;
1567
+ hasDefault: false;
1568
+ isPrimaryKey: false;
1569
+ isAutoincrement: false;
1570
+ hasRuntimeDefault: false;
1571
+ enumValues: [string, ...string[]];
1572
+ baseColumn: never;
1573
+ identity: undefined;
1574
+ generated: undefined;
1575
+ }, {}, {
1576
+ length: number | undefined;
1577
+ }>;
1578
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1579
+ name: "created_at";
1580
+ tableName: "api_tokens";
1581
+ dataType: "string";
1582
+ columnType: "SQLiteText";
1583
+ data: string;
1584
+ driverParam: string;
1585
+ notNull: true;
1586
+ hasDefault: true;
1587
+ isPrimaryKey: false;
1588
+ isAutoincrement: false;
1589
+ hasRuntimeDefault: true;
1590
+ enumValues: [string, ...string[]];
1591
+ baseColumn: never;
1592
+ identity: undefined;
1593
+ generated: undefined;
1594
+ }, {}, {
1595
+ length: number | undefined;
1596
+ }>;
1597
+ };
1598
+ dialect: "sqlite";
1599
+ }>;
1600
+ type User = typeof users.$inferSelect;
1601
+ type NewUser = typeof users.$inferInsert;
1602
+ type Session = typeof sessions.$inferSelect;
1603
+ type Invitation = typeof invitations.$inferSelect;
1604
+ type ApiToken = typeof apiTokens.$inferSelect;
1605
+ declare const media: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
1606
+ name: "media";
1607
+ schema: undefined;
1608
+ columns: {
1609
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
1610
+ name: "id";
1611
+ tableName: "media";
1612
+ dataType: "string";
1613
+ columnType: "SQLiteText";
1614
+ data: string;
1615
+ driverParam: string;
1616
+ notNull: true;
1617
+ hasDefault: true;
1618
+ isPrimaryKey: true;
1619
+ isAutoincrement: false;
1620
+ hasRuntimeDefault: true;
1621
+ enumValues: [string, ...string[]];
1622
+ baseColumn: never;
1623
+ identity: undefined;
1624
+ generated: undefined;
1625
+ }, {}, {
1626
+ length: number | undefined;
1627
+ }>;
1628
+ filename: drizzle_orm_sqlite_core.SQLiteColumn<{
1629
+ name: "filename";
1630
+ tableName: "media";
1631
+ dataType: "string";
1632
+ columnType: "SQLiteText";
1633
+ data: string;
1634
+ driverParam: string;
1635
+ notNull: true;
1636
+ hasDefault: false;
1637
+ isPrimaryKey: false;
1638
+ isAutoincrement: false;
1639
+ hasRuntimeDefault: false;
1640
+ enumValues: [string, ...string[]];
1641
+ baseColumn: never;
1642
+ identity: undefined;
1643
+ generated: undefined;
1644
+ }, {}, {
1645
+ length: number | undefined;
1646
+ }>;
1647
+ mime: drizzle_orm_sqlite_core.SQLiteColumn<{
1648
+ name: "mime";
1649
+ tableName: "media";
1650
+ dataType: "string";
1651
+ columnType: "SQLiteText";
1652
+ data: string;
1653
+ driverParam: string;
1654
+ notNull: true;
1655
+ hasDefault: false;
1656
+ isPrimaryKey: false;
1657
+ isAutoincrement: false;
1658
+ hasRuntimeDefault: false;
1659
+ enumValues: [string, ...string[]];
1660
+ baseColumn: never;
1661
+ identity: undefined;
1662
+ generated: undefined;
1663
+ }, {}, {
1664
+ length: number | undefined;
1665
+ }>;
1666
+ size: drizzle_orm_sqlite_core.SQLiteColumn<{
1667
+ name: "size";
1668
+ tableName: "media";
1669
+ dataType: "number";
1670
+ columnType: "SQLiteInteger";
1671
+ data: number;
1672
+ driverParam: number;
1673
+ notNull: true;
1674
+ hasDefault: false;
1675
+ isPrimaryKey: false;
1676
+ isAutoincrement: false;
1677
+ hasRuntimeDefault: false;
1678
+ enumValues: undefined;
1679
+ baseColumn: never;
1680
+ identity: undefined;
1681
+ generated: undefined;
1682
+ }, {}, {}>;
1683
+ alt: drizzle_orm_sqlite_core.SQLiteColumn<{
1684
+ name: "alt";
1685
+ tableName: "media";
1686
+ dataType: "string";
1687
+ columnType: "SQLiteText";
1688
+ data: string;
1689
+ driverParam: string;
1690
+ notNull: false;
1691
+ hasDefault: false;
1692
+ isPrimaryKey: false;
1693
+ isAutoincrement: false;
1694
+ hasRuntimeDefault: false;
1695
+ enumValues: [string, ...string[]];
1696
+ baseColumn: never;
1697
+ identity: undefined;
1698
+ generated: undefined;
1699
+ }, {}, {
1700
+ length: number | undefined;
1701
+ }>;
1702
+ caption: drizzle_orm_sqlite_core.SQLiteColumn<{
1703
+ name: "caption";
1704
+ tableName: "media";
1705
+ dataType: "string";
1706
+ columnType: "SQLiteText";
1707
+ data: string;
1708
+ driverParam: string;
1709
+ notNull: false;
1710
+ hasDefault: false;
1711
+ isPrimaryKey: false;
1712
+ isAutoincrement: false;
1713
+ hasRuntimeDefault: false;
1714
+ enumValues: [string, ...string[]];
1715
+ baseColumn: never;
1716
+ identity: undefined;
1717
+ generated: undefined;
1718
+ }, {}, {
1719
+ length: number | undefined;
1720
+ }>;
1721
+ objects: drizzle_orm_sqlite_core.SQLiteColumn<{
1722
+ name: "objects";
1723
+ tableName: "media";
1724
+ dataType: "json";
1725
+ columnType: "SQLiteTextJson";
1726
+ data: Record<string, unknown>;
1727
+ driverParam: string;
1728
+ notNull: true;
1729
+ hasDefault: false;
1730
+ isPrimaryKey: false;
1731
+ isAutoincrement: false;
1732
+ hasRuntimeDefault: false;
1733
+ enumValues: undefined;
1734
+ baseColumn: never;
1735
+ identity: undefined;
1736
+ generated: undefined;
1737
+ }, {}, {
1738
+ $type: Record<string, unknown>;
1739
+ }>;
1740
+ metaData: drizzle_orm_sqlite_core.SQLiteColumn<{
1741
+ name: "meta_data";
1742
+ tableName: "media";
1743
+ dataType: "json";
1744
+ columnType: "SQLiteTextJson";
1745
+ data: Record<string, unknown>;
1746
+ driverParam: string;
1747
+ notNull: false;
1748
+ hasDefault: false;
1749
+ isPrimaryKey: false;
1750
+ isAutoincrement: false;
1751
+ hasRuntimeDefault: false;
1752
+ enumValues: undefined;
1753
+ baseColumn: never;
1754
+ identity: undefined;
1755
+ generated: undefined;
1756
+ }, {}, {
1757
+ $type: Record<string, unknown>;
1758
+ }>;
1759
+ createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
1760
+ name: "created_by";
1761
+ tableName: "media";
1762
+ dataType: "string";
1763
+ columnType: "SQLiteText";
1764
+ data: string;
1765
+ driverParam: string;
1766
+ notNull: false;
1767
+ hasDefault: false;
1768
+ isPrimaryKey: false;
1769
+ isAutoincrement: false;
1770
+ hasRuntimeDefault: false;
1771
+ enumValues: [string, ...string[]];
1772
+ baseColumn: never;
1773
+ identity: undefined;
1774
+ generated: undefined;
1775
+ }, {}, {
1776
+ length: number | undefined;
1777
+ }>;
1778
+ updatedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
1779
+ name: "updated_by";
1780
+ tableName: "media";
1781
+ dataType: "string";
1782
+ columnType: "SQLiteText";
1783
+ data: string;
1784
+ driverParam: string;
1785
+ notNull: false;
1786
+ hasDefault: false;
1787
+ isPrimaryKey: false;
1788
+ isAutoincrement: false;
1789
+ hasRuntimeDefault: false;
1790
+ enumValues: [string, ...string[]];
1791
+ baseColumn: never;
1792
+ identity: undefined;
1793
+ generated: undefined;
1794
+ }, {}, {
1795
+ length: number | undefined;
1796
+ }>;
1797
+ legacyExtra: drizzle_orm_sqlite_core.SQLiteColumn<{
1798
+ name: "legacy_extra";
1799
+ tableName: "media";
1800
+ dataType: "json";
1801
+ columnType: "SQLiteTextJson";
1802
+ data: Record<string, unknown> | null;
1803
+ driverParam: string;
1804
+ notNull: false;
1805
+ hasDefault: false;
1806
+ isPrimaryKey: false;
1807
+ isAutoincrement: false;
1808
+ hasRuntimeDefault: false;
1809
+ enumValues: undefined;
1810
+ baseColumn: never;
1811
+ identity: undefined;
1812
+ generated: undefined;
1813
+ }, {}, {
1814
+ $type: Record<string, unknown> | null;
1815
+ }>;
1816
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1817
+ name: "created_at";
1818
+ tableName: "media";
1819
+ dataType: "string";
1820
+ columnType: "SQLiteText";
1821
+ data: string;
1822
+ driverParam: string;
1823
+ notNull: true;
1824
+ hasDefault: true;
1825
+ isPrimaryKey: false;
1826
+ isAutoincrement: false;
1827
+ hasRuntimeDefault: true;
1828
+ enumValues: [string, ...string[]];
1829
+ baseColumn: never;
1830
+ identity: undefined;
1831
+ generated: undefined;
1832
+ }, {}, {
1833
+ length: number | undefined;
1834
+ }>;
1835
+ updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1836
+ name: "updated_at";
1837
+ tableName: "media";
1838
+ dataType: "string";
1839
+ columnType: "SQLiteText";
1840
+ data: string;
1841
+ driverParam: string;
1842
+ notNull: true;
1843
+ hasDefault: true;
1844
+ isPrimaryKey: false;
1845
+ isAutoincrement: false;
1846
+ hasRuntimeDefault: true;
1847
+ enumValues: [string, ...string[]];
1848
+ baseColumn: never;
1849
+ identity: undefined;
1850
+ generated: undefined;
1851
+ }, {}, {
1852
+ length: number | undefined;
1853
+ }>;
1854
+ };
1855
+ dialect: "sqlite";
1856
+ }>;
1857
+ type Media = typeof media.$inferSelect;
1858
+ type NewMedia = typeof media.$inferInsert;
1859
+ /** Collection definitions — the primary content model of Open Commune. */
1860
+ declare const collectionDefinitions: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
1861
+ name: "collection_definitions";
1862
+ schema: undefined;
1863
+ columns: {
1864
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
1865
+ name: "id";
1866
+ tableName: "collection_definitions";
1867
+ dataType: "string";
1868
+ columnType: "SQLiteText";
1869
+ data: string;
1870
+ driverParam: string;
1871
+ notNull: true;
1872
+ hasDefault: true;
1873
+ isPrimaryKey: true;
1874
+ isAutoincrement: false;
1875
+ hasRuntimeDefault: true;
1876
+ enumValues: [string, ...string[]];
1877
+ baseColumn: never;
1878
+ identity: undefined;
1879
+ generated: undefined;
1880
+ }, {}, {
1881
+ length: number | undefined;
1882
+ }>;
1883
+ name: drizzle_orm_sqlite_core.SQLiteColumn<{
1884
+ name: "name";
1885
+ tableName: "collection_definitions";
1886
+ dataType: "string";
1887
+ columnType: "SQLiteText";
1888
+ data: string;
1889
+ driverParam: string;
1890
+ notNull: true;
1891
+ hasDefault: false;
1892
+ isPrimaryKey: false;
1893
+ isAutoincrement: false;
1894
+ hasRuntimeDefault: false;
1895
+ enumValues: [string, ...string[]];
1896
+ baseColumn: never;
1897
+ identity: undefined;
1898
+ generated: undefined;
1899
+ }, {}, {
1900
+ length: number | undefined;
1901
+ }>;
1902
+ slug: drizzle_orm_sqlite_core.SQLiteColumn<{
1903
+ name: "slug";
1904
+ tableName: "collection_definitions";
1905
+ dataType: "string";
1906
+ columnType: "SQLiteText";
1907
+ data: string;
1908
+ driverParam: string;
1909
+ notNull: true;
1910
+ hasDefault: false;
1911
+ isPrimaryKey: false;
1912
+ isAutoincrement: false;
1913
+ hasRuntimeDefault: false;
1914
+ enumValues: [string, ...string[]];
1915
+ baseColumn: never;
1916
+ identity: undefined;
1917
+ generated: undefined;
1918
+ }, {}, {
1919
+ length: number | undefined;
1920
+ }>;
1921
+ description: drizzle_orm_sqlite_core.SQLiteColumn<{
1922
+ name: "description";
1923
+ tableName: "collection_definitions";
1924
+ dataType: "string";
1925
+ columnType: "SQLiteText";
1926
+ data: string;
1927
+ driverParam: string;
1928
+ notNull: false;
1929
+ hasDefault: false;
1930
+ isPrimaryKey: false;
1931
+ isAutoincrement: false;
1932
+ hasRuntimeDefault: false;
1933
+ enumValues: [string, ...string[]];
1934
+ baseColumn: never;
1935
+ identity: undefined;
1936
+ generated: undefined;
1937
+ }, {}, {
1938
+ length: number | undefined;
1939
+ }>;
1940
+ fields: drizzle_orm_sqlite_core.SQLiteColumn<{
1941
+ name: "fields";
1942
+ tableName: "collection_definitions";
1943
+ dataType: "json";
1944
+ columnType: "SQLiteTextJson";
1945
+ data: {
1946
+ name: string;
1947
+ label: string;
1948
+ type: "number" | "boolean" | "text" | "rich-text" | "date" | "media" | "relation" | "select" | "steps" | "json";
1949
+ required: boolean;
1950
+ hidden: boolean;
1951
+ options?: string[] | undefined;
1952
+ target?: string | undefined;
1953
+ }[];
1954
+ driverParam: string;
1955
+ notNull: true;
1956
+ hasDefault: false;
1957
+ isPrimaryKey: false;
1958
+ isAutoincrement: false;
1959
+ hasRuntimeDefault: false;
1960
+ enumValues: undefined;
1961
+ baseColumn: never;
1962
+ identity: undefined;
1963
+ generated: undefined;
1964
+ }, {}, {
1965
+ $type: {
1966
+ name: string;
1967
+ label: string;
1968
+ type: "number" | "boolean" | "text" | "rich-text" | "date" | "media" | "relation" | "select" | "steps" | "json";
1969
+ required: boolean;
1970
+ hidden: boolean;
1971
+ options?: string[] | undefined;
1972
+ target?: string | undefined;
1973
+ }[];
1974
+ }>;
1975
+ editor: drizzle_orm_sqlite_core.SQLiteColumn<{
1976
+ name: "editor";
1977
+ tableName: "collection_definitions";
1978
+ dataType: "json";
1979
+ columnType: "SQLiteTextJson";
1980
+ data: Record<string, unknown>;
1981
+ driverParam: string;
1982
+ notNull: false;
1983
+ hasDefault: false;
1984
+ isPrimaryKey: false;
1985
+ isAutoincrement: false;
1986
+ hasRuntimeDefault: false;
1987
+ enumValues: undefined;
1988
+ baseColumn: never;
1989
+ identity: undefined;
1990
+ generated: undefined;
1991
+ }, {}, {
1992
+ $type: Record<string, unknown>;
1993
+ }>;
1994
+ display: drizzle_orm_sqlite_core.SQLiteColumn<{
1995
+ name: "display";
1996
+ tableName: "collection_definitions";
1997
+ dataType: "json";
1998
+ columnType: "SQLiteTextJson";
1999
+ data: Record<string, unknown>;
2000
+ driverParam: string;
2001
+ notNull: false;
2002
+ hasDefault: false;
2003
+ isPrimaryKey: false;
2004
+ isAutoincrement: false;
2005
+ hasRuntimeDefault: false;
2006
+ enumValues: undefined;
2007
+ baseColumn: never;
2008
+ identity: undefined;
2009
+ generated: undefined;
2010
+ }, {}, {
2011
+ $type: Record<string, unknown>;
2012
+ }>;
2013
+ headings: drizzle_orm_sqlite_core.SQLiteColumn<{
2014
+ name: "headings";
2015
+ tableName: "collection_definitions";
2016
+ dataType: "json";
2017
+ columnType: "SQLiteTextJson";
2018
+ data: Record<string, unknown>;
2019
+ driverParam: string;
2020
+ notNull: false;
2021
+ hasDefault: false;
2022
+ isPrimaryKey: false;
2023
+ isAutoincrement: false;
2024
+ hasRuntimeDefault: false;
2025
+ enumValues: undefined;
2026
+ baseColumn: never;
2027
+ identity: undefined;
2028
+ generated: undefined;
2029
+ }, {}, {
2030
+ $type: Record<string, unknown>;
2031
+ }>;
2032
+ createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
2033
+ name: "created_by";
2034
+ tableName: "collection_definitions";
2035
+ dataType: "string";
2036
+ columnType: "SQLiteText";
2037
+ data: string;
2038
+ driverParam: string;
2039
+ notNull: false;
2040
+ hasDefault: false;
2041
+ isPrimaryKey: false;
2042
+ isAutoincrement: false;
2043
+ hasRuntimeDefault: false;
2044
+ enumValues: [string, ...string[]];
2045
+ baseColumn: never;
2046
+ identity: undefined;
2047
+ generated: undefined;
2048
+ }, {}, {
2049
+ length: number | undefined;
2050
+ }>;
2051
+ updatedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
2052
+ name: "updated_by";
2053
+ tableName: "collection_definitions";
2054
+ dataType: "string";
2055
+ columnType: "SQLiteText";
2056
+ data: string;
2057
+ driverParam: string;
2058
+ notNull: false;
2059
+ hasDefault: false;
2060
+ isPrimaryKey: false;
2061
+ isAutoincrement: false;
2062
+ hasRuntimeDefault: false;
2063
+ enumValues: [string, ...string[]];
2064
+ baseColumn: never;
2065
+ identity: undefined;
2066
+ generated: undefined;
2067
+ }, {}, {
2068
+ length: number | undefined;
2069
+ }>;
2070
+ legacyExtra: drizzle_orm_sqlite_core.SQLiteColumn<{
2071
+ name: "legacy_extra";
2072
+ tableName: "collection_definitions";
2073
+ dataType: "json";
2074
+ columnType: "SQLiteTextJson";
2075
+ data: Record<string, unknown> | null;
2076
+ driverParam: string;
2077
+ notNull: false;
2078
+ hasDefault: false;
2079
+ isPrimaryKey: false;
2080
+ isAutoincrement: false;
2081
+ hasRuntimeDefault: false;
2082
+ enumValues: undefined;
2083
+ baseColumn: never;
2084
+ identity: undefined;
2085
+ generated: undefined;
2086
+ }, {}, {
2087
+ $type: Record<string, unknown> | null;
2088
+ }>;
2089
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
2090
+ name: "created_at";
2091
+ tableName: "collection_definitions";
2092
+ dataType: "string";
2093
+ columnType: "SQLiteText";
2094
+ data: string;
2095
+ driverParam: string;
2096
+ notNull: true;
2097
+ hasDefault: true;
2098
+ isPrimaryKey: false;
2099
+ isAutoincrement: false;
2100
+ hasRuntimeDefault: true;
2101
+ enumValues: [string, ...string[]];
2102
+ baseColumn: never;
2103
+ identity: undefined;
2104
+ generated: undefined;
2105
+ }, {}, {
2106
+ length: number | undefined;
2107
+ }>;
2108
+ updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
2109
+ name: "updated_at";
2110
+ tableName: "collection_definitions";
2111
+ dataType: "string";
2112
+ columnType: "SQLiteText";
2113
+ data: string;
2114
+ driverParam: string;
2115
+ notNull: true;
2116
+ hasDefault: true;
2117
+ isPrimaryKey: false;
2118
+ isAutoincrement: false;
2119
+ hasRuntimeDefault: true;
2120
+ enumValues: [string, ...string[]];
2121
+ baseColumn: never;
2122
+ identity: undefined;
2123
+ generated: undefined;
2124
+ }, {}, {
2125
+ length: number | undefined;
2126
+ }>;
2127
+ };
2128
+ dialect: "sqlite";
2129
+ }>;
2130
+ /** Entries of a collection — validated against the definition's fields. */
2131
+ declare const entries: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
2132
+ name: "entries";
2133
+ schema: undefined;
2134
+ columns: {
2135
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
2136
+ name: "id";
2137
+ tableName: "entries";
2138
+ dataType: "string";
2139
+ columnType: "SQLiteText";
2140
+ data: string;
2141
+ driverParam: string;
2142
+ notNull: true;
2143
+ hasDefault: true;
2144
+ isPrimaryKey: true;
2145
+ isAutoincrement: false;
2146
+ hasRuntimeDefault: true;
2147
+ enumValues: [string, ...string[]];
2148
+ baseColumn: never;
2149
+ identity: undefined;
2150
+ generated: undefined;
2151
+ }, {}, {
2152
+ length: number | undefined;
2153
+ }>;
2154
+ collectionId: drizzle_orm_sqlite_core.SQLiteColumn<{
2155
+ name: "collection_id";
2156
+ tableName: "entries";
2157
+ dataType: "string";
2158
+ columnType: "SQLiteText";
2159
+ data: string;
2160
+ driverParam: string;
2161
+ notNull: true;
2162
+ hasDefault: false;
2163
+ isPrimaryKey: false;
2164
+ isAutoincrement: false;
2165
+ hasRuntimeDefault: false;
2166
+ enumValues: [string, ...string[]];
2167
+ baseColumn: never;
2168
+ identity: undefined;
2169
+ generated: undefined;
2170
+ }, {}, {
2171
+ length: number | undefined;
2172
+ }>;
2173
+ title: drizzle_orm_sqlite_core.SQLiteColumn<{
2174
+ name: "title";
2175
+ tableName: "entries";
2176
+ dataType: "string";
2177
+ columnType: "SQLiteText";
2178
+ data: string;
2179
+ driverParam: string;
2180
+ notNull: true;
2181
+ hasDefault: false;
2182
+ isPrimaryKey: false;
2183
+ isAutoincrement: false;
2184
+ hasRuntimeDefault: false;
2185
+ enumValues: [string, ...string[]];
2186
+ baseColumn: never;
2187
+ identity: undefined;
2188
+ generated: undefined;
2189
+ }, {}, {
2190
+ length: number | undefined;
2191
+ }>;
2192
+ slug: drizzle_orm_sqlite_core.SQLiteColumn<{
2193
+ name: "slug";
2194
+ tableName: "entries";
2195
+ dataType: "string";
2196
+ columnType: "SQLiteText";
2197
+ data: string;
2198
+ driverParam: string;
2199
+ notNull: true;
2200
+ hasDefault: false;
2201
+ isPrimaryKey: false;
2202
+ isAutoincrement: false;
2203
+ hasRuntimeDefault: false;
2204
+ enumValues: [string, ...string[]];
2205
+ baseColumn: never;
2206
+ identity: undefined;
2207
+ generated: undefined;
2208
+ }, {}, {
2209
+ length: number | undefined;
2210
+ }>;
2211
+ data: drizzle_orm_sqlite_core.SQLiteColumn<{
2212
+ name: "data";
2213
+ tableName: "entries";
2214
+ dataType: "json";
2215
+ columnType: "SQLiteTextJson";
2216
+ data: Record<string, unknown>;
2217
+ driverParam: string;
2218
+ notNull: true;
2219
+ hasDefault: false;
2220
+ isPrimaryKey: false;
2221
+ isAutoincrement: false;
2222
+ hasRuntimeDefault: false;
2223
+ enumValues: undefined;
2224
+ baseColumn: never;
2225
+ identity: undefined;
2226
+ generated: undefined;
2227
+ }, {}, {
2228
+ $type: Record<string, unknown>;
2229
+ }>;
2230
+ related: drizzle_orm_sqlite_core.SQLiteColumn<{
2231
+ name: "related";
2232
+ tableName: "entries";
2233
+ dataType: "json";
2234
+ columnType: "SQLiteTextJson";
2235
+ data: string[];
2236
+ driverParam: string;
2237
+ notNull: false;
2238
+ hasDefault: false;
2239
+ isPrimaryKey: false;
2240
+ isAutoincrement: false;
2241
+ hasRuntimeDefault: false;
2242
+ enumValues: undefined;
2243
+ baseColumn: never;
2244
+ identity: undefined;
2245
+ generated: undefined;
2246
+ }, {}, {
2247
+ $type: string[];
2248
+ }>;
2249
+ createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
2250
+ name: "created_by";
2251
+ tableName: "entries";
2252
+ dataType: "string";
2253
+ columnType: "SQLiteText";
2254
+ data: string;
2255
+ driverParam: string;
2256
+ notNull: false;
2257
+ hasDefault: false;
2258
+ isPrimaryKey: false;
2259
+ isAutoincrement: false;
2260
+ hasRuntimeDefault: false;
2261
+ enumValues: [string, ...string[]];
2262
+ baseColumn: never;
2263
+ identity: undefined;
2264
+ generated: undefined;
2265
+ }, {}, {
2266
+ length: number | undefined;
2267
+ }>;
2268
+ updatedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
2269
+ name: "updated_by";
2270
+ tableName: "entries";
2271
+ dataType: "string";
2272
+ columnType: "SQLiteText";
2273
+ data: string;
2274
+ driverParam: string;
2275
+ notNull: false;
2276
+ hasDefault: false;
2277
+ isPrimaryKey: false;
2278
+ isAutoincrement: false;
2279
+ hasRuntimeDefault: false;
2280
+ enumValues: [string, ...string[]];
2281
+ baseColumn: never;
2282
+ identity: undefined;
2283
+ generated: undefined;
2284
+ }, {}, {
2285
+ length: number | undefined;
2286
+ }>;
2287
+ status: drizzle_orm_sqlite_core.SQLiteColumn<{
2288
+ name: "status";
2289
+ tableName: "entries";
2290
+ dataType: "string";
2291
+ columnType: "SQLiteText";
2292
+ data: "draft" | "waiting" | "ready" | "scheduled" | "published";
2293
+ driverParam: string;
2294
+ notNull: true;
2295
+ hasDefault: true;
2296
+ isPrimaryKey: false;
2297
+ isAutoincrement: false;
2298
+ hasRuntimeDefault: false;
2299
+ enumValues: ["draft", "waiting", "ready", "scheduled", "published"];
2300
+ baseColumn: never;
2301
+ identity: undefined;
2302
+ generated: undefined;
2303
+ }, {}, {
2304
+ length: number | undefined;
2305
+ }>;
2306
+ publishedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
2307
+ name: "published_at";
2308
+ tableName: "entries";
2309
+ dataType: "string";
2310
+ columnType: "SQLiteText";
2311
+ data: string;
2312
+ driverParam: string;
2313
+ notNull: false;
2314
+ hasDefault: false;
2315
+ isPrimaryKey: false;
2316
+ isAutoincrement: false;
2317
+ hasRuntimeDefault: false;
2318
+ enumValues: [string, ...string[]];
2319
+ baseColumn: never;
2320
+ identity: undefined;
2321
+ generated: undefined;
2322
+ }, {}, {
2323
+ length: number | undefined;
2324
+ }>;
2325
+ legacyExtra: drizzle_orm_sqlite_core.SQLiteColumn<{
2326
+ name: "legacy_extra";
2327
+ tableName: "entries";
2328
+ dataType: "json";
2329
+ columnType: "SQLiteTextJson";
2330
+ data: Record<string, unknown> | null;
2331
+ driverParam: string;
2332
+ notNull: false;
2333
+ hasDefault: false;
2334
+ isPrimaryKey: false;
2335
+ isAutoincrement: false;
2336
+ hasRuntimeDefault: false;
2337
+ enumValues: undefined;
2338
+ baseColumn: never;
2339
+ identity: undefined;
2340
+ generated: undefined;
2341
+ }, {}, {
2342
+ $type: Record<string, unknown> | null;
2343
+ }>;
2344
+ createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
2345
+ name: "created_at";
2346
+ tableName: "entries";
2347
+ dataType: "string";
2348
+ columnType: "SQLiteText";
2349
+ data: string;
2350
+ driverParam: string;
2351
+ notNull: true;
2352
+ hasDefault: true;
2353
+ isPrimaryKey: false;
2354
+ isAutoincrement: false;
2355
+ hasRuntimeDefault: true;
2356
+ enumValues: [string, ...string[]];
2357
+ baseColumn: never;
2358
+ identity: undefined;
2359
+ generated: undefined;
2360
+ }, {}, {
2361
+ length: number | undefined;
2362
+ }>;
2363
+ updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
2364
+ name: "updated_at";
2365
+ tableName: "entries";
2366
+ dataType: "string";
2367
+ columnType: "SQLiteText";
2368
+ data: string;
2369
+ driverParam: string;
2370
+ notNull: true;
2371
+ hasDefault: true;
2372
+ isPrimaryKey: false;
2373
+ isAutoincrement: false;
2374
+ hasRuntimeDefault: true;
2375
+ enumValues: [string, ...string[]];
2376
+ baseColumn: never;
2377
+ identity: undefined;
2378
+ generated: undefined;
2379
+ }, {}, {
2380
+ length: number | undefined;
2381
+ }>;
2382
+ };
2383
+ dialect: "sqlite";
2384
+ }>;
2385
+ type CollectionDefinition = typeof collectionDefinitions.$inferSelect;
2386
+ type NewCollectionDefinition = typeof collectionDefinitions.$inferInsert;
2387
+ type Entry = typeof entries.$inferSelect;
2388
+ type NewEntry = typeof entries.$inferInsert;
2389
+
2390
+ type schema_Address = Address;
2391
+ type schema_ApiToken = ApiToken;
2392
+ type schema_CollectionDefinition = CollectionDefinition;
2393
+ type schema_Entry = Entry;
2394
+ declare const schema_FIELD_TYPES: typeof FIELD_TYPES;
2395
+ declare const schema_FieldDefinition: typeof FieldDefinition;
2396
+ declare const schema_FieldType: typeof FieldType;
2397
+ type schema_Invitation = Invitation;
2398
+ type schema_Media = Media;
2399
+ type schema_NewCollectionDefinition = NewCollectionDefinition;
2400
+ type schema_NewEntry = NewEntry;
2401
+ type schema_NewMedia = NewMedia;
2402
+ type schema_NewOrganization = NewOrganization;
2403
+ type schema_NewUser = NewUser;
2404
+ type schema_Organization = Organization;
2405
+ declare const schema_PUBLICATION_STATUSES: typeof PUBLICATION_STATUSES;
2406
+ type schema_Session = Session;
2407
+ type schema_User = User;
2408
+ declare const schema_addressSchema: typeof addressSchema;
2409
+ declare const schema_apiTokens: typeof apiTokens;
2410
+ declare const schema_collectionDefinitions: typeof collectionDefinitions;
2411
+ declare const schema_entries: typeof entries;
2412
+ declare const schema_fieldDefinitionSchema: typeof fieldDefinitionSchema;
2413
+ declare const schema_invitations: typeof invitations;
2414
+ declare const schema_media: typeof media;
2415
+ declare const schema_organization: typeof organization;
2416
+ declare const schema_sessions: typeof sessions;
2417
+ declare const schema_users: typeof users;
2418
+ declare namespace schema {
2419
+ export { schema_FIELD_TYPES as FIELD_TYPES, schema_FieldDefinition as FieldDefinition, schema_FieldType as FieldType, schema_PUBLICATION_STATUSES as PUBLICATION_STATUSES, schema_addressSchema as addressSchema, schema_apiTokens as apiTokens, schema_collectionDefinitions as collectionDefinitions, schema_entries as entries, schema_fieldDefinitionSchema as fieldDefinitionSchema, schema_invitations as invitations, schema_media as media, schema_organization as organization, schema_sessions as sessions, schema_users as users };
2420
+ export type { schema_Address as Address, schema_ApiToken as ApiToken, schema_CollectionDefinition as CollectionDefinition, schema_Entry as Entry, schema_Invitation as Invitation, schema_Media as Media, schema_NewCollectionDefinition as NewCollectionDefinition, schema_NewEntry as NewEntry, schema_NewMedia as NewMedia, schema_NewOrganization as NewOrganization, schema_NewUser as NewUser, schema_Organization as Organization, schema_Session as Session, schema_User as User };
2421
+ }
2422
+
2423
+ declare const inviteDto: z.ZodObject<{
2424
+ email: z.ZodEmail;
2425
+ role: z.ZodEnum<{
2426
+ admin: "admin";
2427
+ redacteur: "redacteur";
2428
+ }>;
2429
+ }, z.core.$strip>;
2430
+ declare const userUpdateDto: z.ZodObject<{
2431
+ id: z.ZodString;
2432
+ data: z.ZodObject<{
2433
+ name: z.ZodOptional<z.ZodString>;
2434
+ role: z.ZodOptional<z.ZodEnum<{
2435
+ admin: "admin";
2436
+ redacteur: "redacteur";
2437
+ }>>;
2438
+ email: z.ZodOptional<z.ZodEmail>;
2439
+ }, z.core.$strip>;
2440
+ }, z.core.$strip>;
2441
+ /**
2442
+ * What a person may change on THEIR OWN account: their name, nothing else.
2443
+ * Not the role (they would promote themselves), not the address (it is the
2444
+ * login identifier). `strictObject`, so one field too many refuses the input.
2445
+ */
2446
+ declare const updateOwnProfileDto: z.ZodObject<{
2447
+ name: z.ZodString;
2448
+ }, z.core.$strict>;
2449
+ /** Public projection of a user — the ONLY user shape transport layers return. */
2450
+ declare const toPublicUser: ({ id, email, name, role }: User) => {
2451
+ id: string;
2452
+ email: string;
2453
+ name: string;
2454
+ role: "admin" | "redacteur";
2455
+ };
2456
+ type PublicUser = ReturnType<typeof toPublicUser>;
2457
+ type InviteDto = z.infer<typeof inviteDto>;
2458
+ type UserUpdateDto = z.infer<typeof userUpdateDto>;
2459
+ type UpdateOwnProfileDto = z.infer<typeof updateOwnProfileDto>;
2460
+
2461
+ declare const apiTokenCreateDto: z.ZodObject<{
2462
+ name: z.ZodString;
2463
+ }, z.core.$strip>;
2464
+ type ApiTokenCreateDto = z.infer<typeof apiTokenCreateDto>;
2465
+
2466
+ /**
2467
+ * The audience source contract, version 1: what the admin asks an audience
2468
+ * source, and what it expects back. The product ships the panels and this
2469
+ * contract; it ships no source. A source is whatever answers it — the cloud's
2470
+ * measurement service, or a converter in front of Matomo or Plausible.
2471
+ *
2472
+ * The admin calls `GET <OPEN_COMMUNE_AUDIENCE_URL>/summary` with the query
2473
+ * below, and `Authorization: Bearer <OPEN_COMMUNE_AUDIENCE_TOKEN>` when a
2474
+ * token is set. Any answer
2475
+ * other than a 200 that parses hides the panels: nothing a source does can
2476
+ * break the admin.
2477
+ *
2478
+ * Every block but the period, the visits and the daily curve is optional: a
2479
+ * source sends what it measures, and the panel leaves out what is missing.
2480
+ */
2481
+ declare const AUDIENCE_PERIODS: readonly [7, 30, 90];
2482
+ declare const audienceQuerySchema: z.ZodObject<{
2483
+ period: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodUnion<z.ZodLiteral<7 | 30 | 90>[]>>;
2484
+ collection: z.ZodOptional<z.ZodString>;
2485
+ entry: z.ZodOptional<z.ZodString>;
2486
+ }, z.core.$strip>;
2487
+ declare const audienceSummarySchema: z.ZodObject<{
2488
+ period: z.ZodObject<{
2489
+ from: z.ZodString;
2490
+ to: z.ZodString;
2491
+ days: z.ZodNumber;
2492
+ }, z.core.$strip>;
2493
+ visits: z.ZodNumber;
2494
+ visitsPrevious: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2495
+ visitors: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2496
+ readingMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2497
+ viewsPerVisit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2498
+ rightNow: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2499
+ daily: z.ZodArray<z.ZodObject<{
2500
+ day: z.ZodString;
2501
+ visits: z.ZodNumber;
2502
+ }, z.core.$strip>>;
2503
+ top: z.ZodOptional<z.ZodArray<z.ZodObject<{
2504
+ path: z.ZodString;
2505
+ collection: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2506
+ views: z.ZodNumber;
2507
+ }, z.core.$strip>>>;
2508
+ sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
2509
+ name: z.ZodString;
2510
+ share: z.ZodNumber;
2511
+ }, z.core.$strip>>>;
2512
+ devices: z.ZodOptional<z.ZodArray<z.ZodObject<{
2513
+ name: z.ZodString;
2514
+ share: z.ZodNumber;
2515
+ }, z.core.$strip>>>;
2516
+ campaigns: z.ZodOptional<z.ZodArray<z.ZodObject<{
2517
+ name: z.ZodString;
2518
+ visits: z.ZodNumber;
2519
+ }, z.core.$strip>>>;
2520
+ depth: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2521
+ reached25: z.ZodNumber;
2522
+ reached50: z.ZodNumber;
2523
+ reachedEnd: z.ZodNumber;
2524
+ }, z.core.$strip>>>;
2525
+ }, z.core.$strip>;
2526
+ type AudienceQuery = z.infer<typeof audienceQuerySchema>;
2527
+ type AudienceSummary = z.infer<typeof audienceSummarySchema>;
2528
+ /** What the admin's own route hands its panels: the source's answer, its pages named. */
2529
+ type AudiencePanelData = Omit<AudienceSummary, 'top'> & {
2530
+ top: {
2531
+ path: string;
2532
+ collection: string | null;
2533
+ visits: number;
2534
+ title: string;
2535
+ entryId: string | null;
2536
+ }[];
2537
+ };
2538
+ /**
2539
+ * What the admin asks its own instance (`audience.summary`): a period, and to
2540
+ * narrow it a collection's slug, then an entry's id. The instance turns the
2541
+ * entry's id into its slug before it asks the source.
2542
+ */
2543
+ declare const audienceAskDto: z.ZodObject<{
2544
+ period: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodUnion<z.ZodLiteral<7 | 30 | 90>[]>>;
2545
+ collection: z.ZodOptional<z.ZodString>;
2546
+ entry: z.ZodOptional<z.ZodString>;
2547
+ }, z.core.$strip>;
2548
+ type AudienceAsk = z.infer<typeof audienceAskDto>;
2549
+
2550
+ /**
2551
+ * Every refusal the core can answer with — the catalogue a consumer codes
2552
+ * against. A domain error travels as its `type` beside the transport code;
2553
+ * a client matches on these values and never on a string of its own.
2554
+ *
2555
+ * A light file on purpose (no import): it is re-exported by
2556
+ * `@open-commune/core/dtos`, the path that is safe in a browser bundle.
2557
+ * A new domain error is declared HERE first: `createTypedError` accepts
2558
+ * nothing else, and a consumer that words every type stops compiling until it
2559
+ * words the new one.
2560
+ */
2561
+ declare const ERROR_TYPES: {
2562
+ readonly AUDIENCE_UNAVAILABLE: "audience-unavailable-error";
2563
+ readonly COLLECTION_NOT_FOUND: "collection-not-found-error";
2564
+ readonly ENTRY_NOT_FOUND: "entry-not-found-error";
2565
+ readonly INVALID_ENTRY_DATA: "invalid-entry-data-error";
2566
+ readonly DUPLICATE_SLUG: "duplicate-slug-error";
2567
+ readonly MEDIA_NOT_FOUND: "media-not-found-error";
2568
+ readonly UNSUPPORTED_MIME: "unsupported-mime-error";
2569
+ readonly UPLOAD_INCOMPLETE: "upload-incomplete-error";
2570
+ readonly ORGANIZATION_NOT_INITIALIZED: "organization-not-initialized-error";
2571
+ readonly ORGANIZATION_ALREADY_INITIALIZED: "organization-already-initialized-error";
2572
+ readonly DEPLOY_HOOK_MISSING: "deploy-hook-missing-error";
2573
+ readonly DEPLOY_FAILED: "deploy-failed-error";
2574
+ readonly USER_NOT_FOUND: "user-not-found-error";
2575
+ readonly SESSION_NOT_FOUND: "session-not-found-error";
2576
+ readonly INVITATION_INVALID: "invitation-invalid-error";
2577
+ readonly CANNOT_REMOVE_SELF: "cannot-remove-self-error";
2578
+ readonly TOO_MANY_ATTEMPTS: "too-many-attempts-error";
2579
+ };
2580
+ type ErrorType = (typeof ERROR_TYPES)[keyof typeof ERROR_TYPES];
2581
+ /** Narrows what a response carried to a type of the catalogue. */
2582
+ declare const isErrorType: (value: unknown) => value is ErrorType;
2583
+
2584
+ export { entryDto as $, acceptInvitationDto as F, addressSchema as G, apiTokenCreateDto as H, apiTokens as J, audienceAskDto as K, audienceQuerySchema as Q, audienceSummarySchema as T, collectionDefinitions as V, definitionCreateDto as W, definitionDto as X, definitionUpdateDto as Y, entries as Z, entryCreateDto as _, entrySearchHitDto as a0, entryUpdateDto as a1, invitations as a2, inviteDto as a3, isErrorType as a4, loginDto as a5, media as a6, mediaFinalizeDto as a7, mediaRequestUploadDto as a8, mediaUpdateDto as a9, organization as aa, organizationInitDto as ab, organizationUpdateDto as ac, requestPasswordResetDto as ad, sessions as ae, toPublicUser as af, updateOwnProfileDto as ag, userUpdateDto as ah, users as ai, AUDIENCE_PERIODS as o, schema as s, ERROR_TYPES as v };
2585
+ export type { ApiToken as A, UserUpdateDto as B, CollectionDefinition as C, DefinitionCreateDto as D, Entry as E, Invitation as I, LoginDto as L, Media as M, NewOrganization as N, Organization as O, PublicUser as P, RequestPasswordResetDto as R, Session as S, User as U, OrganizationInitDto as a, OrganizationUpdateDto as b, NewMedia as c, MediaFinalizeDto as d, MediaUpdateDto as e, NewCollectionDefinition as f, NewEntry as g, DefinitionUpdateDto as h, EntrySearchHit as i, EntryCreateDto as j, EntryUpdateDto as k, AudienceAsk as l, AudiencePanelData as m, ErrorType as n, AcceptInvitationDto as p, Address as q, ApiTokenCreateDto as r, AudienceQuery as t, AudienceSummary as u, InviteDto as w, MediaRequestUploadDto as x, NewUser as y, UpdateOwnProfileDto as z };