@adatechnology/content-module 0.3.0 → 0.4.0

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,4 +1,4 @@
1
- import { PostStatus, PostSortField, PostCounts, TagCount, ContentModuleConfig, ClockPort, ContentHooks, ContentImageStoragePort, LoggerPort, ContentFeedConfig, SitemapEntry, PostEventType, Post, CreatePostInput, UpdatePostInput, PublishPostInput, ListPostsQuery, Paginated, PostSummary, PublicPost, ListPublishedPostsQuery, PublicPostSummary, RecurrenceRule, CreateRecurrenceInput, UpdateRecurrenceInput, RepublishPostInput, SaveAsTemplateInput, CreateFromTemplateInput, RecurrenceFrequency } from '@adatechnology/content-contracts';
1
+ import { CommunityRevision, PostStatus, PostOriginFilter, PostSortField, PostCounts, TagCount, ContentModuleConfig, ClockPort, ContentHooks, ContentImageStoragePort, LoggerPort, CommunityAuthorPort, ContentSettings, ReportStatus, CreateCommunityPostInput, UpdateCommunityPostInput, RejectPostInput, UnpublishCommunityPostInput, BulkModerationInput, ContentSettingsInput, CreatePostReportInput, ListPostReportsQuery, PostEventType, Post, CreatePostInput, UpdatePostInput, PublishPostInput, ListPostsQuery, Paginated, PostSummary, CommunityPost, CommunityReviewDecision, CommunityReviewTarget, BulkModerationResult, PostReport, ContentFeedConfig, SitemapEntry, PublicPost, ListPublishedPostsQuery, PublicPostSummary, RecurrenceRule, CreateRecurrenceInput, UpdateRecurrenceInput, RepublishPostInput, SaveAsTemplateInput, CreateFromTemplateInput, RecurrenceFrequency } from '@adatechnology/content-contracts';
2
2
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
3
3
  import { PgDatabase, PgQueryResultHKT } from 'drizzle-orm/pg-core';
4
4
  import * as drizzle_orm from 'drizzle-orm';
@@ -14,9 +14,6 @@ type DrizzleMigrateFunction = (db: never, config: {
14
14
  migrationsTable?: string;
15
15
  }) => Promise<void>;
16
16
 
17
- /**
18
- * Copyright (c) 2026 Ada Technology. MIT License.
19
- */
20
17
  declare const contentSchema: drizzle_orm_pg_core.PgSchema<"content">;
21
18
  declare const posts: drizzle_orm_pg_core.PgTableWithColumns<{
22
19
  name: "posts";
@@ -266,7 +263,7 @@ declare const posts: drizzle_orm_pg_core.PgTableWithColumns<{
266
263
  identity: undefined;
267
264
  generated: undefined;
268
265
  }, {}, {
269
- length: 12;
266
+ length: 16;
270
267
  }>;
271
268
  isTemplate: drizzle_orm_pg_core.PgColumn<{
272
269
  name: "is_template";
@@ -429,6 +426,154 @@ declare const posts: drizzle_orm_pg_core.PgTableWithColumns<{
429
426
  identity: undefined;
430
427
  generated: undefined;
431
428
  }, {}, {}>;
429
+ origin: drizzle_orm_pg_core.PgColumn<{
430
+ name: "origin";
431
+ tableName: "posts";
432
+ dataType: "string";
433
+ columnType: "PgVarchar";
434
+ data: string;
435
+ driverParam: string;
436
+ notNull: true;
437
+ hasDefault: true;
438
+ isPrimaryKey: false;
439
+ isAutoincrement: false;
440
+ hasRuntimeDefault: false;
441
+ enumValues: [string, ...string[]];
442
+ baseColumn: never;
443
+ identity: undefined;
444
+ generated: undefined;
445
+ }, {}, {
446
+ length: 12;
447
+ }>;
448
+ authorAccountId: drizzle_orm_pg_core.PgColumn<{
449
+ name: "author_account_id";
450
+ tableName: "posts";
451
+ dataType: "string";
452
+ columnType: "PgVarchar";
453
+ data: string;
454
+ driverParam: string;
455
+ notNull: false;
456
+ hasDefault: false;
457
+ isPrimaryKey: false;
458
+ isAutoincrement: false;
459
+ hasRuntimeDefault: false;
460
+ enumValues: [string, ...string[]];
461
+ baseColumn: never;
462
+ identity: undefined;
463
+ generated: undefined;
464
+ }, {}, {
465
+ length: 64;
466
+ }>;
467
+ authorDisplayName: drizzle_orm_pg_core.PgColumn<{
468
+ name: "author_display_name";
469
+ tableName: "posts";
470
+ dataType: "string";
471
+ columnType: "PgVarchar";
472
+ data: string;
473
+ driverParam: string;
474
+ notNull: false;
475
+ hasDefault: false;
476
+ isPrimaryKey: false;
477
+ isAutoincrement: false;
478
+ hasRuntimeDefault: false;
479
+ enumValues: [string, ...string[]];
480
+ baseColumn: never;
481
+ identity: undefined;
482
+ generated: undefined;
483
+ }, {}, {
484
+ length: 80;
485
+ }>;
486
+ authorReferenceMonth: drizzle_orm_pg_core.PgColumn<{
487
+ name: "author_reference_month";
488
+ tableName: "posts";
489
+ dataType: "string";
490
+ columnType: "PgVarchar";
491
+ data: string;
492
+ driverParam: string;
493
+ notNull: false;
494
+ hasDefault: false;
495
+ isPrimaryKey: false;
496
+ isAutoincrement: false;
497
+ hasRuntimeDefault: false;
498
+ enumValues: [string, ...string[]];
499
+ baseColumn: never;
500
+ identity: undefined;
501
+ generated: undefined;
502
+ }, {}, {
503
+ length: 7;
504
+ }>;
505
+ reviewNote: drizzle_orm_pg_core.PgColumn<{
506
+ name: "review_note";
507
+ tableName: "posts";
508
+ dataType: "string";
509
+ columnType: "PgVarchar";
510
+ data: string;
511
+ driverParam: string;
512
+ notNull: false;
513
+ hasDefault: false;
514
+ isPrimaryKey: false;
515
+ isAutoincrement: false;
516
+ hasRuntimeDefault: false;
517
+ enumValues: [string, ...string[]];
518
+ baseColumn: never;
519
+ identity: undefined;
520
+ generated: undefined;
521
+ }, {}, {
522
+ length: 500;
523
+ }>;
524
+ termsAcceptedAt: drizzle_orm_pg_core.PgColumn<{
525
+ name: "terms_accepted_at";
526
+ tableName: "posts";
527
+ dataType: "date";
528
+ columnType: "PgTimestamp";
529
+ data: Date;
530
+ driverParam: string;
531
+ notNull: false;
532
+ hasDefault: false;
533
+ isPrimaryKey: false;
534
+ isAutoincrement: false;
535
+ hasRuntimeDefault: false;
536
+ enumValues: undefined;
537
+ baseColumn: never;
538
+ identity: undefined;
539
+ generated: undefined;
540
+ }, {}, {}>;
541
+ submittedAt: drizzle_orm_pg_core.PgColumn<{
542
+ name: "submitted_at";
543
+ tableName: "posts";
544
+ dataType: "date";
545
+ columnType: "PgTimestamp";
546
+ data: Date;
547
+ driverParam: string;
548
+ notNull: false;
549
+ hasDefault: false;
550
+ isPrimaryKey: false;
551
+ isAutoincrement: false;
552
+ hasRuntimeDefault: false;
553
+ enumValues: undefined;
554
+ baseColumn: never;
555
+ identity: undefined;
556
+ generated: undefined;
557
+ }, {}, {}>;
558
+ pendingRevision: drizzle_orm_pg_core.PgColumn<{
559
+ name: string;
560
+ tableName: "posts";
561
+ dataType: "custom";
562
+ columnType: "PgCustomColumn";
563
+ data: CommunityRevision;
564
+ driverParam: string | CommunityRevision;
565
+ notNull: false;
566
+ hasDefault: false;
567
+ isPrimaryKey: false;
568
+ isAutoincrement: false;
569
+ hasRuntimeDefault: false;
570
+ enumValues: undefined;
571
+ baseColumn: never;
572
+ identity: undefined;
573
+ generated: undefined;
574
+ }, {}, {
575
+ pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
576
+ }>;
432
577
  };
433
578
  dialect: "pg";
434
579
  }>;
