@open-commune/core 0.2.19 → 0.2.21

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/dtos.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { o as AUDIENCE_PERIODS, p as AcceptInvitationDto, r as ApiTokenCreateDto, l as AudienceAsk, m as AudiencePanelData, t as AudienceQuery, u as AudienceSummary, D as DefinitionCreateDto, h as DefinitionUpdateDto, v as ERROR_TYPES, j as EntryCreateDto, i as EntrySearchHit, k as EntryUpdateDto, n as ErrorType, w as InviteDto, L as LoginDto, d as MediaFinalizeDto, x as MediaRequestUploadDto, e as MediaUpdateDto, a as OrganizationInitDto, b as OrganizationUpdateDto, P as PublicUser, R as RequestPasswordResetDto, z as SessionUser, B as UpdateOwnProfileDto, F as UserUpdateDto, G as acceptInvitationDto, J as apiTokenCreateDto, Q as audienceAskDto, T as audienceQuerySchema, V as audienceSummarySchema, X as definitionCreateDto, Y as definitionDto, Z as definitionUpdateDto, $ as entryCreateDto, a0 as entryDto, a1 as entrySearchHitDto, a2 as entryUpdateDto, a4 as inviteDto, a5 as isErrorType, a6 as loginDto, a8 as mediaFinalizeDto, a9 as mediaRequestUploadDto, aa as mediaUpdateDto, ac as organizationInitDto, ad as organizationUpdateDto, ae as requestPasswordResetDto, ag as toPublicUser, ah as toSessionUser, ai as updateOwnProfileDto, aj as userUpdateDto } from './shared/core.BQTDkZ_p.mjs';
1
+ export { o as AUDIENCE_PERIODS, p as AcceptInvitationDto, r as ApiTokenCreateDto, l as AudienceAsk, m as AudiencePanelData, t as AudienceQuery, u as AudienceSummary, D as DefinitionCreateDto, h as DefinitionUpdateDto, v as ERROR_TYPES, j as EntryCreateDto, i as EntrySearchHit, k as EntryUpdateDto, n as ErrorType, w as InviteDto, L as LoginDto, d as MediaFinalizeDto, x as MediaRequestUploadDto, e as MediaUpdateDto, a as OrganizationInitDto, b as OrganizationUpdateDto, P as PublicUser, R as RequestPasswordResetDto, z as SessionUser, B as UpdateOwnProfileDto, F as UserUpdateDto, G as acceptInvitationDto, J as apiTokenCreateDto, Q as audienceAskDto, T as audienceQuerySchema, V as audienceSummarySchema, X as definitionCreateDto, Y as definitionDto, Z as definitionUpdateDto, $ as entryCreateDto, a0 as entryDto, a1 as entrySearchHitDto, a2 as entryUpdateDto, a4 as inviteDto, a5 as isErrorType, a6 as loginDto, a8 as mediaFinalizeDto, a9 as mediaRequestUploadDto, aa as mediaUpdateDto, ac as organizationInitDto, ad as organizationUpdateDto, ae as requestPasswordResetDto, ag as toPublicUser, ah as toSessionUser, ai as updateOwnProfileDto, aj as userUpdateDto } from './shared/core.C8czg6gz.mjs';
2
2
  import 'drizzle-zod';
3
3
  import 'drizzle-orm/sqlite-core';
4
4
  import 'zod';
