@openpeepshq/core 0.1.33 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/dist/accounts/mutations.js +33 -35
  2. package/dist/analytics/compile.js +16 -10
  3. package/dist/analytics/read.js +52 -9
  4. package/dist/analytics/report.d.ts +20 -0
  5. package/dist/backups/index.js +75 -15
  6. package/dist/backups/metadata.d.ts +2 -3
  7. package/dist/backups/metadata.js +6 -2
  8. package/dist/config/defaults/capabilities.js +13 -2
  9. package/dist/config/defaults/community.js +7 -3
  10. package/dist/config/defaults/core.d.ts +1 -1
  11. package/dist/config/defaults/core.js +3 -0
  12. package/dist/config/index.d.ts +21 -0
  13. package/dist/config/index.js +7 -1
  14. package/dist/db/helpers.d.ts +1 -0
  15. package/dist/db/helpers.js +11 -3
  16. package/dist/db/index.d.ts +1 -1
  17. package/dist/db/index.js +1 -0
  18. package/dist/db/init.js +2 -3
  19. package/dist/db/migration/importCollections.d.ts +14 -9
  20. package/dist/db/migration/importCollections.js +114 -164
  21. package/dist/db/migration/shared.d.ts +2 -33
  22. package/dist/db/migration/shared.js +2 -52
  23. package/dist/db/pg/collections.d.ts +2 -2
  24. package/dist/db/pg/collections.js +2 -2
  25. package/dist/db/pg/filters/posts.d.ts +10 -0
  26. package/dist/db/pg/filters/posts.js +28 -4
  27. package/dist/db/pg/filters/profiles.d.ts +1 -0
  28. package/dist/db/pg/filters/profiles.js +2 -1
  29. package/dist/db/pg/map/filters.js +32 -2
  30. package/dist/db/pg/map/mutations.js +13 -8
  31. package/dist/db/pg/map/registry.d.ts +5 -0
  32. package/dist/db/pg/map/registry.js +64 -24
  33. package/dist/db/pg/map/relations.js +9 -5
  34. package/dist/db/pg/migrate.d.ts +1 -2
  35. package/dist/db/pg/migrate.js +6 -6
  36. package/dist/db/pg/queries/activity.js +3 -3
  37. package/dist/db/pg/queries/sorts.d.ts +1 -0
  38. package/dist/db/pg/queries/sorts.js +4 -0
  39. package/dist/db/pg/schema/documents.d.ts +279 -41
  40. package/dist/db/pg/schema/documents.js +21 -8
  41. package/dist/db/pg/schema/edges.d.ts +116 -7
  42. package/dist/db/pg/schema/edges.js +2 -1
  43. package/dist/db/pg/schema/index.d.ts +362 -15
  44. package/dist/db/pg/sql/0010_user_group_membership_roles.sql +16 -0
  45. package/dist/db/pg/sql/0011_drop_data_migrations.sql +1 -0
  46. package/dist/db/pg/sql/0012_posts_last_activity_at.sql +5 -0
  47. package/dist/db/pg/sql/0013_add_blocks_edge.sql +12 -0
  48. package/dist/db/pg/sql/0014_federation_datamodel.sql +59 -0
  49. package/dist/db/pg/sql/0015_profile_hashtags.sql +12 -0
  50. package/dist/db/pg/sql/meta/{0009_snapshot.json → 0015_snapshot.json} +291 -36
  51. package/dist/db/pg/sql/meta/_journal.json +43 -1
  52. package/dist/email/render.js +11 -3
  53. package/dist/events/index.d.ts +4 -0
  54. package/dist/events/index.js +1 -0
  55. package/dist/federation/activities.d.ts +17 -0
  56. package/dist/federation/activities.js +26 -0
  57. package/dist/federation/identity.d.ts +16 -0
  58. package/dist/federation/identity.js +52 -0
  59. package/dist/federation/index.d.ts +4 -0
  60. package/dist/federation/index.js +3 -0
  61. package/dist/federation/profiles.d.ts +3 -0
  62. package/dist/federation/profiles.js +14 -0
  63. package/dist/groups/finders.d.ts +2 -1
  64. package/dist/groups/helpers.d.ts +18 -0
  65. package/dist/groups/mapping.d.ts +4 -2
  66. package/dist/hashtags/finders.d.ts +6 -3
  67. package/dist/hashtags/finders.js +2 -0
  68. package/dist/hashtags/helpers.d.ts +8 -0
  69. package/dist/hashtags/helpers.js +4 -0
  70. package/dist/hashtags/index.d.ts +2 -0
  71. package/dist/hashtags/index.js +2 -0
  72. package/dist/hashtags/mutations.d.ts +3 -0
  73. package/dist/hashtags/mutations.js +13 -1
  74. package/dist/i18n/index.d.ts +1 -1
  75. package/dist/i18n/index.js +3 -1
  76. package/dist/i18n/pluginLocales.d.ts +6 -0
  77. package/dist/i18n/pluginLocales.js +15 -0
  78. package/dist/jams/export.d.ts +19 -0
  79. package/dist/jams/export.js +60 -0
  80. package/dist/jams/health.d.ts +8 -0
  81. package/dist/jams/health.js +46 -0
  82. package/dist/jams/helpers.d.ts +2 -2
  83. package/dist/jams/index.d.ts +2 -0
  84. package/dist/jams/index.js +23 -16
  85. package/dist/jams/jobs.js +1 -1
  86. package/dist/jams/livekit.d.ts +49 -4
  87. package/dist/jams/livekit.js +56 -39
  88. package/dist/jams/mapping.d.ts +3 -3
  89. package/dist/jams/mutations.d.ts +1 -1
  90. package/dist/jams/recording.d.ts +10 -0
  91. package/dist/jams/recording.js +32 -0
  92. package/dist/jams/token.d.ts +13 -1
  93. package/dist/jams/token.js +18 -7
  94. package/dist/jams/waitingRoom.js +1 -1
  95. package/dist/jobs/index.d.ts +1 -0
  96. package/dist/jobs/index.js +6 -1
  97. package/dist/jobs/jobDetail.js +1 -6
  98. package/dist/media/index.d.ts +1 -1
  99. package/dist/media/index.js +23 -8
  100. package/dist/media/processing.js +18 -7
  101. package/dist/notifications/defaultNotifications/follow/index.js +2 -2
  102. package/dist/notifications/defaultNotifications/index.js +4 -0
  103. package/dist/notifications/defaultNotifications/newGroupPost/index.js +12 -6
  104. package/dist/notifications/defaultNotifications/pollEnded/index.d.ts +19 -0
  105. package/dist/notifications/defaultNotifications/pollEnded/index.js +39 -0
  106. package/dist/notifications/defaultNotifications/pollEnded/recipients.d.ts +3 -0
  107. package/dist/notifications/defaultNotifications/pollEnded/recipients.js +18 -0
  108. package/dist/notifications/defaultNotifications/rsvp/index.d.ts +6 -1
  109. package/dist/notifications/defaultNotifications/rsvp/index.js +7 -0
  110. package/dist/notifications/defaultNotifications/rsvpCanceled/index.d.ts +24 -0
  111. package/dist/notifications/defaultNotifications/rsvpCanceled/index.js +75 -0
  112. package/dist/notifications/defaultNotifications/rsvpCanceled/recipients.d.ts +4 -0
  113. package/dist/notifications/defaultNotifications/rsvpCanceled/recipients.js +11 -0
  114. package/dist/notifications/jobs.js +3 -1
  115. package/dist/notifications/mutations.js +4 -0
  116. package/dist/plugins/index.js +37 -1
  117. package/dist/plugins/install.d.ts +28 -9
  118. package/dist/plugins/install.js +281 -49
  119. package/dist/plugins/pluginAuth.d.ts +1 -1
  120. package/dist/plugins/pluginAuth.js +10 -6
  121. package/dist/posts/activity.d.ts +9 -0
  122. package/dist/posts/activity.js +35 -0
  123. package/dist/posts/contextClosure.d.ts +1 -9
  124. package/dist/posts/contextClosure.js +15 -44
  125. package/dist/posts/conversationQueries.d.ts +7 -0
  126. package/dist/posts/conversationQueries.js +76 -2
  127. package/dist/posts/eventAgenda.d.ts +1 -0
  128. package/dist/posts/eventAgenda.js +10 -4
  129. package/dist/posts/eventOccurrenceJobs.js +7 -2
  130. package/dist/posts/eventOccurrences.d.ts +6 -0
  131. package/dist/posts/eventOccurrences.js +21 -0
  132. package/dist/posts/finders.d.ts +15 -8
  133. package/dist/posts/finders.js +67 -18
  134. package/dist/posts/helpers/filters.js +13 -8
  135. package/dist/posts/helpers/index.d.ts +27 -14
  136. package/dist/posts/helpers/index.js +34 -14
  137. package/dist/posts/index.d.ts +5 -2
  138. package/dist/posts/index.js +5 -2
  139. package/dist/posts/mapping.d.ts +216 -13
  140. package/dist/posts/mapping.js +14 -13
  141. package/dist/posts/mutations.d.ts +440 -3
  142. package/dist/posts/mutations.js +155 -32
  143. package/dist/posts/pollEnd.d.ts +3 -0
  144. package/dist/posts/pollEnd.js +7 -0
  145. package/dist/posts/pollEndJobs.d.ts +8 -0
  146. package/dist/posts/pollEndJobs.js +49 -0
  147. package/dist/posts/replyClosure.d.ts +10 -0
  148. package/dist/posts/replyClosure.js +43 -0
  149. package/dist/posts/rsvpConfirmationEmail.js +14 -16
  150. package/dist/posts/threadPreview.d.ts +8 -0
  151. package/dist/posts/threadPreview.js +44 -0
  152. package/dist/posts/unseenCounts.js +4 -1
  153. package/dist/profileSettings/cache.js +22 -5
  154. package/dist/profileSettings/mapping.d.ts +2 -0
  155. package/dist/profiles/activityQueries.d.ts +5 -0
  156. package/dist/profiles/activityQueries.js +85 -0
  157. package/dist/profiles/activitySummary.d.ts +3 -0
  158. package/dist/profiles/activitySummary.js +87 -0
  159. package/dist/profiles/blocks.d.ts +12 -0
  160. package/dist/profiles/blocks.js +73 -0
  161. package/dist/profiles/cache.d.ts +1 -0
  162. package/dist/profiles/cache.js +19 -6
  163. package/dist/profiles/finders.d.ts +2 -1
  164. package/dist/profiles/finders.js +8 -3
  165. package/dist/profiles/helpers.d.ts +2 -0
  166. package/dist/profiles/index.d.ts +2 -0
  167. package/dist/profiles/index.js +2 -0
  168. package/dist/profiles/mapping.d.ts +10 -5
  169. package/dist/profiles/mapping.js +13 -1
  170. package/dist/profiles/mutations.d.ts +8 -4
  171. package/dist/profiles/mutations.js +31 -2
  172. package/dist/redis/connection.d.ts +2 -0
  173. package/dist/redis/connection.js +25 -6
  174. package/dist/roles/index.d.ts +1 -1
  175. package/dist/roles/index.js +1 -1
  176. package/dist/roles/mapping.d.ts +1 -0
  177. package/dist/roles/mutations.js +86 -3
  178. package/dist/search/mapping.d.ts +1 -1
  179. package/dist/search/mapping.js +6 -2
  180. package/dist/server/index.d.ts +18 -0
  181. package/dist/server/index.js +24 -12
  182. package/dist/server/stablePublicServerInfo.d.ts +17 -0
  183. package/dist/server/stablePublicServerInfo.js +37 -0
  184. package/dist/server/status.d.ts +25 -0
  185. package/dist/server/status.js +98 -0
  186. package/dist/stats/finders.d.ts +1 -17681
  187. package/dist/stats/finders.js +9 -5
  188. package/dist/stats/mapping.d.ts +0 -1
  189. package/dist/stats/mapping.js +0 -3
  190. package/package.json +4 -5
  191. package/dist/db/migration/detect.d.ts +0 -3
  192. package/dist/db/migration/detect.js +0 -33
  193. package/dist/db/migration/importPostgres.d.ts +0 -3
  194. package/dist/db/migration/importPostgres.js +0 -18
  195. package/dist/db/migration/transform.d.ts +0 -20
  196. package/dist/db/migration/transform.js +0 -232
  197. package/dist/db/migration/validate.d.ts +0 -18
  198. package/dist/db/migration/validate.js +0 -69
  199. package/dist/db/pg/sql/meta/0000_snapshot.json +0 -3380
  200. package/dist/db/pg/sql/meta/0004_snapshot.json +0 -4114
  201. package/dist/db/pg/sql/meta/0005_snapshot.json +0 -4179
  202. package/dist/db/pg/sql/meta/0006_snapshot.json +0 -4200
  203. package/dist/db/pg/sql/meta/0007_snapshot.json +0 -4179
  204. package/dist/mastodon/index.d.ts +0 -4
  205. package/dist/mastodon/index.js +0 -51
  206. package/dist/mastodon/types.d.ts +0 -7579
  207. package/dist/mastodon/types.js +0 -523
  208. package/dist/mastodon/typescript.d.ts +0 -1578
  209. package/dist/mastodon/typescript.js +0 -1
  210. package/dist/migration/index.d.ts +0 -4
  211. package/dist/migration/index.js +0 -4
  212. package/dist/roles/defaults.d.ts +0 -2
  213. package/dist/roles/defaults.js +0 -95