@@ -615,6 +760,137 @@ declare const recurrenceRules: drizzle_orm_pg_core.PgTableWithColumns<{
615
760
  }>;
616
761
  type RecurrenceRow = typeof recurrenceRules.$inferSelect;
617
762
  type NewRecurrenceRow = typeof recurrenceRules.$inferInsert;
763
+ declare const postReports: drizzle_orm_pg_core.PgTableWithColumns<{
764
+ name: "post_reports";
765
+ schema: "content";
766
+ columns: {
767
+ id: drizzle_orm_pg_core.PgColumn<{
768
+ name: "id";
769
+ tableName: "post_reports";
770
+ dataType: "string";
771
+ columnType: "PgUUID";
772
+ data: string;
773
+ driverParam: string;
774
+ notNull: true;
775
+ hasDefault: true;
776
+ isPrimaryKey: true;
777
+ isAutoincrement: false;
778
+ hasRuntimeDefault: false;
779
+ enumValues: undefined;
780
+ baseColumn: never;
781
+ identity: undefined;
782
+ generated: undefined;
783
+ }, {}, {}>;
784
+ companyId: drizzle_orm_pg_core.PgColumn<{
785
+ name: "company_id";
786
+ tableName: "post_reports";
787
+ dataType: "string";
788
+ columnType: "PgUUID";
789
+ data: string;
790
+ driverParam: string;
791
+ notNull: true;
792
+ hasDefault: false;
793
+ isPrimaryKey: false;
794
+ isAutoincrement: false;
795
+ hasRuntimeDefault: false;
796
+ enumValues: undefined;
797
+ baseColumn: never;
798
+ identity: undefined;
799
+ generated: undefined;
800
+ }, {}, {}>;
801
+ postId: drizzle_orm_pg_core.PgColumn<{
802
+ name: "post_id";
803
+ tableName: "post_reports";
804
+ dataType: "string";
805
+ columnType: "PgUUID";
806
+ data: string;
807
+ driverParam: string;
808
+ notNull: true;
809
+ hasDefault: false;
810
+ isPrimaryKey: false;
811
+ isAutoincrement: false;
812
+ hasRuntimeDefault: false;
813
+ enumValues: undefined;
814
+ baseColumn: never;
815
+ identity: undefined;
816
+ generated: undefined;
817
+ }, {}, {}>;
818
+ reason: drizzle_orm_pg_core.PgColumn<{
819
+ name: "reason";
820
+ tableName: "post_reports";
821
+ dataType: "string";
822
+ columnType: "PgVarchar";
823
+ data: string;
824
+ driverParam: string;
825
+ notNull: true;
826
+ hasDefault: false;
827
+ isPrimaryKey: false;
828
+ isAutoincrement: false;
829
+ hasRuntimeDefault: false;
830
+ enumValues: [string, ...string[]];
831
+ baseColumn: never;
832
+ identity: undefined;
833
+ generated: undefined;
834
+ }, {}, {
835
+ length: 300;
836
+ }>;
837
+ createdAt: drizzle_orm_pg_core.PgColumn<{
838
+ name: "created_at";
839
+ tableName: "post_reports";
840
+ dataType: "date";
841
+ columnType: "PgTimestamp";
842
+ data: Date;
843
+ driverParam: string;
844
+ notNull: true;
845
+ hasDefault: true;
846
+ isPrimaryKey: false;
847
+ isAutoincrement: false;
848
+ hasRuntimeDefault: false;
849
+ enumValues: undefined;
850
+ baseColumn: never;
851
+ identity: undefined;
852
+ generated: undefined;
853
+ }, {}, {}>;
854
+ resolvedAt: drizzle_orm_pg_core.PgColumn<{
855
+ name: "resolved_at";
856
+ tableName: "post_reports";
857
+ dataType: "date";
858
+ columnType: "PgTimestamp";
859
+ data: Date;
860
+ driverParam: string;
861
+ notNull: false;
862
+ hasDefault: false;
863
+ isPrimaryKey: false;
864
+ isAutoincrement: false;
865
+ hasRuntimeDefault: false;
866
+ enumValues: undefined;
867
+ baseColumn: never;
868
+ identity: undefined;
869
+ generated: undefined;
870
+ }, {}, {}>;
871
+ resolvedBy: drizzle_orm_pg_core.PgColumn<{
872
+ name: "resolved_by";
873
+ tableName: "post_reports";
874
+ dataType: "string";
875
+ columnType: "PgVarchar";
876
+ data: string;
877
+ driverParam: string;
878
+ notNull: false;
879
+ hasDefault: false;
880
+ isPrimaryKey: false;
881
+ isAutoincrement: false;
882
+ hasRuntimeDefault: false;
883
+ enumValues: [string, ...string[]];
884
+ baseColumn: never;
885
+ identity: undefined;
886
+ generated: undefined;
887
+ }, {}, {
888
+ length: 64;
889
+ }>;
890
+ };
891
+ dialect: "pg";
892
+ }>;
893
+ type PostReportRow = typeof postReports.$inferSelect;
618
894
 