package/dist/dtos.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { o as AUDIENCE_PERIODS, p as AcceptInvitationDto, r as ApiTokenCreateDto, l as AudienceAsk, m as AudiencePanelData, t as AudienceQuery, u as AudienceSummary, D as DefinitionCreateDto, h as DefinitionUpdateDto, v as ERROR_TYPES, j as EntryCreateDto, i as EntrySearchHit, k as EntryUpdateDto, n as ErrorType, w as InviteDto, L as LoginDto, d as MediaFinalizeDto, x as MediaRequestUploadDto, e as MediaUpdateDto, a as OrganizationInitDto, b as OrganizationUpdateDto, P as PublicUser, R as RequestPasswordResetDto, z as SessionUser, B as UpdateOwnProfileDto, F as UserUpdateDto, G as acceptInvitationDto, J as apiTokenCreateDto, Q as audienceAskDto, T as audienceQuerySchema, V as audienceSummarySchema, X as definitionCreateDto, Y as definitionDto, Z as definitionUpdateDto, $ as entryCreateDto, a0 as entryDto, a1 as entrySearchHitDto, a2 as entryUpdateDto, a4 as inviteDto, a5 as isErrorType, a6 as loginDto, a8 as mediaFinalizeDto, a9 as mediaRequestUploadDto, aa as mediaUpdateDto, ac as organizationInitDto, ad as organizationUpdateDto, ae as requestPasswordResetDto, ag as toPublicUser, ah as toSessionUser, ai as updateOwnProfileDto, aj as userUpdateDto } from './shared/core.D0n0cwjD.js';
1
+ export { o as AUDIENCE_PERIODS, p as AcceptInvitationDto, r as ApiTokenCreateDto, l as AudienceAsk, m as AudiencePanelData, t as AudienceQuery, u as AudienceSummary, D as DefinitionCreateDto, h as DefinitionUpdateDto, v as ERROR_TYPES, j as EntryCreateDto, i as EntrySearchHit, k as EntryUpdateDto, n as ErrorType, w as InviteDto, L as LoginDto, d as MediaFinalizeDto, x as MediaRequestUploadDto, e as MediaUpdateDto, a as OrganizationInitDto, b as OrganizationUpdateDto, P as PublicUser, R as RequestPasswordResetDto, z as SessionUser, B as UpdateOwnProfileDto, F as UserUpdateDto, G as acceptInvitationDto, J as apiTokenCreateDto, Q as audienceAskDto, T as audienceQuerySchema, V as audienceSummarySchema, X as definitionCreateDto, Y as definitionDto, Z as definitionUpdateDto, $ as entryCreateDto, a0 as entryDto, a1 as entrySearchHitDto, a2 as entryUpdateDto, a4 as inviteDto, a5 as isErrorType, a6 as loginDto, a8 as mediaFinalizeDto, a9 as mediaRequestUploadDto, aa as mediaUpdateDto, ac as organizationInitDto, ad as organizationUpdateDto, ae as requestPasswordResetDto, ag as toPublicUser, ah as toSessionUser, ai as updateOwnProfileDto, aj as userUpdateDto } from './shared/core.bkXizwPE.js';
2
2
  import 'drizzle-zod';
3
3
  import 'drizzle-orm/sqlite-core';
4
4
  import 'zod';
package/dist/index.d.mts CHANGED
@@ -3,8 +3,8 @@ import * as _trpc_server from '@trpc/server';
3
3
  import { z } from 'zod';
4
4
  import * as drizzle_orm_bun_sqlite from 'drizzle-orm/bun-sqlite';
5
5
  import { Database } from 'bun:sqlite';
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.BQTDkZ_p.mjs';
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 SessionUser, B as UpdateOwnProfileDto, F as UserUpdateDto, G as acceptInvitationDto, H as addressSchema, J as apiTokenCreateDto, K as apiTokens, Q as audienceAskDto, T as audienceQuerySchema, V as audienceSummarySchema, W as collectionDefinitions, X as definitionCreateDto, Y as definitionDto, Z as definitionUpdateDto, _ as entries, $ as entryCreateDto, a0 as entryDto, a1 as entrySearchHitDto, a2 as entryUpdateDto, a3 as invitations, a4 as inviteDto, a5 as isErrorType, a6 as loginDto, a7 as media, a8 as mediaFinalizeDto, a9 as mediaRequestUploadDto, aa as mediaUpdateDto, ab as organization, ac as organizationInitDto, ad as organizationUpdateDto, ae as requestPasswordResetDto, af as sessions, ag as toPublicUser, ah as toSessionUser, ai as updateOwnProfileDto, aj as userUpdateDto, ak as users } from './shared/core.BQTDkZ_p.mjs';
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.C8czg6gz.mjs';
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 SessionUser, B as UpdateOwnProfileDto, F as UserUpdateDto, G as acceptInvitationDto, H as addressSchema, J as apiTokenCreateDto, K as apiTokens, Q as audienceAskDto, T as audienceQuerySchema, V as audienceSummarySchema, W as collectionDefinitions, X as definitionCreateDto, Y as definitionDto, Z as definitionUpdateDto, _ as entries, $ as entryCreateDto, a0 as entryDto, a1 as entrySearchHitDto, a2 as entryUpdateDto, a3 as invitations, a4 as inviteDto, a5 as isErrorType, a6 as loginDto, a7 as media, a8 as mediaFinalizeDto, a9 as mediaRequestUploadDto, aa as mediaUpdateDto, ab as organization, ac as organizationInitDto, ad as organizationUpdateDto, ae as requestPasswordResetDto, af as sessions, ag as toPublicUser, ah as toSessionUser, ai as updateOwnProfileDto, aj as userUpdateDto, ak as users } from './shared/core.C8czg6gz.mjs';
8
8
  export { FIELD_TYPES, FieldType, PUBLICATION_STATUSES, PublicationStatus } from './domains/collections/constants.mjs';
