@openpeepshq/core 0.1.32 → 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 (261) hide show
  1. package/dist/accessTokens/helpers.d.ts +2 -2
  2. package/dist/accessTokens/tokens.js +14 -7
  3. package/dist/accounts/mutations.d.ts +2 -2
  4. package/dist/accounts/mutations.js +33 -35
  5. package/dist/analytics/cache.js +12 -7
  6. package/dist/analytics/compile.js +16 -10
  7. package/dist/analytics/pdfReport.d.ts +1 -0
  8. package/dist/analytics/pdfReport.js +5 -4
  9. package/dist/analytics/privacy.d.ts +18 -0
  10. package/dist/analytics/privacy.js +10 -0
  11. package/dist/analytics/read.js +75 -19
  12. package/dist/analytics/report.d.ts +21 -1
  13. package/dist/analytics/report.js +9 -2
  14. package/dist/backups/index.js +78 -15
  15. package/dist/backups/metadata.d.ts +8 -2
  16. package/dist/backups/metadata.js +6 -2
  17. package/dist/config/defaults/capabilities.js +13 -2
  18. package/dist/config/defaults/community.js +7 -9
  19. package/dist/config/defaults/core.d.ts +1 -1
  20. package/dist/config/defaults/core.js +3 -0
  21. package/dist/config/defaults/db.d.ts +0 -2
  22. package/dist/config/defaults/db.js +0 -2
  23. package/dist/config/index.d.ts +25 -3
  24. package/dist/config/index.js +7 -1
  25. package/dist/db/helpers.d.ts +7 -28
  26. package/dist/db/helpers.js +30 -152
  27. package/dist/db/index.d.ts +3 -1
  28. package/dist/db/index.js +5 -0
  29. package/dist/db/init.js +2 -2
  30. package/dist/db/migration/importCollections.d.ts +15 -10
  31. package/dist/db/migration/importCollections.js +121 -155
  32. package/dist/db/migration/shared.d.ts +2 -37
  33. package/dist/db/migration/shared.js +2 -59
  34. package/dist/db/pg/client.js +4 -0
  35. package/dist/db/pg/collections.d.ts +2 -2
  36. package/dist/db/pg/collections.js +2 -2
  37. package/dist/db/pg/filters/edges.d.ts +1 -1
  38. package/dist/db/pg/filters/edges.js +1 -1
  39. package/dist/db/pg/filters/posts.d.ts +11 -0
  40. package/dist/db/pg/filters/posts.js +37 -3
  41. package/dist/db/pg/filters/profiles.d.ts +1 -0
  42. package/dist/db/pg/filters/profiles.js +2 -1
  43. package/dist/db/pg/map/filters.js +37 -2
  44. package/dist/db/pg/map/mutations.js +13 -8
  45. package/dist/db/pg/map/registry.d.ts +5 -0
  46. package/dist/db/pg/map/registry.js +64 -24
  47. package/dist/db/pg/map/relations.d.ts +1 -1
  48. package/dist/db/pg/map/relations.js +98 -46
  49. package/dist/db/pg/migrate.d.ts +22 -0
  50. package/dist/db/pg/migrate.js +88 -2
  51. package/dist/db/pg/queries/activity.js +3 -3
  52. package/dist/db/pg/queries/sorts.d.ts +1 -0
  53. package/dist/db/pg/queries/sorts.js +4 -0
  54. package/dist/db/pg/schema/documents.d.ts +422 -41
  55. package/dist/db/pg/schema/documents.js +43 -9
  56. package/dist/db/pg/schema/edges.d.ts +117 -7
  57. package/dist/db/pg/schema/edges.js +4 -2
  58. package/dist/db/pg/schema/index.d.ts +505 -15
  59. package/dist/db/pg/sql/0007_shallow_oracle.sql +3 -0
  60. package/dist/db/pg/sql/0008_group_owner_roles.sql +31 -0
  61. package/dist/db/pg/sql/0009_event_occurrences.sql +26 -0
  62. package/dist/db/pg/sql/0010_user_group_membership_roles.sql +16 -0
  63. package/dist/db/pg/sql/0011_drop_data_migrations.sql +1 -0
  64. package/dist/db/pg/sql/0012_posts_last_activity_at.sql +5 -0
  65. package/dist/db/pg/sql/0013_add_blocks_edge.sql +12 -0
  66. package/dist/db/pg/sql/0014_federation_datamodel.sql +59 -0
  67. package/dist/db/pg/sql/0015_profile_hashtags.sql +12 -0
  68. package/dist/db/pg/sql/meta/{0006_snapshot.json → 0015_snapshot.json} +393 -39
  69. package/dist/db/pg/sql/meta/_journal.json +64 -1
  70. package/dist/db/replaceOrigin.js +6 -0
  71. package/dist/db/types.d.ts +0 -4
  72. package/dist/email/render.js +11 -3
  73. package/dist/events/index.d.ts +6 -1
  74. package/dist/events/index.js +55 -33
  75. package/dist/federation/activities.d.ts +17 -0
  76. package/dist/federation/activities.js +26 -0
  77. package/dist/federation/identity.d.ts +16 -0
  78. package/dist/federation/identity.js +52 -0
  79. package/dist/federation/index.d.ts +4 -0
  80. package/dist/federation/index.js +3 -0
  81. package/dist/federation/profiles.d.ts +3 -0
  82. package/dist/federation/profiles.js +14 -0
  83. package/dist/groups/finders.d.ts +3 -2
  84. package/dist/groups/helpers.d.ts +24 -6
  85. package/dist/groups/mapping.d.ts +6 -4
  86. package/dist/groups/mapping.js +2 -2
  87. package/dist/groups/mutations.js +1 -1
  88. package/dist/hashtags/finders.d.ts +6 -3
  89. package/dist/hashtags/finders.js +2 -0
  90. package/dist/hashtags/helpers.d.ts +8 -0
  91. package/dist/hashtags/helpers.js +4 -0
  92. package/dist/hashtags/index.d.ts +2 -0
  93. package/dist/hashtags/index.js +2 -0
  94. package/dist/hashtags/mutations.d.ts +3 -0
  95. package/dist/hashtags/mutations.js +13 -1
  96. package/dist/i18n/index.d.ts +1 -1
  97. package/dist/i18n/index.js +3 -1
  98. package/dist/i18n/pluginLocales.d.ts +6 -0
  99. package/dist/i18n/pluginLocales.js +15 -0
  100. package/dist/inviteLinks/helpers.d.ts +4 -4
  101. package/dist/jams/cache.d.ts +1 -1
  102. package/dist/jams/cache.js +2 -1
  103. package/dist/jams/export.d.ts +19 -0
  104. package/dist/jams/export.js +60 -0
  105. package/dist/jams/finders.d.ts +2 -1
  106. package/dist/jams/finders.js +18 -7
  107. package/dist/jams/health.d.ts +8 -0
  108. package/dist/jams/health.js +46 -0
  109. package/dist/jams/helpers.d.ts +6 -2
  110. package/dist/jams/index.d.ts +6 -3
  111. package/dist/jams/index.js +41 -27
  112. package/dist/jams/jobs.js +1 -1
  113. package/dist/jams/livekit.d.ts +93 -10
  114. package/dist/jams/livekit.js +151 -52
  115. package/dist/jams/mapping.d.ts +17 -7
  116. package/dist/jams/mutations.d.ts +3 -1
  117. package/dist/jams/recording.d.ts +10 -0
  118. package/dist/jams/recording.js +32 -0
  119. package/dist/jams/rtmp.d.ts +5 -0
  120. package/dist/jams/rtmp.js +8 -0
  121. package/dist/jams/token.d.ts +15 -3
  122. package/dist/jams/token.js +30 -16
  123. package/dist/jams/waitingRoom.d.ts +6 -6
  124. package/dist/jams/waitingRoom.js +24 -23
  125. package/dist/jobs/index.d.ts +1 -0
  126. package/dist/jobs/index.js +6 -1
  127. package/dist/jobs/jobDetail.js +1 -6
  128. package/dist/media/index.d.ts +1 -1
  129. package/dist/media/index.js +23 -8
  130. package/dist/media/processing.js +18 -7
  131. package/dist/notifications/defaultNotifications/follow/index.js +2 -2
  132. package/dist/notifications/defaultNotifications/groupMemberJoined/index.js +3 -1
  133. package/dist/notifications/defaultNotifications/groupMemberLeft/index.js +3 -1
  134. package/dist/notifications/defaultNotifications/index.js +4 -0
  135. package/dist/notifications/defaultNotifications/newGroupPost/index.js +12 -6
  136. package/dist/notifications/defaultNotifications/pollEnded/index.d.ts +19 -0
  137. package/dist/notifications/defaultNotifications/pollEnded/index.js +39 -0
  138. package/dist/notifications/defaultNotifications/pollEnded/recipients.d.ts +3 -0
  139. package/dist/notifications/defaultNotifications/pollEnded/recipients.js +18 -0
  140. package/dist/notifications/defaultNotifications/rsvp/index.d.ts +6 -1
  141. package/dist/notifications/defaultNotifications/rsvp/index.js +7 -0
  142. package/dist/notifications/defaultNotifications/rsvpCanceled/index.d.ts +24 -0
  143. package/dist/notifications/defaultNotifications/rsvpCanceled/index.js +75 -0
  144. package/dist/notifications/defaultNotifications/rsvpCanceled/recipients.d.ts +4 -0
  145. package/dist/notifications/defaultNotifications/rsvpCanceled/recipients.js +11 -0
  146. package/dist/notifications/helpers.js +6 -2
  147. package/dist/notifications/jobs.js +3 -1
  148. package/dist/notifications/mutations.js +4 -0
  149. package/dist/notifications/push.js +11 -4
  150. package/dist/plugins/helpers.d.ts +1 -0
  151. package/dist/plugins/helpers.js +1 -8
  152. package/dist/plugins/index.d.ts +5 -0
  153. package/dist/plugins/index.js +78 -5
  154. package/dist/plugins/install.d.ts +39 -0
  155. package/dist/plugins/install.js +455 -0
  156. package/dist/plugins/pluginAuth.d.ts +1 -1
  157. package/dist/plugins/pluginAuth.js +10 -6
  158. package/dist/plugins/state.d.ts +4 -0
  159. package/dist/plugins/state.js +29 -0
  160. package/dist/posts/activity.d.ts +9 -0
  161. package/dist/posts/activity.js +35 -0
  162. package/dist/posts/contextClosure.d.ts +1 -9
  163. package/dist/posts/contextClosure.js +15 -44
  164. package/dist/posts/conversationQueries.d.ts +7 -0
  165. package/dist/posts/conversationQueries.js +76 -2
  166. package/dist/posts/eventAgenda.d.ts +166 -0
  167. package/dist/posts/eventAgenda.js +126 -0
  168. package/dist/posts/eventOccurrenceJobs.d.ts +4 -0
  169. package/dist/posts/eventOccurrenceJobs.js +28 -0
  170. package/dist/posts/eventOccurrences.d.ts +10 -0
  171. package/dist/posts/eventOccurrences.js +61 -0
  172. package/dist/posts/finders.d.ts +47 -16
  173. package/dist/posts/finders.js +93 -62
  174. package/dist/posts/helpers/filters.js +14 -9
  175. package/dist/posts/helpers/index.d.ts +129 -30
  176. package/dist/posts/helpers/index.js +66 -33
  177. package/dist/posts/index.d.ts +7 -1
  178. package/dist/posts/index.js +7 -1
  179. package/dist/posts/mapping.d.ts +491 -13
  180. package/dist/posts/mapping.js +45 -10
  181. package/dist/posts/mutations.d.ts +441 -4
  182. package/dist/posts/mutations.js +177 -43
  183. package/dist/posts/pollEnd.d.ts +3 -0
  184. package/dist/posts/pollEnd.js +7 -0
  185. package/dist/posts/pollEndJobs.d.ts +8 -0
  186. package/dist/posts/pollEndJobs.js +49 -0
  187. package/dist/posts/replyClosure.d.ts +10 -0
  188. package/dist/posts/replyClosure.js +43 -0
  189. package/dist/posts/rsvpConfirmationEmail.js +14 -15
  190. package/dist/posts/threadPreview.d.ts +8 -0
  191. package/dist/posts/threadPreview.js +44 -0
  192. package/dist/posts/unseenCounts.d.ts +2 -0
  193. package/dist/posts/unseenCounts.js +28 -8
  194. package/dist/profileSettings/cache.js +22 -5
  195. package/dist/profileSettings/mapping.d.ts +2 -0
  196. package/dist/profiles/activityQueries.d.ts +5 -0
  197. package/dist/profiles/activityQueries.js +85 -0
  198. package/dist/profiles/activitySummary.d.ts +3 -0
  199. package/dist/profiles/activitySummary.js +87 -0
  200. package/dist/profiles/blocks.d.ts +12 -0
  201. package/dist/profiles/blocks.js +73 -0
  202. package/dist/profiles/cache.d.ts +4 -1
  203. package/dist/profiles/cache.js +28 -7
  204. package/dist/profiles/finders.d.ts +2 -1
  205. package/dist/profiles/finders.js +8 -3
  206. package/dist/profiles/helpers.d.ts +7 -5
  207. package/dist/profiles/index.d.ts +3 -1
  208. package/dist/profiles/index.js +3 -1
  209. package/dist/profiles/mapping.d.ts +10 -5
  210. package/dist/profiles/mapping.js +13 -1
  211. package/dist/profiles/mutations.d.ts +8 -4
  212. package/dist/profiles/mutations.js +42 -15
  213. package/dist/pushSubscriptions/helpers.d.ts +2 -2
  214. package/dist/pushSubscriptions/mutations.js +13 -1
  215. package/dist/redis/connection.d.ts +2 -0
  216. package/dist/redis/connection.js +25 -6
  217. package/dist/reports/helpers.d.ts +6 -6
  218. package/dist/roles/index.d.ts +1 -1
  219. package/dist/roles/index.js +1 -1
  220. package/dist/roles/mapping.d.ts +1 -0
  221. package/dist/roles/mutations.js +86 -3
  222. package/dist/search/mapping.d.ts +1 -1
  223. package/dist/search/mapping.js +6 -2
  224. package/dist/server/index.d.ts +19 -1
  225. package/dist/server/index.js +37 -18
  226. package/dist/server/stablePublicServerInfo.d.ts +17 -0
  227. package/dist/server/stablePublicServerInfo.js +37 -0
  228. package/dist/server/status.d.ts +25 -0
  229. package/dist/server/status.js +98 -0
  230. package/dist/stats/finders.d.ts +1 -16131
  231. package/dist/stats/finders.js +9 -5
  232. package/dist/stats/mapping.d.ts +21 -1
  233. package/dist/stats/mapping.js +0 -3
  234. package/package.json +6 -12
  235. package/dist/db/arango.d.ts +0 -2
  236. package/dist/db/arango.js +0 -110
  237. package/dist/db/migration/autoMigrate.d.ts +0 -2
  238. package/dist/db/migration/autoMigrate.js +0 -111
  239. package/dist/db/migration/cli.d.ts +0 -1
  240. package/dist/db/migration/cli.js +0 -56
  241. package/dist/db/migration/detect.d.ts +0 -6
  242. package/dist/db/migration/detect.js +0 -87
  243. package/dist/db/migration/exportArango.d.ts +0 -4
  244. package/dist/db/migration/exportArango.js +0 -80
  245. package/dist/db/migration/importPostgres.d.ts +0 -3
  246. package/dist/db/migration/importPostgres.js +0 -18
  247. package/dist/db/migration/transform.d.ts +0 -18
  248. package/dist/db/migration/transform.js +0 -209
  249. package/dist/db/migration/validate.d.ts +0 -18
  250. package/dist/db/migration/validate.js +0 -69
  251. package/dist/db/pg/sql/meta/0000_snapshot.json +0 -3380
  252. package/dist/db/pg/sql/meta/0004_snapshot.json +0 -4114
  253. package/dist/db/pg/sql/meta/0005_snapshot.json +0 -4179
  254. package/dist/mastodon/index.d.ts +0 -4
  255. package/dist/mastodon/index.js +0 -51
  256. package/dist/mastodon/types.d.ts +0 -7579
  257. package/dist/mastodon/types.js +0 -523
  258. package/dist/mastodon/typescript.d.ts +0 -1578
  259. package/dist/mastodon/typescript.js +0 -1
  260. package/dist/roles/defaults.d.ts +0 -2
  261. package/dist/roles/defaults.js +0 -94