619
895
  /**
620
896
  * Copyright (c) 2026 Ada Technology. MIT License.
@@ -633,6 +909,8 @@ type PostAdminListQuery = {
633
909
  readonly tags?: readonly string[];
634
910
  readonly search?: string;
635
911
  readonly isTemplate?: boolean;
912
+ /** Ausente = `staff`. */
913
+ readonly origin?: PostOriginFilter;
636
914
  readonly sort?: PostSortField;
637
915
  readonly order?: 'asc' | 'desc';
638
916
  readonly now: Date;
@@ -643,6 +921,8 @@ type PostPublicListQuery = {
643
921
  readonly page: number;
644
922
  readonly pageSize: number;
645
923
  readonly tag?: string;
924
+ /** Ausente = `staff` (feed e sitemap dependem disso). */
925
+ readonly origin?: PostOriginFilter;
646
926
  };
647
927
  /**
648
928
  * Porta de persistência dos use-cases. `PostRepository` é a implementação Drizzle; os testes usam
@@ -673,6 +953,12 @@ interface PostStorePort {
673
953
  readonly slug: string;
674
954
  readonly now: Date;
675
955
  }): Promise<PostRow | undefined>;
956
+ /** Mesma condição pública dos outros `findPublic*`: rascunho, em análise e recusado respondem `undefined`. */
957
+ findPublicById(params: {
958
+ readonly companyId: string;
959
+ readonly id: string;
960
+ readonly now: Date;
961
+ }): Promise<PostRow | undefined>;
676
962
  recordFormerSlug(params: {
677
963
  readonly companyId: string;
678
964
  readonly postId: string;
@@ -738,6 +1024,90 @@ interface RecurrenceStorePort {
738
1024
  readonly handle: (rule: RecurrenceRow) => Promise<Partial<NewRecurrenceRow>>;
739
1025
  }): Promise<number>;
740
1026
  }