@@ -1,44 +1,3 @@
1
- export declare const dataMigrations: import("drizzle-orm/pg-core").PgTableWithColumns<{
2
- name: "data_migrations";
3
- schema: undefined;
4
- columns: {
5
- id: import("drizzle-orm/pg-core").PgColumn<{
6
- name: "id";
7
- tableName: "data_migrations";
8
- dataType: "string";
9
- columnType: "PgText";
10
- data: string;
11
- driverParam: string;
12
- notNull: true;
13
- hasDefault: false;
14
- isPrimaryKey: true;
15
- isAutoincrement: false;
16
- hasRuntimeDefault: false;
17
- enumValues: [string, ...string[]];
18
- baseColumn: never;
19
- identity: undefined;
20
- generated: undefined;
21
- }, {}, {}>;
22
- appliedAt: import("drizzle-orm/pg-core").PgColumn<{
23
- name: "applied_at";
24
- tableName: "data_migrations";
25
- dataType: "string";
26
- columnType: "PgTimestampString";
27
- data: string;
28
- driverParam: string;
29
- notNull: true;
30
- hasDefault: true;
31
- isPrimaryKey: false;
32
- isAutoincrement: false;
33
- hasRuntimeDefault: false;
34
- enumValues: undefined;
35
- baseColumn: never;
36
- identity: undefined;
37
- generated: undefined;
38
- }, {}, {}>;
39
- };
40
- dialect: "pg";
41
- }>;
42
1
  export declare const configs: import("drizzle-orm/pg-core").PgTableWithColumns<{
43
2
  name: "configs";
44
3
  schema: undefined;
@@ -523,6 +482,125 @@ export declare const profiles: import("drizzle-orm/pg-core").PgTableWithColumns<
523
482
  identity: undefined;
524
483
  generated: undefined;
525
484
  }, {}, {}>;