9
9
  export { FIELD_VALUE_SCHEMAS, FieldDefinition, buildDataSchema, fieldDefinitionSchema } from './domains/collections/utils.mjs';
10
10
  import 'drizzle-orm/sqlite-core';
@@ -343,6 +343,8 @@ declare class MediaRepository {
343
343
  constructor(db: StoreDb);
344
344
  insert(input: NewMedia): Promise<Media>;
345
345
  findById(id: string): Promise<Media | undefined>;
346
+ /** Several media in one query; the ids not found are simply absent. */
347
+ findByIds(ids: string[]): Promise<Media[]>;
346
348
  list(): Promise<Media[]>;
347
349
  /** Retrouve un média par une clé de son metaData — ce qui rend un import idempotent. */
348
350
  findByMetaData(name: string, value: string): Promise<Media | undefined>;
@@ -384,6 +386,13 @@ declare class MediaService {
384
386
  get(id: string): Promise<Media & {
385
387
  objects: Record<string, string>;
386
388
  }>;
389
+ /**
390
+ * Several media with resolved `objects`, in one read: a listing shows a
391
+ * cover per row. An id that matches nothing is left out.
392
+ */
393
+ getMany(ids: string[]): Promise<Array<Media & {
394
+ objects: Record<string, string>;
395
+ }>>;
387
396
  updateEditorial(id: string, input: MediaUpdateDto, actorId?: string): Promise<Media>;
388
397
  /** Delete the row AND every stored object (original + variants). */
389
398
  remove(id: string): Promise<void>;
@@ -487,6 +496,8 @@ declare class EntryRepository {
487
496
  listPublished(collectionId: string): Promise<Entry[]>;
488
497
  findBySlug(collectionId: string, slug: string): Promise<Entry | undefined>;
489
498
  findById(id: string): Promise<Entry | undefined>;
499
+ /** Several entries in one query; the ids not found are simply absent. */
500
+ findByIds(ids: string[]): Promise<Entry[]>;
490
501
  /** Finds an entry by a key of its data — what makes an external import idempotent. */
491
502
  findByDataField(collectionId: string, name: string, value: string | number): Promise<Entry | undefined>;
492
503
  insert(input: NewEntry): Promise<Entry>;
@@ -511,6 +522,12 @@ declare class CollectionsService {
511
522
  private validateData;
512
523
  listEntries(collectionIdOrSlug: string): Promise<Entry[]>;
513
524
  getEntry(id: string): Promise<Entry>;
525
+ /**
526
+ * Several entries by id, in one read: what a listing needs to title the
527
+ * entries its rows link to. An id that matches nothing is left out rather
528
+ * than failing the whole set.
529
+ */
530
+ getEntries(ids: string[]): Promise<Entry[]>;
514
531
  /** Paginated admin listing, most recently updated first. */
515
532
  /**
516
533
  * A page of entries, from one collection or, without one, from every
@@ -737,14 +754,14 @@ declare const organizationRouter: _trpc_server.TRPCBuiltRouter<{
737
754
  input: void;
738
755
  output: {
739
756
  type: "commune" | "intercommunality" | "syndicate" | "other";
740
- description: string | null;
741
757
  id: number;
742
758
  name: string;
759
+ slug: string;
760
+ description: string | null;
743
761
  updatedBy: string | null;
744
762
  legacyExtra: Record<string, unknown> | null;
745
763
  createdAt: string;
746
764
  updatedAt: string;
747
- slug: string;
748
765
  address: {
749
766
  street?: string | undefined;
750
767
  postalCode?: string | undefined;
@@ -771,14 +788,14 @@ declare const organizationRouter: _trpc_server.TRPCBuiltRouter<{
771
788
  };
772
789
  output: {
773
790
  type: "commune" | "intercommunality" | "syndicate" | "other";
774
- description: string | null;
775
791
  id: number;
776
792
  name: string;
793
+ slug: string;
794
+ description: string | null;
777
795
  updatedBy: string | null;
778
796
  legacyExtra: Record<string, unknown> | null;
779
797
  createdAt: string;
780
798
  updatedAt: string;
781
- slug: string;
782
799
  address: {
783
800
  street?: string | undefined;
784
801
  postalCode?: string | undefined;
@@ -792,9 +809,9 @@ declare const organizationRouter: _trpc_server.TRPCBuiltRouter<{
792
809
  update: _trpc_server.TRPCMutationProcedure<{
793
810
  input: {
794
811
  type?: "commune" | "intercommunality" | "syndicate" | "other" | undefined;
795
- description?: string | null | undefined;
796
812
  name?: string | undefined;
797
813
  slug?: string | undefined;
814
+ description?: string | null | undefined;
798
815
  address?: {
799
816
  street?: string | undefined;
800
817
  postalCode?: string | undefined;
@@ -805,14 +822,14 @@ declare const organizationRouter: _trpc_server.TRPCBuiltRouter<{
805
822
  };
806
823
  output: {
807
824
  type: "commune" | "intercommunality" | "syndicate" | "other";
808
- description: string | null;
809
825
  id: number;
810
826
  name: string;
827
+ slug: string;
828
+ description: string | null;
811
829
  updatedBy: string | null;
812
830
  legacyExtra: Record<string, unknown> | null;
813
831
  createdAt: string;
814
832
  updatedAt: string;
815
- slug: string;
816
833
  address: {
817
834
  street?: string | undefined;
818
835
  postalCode?: string | undefined;
@@ -1385,38 +1402,38 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
1385
1402
  metaData?: Record<string, unknown> | undefined;
1386
1403
  };
1387
1404
  output: {
1388
- filename: string;
1389
- mime: string;
1390
- metaData: Record<string, unknown> | null;
1391
- alt: string | null;
1392
1405
  id: string;
1393
- size: number;
1394
- caption: string | null;
1395
- objects: Record<string, unknown>;
1396
1406
  createdBy: string | null;
1397
1407
  updatedBy: string | null;
1398
1408
  legacyExtra: Record<string, unknown> | null;
1399
1409
  createdAt: string;
1400
1410
  updatedAt: string;
1411
+ filename: string;
1412
+ mime: string;
1413
+ size: number;
1414
+ alt: string | null;
1415
+ caption: string | null;
1416
+ objects: Record<string, unknown>;
1417
+ metaData: Record<string, unknown> | null;
1401
1418
  };
1402
1419
  meta: object;
1403
1420
  }>;
1404
1421
  list: _trpc_server.TRPCQueryProcedure<{
1405
1422
  input: void;
1406
1423
  output: ({
1407
- filename: string;
1408
- mime: string;
1409
- metaData: Record<string, unknown> | null;
1410
- alt: string | null;
1411
1424
  id: string;
1412
- size: number;
1413
- caption: string | null;
1414
- objects: Record<string, unknown>;
1415
1425
  createdBy: string | null;
1416
1426
  updatedBy: string | null;
1417
1427
  legacyExtra: Record<string, unknown> | null;
1418
1428
  createdAt: string;
1419
1429
  updatedAt: string;
1430
+ filename: string;
1431
+ mime: string;
1432
+ size: number;
1433
+ alt: string | null;
1434
+ caption: string | null;
1435
+ objects: Record<string, unknown>;
1436
+ metaData: Record<string, unknown> | null;
1420
1437
  } & {
1421
1438
  objects: Record<string, string>;
1422
1439
  })[];
@@ -1427,22 +1444,46 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
1427
1444
  id: string;
1428
1445
  };
1429
1446
  output: {
1447
+ id: string;
1448
+ createdBy: string | null;
1449
+ updatedBy: string | null;
1450
+ legacyExtra: Record<string, unknown> | null;
1451
+ createdAt: string;
1452
+ updatedAt: string;
1430
1453
  filename: string;
1431
1454
  mime: string;
1432
- metaData: Record<string, unknown> | null;
1433
- alt: string | null;
1434
- id: string;
1435
1455
  size: number;
1456
+ alt: string | null;
1436
1457
  caption: string | null;
1437
1458
  objects: Record<string, unknown>;
1459
+ metaData: Record<string, unknown> | null;
1460
+ } & {
1461
+ objects: Record<string, string>;
1462
+ };
1463
+ meta: object;
1464
+ }>;
1465
+ /** Several media in one call; the ids that match nothing are left out. */
1466
+ getMany: _trpc_server.TRPCQueryProcedure<{
1467
+ input: {
1468
+ ids: string[];
1469
+ };
1470
+ output: ({
1471
+ id: string;
1438
1472
  createdBy: string | null;
1439
1473
  updatedBy: string | null;
1440
1474
  legacyExtra: Record<string, unknown> | null;
1441
1475
  createdAt: string;
1442
1476
  updatedAt: string;
1477
+ filename: string;
1478
+ mime: string;
1479
+ size: number;
1480
+ alt: string | null;
1481
+ caption: string | null;
1482
+ objects: Record<string, unknown>;
1483
+ metaData: Record<string, unknown> | null;
1443
1484
  } & {
1444
1485
  objects: Record<string, string>;
1445
- };
1486
+ })[];
1446
1487
  meta: object;
1447
1488
  }>;
1448
1489
  update: _trpc_server.TRPCMutationProcedure<{
@@ -1455,19 +1496,19 @@ declare const mediaRouter: _trpc_server.TRPCBuiltRouter<{
1455
1496
  };
1456
1497
  };
1457
1498
  output: {
1458
- filename: string;
1459
- mime: string;
1460
- metaData: Record<string, unknown> | null;
1461
- alt: string | null;
1462
1499
  id: string;
1463
- size: number;
1464
- caption: string | null;
1465
- objects: Record<string, unknown>;
1466
1500
  createdBy: string | null;
1467
1501
  updatedBy: string | null;
1468
1502
  legacyExtra: Record<string, unknown> | null;
1469
1503
  createdAt: string;
1470
1504
  updatedAt: string;
1505
+ filename: string;
1506
+ mime: string;
1507
+ size: number;
1508
+ alt: string | null;
1509
+ caption: string | null;
1510
+ objects: Record<string, unknown>;
1511
+ metaData: Record<string, unknown> | null;
1471
1512
  };
1472
1513
  meta: object;
1473
1514
  }>;
@@ -1550,19 +1591,14 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
1550
1591
  list: _trpc_server.TRPCQueryProcedure<{
1551
1592
  input: void;
1552
1593
  output: {
1553
- description: string | null;
1554
1594
  id: string;
1555
1595
  name: string;
1556
- createdBy: string | null;
1557
- updatedBy: string | null;
1558
- legacyExtra: Record<string, unknown> | null;
1559
- createdAt: string;
1560
- updatedAt: string;
1561
1596
  slug: string;
1597
+ description: string | null;
1562
1598
  fields: {
1563
1599
  name: string;
1564
1600
  label: string;
1565
- type: "number" | "boolean" | "date" | "media" | "json" | "text" | "select" | "rich-text" | "relation" | "steps";
1601
+ type: "number" | "boolean" | "json" | "date" | "text" | "rich-text" | "media" | "relation" | "select" | "steps";
1566
1602
  required: boolean;
1567
1603
  hidden: boolean;
1568
1604
  options?: string[] | undefined;
@@ -1571,6 +1607,11 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
1571
1607
  editor: Record<string, unknown> | null;
1572
1608
  display: Record<string, unknown> | null;
1573
1609
  headings: Record<string, unknown> | null;
1610
+ createdBy: string | null;
1611
+ updatedBy: string | null;
1612
+ legacyExtra: Record<string, unknown> | null;
1613
+ createdAt: string;
1614
+ updatedAt: string;
1574
1615
  }[];
1575
1616
  meta: object;
1576
1617
  }>;
@@ -1610,7 +1651,7 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
1610
1651
  fields: {
1611
1652
  name: string;
1612
1653
  label: string;
1613
- type: "number" | "boolean" | "date" | "media" | "json" | "text" | "select" | "rich-text" | "relation" | "steps";
1654
+ type: "number" | "boolean" | "json" | "date" | "text" | "rich-text" | "media" | "relation" | "select" | "steps";
1614
1655
  required?: boolean | undefined;
1615
1656
  hidden?: boolean | undefined;
1616
1657
  options?: string[] | undefined;
@@ -1623,19 +1664,14 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
1623
1664
  slug?: string | undefined;
1624
1665
  };
1625
1666
  output: {
1626
- description: string | null;
1627
1667
  id: string;
1628
1668
  name: string;
1629
- createdBy: string | null;
1630
- updatedBy: string | null;
1631
- legacyExtra: Record<string, unknown> | null;
1632
- createdAt: string;
1633
- updatedAt: string;
1634
1669
  slug: string;
1670
+ description: string | null;
1635
1671
  fields: {
1636
1672
  name: string;
1637
1673
  label: string;
1638
- type: "number" | "boolean" | "date" | "media" | "json" | "text" | "select" | "rich-text" | "relation" | "steps";
1674
+ type: "number" | "boolean" | "json" | "date" | "text" | "rich-text" | "media" | "relation" | "select" | "steps";
1639
1675
  required: boolean;
1640
1676
  hidden: boolean;
1641
1677
  options?: string[] | undefined;
@@ -1644,6 +1680,11 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
1644
1680
  editor: Record<string, unknown> | null;
1645
1681
  display: Record<string, unknown> | null;
1646
1682
  headings: Record<string, unknown> | null;
1683
+ createdBy: string | null;
1684
+ updatedBy: string | null;
1685
+ legacyExtra: Record<string, unknown> | null;
1686
+ createdAt: string;
1687
+ updatedAt: string;
1647
1688
  };
1648
1689
  meta: object;
1649
1690
  }>;
@@ -1651,16 +1692,16 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
1651
1692
  input: {
1652
1693
  id: string;
1653
1694
  data: {
1654
- description?: string | null | undefined;
1655
1695
  name?: string | undefined;
1656
1696
  slug?: string | undefined;
1697
+ description?: string | null | undefined;
1657
1698
  editor?: Record<string, unknown> | null | undefined;
1658
1699
  display?: Record<string, unknown> | null | undefined;
1659
1700
  headings?: Record<string, unknown> | null | undefined;
1660
1701
  fields?: {
1661
1702
  name: string;
1662
1703
  label: string;
1663
- type: "number" | "boolean" | "date" | "media" | "json" | "text" | "select" | "rich-text" | "relation" | "steps";
1704
+ type: "number" | "boolean" | "json" | "date" | "text" | "rich-text" | "media" | "relation" | "select" | "steps";
1664
1705
  required?: boolean | undefined;
1665
1706
  hidden?: boolean | undefined;
1666
1707
  options?: string[] | undefined;
@@ -1669,19 +1710,14 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
1669
1710
  };
1670
1711
  };
1671
1712
  output: {
1672
- description: string | null;
1673
1713
  id: string;
1674
1714
  name: string;
1675
- createdBy: string | null;
1676
- updatedBy: string | null;
1677
- legacyExtra: Record<string, unknown> | null;
1678
- createdAt: string;
1679
- updatedAt: string;
1680
1715
  slug: string;
1716
+ description: string | null;
1681
1717
  fields: {
1682
1718
  name: string;
1683
1719
  label: string;
1684
- type: "number" | "boolean" | "date" | "media" | "json" | "text" | "select" | "rich-text" | "relation" | "steps";
1720
+ type: "number" | "boolean" | "json" | "date" | "text" | "rich-text" | "media" | "relation" | "select" | "steps";
1685
1721
  required: boolean;
1686
1722
  hidden: boolean;
1687
1723
  options?: string[] | undefined;
@@ -1690,6 +1726,11 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
1690
1726
  editor: Record<string, unknown> | null;
1691
1727
  display: Record<string, unknown> | null;
1692
1728
  headings: Record<string, unknown> | null;
1729
+ createdBy: string | null;
1730
+ updatedBy: string | null;
1731
+ legacyExtra: Record<string, unknown> | null;
1732
+ createdAt: string;
1733
+ updatedAt: string;
1693
1734
  };
1694
1735
  meta: object;
1695
1736
  }>;
@@ -1739,6 +1780,28 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
1739
1780
  };
1740
1781
  meta: object;
1741
1782
  }>;
1783
+ /** Several entries in one call; the ids that match nothing are left out. */
1784
+ getMany: _trpc_server.TRPCQueryProcedure<{
1785
+ input: {
1786
+ ids: string[];
1787
+ };
1788
+ output: {
1789
+ id: string;
1790
+ collectionId: string;
1791
+ title: string;
1792
+ slug: string;
1793
+ data: Record<string, unknown>;
1794
+ related: string[] | null;
1795
+ createdBy: string | null;
1796
+ updatedBy: string | null;
1797
+ status: "draft" | "waiting" | "ready" | "scheduled" | "published";
1798
+ publishedAt: string | null;
1799
+ legacyExtra: drizzle_zod.Json;
1800
+ createdAt: string;
1801
+ updatedAt: string;
1802
+ }[];
1803
+ meta: object;
1804
+ }>;
1742
1805
  /** Across collections: finds content without knowing where it lives. */
1743
1806
  search: _trpc_server.TRPCQueryProcedure<{
1744
1807
  input: {
@@ -1848,14 +1911,14 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
1848
1911
  output: {
1849
1912
  id: string;
1850
1913
  data: Record<string, unknown>;
1914
+ slug: string;
1851
1915
  createdBy: string | null;
1852
1916
  updatedBy: string | null;
1853
1917
  legacyExtra: Record<string, unknown> | null;
1854
1918
  createdAt: string;
1855
1919
  updatedAt: string;
1856
- slug: string;
1857
- title: string;
1858
1920
  collectionId: string;
1921
+ title: string;
1859
1922
  related: string[] | null;
1860
1923
  status: "draft" | "waiting" | "ready" | "scheduled" | "published";
1861
1924
  publishedAt: string | null;
@@ -1877,14 +1940,14 @@ declare const collectionsRouter: _trpc_server.TRPCBuiltRouter<{
1877
1940
  output: {
1878
1941
  id: string;
1879
1942
  data: Record<string, unknown>;
1943
+ slug: string;
1880
1944
  createdBy: string | null;
1881
1945
  updatedBy: string | null;
1882
1946
  legacyExtra: Record<string, unknown> | null;
1883
1947
  createdAt: string;
1884
1948
  updatedAt: string;
1885
- slug: string;
1886
- title: string;
1887
1949
  collectionId: string;
1950
+ title: string;
1888
1951
  related: string[] | null;
1889
1952
  status: "draft" | "waiting" | "ready" | "scheduled" | "published";
1890
1953
  publishedAt: string | null;
@@ -2606,6 +2669,29 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
2606
2669
  };
2607
2670
  meta: object;
2608
2671
  }>;
2672
+ getMany: _trpc_server.TRPCQueryProcedure<{
2673
+ input: {
2674
+ ids: string[];
2675
+ };
2676
+ output: ({
2677
+ id: string;
2678
+ createdAt: string;
2679
+ updatedAt: string;
2680
+ updatedBy: string | null;
2681
+ legacyExtra: Record<string, unknown> | null;
2682
+ filename: string;
2683
+ mime: string;
2684
+ metaData: Record<string, unknown> | null;
2685
+ alt: string | null;
2686
+ size: number;
2687
+ caption: string | null;
2688
+ objects: Record<string, unknown>;
2689
+ createdBy: string | null;
2690
+ } & {
2691
+ objects: Record<string, string>;
2692
+ })[];
2693
+ meta: object;
2694
+ }>;
2609
2695
  update: _trpc_server.TRPCMutationProcedure<{
2610
2696
  input: {
2611
2697
  id: string;
@@ -2850,6 +2936,27 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
2850
2936
  };
2851
2937
  meta: object;
2852
2938
  }>;
2939
+ getMany: _trpc_server.TRPCQueryProcedure<{
2940
+ input: {
2941
+ ids: string[];
2942
+ };
2943
+ output: {
2944
+ id: string;
2945
+ collectionId: string;
2946
+ title: string;
2947
+ slug: string;
2948
+ data: Record<string, unknown>;
2949
+ related: string[] | null;
2950
+ createdBy: string | null;
2951
+ updatedBy: string | null;
2952
+ status: "draft" | "waiting" | "ready" | "scheduled" | "published";
2953
+ publishedAt: string | null;
2954
+ legacyExtra: drizzle_zod.Json;
2955
+ createdAt: string;
2956
+ updatedAt: string;
2957
+ }[];
2958
+ meta: object;
2959
+ }>;
2853
2960
  search: _trpc_server.TRPCQueryProcedure<{
2854
2961
  input: {
2855
2962
  query: string;