1027
+ type CommunityCreateOutcome = {
1028
+ readonly isLimited: false;
1029
+ readonly row: PostRow;
1030
+ } | {
1031
+ readonly isLimited: true;
1032
+ readonly freesUpAt: Date;
1033
+ };
1034
+ /**
1035
+ * Persistência da comunidade (posts do hóspede, fotos enviadas e configuração). O limite diário e o
1036
+ * insert acontecem na MESMA transação, sob trava por (empresa, conta): sem ela, requisições paralelas
1037
+ * passariam todas pela contagem antes de qualquer uma gravar.
1038
+ */
1039
+ interface CommunityStorePort {
1040
+ /** Conta os posts da comunidade da conta nas últimas 24 h (qualquer status, arquivados inclusive) e insere. */
1041
+ createWithDailyLimit(params: {
1042
+ readonly values: NewPostRow;
1043
+ readonly accountId: string;
1044
+ readonly limit: number;
1045
+ readonly now: Date;
1046
+ }): Promise<CommunityCreateOutcome>;
1047
+ /** Posts da conta, sem arquivados, o mais recentemente editado primeiro. */
1048
+ listByAuthor(params: {
1049
+ readonly companyId: string;
1050
+ readonly accountId: string;
1051
+ readonly page: number;
1052
+ readonly pageSize: number;
1053
+ }): Promise<PostPage>;
1054
+ /** Sem linha da empresa, devolve `DEFAULT_CONTENT_SETTINGS`. */
1055
+ getSettings(params: {
1056
+ readonly companyId: string;
1057
+ }): Promise<ContentSettings>;
1058
+ /** Dentre `urls`, as que esta conta enviou nesta empresa. */
1059
+ findOwnedImageUrls(params: {
1060
+ readonly companyId: string;
1061
+ readonly accountId: string;
1062
+ readonly urls: readonly string[];
1063
+ }): Promise<readonly string[]>;
1064
+ recordImage(params: {
1065
+ readonly companyId: string;
1066
+ readonly accountId: string;
1067
+ readonly storageKey: string;
1068
+ readonly url: string;
1069
+ readonly createdAt: Date;
1070
+ }): Promise<void>;
1071
+ /** Instantes dos envios da conta desde `since`, do mais antigo ao mais novo. */
1072
+ listRecentImageDates(params: {
1073
+ readonly companyId: string;
1074
+ readonly accountId: string;
1075
+ readonly since: Date;
1076
+ }): Promise<readonly Date[]>;
1077
+ upsertSettings(params: {
1078
+ readonly companyId: string;
1079
+ readonly settings: ContentSettings;
1080
+ readonly now: Date;
1081
+ }): Promise<ContentSettings>;
1082
+ createReport(params: {
1083
+ readonly companyId: string;
1084
+ readonly postId: string;
1085
+ readonly reason: string;
1086
+ readonly now: Date;
1087
+ }): Promise<PostReportRow>;
1088
+ /** Mais recentes primeiro. */
1089
+ listReports(params: {
1090
+ readonly companyId: string;
1091
+ readonly status: ReportStatus;
1092
+ readonly page: number;
1093
+ readonly pageSize: number;
1094
+ }): Promise<{
1095
+ readonly rows: readonly PostReportRow[];
1096
+ readonly total: number;
1097
+ }>;
1098
+ /** Idempotente: denúncia já resolvida volta como está, sem trocar quem resolveu. `undefined` = não existe. */
1099
+ resolveReport(params: {
1100
+ readonly companyId: string;
1101
+ readonly id: string;
1102
+ readonly actorUserId: string;
1103
+ readonly now: Date;
1104
+ }): Promise<PostReportRow | undefined>;
1105
+ /** Denúncias abertas por post, numa consulta só; post sem denúncia não aparece no mapa. */
1106
+ countOpenReports(params: {
1107
+ readonly companyId: string;
1108
+ readonly postIds: readonly string[];
1109
+ }): Promise<ReadonlyMap<string, number>>;
1110
+ }
741
1111
  type ContentDependencies = {
742
1112
  readonly posts: PostStorePort;
743
1113
  readonly recurrences: RecurrenceStorePort;
@@ -746,40 +1116,98 @@ type ContentDependencies = {
746
1116
  readonly hooks?: ContentHooks;
747
1117
  readonly imageStorage?: ContentImageStoragePort;
748
1118
  readonly logger?: LoggerPort;
1119
+ readonly communityAuthor?: CommunityAuthorPort;
1120
+ readonly community?: CommunityStorePort;
749
1121
  };
750
1122
 
751
1123
  /**
752
1124
  * Copyright (c) 2026 Ada Technology. MIT License.
753
- *
754
- * RSS, Atom e entradas de sitemap do site público, a partir de `config.feed`. Sem essa config os
755
- * use-cases nem são construídos e as rotas não sobem.
756
1125
  */
757
1126
 
758
- declare const FEED_FORMAT: {
759
- readonly RSS: "rss";
760
- readonly ATOM: "atom";
1127
+ /** Resultado de `ResolveCommunityAuthor`: quem escreve, já autenticado e elegível nesta requisição. */
1128
+ type CommunityAuthorContext = {
1129
+ readonly companyId: string;
1130
+ readonly accountId: string;
1131
+ readonly defaultDisplayName: string;
1132
+ readonly referenceMonth?: string;
1133
+ };
1134
+ type CommunityDependencies = ContentDependencies & {
1135
+ readonly community: CommunityStorePort;
1136
+ readonly communityAuthor: CommunityAuthorPort;
1137
+ };
1138
+ type ResolveCommunityAuthorParams = {
1139
+ readonly headers: Readonly<Record<string, string>>;
1140
+ };
1141
+ type ListOwnCommunityPostsParams = {
1142
+ readonly author: CommunityAuthorContext;
1143
+ readonly page?: number;
1144
+ readonly pageSize?: number;
1145
+ };
1146
+ type GetOwnCommunityPostParams = {
1147
+ readonly author: CommunityAuthorContext;
1148
+ readonly id: string;
1149
+ };
1150
+ type CreateCommunityPostParams = {
1151
+ readonly author: CommunityAuthorContext;
1152
+ readonly input: CreateCommunityPostInput;
1153
+ };
1154
+ type UpdateOwnCommunityPostParams = {
1155
+ readonly author: CommunityAuthorContext;
1156
+ readonly id: string;
1157
+ readonly input: UpdateCommunityPostInput;
1158
+ };
1159
+ type SubmitCommunityPostParams = {
1160
+ readonly author: CommunityAuthorContext;
1161
+ readonly id: string;
1162
+ readonly termsAccepted: boolean | undefined;
1163
+ };
1164
+ type DeleteOwnCommunityPostParams = {
1165
+ readonly author: CommunityAuthorContext;
1166
+ readonly id: string;
1167
+ };
1168
+ type UploadCommunityImageParams = {
1169
+ readonly author: CommunityAuthorContext;
1170
+ readonly bytes: Uint8Array;
1171
+ readonly mimeType: string;
1172
+ };
1173
+ type UploadCommunityImageResult = {
1174
+ readonly url: string;
1175
+ readonly key: string;
1176
+ };
1177
+ /** Ações da equipe: `companyId` e `actorUserId` vêm do `auth` da rota, nunca do corpo. */
1178
+ type ModerateCommunityPostParams = {
1179
+ readonly companyId: string;
1180
+ readonly id: string;
1181
+ readonly actorUserId: string;
1182
+ };
1183
+ type RejectCommunityPostParams = ModerateCommunityPostParams & {
1184
+ readonly input: RejectPostInput;
1185
+ };
1186
+ type UnpublishCommunityPostParams = ModerateCommunityPostParams & {
1187
+ readonly input?: UnpublishCommunityPostInput;
1188
+ };
1189
+ type ModerateCommunityPostsInBulkParams = {
1190
+ readonly companyId: string;
1191
+ readonly actorUserId: string;
1192
+ readonly input: BulkModerationInput;
1193
+ };
1194
+ type UpdateContentSettingsParams = {
1195
+ readonly companyId: string;
1196
+ readonly input: ContentSettingsInput;
1197
+ };
1198
+ type CreatePostReportParams = {
1199
+ readonly companyId: string;
1200
+ readonly postId: string;
1201
+ readonly input: CreatePostReportInput;
1202
+ };
1203
+ type ListPostReportsParams = {
1204
+ readonly companyId: string;
1205
+ } & Partial<ListPostReportsQuery>;
1206
+ type ResolvePostReportParams = {
1207
+ readonly companyId: string;
1208
+ readonly id: string;
1209
+ readonly actorUserId: string;
761
1210
  };
762
- type FeedFormat = (typeof FEED_FORMAT)[keyof typeof FEED_FORMAT];
763
- declare class BuildFeedUseCase {
764
- private readonly dependencies;
765
- private readonly feed;
766
- constructor(dependencies: ContentDependencies, feed: ContentFeedConfig);
767
- execute(params: {
768
- readonly companyId: string;
769
- readonly format: FeedFormat;
770
- readonly feedUrl?: string;
771
- }): Promise<string>;
772
- private toItem;
773
- }
774
- declare class ListSitemapEntriesUseCase {
775
- private readonly dependencies;
776
- private readonly feed;
777
- constructor(dependencies: ContentDependencies, feed: ContentFeedConfig);
778
- /** Entradas para o host juntar ao sitemap dele — o módulo não é dono do sitemap do site. */
779
- execute(params: {
780
- readonly companyId: string;
781
- }): Promise<readonly SitemapEntry[]>;
782
- }
783
1211
 
784
1212
  /**
785
1213
  * Copyright (c) 2026 Ada Technology. MIT License.
@@ -798,6 +1226,13 @@ declare abstract class PostUseCaseBase {
798
1226
  constructor(dependencies: ContentDependencies);
799
1227
  protected now(): Date;
800
1228
  protected findOrFail(reference: PostReference): Promise<PostRow>;
1229
+ /** Ações de edição da equipe: a equipe modera post da comunidade, não o reescreve (design §4). */
1230
+ protected findEditableOrFail(reference: PostReference): Promise<PostRow>;
1231
+ /** Denúncias abertas por post numa consulta só; sem o módulo de comunidade, ninguém tem denúncia. */
1232
+ protected openReportCounts(params: {
1233
+ readonly companyId: string;
1234
+ readonly rows: readonly PostRow[];
1235
+ }): Promise<ReadonlyMap<string, number>>;
801
1236
  protected save(reference: PostReference, values: Partial<NewPostRow>, event: PostEventType): Promise<Post>;
802
1237
  /** Id curto livre na empresa; a colisão (~1 em 2 bilhões) só repete o sorteio. */
803
1238
  protected generateShortId(companyId: string): Promise<string>;
@@ -842,6 +1277,280 @@ declare class ListPostsUseCase extends PostUseCaseBase {
842
1277
  } & Partial<ListPostsQuery>): Promise<Paginated<PostSummary>>;
843
1278
  }
