@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.
package/dist/index.d.ts CHANGED
@@ -1,14 +1,13 @@
1
1
  import * as drizzle_zod from 'drizzle-zod';
2
2
  import * as _trpc_server from '@trpc/server';
3
- import { AnyRouter } from '@trpc/server';
4
3
  import { z } from 'zod';
5
4
  import * as drizzle_orm_bun_sqlite from 'drizzle-orm/bun-sqlite';
6
5
  import { Database } from 'bun:sqlite';
7
- import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
8
- import { FIELD_TYPES, FieldType, PUBLICATION_STATUSES } from './domains/collections/constants.js';
9
- export { PublicationStatus } from './domains/collections/constants.js';
10
- import { FieldDefinition, fieldDefinitionSchema } from './domains/collections/utils.js';
11
- export { FIELD_VALUE_SCHEMAS, buildDataSchema } from './domains/collections/utils.js';
6
+ import { s as schema, U as User, S as Session, I as Invitation, A as ApiToken, O as Organization, N as NewOrganization, a as OrganizationInitDto, b as OrganizationUpdateDto, c as NewMedia, M as Media, d as MediaFinalizeDto, e as MediaUpdateDto, C as CollectionDefinition, f as NewCollectionDefinition, E as Entry, g as NewEntry, D as DefinitionCreateDto, h as DefinitionUpdateDto, i as EntrySearchHit, j as EntryCreateDto, k as EntryUpdateDto, l as AudienceAsk, m as AudiencePanelData, n as ErrorType } from './shared/core.C6dz9OyV.js';
7
+ export { o as AUDIENCE_PERIODS, p as AcceptInvitationDto, q as Address, r as ApiTokenCreateDto, t as AudienceQuery, u as AudienceSummary, v as ERROR_TYPES, w as InviteDto, L as LoginDto, x as MediaRequestUploadDto, y as NewUser, P as PublicUser, R as RequestPasswordResetDto, z as UpdateOwnProfileDto, B as UserUpdateDto, F as acceptInvitationDto, G as addressSchema, H as apiTokenCreateDto, J as apiTokens, K as audienceAskDto, Q as audienceQuerySchema, T as audienceSummarySchema, V as collectionDefinitions, W as definitionCreateDto, X as definitionDto, Y as definitionUpdateDto, Z as entries, _ as entryCreateDto, $ as entryDto, a0 as entrySearchHitDto, a1 as entryUpdateDto, a2 as invitations, a3 as inviteDto, a4 as isErrorType, a5 as loginDto, a6 as media, a7 as mediaFinalizeDto, a8 as mediaRequestUploadDto, a9 as mediaUpdateDto, aa as organization, ab as organizationInitDto, ac as organizationUpdateDto, ad as requestPasswordResetDto, ae as sessions, af as toPublicUser, ag as updateOwnProfileDto, ah as userUpdateDto, ai as users } from './shared/core.C6dz9OyV.js';
8
+ export { FIELD_TYPES, FieldType, PUBLICATION_STATUSES, PublicationStatus } from './domains/collections/constants.js';
9
+ export { FIELD_VALUE_SCHEMAS, FieldDefinition, buildDataSchema, fieldDefinitionSchema } from './domains/collections/utils.js';
10
+ import 'drizzle-orm/sqlite-core';
12
11
 