485
+ uri: import("drizzle-orm/pg-core").PgColumn<{
486
+ name: "uri";
487
+ tableName: "profiles";
488
+ dataType: "string";
489
+ columnType: "PgText";
490
+ data: string;
491
+ driverParam: string;
492
+ notNull: false;
493
+ hasDefault: false;
494
+ isPrimaryKey: false;
495
+ isAutoincrement: false;
496
+ hasRuntimeDefault: false;
497
+ enumValues: [string, ...string[]];
498
+ baseColumn: never;
499
+ identity: undefined;
500
+ generated: undefined;
501
+ }, {}, {}>;
502
+ inboxUrl: import("drizzle-orm/pg-core").PgColumn<{
503
+ name: "inbox_url";
504
+ tableName: "profiles";
505
+ dataType: "string";
506
+ columnType: "PgText";
507
+ data: string;
508
+ driverParam: string;
509
+ notNull: false;
510
+ hasDefault: false;
511
+ isPrimaryKey: false;
512
+ isAutoincrement: false;
513
+ hasRuntimeDefault: false;
514
+ enumValues: [string, ...string[]];
515
+ baseColumn: never;
516
+ identity: undefined;
517
+ generated: undefined;
518
+ }, {}, {}>;
519
+ sharedInboxUrl: import("drizzle-orm/pg-core").PgColumn<{
520
+ name: "shared_inbox_url";
521
+ tableName: "profiles";
522
+ dataType: "string";
523
+ columnType: "PgText";
524
+ data: string;
525
+ driverParam: string;
526
+ notNull: false;
527
+ hasDefault: false;
528
+ isPrimaryKey: false;
529
+ isAutoincrement: false;
530
+ hasRuntimeDefault: false;
531
+ enumValues: [string, ...string[]];
532
+ baseColumn: never;
533
+ identity: undefined;
534
+ generated: undefined;
535
+ }, {}, {}>;
536
+ publicKeyPem: import("drizzle-orm/pg-core").PgColumn<{
537
+ name: "public_key_pem";
538
+ tableName: "profiles";
539
+ dataType: "string";
540
+ columnType: "PgText";
541
+ data: string;
542
+ driverParam: string;
543
+ notNull: false;
544
+ hasDefault: false;
545
+ isPrimaryKey: false;
546
+ isAutoincrement: false;
547
+ hasRuntimeDefault: false;
548
+ enumValues: [string, ...string[]];
549
+ baseColumn: never;
550
+ identity: undefined;
551
+ generated: undefined;
552
+ }, {}, {}>;
553
+ privateKeyPem: import("drizzle-orm/pg-core").PgColumn<{
554
+ name: "private_key_pem";
555
+ tableName: "profiles";
556
+ dataType: "string";
557
+ columnType: "PgText";
558
+ data: string;
559
+ driverParam: string;
560
+ notNull: false;
561
+ hasDefault: false;
562
+ isPrimaryKey: false;
563
+ isAutoincrement: false;
564
+ hasRuntimeDefault: false;
565
+ enumValues: [string, ...string[]];
566
+ baseColumn: never;
567
+ identity: undefined;
568
+ generated: undefined;
569
+ }, {}, {}>;
570
+ keyId: import("drizzle-orm/pg-core").PgColumn<{
571
+ name: "key_id";
572
+ tableName: "profiles";
573
+ dataType: "string";
574
+ columnType: "PgText";
575
+ data: string;
576
+ driverParam: string;
577
+ notNull: false;
578
+ hasDefault: false;
579
+ isPrimaryKey: false;
580
+ isAutoincrement: false;
581
+ hasRuntimeDefault: false;
582
+ enumValues: [string, ...string[]];
583
+ baseColumn: never;
584
+ identity: undefined;
585
+ generated: undefined;
586
+ }, {}, {}>;
587
+ fetchedAt: import("drizzle-orm/pg-core").PgColumn<{
588
+ name: "fetched_at";
589
+ tableName: "profiles";
590
+ dataType: "string";
591
+ columnType: "PgTimestampString";
592
+ data: string;
593
+ driverParam: string;
594
+ notNull: false;
595
+ hasDefault: false;
596
+ isPrimaryKey: false;
597
+ isAutoincrement: false;
598
+ hasRuntimeDefault: false;
599
+ enumValues: undefined;
600
+ baseColumn: never;
601
+ identity: undefined;
602
+ generated: undefined;
603
+ }, {}, {}>;
526
604
  body: import("drizzle-orm/pg-core").PgColumn<{
527
605
  name: "body";
528
606
  tableName: "profiles";
@@ -1031,6 +1109,40 @@ export declare const posts: import("drizzle-orm/pg-core").PgTableWithColumns<{
1031
1109
  identity: undefined;
1032
1110
  generated: undefined;
1033
1111
  }, {}, {}>;
1112
+ uri: import("drizzle-orm/pg-core").PgColumn<{
1113
+ name: "uri";
1114
+ tableName: "posts";
1115
+ dataType: "string";
1116
+ columnType: "PgText";
1117
+ data: string;
1118
+ driverParam: string;
1119
+ notNull: false;
1120
+ hasDefault: false;
1121
+ isPrimaryKey: false;
1122
+ isAutoincrement: false;
1123
+ hasRuntimeDefault: false;
1124
+ enumValues: [string, ...string[]];
1125
+ baseColumn: never;
1126
+ identity: undefined;
1127
+ generated: undefined;
1128
+ }, {}, {}>;
1129
+ inReplyToUri: import("drizzle-orm/pg-core").PgColumn<{
1130
+ name: "in_reply_to_uri";
1131
+ tableName: "posts";
1132
+ dataType: "string";
1133
+ columnType: "PgText";
1134
+ data: string;
1135
+ driverParam: string;
1136
+ notNull: false;
1137
+ hasDefault: false;
1138
+ isPrimaryKey: false;
1139
+ isAutoincrement: false;
1140
+ hasRuntimeDefault: false;
1141
+ enumValues: [string, ...string[]];
1142
+ baseColumn: never;
1143
+ identity: undefined;
1144
+ generated: undefined;
1145
+ }, {}, {}>;
1034
1146
  body: import("drizzle-orm/pg-core").PgColumn<{
1035
1147
  name: "body";
1036
1148
  tableName: "posts";
@@ -1067,6 +1179,23 @@ export declare const posts: import("drizzle-orm/pg-core").PgTableWithColumns<{
1067
1179
  }, {}, {
1068
1180
  pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
1069
1181
  }>;
1182
+ lastActivityAt: import("drizzle-orm/pg-core").PgColumn<{
1183
+ name: "last_activity_at";
1184
+ tableName: "posts";
1185
+ dataType: "string";
1186
+ columnType: "PgTimestampString";
1187
+ data: string;
1188
+ driverParam: string;
1189
+ notNull: true;
1190
+ hasDefault: true;
1191
+ isPrimaryKey: false;
1192
+ isAutoincrement: false;
1193
+ hasRuntimeDefault: false;
1194
+ enumValues: undefined;
1195
+ baseColumn: never;
1196
+ identity: undefined;
1197
+ generated: undefined;
1198
+ }, {}, {}>;
1070
1199
  };
1071
1200
  dialect: "pg";
1072
1201
  }>;