844
1279
 
1280
+ /**
1281
+ * Copyright (c) 2026 Ada Technology. MIT License.
1282
+ */
1283
+
1284
+ declare abstract class ContentSettingsUseCaseBase extends PostUseCaseBase {
1285
+ protected readonly dependencies: CommunityDependencies;
1286
+ constructor(dependencies: CommunityDependencies);
1287
+ }
1288
+ declare class GetContentSettingsUseCase extends ContentSettingsUseCaseBase {
1289
+ /** Sem linha da empresa, o padrão do contracts. */
1290
+ execute(params: {
1291
+ readonly companyId: string;
1292
+ }): Promise<ContentSettings>;
1293
+ }
1294
+ declare class UpdateContentSettingsUseCase extends ContentSettingsUseCaseBase {
1295
+ /** Vale para os próximos envios: o que já está em análise ou no ar não muda de estado. */
1296
+ execute(params: UpdateContentSettingsParams): Promise<ContentSettings>;
1297
+ }
1298
+
1299
+ /**
1300
+ * Copyright (c) 2026 Ada Technology. MIT License.
1301
+ *
1302
+ * Base dos casos de uso do hóspede: busca por dono (post alheio é 404, não revela existência),
1303
+ * validação das fotos do corpo e gravação com o aviso `onPostChanged`.
1304
+ */
1305
+
1306
+ declare abstract class CommunityUseCaseBase extends PostUseCaseBase {
1307
+ protected readonly dependencies: CommunityDependencies;
1308
+ constructor(dependencies: CommunityDependencies);
1309
+ protected getSettings(companyId: string): Promise<ContentSettings>;
1310
+ protected findOwned(author: CommunityAuthorContext, id: string): Promise<PostRow>;
1311
+ protected persist(params: {
1312
+ readonly author: CommunityAuthorContext;
1313
+ readonly id: string;
1314
+ readonly values: Partial<NewPostRow>;
1315
+ readonly event: PostEventType;
1316
+ }): Promise<PostRow>;
1317
+ /** Só foto enviada por esta conta, nesta empresa, entra no corpo: URL externa seria rastreio sem moderação. */
1318
+ protected assertBodyImages(params: {
1319
+ readonly author: CommunityAuthorContext;
1320
+ readonly body: string;
1321
+ readonly settings: ContentSettings;
1322
+ }): Promise<readonly string[]>;
1323
+ }
1324
+
1325
+ /**
1326
+ * Copyright (c) 2026 Ada Technology. MIT License.
1327
+ */
1328
+
1329
+ declare class CreateCommunityPostUseCase extends CommunityUseCaseBase {
1330
+ execute(params: CreateCommunityPostParams): Promise<CommunityPost>;
1331
+ }
1332
+
1333
+ /**
1334
+ * Copyright (c) 2026 Ada Technology. MIT License.
1335
+ *
1336
+ * Excluir é arquivar anonimizado: o texto, o nome e a capa somem, mas a linha fica para reservar o
1337
+ * slug (link já compartilhado) e para continuar contando no limite diário (apagar e recriar não o burla).
1338
+ */
1339
+
1340
+ declare class DeleteOwnCommunityPostUseCase extends CommunityUseCaseBase {
1341
+ execute(params: DeleteOwnCommunityPostParams): Promise<void>;
1342
+ }
1343
+
1344
+ /**
1345
+ * Copyright (c) 2026 Ada Technology. MIT License.
1346
+ */
1347
+
1348
+ declare class ListOwnCommunityPostsUseCase extends CommunityUseCaseBase {
1349
+ execute(params: ListOwnCommunityPostsParams): Promise<Paginated<CommunityPost>>;
1350
+ }
1351
+ declare class GetOwnCommunityPostUseCase extends CommunityUseCaseBase {
1352
+ execute(params: GetOwnCommunityPostParams): Promise<CommunityPost>;
1353
+ }
1354
+
1355
+ /**
1356
+ * Copyright (c) 2026 Ada Technology. MIT License.
1357
+ */
1358
+
1359
+ declare function readPendingRevision(row: PostRow): CommunityRevision | null;
1360
+
1361
+ /**
1362
+ * Copyright (c) 2026 Ada Technology. MIT License.
1363
+ *
1364
+ * Base das ações da equipe sobre post da comunidade: só enxerga origem `community` (um post da equipe
1365
+ * responde 404 aqui) e toda decisão gravada avisa `onPostChanged` e `onCommunityPostReviewed`.
1366
+ */
1367
+
1368
+ type ReviewDecisionParams = {
1369
+ readonly row: PostRow;
1370
+ readonly values: Partial<NewPostRow>;
1371
+ readonly event: PostEventType;
1372
+ readonly decision: CommunityReviewDecision;
1373
+ readonly target: CommunityReviewTarget;
1374
+ readonly actorUserId: string;
1375
+ };
1376
+ declare abstract class CommunityModerationUseCaseBase extends PostUseCaseBase {
1377
+ protected readonly dependencies: CommunityDependencies;
1378
+ constructor(dependencies: CommunityDependencies);
1379
+ protected findCommunityPost(reference: PostReference): Promise<PostRow>;
1380
+ /** Revisão que ainda espera decisão; uma já recusada não volta para a fila. */
1381
+ protected openRevision(row: PostRow): ReturnType<typeof readPendingRevision>;
1382
+ protected decide(params: ReviewDecisionParams): Promise<Post>;
1383
+ }
1384
+
1385
+ /**
1386
+ * Copyright (c) 2026 Ada Technology. MIT License.
1387
+ *
1388
+ * Decisões da equipe (máquina de estados do design, coluna "equipe"). Célula sem ação é
1389
+ * `InvalidPostTransitionError` (409). Aprovar uma revisão copia o texto novo para as colunas vivas
1390
+ * e só então o público passa a ler a versão nova; recusar uma revisão deixa o post no ar como está.
1391
+ */
1392
+
1393
+ declare class ApproveCommunityPostUseCase extends CommunityModerationUseCaseBase {
1394
+ execute(params: ModerateCommunityPostParams): Promise<Post>;
1395
+ private revisionValues;
1396
+ }
1397
+ declare class RejectCommunityPostUseCase extends CommunityModerationUseCaseBase {
1398
+ execute(params: RejectCommunityPostParams): Promise<Post>;
1399
+ }
1400
+ declare class UnpublishCommunityPostUseCase extends CommunityModerationUseCaseBase {
1401
+ /** Tira do ar sem apagar: o autor vê a nota e pode editar e reenviar. A revisão aberta some junto. */
1402
+ execute(params: UnpublishCommunityPostParams): Promise<Post>;
1403
+ }
1404
+ declare class ArchiveCommunityPostUseCase extends CommunityModerationUseCaseBase {
1405
+ /** Idempotente: já arquivado devolve o post sem gravar nem avisar de novo. */
1406
+ execute(params: ModerateCommunityPostParams): Promise<Post>;
1407
+ }
1408
+
1409
+ /**
1410
+ * Copyright (c) 2026 Ada Technology. MIT License.
1411
+ *
1412
+ * Lote de moderação: cada id segue sozinho (`Promise.allSettled`), então um id inválido não derruba
1413
+ * os outros e o resultado diz, por id, o que falhou e por quê.
1414
+ */
1415
+
1416
+ declare class ModerateCommunityPostsInBulkUseCase extends CommunityModerationUseCaseBase {
1417
+ private readonly actions;
1418
+ constructor(dependencies: CommunityDependencies);
1419
+ execute(params: ModerateCommunityPostsInBulkParams): Promise<BulkModerationResult>;
1420
+ }
1421
+
1422
+ /**
1423
+ * Copyright (c) 2026 Ada Technology. MIT License.
1424
+ *
1425
+ * Denúncia de leitor sobre post da comunidade no ar. Não guarda IP nem identidade de quem denunciou.
1426
+ */
1427
+
1428
+ declare abstract class PostReportUseCaseBase extends PostUseCaseBase {
1429
+ protected readonly dependencies: CommunityDependencies;
1430
+ constructor(dependencies: CommunityDependencies);
1431
+ }
1432
+ declare class CreatePostReportUseCase extends PostReportUseCaseBase {
1433
+ /** Só post da comunidade e público: qualquer outro caso é 404, para não revelar rascunho nem post da equipe. */
1434
+ execute(params: CreatePostReportParams): Promise<PostReport>;
1435
+ }
1436
+ declare class ListPostReportsUseCase extends PostReportUseCaseBase {
1437
+ execute(params: ListPostReportsParams): Promise<Paginated<PostReport>>;
1438
+ }
1439
+ declare class ResolvePostReportUseCase extends PostReportUseCaseBase {
1440
+ /** Idempotente: resolver de novo devolve a denúncia como já estava. */
1441
+ execute(params: ResolvePostReportParams): Promise<PostReport>;
1442
+ }
1443
+
1444
+ /**
1445
+ * Copyright (c) 2026 Ada Technology. MIT License.
1446
+ *
1447
+ * Porta de entrada de toda requisição de comunidade: sem sessão é 401 e conta inelegível é 403.
1448
+ * A elegibilidade é conferida em TODA chamada, porque pode ser perdida depois da criação do post.
1449
+ */
1450
+
1451
+ declare class ResolveCommunityAuthorUseCase {
1452
+ private readonly dependencies;
1453
+ constructor(dependencies: CommunityDependencies);
1454
+ execute(params: ResolveCommunityAuthorParams): Promise<CommunityAuthorContext>;
1455
+ }
1456
+
1457
+ /**
1458
+ * Copyright (c) 2026 Ada Technology. MIT License.
1459
+ */
1460
+
1461
+ declare class SubmitCommunityPostUseCase extends CommunityUseCaseBase {
1462
+ execute(params: SubmitCommunityPostParams): Promise<CommunityPost>;
1463
+ private notifySubmitted;
1464
+ }
1465
+
1466
+ /**
1467
+ * Copyright (c) 2026 Ada Technology. MIT License.
1468
+ *
1469
+ * Editar um post publicado no modo `before` NÃO mexe no texto no ar: a edição vira `pendingRevision`
1470
+ * até a equipe aprovar. Nos outros casos (rascunho, em análise, recusado, ou `after`) vale o texto vivo.
1471
+ */
1472
+
1473
+ declare class UpdateOwnCommunityPostUseCase extends CommunityUseCaseBase {
1474
+ execute(params: UpdateOwnCommunityPostParams): Promise<CommunityPost>;
1475
+ private liveValues;
1476
+ /** O nome exibido não entra na revisão (o contrato dela não o carrega): trocar o nome de um post no ar passa pela equipe numa próxima fase. */
1477
+ private revisionValues;
1478
+ private notifyRevision;
1479
+ }
1480
+
1481
+ /**
1482
+ * Copyright (c) 2026 Ada Technology. MIT License.
1483
+ *
1484
+ * Foto do hóspede: mesmas regras de formato e tamanho do upload da equipe, chave própria e registro em
1485
+ * `community_images` (só URL registrada pode entrar no corpo). O teto em 24 h acompanha o que o limite
1486
+ * diário de posts permite escrever: posts por dia × fotos por post.
1487
+ */
1488
+
1489
+ declare class UploadCommunityImageUseCase extends CommunityUseCaseBase {
1490
+ private readonly uploadImage;
1491
+ execute(params: UploadCommunityImageParams): Promise<UploadCommunityImageResult>;
1492
+ private assertUnderDailyCap;
1493
+ }
1494
+
1495
+ /**
1496
+ * Copyright (c) 2026 Ada Technology. MIT License.
1497
+ */
1498
+
1499
+ type CommunityUseCases = {
1500
+ readonly resolveCommunityAuthor: ResolveCommunityAuthorUseCase;
1501
+ readonly listOwnCommunityPosts: ListOwnCommunityPostsUseCase;
1502
+ readonly getOwnCommunityPost: GetOwnCommunityPostUseCase;
1503
+ readonly createCommunityPost: CreateCommunityPostUseCase;
1504
+ readonly updateOwnCommunityPost: UpdateOwnCommunityPostUseCase;
1505
+ readonly submitCommunityPost: SubmitCommunityPostUseCase;
1506
+ readonly deleteOwnCommunityPost: DeleteOwnCommunityPostUseCase;
1507
+ readonly approveCommunityPost: ApproveCommunityPostUseCase;
1508
+ readonly rejectCommunityPost: RejectCommunityPostUseCase;
1509
+ readonly unpublishCommunityPost: UnpublishCommunityPostUseCase;
1510
+ readonly archiveCommunityPost: ArchiveCommunityPostUseCase;
1511
+ readonly moderateCommunityPostsInBulk: ModerateCommunityPostsInBulkUseCase;
1512
+ readonly getContentSettings: GetContentSettingsUseCase;
1513
+ readonly updateContentSettings: UpdateContentSettingsUseCase;
1514
+ readonly createPostReport: CreatePostReportUseCase;
1515
+ readonly listPostReports: ListPostReportsUseCase;
1516
+ readonly resolvePostReport: ResolvePostReportUseCase;
1517
+ /** Também exige `providers.imageStorage`. */
1518
+ readonly uploadCommunityImage?: UploadCommunityImageUseCase;
1519
+ };
1520
+
1521
+ /**
1522
+ * Copyright (c) 2026 Ada Technology. MIT License.
1523
+ *
1524
+ * RSS, Atom e entradas de sitemap do site público, a partir de `config.feed`. Sem essa config os
1525
+ * use-cases nem são construídos e as rotas não sobem.
1526
+ */
1527
+
1528
+ declare const FEED_FORMAT: {
1529
+ readonly RSS: "rss";
1530
+ readonly ATOM: "atom";
1531
+ };
1532
+ type FeedFormat = (typeof FEED_FORMAT)[keyof typeof FEED_FORMAT];
1533
+ declare class BuildFeedUseCase {
1534
+ private readonly dependencies;
1535
+ private readonly feed;
1536
+ constructor(dependencies: ContentDependencies, feed: ContentFeedConfig);
1537
+ execute(params: {
1538
+ readonly companyId: string;
1539
+ readonly format: FeedFormat;
1540
+ readonly feedUrl?: string;
1541
+ }): Promise<string>;
1542
+ private toItem;
1543
+ }
1544
+ declare class ListSitemapEntriesUseCase {
1545
+ private readonly dependencies;
1546
+ private readonly feed;
1547
+ constructor(dependencies: ContentDependencies, feed: ContentFeedConfig);
1548
+ /** Entradas para o host juntar ao sitemap dele — o módulo não é dono do sitemap do site. */
1549
+ execute(params: {
1550
+ readonly companyId: string;
1551
+ }): Promise<readonly SitemapEntry[]>;
1552
+ }
1553
+
845
1554
  /**
846
1555
  * Copyright (c) 2026 Ada Technology. MIT License.
847
1556
  *
@@ -1010,6 +1719,8 @@ type UploadImageParams = {
1010
1719
  readonly companyId: string;
1011
1720
  readonly bytes: Uint8Array;
1012
1721
  readonly mimeType: string;
1722
+ /** Pasta no bucket antes da empresa. Padrão: a dos posts da equipe. */
1723
+ readonly keyPrefix?: string;
1013
1724
  };