13
12
  declare const envSchema: z.ZodObject<{
14
13
  COMMUN_DATA_DIR: z.ZodDefault<z.ZodString>;
@@ -22,6 +21,9 @@ declare const envSchema: z.ZodObject<{
22
21
  COMMUN_EMAIL_WEBHOOK_TOKEN: z.ZodOptional<z.ZodString>;
23
22
  COMMUN_ADMIN_URL: z.ZodOptional<z.ZodString>;
24
23
  COMMUN_JWT_SECRET: z.ZodString;
24
+ OPEN_COMMUNE_AUDIENCE_URL: z.ZodOptional<z.ZodURL>;
25
+ OPEN_COMMUNE_AUDIENCE_TOKEN: z.ZodOptional<z.ZodString>;
26
+ OPEN_COMMUNE_AUDIENCE_VIEWERS: z.ZodOptional<z.ZodString>;
25
27
  }, z.core.$strip>;
26
28
  type CoreEnv = z.infer<typeof envSchema>;
27
29
  /**
@@ -30,1631 +32,6 @@ type CoreEnv = z.infer<typeof envSchema>;
30
32
  */
31
33
  declare function parseEnv(raw?: Record<string, string | undefined>): CoreEnv;
32
34
 
33
- /** Postal address, as a typed JSON field. */
34
- declare const addressSchema: z.ZodObject<{
35
- street: z.ZodOptional<z.ZodString>;
36
- postalCode: z.ZodOptional<z.ZodString>;
37
- city: z.ZodOptional<z.ZodString>;
38
- }, z.core.$strip>;
39
- type Address = z.infer<typeof addressSchema>;
40
- /**
41
- * Instance settings — a singleton row (id = 1, enforced by the queries).
42
- * Single-tenant by design: one instance = one local authority; no table
43
- * anywhere carries a tenant key.
44
- */
45
- declare const organization: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
46
- name: "organization";
47
- schema: undefined;
48
- columns: {
49
- id: drizzle_orm_sqlite_core.SQLiteColumn<{
50
- name: "id";
51
- tableName: "organization";
52
- dataType: "number";
53
- columnType: "SQLiteInteger";
54
- data: number;
55
- driverParam: number;
56
- notNull: true;
57
- hasDefault: true;
58
- isPrimaryKey: true;
59
- isAutoincrement: false;
60
- hasRuntimeDefault: false;
61
- enumValues: undefined;
62
- baseColumn: never;
63
- identity: undefined;
64
- generated: undefined;
65
- }, {}, {}>;
66
- name: drizzle_orm_sqlite_core.SQLiteColumn<{
67
- name: "name";
68
- tableName: "organization";
69
- dataType: "string";
70
- columnType: "SQLiteText";
71
- data: string;
72
- driverParam: string;
73
- notNull: true;
74
- hasDefault: false;
75
- isPrimaryKey: false;
76
- isAutoincrement: false;
77
- hasRuntimeDefault: false;
78
- enumValues: [string, ...string[]];
79
- baseColumn: never;
80
- identity: undefined;
81
- generated: undefined;
82
- }, {}, {
83
- length: number | undefined;
84
- }>;
85
- type: drizzle_orm_sqlite_core.SQLiteColumn<{
86
- name: "type";
87
- tableName: "organization";
88
- dataType: "string";
89
- columnType: "SQLiteText";
90
- data: "commune" | "intercommunality" | "syndicate" | "other";
91
- driverParam: string;
92
- notNull: true;
93
- hasDefault: true;
94
- isPrimaryKey: false;
95
- isAutoincrement: false;
96
- hasRuntimeDefault: false;
97
- enumValues: ["commune", "intercommunality", "syndicate", "other"];
98
- baseColumn: never;
99
- identity: undefined;
100
- generated: undefined;
101
- }, {}, {
102
- length: number | undefined;
103
- }>;
104
- slug: drizzle_orm_sqlite_core.SQLiteColumn<{
105
- name: "slug";
106
- tableName: "organization";
107
- dataType: "string";
108
- columnType: "SQLiteText";
109
- data: string;
110
- driverParam: string;
111
- notNull: true;
112
- hasDefault: false;
113
- isPrimaryKey: false;
114
- isAutoincrement: false;
115
- hasRuntimeDefault: false;
116
- enumValues: [string, ...string[]];
117
- baseColumn: never;
118
- identity: undefined;
119
- generated: undefined;
120
- }, {}, {
121
- length: number | undefined;
122
- }>;
123
- description: drizzle_orm_sqlite_core.SQLiteColumn<{
124
- name: "description";
125
- tableName: "organization";
126
- dataType: "string";
127
- columnType: "SQLiteText";
128
- data: string;
129
- driverParam: string;
130
- notNull: false;
131
- hasDefault: false;
132
- isPrimaryKey: false;
133
- isAutoincrement: false;
134
- hasRuntimeDefault: false;
135
- enumValues: [string, ...string[]];
136
- baseColumn: never;
137
- identity: undefined;
138
- generated: undefined;
139
- }, {}, {
140
- length: number | undefined;
141
- }>;
142
- address: drizzle_orm_sqlite_core.SQLiteColumn<{
143
- name: "address";
144
- tableName: "organization";
145
- dataType: "json";
146
- columnType: "SQLiteTextJson";
147
- data: {
148
- street?: string | undefined;
149
- postalCode?: string | undefined;
150
- city?: string | undefined;
151
- };
152
- driverParam: string;
153
- notNull: false;
154
- hasDefault: false;
155
- isPrimaryKey: false;
156
- isAutoincrement: false;
157
- hasRuntimeDefault: false;
158
- enumValues: undefined;
159
- baseColumn: never;
160
- identity: undefined;
161
- generated: undefined;
162
- }, {}, {
163
- $type: {
164
- street?: string | undefined;
165
- postalCode?: string | undefined;
166
- city?: string | undefined;
167
- };
168
- }>;
169
- deployment: drizzle_orm_sqlite_core.SQLiteColumn<{
170
- name: "deployment";
171
- tableName: "organization";
172
- dataType: "json";
173
- columnType: "SQLiteTextJson";
174
- data: Record<string, unknown>;
175
- driverParam: string;
176
- notNull: false;
177
- hasDefault: false;
178
- isPrimaryKey: false;
179
- isAutoincrement: false;
180
- hasRuntimeDefault: false;
181
- enumValues: undefined;
182
- baseColumn: never;
183
- identity: undefined;
184
- generated: undefined;
185
- }, {}, {
186
- $type: Record<string, unknown>;
187
- }>;
188
- settings: drizzle_orm_sqlite_core.SQLiteColumn<{
189
- name: "settings";
190
- tableName: "organization";
191
- dataType: "json";
192
- columnType: "SQLiteTextJson";
193
- data: Record<string, unknown>;
194
- driverParam: string;
195
- notNull: false;
196
- hasDefault: false;
197
- isPrimaryKey: false;
198
- isAutoincrement: false;
199
- hasRuntimeDefault: false;
200
- enumValues: undefined;
201
- baseColumn: never;
202
- identity: undefined;
203
- generated: undefined;
204
- }, {}, {
205
- $type: Record<string, unknown>;
206
- }>;
207
- updatedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
208
- name: "updated_by";
209
- tableName: "organization";
210
- dataType: "string";
211
- columnType: "SQLiteText";
212
- data: string;
213
- driverParam: string;
214
- notNull: false;
215
- hasDefault: false;
216
- isPrimaryKey: false;
217
- isAutoincrement: false;
218
- hasRuntimeDefault: false;
219
- enumValues: [string, ...string[]];
220
- baseColumn: never;
221
- identity: undefined;
222
- generated: undefined;
223
- }, {}, {
224
- length: number | undefined;
225
- }>;
226
- legacyExtra: drizzle_orm_sqlite_core.SQLiteColumn<{
227
- name: "legacy_extra";
228
- tableName: "organization";
229
- dataType: "json";
230
- columnType: "SQLiteTextJson";
231
- data: Record<string, unknown> | null;
232
- driverParam: string;
233
- notNull: false;
234
- hasDefault: false;
235
- isPrimaryKey: false;
236
- isAutoincrement: false;
237
- hasRuntimeDefault: false;
238
- enumValues: undefined;
239
- baseColumn: never;
240
- identity: undefined;
241
- generated: undefined;
242
- }, {}, {
243
- $type: Record<string, unknown> | null;
244
- }>;
245
- createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
246
- name: "created_at";
247
- tableName: "organization";
248
- dataType: "string";
249
- columnType: "SQLiteText";
250
- data: string;
251
- driverParam: string;
252
- notNull: true;
253
- hasDefault: true;
254
- isPrimaryKey: false;
255
- isAutoincrement: false;
256
- hasRuntimeDefault: true;
257
- enumValues: [string, ...string[]];
258
- baseColumn: never;
259
- identity: undefined;
260
- generated: undefined;
261
- }, {}, {
262
- length: number | undefined;
263
- }>;
264
- updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
265
- name: "updated_at";
266
- tableName: "organization";
267
- dataType: "string";
268
- columnType: "SQLiteText";
269
- data: string;
270
- driverParam: string;
271
- notNull: true;
272
- hasDefault: true;
273
- isPrimaryKey: false;
274
- isAutoincrement: false;
275
- hasRuntimeDefault: true;
276
- enumValues: [string, ...string[]];
277
- baseColumn: never;
278
- identity: undefined;
279
- generated: undefined;
280
- }, {}, {
281
- length: number | undefined;
282
- }>;
283
- };
284
- dialect: "sqlite";
285
- }>;
286
- type Organization = typeof organization.$inferSelect;
287
- type NewOrganization = typeof organization.$inferInsert;
288
- declare const users: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
289
- name: "users";
290
- schema: undefined;
291
- columns: {
292
- id: drizzle_orm_sqlite_core.SQLiteColumn<{
293
- name: "id";
294
- tableName: "users";
295
- dataType: "string";
296
- columnType: "SQLiteText";
297
- data: string;
298
- driverParam: string;
299
- notNull: true;
300
- hasDefault: true;
301
- isPrimaryKey: true;
302
- isAutoincrement: false;
303
- hasRuntimeDefault: true;
304
- enumValues: [string, ...string[]];
305
- baseColumn: never;
306
- identity: undefined;
307
- generated: undefined;
308
- }, {}, {
309
- length: number | undefined;
310
- }>;
311
- email: drizzle_orm_sqlite_core.SQLiteColumn<{
312
- name: "email";
313
- tableName: "users";
314
- dataType: "string";
315
- columnType: "SQLiteText";
316
- data: string;
317
- driverParam: string;
318
- notNull: true;
319
- hasDefault: false;
320
- isPrimaryKey: false;
321
- isAutoincrement: false;
322
- hasRuntimeDefault: false;
323
- enumValues: [string, ...string[]];
324
- baseColumn: never;
325
- identity: undefined;
326
- generated: undefined;
327
- }, {}, {
328
- length: number | undefined;
329
- }>;
330
- name: drizzle_orm_sqlite_core.SQLiteColumn<{
331
- name: "name";
332
- tableName: "users";
333
- dataType: "string";
334
- columnType: "SQLiteText";
335
- data: string;
336
- driverParam: string;
337
- notNull: true;
338
- hasDefault: false;
339
- isPrimaryKey: false;
340
- isAutoincrement: false;
341
- hasRuntimeDefault: false;
342
- enumValues: [string, ...string[]];
343
- baseColumn: never;
344
- identity: undefined;
345
- generated: undefined;
346
- }, {}, {
347
- length: number | undefined;
348
- }>;
349
- passwordHash: drizzle_orm_sqlite_core.SQLiteColumn<{
350
- name: "password_hash";
351
- tableName: "users";
352
- dataType: "string";
353
- columnType: "SQLiteText";
354
- data: string;
355
- driverParam: string;
356
- notNull: false;
357
- hasDefault: false;
358
- isPrimaryKey: false;
359
- isAutoincrement: false;
360
- hasRuntimeDefault: false;
361
- enumValues: [string, ...string[]];
362
- baseColumn: never;
363
- identity: undefined;
364
- generated: undefined;
365
- }, {}, {
366
- length: number | undefined;
367
- }>;
368
- role: drizzle_orm_sqlite_core.SQLiteColumn<{
369
- name: "role";
370
- tableName: "users";
371
- dataType: "string";
372
- columnType: "SQLiteText";
373
- data: "admin" | "redacteur";
374
- driverParam: string;
375
- notNull: true;
376
- hasDefault: true;
377
- isPrimaryKey: false;
378
- isAutoincrement: false;
379
- hasRuntimeDefault: false;
380
- enumValues: ["admin", "redacteur"];
381
- baseColumn: never;
382
- identity: undefined;
383
- generated: undefined;
384
- }, {}, {
385
- length: number | undefined;
386
- }>;
387
- createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
388
- name: "created_at";
389
- tableName: "users";
390
- dataType: "string";
391
- columnType: "SQLiteText";
392
- data: string;
393
- driverParam: string;
394
- notNull: true;
395
- hasDefault: true;
396
- isPrimaryKey: false;
397
- isAutoincrement: false;
398
- hasRuntimeDefault: true;
399
- enumValues: [string, ...string[]];
400
- baseColumn: never;
401
- identity: undefined;
402
- generated: undefined;
403
- }, {}, {
404
- length: number | undefined;
405
- }>;
406
- updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
407
- name: "updated_at";
408
- tableName: "users";
409
- dataType: "string";
410
- columnType: "SQLiteText";
411
- data: string;
412
- driverParam: string;
413
- notNull: true;
414
- hasDefault: true;
415
- isPrimaryKey: false;
416
- isAutoincrement: false;
417
- hasRuntimeDefault: true;
418
- enumValues: [string, ...string[]];
419
- baseColumn: never;
420
- identity: undefined;
421
- generated: undefined;
422
- }, {}, {
423
- length: number | undefined;
424
- }>;
425
- };
426
- dialect: "sqlite";
427
- }>;
428
- /**
429
- * Server-side sessions. The client carries a signed JWT holding `{ session }`,
430
- * but revocation lives HERE: a valid JWT whose row is revoked is refused.
431
- */
432
- declare const sessions: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
433
- name: "sessions";
434
- schema: undefined;
435
- columns: {
436
- id: drizzle_orm_sqlite_core.SQLiteColumn<{
437
- name: "id";
438
- tableName: "sessions";
439
- dataType: "string";
440
- columnType: "SQLiteText";
441
- data: string;
442
- driverParam: string;
443
- notNull: true;
444
- hasDefault: true;
445
- isPrimaryKey: true;
446
- isAutoincrement: false;
447
- hasRuntimeDefault: true;
448
- enumValues: [string, ...string[]];
449
- baseColumn: never;
450
- identity: undefined;
451
- generated: undefined;
452
- }, {}, {
453
- length: number | undefined;
454
- }>;
455
- userId: drizzle_orm_sqlite_core.SQLiteColumn<{
456
- name: "user_id";
457
- tableName: "sessions";
458
- dataType: "string";
459
- columnType: "SQLiteText";
460
- data: string;
461
- driverParam: string;
462
- notNull: true;
463
- hasDefault: false;
464
- isPrimaryKey: false;
465
- isAutoincrement: false;
466
- hasRuntimeDefault: false;
467
- enumValues: [string, ...string[]];
468
- baseColumn: never;
469
- identity: undefined;
470
- generated: undefined;
471
- }, {}, {
472
- length: number | undefined;
473
- }>;
474
- expiresAt: drizzle_orm_sqlite_core.SQLiteColumn<{
475
- name: "expires_at";
476
- tableName: "sessions";
477
- dataType: "string";
478
- columnType: "SQLiteText";
479
- data: string;
480
- driverParam: string;
481
- notNull: true;
482
- hasDefault: false;
483
- isPrimaryKey: false;
484
- isAutoincrement: false;
485
- hasRuntimeDefault: false;
486
- enumValues: [string, ...string[]];
487
- baseColumn: never;
488
- identity: undefined;
489
- generated: undefined;
490
- }, {}, {
491
- length: number | undefined;
492
- }>;
493
- revokedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
494
- name: "revoked_at";
495
- tableName: "sessions";
496
- dataType: "string";
497
- columnType: "SQLiteText";
498
- data: string;
499
- driverParam: string;
500
- notNull: false;
501
- hasDefault: false;
502
- isPrimaryKey: false;
503
- isAutoincrement: false;
504
- hasRuntimeDefault: false;
505
- enumValues: [string, ...string[]];
506
- baseColumn: never;
507
- identity: undefined;
508
- generated: undefined;
509
- }, {}, {
510
- length: number | undefined;
511
- }>;
512
- ua: drizzle_orm_sqlite_core.SQLiteColumn<{
513
- name: "ua";
514
- tableName: "sessions";
515
- dataType: "string";
516
- columnType: "SQLiteText";
517
- data: string;
518
- driverParam: string;
519
- notNull: false;
520
- hasDefault: false;
521
- isPrimaryKey: false;
522
- isAutoincrement: false;
523
- hasRuntimeDefault: false;
524
- enumValues: [string, ...string[]];
525
- baseColumn: never;
526
- identity: undefined;
527
- generated: undefined;
528
- }, {}, {
529
- length: number | undefined;
530
- }>;
531
- ip: drizzle_orm_sqlite_core.SQLiteColumn<{
532
- name: "ip";
533
- tableName: "sessions";
534
- dataType: "string";
535
- columnType: "SQLiteText";
536
- data: string;
537
- driverParam: string;
538
- notNull: false;
539
- hasDefault: false;
540
- isPrimaryKey: false;
541
- isAutoincrement: false;
542
- hasRuntimeDefault: false;
543
- enumValues: [string, ...string[]];
544
- baseColumn: never;
545
- identity: undefined;
546
- generated: undefined;
547
- }, {}, {
548
- length: number | undefined;
549
- }>;
550
- createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
551
- name: "created_at";
552
- tableName: "sessions";
553
- dataType: "string";
554
- columnType: "SQLiteText";
555
- data: string;
556
- driverParam: string;
557
- notNull: true;
558
- hasDefault: true;
559
- isPrimaryKey: false;
560
- isAutoincrement: false;
561
- hasRuntimeDefault: true;
562
- enumValues: [string, ...string[]];
563
- baseColumn: never;
564
- identity: undefined;
565
- generated: undefined;
566
- }, {}, {
567
- length: number | undefined;
568
- }>;
569
- };
570
- dialect: "sqlite";
571
- }>;
572
- /** Single-use, time-limited invitations (crypto-random token, stored hashed). */
573
- declare const invitations: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
574
- name: "invitations";
575
- schema: undefined;
576
- columns: {
577
- id: drizzle_orm_sqlite_core.SQLiteColumn<{
578
- name: "id";
579
- tableName: "invitations";
580
- dataType: "string";
581
- columnType: "SQLiteText";
582
- data: string;
583
- driverParam: string;
584
- notNull: true;
585
- hasDefault: true;
586
- isPrimaryKey: true;
587
- isAutoincrement: false;
588
- hasRuntimeDefault: true;
589
- enumValues: [string, ...string[]];
590
- baseColumn: never;
591
- identity: undefined;
592
- generated: undefined;
593
- }, {}, {
594
- length: number | undefined;
595
- }>;
596
- email: drizzle_orm_sqlite_core.SQLiteColumn<{
597
- name: "email";
598
- tableName: "invitations";
599
- dataType: "string";
600
- columnType: "SQLiteText";
601
- data: string;
602
- driverParam: string;
603
- notNull: true;
604
- hasDefault: false;
605
- isPrimaryKey: false;
606
- isAutoincrement: false;
607
- hasRuntimeDefault: false;
608
- enumValues: [string, ...string[]];
609
- baseColumn: never;
610
- identity: undefined;
611
- generated: undefined;
612
- }, {}, {
613
- length: number | undefined;
614
- }>;
615
- tokenHash: drizzle_orm_sqlite_core.SQLiteColumn<{
616
- name: "token_hash";
617
- tableName: "invitations";
618
- dataType: "string";
619
- columnType: "SQLiteText";
620
- data: string;
621
- driverParam: string;
622
- notNull: true;
623
- hasDefault: false;
624
- isPrimaryKey: false;
625
- isAutoincrement: false;
626
- hasRuntimeDefault: false;
627
- enumValues: [string, ...string[]];
628
- baseColumn: never;
629
- identity: undefined;
630
- generated: undefined;
631
- }, {}, {
632
- length: number | undefined;
633
- }>;
634
- role: drizzle_orm_sqlite_core.SQLiteColumn<{
635
- name: "role";
636
- tableName: "invitations";
637
- dataType: "string";
638
- columnType: "SQLiteText";
639
- data: "admin" | "redacteur";
640
- driverParam: string;
641
- notNull: true;
642
- hasDefault: true;
643
- isPrimaryKey: false;
644
- isAutoincrement: false;
645
- hasRuntimeDefault: false;
646
- enumValues: ["admin", "redacteur"];
647
- baseColumn: never;
648
- identity: undefined;
649
- generated: undefined;
650
- }, {}, {
651
- length: number | undefined;
652
- }>;
653
- expiresAt: drizzle_orm_sqlite_core.SQLiteColumn<{
654
- name: "expires_at";
655
- tableName: "invitations";
656
- dataType: "string";
657
- columnType: "SQLiteText";
658
- data: string;
659
- driverParam: string;
660
- notNull: true;
661
- hasDefault: false;
662
- isPrimaryKey: false;
663
- isAutoincrement: false;
664
- hasRuntimeDefault: false;
665
- enumValues: [string, ...string[]];
666
- baseColumn: never;
667
- identity: undefined;
668
- generated: undefined;
669
- }, {}, {
670
- length: number | undefined;
671
- }>;
672
- usedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
673
- name: "used_at";
674
- tableName: "invitations";
675
- dataType: "string";
676
- columnType: "SQLiteText";
677
- data: string;
678
- driverParam: string;
679
- notNull: false;
680
- hasDefault: false;
681
- isPrimaryKey: false;
682
- isAutoincrement: false;
683
- hasRuntimeDefault: false;
684
- enumValues: [string, ...string[]];
685
- baseColumn: never;
686
- identity: undefined;
687
- generated: undefined;
688
- }, {}, {
689
- length: number | undefined;
690
- }>;
691
- createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
692
- name: "created_at";
693
- tableName: "invitations";
694
- dataType: "string";
695
- columnType: "SQLiteText";
696
- data: string;
697
- driverParam: string;
698
- notNull: true;
699
- hasDefault: true;
700
- isPrimaryKey: false;
701
- isAutoincrement: false;
702
- hasRuntimeDefault: true;
703
- enumValues: [string, ...string[]];
704
- baseColumn: never;
705
- identity: undefined;
706
- generated: undefined;
707
- }, {}, {
708
- length: number | undefined;
709
- }>;
710
- };
711
- dialect: "sqlite";
712
- }>;
713
- /** Machine tokens for site builds — shown once, stored hashed, revocable. */
714
- declare const apiTokens: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
715
- name: "api_tokens";
716
- schema: undefined;
717
- columns: {
718
- id: drizzle_orm_sqlite_core.SQLiteColumn<{
719
- name: "id";
720
- tableName: "api_tokens";
721
- dataType: "string";
722
- columnType: "SQLiteText";
723
- data: string;
724
- driverParam: string;
725
- notNull: true;
726
- hasDefault: true;
727
- isPrimaryKey: true;
728
- isAutoincrement: false;
729
- hasRuntimeDefault: true;
730
- enumValues: [string, ...string[]];
731
- baseColumn: never;
732
- identity: undefined;
733
- generated: undefined;
734
- }, {}, {
735
- length: number | undefined;
736
- }>;
737
- name: drizzle_orm_sqlite_core.SQLiteColumn<{
738
- name: "name";
739
- tableName: "api_tokens";
740
- dataType: "string";
741
- columnType: "SQLiteText";
742
- data: string;
743
- driverParam: string;
744
- notNull: true;
745
- hasDefault: false;
746
- isPrimaryKey: false;
747
- isAutoincrement: false;
748
- hasRuntimeDefault: false;
749
- enumValues: [string, ...string[]];
750
- baseColumn: never;
751
- identity: undefined;
752
- generated: undefined;
753
- }, {}, {
754
- length: number | undefined;
755
- }>;
756
- tokenHash: drizzle_orm_sqlite_core.SQLiteColumn<{
757
- name: "token_hash";
758
- tableName: "api_tokens";
759
- dataType: "string";
760
- columnType: "SQLiteText";
761
- data: string;
762
- driverParam: string;
763
- notNull: true;
764
- hasDefault: false;
765
- isPrimaryKey: false;
766
- isAutoincrement: false;
767
- hasRuntimeDefault: false;
768
- enumValues: [string, ...string[]];
769
- baseColumn: never;
770
- identity: undefined;
771
- generated: undefined;
772
- }, {}, {
773
- length: number | undefined;
774
- }>;
775
- lastUsedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
776
- name: "last_used_at";
777
- tableName: "api_tokens";
778
- dataType: "string";
779
- columnType: "SQLiteText";
780
- data: string;
781
- driverParam: string;
782
- notNull: false;
783
- hasDefault: false;
784
- isPrimaryKey: false;
785
- isAutoincrement: false;
786
- hasRuntimeDefault: false;
787
- enumValues: [string, ...string[]];
788
- baseColumn: never;
789
- identity: undefined;
790
- generated: undefined;
791
- }, {}, {
792
- length: number | undefined;
793
- }>;
794
- revokedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
795
- name: "revoked_at";
796
- tableName: "api_tokens";
797
- dataType: "string";
798
- columnType: "SQLiteText";
799
- data: string;
800
- driverParam: string;
801
- notNull: false;
802
- hasDefault: false;
803
- isPrimaryKey: false;
804
- isAutoincrement: false;
805
- hasRuntimeDefault: false;
806
- enumValues: [string, ...string[]];
807
- baseColumn: never;
808
- identity: undefined;
809
- generated: undefined;
810
- }, {}, {
811
- length: number | undefined;
812
- }>;
813
- createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
814
- name: "created_at";
815
- tableName: "api_tokens";
816
- dataType: "string";
817
- columnType: "SQLiteText";
818
- data: string;
819
- driverParam: string;
820
- notNull: true;
821
- hasDefault: true;
822
- isPrimaryKey: false;
823
- isAutoincrement: false;
824
- hasRuntimeDefault: true;
825
- enumValues: [string, ...string[]];
826
- baseColumn: never;
827
- identity: undefined;
828
- generated: undefined;
829
- }, {}, {
830
- length: number | undefined;
831
- }>;
832
- };
833
- dialect: "sqlite";
834
- }>;
835
- type User = typeof users.$inferSelect;
836
- type NewUser = typeof users.$inferInsert;
837
- type Session = typeof sessions.$inferSelect;
838
- type Invitation = typeof invitations.$inferSelect;
839
- type ApiToken = typeof apiTokens.$inferSelect;
840
- declare const media: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
841
- name: "media";
842
- schema: undefined;
843
- columns: {
844
- id: drizzle_orm_sqlite_core.SQLiteColumn<{
845
- name: "id";
846
- tableName: "media";
847
- dataType: "string";
848
- columnType: "SQLiteText";
849
- data: string;
850
- driverParam: string;
851
- notNull: true;
852
- hasDefault: true;
853
- isPrimaryKey: true;
854
- isAutoincrement: false;
855
- hasRuntimeDefault: true;
856
- enumValues: [string, ...string[]];
857
- baseColumn: never;
858
- identity: undefined;
859
- generated: undefined;
860
- }, {}, {
861
- length: number | undefined;
862
- }>;
863
- filename: drizzle_orm_sqlite_core.SQLiteColumn<{
864
- name: "filename";
865
- tableName: "media";
866
- dataType: "string";
867
- columnType: "SQLiteText";
868
- data: string;
869
- driverParam: string;
870
- notNull: true;
871
- hasDefault: false;
872
- isPrimaryKey: false;
873
- isAutoincrement: false;
874
- hasRuntimeDefault: false;
875
- enumValues: [string, ...string[]];
876
- baseColumn: never;
877
- identity: undefined;
878
- generated: undefined;
879
- }, {}, {
880
- length: number | undefined;
881
- }>;
882
- mime: drizzle_orm_sqlite_core.SQLiteColumn<{
883
- name: "mime";
884
- tableName: "media";
885
- dataType: "string";
886
- columnType: "SQLiteText";
887
- data: string;
888
- driverParam: string;
889
- notNull: true;
890
- hasDefault: false;
891
- isPrimaryKey: false;
892
- isAutoincrement: false;
893
- hasRuntimeDefault: false;
894
- enumValues: [string, ...string[]];
895
- baseColumn: never;
896
- identity: undefined;
897
- generated: undefined;
898
- }, {}, {
899
- length: number | undefined;
900
- }>;
901
- size: drizzle_orm_sqlite_core.SQLiteColumn<{
902
- name: "size";
903
- tableName: "media";
904
- dataType: "number";
905
- columnType: "SQLiteInteger";
906
- data: number;
907
- driverParam: number;
908
- notNull: true;
909
- hasDefault: false;
910
- isPrimaryKey: false;
911
- isAutoincrement: false;
912
- hasRuntimeDefault: false;
913
- enumValues: undefined;
914
- baseColumn: never;
915
- identity: undefined;
916
- generated: undefined;
917
- }, {}, {}>;
918
- alt: drizzle_orm_sqlite_core.SQLiteColumn<{
919
- name: "alt";
920
- tableName: "media";
921
- dataType: "string";
922
- columnType: "SQLiteText";
923
- data: string;
924
- driverParam: string;
925
- notNull: false;
926
- hasDefault: false;
927
- isPrimaryKey: false;
928
- isAutoincrement: false;
929
- hasRuntimeDefault: false;
930
- enumValues: [string, ...string[]];
931
- baseColumn: never;
932
- identity: undefined;
933
- generated: undefined;
934
- }, {}, {
935
- length: number | undefined;
936
- }>;
937
- caption: drizzle_orm_sqlite_core.SQLiteColumn<{
938
- name: "caption";
939
- tableName: "media";
940
- dataType: "string";
941
- columnType: "SQLiteText";
942
- data: string;
943
- driverParam: string;
944
- notNull: false;
945
- hasDefault: false;
946
- isPrimaryKey: false;
947
- isAutoincrement: false;
948
- hasRuntimeDefault: false;
949
- enumValues: [string, ...string[]];
950
- baseColumn: never;
951
- identity: undefined;
952
- generated: undefined;
953
- }, {}, {
954
- length: number | undefined;
955
- }>;
956
- objects: drizzle_orm_sqlite_core.SQLiteColumn<{
957
- name: "objects";
958
- tableName: "media";
959
- dataType: "json";
960
- columnType: "SQLiteTextJson";
961
- data: Record<string, unknown>;
962
- driverParam: string;
963
- notNull: true;
964
- hasDefault: false;
965
- isPrimaryKey: false;
966
- isAutoincrement: false;
967
- hasRuntimeDefault: false;
968
- enumValues: undefined;
969
- baseColumn: never;
970
- identity: undefined;
971
- generated: undefined;
972
- }, {}, {
973
- $type: Record<string, unknown>;
974
- }>;
975
- metaData: drizzle_orm_sqlite_core.SQLiteColumn<{
976
- name: "meta_data";
977
- tableName: "media";
978
- dataType: "json";
979
- columnType: "SQLiteTextJson";
980
- data: Record<string, unknown>;
981
- driverParam: string;
982
- notNull: false;
983
- hasDefault: false;
984
- isPrimaryKey: false;
985
- isAutoincrement: false;
986
- hasRuntimeDefault: false;
987
- enumValues: undefined;
988
- baseColumn: never;
989
- identity: undefined;
990
- generated: undefined;
991
- }, {}, {
992
- $type: Record<string, unknown>;
993
- }>;
994
- createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
995
- name: "created_by";
996
- tableName: "media";
997
- dataType: "string";
998
- columnType: "SQLiteText";
999
- data: string;
1000
- driverParam: string;
1001
- notNull: false;
1002
- hasDefault: false;
1003
- isPrimaryKey: false;
1004
- isAutoincrement: false;
1005
- hasRuntimeDefault: false;
1006
- enumValues: [string, ...string[]];
1007
- baseColumn: never;
1008
- identity: undefined;
1009
- generated: undefined;
1010
- }, {}, {
1011
- length: number | undefined;
1012
- }>;
1013
- updatedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
1014
- name: "updated_by";
1015
- tableName: "media";
1016
- dataType: "string";
1017
- columnType: "SQLiteText";
1018
- data: string;
1019
- driverParam: string;
1020
- notNull: false;
1021
- hasDefault: false;
1022
- isPrimaryKey: false;
1023
- isAutoincrement: false;
1024
- hasRuntimeDefault: false;
1025
- enumValues: [string, ...string[]];
1026
- baseColumn: never;
1027
- identity: undefined;
1028
- generated: undefined;
1029
- }, {}, {
1030
- length: number | undefined;
1031
- }>;
1032
- legacyExtra: drizzle_orm_sqlite_core.SQLiteColumn<{
1033
- name: "legacy_extra";
1034
- tableName: "media";
1035
- dataType: "json";
1036
- columnType: "SQLiteTextJson";
1037
- data: Record<string, unknown> | null;
1038
- driverParam: string;
1039
- notNull: false;
1040
- hasDefault: false;
1041
- isPrimaryKey: false;
1042
- isAutoincrement: false;
1043
- hasRuntimeDefault: false;
1044
- enumValues: undefined;
1045
- baseColumn: never;
1046
- identity: undefined;
1047
- generated: undefined;
1048
- }, {}, {
1049
- $type: Record<string, unknown> | null;
1050
- }>;
1051
- createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1052
- name: "created_at";
1053
- tableName: "media";
1054
- dataType: "string";
1055
- columnType: "SQLiteText";
1056
- data: string;
1057
- driverParam: string;
1058
- notNull: true;
1059
- hasDefault: true;
1060
- isPrimaryKey: false;
1061
- isAutoincrement: false;
1062
- hasRuntimeDefault: true;
1063
- enumValues: [string, ...string[]];
1064
- baseColumn: never;
1065
- identity: undefined;
1066
- generated: undefined;
1067
- }, {}, {
1068
- length: number | undefined;
1069
- }>;
1070
- updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1071
- name: "updated_at";
1072
- tableName: "media";
1073
- dataType: "string";
1074
- columnType: "SQLiteText";
1075
- data: string;
1076
- driverParam: string;
1077
- notNull: true;
1078
- hasDefault: true;
1079
- isPrimaryKey: false;
1080
- isAutoincrement: false;
1081
- hasRuntimeDefault: true;
1082
- enumValues: [string, ...string[]];
1083
- baseColumn: never;
1084
- identity: undefined;
1085
- generated: undefined;
1086
- }, {}, {
1087
- length: number | undefined;
1088
- }>;
1089
- };
1090
- dialect: "sqlite";
1091
- }>;
1092
- type Media = typeof media.$inferSelect;
1093
- type NewMedia = typeof media.$inferInsert;
1094
- /** Collection definitions — the primary content model of Open Commune. */
1095
- declare const collectionDefinitions: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
1096
- name: "collection_definitions";
1097
- schema: undefined;
1098
- columns: {
1099
- id: drizzle_orm_sqlite_core.SQLiteColumn<{
1100
- name: "id";
1101
- tableName: "collection_definitions";
1102
- dataType: "string";
1103
- columnType: "SQLiteText";
1104
- data: string;
1105
- driverParam: string;
1106
- notNull: true;
1107
- hasDefault: true;
1108
- isPrimaryKey: true;
1109
- isAutoincrement: false;
1110
- hasRuntimeDefault: true;
1111
- enumValues: [string, ...string[]];
1112
- baseColumn: never;
1113
- identity: undefined;
1114
- generated: undefined;
1115
- }, {}, {
1116
- length: number | undefined;
1117
- }>;
1118
- name: drizzle_orm_sqlite_core.SQLiteColumn<{
1119
- name: "name";
1120
- tableName: "collection_definitions";
1121
- dataType: "string";
1122
- columnType: "SQLiteText";
1123
- data: string;
1124
- driverParam: string;
1125
- notNull: true;
1126
- hasDefault: false;
1127
- isPrimaryKey: false;
1128
- isAutoincrement: false;
1129
- hasRuntimeDefault: false;
1130
- enumValues: [string, ...string[]];
1131
- baseColumn: never;
1132
- identity: undefined;
1133
- generated: undefined;
1134
- }, {}, {
1135
- length: number | undefined;
1136
- }>;
1137
- slug: drizzle_orm_sqlite_core.SQLiteColumn<{
1138
- name: "slug";
1139
- tableName: "collection_definitions";
1140
- dataType: "string";
1141
- columnType: "SQLiteText";
1142
- data: string;
1143
- driverParam: string;
1144
- notNull: true;
1145
- hasDefault: false;
1146
- isPrimaryKey: false;
1147
- isAutoincrement: false;
1148
- hasRuntimeDefault: false;
1149
- enumValues: [string, ...string[]];
1150
- baseColumn: never;
1151
- identity: undefined;
1152
- generated: undefined;
1153
- }, {}, {
1154
- length: number | undefined;
1155
- }>;
1156
- description: drizzle_orm_sqlite_core.SQLiteColumn<{
1157
- name: "description";
1158
- tableName: "collection_definitions";
1159
- dataType: "string";
1160
- columnType: "SQLiteText";
1161
- data: string;
1162
- driverParam: string;
1163
- notNull: false;
1164
- hasDefault: false;
1165
- isPrimaryKey: false;
1166
- isAutoincrement: false;
1167
- hasRuntimeDefault: false;
1168
- enumValues: [string, ...string[]];
1169
- baseColumn: never;
1170
- identity: undefined;
1171
- generated: undefined;
1172
- }, {}, {
1173
- length: number | undefined;
1174
- }>;
1175
- fields: drizzle_orm_sqlite_core.SQLiteColumn<{
1176
- name: "fields";
1177
- tableName: "collection_definitions";
1178
- dataType: "json";
1179
- columnType: "SQLiteTextJson";
1180
- data: {
1181
- name: string;
1182
- label: string;
1183
- type: "number" | "boolean" | "text" | "rich-text" | "date" | "media" | "relation" | "select" | "steps" | "json";
1184
- required: boolean;
1185
- hidden: boolean;
1186
- options?: string[] | undefined;
1187
- target?: string | undefined;
1188
- }[];
1189
- driverParam: string;
1190
- notNull: true;
1191
- hasDefault: false;
1192
- isPrimaryKey: false;
1193
- isAutoincrement: false;
1194
- hasRuntimeDefault: false;
1195
- enumValues: undefined;
1196
- baseColumn: never;
1197
- identity: undefined;
1198
- generated: undefined;
1199
- }, {}, {
1200
- $type: {
1201
- name: string;
1202
- label: string;
1203
- type: "number" | "boolean" | "text" | "rich-text" | "date" | "media" | "relation" | "select" | "steps" | "json";
1204
- required: boolean;
1205
- hidden: boolean;
1206
- options?: string[] | undefined;
1207
- target?: string | undefined;
1208
- }[];
1209
- }>;
1210
- editor: drizzle_orm_sqlite_core.SQLiteColumn<{
1211
- name: "editor";
1212
- tableName: "collection_definitions";
1213
- dataType: "json";
1214
- columnType: "SQLiteTextJson";
1215
- data: Record<string, unknown>;
1216
- driverParam: string;
1217
- notNull: false;
1218
- hasDefault: false;
1219
- isPrimaryKey: false;
1220
- isAutoincrement: false;
1221
- hasRuntimeDefault: false;
1222
- enumValues: undefined;
1223
- baseColumn: never;
1224
- identity: undefined;
1225
- generated: undefined;
1226
- }, {}, {
1227
- $type: Record<string, unknown>;
1228
- }>;
1229
- display: drizzle_orm_sqlite_core.SQLiteColumn<{
1230
- name: "display";
1231
- tableName: "collection_definitions";
1232
- dataType: "json";
1233
- columnType: "SQLiteTextJson";
1234
- data: Record<string, unknown>;
1235
- driverParam: string;
1236
- notNull: false;
1237
- hasDefault: false;
1238
- isPrimaryKey: false;
1239
- isAutoincrement: false;
1240
- hasRuntimeDefault: false;
1241
- enumValues: undefined;
1242
- baseColumn: never;
1243
- identity: undefined;
1244
- generated: undefined;
1245
- }, {}, {
1246
- $type: Record<string, unknown>;
1247
- }>;
1248
- headings: drizzle_orm_sqlite_core.SQLiteColumn<{
1249
- name: "headings";
1250
- tableName: "collection_definitions";
1251
- dataType: "json";
1252
- columnType: "SQLiteTextJson";
1253
- data: Record<string, unknown>;
1254
- driverParam: string;
1255
- notNull: false;
1256
- hasDefault: false;
1257
- isPrimaryKey: false;
1258
- isAutoincrement: false;
1259
- hasRuntimeDefault: false;
1260
- enumValues: undefined;
1261
- baseColumn: never;
1262
- identity: undefined;
1263
- generated: undefined;
1264
- }, {}, {
1265
- $type: Record<string, unknown>;
1266
- }>;
1267
- createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
1268
- name: "created_by";
1269
- tableName: "collection_definitions";
1270
- dataType: "string";
1271
- columnType: "SQLiteText";
1272
- data: string;
1273
- driverParam: string;
1274
- notNull: false;
1275
- hasDefault: false;
1276
- isPrimaryKey: false;
1277
- isAutoincrement: false;
1278
- hasRuntimeDefault: false;
1279
- enumValues: [string, ...string[]];
1280
- baseColumn: never;
1281
- identity: undefined;
1282
- generated: undefined;
1283
- }, {}, {
1284
- length: number | undefined;
1285
- }>;
1286
- updatedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
1287
- name: "updated_by";
1288
- tableName: "collection_definitions";
1289
- dataType: "string";
1290
- columnType: "SQLiteText";
1291
- data: string;
1292
- driverParam: string;
1293
- notNull: false;
1294
- hasDefault: false;
1295
- isPrimaryKey: false;
1296
- isAutoincrement: false;
1297
- hasRuntimeDefault: false;
1298
- enumValues: [string, ...string[]];
1299
- baseColumn: never;
1300
- identity: undefined;
1301
- generated: undefined;
1302
- }, {}, {
1303
- length: number | undefined;
1304
- }>;
1305
- legacyExtra: drizzle_orm_sqlite_core.SQLiteColumn<{
1306
- name: "legacy_extra";
1307
- tableName: "collection_definitions";
1308
- dataType: "json";
1309
- columnType: "SQLiteTextJson";
1310
- data: Record<string, unknown> | null;
1311
- driverParam: string;
1312
- notNull: false;
1313
- hasDefault: false;
1314
- isPrimaryKey: false;
1315
- isAutoincrement: false;
1316
- hasRuntimeDefault: false;
1317
- enumValues: undefined;
1318
- baseColumn: never;
1319
- identity: undefined;
1320
- generated: undefined;
1321
- }, {}, {
1322
- $type: Record<string, unknown> | null;
1323
- }>;
1324
- createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1325
- name: "created_at";
1326
- tableName: "collection_definitions";
1327
- dataType: "string";
1328
- columnType: "SQLiteText";
1329
- data: string;
1330
- driverParam: string;
1331
- notNull: true;
1332
- hasDefault: true;
1333
- isPrimaryKey: false;
1334
- isAutoincrement: false;
1335
- hasRuntimeDefault: true;
1336
- enumValues: [string, ...string[]];
1337
- baseColumn: never;
1338
- identity: undefined;
1339
- generated: undefined;
1340
- }, {}, {
1341
- length: number | undefined;
1342
- }>;
1343
- updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1344
- name: "updated_at";
1345
- tableName: "collection_definitions";
1346
- dataType: "string";
1347
- columnType: "SQLiteText";
1348
- data: string;
1349
- driverParam: string;
1350
- notNull: true;
1351
- hasDefault: true;
1352
- isPrimaryKey: false;
1353
- isAutoincrement: false;
1354
- hasRuntimeDefault: true;
1355
- enumValues: [string, ...string[]];
1356
- baseColumn: never;
1357
- identity: undefined;
1358
- generated: undefined;
1359
- }, {}, {
1360
- length: number | undefined;
1361
- }>;
1362
- };
1363
- dialect: "sqlite";
1364
- }>;
1365
- /** Entries of a collection — validated against the definition's fields. */
1366
- declare const entries: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
1367
- name: "entries";
1368
- schema: undefined;
1369
- columns: {
1370
- id: drizzle_orm_sqlite_core.SQLiteColumn<{
1371
- name: "id";
1372
- tableName: "entries";
1373
- dataType: "string";
1374
- columnType: "SQLiteText";
1375
- data: string;
1376
- driverParam: string;
1377
- notNull: true;
1378
- hasDefault: true;
1379
- isPrimaryKey: true;
1380
- isAutoincrement: false;
1381
- hasRuntimeDefault: true;
1382
- enumValues: [string, ...string[]];
1383
- baseColumn: never;
1384
- identity: undefined;
1385
- generated: undefined;
1386
- }, {}, {
1387
- length: number | undefined;
1388
- }>;
1389
- collectionId: drizzle_orm_sqlite_core.SQLiteColumn<{
1390
- name: "collection_id";
1391
- tableName: "entries";
1392
- dataType: "string";
1393
- columnType: "SQLiteText";
1394
- data: string;
1395
- driverParam: string;
1396
- notNull: true;
1397
- hasDefault: false;
1398
- isPrimaryKey: false;
1399
- isAutoincrement: false;
1400
- hasRuntimeDefault: false;
1401
- enumValues: [string, ...string[]];
1402
- baseColumn: never;
1403
- identity: undefined;
1404
- generated: undefined;
1405
- }, {}, {
1406
- length: number | undefined;
1407
- }>;
1408
- title: drizzle_orm_sqlite_core.SQLiteColumn<{
1409
- name: "title";
1410
- tableName: "entries";
1411
- dataType: "string";
1412
- columnType: "SQLiteText";
1413
- data: string;
1414
- driverParam: string;
1415
- notNull: true;
1416
- hasDefault: false;
1417
- isPrimaryKey: false;
1418
- isAutoincrement: false;
1419
- hasRuntimeDefault: false;
1420
- enumValues: [string, ...string[]];
1421
- baseColumn: never;
1422
- identity: undefined;
1423
- generated: undefined;
1424
- }, {}, {
1425
- length: number | undefined;
1426
- }>;
1427
- slug: drizzle_orm_sqlite_core.SQLiteColumn<{
1428
- name: "slug";
1429
- tableName: "entries";
1430
- dataType: "string";
1431
- columnType: "SQLiteText";
1432
- data: string;
1433
- driverParam: string;
1434
- notNull: true;
1435
- hasDefault: false;
1436
- isPrimaryKey: false;
1437
- isAutoincrement: false;
1438
- hasRuntimeDefault: false;
1439
- enumValues: [string, ...string[]];
1440
- baseColumn: never;
1441
- identity: undefined;
1442
- generated: undefined;
1443
- }, {}, {
1444
- length: number | undefined;
1445
- }>;
1446
- data: drizzle_orm_sqlite_core.SQLiteColumn<{
1447
- name: "data";
1448
- tableName: "entries";
1449
- dataType: "json";
1450
- columnType: "SQLiteTextJson";
1451
- data: Record<string, unknown>;
1452
- driverParam: string;
1453
- notNull: true;
1454
- hasDefault: false;
1455
- isPrimaryKey: false;
1456
- isAutoincrement: false;
1457
- hasRuntimeDefault: false;
1458
- enumValues: undefined;
1459
- baseColumn: never;
1460
- identity: undefined;
1461
- generated: undefined;
1462
- }, {}, {
1463
- $type: Record<string, unknown>;
1464
- }>;
1465
- related: drizzle_orm_sqlite_core.SQLiteColumn<{
1466
- name: "related";
1467
- tableName: "entries";
1468
- dataType: "json";
1469
- columnType: "SQLiteTextJson";
1470
- data: string[];
1471
- driverParam: string;
1472
- notNull: false;
1473
- hasDefault: false;
1474
- isPrimaryKey: false;
1475
- isAutoincrement: false;
1476
- hasRuntimeDefault: false;
1477
- enumValues: undefined;
1478
- baseColumn: never;
1479
- identity: undefined;
1480
- generated: undefined;
1481
- }, {}, {
1482
- $type: string[];
1483
- }>;
1484
- createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
1485
- name: "created_by";
1486
- tableName: "entries";
1487
- dataType: "string";
1488
- columnType: "SQLiteText";
1489
- data: string;
1490
- driverParam: string;
1491
- notNull: false;
1492
- hasDefault: false;
1493
- isPrimaryKey: false;
1494
- isAutoincrement: false;
1495
- hasRuntimeDefault: false;
1496
- enumValues: [string, ...string[]];
1497
- baseColumn: never;
1498
- identity: undefined;
1499
- generated: undefined;
1500
- }, {}, {
1501
- length: number | undefined;
1502
- }>;
1503
- updatedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
1504
- name: "updated_by";
1505
- tableName: "entries";
1506
- dataType: "string";
1507
- columnType: "SQLiteText";
1508
- data: string;
1509
- driverParam: string;
1510
- notNull: false;
1511
- hasDefault: false;
1512
- isPrimaryKey: false;
1513
- isAutoincrement: false;
1514
- hasRuntimeDefault: false;
1515
- enumValues: [string, ...string[]];
1516
- baseColumn: never;
1517
- identity: undefined;
1518
- generated: undefined;
1519
- }, {}, {
1520
- length: number | undefined;
1521
- }>;
1522
- status: drizzle_orm_sqlite_core.SQLiteColumn<{
1523
- name: "status";
1524
- tableName: "entries";
1525
- dataType: "string";
1526
- columnType: "SQLiteText";
1527
- data: "draft" | "waiting" | "ready" | "scheduled" | "published";
1528
- driverParam: string;
1529
- notNull: true;
1530
- hasDefault: true;
1531
- isPrimaryKey: false;
1532
- isAutoincrement: false;
1533
- hasRuntimeDefault: false;
1534
- enumValues: ["draft", "waiting", "ready", "scheduled", "published"];
1535
- baseColumn: never;
1536
- identity: undefined;
1537
- generated: undefined;
1538
- }, {}, {
1539
- length: number | undefined;
1540
- }>;
1541
- publishedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1542
- name: "published_at";
1543
- tableName: "entries";
1544
- dataType: "string";
1545
- columnType: "SQLiteText";
1546
- data: string;
1547
- driverParam: string;
1548
- notNull: false;
1549
- hasDefault: false;
1550
- isPrimaryKey: false;
1551
- isAutoincrement: false;
1552
- hasRuntimeDefault: false;
1553
- enumValues: [string, ...string[]];
1554
- baseColumn: never;
1555
- identity: undefined;
1556
- generated: undefined;
1557
- }, {}, {
1558
- length: number | undefined;
1559
- }>;
1560
- legacyExtra: drizzle_orm_sqlite_core.SQLiteColumn<{
1561
- name: "legacy_extra";
1562
- tableName: "entries";
1563
- dataType: "json";
1564
- columnType: "SQLiteTextJson";
1565
- data: Record<string, unknown> | null;
1566
- driverParam: string;
1567
- notNull: false;
1568
- hasDefault: false;
1569
- isPrimaryKey: false;
1570
- isAutoincrement: false;
1571
- hasRuntimeDefault: false;
1572
- enumValues: undefined;
1573
- baseColumn: never;
1574
- identity: undefined;
1575
- generated: undefined;
1576
- }, {}, {
1577
- $type: Record<string, unknown> | null;
1578
- }>;
1579
- createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1580
- name: "created_at";
1581
- tableName: "entries";
1582
- dataType: "string";
1583
- columnType: "SQLiteText";
1584
- data: string;
1585
- driverParam: string;
1586
- notNull: true;
1587
- hasDefault: true;
1588
- isPrimaryKey: false;
1589
- isAutoincrement: false;
1590
- hasRuntimeDefault: true;
1591
- enumValues: [string, ...string[]];
1592
- baseColumn: never;
1593
- identity: undefined;
1594
- generated: undefined;
1595
- }, {}, {
1596
- length: number | undefined;
1597
- }>;
1598
- updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1599
- name: "updated_at";
1600
- tableName: "entries";
1601
- dataType: "string";
1602
- columnType: "SQLiteText";
1603
- data: string;
1604
- driverParam: string;
1605
- notNull: true;
1606
- hasDefault: true;
1607
- isPrimaryKey: false;
1608
- isAutoincrement: false;
1609
- hasRuntimeDefault: true;
1610
- enumValues: [string, ...string[]];
1611
- baseColumn: never;
1612
- identity: undefined;
1613
- generated: undefined;
1614
- }, {}, {
1615
- length: number | undefined;
1616
- }>;
1617
- };
1618
- dialect: "sqlite";
1619
- }>;
1620
- type CollectionDefinition = typeof collectionDefinitions.$inferSelect;
1621
- type NewCollectionDefinition = typeof collectionDefinitions.$inferInsert;
1622
- type Entry = typeof entries.$inferSelect;
1623
- type NewEntry = typeof entries.$inferInsert;
1624
-
1625
- type schema_Address = Address;
1626
- type schema_ApiToken = ApiToken;
1627
- type schema_CollectionDefinition = CollectionDefinition;
1628
- type schema_Entry = Entry;
1629
- declare const schema_FIELD_TYPES: typeof FIELD_TYPES;
1630
- declare const schema_FieldDefinition: typeof FieldDefinition;
1631
- declare const schema_FieldType: typeof FieldType;
1632
- type schema_Invitation = Invitation;
1633
- type schema_Media = Media;
1634
- type schema_NewCollectionDefinition = NewCollectionDefinition;
1635
- type schema_NewEntry = NewEntry;
1636
- type schema_NewMedia = NewMedia;
1637
- type schema_NewOrganization = NewOrganization;
1638
- type schema_NewUser = NewUser;
1639
- type schema_Organization = Organization;
1640
- declare const schema_PUBLICATION_STATUSES: typeof PUBLICATION_STATUSES;
1641
- type schema_Session = Session;
1642
- type schema_User = User;
1643
- declare const schema_addressSchema: typeof addressSchema;
1644
- declare const schema_apiTokens: typeof apiTokens;
1645
- declare const schema_collectionDefinitions: typeof collectionDefinitions;
1646
- declare const schema_entries: typeof entries;
1647
- declare const schema_fieldDefinitionSchema: typeof fieldDefinitionSchema;
1648
- declare const schema_invitations: typeof invitations;
1649
- declare const schema_media: typeof media;
1650
- declare const schema_organization: typeof organization;
1651
- declare const schema_sessions: typeof sessions;
1652
- declare const schema_users: typeof users;
1653
- declare namespace schema {
1654
- 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 };
1655
- 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 };
1656
- }
1657
-
1658
35
  /** Open and migrate the instance database: one instance, one SQLite file. */