@@ -2143,3 +2272,112 @@ export declare const eventOccurrences: import("drizzle-orm/pg-core").PgTableWith
2143
2272
  };
2144
2273
  dialect: "pg";
2145
2274
  }>;
2275
+ export declare const apActivities: import("drizzle-orm/pg-core").PgTableWithColumns<{
2276
+ name: "ap_activities";
2277
+ schema: undefined;
2278
+ columns: {
2279
+ uri: import("drizzle-orm/pg-core").PgColumn<{
2280
+ name: "uri";
2281
+ tableName: "ap_activities";
2282
+ dataType: "string";
2283
+ columnType: "PgText";
2284
+ data: string;
2285
+ driverParam: string;
2286
+ notNull: true;
2287
+ hasDefault: false;
2288
+ isPrimaryKey: true;
2289
+ isAutoincrement: false;
2290
+ hasRuntimeDefault: false;
2291
+ enumValues: [string, ...string[]];
2292
+ baseColumn: never;
2293
+ identity: undefined;
2294
+ generated: undefined;
2295
+ }, {}, {}>;
2296
+ type: import("drizzle-orm/pg-core").PgColumn<{
2297
+ name: "type";
2298
+ tableName: "ap_activities";
2299
+ dataType: "string";
2300
+ columnType: "PgText";
2301
+ data: string;
2302
+ driverParam: string;
2303
+ notNull: true;
2304
+ hasDefault: false;
2305
+ isPrimaryKey: false;
2306
+ isAutoincrement: false;
2307
+ hasRuntimeDefault: false;
2308
+ enumValues: [string, ...string[]];
2309
+ baseColumn: never;
2310
+ identity: undefined;
2311
+ generated: undefined;
2312
+ }, {}, {}>;
2313
+ actorUri: import("drizzle-orm/pg-core").PgColumn<{
2314
+ name: "actor_uri";
2315
+ tableName: "ap_activities";
2316
+ dataType: "string";
2317
+ columnType: "PgText";
2318
+ data: string;
2319
+ driverParam: string;
2320
+ notNull: true;
2321
+ hasDefault: false;
2322
+ isPrimaryKey: false;
2323
+ isAutoincrement: false;
2324
+ hasRuntimeDefault: false;
2325
+ enumValues: [string, ...string[]];
2326
+ baseColumn: never;
2327
+ identity: undefined;
2328
+ generated: undefined;
2329
+ }, {}, {}>;
2330
+ objectUri: import("drizzle-orm/pg-core").PgColumn<{
2331
+ name: "object_uri";
2332
+ tableName: "ap_activities";
2333
+ dataType: "string";
2334
+ columnType: "PgText";
2335
+ data: string;
2336
+ driverParam: string;
2337
+ notNull: false;
2338
+ hasDefault: false;
2339
+ isPrimaryKey: false;
2340
+ isAutoincrement: false;
2341
+ hasRuntimeDefault: false;
2342
+ enumValues: [string, ...string[]];
2343
+ baseColumn: never;
2344
+ identity: undefined;
2345
+ generated: undefined;
2346
+ }, {}, {}>;
2347
+ direction: import("drizzle-orm/pg-core").PgColumn<{
2348
+ name: "direction";
2349
+ tableName: "ap_activities";
2350
+ dataType: "string";
2351
+ columnType: "PgText";
2352
+ data: string;
2353
+ driverParam: string;
2354
+ notNull: true;
2355
+ hasDefault: false;
2356
+ isPrimaryKey: false;
2357
+ isAutoincrement: false;
2358
+ hasRuntimeDefault: false;
2359
+ enumValues: [string, ...string[]];
2360
+ baseColumn: never;
2361
+ identity: undefined;
2362
+ generated: undefined;
2363
+ }, {}, {}>;
2364
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
2365
+ name: "created_at";
2366
+ tableName: "ap_activities";
2367
+ dataType: "string";
2368
+ columnType: "PgTimestampString";
2369
+ data: string;
2370
+ driverParam: string;
2371
+ notNull: true;
2372
+ hasDefault: true;
2373
+ isPrimaryKey: false;
2374
+ isAutoincrement: false;
2375
+ hasRuntimeDefault: false;
2376
+ enumValues: undefined;
2377
+ baseColumn: never;
2378
+ identity: undefined;
2379
+ generated: undefined;
2380
+ }, {}, {}>;
2381
+ };
2382
+ dialect: "pg";
2383
+ }>;
@@ -1,17 +1,12 @@
1
1
  import { boolean, index, jsonb, pgTable, text, timestamp, uniqueIndex, uuid, } from 'drizzle-orm/pg-core';