1014
1725
  type UploadImageResult = {
1015
1726
  readonly url: string;
@@ -1048,6 +1759,10 @@ type ContentModuleProviders = {
1048
1759
  /** Troca a persistência (ex.: dublê em memória num teste do host). Padrão: Drizzle sobre `db`. */
1049
1760
  readonly postStore?: PostStorePort;
1050
1761
  readonly recurrenceStore?: RecurrenceStorePort;
1762
+ /** Sem a porta, nada de comunidade existe: nem use case, nem rota. */
1763
+ readonly communityAuthor?: CommunityAuthorPort;
1764
+ /** Padrão: Drizzle sobre `db`. Só vale junto com `communityAuthor`. */
1765
+ readonly communityStore?: CommunityStorePort;
1051
1766
  };
1052
1767
  type CreateContentModuleParams = {
1053
1768
  readonly db?: ContentDatabase;
@@ -1084,7 +1799,7 @@ type ContentModule = {
1084
1799
  /** Sem `config.feed`, feed e sitemap não existem. */
1085
1800
  readonly buildFeed?: BuildFeedUseCase;
1086
1801
  readonly listSitemapEntries?: ListSitemapEntriesUseCase;
1087
- };
1802
+ } & Partial<CommunityUseCases>;
1088
1803
  readonly config: ContentModuleConfig;
1089
1804
  };