@@ -48,15 +48,27 @@ const repostCountRelation = {
48
48
  softDelete: true,
49
49
  },
50
50
  };
51
- const reactionsRelation = {
52
- alias: 'reactions',
53
- vertexAlias: 'profile',
54
- edgeCollection: 'reactions',
51
+ /** Cap for embedded who-reposted lists on feed/detail posts. */
52
+ export const EMBEDDED_REPOSTS_LIMIT = 50;
53
+ /** Newest conversation descendants shown under a feed original. */
54
+ export const EMBEDDED_LATEST_REPLIES_LIMIT = 3;
55
+ /**
56
+ * Lean inbound wrappers for the embedded `reposts` preview. Only loads create
57
+ * entries (for the reposter profile) — not the full post graph used by
58
+ * `repostsOfPostRelation`. Cap + newest-first sort keep hot posts bounded.
59
+ */
60
+ const leanRepostsRelation = {
61
+ alias: 'reposts',
62
+ edgeCollection: 'repost',
55
63
  direction: 'INBOUND',
64
+ skipEdge: true,
56
65
  cardinality: 'many',
57
66
  mapping: {
58
- collection: 'profiles',
67
+ collection: 'posts',
59
68
  softDelete: true,
69
+ limit: EMBEDDED_REPOSTS_LIMIT,
70
+ sort: [['createdAt', 'DESC']],
71
+ postFilterRelations: [entriesRelation],
60
72
  },
61
73
  };
62
74
  const audienceRelation = {
@@ -94,7 +106,7 @@ const basePostFilterRelations = [
94
106
  groupRelation,
95
107
  replyCountRelation,
96
108
  repostCountRelation,
97
- reactionsRelation,
109
+ leanRepostsRelation,
98
110
  tagsRelation,
99
111
  mentionsRelation,
100
112
  ];
@@ -116,7 +128,12 @@ const basePostMapDataForProfile = (profile) => (Object.assign(Object.assign({},
116
128
  ...(basePostMapData.postFilterDerivedProperties || []),
117
129
  seenBatchByCurrentProfileDerivedProperty(profile),
118
130
  ] }));
119
- const replyPostMapData = Object.assign(Object.assign({}, preFilterMapData), { postFilterRelations: [entriesRelation] });
131
+ // Keep soft-deleted parents so replies can render a tombstone / deleted post.
132
+ const replyPostMapData = {
133
+ collection: 'posts',
134
+ softDelete: false,
135
+ postFilterRelations: [entriesRelation],
136
+ };
120
137
  const replyToRelation = {
121
138
  alias: 'replyTo',
122
139
  edgeCollection: 'replyTo',
@@ -125,6 +142,18 @@ const replyToRelation = {
125
142
  cardinality: 'one',
126
143
  mapping: replyPostMapData,
127
144
  };
145
+ export const threadPreviewMappingForProfile = (profile) => map({
146
+ collection: 'posts',
147
+ softDelete: true,
148
+ postFilterRelations: [entriesRelation],
149
+ postFilterDerivedProperties: [
150
+ {
151
+ alias: 'inReplyToId',
152
+ resolve: postDerived.inReplyToId,
153
+ },
154
+ ...(profile ? [seenBatchByCurrentProfileDerivedProperty(profile)] : []),
155
+ ],
156
+ });
128
157
  export const repostRelation = {
129
158
  alias: 'repost',
130
159
  edgeCollection: 'repost',
@@ -188,12 +217,16 @@ const contextPostFilterRelations = [
188
217
  groupRelation,
189
218
  replyCountRelation,
190
219
  repostCountRelation,
191
- reactionsRelation,
220
+ leanRepostsRelation,
192
221
  tagsRelation,
193
222
  mentionsRelation,
194
223
  replyToRelation,
195
224
  ];
196
- export const postContextMappingForProfile = (profile) => map(Object.assign(Object.assign({}, preFilterMapData), { postFilterRelations: contextPostFilterRelations, postFilterDerivedProperties: [
225
+ export const postContextMappingForProfile = (profile) => map({
226
+ collection: 'posts',
227
+ softDelete: false,
228
+ postFilterRelations: contextPostFilterRelations,
229
+ postFilterDerivedProperties: [
197
230
  {
198
231
  alias: 'inReplyToId',
199
232
  resolve: postDerived.inReplyToId,
@@ -203,7 +236,9 @@ export const postContextMappingForProfile = (profile) => map(Object.assign(Objec
203
236
  resolve: postDerived.groupId,
204
237
  },
205
238
  seenBatchByCurrentProfileDerivedProperty(profile),
206
- ], limit: 100 }));
239
+ ],
240
+ limit: 100,
241
+ });
207
242
  export const contextRelation = (depth, direction, contextMapping = postsMapping) => ({
208
243
  alias: 'context',
209
244
  edgeCollection: collectionInfos.repliesCollection.name,
@@ -1,4 +1,4 @@
1
- import { AuthorizationData, Answer, PostWithMeta, PostData, Profile, ReactionData, RSVP, RsvpResponse } from '@openpeepshq/common/types';
1
+ import { AuthorizationData, Answer, PostWithMeta, PostData, Profile, ProfileWithMeta, ReactionData, RsvpRequest, RsvpResponse } from '@openpeepshq/common/types';
2
2
  import { PostDataUnion } from '@openpeepshq/common/types';
3
3
  export declare const createPost: (data: PostDataUnion, profile: Profile, postData: PostData, relations?: {
4
4
  inReplyToId?: string | null;
@@ -8,7 +8,426 @@ export declare const createPost: (data: PostDataUnion, profile: Profile, postDat
8
8
  }) => Promise<PostWithMeta>;
9
9
  export declare const updatePost: (post: PostWithMeta, profile: Profile, data: PostDataUnion) => Promise<PostWithMeta>;
10
10
  export declare const reactToPost: (post: PostWithMeta, profile: Profile, data: ReactionData) => Promise<void>;
11
- export declare const retractReaction: (post: PostWithMeta, profile: Profile) => Promise<void>;
11
+ export declare const retractReaction: (post: PostWithMeta, profile: Profile) => Promise<import("../db/pg/map").WithId<({
12
+ type: "create";
13
+ data: {
14
+ type: "note";
15
+ content?: string | undefined;
16
+ sensitive?: boolean | undefined;
17
+ spoilerText?: string | undefined;
18
+ attachments?: {
19
+ type: string;
20
+ url: string;
21
+ previewUrl: string | null;
22
+ textUrl: null;
23
+ filename: string;
24
+ meta: {
25
+ usage?: string | undefined;
26
+ focus?: {
27
+ x: number;
28
+ y: number;
29
+ } | undefined;
30
+ mimetype?: string | undefined;
31
+ size?: number | undefined;
32
+ };
33
+ description?: string | undefined;
34
+ blurhash?: string | undefined;
35
+ status?: "failed" | "processing" | "ready" | undefined;
36
+ error?: string | undefined;
37
+ }[] | undefined;
38
+ customEmojis?: {
39
+ shortcode: string;
40
+ url: string;
41
+ staticUrl: string;
42
+ visibleInPicker: boolean;
43
+ category: string;
44
+ }[] | undefined;
45
+ language?: string | undefined;
46
+ } | {
47
+ type: "question";
48
+ options: {
49
+ content: string;
50
+ type: "note";
51
+ }[];
52
+ content?: string | undefined;
53
+ sensitive?: boolean | undefined;
54
+ spoilerText?: string | undefined;
55
+ attachments?: {
56
+ type: string;
57
+ url: string;
58
+ previewUrl: string | null;
59
+ textUrl: null;
60
+ filename: string;
61
+ meta: {
62
+ usage?: string | undefined;
63
+ focus?: {
64
+ x: number;
65
+ y: number;
66
+ } | undefined;
67
+ mimetype?: string | undefined;
68
+ size?: number | undefined;
69
+ };
70
+ description?: string | undefined;
71
+ blurhash?: string | undefined;
72
+ status?: "failed" | "processing" | "ready" | undefined;
73
+ error?: string | undefined;
74
+ }[] | undefined;
75
+ customEmojis?: {
76
+ shortcode: string;
77
+ url: string;
78
+ staticUrl: string;
79
+ visibleInPicker: boolean;
80
+ category: string;
81
+ }[] | undefined;
82
+ language?: string | undefined;
83
+ multiple?: boolean | undefined;
84
+ votersVisible?: boolean | undefined;
85
+ expiresAt?: string | undefined;
86
+ } | {
87
+ type: "event";
88
+ start: string;
89
+ wholeDay: boolean;
90
+ content?: string | undefined;
91
+ sensitive?: boolean | undefined;
92
+ spoilerText?: string | undefined;
93
+ attachments?: {
94
+ type: string;
95
+ url: string;
96
+ previewUrl: string | null;
97
+ textUrl: null;
98
+ filename: string;
99
+ meta: {
100
+ usage?: string | undefined;
101
+ focus?: {
102
+ x: number;
103
+ y: number;
104
+ } | undefined;
105
+ mimetype?: string | undefined;
106
+ size?: number | undefined;
107
+ };
108
+ description?: string | undefined;
109
+ blurhash?: string | undefined;
110
+ status?: "failed" | "processing" | "ready" | undefined;
111
+ error?: string | undefined;
112
+ }[] | undefined;
113
+ customEmojis?: {
114
+ shortcode: string;
115
+ url: string;
116
+ staticUrl: string;
117
+ visibleInPicker: boolean;
118
+ category: string;
119
+ }[] | undefined;
120
+ language?: string | undefined;
121
+ name?: string | undefined;
122
+ timeZone?: string | undefined;
123
+ image?: string | undefined;
124
+ end?: string | undefined;
125
+ maxAttendees?: number | undefined;
126
+ attendeeListPublic?: boolean | undefined;
127
+ moderators?: string[] | undefined;
128
+ jam?: {
129
+ moderators: string[];
130
+ videoEnabled: boolean;
131
+ type: "video-call";
132
+ speakers?: string[] | undefined;
133
+ presenters?: string[] | undefined;
134
+ audience?: string[] | undefined;
135
+ maxSpeakers?: number | undefined;
136
+ maxPresenters?: number | undefined;
137
+ maxAudience?: number | undefined;
138
+ waitingRoom?: boolean | undefined;
139
+ } | undefined;
140
+ physicalLocation?: {
141
+ text: string;
142
+ coordinates?: {
143
+ lat: number;
144
+ lng: number;
145
+ alt?: number | undefined;
146
+ } | undefined;
147
+ } | undefined;
148
+ url?: string | undefined;
149
+ recurrence?: {
150
+ freq: "DAILY" | "WEEKLY" | "MONTHLY";
151
+ interval?: number | undefined;
152
+ byDay?: ("MO" | "TU" | "WE" | "TH" | "FR" | "SA" | "SU")[] | undefined;
153
+ until?: string | undefined;
154
+ count?: number | undefined;
155
+ } | undefined;
156
+ exceptions?: {
157
+ recurrenceId: string;
158
+ cancelled?: boolean | undefined;
159
+ start?: string | undefined;
160
+ end?: string | undefined;
161
+ physicalLocation?: {
162
+ text: string;
163
+ coordinates?: {
164
+ lat: number;
165
+ lng: number;
166
+ alt?: number | undefined;
167
+ } | undefined;
168
+ } | undefined;
169
+ }[] | undefined;
170
+ } | {
171
+ type: "article";
172
+ content?: string | undefined;
173
+ sensitive?: boolean | undefined;
174
+ spoilerText?: string | undefined;
175
+ attachments?: {
176
+ type: string;
177
+ url: string;
178
+ previewUrl: string | null;
179
+ textUrl: null;
180
+ filename: string;
181
+ meta: {
182
+ usage?: string | undefined;
183
+ focus?: {
184
+ x: number;
185
+ y: number;
186
+ } | undefined;
187
+ mimetype?: string | undefined;
188
+ size?: number | undefined;
189
+ };
190
+ description?: string | undefined;
191
+ blurhash?: string | undefined;
192
+ status?: "failed" | "processing" | "ready" | undefined;
193
+ error?: string | undefined;
194
+ }[] | undefined;
195
+ customEmojis?: {
196
+ shortcode: string;
197
+ url: string;
198
+ staticUrl: string;
199
+ visibleInPicker: boolean;
200
+ category: string;
201
+ }[] | undefined;
202
+ language?: string | undefined;
203
+ image?: string | undefined;
204
+ title?: string | undefined;
205
+ };
206
+ } | {
207
+ type: "edit";
208
+ data: {
209
+ type: "note";
210
+ content?: string | undefined;
211
+ sensitive?: boolean | undefined;
212
+ spoilerText?: string | undefined;
213
+ attachments?: {
214
+ type: string;
215
+ url: string;
216
+ previewUrl: string | null;
217
+ textUrl: null;
218
+ filename: string;
219
+ meta: {
220
+ usage?: string | undefined;
221
+ focus?: {
222
+ x: number;
223
+ y: number;
224
+ } | undefined;
225
+ mimetype?: string | undefined;
226
+ size?: number | undefined;
227
+ };
228
+ description?: string | undefined;
229
+ blurhash?: string | undefined;
230
+ status?: "failed" | "processing" | "ready" | undefined;
231
+ error?: string | undefined;
232
+ }[] | undefined;
233
+ customEmojis?: {
234
+ shortcode: string;
235
+ url: string;
236
+ staticUrl: string;
237
+ visibleInPicker: boolean;
238
+ category: string;
239
+ }[] | undefined;
240
+ language?: string | undefined;
241
+ } | {
242
+ type: "question";
243
+ options: {
244
+ content: string;
245
+ type: "note";
246
+ }[];
247
+ content?: string | undefined;
248
+ sensitive?: boolean | undefined;
249
+ spoilerText?: string | undefined;
250
+ attachments?: {
251
+ type: string;
252
+ url: string;
253
+ previewUrl: string | null;
254
+ textUrl: null;
255
+ filename: string;
256
+ meta: {
257
+ usage?: string | undefined;
258
+ focus?: {
259
+ x: number;
260
+ y: number;
261
+ } | undefined;
262
+ mimetype?: string | undefined;
263
+ size?: number | undefined;
264
+ };
265
+ description?: string | undefined;
266
+ blurhash?: string | undefined;
267
+ status?: "failed" | "processing" | "ready" | undefined;
268
+ error?: string | undefined;
269
+ }[] | undefined;
270
+ customEmojis?: {
271
+ shortcode: string;
272
+ url: string;
273
+ staticUrl: string;
274
+ visibleInPicker: boolean;
275
+ category: string;
276
+ }[] | undefined;
277
+ language?: string | undefined;
278
+ multiple?: boolean | undefined;
279
+ votersVisible?: boolean | undefined;
280
+ expiresAt?: string | undefined;
281
+ } | {
282
+ type: "event";
283
+ start: string;
284
+ wholeDay: boolean;
285
+ content?: string | undefined;
286
+ sensitive?: boolean | undefined;
287
+ spoilerText?: string | undefined;
288
+ attachments?: {
289
+ type: string;
290
+ url: string;
291
+ previewUrl: string | null;
292
+ textUrl: null;
293
+ filename: string;
294
+ meta: {
295
+ usage?: string | undefined;
296
+ focus?: {
297
+ x: number;
298
+ y: number;
299
+ } | undefined;
300
+ mimetype?: string | undefined;
301
+ size?: number | undefined;
302
+ };
303
+ description?: string | undefined;
304
+ blurhash?: string | undefined;
305
+ status?: "failed" | "processing" | "ready" | undefined;
306
+ error?: string | undefined;
307
+ }[] | undefined;
308
+ customEmojis?: {
309
+ shortcode: string;
310
+ url: string;
311
+ staticUrl: string;
312
+ visibleInPicker: boolean;
313
+ category: string;
314
+ }[] | undefined;
315
+ language?: string | undefined;
316
+ name?: string | undefined;
317
+ timeZone?: string | undefined;
318
+ image?: string | undefined;
319
+ end?: string | undefined;
320
+ maxAttendees?: number | undefined;
321
+ attendeeListPublic?: boolean | undefined;
322
+ moderators?: string[] | undefined;
323
+ jam?: {
324
+ moderators: string[];
325
+ videoEnabled: boolean;
326
+ type: "video-call";
327
+ speakers?: string[] | undefined;
328
+ presenters?: string[] | undefined;
329
+ audience?: string[] | undefined;
330
+ maxSpeakers?: number | undefined;
331
+ maxPresenters?: number | undefined;
332
+ maxAudience?: number | undefined;
333
+ waitingRoom?: boolean | undefined;
334
+ } | undefined;
335
+ physicalLocation?: {
336
+ text: string;
337
+ coordinates?: {
338
+ lat: number;
339
+ lng: number;
340
+ alt?: number | undefined;
341
+ } | undefined;
342
+ } | undefined;
343
+ url?: string | undefined;
344
+ recurrence?: {
345
+ freq: "DAILY" | "WEEKLY" | "MONTHLY";
346
+ interval?: number | undefined;
347
+ byDay?: ("MO" | "TU" | "WE" | "TH" | "FR" | "SA" | "SU")[] | undefined;
348
+ until?: string | undefined;
349
+ count?: number | undefined;
350
+ } | undefined;
351
+ exceptions?: {
352
+ recurrenceId: string;
353
+ cancelled?: boolean | undefined;
354
+ start?: string | undefined;
355
+ end?: string | undefined;
356
+ physicalLocation?: {
357
+ text: string;
358
+ coordinates?: {
359
+ lat: number;
360
+ lng: number;
361
+ alt?: number | undefined;
362
+ } | undefined;
363
+ } | undefined;
364
+ }[] | undefined;
365
+ } | {
366
+ type: "article";
367
+ content?: string | undefined;
368
+ sensitive?: boolean | undefined;
369
+ spoilerText?: string | undefined;
370
+ attachments?: {
371
+ type: string;
372
+ url: string;
373
+ previewUrl: string | null;
374
+ textUrl: null;
375
+ filename: string;
376
+ meta: {
377
+ usage?: string | undefined;
378
+ focus?: {
379
+ x: number;
380
+ y: number;
381
+ } | undefined;
382
+ mimetype?: string | undefined;
383
+ size?: number | undefined;
384
+ };
385
+ description?: string | undefined;
386
+ blurhash?: string | undefined;
387
+ status?: "failed" | "processing" | "ready" | undefined;
388
+ error?: string | undefined;
389
+ }[] | undefined;
390
+ customEmojis?: {
391
+ shortcode: string;
392
+ url: string;
393
+ staticUrl: string;
394
+ visibleInPicker: boolean;
395
+ category: string;
396
+ }[] | undefined;
397
+ language?: string | undefined;
398
+ image?: string | undefined;
399
+ title?: string | undefined;
400
+ };
401
+ } | {
402
+ type: "delete";
403
+ data: any;
404
+ } | {
405
+ type: "answer";
406
+ data: {
407
+ selection: number[];
408
+ };
409
+ } | {
410
+ type: "rsvp";
411
+ data: {
412
+ response: "removed" | "no" | "yes" | "tentative";
413
+ recurrenceId?: string | undefined;
414
+ };
415
+ } | {
416
+ type: "reaction";
417
+ data: {
418
+ reaction: string;
419
+ };
420
+ uri?: string | undefined;
421
+ } | {
422
+ type: "unreaction";
423
+ data: {
424
+ reaction: string;
425
+ };
426
+ uri?: string | undefined;
427
+ }) & {
428
+ _from: string;
429
+ _to: string;
430
+ }>>;
12
431
  export declare const bookmarkPost: (post: PostWithMeta, profile: Profile) => Promise<void>;
13
432
  export declare const unbookmarkPost: (post: PostWithMeta, profile: Profile) => Promise<void>;
14
433
  export declare const markPostsSeen: (posts: {
@@ -17,5 +436,23 @@ export declare const markPostsSeen: (posts: {
17
436
  export declare const markGroupPostsSeen: (authData: AuthorizationData, groupId: string) => Promise<void>;
18
437
  export declare const deletePost: (post: PostWithMeta, profile: Profile) => Promise<import("@openpeepshq/common").DbPost | undefined>;
19
438
  export declare const vote: (profile: Profile, post: PostWithMeta, data: Answer) => Promise<void>;
20
- export declare const rsvpRespond: (profile: Profile, post: PostWithMeta, data: RSVP) => Promise<void>;
21
- export declare const rsvpManageByOrganizer: (actingProfile: Profile, targetProfile: Profile, post: PostWithMeta, response: Extract<RsvpResponse, "removed" | "yes">) => Promise<void>;
439
+ export declare const rsvpRespond: (profile: Profile, post: PostWithMeta, data: RsvpRequest) => Promise<void>;
440
+ export declare const rsvpManageByOrganizer: (actingProfile: Profile, targetProfile: Profile, post: PostWithMeta, response: Extract<RsvpResponse, "removed" | "yes">, recurrenceId?: string) => Promise<void>;
441
+ /**
442
+ * Remove a profile from a direct-message conversation thread.
443
+ *
444
+ * - Creates a system "X left" post (empty content) with the *remaining*
445
+ * participants as audience. The leaving user is excluded so future
446
+ * replies (which inherit the audience) won't notify them, and the thread
447
+ * disappears from their inbox.
448
+ * - MessageInThread detects the leave via the audience diff: the leaving
449
+ * user was in the previous post's audience but not in the left-post's.
450
+ * - The conversation post-creation endpoint detects leavers (author not in
451
+ * their own post's audience) to block further posting and exclude them
452
+ * from future replies' audience.
453
+ * - For 1:1 DMs (no remaining participants), removes the user from every
454
+ * post's audience so the thread vanishes from their inbox.
455
+ * - The leaving user can still find the thread in the "Archived" conversations
456
+ * tab, detected by posts they authored but are not in.
457
+ */
458
+ export declare const leaveConversation: (rootPost: PostWithMeta, profile: ProfileWithMeta) => Promise<void>;