1659
36
  declare function connectDb(dataDir: string, migrationsDir?: string): drizzle_orm_bun_sqlite.BunSQLiteDatabase<typeof schema> & {
1660
37
  $client: Database;
@@ -1940,75 +317,6 @@ declare class OrganizationRepository {
1940
317
  update(input: Partial<NewOrganization>): Promise<Organization | undefined>;
1941
318
  }
1942
319
 
1943
- declare const organizationInitDto: z.ZodObject<{
1944
- type: z.ZodOptional<z.ZodEnum<{
1945
- commune: "commune";
1946
- intercommunality: "intercommunality";
1947
- syndicate: "syndicate";
1948
- other: "other";
1949
- }>>;
1950
- name: z.ZodString;
1951
- slug: z.ZodString;
1952
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1953
- address: z.ZodOptional<z.ZodNullable<z.ZodType<{
1954
- street?: string | undefined;
1955
- postalCode?: string | undefined;
1956
- city?: string | undefined;
1957
- }, {
1958
- street?: string | undefined;
1959
- postalCode?: string | undefined;
1960
- city?: string | undefined;
1961
- }, z.core.$ZodTypeInternals<{
1962
- street?: string | undefined;
1963
- postalCode?: string | undefined;
1964
- city?: string | undefined;
1965
- }, {
1966
- street?: string | undefined;
1967
- postalCode?: string | undefined;
1968
- city?: string | undefined;
1969
- }>>>>;
1970
- deployment: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
1971
- settings: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
1972
- }, {
1973
- out: {};
1974
- in: {};
1975
- }>;
1976
- declare const organizationUpdateDto: z.ZodObject<{
1977
- type: z.ZodOptional<z.ZodEnum<{
1978
- commune: "commune";
1979
- intercommunality: "intercommunality";
1980
- syndicate: "syndicate";
1981
- other: "other";
1982
- }>>;
1983
- name: z.ZodOptional<z.ZodString>;
1984
- slug: z.ZodOptional<z.ZodString>;
1985
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1986
- address: z.ZodOptional<z.ZodNullable<z.ZodType<{
1987
- street?: string | undefined;
1988
- postalCode?: string | undefined;
1989
- city?: string | undefined;
1990
- }, {
1991
- street?: string | undefined;
1992
- postalCode?: string | undefined;
1993
- city?: string | undefined;
1994
- }, z.core.$ZodTypeInternals<{
1995
- street?: string | undefined;
1996
- postalCode?: string | undefined;
1997
- city?: string | undefined;
1998
- }, {
1999
- street?: string | undefined;
2000
- postalCode?: string | undefined;
2001
- city?: string | undefined;
2002
- }>>>>;
2003
- deployment: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
2004
- settings: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
2005
- }, {
2006
- out: {};
2007
- in: {};
2008
- }>;
2009
- type OrganizationInitDto = z.infer<typeof organizationInitDto>;
2010
- type OrganizationUpdateDto = z.infer<typeof organizationUpdateDto>;
2011
-
2012
320
  /** Instance settings — a singleton: initialised once, then only updated. */
2013
321
  declare class OrganizationService {
2014
322
  private readonly repository;
@@ -2042,31 +350,6 @@ declare class MediaRepository {
2042
350
  delete(id: string): Promise<void>;
2043
351
  }
2044
352
 
2045
- declare const mediaRequestUploadDto: z.ZodObject<{
2046
- filename: z.ZodString;
2047
- mime: z.ZodString;
2048
- metaData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2049
- }, z.core.$strip>;
2050
- declare const mediaFinalizeDto: z.ZodObject<{
2051
- key: z.ZodString;
2052
- filename: z.ZodString;
2053
- mime: z.ZodString;
2054
- alt: z.ZodOptional<z.ZodString>;
2055
- metaData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2056
- }, z.core.$strip>;
2057
- type MediaRequestUploadDto = z.infer<typeof mediaRequestUploadDto>;
2058
- type MediaFinalizeDto = z.infer<typeof mediaFinalizeDto>;
2059
-
2060
- declare const mediaUpdateDto: z.ZodObject<{
2061
- filename: z.ZodOptional<z.ZodString>;
2062
- alt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2063
- caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2064
- }, {
2065
- out: {};
2066
- in: {};
2067
- }>;
2068
- type MediaUpdateDto = z.infer<typeof mediaUpdateDto>;
2069
-
2070
353
  /** Closed allowlist. SVG is excluded on purpose: it is an XSS surface. */
2071
354
  declare const ALLOWED_MIME: Set<string>;
2072
355
  /**
@@ -2126,6 +409,21 @@ declare class DefinitionRepository {
2126
409
  delete(id: string): Promise<CollectionDefinition | undefined>;
2127
410
  }
2128
411
 
412
+ /** A period, its bounds ISO 8601 dates at the precision asked: `2026`, `2026-11`, `2026-11-13`. */
413
+ type EntryPeriod = {
414
+ gte?: string;
415
+ lte?: string;
416
+ };
417
+ /** How a listing may be narrowed. Every filter is optional, and they combine. */
418
+ type EntryNarrowing = {
419
+ /** One collection; every collection of the site when omitted. */
420
+ collectionId?: string;
421
+ status?: Entry['status'][];
422
+ search?: string;
423
+ date?: EntryPeriod;
424
+ references?: string[];
425
+ };
426
+ type EntryOrder = 'recent' | 'oldest' | 'title' | 'date_asc' | 'date_desc';
2129
427
  /**
2130
428
  * Database access for collection entries. Methods are async by contract, even
2131
429
  * though bun:sqlite executes synchronously.
@@ -2140,13 +438,31 @@ declare class EntryRepository {
2140
438
  * entries would not fit in it anyway.
2141
439
  */
2142
440
  private narrowing;
441
+ /**
442
+ * The dates of an entry, as spans: an object of its fields that holds dates
443
+ * (a session, with its start and its end) is one span from the first to the
444
+ * last; a date on its own, at the top or in a list, is a span of one day.
445
+ * Read from any field, whatever its name, as the theme reads them.
446
+ */
447
+ private spans;
448
+ /**
449
+ * A span is within the period when it overlaps it, each bound compared at
450
+ * its own precision: `2026-11` keeps a session from 30/10 to 02/11.
451
+ */
452
+ private within;
453
+ /**
454
+ * The day an entry is sorted by: its first date within the period, or its
455
+ * last for a reverse order — so that « the last council » is the latest one
456
+ * held, and an entry with no date comes after every dated one.
457
+ */
458
+ private dateKey;
2143
459
  /**
2144
460
  * Text match on the title and the data. One LIKE is enough at a commune's
2145
461
  * scale, and it leaves the title index usable.
2146
462
  */
2147
463
  private matching;
2148
464
  /**
2149
- * Text search across collections, most recently updated first — how an agent
465
+ * Text search across collections, most recently updated first — how one
2150
466
  * finds content without knowing where it lives.
2151
467
  */
2152
468
  search(options: {
@@ -2156,18 +472,17 @@ declare class EntryRepository {
2156
472
  limit: number;
2157
473
  }): Promise<Entry[]>;
2158
474
  /** The total a paginated listing is a window onto. Counted in SQL. */
2159
- countMatching(options: {
2160
- collectionId: string;
2161
- status?: Entry['status'][];
2162
- search?: string;
2163
- }): Promise<number>;
2164
- /** Admin listing: most recently updated first by default, paginated. */
2165
- listPaginated(collectionId: string, options: {
475
+ countMatching(options: EntryNarrowing): Promise<number>;
476
+ /** The entries last touched, whatever their collection: what a home shows. */
477
+ listRecent(limit: number): Promise<Entry[]>;
478
+ /**
479
+ * Admin listing: most recently updated first by default, paginated. With a
480
+ * period and no order, the entries come by date, the earliest first.
481
+ */
482
+ listPaginated(options: EntryNarrowing & {
2166
483
  skip: number;
2167
484
  limit: number;
2168
- status?: Entry['status'][];
2169
- search?: string;
2170
- order?: 'recent' | 'oldest' | 'title';
485
+ order?: EntryOrder;
2171
486
  }): Promise<Entry[]>;
2172
487
  listPublished(collectionId: string): Promise<Entry[]>;
2173
488
  findBySlug(collectionId: string, slug: string): Promise<Entry | undefined>;
@@ -2179,687 +494,6 @@ declare class EntryRepository {
2179
494
  delete(id: string): Promise<Entry | undefined>;
2180
495
  }
2181
496
 
2182
- declare const definitionCreateDto: z.ZodObject<{
2183
- name: z.ZodString;
2184
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2185
- editor: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
2186
- display: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
2187
- headings: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
2188
- fields: z.ZodArray<z.ZodObject<{
2189
- name: z.ZodString;
2190
- label: z.ZodString;
2191
- type: z.ZodEnum<{
2192
- number: "number";
2193
- boolean: "boolean";
2194
- text: "text";
2195
- "rich-text": "rich-text";
2196
- date: "date";
2197
- media: "media";
2198
- relation: "relation";
2199
- select: "select";
2200
- steps: "steps";
2201
- json: "json";
2202
- }>;
2203
- required: z.ZodDefault<z.ZodBoolean>;
2204
- hidden: z.ZodDefault<z.ZodBoolean>;
2205
- options: z.ZodOptional<z.ZodArray<z.ZodString>>;
2206
- target: z.ZodOptional<z.ZodString>;
2207
- }, z.core.$strip>>;
2208
- slug: z.ZodOptional<z.ZodString>;
2209
- }, {
2210
- out: {};
2211
- in: {};
2212
- }>;
2213
- declare const definitionUpdateDto: z.ZodObject<{
2214
- name: z.ZodOptional<z.ZodString>;
2215
- slug: z.ZodOptional<z.ZodString>;
2216
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2217
- editor: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
2218
- display: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
2219
- headings: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
2220
- fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
2221
- name: z.ZodString;
2222
- label: z.ZodString;
2223
- type: z.ZodEnum<{
2224
- number: "number";
2225
- boolean: "boolean";
2226
- text: "text";
2227
- "rich-text": "rich-text";
2228
- date: "date";
2229
- media: "media";
2230
- relation: "relation";
2231
- select: "select";
2232
- steps: "steps";
2233
- json: "json";
2234
- }>;
2235
- required: z.ZodDefault<z.ZodBoolean>;
2236
- hidden: z.ZodDefault<z.ZodBoolean>;
2237
- options: z.ZodOptional<z.ZodArray<z.ZodString>>;
2238
- target: z.ZodOptional<z.ZodString>;
2239
- }, z.core.$strip>>>;
2240
- }, {
2241
- out: {};
2242
- in: {};
2243
- }>;
2244
- declare const definitionDto: drizzle_zod.BuildSchema<"select", {
2245
- id: drizzle_orm_sqlite_core.SQLiteColumn<{
2246
- name: "id";
2247
- tableName: "collection_definitions";
2248
- dataType: "string";
2249
- columnType: "SQLiteText";
2250
- data: string;
2251
- driverParam: string;
2252
- notNull: true;
2253
- hasDefault: true;
2254
- isPrimaryKey: true;
2255
- isAutoincrement: false;
2256
- hasRuntimeDefault: true;
2257
- enumValues: [string, ...string[]];
2258
- baseColumn: never;
2259
- identity: undefined;
2260
- generated: undefined;
2261
- }, {}, {
2262
- length: number | undefined;
2263
- }>;
2264
- name: drizzle_orm_sqlite_core.SQLiteColumn<{
2265
- name: "name";
2266
- tableName: "collection_definitions";
2267
- dataType: "string";
2268
- columnType: "SQLiteText";
2269
- data: string;
2270
- driverParam: string;
2271
- notNull: true;
2272
- hasDefault: false;
2273
- isPrimaryKey: false;
2274
- isAutoincrement: false;
2275
- hasRuntimeDefault: false;
2276
- enumValues: [string, ...string[]];
2277
- baseColumn: never;
2278
- identity: undefined;
2279
- generated: undefined;
2280
- }, {}, {
2281
- length: number | undefined;
2282
- }>;
2283
- slug: drizzle_orm_sqlite_core.SQLiteColumn<{
2284
- name: "slug";
2285
- tableName: "collection_definitions";
2286
- dataType: "string";
2287
- columnType: "SQLiteText";
2288
- data: string;
2289
- driverParam: string;
2290
- notNull: true;
2291
- hasDefault: false;
2292
- isPrimaryKey: false;
2293
- isAutoincrement: false;
2294
- hasRuntimeDefault: false;
2295
- enumValues: [string, ...string[]];
2296
- baseColumn: never;
2297
- identity: undefined;
2298
- generated: undefined;
2299
- }, {}, {
2300
- length: number | undefined;
2301
- }>;
2302
- description: drizzle_orm_sqlite_core.SQLiteColumn<{
2303
- name: "description";
2304
- tableName: "collection_definitions";
2305
- dataType: "string";
2306
- columnType: "SQLiteText";
2307
- data: string;
2308
- driverParam: string;
2309
- notNull: false;
2310
- hasDefault: false;
2311
- isPrimaryKey: false;
2312
- isAutoincrement: false;
2313
- hasRuntimeDefault: false;
2314
- enumValues: [string, ...string[]];
2315
- baseColumn: never;
2316
- identity: undefined;
2317
- generated: undefined;
2318
- }, {}, {
2319
- length: number | undefined;
2320
- }>;
2321
- fields: drizzle_orm_sqlite_core.SQLiteColumn<{
2322
- name: "fields";
2323
- tableName: "collection_definitions";
2324
- dataType: "json";
2325
- columnType: "SQLiteTextJson";
2326
- data: {
2327
- name: string;
2328
- label: string;
2329
- type: "number" | "boolean" | "text" | "rich-text" | "date" | "media" | "relation" | "select" | "steps" | "json";
2330
- required: boolean;
2331
- hidden: boolean;
2332
- options?: string[] | undefined;
2333
- target?: string | undefined;
2334
- }[];
2335
- driverParam: string;
2336
- notNull: true;
2337
- hasDefault: false;
2338
- isPrimaryKey: false;
2339
- isAutoincrement: false;
2340
- hasRuntimeDefault: false;
2341
- enumValues: undefined;
2342
- baseColumn: never;
2343
- identity: undefined;
2344
- generated: undefined;
2345
- }, {}, {
2346
- $type: {
2347
- name: string;
2348
- label: string;
2349
- type: "number" | "boolean" | "text" | "rich-text" | "date" | "media" | "relation" | "select" | "steps" | "json";
2350
- required: boolean;
2351
- hidden: boolean;
2352
- options?: string[] | undefined;
2353
- target?: string | undefined;
2354
- }[];
2355
- }>;
2356
- editor: drizzle_orm_sqlite_core.SQLiteColumn<{
2357
- name: "editor";
2358
- tableName: "collection_definitions";
2359
- dataType: "json";
2360
- columnType: "SQLiteTextJson";
2361
- data: Record<string, unknown>;
2362
- driverParam: string;
2363
- notNull: false;
2364
- hasDefault: false;
2365
- isPrimaryKey: false;
2366
- isAutoincrement: false;
2367
- hasRuntimeDefault: false;
2368
- enumValues: undefined;
2369
- baseColumn: never;
2370
- identity: undefined;
2371
- generated: undefined;
2372
- }, {}, {
2373
- $type: Record<string, unknown>;
2374
- }>;
2375
- display: drizzle_orm_sqlite_core.SQLiteColumn<{
2376
- name: "display";
2377
- tableName: "collection_definitions";
2378
- dataType: "json";
2379
- columnType: "SQLiteTextJson";
2380
- data: Record<string, unknown>;
2381
- driverParam: string;
2382
- notNull: false;
2383
- hasDefault: false;
2384
- isPrimaryKey: false;
2385
- isAutoincrement: false;
2386
- hasRuntimeDefault: false;
2387
- enumValues: undefined;
2388
- baseColumn: never;
2389
- identity: undefined;
2390
- generated: undefined;
2391
- }, {}, {
2392
- $type: Record<string, unknown>;
2393
- }>;
2394
- headings: drizzle_orm_sqlite_core.SQLiteColumn<{
2395
- name: "headings";
2396
- tableName: "collection_definitions";
2397
- dataType: "json";
2398
- columnType: "SQLiteTextJson";
2399
- data: Record<string, unknown>;
2400
- driverParam: string;
2401
- notNull: false;
2402
- hasDefault: false;
2403
- isPrimaryKey: false;
2404
- isAutoincrement: false;
2405
- hasRuntimeDefault: false;
2406
- enumValues: undefined;
2407
- baseColumn: never;
2408
- identity: undefined;
2409
- generated: undefined;
2410
- }, {}, {
2411
- $type: Record<string, unknown>;
2412
- }>;
2413
- createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
2414
- name: "created_by";
2415
- tableName: "collection_definitions";
2416
- dataType: "string";
2417
- columnType: "SQLiteText";
2418
- data: string;
2419
- driverParam: string;
2420
- notNull: false;
2421
- hasDefault: false;
2422
- isPrimaryKey: false;
2423
- isAutoincrement: false;
2424
- hasRuntimeDefault: false;
2425
- enumValues: [string, ...string[]];
2426
- baseColumn: never;
2427
- identity: undefined;
2428
- generated: undefined;
2429
- }, {}, {
2430
- length: number | undefined;
2431
- }>;
2432
- updatedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
2433
- name: "updated_by";
2434
- tableName: "collection_definitions";
2435
- dataType: "string";
2436
- columnType: "SQLiteText";
2437
- data: string;
2438
- driverParam: string;
2439
- notNull: false;
2440
- hasDefault: false;
2441
- isPrimaryKey: false;
2442
- isAutoincrement: false;
2443
- hasRuntimeDefault: false;
2444
- enumValues: [string, ...string[]];
2445
- baseColumn: never;
2446
- identity: undefined;
2447
- generated: undefined;
2448
- }, {}, {
2449
- length: number | undefined;
2450
- }>;
2451
- legacyExtra: drizzle_orm_sqlite_core.SQLiteColumn<{
2452
- name: "legacy_extra";
2453
- tableName: "collection_definitions";
2454
- dataType: "json";
2455
- columnType: "SQLiteTextJson";
2456
- data: Record<string, unknown> | null;
2457
- driverParam: string;
2458
- notNull: false;
2459
- hasDefault: false;
2460
- isPrimaryKey: false;
2461
- isAutoincrement: false;
2462
- hasRuntimeDefault: false;
2463
- enumValues: undefined;
2464
- baseColumn: never;
2465
- identity: undefined;
2466
- generated: undefined;
2467
- }, {}, {
2468
- $type: Record<string, unknown> | null;
2469
- }>;
2470
- createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
2471
- name: "created_at";
2472
- tableName: "collection_definitions";
2473
- dataType: "string";
2474
- columnType: "SQLiteText";
2475
- data: string;
2476
- driverParam: string;
2477
- notNull: true;
2478
- hasDefault: true;
2479
- isPrimaryKey: false;
2480
- isAutoincrement: false;
2481
- hasRuntimeDefault: true;
2482
- enumValues: [string, ...string[]];
2483
- baseColumn: never;
2484
- identity: undefined;
2485
- generated: undefined;
2486
- }, {}, {
2487
- length: number | undefined;
2488
- }>;
2489
- updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
2490
- name: "updated_at";
2491
- tableName: "collection_definitions";
2492
- dataType: "string";
2493
- columnType: "SQLiteText";
2494
- data: string;
2495
- driverParam: string;
2496
- notNull: true;
2497
- hasDefault: true;
2498
- isPrimaryKey: false;
2499
- isAutoincrement: false;
2500
- hasRuntimeDefault: true;
2501
- enumValues: [string, ...string[]];
2502
- baseColumn: never;
2503
- identity: undefined;
2504
- generated: undefined;
2505
- }, {}, {
2506
- length: number | undefined;
2507
- }>;
2508
- }, {
2509
- fields: z.ZodArray<z.ZodObject<{
2510
- name: z.ZodString;
2511
- label: z.ZodString;
2512
- type: z.ZodUnion<[z.ZodEnum<{
2513
- number: "number";
2514
- boolean: "boolean";
2515
- text: "text";
2516
- "rich-text": "rich-text";
2517
- date: "date";
2518
- media: "media";
2519
- relation: "relation";
2520
- select: "select";
2521
- steps: "steps";
2522
- json: "json";
2523
- }>, z.ZodString]>;
2524
- required: z.ZodDefault<z.ZodBoolean>;
2525
- hidden: z.ZodDefault<z.ZodBoolean>;
2526
- options: z.ZodOptional<z.ZodArray<z.ZodString>>;
2527
- target: z.ZodOptional<z.ZodString>;
2528
- }, z.core.$loose>>;
2529
- }, undefined>;
2530
- type DefinitionCreateDto = z.infer<typeof definitionCreateDto>;
2531
- type DefinitionUpdateDto = z.infer<typeof definitionUpdateDto>;
2532
-
2533
- declare const entryCreateDto: z.ZodObject<{
2534
- data: z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>;
2535
- title: z.ZodString;
2536
- status: z.ZodOptional<z.ZodEnum<{
2537
- draft: "draft";
2538
- waiting: "waiting";
2539
- ready: "ready";
2540
- scheduled: "scheduled";
2541
- published: "published";
2542
- }>>;
2543
- publishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2544
- slug: z.ZodOptional<z.ZodString>;
2545
- }, {
2546
- out: {};
2547
- in: {};
2548
- }>;
2549
- declare const entryUpdateDto: z.ZodObject<{
2550
- data: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
2551
- slug: z.ZodOptional<z.ZodString>;
2552
- title: z.ZodOptional<z.ZodString>;
2553
- status: z.ZodOptional<z.ZodEnum<{
2554
- draft: "draft";
2555
- waiting: "waiting";
2556
- ready: "ready";
2557
- scheduled: "scheduled";
2558
- published: "published";
2559
- }>>;
2560
- publishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2561
- related: z.ZodOptional<z.ZodArray<z.ZodString>>;
2562
- }, {
2563
- out: {};
2564
- in: {};
2565
- }>;
2566
- declare const entryDto: drizzle_zod.BuildSchema<"select", {
2567
- id: drizzle_orm_sqlite_core.SQLiteColumn<{
2568
- name: "id";
2569
- tableName: "entries";
2570
- dataType: "string";
2571
- columnType: "SQLiteText";
2572
- data: string;
2573
- driverParam: string;
2574
- notNull: true;
2575
- hasDefault: true;
2576
- isPrimaryKey: true;
2577
- isAutoincrement: false;
2578
- hasRuntimeDefault: true;
2579
- enumValues: [string, ...string[]];
2580
- baseColumn: never;
2581
- identity: undefined;
2582
- generated: undefined;
2583
- }, {}, {
2584
- length: number | undefined;
2585
- }>;
2586
- collectionId: drizzle_orm_sqlite_core.SQLiteColumn<{
2587
- name: "collection_id";
2588
- tableName: "entries";
2589
- dataType: "string";
2590
- columnType: "SQLiteText";
2591
- data: string;
2592
- driverParam: string;
2593
- notNull: true;
2594
- hasDefault: false;
2595
- isPrimaryKey: false;
2596
- isAutoincrement: false;
2597
- hasRuntimeDefault: false;
2598
- enumValues: [string, ...string[]];
2599
- baseColumn: never;
2600
- identity: undefined;
2601
- generated: undefined;
2602
- }, {}, {
2603
- length: number | undefined;
2604
- }>;
2605
- title: drizzle_orm_sqlite_core.SQLiteColumn<{
2606
- name: "title";
2607
- tableName: "entries";
2608
- dataType: "string";
2609
- columnType: "SQLiteText";
2610
- data: string;
2611
- driverParam: string;
2612
- notNull: true;
2613
- hasDefault: false;
2614
- isPrimaryKey: false;
2615
- isAutoincrement: false;
2616
- hasRuntimeDefault: false;
2617
- enumValues: [string, ...string[]];
2618
- baseColumn: never;
2619
- identity: undefined;
2620
- generated: undefined;
2621
- }, {}, {
2622
- length: number | undefined;
2623
- }>;
2624
- slug: drizzle_orm_sqlite_core.SQLiteColumn<{
2625
- name: "slug";
2626
- tableName: "entries";
2627
- dataType: "string";
2628
- columnType: "SQLiteText";
2629
- data: string;
2630
- driverParam: string;
2631
- notNull: true;
2632
- hasDefault: false;
2633
- isPrimaryKey: false;
2634
- isAutoincrement: false;
2635
- hasRuntimeDefault: false;
2636
- enumValues: [string, ...string[]];
2637
- baseColumn: never;
2638
- identity: undefined;
2639
- generated: undefined;
2640
- }, {}, {
2641
- length: number | undefined;
2642
- }>;
2643
- data: drizzle_orm_sqlite_core.SQLiteColumn<{
2644
- name: "data";
2645
- tableName: "entries";
2646
- dataType: "json";
2647
- columnType: "SQLiteTextJson";
2648
- data: Record<string, unknown>;
2649
- driverParam: string;
2650
- notNull: true;
2651
- hasDefault: false;
2652
- isPrimaryKey: false;
2653
- isAutoincrement: false;
2654
- hasRuntimeDefault: false;
2655
- enumValues: undefined;
2656
- baseColumn: never;
2657
- identity: undefined;
2658
- generated: undefined;
2659
- }, {}, {
2660
- $type: Record<string, unknown>;
2661
- }>;
2662
- related: drizzle_orm_sqlite_core.SQLiteColumn<{
2663
- name: "related";
2664
- tableName: "entries";
2665
- dataType: "json";
2666
- columnType: "SQLiteTextJson";
2667
- data: string[];
2668
- driverParam: string;
2669
- notNull: false;
2670
- hasDefault: false;
2671
- isPrimaryKey: false;
2672
- isAutoincrement: false;
2673
- hasRuntimeDefault: false;
2674
- enumValues: undefined;
2675
- baseColumn: never;
2676
- identity: undefined;
2677
- generated: undefined;
2678
- }, {}, {
2679
- $type: string[];
2680
- }>;
2681
- createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
2682
- name: "created_by";
2683
- tableName: "entries";
2684
- dataType: "string";
2685
- columnType: "SQLiteText";
2686
- data: string;
2687
- driverParam: string;
2688
- notNull: false;
2689
- hasDefault: false;
2690
- isPrimaryKey: false;
2691
- isAutoincrement: false;
2692
- hasRuntimeDefault: false;
2693
- enumValues: [string, ...string[]];
2694
- baseColumn: never;
2695
- identity: undefined;
2696
- generated: undefined;
2697
- }, {}, {
2698
- length: number | undefined;
2699
- }>;
2700
- updatedBy: drizzle_orm_sqlite_core.SQLiteColumn<{
2701
- name: "updated_by";
2702
- tableName: "entries";
2703
- dataType: "string";
2704
- columnType: "SQLiteText";
2705
- data: string;
2706
- driverParam: string;
2707
- notNull: false;
2708
- hasDefault: false;
2709
- isPrimaryKey: false;
2710
- isAutoincrement: false;
2711
- hasRuntimeDefault: false;
2712
- enumValues: [string, ...string[]];
2713
- baseColumn: never;
2714
- identity: undefined;
2715
- generated: undefined;
2716
- }, {}, {
2717
- length: number | undefined;
2718
- }>;
2719
- status: drizzle_orm_sqlite_core.SQLiteColumn<{
2720
- name: "status";
2721
- tableName: "entries";
2722
- dataType: "string";
2723
- columnType: "SQLiteText";
2724
- data: "draft" | "waiting" | "ready" | "scheduled" | "published";
2725
- driverParam: string;
2726
- notNull: true;
2727
- hasDefault: true;
2728
- isPrimaryKey: false;
2729
- isAutoincrement: false;
2730
- hasRuntimeDefault: false;
2731
- enumValues: ["draft", "waiting", "ready", "scheduled", "published"];
2732
- baseColumn: never;
2733
- identity: undefined;
2734
- generated: undefined;
2735
- }, {}, {
2736
- length: number | undefined;
2737
- }>;
2738
- publishedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
2739
- name: "published_at";
2740
- tableName: "entries";
2741
- dataType: "string";
2742
- columnType: "SQLiteText";
2743
- data: string;
2744
- driverParam: string;
2745
- notNull: false;
2746
- hasDefault: false;
2747
- isPrimaryKey: false;
2748
- isAutoincrement: false;
2749
- hasRuntimeDefault: false;
2750
- enumValues: [string, ...string[]];
2751
- baseColumn: never;
2752
- identity: undefined;
2753
- generated: undefined;
2754
- }, {}, {
2755
- length: number | undefined;
2756
- }>;
2757
- legacyExtra: drizzle_orm_sqlite_core.SQLiteColumn<{
2758
- name: "legacy_extra";
2759
- tableName: "entries";
2760
- dataType: "json";
2761
- columnType: "SQLiteTextJson";
2762
- data: Record<string, unknown> | null;
2763
- driverParam: string;
2764
- notNull: false;
2765
- hasDefault: false;
2766
- isPrimaryKey: false;
2767
- isAutoincrement: false;
2768
- hasRuntimeDefault: false;
2769
- enumValues: undefined;
2770
- baseColumn: never;
2771
- identity: undefined;
2772
- generated: undefined;
2773
- }, {}, {
2774
- $type: Record<string, unknown> | null;
2775
- }>;
2776
- createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
2777
- name: "created_at";
2778
- tableName: "entries";
2779
- dataType: "string";
2780
- columnType: "SQLiteText";
2781
- data: string;
2782
- driverParam: string;
2783
- notNull: true;
2784
- hasDefault: true;
2785
- isPrimaryKey: false;
2786
- isAutoincrement: false;
2787
- hasRuntimeDefault: true;
2788
- enumValues: [string, ...string[]];
2789
- baseColumn: never;
2790
- identity: undefined;
2791
- generated: undefined;
2792
- }, {}, {
2793
- length: number | undefined;
2794
- }>;
2795
- updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
2796
- name: "updated_at";
2797
- tableName: "entries";
2798
- dataType: "string";
2799
- columnType: "SQLiteText";
2800
- data: string;
2801
- driverParam: string;
2802
- notNull: true;
2803
- hasDefault: true;
2804
- isPrimaryKey: false;
2805
- isAutoincrement: false;
2806
- hasRuntimeDefault: true;
2807
- enumValues: [string, ...string[]];
2808
- baseColumn: never;
2809
- identity: undefined;
2810
- generated: undefined;
2811
- }, {}, {
2812
- length: number | undefined;
2813
- }>;
2814
- }, {
2815
- collectionId: (schema: z.ZodString) => z.ZodString;
2816
- slug: (schema: z.ZodString) => z.ZodString;
2817
- data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2818
- related: z.ZodNullable<z.ZodArray<z.ZodString>>;
2819
- status: (schema: z.ZodEnum<{
2820
- draft: "draft";
2821
- waiting: "waiting";
2822
- ready: "ready";
2823
- scheduled: "scheduled";
2824
- published: "published";
2825
- }>) => z.ZodEnum<{
2826
- draft: "draft";
2827
- waiting: "waiting";
2828
- ready: "ready";
2829
- scheduled: "scheduled";
2830
- published: "published";
2831
- }>;
2832
- }, undefined>;
2833
- /** A search hit: the entry, and which collection it comes from. */
2834
- declare const entrySearchHitDto: z.ZodObject<{
2835
- id: z.ZodString;
2836
- collectionId: z.ZodString;
2837
- title: z.ZodString;
2838
- slug: z.ZodString;
2839
- data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2840
- related: z.ZodNullable<z.ZodArray<z.ZodString>>;
2841
- createdBy: z.ZodNullable<z.ZodString>;
2842
- updatedBy: z.ZodNullable<z.ZodString>;
2843
- status: z.ZodEnum<{
2844
- draft: "draft";
2845
- waiting: "waiting";
2846
- ready: "ready";
2847
- scheduled: "scheduled";
2848
- published: "published";
2849
- }>;
2850
- publishedAt: z.ZodNullable<z.ZodString>;
2851
- legacyExtra: z.ZodNullable<z.ZodType<drizzle_zod.Json, unknown, z.core.$ZodTypeInternals<drizzle_zod.Json, unknown>>>;
2852
- createdAt: z.ZodString;
2853
- updatedAt: z.ZodString;
2854
- collectionSlug: z.ZodString;
2855
- }, {
2856
- out: {};
2857
- in: {};
2858
- }>;
2859
- type EntryCreateDto = z.infer<typeof entryCreateDto>;
2860
- type EntryUpdateDto = z.infer<typeof entryUpdateDto>;
2861
- type EntrySearchHit = z.infer<typeof entrySearchHitDto>;
2862
-
2863
497
  /**
2864
498
  * The content engine: collection definitions over a closed field-type set, and
2865
499
  * their entries, validated against the Zod schema generated from each definition.
@@ -2878,18 +512,22 @@ declare class CollectionsService {
2878
512
  listEntries(collectionIdOrSlug: string): Promise<Entry[]>;
2879
513
  getEntry(id: string): Promise<Entry>;
2880
514
  /** Paginated admin listing, most recently updated first. */