1090
1805
  declare function createContentModule(params: CreateContentModuleParams): ContentModule;
@@ -1117,6 +1832,17 @@ type CreateContentRoutesParams = {
1117
1832
  };
1118
1833
  declare function createContentRoutes(params: CreateContentRoutesParams): ModuleRouteTable;
1119
1834
 
1835
+ /**
1836
+ * Copyright (c) 2026 Ada Technology. MIT License.
1837
+ */
1838
+ /**
1839
+ * `operationId` das rotas que o app deve limitar (por IP e, nas de autoria, por conta): o módulo não
1840
+ * tem contador nem relógio de janela. O app envolve o `handler` dessas rotas na tabela e responde 429
1841
+ * com `Retry-After`; o 429 do limite diário do módulo leva `retryAfterSeconds` em `publicDetails`.
1842
+ */
1843
+ declare const CONTENT_RATE_LIMITED_OPERATIONS: readonly ["createCommunityPost", "updateOwnCommunityPost", "submitCommunityPost", "uploadCommunityImage", "createPostReport"];
1844
+ type ContentRateLimitedOperation = (typeof CONTENT_RATE_LIMITED_OPERATIONS)[number];
1845
+
1120
1846
  /**
1121
1847
  * Copyright (c) 2026 Ada Technology. MIT License.
1122
1848
  */
@@ -1131,6 +1857,28 @@ type RunContentMigrationsParams = {
1131
1857
  };
1132
1858
  declare function runContentMigrations(params: RunContentMigrationsParams): Promise<void>;
1133
1859
 