2
2
  import { sql } from 'drizzle-orm';
3
3
  import { idColumn, modelTimestamps, tsvector } from './base.js';
4
- export const dataMigrations = pgTable('data_migrations', {
5
- id: text('id').primaryKey(),
6
- appliedAt: timestamp('applied_at', { withTimezone: true, mode: 'string' })
7
- .notNull()
8
- .default(sql `now()`),
9
- });
10
4
  export const configs = pgTable('configs', Object.assign({ key: text('key').primaryKey(), body: jsonb('body').notNull() }, modelTimestamps));
11
5
  export const i18nEntries = pgTable('i18n', Object.assign({ id: idColumn(), locale: text('locale').notNull(), namespace: text('namespace').notNull(), body: jsonb('body').notNull() }, modelTimestamps), (t) => [uniqueIndex('i18n_locale_namespace').on(t.locale, t.namespace)]);
12
6
  export const accounts = pgTable('accounts', Object.assign({ id: idColumn(), email: text('email').notNull(), passwordHash: text('password_hash').notNull(), emailValidated: boolean('email_validated').notNull().default(false), guest: boolean('guest') }, modelTimestamps), (t) => [uniqueIndex('accounts_email_unique').on(t.email)]);
13
- export const profiles = pgTable('profiles', Object.assign({ id: idColumn(), handle: text('handle').notNull(), activityPubDomain: text('activity_pub_domain'), type: text('type').notNull(), body: jsonb('body').notNull().default({}), searchVector: tsvector('search_vector') }, modelTimestamps), (t) => [
7
+ export const profiles = pgTable('profiles', Object.assign({ id: idColumn(), handle: text('handle').notNull(), activityPubDomain: text('activity_pub_domain'), type: text('type').notNull(), uri: text('uri'), inboxUrl: text('inbox_url'), sharedInboxUrl: text('shared_inbox_url'), publicKeyPem: text('public_key_pem'), privateKeyPem: text('private_key_pem'), keyId: text('key_id'), fetchedAt: timestamp('fetched_at', { withTimezone: true, mode: 'string' }), body: jsonb('body').notNull().default({}), searchVector: tsvector('search_vector') }, modelTimestamps), (t) => [
14
8
  uniqueIndex('profiles_handle_domain_unique').on(t.handle, t.activityPubDomain),
9
+ uniqueIndex('profiles_uri_unique').on(t.uri),
15
10
  index('profiles_search_vector_idx').using('gin', t.searchVector),
16
11
  ]);
17
12
  export const roles = pgTable('roles', Object.assign({ id: idColumn(), key: text('key').notNull(), isDefault: boolean('is_default').notNull().default(false), body: jsonb('body').notNull().default({}) }, modelTimestamps), (t) => [uniqueIndex('roles_key_unique').on(t.key)]);
@@ -20,11 +15,19 @@ export const groups = pgTable('groups', Object.assign({ id: idColumn(), handle:
20
15
  uniqueIndex('groups_handle_unique').on(t.handle),
21
16
  index('groups_search_vector_idx').using('gin', t.searchVector),
22
17
  ]);
23
- export const posts = pgTable('posts', Object.assign({ id: idColumn(), type: text('type').notNull(), visibility: text('visibility').notNull(), creatorId: text('creator_id').notNull(), body: jsonb('body').notNull().default({}), searchVector: tsvector('search_vector') }, modelTimestamps), (t) => [
18
+ export const posts = pgTable('posts', Object.assign({ id: idColumn(), type: text('type').notNull(), visibility: text('visibility').notNull(), creatorId: text('creator_id').notNull(), uri: text('uri'), inReplyToUri: text('in_reply_to_uri'), body: jsonb('body').notNull().default({}), searchVector: tsvector('search_vector'), lastActivityAt: timestamp('last_activity_at', {
19
+ withTimezone: true,
20
+ mode: 'string',
21
+ })
22
+ .notNull()
23
+ .default(sql `now()`) }, modelTimestamps), (t) => [
24
24
  index('posts_type_idx').on(t.type),
25
25
  index('posts_visibility_idx').on(t.visibility),
26
26
  index('posts_creator_idx').on(t.creatorId),
27
+ uniqueIndex('posts_uri_unique').on(t.uri),
28
+ index('posts_in_reply_to_uri_idx').on(t.inReplyToUri),
27
29
  index('posts_search_vector_idx').using('gin', t.searchVector),
30
+ index('posts_last_activity_id_idx').on(t.lastActivityAt, t.id),
28
31
  ]);
29
32
  export const notifications = pgTable('notifications', Object.assign({ id: idColumn(), profileId: text('profile_id').notNull(), body: jsonb('body').notNull().default({}) }, modelTimestamps), (t) => [index('notifications_profile_idx').on(t.profileId)]);
30
33
  export const reports = pgTable('reports', Object.assign({ id: idColumn(), body: jsonb('body').notNull().default({}) }, modelTimestamps));
@@ -59,3 +62,13 @@ export const eventOccurrences = pgTable('event_occurrences', {
59
62
  index('event_occurrences_start_idx').on(t.start),
60
63
  index('event_occurrences_post_idx').on(t.postId),
61
64
  ]);
65
+ export const apActivities = pgTable('ap_activities', {
66
+ uri: text('uri').primaryKey(),
67
+ type: text('type').notNull(),
68
+ actorUri: text('actor_uri').notNull(),
69
+ objectUri: text('object_uri'),
70
+ direction: text('direction').notNull(),
71
+ createdAt: timestamp('created_at', { withTimezone: true, mode: 'string' })
72
+ .notNull()
73
+ .default(sql `now()`),
74
+ });
@@ -107,7 +107,7 @@ export declare const follows: import("drizzle-orm/pg-core").PgTableWithColumns<{
107
107
  };
108
108
  dialect: "pg";
109
109
  }>;
110
- export declare const requestsFollow: import("drizzle-orm/pg-core").PgTableWithColumns<{
110
+ export declare const blocks: import("drizzle-orm/pg-core").PgTableWithColumns<{
111
111
  name: string;
112
112
  schema: undefined;
113
113
  columns: {
@@ -216,7 +216,7 @@ export declare const requestsFollow: import("drizzle-orm/pg-core").PgTableWithCo
216
216
  };
217
217
  dialect: "pg";
218
218
  }>;
219
- export declare const controls: import("drizzle-orm/pg-core").PgTableWithColumns<{
219
+ export declare const requestsFollow: import("drizzle-orm/pg-core").PgTableWithColumns<{
220
220
  name: string;
221
221
  schema: undefined;
222
222
  columns: {
@@ -325,7 +325,7 @@ export declare const controls: import("drizzle-orm/pg-core").PgTableWithColumns<
325
325
  };
326
326
  dialect: "pg";
327
327
  }>;
328
- export declare const mentions: import("drizzle-orm/pg-core").PgTableWithColumns<{
328
+ export declare const controls: import("drizzle-orm/pg-core").PgTableWithColumns<{
329
329
  name: string;
330
330
  schema: undefined;
331
331
  columns: {
@@ -434,7 +434,7 @@ export declare const mentions: import("drizzle-orm/pg-core").PgTableWithColumns<
434
434
  };
435
435
  dialect: "pg";
436
436
  }>;
437
- export declare const audience: import("drizzle-orm/pg-core").PgTableWithColumns<{
437
+ export declare const mentions: import("drizzle-orm/pg-core").PgTableWithColumns<{
438
438
  name: string;
439
439
  schema: undefined;
440
440
  columns: {
@@ -543,7 +543,7 @@ export declare const audience: import("drizzle-orm/pg-core").PgTableWithColumns<
543
543
  };
544
544
  dialect: "pg";
545
545
  }>;
546
- export declare const postHashtags: import("drizzle-orm/pg-core").PgTableWithColumns<{
546
+ export declare const audience: import("drizzle-orm/pg-core").PgTableWithColumns<{
547
547
  name: string;
548
548
  schema: undefined;
549
549
  columns: {
@@ -652,7 +652,7 @@ export declare const postHashtags: import("drizzle-orm/pg-core").PgTableWithColu
652
652
  };
653
653
  dialect: "pg";
654
654
  }>;
655
- export declare const entries: import("drizzle-orm/pg-core").PgTableWithColumns<{
655
+ export declare const postHashtags: import("drizzle-orm/pg-core").PgTableWithColumns<{
656
656
  name: string;
657
657
  schema: undefined;
658
658
  columns: {
@@ -761,7 +761,7 @@ export declare const entries: import("drizzle-orm/pg-core").PgTableWithColumns<{
761
761
  };
762
762
  dialect: "pg";
763
763
  }>;
764
- export declare const reactions: import("drizzle-orm/pg-core").PgTableWithColumns<{
764
+ export declare const entries: import("drizzle-orm/pg-core").PgTableWithColumns<{
765
765
  name: string;
766
766
  schema: undefined;
767
767
  columns: {
@@ -2724,3 +2724,112 @@ export declare const jamRecordings: import("drizzle-orm/pg-core").PgTableWithCol
2724
2724
  };
2725
2725
  dialect: "pg";
2726
2726
  }>;
2727
+ export declare const profileHashtags: import("drizzle-orm/pg-core").PgTableWithColumns<{
2728
+ name: string;
2729
+ schema: undefined;
2730
+ columns: {
2731
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
2732
+ name: "created_at";
2733
+ tableName: string;
2734
+ dataType: "string";
2735
+ columnType: "PgTimestampString";
2736
+ data: string;
2737
+ driverParam: string;
2738
+ notNull: true;
2739
+ hasDefault: true;
2740
+ isPrimaryKey: false;
2741
+ isAutoincrement: false;
2742
+ hasRuntimeDefault: false;
2743
+ enumValues: undefined;
2744
+ baseColumn: never;
2745
+ identity: undefined;
2746
+ generated: undefined;
2747
+ }, {}, {}>;
2748
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
2749
+ name: "updated_at";
2750
+ tableName: string;
2751
+ dataType: "string";
2752
+ columnType: "PgTimestampString";
2753
+ data: string;
2754
+ driverParam: string;
2755
+ notNull: true;
2756
+ hasDefault: true;
2757
+ isPrimaryKey: false;
2758
+ isAutoincrement: false;
2759
+ hasRuntimeDefault: false;
2760
+ enumValues: undefined;
2761
+ baseColumn: never;
2762
+ identity: undefined;
2763
+ generated: undefined;
2764
+ }, {}, {}>;
2765
+ id: import("drizzle-orm/pg-core").PgColumn<{
2766
+ name: "id";
2767
+ tableName: string;
2768
+ dataType: "string";
2769
+ columnType: "PgUUID";
2770
+ data: string;
2771
+ driverParam: string;
2772
+ notNull: true;
2773
+ hasDefault: false;
2774
+ isPrimaryKey: true;
2775
+ isAutoincrement: false;
2776
+ hasRuntimeDefault: false;
2777
+ enumValues: undefined;
2778
+ baseColumn: never;
2779
+ identity: undefined;
2780
+ generated: undefined;
2781
+ }, {}, {}>;
2782
+ fromId: import("drizzle-orm/pg-core").PgColumn<{
2783
+ name: "from_id";
2784
+ tableName: string;
2785
+ dataType: "string";
2786
+ columnType: "PgText";
2787
+ data: string;
2788
+ driverParam: string;
2789
+ notNull: true;
2790
+ hasDefault: false;
2791
+ isPrimaryKey: false;
2792
+ isAutoincrement: false;
2793
+ hasRuntimeDefault: false;
2794
+ enumValues: [string, ...string[]];
2795
+ baseColumn: never;
2796
+ identity: undefined;
2797
+ generated: undefined;
2798
+ }, {}, {}>;
2799
+ toId: import("drizzle-orm/pg-core").PgColumn<{
2800
+ name: "to_id";
2801
+ tableName: string;
2802
+ dataType: "string";
2803
+ columnType: "PgText";
2804
+ data: string;
2805
+ driverParam: string;
2806
+ notNull: true;
2807
+ hasDefault: false;
2808
+ isPrimaryKey: false;
2809
+ isAutoincrement: false;
2810
+ hasRuntimeDefault: false;
2811
+ enumValues: [string, ...string[]];
2812
+ baseColumn: never;
2813
+ identity: undefined;
2814
+ generated: undefined;
2815
+ }, {}, {}>;
2816
+ body: import("drizzle-orm/pg-core").PgColumn<{
2817
+ name: "body";
2818
+ tableName: string;
2819
+ dataType: "json";
2820
+ columnType: "PgJsonb";
2821
+ data: unknown;
2822
+ driverParam: unknown;
2823
+ notNull: false;
2824
+ hasDefault: true;
2825
+ isPrimaryKey: false;
2826
+ isAutoincrement: false;
2827
+ hasRuntimeDefault: false;
2828
+ enumValues: undefined;
2829
+ baseColumn: never;
2830
+ identity: undefined;
2831
+ generated: undefined;
2832
+ }, {}, {}>;
2833
+ };
2834
+ dialect: "pg";
2835
+ }>;
@@ -8,13 +8,13 @@ const edgeTable = (name, uniqueFromTo = false) => pgTable(name, Object.assign({
8
8
  : []),
9
9
  ]);
10
10
  export const follows = edgeTable('follows', true);
11
+ export const blocks = edgeTable('blocks', true); // fromId blocker, toId blocked
11
12
  export const requestsFollow = edgeTable('requests_follow');
12
13
  export const controls = edgeTable('controls');
13
14
  export const mentions = edgeTable('mentions');
14
15
  export const audience = edgeTable('audience');
15
16
  export const postHashtags = edgeTable('post_hashtags');
16
17
  export const entries = edgeTable('entries');
17
- export const reactions = edgeTable('reactions', true);
18
18
  export const replyTo = edgeTable('reply_to', true);
19
19
  export const repost = edgeTable('repost', true);
20
20
  export const bookmarks = edgeTable('bookmarks');
@@ -33,3 +33,4 @@ export const isReportedObject = edgeTable('is_reported_object');
33
33
  export const inviteLinkCreators = edgeTable('invite_link_creators');
34
34
  export const inviteLinkRedeemers = edgeTable('invite_link_redeemers');
35
35
  export const jamRecordings = edgeTable('jam_recordings');
36
+ export const profileHashtags = edgeTable('profile_hashtags', true);