2881
- listEntriesPaginated(collectionIdOrSlug: string, options?: {
515
+ /**
516
+ * A page of entries, from one collection or, without one, from every
517
+ * collection of the site — narrowed by status, text, period and the entries
518
+ * they reference.
519
+ */
520
+ listEntriesPaginated(collectionIdOrSlug: string | undefined, options?: Omit<EntryNarrowing, 'collectionId'> & {
2882
521
  skip?: number;
2883
522
  limit?: number;
2884
- status?: Entry['status'][];
2885
- search?: string;
2886
- order?: 'recent' | 'oldest' | 'title';
523
+ order?: EntryOrder;
2887
524
  }): Promise<Entry[]>;
525
+ /** A collection's id from its id or its slug; none, for the whole site. */
526
+ private collectionIdOf;
527
+ /** The entries last touched across every collection, most recent first. */
528
+ listRecentEntries(limit?: number): Promise<Entry[]>;
2888
529
  /** The total a listing is a window onto, under the same narrowing. */
2889
- countEntries(collectionIdOrSlug: string, options?: {
2890
- status?: Entry['status'][];
2891
- search?: string;
2892
- }): Promise<number>;
530
+ countEntries(collectionIdOrSlug: string | undefined, options?: Omit<EntryNarrowing, 'collectionId'>): Promise<number>;
2893
531
  /**
2894
532
  * Text search across collections, or within the ones named (by id or slug).
2895
533
  * Each hit carries the slug of its collection.
@@ -2905,7 +543,9 @@ declare class CollectionsService {
2905
543
  /** PARTIAL update: `data` is merged field by field with what already exists. */
2906
544
  updateEntry(id: string, input: EntryUpdateDto, actorId?: string): Promise<Entry>;
2907
545
  removeEntry(id: string): Promise<void>;
2908
- private mapSlugConflict;
546
+ /** A slug chosen by hand and already taken is a refusal, not a crash. */
547
+ private definitionSlugConflict;
548
+ private entrySlugConflict;
2909
549
  /** Incremental suffix -1/-2… until the slug is unique within the collection. */
2910
550
  private uniqueEntrySlug;
2911
551
  private uniqueDefinitionSlug;
@@ -2913,6 +553,40 @@ declare class CollectionsService {
2913
553
  private linkRelations;
2914
554
  }
2915
555
 
556
+ /**
557
+ * The audience panels' data: the site's, a collection's or an entry's, asked
558
+ * of the configured source (`OPEN_COMMUNE_AUDIENCE_URL`) and its most read
559
+ * pages named after the instance's own entries.
560
+ *
561
+ * The core measures nothing and holds no provider's key: a source is whatever
562
+ * answers the contract of `@open-commune/core/dtos` — the cloud's measurement
563
+ * service, or a converter in front of Matomo or Plausible.
564
+ */
565
+ declare class AudienceService {
566
+ private readonly collections;
567
+ private readonly config;
568
+ private readonly cache;
569
+ private names;
570
+ private readonly viewers;
571
+ constructor(collections: CollectionsService, config: {
572
+ url?: string;
573
+ token?: string;
574
+ /** Who sees the panels while they are previewed, comma-separated; unset, every user. */
575
+ viewers?: string;
576
+ fetchImpl?: typeof fetch;
577
+ });
578
+ summary(ask: AudienceAsk, viewer: string): Promise<AudiencePanelData>;
579
+ /** The source's answer, or `null`: any failure only hides the panel. */
580
+ private ask;
581
+ private entrySlug;
582
+ /**
583
+ * Published entries by slug and collections by slug, to name the most read
584
+ * pages. A path is matched by its last segment, which every theme, old or
585
+ * new, ends an entry's URL with.
586
+ */
587
+ private knownNames;
588
+ }
589
+
2916
590
  /** The domain services — the ONLY surface transport layers (tRPC, REST) talk to. */
2917
591
  interface CoreServices {
2918
592
  health: HealthService;
@@ -2920,6 +594,7 @@ interface CoreServices {
2920
594
  organization: OrganizationService;
2921
595
  media: MediaService;
2922
596
  collections: CollectionsService;
597
+ audience: AudienceService;
2923
598
  }
2924
599
  /** The fully-wired dependency graph returned by `createCore({ env })`. */
2925
600
  interface Core {
@@ -2936,12 +611,46 @@ interface CoreContext {
2936
611
  requestMeta?: SessionMeta;
2937
612
  }
2938
613
 
614
+ declare const router: _trpc_server.TRPCRouterBuilder<{
615
+ ctx: CoreContext;
616
+ meta: object;
617
+ errorShape: {
618
+ data: {
619
+ type?: ErrorType | undefined;
620
+ code: _trpc_server.TRPC_ERROR_CODE_KEY;
621
+ httpStatus: number;
622
+ path?: string;
623
+ stack?: string;
624
+ };
625
+ message: string;
626
+ code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
627
+ };
628
+ transformer: false;
629
+ }>;
630
+ declare const mergeRouters: <TRouters extends _trpc_server.AnyRouter[]>(...routerList: TRouters) => _trpc_server.TRPCMergeRouters<TRouters>;
631
+ declare const publicProcedure: _trpc_server.TRPCProcedureBuilder<CoreContext, object, object, _trpc_server.TRPCUnsetMarker, _trpc_server.TRPCUnsetMarker, _trpc_server.TRPCUnsetMarker, _trpc_server.TRPCUnsetMarker, false>;
632
+ declare const middleware: <$ContextOverrides>(fn: _trpc_server.TRPCMiddlewareFunction<CoreContext, object, object, $ContextOverrides, unknown>) => _trpc_server.TRPCMiddlewareBuilder<CoreContext, object, $ContextOverrides, unknown>;
633
+ declare const procedure: _trpc_server.TRPCProcedureBuilder<CoreContext, object, {}, _trpc_server.TRPCUnsetMarker, _trpc_server.TRPCUnsetMarker, _trpc_server.TRPCUnsetMarker, _trpc_server.TRPCUnsetMarker, false>;
634
+ /** Requires an authenticated session, whatever the role. */
635
+ declare const protectedProcedure: _trpc_server.TRPCProcedureBuilder<CoreContext, object, {
636
+ services: CoreServices;
637
+ session: AuthSession;
638
+ requestMeta: SessionMeta | undefined;
639
+ }, _trpc_server.TRPCUnsetMarker, _trpc_server.TRPCUnsetMarker, _trpc_server.TRPCUnsetMarker, _trpc_server.TRPCUnsetMarker, false>;
640
+ /** Requires an authenticated admin. */
641
+ declare const adminProcedure: _trpc_server.TRPCProcedureBuilder<CoreContext, object, {
642
+ services: CoreServices;
643
+ session: AuthSession;
644
+ requestMeta: SessionMeta | undefined;
645
+ }, _trpc_server.TRPCUnsetMarker, _trpc_server.TRPCUnsetMarker, _trpc_server.TRPCUnsetMarker, _trpc_server.TRPCUnsetMarker, false>;
646
+
2939
647
  /**
2940
648
  * Typed domain errors. Each domain exports its own catalogue
2941
649
  * (`domains/<domain>/errors.ts`); the tRPC layer only forwards them —
2942
650
  * `trpcCode` carries the transport code, `type` the client-readable
2943
651
  * discriminant the UI matches on.
2944
652
  */
653
+
2945
654
  declare const TRPC_CODES: {
2946
655
  readonly NOT_FOUND: "NOT_FOUND";
2947
656
  readonly BAD_REQUEST: "BAD_REQUEST";
@@ -2954,73 +663,21 @@ declare const TRPC_CODES: {
2954
663
  type TrpcErrorCode = (typeof TRPC_CODES)[keyof typeof TRPC_CODES];
2955
664
  /** Base class — lets the tRPC mapper test `instanceof DomainError`. */
2956
665
  declare abstract class DomainError extends Error {
2957
- abstract readonly type: string;
666
+ abstract readonly type: ErrorType;
2958
667
  abstract readonly trpcCode: TrpcErrorCode;
2959
668
  }
2960
669
  /**
2961
670
  * A type and a transport code fully identify an error; the message is optional
2962
671
  * context for logs, never user-facing copy — the interface owns the wording.
672
+ * The type comes from the catalogue (`./types.ts`), never from a literal.
2963
673
  *
2964
674
  * export const EntryNotFoundError = createTypedError(
2965
- * 'entry-not-found-error', TRPC_CODES.NOT_FOUND);
675
+ * ERROR_TYPES.ENTRY_NOT_FOUND, TRPC_CODES.NOT_FOUND);
2966
676
  * throw new EntryNotFoundError(`entry not found: ${id}`);
2967
677
  */
2968
- declare function createTypedError(type: string, trpcCode: TrpcErrorCode): {
2969
- new (message?: string): {
2970
- readonly type: string;
2971
- readonly trpcCode: TrpcErrorCode;
2972
- name: string;
2973
- message: string;
2974
- stack?: string;
2975
- cause?: unknown;
2976
- };
2977
- isError(error: unknown): error is Error;
2978
- isError(value: unknown): value is Error;
2979
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
2980
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
2981
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
2982
- stackTraceLimit: number;
2983
- };
2984
-
2985
- /**
2986
- * What turns a tRPC procedure into an agent tool. A capability is declared
2987
- * ONCE, on its procedure: this meta names and describes it, the procedure's
2988
- * `.input()` and `.output()` give its schemas, its middleware gives its access
2989
- * rules. The same declaration serves the admin, the internal agent and any MCP
2990
- * server — the core itself depends on no MCP library.
2991
- *
2992
- * entries: router({
2993
- * get: protectedProcedure
2994
- * .meta({ agent: { name: 'entries_get', description: '…', annotations: { readOnlyHint: true } } })
2995
- * .input(z.object({ id: z.string().describe('…') }))
2996
- * .output(entryDto)
2997
- * .query(…),
2998
- * })
2999
- */
3000
- interface AgentToolMeta {
3001
- /** The tool name the model sees. `snake_case`, unique across the router. */
3002
- name: string;
3003
- /** A short human-readable title, shown by assistants that list tools. */
3004
- title?: string;
3005
- /** What the tool does and when to use it — written for the model. */
3006
- description: string;
3007
- /** MCP behaviour hints. They inform the assistant; they enforce nothing. */
3008
- annotations?: {
3009
- readOnlyHint?: boolean;
3010
- destructiveHint?: boolean;
3011
- idempotentHint?: boolean;
3012
- openWorldHint?: boolean;
3013
- };
3014
- }
3015
- /** The meta every procedure of the core may carry. */
3016
- interface CoreMeta {
3017
- /** Present when the procedure is exposed to agents. */
3018
- agent?: AgentToolMeta;
3019
- }
3020
-
3021
- declare const AgentToolNotFoundError: {
678
+ declare function createTypedError(type: ErrorType, trpcCode: TrpcErrorCode): {
3022
679
  new (message?: string): {
3023
- readonly type: string;
680
+ readonly type: ErrorType;
3024
681
  readonly trpcCode: TrpcErrorCode;
3025
682
  name: string;
3026
683
  message: string;
@@ -3035,32 +692,18 @@ declare const AgentToolNotFoundError: {
3035
692
  stackTraceLimit: number;
3036
693
  };
3037
694
  /**
3038
- * A procedure carrying `agent` meta, with its zod schemas. An MCP server
3039
- * registers it as is; the internal agent turns the schemas into its model's
3040
- * format with `z.toJSONSchema`.
695
+ * True when `error` is the store refusing a duplicate on `column`
696
+ * (`table.column`, as SQLite names it). The one place that reads the driver's
697
+ * wording: a domain turns it into its own typed refusal.
3041
698
  */
3042
- interface AgentTool extends AgentToolMeta {
3043
- /** Where the procedure sits in the router, e.g. `collections.entries.get`. */
3044
- path: string;
3045
- input: z.ZodObject;
3046
- /** MCP wants an object: a list result is carried under `result`. */
3047
- output?: z.ZodObject;
3048
- }
3049
- /** The tools a router exposes to agents: every procedure carrying `agent` meta. */
3050
- declare function agentTools(router: AnyRouter): AgentTool[];
3051
- /**
3052
- * Runs a tool through its procedure, middlewares included: the caller has
3053
- * exactly the rights its session gives in the admin. A list result comes back
3054
- * as `{ result: [...] }`, as the tool's output schema says.
3055
- */
3056
- declare function callTool(router: AnyRouter, ctx: CoreContext, name: string, args: unknown): Promise<unknown>;
699
+ declare const isUniqueViolation: (error: unknown, column: string) => boolean;
3057
700
 
3058
701
  declare const organizationRouter: _trpc_server.TRPCBuiltRouter<{
3059
702
  ctx: CoreContext;
3060
- meta: CoreMeta;
703
+ meta: object;
3061
704
  errorShape: {
3062
705
  data: {
3063
- type?: string | undefined;
706
+ type?: ErrorType | undefined;
3064
707
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
3065
708
  httpStatus: number;
3066
709
  path?: string;
@@ -3091,7 +734,7 @@ declare const organizationRouter: _trpc_server.TRPCBuiltRouter<{
3091
734
  createdAt: string;
3092
735
  updatedAt: string;
3093
736
  } | null;
3094
- meta: CoreMeta;
737
+ meta: object;
3095
738
  }>;
3096
739
  init: _trpc_server.TRPCMutationProcedure<{
3097
740
  input: {
@@ -3125,7 +768,7 @@ declare const organizationRouter: _trpc_server.TRPCBuiltRouter<{
3125
768
  createdAt: string;
3126
769
  updatedAt: string;
3127
770
  };
3128
- meta: CoreMeta;
771
+ meta: object;
3129
772
  }>;
3130
773
  update: _trpc_server.TRPCMutationProcedure<{
3131
774
  input: {
@@ -3159,20 +802,20 @@ declare const organizationRouter: _trpc_server.TRPCBuiltRouter<{
3159
802
  createdAt: string;
3160
803
  updatedAt: string;
3161
804
  };
3162
- meta: CoreMeta;
805
+ meta: object;
3163
806
  }>;
3164
807
  deploy: _trpc_server.TRPCMutationProcedure<{
3165
808
  input: void;
3166
809
  output: {
3167
810
  status: number;
3168
811
  };
3169
- meta: CoreMeta;
812
+ meta: object;
3170
813
  }>;
3171
814
  }>>;
3172
815
 
3173
816
  declare const OrganizationNotInitializedError: {
3174
817
  new (message?: string): {
3175
- readonly type: string;
818
+ readonly type: ErrorType;
3176
819
  readonly trpcCode: TrpcErrorCode;
3177
820
  name: string;
3178
821
  message: string;
@@ -3188,7 +831,7 @@ declare const OrganizationNotInitializedError: {
3188
831
  };
3189
832
  declare const OrganizationAlreadyInitializedError: {
3190
833
  new (message?: string): {
3191
- readonly type: string;
834
+ readonly type: ErrorType;
3192
835
  readonly trpcCode: TrpcErrorCode;
3193
836
  name: string;
3194
837
  message: string;
@@ -3204,7 +847,7 @@ declare const OrganizationAlreadyInitializedError: {
3204
847
  };
3205
848
  declare const DeployHookMissingError: {
3206
849
  new (message?: string): {
3207
- readonly type: string;
850
+ readonly type: ErrorType;
3208
851
  readonly trpcCode: TrpcErrorCode;
3209
852
  name: string;
3210
853
  message: string;
@@ -3220,7 +863,7 @@ declare const DeployHookMissingError: {
3220
863
  };
3221
864
  declare const DeployFailedError: {
3222
865
  new (message?: string): {
3223
- readonly type: string;
866
+ readonly type: ErrorType;
3224
867
  readonly trpcCode: TrpcErrorCode;
3225
868
  name: string;
3226
869
  message: string;
@@ -3235,71 +878,12 @@ declare const DeployFailedError: {
3235
878
  stackTraceLimit: number;
3236
879
  };
3237
880
 
3238
- declare const loginDto: z.ZodObject<{
3239
- email: z.ZodEmail;
3240
- password: z.ZodString;
3241
- }, z.core.$strip>;
3242
- declare const acceptInvitationDto: z.ZodObject<{
3243
- token: z.ZodString;
3244
- name: z.ZodOptional<z.ZodString>;
3245
- password: z.ZodString;
3246
- }, z.core.$strip>;
3247
- declare const requestPasswordResetDto: z.ZodObject<{
3248
- email: z.ZodEmail;
3249
- }, z.core.$strip>;
3250
- type LoginDto = z.infer<typeof loginDto>;
3251
- type AcceptInvitationDto = z.infer<typeof acceptInvitationDto>;
3252
- type RequestPasswordResetDto = z.infer<typeof requestPasswordResetDto>;
3253
-
3254
- declare const inviteDto: z.ZodObject<{
3255
- email: z.ZodEmail;
3256
- role: z.ZodEnum<{
3257
- admin: "admin";
3258
- redacteur: "redacteur";
3259
- }>;
3260
- }, z.core.$strip>;
3261
- declare const userUpdateDto: z.ZodObject<{
3262
- id: z.ZodString;
3263
- data: z.ZodObject<{
3264
- name: z.ZodOptional<z.ZodString>;
3265
- role: z.ZodOptional<z.ZodEnum<{
3266
- admin: "admin";
3267
- redacteur: "redacteur";
3268
- }>>;
3269
- email: z.ZodOptional<z.ZodEmail>;
3270
- }, z.core.$strip>;
3271
- }, z.core.$strip>;
3272
- /**
3273
- * What a person may change on THEIR OWN account: their name, nothing else.
3274
- * Not the role (they would promote themselves), not the address (it is the
3275
- * login identifier). `strictObject`, so one field too many refuses the input.
3276
- */
3277
- declare const updateOwnProfileDto: z.ZodObject<{
3278
- name: z.ZodString;
3279
- }, z.core.$strict>;
3280
- /** Public projection of a user — the ONLY user shape transport layers return. */
3281
- declare const toPublicUser: ({ id, email, name, role }: User) => {
3282
- id: string;
3283
- email: string;
3284
- name: string;
3285
- role: "admin" | "redacteur";
3286
- };
3287
- type PublicUser = ReturnType<typeof toPublicUser>;
3288
- type InviteDto = z.infer<typeof inviteDto>;
3289
- type UserUpdateDto = z.infer<typeof userUpdateDto>;
3290
- type UpdateOwnProfileDto = z.infer<typeof updateOwnProfileDto>;
3291
-
3292
- declare const apiTokenCreateDto: z.ZodObject<{
3293
- name: z.ZodString;
3294
- }, z.core.$strip>;
3295
- type ApiTokenCreateDto = z.infer<typeof apiTokenCreateDto>;
3296
-
3297
881
  declare const authRouter: _trpc_server.TRPCBuiltRouter<{
3298
882
  ctx: CoreContext;
3299
- meta: CoreMeta;
883
+ meta: object;
3300
884
  errorShape: {
3301
885
  data: {
3302
- type?: string | undefined;
886
+ type?: ErrorType | undefined;
3303
887
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
3304
888
  httpStatus: number;
3305
889
  path?: string;
@@ -3327,14 +911,14 @@ declare const authRouter: _trpc_server.TRPCBuiltRouter<{
3327
911
  role: "admin" | "redacteur";
3328
912
  };
3329
913
  };
3330
- meta: CoreMeta;
914
+ meta: object;
3331
915
  }>;
3332
916
  logout: _trpc_server.TRPCMutationProcedure<{
3333
917
  input: void;
3334
918
  output: {
3335
919
  loggedOut: boolean;
3336
920
  };
3337
- meta: CoreMeta;
921
+ meta: object;
3338
922
  }>;
3339
923
  me: _trpc_server.TRPCQueryProcedure<{
3340
924
  input: void;
@@ -3346,15 +930,15 @@ declare const authRouter: _trpc_server.TRPCBuiltRouter<{
3346
930
  role: "admin" | "redacteur";
3347
931
  };
3348
932
  };
3349
- meta: CoreMeta;
933
+ meta: object;
3350
934
  }>;
3351
935
  /** Device management: the sessions listed on the account page. */
3352
936
  sessions: _trpc_server.TRPCBuiltRouter<{
3353
937
  ctx: CoreContext;
3354
- meta: CoreMeta;
938
+ meta: object;
3355
939
  errorShape: {
3356
940
  data: {
3357
- type?: string | undefined;
941
+ type?: ErrorType | undefined;
3358
942
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
3359
943
  httpStatus: number;
3360
944
  path?: string;
@@ -3375,7 +959,7 @@ declare const authRouter: _trpc_server.TRPCBuiltRouter<{
3375
959
  ip: string | null;
3376
960
  current: boolean;
3377
961
  }[];
3378
- meta: CoreMeta;
962
+ meta: object;
3379
963
  }>;
3380
964
  revoke: _trpc_server.TRPCMutationProcedure<{
3381
965
  input: {
@@ -3384,7 +968,7 @@ declare const authRouter: _trpc_server.TRPCBuiltRouter<{
3384
968
  output: {
3385
969
  revoked: string;
3386
970
  };
3387
- meta: CoreMeta;
971
+ meta: object;
3388
972
  }>;
3389
973
  }>>;
3390
974
  /** Consume an invitation link and set the password (public, single-use). */
@@ -3402,7 +986,7 @@ declare const authRouter: _trpc_server.TRPCBuiltRouter<{
3402
986
  role: "admin" | "redacteur";
3403
987
  };
3404
988
  };
3405
- meta: CoreMeta;
989
+ meta: object;
3406
990
  }>;
3407
991
  /**
3408
992
  * « Forgotten password » — public, and the response is ALWAYS { ok: true }
@@ -3416,15 +1000,15 @@ declare const authRouter: _trpc_server.TRPCBuiltRouter<{
3416
1000
  output: {
3417
1001
  ok: boolean;
3418
1002
  };
3419
- meta: CoreMeta;
1003
+ meta: object;
3420
1004
  }>;
3421
1005
  }>>;
3422
1006
  declare const usersRouter: _trpc_server.TRPCBuiltRouter<{
3423
1007
  ctx: CoreContext;
3424
- meta: CoreMeta;
1008
+ meta: object;
3425
1009
  errorShape: {
3426
1010
  data: {
3427
- type?: string | undefined;
1011
+ type?: ErrorType | undefined;
3428
1012
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
3429
1013
  httpStatus: number;
3430
1014
  path?: string;
@@ -3443,7 +1027,7 @@ declare const usersRouter: _trpc_server.TRPCBuiltRouter<{
3443
1027
  name: string;
3444
1028
  role: "admin" | "redacteur";
3445
1029
  }[];
3446
- meta: CoreMeta;
1030
+ meta: object;
3447
1031
  }>;
3448
1032
  /**
3449
1033
  * A {id, name} directory readable by any signed-in member: the admin shows
@@ -3456,7 +1040,7 @@ declare const usersRouter: _trpc_server.TRPCBuiltRouter<{
3456
1040
  id: string;
3457
1041
  name: string;
3458
1042
  }[];
3459
- meta: CoreMeta;
1043
+ meta: object;
3460
1044
  }>;
3461
1045
  /** Read a single user. */
3462
1046
  get: _trpc_server.TRPCQueryProcedure<{
@@ -3469,7 +1053,7 @@ declare const usersRouter: _trpc_server.TRPCBuiltRouter<{
3469
1053
  name: string;
3470
1054
  role: "admin" | "redacteur";
3471
1055
  };
3472
- meta: CoreMeta;
1056
+ meta: object;
3473
1057
  }>;
3474
1058
  /** Invite a new member — the single-use link is returned to the admin. */
3475
1059
  invite: _trpc_server.TRPCMutationProcedure<{
@@ -3481,7 +1065,7 @@ declare const usersRouter: _trpc_server.TRPCBuiltRouter<{
3481
1065
  token: string;
3482
1066
  expiresAt: string;
3483
1067
  };
3484
- meta: CoreMeta;
1068
+ meta: object;
3485
1069
  }>;
3486
1070
  update: _trpc_server.TRPCMutationProcedure<{
3487
1071
  input: {
@@ -3498,7 +1082,7 @@ declare const usersRouter: _trpc_server.TRPCBuiltRouter<{
3498
1082
  name: string;
3499
1083
  role: "admin" | "redacteur";
3500
1084
  };
3501
- meta: CoreMeta;
1085
+ meta: object;
3502
1086
  }>;
3503
1087
  /**
3504
1088
  * One's own name, and only that. An administrator goes through `update`;
@@ -3516,7 +1100,7 @@ declare const usersRouter: _trpc_server.TRPCBuiltRouter<{
3516
1100
  role: "admin" | "redacteur";
3517
1101
  };
3518
1102
  };
3519
- meta: CoreMeta;
1103
+ meta: object;
3520
1104
  }>;
3521
1105
  remove: _trpc_server.TRPCMutationProcedure<{
3522
1106
  input: {
@@ -3525,15 +1109,15 @@ declare const usersRouter: _trpc_server.TRPCBuiltRouter<{
3525
1109
  output: {
3526
1110
  removed: string;
3527
1111
  };
3528
- meta: CoreMeta;
1112
+ meta: object;
3529
1113
  }>;
3530
1114
  }>>;
3531
1115
  declare const apiTokensRouter: _trpc_server.TRPCBuiltRouter<{
3532
1116
  ctx: CoreContext;
3533
- meta: CoreMeta;
1117
+ meta: object;
3534
1118
  errorShape: {
3535
1119
  data: {
3536
- type?: string | undefined;
1120
+ type?: ErrorType | undefined;
3537
1121
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
3538
1122
  httpStatus: number;
3539
1123
  path?: string;
@@ -3554,7 +1138,7 @@ declare const apiTokensRouter: _trpc_server.TRPCBuiltRouter<{
3554
1138
  tokenHash: string;
3555
1139
  lastUsedAt: string | null;
3556
1140
  }, "name" | "id" | "createdAt" | "revokedAt" | "lastUsedAt">[];
3557
- meta: CoreMeta;
1141
+ meta: object;
3558
1142
  }>;
3559
1143
  /** The plaintext token is returned ONCE — only its hash is stored. */
3560
1144
  create: _trpc_server.TRPCMutationProcedure<{
@@ -3566,7 +1150,7 @@ declare const apiTokensRouter: _trpc_server.TRPCBuiltRouter<{
3566
1150
  id: string;
3567
1151
  name: string;
3568
1152
  };
3569
- meta: CoreMeta;
1153
+ meta: object;
3570
1154
  }>;
3571
1155
  revoke: _trpc_server.TRPCMutationProcedure<{
3572
1156
  input: {
@@ -3575,7 +1159,7 @@ declare const apiTokensRouter: _trpc_server.TRPCBuiltRouter<{
3575
1159
  output: {
3576
1160
  revoked: string;
3577
1161
  };
3578
- meta: CoreMeta;
1162
+ meta: object;
3579
1163
  }>;
3580
1164
  }>>;
3581
1165
  /**
@@ -3589,10 +1173,10 @@ declare const apiTokensRouter: _trpc_server.TRPCBuiltRouter<{
3589
1173
  */
3590
1174
  declare const invitationsRouter: _trpc_server.TRPCBuiltRouter<{
3591
1175
  ctx: CoreContext;
3592
- meta: CoreMeta;
1176
+ meta: object;
3593
1177
  errorShape: {
3594
1178
  data: {
3595
- type?: string | undefined;
1179
+ type?: ErrorType | undefined;
3596
1180
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
3597
1181
  httpStatus: number;
3598
1182
  path?: string;
@@ -3612,7 +1196,7 @@ declare const invitationsRouter: _trpc_server.TRPCBuiltRouter<{
3612
1196
  token: string;
3613
1197
  expiresAt: string;
3614
1198
  };
3615
- meta: CoreMeta;
1199
+ meta: object;
3616
1200
  }>;
3617
1201
  /** Invited members who have not joined yet: nothing else shows them. */
3618
1202
  list: _trpc_server.TRPCQueryProcedure<{
@@ -3623,7 +1207,7 @@ declare const invitationsRouter: _trpc_server.TRPCBuiltRouter<{
3623
1207
  role: "admin" | "redacteur";
3624
1208
  expiresAt: string;
3625
1209
  }[];
3626
- meta: CoreMeta;
1210
+ meta: object;
3627
1211
  }>;
3628
1212
  revoke: _trpc_server.TRPCMutationProcedure<{
3629
1213
  input: {
@@ -3632,7 +1216,7 @@ declare const invitationsRouter: _trpc_server.TRPCBuiltRouter<{
3632
1216
  output: {
3633
1217
  revoked: string;
3634
1218
  };
3635
- meta: CoreMeta;
1219
+ meta: object;
3636
1220
  }>;
3637
1221
  accept: _trpc_server.TRPCMutationProcedure<{
3638
1222
  input: {
@@ -3648,7 +1232,7 @@ declare const invitationsRouter: _trpc_server.TRPCBuiltRouter<{
3648
1232
  role: "admin" | "redacteur";
3649
1233
  };
3650
1234
  };
3651
- meta: CoreMeta;
1235
+ meta: object;
3652
1236
  }>;
3653
1237
  requestPasswordReset: _trpc_server.TRPCMutationProcedure<{
3654
1238
  input: {
@@ -3657,13 +1241,13 @@ declare const invitationsRouter: _trpc_server.TRPCBuiltRouter<{
3657
1241
  output: {
3658
1242
  ok: boolean;
3659
1243
  };
3660
- meta: CoreMeta;
1244
+ meta: object;
3661
1245
  }>;
3662
1246
  }>>;
3663
1247
 
3664
1248
  declare const UserNotFoundError: {
3665
1249
  new (message?: string): {
3666
- readonly type: string;
1250
+ readonly type: ErrorType;
3667
1251
  readonly trpcCode: TrpcErrorCode;
3668
1252
  name: string;
3669
1253
  message: string;
@@ -3679,7 +1263,7 @@ declare const UserNotFoundError: {
3679
1263
  };
3680
1264
  declare const SessionNotFoundError: {
3681
1265
  new (message?: string): {
3682
- readonly type: string;
1266
+ readonly type: ErrorType;
3683
1267
  readonly trpcCode: TrpcErrorCode;
3684
1268
  name: string;
3685
1269
  message: string;
@@ -3695,7 +1279,7 @@ declare const SessionNotFoundError: {
3695
1279
  };
3696
1280
  declare const InvitationInvalidError: {
3697
1281
  new (message?: string): {
3698
- readonly type: string;
1282
+ readonly type: ErrorType;
3699
1283
  readonly trpcCode: TrpcErrorCode;
3700
1284
  name: string;
3701
1285
  message: string;
@@ -3711,7 +1295,7 @@ declare const InvitationInvalidError: {
3711
1295
  };
3712
1296
  declare const CannotRemoveSelfError: {
3713
1297
  new (message?: string): {
3714
- readonly type: string;
1298
+ readonly type: ErrorType;
3715
1299
  readonly trpcCode: TrpcErrorCode;
3716
1300
  name: string;
3717
1301
  message: string;
@@ -3728,7 +1312,7 @@ declare const CannotRemoveSelfError: {
3728
1312
  /** Throttled on ONE account — distinct from bad credentials: we refuse to try. */
3729
1313
  declare const TooManyAttemptsError: {
3730
1314
  new (message?: string): {
3731
- readonly type: string;
1315
+ readonly type: ErrorType;
3732
1316
  readonly trpcCode: TrpcErrorCode;
3733
1317
  name: string;
3734
1318
  message: string;
@@ -3745,10 +1329,10 @@ declare const TooManyAttemptsError: {
3745
1329
 
3746
1330
  declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
3747
1331
  ctx: CoreContext;
3748
- meta: CoreMeta;
1332
+ meta: object;
3749
1333
  errorShape: {
3750
1334
  data: {
3751
- type?: string | undefined;
1335
+ type?: ErrorType | undefined;
3752
1336
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
3753
1337
  httpStatus: number;
3754
1338
  path?: string;
@@ -3769,7 +1353,7 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
3769
1353
  key: string;
3770
1354
  url: string;
3771
1355
  };
3772
- meta: CoreMeta;
1356
+ meta: object;
3773
1357
  }>;
3774
1358
  finalize: _trpc_server.TRPCMutationProcedure<{
3775
1359
  input: {
@@ -3794,7 +1378,7 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
3794
1378
  metaData: Record<string, unknown> | null;
3795
1379
  createdBy: string | null;
3796
1380
  };
3797
- meta: CoreMeta;
1381
+ meta: object;
3798
1382
  }>;
3799
1383
  list: _trpc_server.TRPCQueryProcedure<{
3800
1384
  input: void;
@@ -3815,7 +1399,7 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
3815
1399
  } & {
3816
1400
  objects: Record<string, string>;
3817
1401
  })[];
3818
- meta: CoreMeta;
1402
+ meta: object;
3819
1403
  }>;
3820
1404
  get: _trpc_server.TRPCQueryProcedure<{
3821
1405
  input: {
@@ -3838,7 +1422,7 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
3838
1422
  } & {
3839
1423
  objects: Record<string, string>;
3840
1424
  };
3841
- meta: CoreMeta;
1425
+ meta: object;
3842
1426
  }>;
3843
1427
  update: _trpc_server.TRPCMutationProcedure<{
3844
1428
  input: {
@@ -3864,7 +1448,7 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
3864
1448
  metaData: Record<string, unknown> | null;
3865
1449
  createdBy: string | null;
3866
1450
  };
3867
- meta: CoreMeta;
1451
+ meta: object;
3868
1452
  }>;
3869
1453
  remove: _trpc_server.TRPCMutationProcedure<{
3870
1454
  input: {
@@ -3873,13 +1457,13 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
3873
1457
  output: {
3874
1458
  removed: string;
3875
1459
  };
3876
- meta: CoreMeta;
1460
+ meta: object;
3877
1461
  }>;
3878
1462
  }>>;
3879
1463
 
3880
1464
  declare const MediaNotFoundError: {
3881
1465
  new (message?: string): {
3882
- readonly type: string;
1466
+ readonly type: ErrorType;
3883
1467
  readonly trpcCode: TrpcErrorCode;
3884
1468
  name: string;
3885
1469
  message: string;
@@ -3895,7 +1479,7 @@ declare const MediaNotFoundError: {
3895
1479
  };
3896
1480
  declare const UnsupportedMimeError: {
3897
1481
  new (message?: string): {
3898
- readonly type: string;
1482
+ readonly type: ErrorType;
3899
1483
  readonly trpcCode: TrpcErrorCode;
3900
1484
  name: string;
3901
1485
  message: string;
@@ -3911,7 +1495,7 @@ declare const UnsupportedMimeError: {
3911
1495
  };
3912
1496
  declare const UploadIncompleteError: {
3913
1497
  new (message?: string): {
3914
- readonly type: string;
1498
+ readonly type: ErrorType;
3915
1499
  readonly trpcCode: TrpcErrorCode;
3916
1500
  name: string;
3917
1501
  message: string;
@@ -3928,10 +1512,10 @@ declare const UploadIncompleteError: {
3928
1512
 
3929
1513
  declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
3930
1514
  ctx: CoreContext;
3931
- meta: CoreMeta;
1515
+ meta: object;
3932
1516
  errorShape: {
3933
1517
  data: {
3934
- type?: string | undefined;
1518
+ type?: ErrorType | undefined;
3935
1519
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
3936
1520
  httpStatus: number;
3937
1521
  path?: string;
@@ -3967,7 +1551,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
3967
1551
  display: Record<string, unknown> | null;
3968
1552
  headings: Record<string, unknown> | null;
3969
1553
  }[];
3970
- meta: CoreMeta;
1554
+ meta: object;
3971
1555
  }>;
3972
1556
  get: _trpc_server.TRPCQueryProcedure<{
3973
1557
  input: {
@@ -3997,7 +1581,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
3997
1581
  createdAt: string;
3998
1582
  updatedAt: string;
3999
1583
  };
4000
- meta: CoreMeta;
1584
+ meta: object;
4001
1585
  }>;
4002
1586
  create: _trpc_server.TRPCMutationProcedure<{
4003
1587
  input: {
@@ -4040,7 +1624,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
4040
1624
  display: Record<string, unknown> | null;
4041
1625
  headings: Record<string, unknown> | null;
4042
1626
  };
4043
- meta: CoreMeta;
1627
+ meta: object;
4044
1628
  }>;
4045
1629
  update: _trpc_server.TRPCMutationProcedure<{
4046
1630
  input: {
@@ -4086,7 +1670,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
4086
1670
  display: Record<string, unknown> | null;
4087
1671
  headings: Record<string, unknown> | null;
4088
1672
  };
4089
- meta: CoreMeta;
1673
+ meta: object;
4090
1674
  }>;
4091
1675
  remove: _trpc_server.TRPCMutationProcedure<{
4092
1676
  input: {
@@ -4095,14 +1679,14 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
4095
1679
  output: {
4096
1680
  removed: string;
4097
1681
  };
4098
- meta: CoreMeta;
1682
+ meta: object;
4099
1683
  }>;
4100
1684
  entries: _trpc_server.TRPCBuiltRouter<{
4101
1685
  ctx: CoreContext;
4102
- meta: CoreMeta;
1686
+ meta: object;
4103
1687
  errorShape: {
4104
1688
  data: {
4105
- type?: string | undefined;
1689
+ type?: ErrorType | undefined;
4106
1690
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
4107
1691
  httpStatus: number;
4108
1692
  path?: string;
@@ -4132,9 +1716,9 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
4132
1716
  createdAt: string;
4133
1717
  updatedAt: string;
4134
1718
  };
4135
- meta: CoreMeta;
1719
+ meta: object;
4136
1720
  }>;
4137
- /** Across collections: what an agent uses to find content. */
1721
+ /** Across collections: finds content without knowing where it lives. */
4138
1722
  search: _trpc_server.TRPCQueryProcedure<{
4139
1723
  input: {
4140
1724
  query: string;
@@ -4158,17 +1742,22 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
4158
1742
  updatedAt: string;
4159
1743
  collectionSlug: string;
4160
1744
  }[];
4161
- meta: CoreMeta;
1745
+ meta: object;
4162
1746
  }>;
4163
1747
  /** Narrowing is optional: a caller that ignores it keeps the old behaviour. */
4164
1748
  list: _trpc_server.TRPCQueryProcedure<{
4165
1749
  input: {
4166
- collectionId: string;
4167
- status?: ("draft" | "waiting" | "ready" | "scheduled" | "published")[] | undefined;
4168
- search?: string | undefined;
4169
- order?: "title" | "recent" | "oldest" | undefined;
1750
+ order?: "title" | "recent" | "oldest" | "date_asc" | "date_desc" | undefined;
4170
1751
  skip?: number | undefined;
4171
1752
  limit?: number | undefined;
1753
+ collectionId?: string | undefined;
1754
+ status?: ("draft" | "waiting" | "ready" | "scheduled" | "published")[] | undefined;
1755
+ search?: string | undefined;
1756
+ date?: {
1757
+ gte?: string | undefined;
1758
+ lte?: string | undefined;
1759
+ } | undefined;
1760
+ references?: string[] | undefined;
4172
1761
  };
4173
1762
  output: {
4174
1763
  id: string;
@@ -4185,17 +1774,44 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
4185
1774
  createdAt: string;
4186
1775
  updatedAt: string;
4187
1776
  }[];
4188
- meta: CoreMeta;
1777
+ meta: object;
1778
+ }>;
1779
+ /** What was last touched, across collections: the admin's home reads it. */
1780
+ recent: _trpc_server.TRPCQueryProcedure<{
1781
+ input: {
1782
+ limit?: number | undefined;
1783
+ } | undefined;
1784
+ output: {
1785
+ id: string;
1786
+ collectionId: string;
1787
+ title: string;
1788
+ slug: string;
1789
+ data: Record<string, unknown>;
1790
+ related: string[] | null;
1791
+ createdBy: string | null;
1792
+ updatedBy: string | null;
1793
+ status: "draft" | "waiting" | "ready" | "scheduled" | "published";
1794
+ publishedAt: string | null;
1795
+ legacyExtra: drizzle_zod.Json;
1796
+ createdAt: string;
1797
+ updatedAt: string;
1798
+ }[];
1799
+ meta: object;
4189
1800
  }>;
4190
1801
  /** The total a listing is a window onto, under the same narrowing. */
4191
1802
  count: _trpc_server.TRPCQueryProcedure<{
4192
1803
  input: {
4193
- collectionId: string;
1804
+ collectionId?: string | undefined;
4194
1805
  status?: ("draft" | "waiting" | "ready" | "scheduled" | "published")[] | undefined;
4195
1806
  search?: string | undefined;
1807
+ date?: {
1808
+ gte?: string | undefined;
1809
+ lte?: string | undefined;
1810
+ } | undefined;
1811
+ references?: string[] | undefined;
4196
1812
  };
4197
1813
  output: number;
4198
- meta: CoreMeta;
1814
+ meta: object;
4199
1815
  }>;
4200
1816
  create: _trpc_server.TRPCMutationProcedure<{
4201
1817
  input: {
@@ -4223,7 +1839,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
4223
1839
  status: "draft" | "waiting" | "ready" | "scheduled" | "published";
4224
1840
  publishedAt: string | null;
4225
1841
  };
4226
- meta: CoreMeta;
1842
+ meta: object;
4227
1843
  }>;
4228
1844
  update: _trpc_server.TRPCMutationProcedure<{
4229
1845
  input: {
@@ -4252,7 +1868,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
4252
1868
  status: "draft" | "waiting" | "ready" | "scheduled" | "published";
4253
1869
  publishedAt: string | null;
4254
1870
  };
4255
- meta: CoreMeta;
1871
+ meta: object;
4256
1872
  }>;
4257
1873
  remove: _trpc_server.TRPCMutationProcedure<{
4258
1874
  input: {
@@ -4261,14 +1877,14 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
4261
1877
  output: {
4262
1878
  removed: string;
4263
1879
  };
4264
- meta: CoreMeta;
1880
+ meta: object;
4265
1881
  }>;
4266
1882
  }>>;
4267
1883
  }>>;
4268
1884
 
4269
1885
  declare const CollectionNotFoundError: {
4270
1886
  new (message?: string): {
4271
- readonly type: string;
1887
+ readonly type: ErrorType;
4272
1888
  readonly trpcCode: TrpcErrorCode;
4273
1889
  name: string;
4274
1890
  message: string;
@@ -4284,7 +1900,7 @@ declare const CollectionNotFoundError: {
4284
1900
  };
4285
1901
  declare const EntryNotFoundError: {
4286
1902
  new (message?: string): {
4287
- readonly type: string;
1903
+ readonly type: ErrorType;
4288
1904
  readonly trpcCode: TrpcErrorCode;
4289
1905
  name: string;
4290
1906
  message: string;
@@ -4300,7 +1916,7 @@ declare const EntryNotFoundError: {
4300
1916
  };
4301
1917
  declare const InvalidEntryDataError: {
4302
1918
  new (message?: string): {
4303
- readonly type: string;
1919
+ readonly type: ErrorType;
4304
1920
  readonly trpcCode: TrpcErrorCode;
4305
1921
  name: string;
4306
1922
  message: string;
@@ -4316,7 +1932,56 @@ declare const InvalidEntryDataError: {
4316
1932
  };
4317
1933
  declare const DuplicateSlugError: {
4318
1934
  new (message?: string): {
4319
- readonly type: string;
1935
+ readonly type: ErrorType;
1936
+ readonly trpcCode: TrpcErrorCode;
1937
+ name: string;
1938
+ message: string;
1939
+ stack?: string;
1940
+ cause?: unknown;
1941
+ };
1942
+ isError(error: unknown): error is Error;
1943
+ isError(value: unknown): value is Error;
1944
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1945
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1946
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1947
+ stackTraceLimit: number;
1948
+ };
1949
+
1950
+ declare const audienceRouter: _trpc_server.TRPCBuiltRouter<{
1951
+ ctx: CoreContext;
1952
+ meta: object;
1953
+ errorShape: {
1954
+ data: {
1955
+ type?: ErrorType | undefined;
1956
+ code: _trpc_server.TRPC_ERROR_CODE_KEY;
1957
+ httpStatus: number;
1958
+ path?: string;
1959
+ stack?: string;
1960
+ };
1961
+ message: string;
1962
+ code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
1963
+ };
1964
+ transformer: false;
1965
+ }, _trpc_server.TRPCDecorateCreateRouterOptions<{
1966
+ summary: _trpc_server.TRPCQueryProcedure<{
1967
+ input: {
1968
+ period: unknown;
1969
+ collection?: string | undefined;
1970
+ entry?: string | undefined;
1971
+ };
1972
+ output: AudiencePanelData;
1973
+ meta: object;
1974
+ }>;
1975
+ }>>;
1976
+
1977
+ /**
1978
+ * No audience to show: no source is configured, this user is not among its
1979
+ * viewers, the entry is unknown, or the source did not answer. The panels
1980
+ * render nothing; they never tell which.
1981
+ */
1982
+ declare const AudienceUnavailableError: {
1983
+ new (message?: string): {
1984
+ readonly type: ErrorType;
4320
1985
  readonly trpcCode: TrpcErrorCode;
4321
1986
  name: string;
4322
1987
  message: string;
@@ -4336,10 +2001,10 @@ declare function createCore({ env }?: {
4336
2001
  }): Core;
4337
2002
  declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4338
2003
  ctx: CoreContext;
4339
- meta: CoreMeta;
2004
+ meta: object;
4340
2005
  errorShape: {
4341
2006
  data: {
4342
- type?: string | undefined;
2007
+ type?: ErrorType | undefined;
4343
2008
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
4344
2009
  httpStatus: number;
4345
2010
  path?: string;
@@ -4352,10 +2017,10 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4352
2017
  }, _trpc_server.TRPCDecorateCreateRouterOptions<{
4353
2018
  health: _trpc_server.TRPCBuiltRouter<{
4354
2019
  ctx: CoreContext;
4355
- meta: CoreMeta;
2020
+ meta: object;
4356
2021
  errorShape: {
4357
2022
  data: {
4358
- type?: string | undefined;
2023
+ type?: ErrorType | undefined;
4359
2024
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
4360
2025
  httpStatus: number;
4361
2026
  path?: string;
@@ -4369,15 +2034,15 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4369
2034
  ping: _trpc_server.TRPCQueryProcedure<{
4370
2035
  input: void;
4371
2036
  output: HealthStatus;
4372
- meta: CoreMeta;
2037
+ meta: object;
4373
2038
  }>;
4374
2039
  }>>;
4375
2040
  auth: _trpc_server.TRPCBuiltRouter<{
4376
2041
  ctx: CoreContext;
4377
- meta: CoreMeta;
2042
+ meta: object;
4378
2043
  errorShape: {
4379
2044
  data: {
4380
- type?: string | undefined;
2045
+ type?: ErrorType | undefined;
4381
2046
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
4382
2047
  httpStatus: number;
4383
2048
  path?: string;
@@ -4403,14 +2068,14 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4403
2068
  role: "admin" | "redacteur";
4404
2069
  };
4405
2070
  };
4406
- meta: CoreMeta;
2071
+ meta: object;
4407
2072
  }>;
4408
2073
  logout: _trpc_server.TRPCMutationProcedure<{
4409
2074
  input: void;
4410
2075
  output: {
4411
2076
  loggedOut: boolean;
4412
2077
  };
4413
- meta: CoreMeta;
2078
+ meta: object;
4414
2079
  }>;
4415
2080
  me: _trpc_server.TRPCQueryProcedure<{
4416
2081
  input: void;
@@ -4422,14 +2087,14 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4422
2087
  role: "admin" | "redacteur";
4423
2088
  };
4424
2089
  };
4425
- meta: CoreMeta;
2090
+ meta: object;
4426
2091
  }>;
4427
2092
  sessions: _trpc_server.TRPCBuiltRouter<{
4428
2093
  ctx: CoreContext;
4429
- meta: CoreMeta;
2094
+ meta: object;
4430
2095
  errorShape: {
4431
2096
  data: {
4432
- type?: string | undefined;
2097
+ type?: ErrorType | undefined;
4433
2098
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
4434
2099
  httpStatus: number;
4435
2100
  path?: string;
@@ -4450,7 +2115,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4450
2115
  ip: string | null;
4451
2116
  current: boolean;
4452
2117
  }[];
4453
- meta: CoreMeta;
2118
+ meta: object;
4454
2119
  }>;
4455
2120
  revoke: _trpc_server.TRPCMutationProcedure<{
4456
2121
  input: {
@@ -4459,7 +2124,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4459
2124
  output: {
4460
2125
  revoked: string;
4461
2126
  };
4462
- meta: CoreMeta;
2127
+ meta: object;
4463
2128
  }>;
4464
2129
  }>>;
4465
2130
  acceptInvitation: _trpc_server.TRPCMutationProcedure<{
@@ -4476,7 +2141,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4476
2141
  role: "admin" | "redacteur";
4477
2142
  };
4478
2143
  };
4479
- meta: CoreMeta;
2144
+ meta: object;
4480
2145
  }>;
4481
2146
  requestPasswordReset: _trpc_server.TRPCMutationProcedure<{
4482
2147
  input: {
@@ -4485,15 +2150,15 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4485
2150
  output: {
4486
2151
  ok: boolean;
4487
2152
  };
4488
- meta: CoreMeta;
2153
+ meta: object;
4489
2154
  }>;
4490
2155
  }>>;
4491
2156
  users: _trpc_server.TRPCBuiltRouter<{
4492
2157
  ctx: CoreContext;
4493
- meta: CoreMeta;
2158
+ meta: object;
4494
2159
  errorShape: {
4495
2160
  data: {
4496
- type?: string | undefined;
2161
+ type?: ErrorType | undefined;
4497
2162
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
4498
2163
  httpStatus: number;
4499
2164
  path?: string;
@@ -4512,7 +2177,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4512
2177
  name: string;
4513
2178
  role: "admin" | "redacteur";
4514
2179
  }[];
4515
- meta: CoreMeta;
2180
+ meta: object;
4516
2181
  }>;
4517
2182
  directory: _trpc_server.TRPCQueryProcedure<{
4518
2183
  input: void;
@@ -4520,7 +2185,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4520
2185
  id: string;
4521
2186
  name: string;
4522
2187
  }[];
4523
- meta: CoreMeta;
2188
+ meta: object;
4524
2189
  }>;
4525
2190
  get: _trpc_server.TRPCQueryProcedure<{
4526
2191
  input: {
@@ -4532,7 +2197,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4532
2197
  name: string;
4533
2198
  role: "admin" | "redacteur";
4534
2199
  };
4535
- meta: CoreMeta;
2200
+ meta: object;
4536
2201
  }>;
4537
2202
  invite: _trpc_server.TRPCMutationProcedure<{
4538
2203
  input: {
@@ -4543,7 +2208,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4543
2208
  token: string;
4544
2209
  expiresAt: string;
4545
2210
  };
4546
- meta: CoreMeta;
2211
+ meta: object;
4547
2212
  }>;
4548
2213
  update: _trpc_server.TRPCMutationProcedure<{
4549
2214
  input: {
@@ -4560,7 +2225,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4560
2225
  name: string;
4561
2226
  role: "admin" | "redacteur";
4562
2227
  };
4563
- meta: CoreMeta;
2228
+ meta: object;
4564
2229
  }>;
4565
2230
  updateOwnProfile: _trpc_server.TRPCMutationProcedure<{
4566
2231
  input: {
@@ -4574,7 +2239,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4574
2239
  role: "admin" | "redacteur";
4575
2240
  };
4576
2241
  };
4577
- meta: CoreMeta;
2242
+ meta: object;
4578
2243
  }>;
4579
2244
  remove: _trpc_server.TRPCMutationProcedure<{
4580
2245
  input: {
@@ -4583,15 +2248,15 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4583
2248
  output: {
4584
2249
  removed: string;
4585
2250
  };
4586
- meta: CoreMeta;
2251
+ meta: object;
4587
2252
  }>;
4588
2253
  }>>;
4589
2254
  invitations: _trpc_server.TRPCBuiltRouter<{
4590
2255
  ctx: CoreContext;
4591
- meta: CoreMeta;
2256
+ meta: object;
4592
2257
  errorShape: {
4593
2258
  data: {
4594
- type?: string | undefined;
2259
+ type?: ErrorType | undefined;
4595
2260
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
4596
2261
  httpStatus: number;
4597
2262
  path?: string;
@@ -4611,7 +2276,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4611
2276
  token: string;
4612
2277
  expiresAt: string;
4613
2278
  };
4614
- meta: CoreMeta;
2279
+ meta: object;
4615
2280
  }>;
4616
2281
  list: _trpc_server.TRPCQueryProcedure<{
4617
2282
  input: void;
@@ -4621,7 +2286,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4621
2286
  role: "admin" | "redacteur";
4622
2287
  expiresAt: string;
4623
2288
  }[];
4624
- meta: CoreMeta;
2289
+ meta: object;
4625
2290
  }>;
4626
2291
  revoke: _trpc_server.TRPCMutationProcedure<{
4627
2292
  input: {
@@ -4630,7 +2295,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4630
2295
  output: {
4631
2296
  revoked: string;
4632
2297
  };
4633
- meta: CoreMeta;
2298
+ meta: object;
4634
2299
  }>;
4635
2300
  accept: _trpc_server.TRPCMutationProcedure<{
4636
2301
  input: {
@@ -4646,7 +2311,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4646
2311
  role: "admin" | "redacteur";
4647
2312
  };
4648
2313
  };
4649
- meta: CoreMeta;
2314
+ meta: object;
4650
2315
  }>;
4651
2316
  requestPasswordReset: _trpc_server.TRPCMutationProcedure<{
4652
2317
  input: {
@@ -4655,15 +2320,15 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4655
2320
  output: {
4656
2321
  ok: boolean;
4657
2322
  };
4658
- meta: CoreMeta;
2323
+ meta: object;
4659
2324
  }>;
4660
2325
  }>>;
4661
2326
  apiTokens: _trpc_server.TRPCBuiltRouter<{
4662
2327
  ctx: CoreContext;
4663
- meta: CoreMeta;
2328
+ meta: object;
4664
2329
  errorShape: {
4665
2330
  data: {
4666
- type?: string | undefined;
2331
+ type?: ErrorType | undefined;
4667
2332
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
4668
2333
  httpStatus: number;
4669
2334
  path?: string;
@@ -4684,7 +2349,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4684
2349
  tokenHash: string;
4685
2350
  lastUsedAt: string | null;
4686
2351
  }, "id" | "name" | "createdAt" | "revokedAt" | "lastUsedAt">[];
4687
- meta: CoreMeta;
2352
+ meta: object;
4688
2353
  }>;
4689
2354
  create: _trpc_server.TRPCMutationProcedure<{
4690
2355
  input: {
@@ -4695,7 +2360,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4695
2360
  id: string;
4696
2361
  name: string;
4697
2362
  };
4698
- meta: CoreMeta;
2363
+ meta: object;
4699
2364
  }>;
4700
2365
  revoke: _trpc_server.TRPCMutationProcedure<{
4701
2366
  input: {
@@ -4704,15 +2369,15 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4704
2369
  output: {
4705
2370
  revoked: string;
4706
2371
  };
4707
- meta: CoreMeta;
2372
+ meta: object;
4708
2373
  }>;
4709
2374
  }>>;
4710
2375
  organization: _trpc_server.TRPCBuiltRouter<{
4711
2376
  ctx: CoreContext;
4712
- meta: CoreMeta;
2377
+ meta: object;
4713
2378
  errorShape: {
4714
2379
  data: {
4715
- type?: string | undefined;
2380
+ type?: ErrorType | undefined;
4716
2381
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
4717
2382
  httpStatus: number;
4718
2383
  path?: string;
@@ -4743,7 +2408,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4743
2408
  updatedBy: string | null;
4744
2409
  legacyExtra: Record<string, unknown> | null;
4745
2410
  } | null;
4746
- meta: CoreMeta;
2411
+ meta: object;
4747
2412
  }>;
4748
2413
  init: _trpc_server.TRPCMutationProcedure<{
4749
2414
  input: {
@@ -4777,7 +2442,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4777
2442
  updatedBy: string | null;
4778
2443
  legacyExtra: Record<string, unknown> | null;
4779
2444
  };
4780
- meta: CoreMeta;
2445
+ meta: object;
4781
2446
  }>;
4782
2447
  update: _trpc_server.TRPCMutationProcedure<{
4783
2448
  input: {
@@ -4811,22 +2476,22 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4811
2476
  updatedBy: string | null;
4812
2477
  legacyExtra: Record<string, unknown> | null;
4813
2478
  };
4814
- meta: CoreMeta;
2479
+ meta: object;
4815
2480
  }>;
4816
2481
  deploy: _trpc_server.TRPCMutationProcedure<{
4817
2482
  input: void;
4818
2483
  output: {
4819
2484
  status: number;
4820
2485
  };
4821
- meta: CoreMeta;
2486
+ meta: object;
4822
2487
  }>;
4823
2488
  }>>;
4824
2489
  media: _trpc_server.TRPCBuiltRouter<{
4825
2490
  ctx: CoreContext;
4826
- meta: CoreMeta;
2491
+ meta: object;
4827
2492
  errorShape: {
4828
2493
  data: {
4829
- type?: string | undefined;
2494
+ type?: ErrorType | undefined;
4830
2495
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
4831
2496
  httpStatus: number;
4832
2497
  path?: string;
@@ -4847,7 +2512,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4847
2512
  key: string;
4848
2513
  url: string;
4849
2514
  };
4850
- meta: CoreMeta;
2515
+ meta: object;
4851
2516
  }>;
4852
2517
  finalize: _trpc_server.TRPCMutationProcedure<{
4853
2518
  input: {
@@ -4872,7 +2537,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4872
2537
  objects: Record<string, unknown>;
4873
2538
  createdBy: string | null;
4874
2539
  };
4875
- meta: CoreMeta;
2540
+ meta: object;
4876
2541
  }>;
4877
2542
  list: _trpc_server.TRPCQueryProcedure<{
4878
2543
  input: void;
@@ -4893,7 +2558,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4893
2558
  } & {
4894
2559
  objects: Record<string, string>;
4895
2560
  })[];
4896
- meta: CoreMeta;
2561
+ meta: object;
4897
2562
  }>;
4898
2563
  get: _trpc_server.TRPCQueryProcedure<{
4899
2564
  input: {
@@ -4916,7 +2581,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4916
2581
  } & {
4917
2582
  objects: Record<string, string>;
4918
2583
  };
4919
- meta: CoreMeta;
2584
+ meta: object;
4920
2585
  }>;
4921
2586
  update: _trpc_server.TRPCMutationProcedure<{
4922
2587
  input: {
@@ -4942,7 +2607,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4942
2607
  objects: Record<string, unknown>;
4943
2608
  createdBy: string | null;
4944
2609
  };
4945
- meta: CoreMeta;
2610
+ meta: object;
4946
2611
  }>;
4947
2612
  remove: _trpc_server.TRPCMutationProcedure<{
4948
2613
  input: {
@@ -4951,15 +2616,15 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4951
2616
  output: {
4952
2617
  removed: string;
4953
2618
  };
4954
- meta: CoreMeta;
2619
+ meta: object;
4955
2620
  }>;
4956
2621
  }>>;
4957
2622
  collections: _trpc_server.TRPCBuiltRouter<{
4958
2623
  ctx: CoreContext;
4959
- meta: CoreMeta;
2624
+ meta: object;
4960
2625
  errorShape: {
4961
2626
  data: {
4962
- type?: string | undefined;
2627
+ type?: ErrorType | undefined;
4963
2628
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
4964
2629
  httpStatus: number;
4965
2630
  path?: string;
@@ -4995,7 +2660,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
4995
2660
  display: Record<string, unknown> | null;
4996
2661
  headings: Record<string, unknown> | null;
4997
2662
  }[];
4998
- meta: CoreMeta;
2663
+ meta: object;
4999
2664
  }>;
5000
2665
  get: _trpc_server.TRPCQueryProcedure<{
5001
2666
  input: {
@@ -5025,7 +2690,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
5025
2690
  createdAt: string;
5026
2691
  updatedAt: string;
5027
2692
  };
5028
- meta: CoreMeta;
2693
+ meta: object;
5029
2694
  }>;
5030
2695
  create: _trpc_server.TRPCMutationProcedure<{
5031
2696
  input: {
@@ -5068,7 +2733,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
5068
2733
  display: Record<string, unknown> | null;
5069
2734
  headings: Record<string, unknown> | null;
5070
2735
  };
5071
- meta: CoreMeta;
2736
+ meta: object;
5072
2737
  }>;
5073
2738
  update: _trpc_server.TRPCMutationProcedure<{
5074
2739
  input: {
@@ -5114,7 +2779,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
5114
2779
  display: Record<string, unknown> | null;
5115
2780
  headings: Record<string, unknown> | null;
5116
2781
  };
5117
- meta: CoreMeta;
2782
+ meta: object;
5118
2783
  }>;
5119
2784
  remove: _trpc_server.TRPCMutationProcedure<{
5120
2785
  input: {
@@ -5123,14 +2788,14 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
5123
2788
  output: {
5124
2789
  removed: string;
5125
2790
  };
5126
- meta: CoreMeta;
2791
+ meta: object;
5127
2792
  }>;
5128
2793
  entries: _trpc_server.TRPCBuiltRouter<{
5129
2794
  ctx: CoreContext;
5130
- meta: CoreMeta;
2795
+ meta: object;
5131
2796
  errorShape: {
5132
2797
  data: {
5133
- type?: string | undefined;
2798
+ type?: ErrorType | undefined;
5134
2799
  code: _trpc_server.TRPC_ERROR_CODE_KEY;
5135
2800
  httpStatus: number;
5136
2801
  path?: string;
@@ -5160,7 +2825,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
5160
2825
  createdAt: string;
5161
2826
  updatedAt: string;
5162
2827
  };
5163
- meta: CoreMeta;
2828
+ meta: object;
5164
2829
  }>;
5165
2830
  search: _trpc_server.TRPCQueryProcedure<{
5166
2831
  input: {
@@ -5185,16 +2850,21 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
5185
2850
  updatedAt: string;
5186
2851
  collectionSlug: string;
5187
2852
  }[];
5188
- meta: CoreMeta;
2853
+ meta: object;
5189
2854
  }>;
5190
2855
  list: _trpc_server.TRPCQueryProcedure<{
5191
2856
  input: {
5192
- collectionId: string;
5193
- status?: ("draft" | "waiting" | "ready" | "scheduled" | "published")[] | undefined;
5194
- search?: string | undefined;
5195
- order?: "title" | "recent" | "oldest" | undefined;
2857
+ order?: "title" | "recent" | "oldest" | "date_asc" | "date_desc" | undefined;
5196
2858
  skip?: number | undefined;
5197
2859
  limit?: number | undefined;
2860
+ collectionId?: string | undefined;
2861
+ status?: ("draft" | "waiting" | "ready" | "scheduled" | "published")[] | undefined;
2862
+ search?: string | undefined;
2863
+ date?: {
2864
+ gte?: string | undefined;
2865
+ lte?: string | undefined;
2866
+ } | undefined;
2867
+ references?: string[] | undefined;
5198
2868
  };
5199
2869
  output: {
5200
2870
  id: string;
@@ -5211,16 +2881,42 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
5211
2881
  createdAt: string;
5212
2882
  updatedAt: string;
5213
2883
  }[];
5214
- meta: CoreMeta;
2884
+ meta: object;
5215
2885
  }>;
5216
- count: _trpc_server.TRPCQueryProcedure<{
2886
+ recent: _trpc_server.TRPCQueryProcedure<{
5217
2887
  input: {
2888
+ limit?: number | undefined;
2889
+ } | undefined;
2890
+ output: {
2891
+ id: string;
5218
2892
  collectionId: string;
2893
+ title: string;
2894
+ slug: string;
2895
+ data: Record<string, unknown>;
2896
+ related: string[] | null;
2897
+ createdBy: string | null;
2898
+ updatedBy: string | null;
2899
+ status: "draft" | "waiting" | "ready" | "scheduled" | "published";
2900
+ publishedAt: string | null;
2901
+ legacyExtra: drizzle_zod.Json;
2902
+ createdAt: string;
2903
+ updatedAt: string;
2904
+ }[];
2905
+ meta: object;
2906
+ }>;
2907
+ count: _trpc_server.TRPCQueryProcedure<{
2908
+ input: {
2909
+ collectionId?: string | undefined;
5219
2910
  status?: ("draft" | "waiting" | "ready" | "scheduled" | "published")[] | undefined;
5220
2911
  search?: string | undefined;
2912
+ date?: {
2913
+ gte?: string | undefined;
2914
+ lte?: string | undefined;
2915
+ } | undefined;
2916
+ references?: string[] | undefined;
5221
2917
  };
5222
2918
  output: number;
5223
- meta: CoreMeta;
2919
+ meta: object;
5224
2920
  }>;
5225
2921
  create: _trpc_server.TRPCMutationProcedure<{
5226
2922
  input: {
@@ -5241,14 +2937,14 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
5241
2937
  slug: string;
5242
2938
  updatedBy: string | null;
5243
2939
  legacyExtra: Record<string, unknown> | null;
5244
- createdBy: string | null;
5245
2940
  title: string;
2941
+ createdBy: string | null;
5246
2942
  collectionId: string;
5247
2943
  related: string[] | null;
5248
2944
  status: "draft" | "waiting" | "ready" | "scheduled" | "published";
5249
2945
  publishedAt: string | null;
5250
2946
  };
5251
- meta: CoreMeta;
2947
+ meta: object;
5252
2948
  }>;
5253
2949
  update: _trpc_server.TRPCMutationProcedure<{
5254
2950
  input: {
@@ -5270,14 +2966,14 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
5270
2966
  slug: string;
5271
2967
  updatedBy: string | null;
5272
2968
  legacyExtra: Record<string, unknown> | null;
5273
- createdBy: string | null;
5274
2969
  title: string;
2970
+ createdBy: string | null;
5275
2971
  collectionId: string;
5276
2972
  related: string[] | null;
5277
2973
  status: "draft" | "waiting" | "ready" | "scheduled" | "published";
5278
2974
  publishedAt: string | null;
5279
2975
  };
5280
- meta: CoreMeta;
2976
+ meta: object;
5281
2977
  }>;
5282
2978
  remove: _trpc_server.TRPCMutationProcedure<{
5283
2979
  input: {
@@ -5286,12 +2982,38 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
5286
2982
  output: {
5287
2983
  removed: string;
5288
2984
  };
5289
- meta: CoreMeta;
2985
+ meta: object;
5290
2986
  }>;
5291
2987
  }>>;
5292
2988
  }>>;
2989
+ audience: _trpc_server.TRPCBuiltRouter<{
2990
+ ctx: CoreContext;
2991
+ meta: object;
2992
+ errorShape: {
2993
+ data: {
2994
+ type?: ErrorType | undefined;
2995
+ code: _trpc_server.TRPC_ERROR_CODE_KEY;
2996
+ httpStatus: number;
2997
+ path?: string;
2998
+ stack?: string;
2999
+ };
3000
+ message: string;
3001
+ code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
3002
+ };
3003
+ transformer: false;
3004
+ }, _trpc_server.TRPCDecorateCreateRouterOptions<{
3005
+ summary: _trpc_server.TRPCQueryProcedure<{
3006
+ input: {
3007
+ period: unknown;
3008
+ collection?: string | undefined;
3009
+ entry?: string | undefined;
3010
+ };
3011
+ output: AudiencePanelData;
3012
+ meta: object;
3013
+ }>;
3014
+ }>>;
5293
3015
  }>>;
5294
3016
  type AppRouter = typeof appRouter;
5295
3017
 
5296
- export { ALLOWED_MIME, AgentToolNotFoundError, CannotRemoveSelfError, CollectionNotFoundError, CollectionsService, DefinitionRepository, DeployFailedError, DeployHookMissingError, DomainError, DuplicateSlugError, EmailService, EntryNotFoundError, EntryRepository, FIELD_TYPES, FieldDefinition, FieldType, HealthService, InvalidEntryDataError, InvitationInvalidError, MediaNotFoundError, MediaRepository, MediaService, OrganizationAlreadyInitializedError, OrganizationNotInitializedError, OrganizationRepository, OrganizationService, PUBLICATION_STATUSES, S3Storage, SessionNotFoundError, TooManyAttemptsError, UnsupportedMimeError, UploadIncompleteError, UserNotFoundError, UsersRepository, UsersService, acceptInvitationDto, addressSchema, agentTools, apiTokenCreateDto, apiTokens, apiTokensRouter, appRouter, authRouter, callTool, collectionDefinitions, collectionsRouter, connectDb, createCore, createStorage, createTypedError, definitionCreateDto, definitionDto, definitionUpdateDto, entries, entryCreateDto, entryDto, entrySearchHitDto, entryUpdateDto, fieldDefinitionSchema, invitations, invitationsRouter, inviteDto, loginDto, media, mediaFinalizeDto, mediaRequestUploadDto, mediaRouter, mediaUpdateDto, organization, organizationInitDto, organizationRouter, organizationUpdateDto, parseEnv, requestPasswordResetDto, sessions, toPublicUser, updateOwnProfileDto, userUpdateDto, users, usersRouter };
5297
- export type { AcceptInvitationDto, Address, AgentTool, AgentToolMeta, ApiToken, ApiTokenCreateDto, AppRouter, AuthSession, CollectionDefinition, Core, CoreContext, CoreEnv, CoreMeta, CoreServices, DefinitionCreateDto, DefinitionUpdateDto, EmailEvent, Entry, EntryCreateDto, EntrySearchHit, EntryUpdateDto, HealthStatus, Invitation, InviteDto, LoginDto, Media, MediaFinalizeDto, MediaRequestUploadDto, MediaUpdateDto, NewCollectionDefinition, NewEntry, NewMedia, NewOrganization, NewUser, Organization, OrganizationInitDto, OrganizationUpdateDto, PublicUser, RequestPasswordResetDto, S3Config, Session, StorageDriver, StoreDb, TrpcErrorCode, UpdateOwnProfileDto, User, UserUpdateDto };
3018
+ export { ALLOWED_MIME, ApiToken, AudienceAsk, AudiencePanelData, AudienceService, AudienceUnavailableError, CannotRemoveSelfError, CollectionDefinition, CollectionNotFoundError, CollectionsService, DefinitionCreateDto, DefinitionRepository, DefinitionUpdateDto, DeployFailedError, DeployHookMissingError, DomainError, DuplicateSlugError, EmailService, Entry, EntryCreateDto, EntryNotFoundError, EntryRepository, EntrySearchHit, EntryUpdateDto, ErrorType, HealthService, InvalidEntryDataError, Invitation, InvitationInvalidError, Media, MediaFinalizeDto, MediaNotFoundError, MediaRepository, MediaService, MediaUpdateDto, NewCollectionDefinition, NewEntry, NewMedia, NewOrganization, Organization, OrganizationAlreadyInitializedError, OrganizationInitDto, OrganizationNotInitializedError, OrganizationRepository, OrganizationService, OrganizationUpdateDto, S3Storage, Session, SessionNotFoundError, TooManyAttemptsError, UnsupportedMimeError, UploadIncompleteError, User, UserNotFoundError, UsersRepository, UsersService, adminProcedure, apiTokensRouter, appRouter, audienceRouter, authRouter, collectionsRouter, connectDb, createCore, createStorage, createTypedError, invitationsRouter, isUniqueViolation, mediaRouter, mergeRouters, middleware, organizationRouter, parseEnv, procedure, protectedProcedure, publicProcedure, router, usersRouter };
3019
+ export type { AppRouter, AuthSession, Core, CoreContext, CoreEnv, CoreServices, EmailEvent, HealthStatus, S3Config, StorageDriver, StoreDb, TrpcErrorCode };