1860
+ /**
1861
+ * Copyright (c) 2026 Ada Technology. MIT License.
1862
+ */
1863
+
1864
+ declare class CommunityRepository implements CommunityStorePort {
1865
+ private readonly db;
1866
+ constructor(db: ContentDatabase);
1867
+ createWithDailyLimit(params: Parameters<CommunityStorePort['createWithDailyLimit']>[0]): Promise<CommunityCreateOutcome>;
1868
+ listByAuthor(params: Parameters<CommunityStorePort['listByAuthor']>[0]): Promise<PostPage>;
1869
+ getSettings(params: {
1870
+ companyId: string;
1871
+ }): Promise<ContentSettings>;
1872
+ findOwnedImageUrls(params: Parameters<CommunityStorePort['findOwnedImageUrls']>[0]): Promise<readonly string[]>;
1873
+ recordImage(params: Parameters<CommunityStorePort['recordImage']>[0]): Promise<void>;
1874
+ listRecentImageDates(params: Parameters<CommunityStorePort['listRecentImageDates']>[0]): Promise<readonly Date[]>;
1875
+ upsertSettings(params: Parameters<CommunityStorePort['upsertSettings']>[0]): Promise<ContentSettings>;
1876
+ createReport(params: Parameters<CommunityStorePort['createReport']>[0]): Promise<PostReportRow>;
1877
+ listReports(params: Parameters<CommunityStorePort['listReports']>[0]): ReturnType<CommunityStorePort['listReports']>;
1878
+ resolveReport(params: Parameters<CommunityStorePort['resolveReport']>[0]): Promise<PostReportRow | undefined>;
1879
+ countOpenReports(params: Parameters<CommunityStorePort['countOpenReports']>[0]): Promise<ReadonlyMap<string, number>>;
1880
+ }
1881
+
1134
1882
  /**
1135
1883
  * Copyright (c) 2026 Ada Technology. MIT License.
1136
1884
  */
@@ -1161,6 +1909,11 @@ declare class PostRepository implements PostStorePort {
1161
1909
  shortId: string;
1162
1910
  now: Date;
1163
1911
  }): Promise<PostRow | undefined>;
1912
+ findPublicById(params: {
1913
+ companyId: string;
1914
+ id: string;
1915
+ now: Date;
1916
+ }): Promise<PostRow | undefined>;
1164
1917
  findPublicByFormerSlug(params: {
1165
1918
  companyId: string;
1166
1919
  slug: string;
@@ -1301,4 +2054,4 @@ declare function createInMemoryRecurrenceStore(): RecurrenceStorePort & {
1301
2054
  readonly rows: RecurrenceRow[];
1302
2055
  };
1303
2056
 
1304
- export { ArchivePostUseCase, BuildFeedUseCase, CONTENT_IMAGE, CONTENT_MIGRATIONS_TABLE, COVER_IMAGE, type ContentDatabase, type ContentDependencies, type ContentModule, type ContentModuleProviders, CountPostsUseCase, type CreateContentModuleParams, type CreateContentRoutesParams, CreateFromTemplateUseCase, CreatePostUseCase, CreateRecurrenceUseCase, DEFAULT_SCHEDULER_INTERVAL_MS, type DrizzleMigrateFunction, FEED_FORMAT, type FeedFormat, GetPostUseCase, GetPublishedPostBySlugUseCase, ListPostsUseCase, ListPublishedPostsUseCase, ListRecurrencesUseCase, ListSitemapEntriesUseCase, ListTagsUseCase, type NewPostRow, type NewRecurrenceRow, type PostAdminListQuery, type PostPage, type PostPublicListQuery, type PostReference, PostRepository, type PostRow, type PostStorePort, type PublicCompanyResolverPort, type PublishDueResult, PublishDueUseCase, PublishPostUseCase, RecurrenceRepository, type RecurrenceRow, type RecurrenceStorePort, RemoveRecurrenceUseCase, RepublishPostUseCase, type RunContentMigrationsParams, SaveAsTemplateUseCase, type StartContentSchedulerParams, TAG_SCOPE, type TagScope, UnpublishPostUseCase, UpdatePostUseCase, UpdateRecurrenceUseCase, type UploadCoverImageParams, type UploadCoverImageResult, UploadCoverImageUseCase, type UploadImageParams, type UploadImageResult, UploadImageUseCase, contentMigrationsFolder, contentSchema, createContentModule, createContentRoutes, createInMemoryPostStore, createInMemoryRecurrenceStore, nextOccurrence, nextOccurrenceAfter, posts, recurrenceRules, runContentMigrations, startContentScheduler };
2057
+ export { ArchivePostUseCase, BuildFeedUseCase, CONTENT_IMAGE, CONTENT_MIGRATIONS_TABLE, CONTENT_RATE_LIMITED_OPERATIONS, COVER_IMAGE, type CommunityAuthorContext, type CommunityCreateOutcome, CommunityRepository, type CommunityStorePort, type CommunityUseCases, type ContentDatabase, type ContentDependencies, type ContentModule, type ContentModuleProviders, type ContentRateLimitedOperation, CountPostsUseCase, type CreateContentModuleParams, type CreateContentRoutesParams, CreateFromTemplateUseCase, type CreatePostReportParams, CreatePostUseCase, CreateRecurrenceUseCase, DEFAULT_SCHEDULER_INTERVAL_MS, type DrizzleMigrateFunction, FEED_FORMAT, type FeedFormat, GetPostUseCase, GetPublishedPostBySlugUseCase, type ListPostReportsParams, ListPostsUseCase, ListPublishedPostsUseCase, ListRecurrencesUseCase, ListSitemapEntriesUseCase, ListTagsUseCase, type ModerateCommunityPostParams, type ModerateCommunityPostsInBulkParams, type NewPostRow, type NewRecurrenceRow, type PostAdminListQuery, type PostPage, type PostPublicListQuery, type PostReference, type PostReportRow, PostRepository, type PostRow, type PostStorePort, type PublicCompanyResolverPort, type PublishDueResult, PublishDueUseCase, PublishPostUseCase, RecurrenceRepository, type RecurrenceRow, type RecurrenceStorePort, type RejectCommunityPostParams, RemoveRecurrenceUseCase, RepublishPostUseCase, type ResolvePostReportParams, type RunContentMigrationsParams, SaveAsTemplateUseCase, type StartContentSchedulerParams, TAG_SCOPE, type TagScope, type UnpublishCommunityPostParams, UnpublishPostUseCase, type UpdateContentSettingsParams, UpdatePostUseCase, UpdateRecurrenceUseCase, type UploadCoverImageParams, type UploadCoverImageResult, UploadCoverImageUseCase, type UploadImageParams, type UploadImageResult, UploadImageUseCase, contentMigrationsFolder, contentSchema, createContentModule, createContentRoutes, createInMemoryPostStore, createInMemoryRecurrenceStore, nextOccurrence, nextOccurrenceAfter, posts, recurrenceRules, runContentMigrations, startContentScheduler };