@openpeepshq/core 0.1.35 → 0.2.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/analytics/report.d.ts +1 -1
- package/dist/config/defaults/logs.d.ts +4 -0
- package/dist/config/defaults/logs.js +5 -0
- package/dist/config/index.d.ts +8 -0
- package/dist/db/pg/filters/posts.js +1 -1
- package/dist/groups/finders.d.ts +2 -2
- package/dist/groups/helpers.d.ts +6 -6
- package/dist/groups/mapping.d.ts +4 -4
- package/dist/jams/helpers.d.ts +2 -2
- package/dist/jams/livekit.d.ts +2 -2
- package/dist/jams/mapping.d.ts +10 -10
- package/dist/jams/mutations.d.ts +2 -2
- package/dist/log/index.d.ts +1 -0
- package/dist/log/index.js +1 -0
- package/dist/log/retention.d.ts +9 -0
- package/dist/log/retention.js +83 -0
- package/dist/log/retentionJobs.d.ts +17 -0
- package/dist/log/retentionJobs.js +50 -0
- package/dist/media/index.js +87 -10
- package/dist/mediaAttachments/mapping.d.ts +1 -1
- package/dist/notifications/defaultNotifications/jamModerator/index.js +25 -16
- package/dist/notifications/defaultNotifications/jamModerator/recipients.d.ts +2 -0
- package/dist/notifications/defaultNotifications/jamModerator/recipients.js +5 -0
- package/dist/notifications/defaultNotifications/newGroupPost/index.js +3 -3
- package/dist/notifications/defaultNotifications/newGroupPost/recipients.d.ts +5 -0
- package/dist/notifications/defaultNotifications/newGroupPost/recipients.js +23 -0
- package/dist/notifications/eventIcsAttachment.d.ts +6 -0
- package/dist/notifications/eventIcsAttachment.js +32 -0
- package/dist/notifications/helpers.d.ts +11 -1
- package/dist/notifications/helpers.js +26 -0
- package/dist/notifications/jobs.js +6 -0
- package/dist/notifications/mutations.js +9 -1
- package/dist/posts/activity.d.ts +1 -1
- package/dist/posts/activity.js +1 -1
- package/dist/posts/eventAgenda.js +4 -2
- package/dist/posts/finders.d.ts +6 -6
- package/dist/posts/helpers/index.d.ts +26 -26
- package/dist/posts/mapping.d.ts +98 -98
- package/dist/posts/mutations.d.ts +13 -13
- package/dist/posts/mutations.js +2 -4
- package/dist/profileSettings/mapping.d.ts +1 -0
- package/dist/profiles/mapping.d.ts +10 -10
- package/dist/reports/mapping.d.ts +1 -1
- package/dist/stats/mapping.d.ts +6 -6
- package/package.json +3 -3
- package/LICENSE +0 -674
|
@@ -32,7 +32,7 @@ export declare const retractReaction: (post: PostWithMeta, profile: Profile) =>
|
|
|
32
32
|
};
|
|
33
33
|
description?: string | undefined;
|
|
34
34
|
blurhash?: string | undefined;
|
|
35
|
-
status?: "failed" | "
|
|
35
|
+
status?: "failed" | "ready" | "processing" | undefined;
|
|
36
36
|
error?: string | undefined;
|
|
37
37
|
}[] | undefined;
|
|
38
38
|
customEmojis?: {
|
|
@@ -69,7 +69,7 @@ export declare const retractReaction: (post: PostWithMeta, profile: Profile) =>
|
|
|
69
69
|
};
|
|
70
70
|
description?: string | undefined;
|
|
71
71
|
blurhash?: string | undefined;
|
|
72
|
-
status?: "failed" | "
|
|
72
|
+
status?: "failed" | "ready" | "processing" | undefined;
|
|
73
73
|
error?: string | undefined;
|
|
74
74
|
}[] | undefined;
|
|
75
75
|
customEmojis?: {
|
|
@@ -107,7 +107,7 @@ export declare const retractReaction: (post: PostWithMeta, profile: Profile) =>
|
|
|
107
107
|
};
|
|
108
108
|
description?: string | undefined;
|
|
109
109
|
blurhash?: string | undefined;
|
|
110
|
-
status?: "failed" | "
|
|
110
|
+
status?: "failed" | "ready" | "processing" | undefined;
|
|
111
111
|
error?: string | undefined;
|
|
112
112
|
}[] | undefined;
|
|
113
113
|
customEmojis?: {
|
|
@@ -189,7 +189,7 @@ export declare const retractReaction: (post: PostWithMeta, profile: Profile) =>
|
|
|
189
189
|
};
|
|
190
190
|
description?: string | undefined;
|
|
191
191
|
blurhash?: string | undefined;
|
|
192
|
-
status?: "failed" | "
|
|
192
|
+
status?: "failed" | "ready" | "processing" | undefined;
|
|
193
193
|
error?: string | undefined;
|
|
194
194
|
}[] | undefined;
|
|
195
195
|
customEmojis?: {
|
|
@@ -205,7 +205,7 @@ export declare const retractReaction: (post: PostWithMeta, profile: Profile) =>
|
|
|
205
205
|
} | {
|
|
206
206
|
type: "resource";
|
|
207
207
|
title: string;
|
|
208
|
-
resourceKind: "
|
|
208
|
+
resourceKind: "file" | "link" | "video" | "gallery" | "audio";
|
|
209
209
|
content?: string | undefined;
|
|
210
210
|
sensitive?: boolean | undefined;
|
|
211
211
|
spoilerText?: string | undefined;
|
|
@@ -226,7 +226,7 @@ export declare const retractReaction: (post: PostWithMeta, profile: Profile) =>
|
|
|
226
226
|
};
|
|
227
227
|
description?: string | undefined;
|
|
228
228
|
blurhash?: string | undefined;
|
|
229
|
-
status?: "failed" | "
|
|
229
|
+
status?: "failed" | "ready" | "processing" | undefined;
|
|
230
230
|
error?: string | undefined;
|
|
231
231
|
}[] | undefined;
|
|
232
232
|
customEmojis?: {
|
|
@@ -265,7 +265,7 @@ export declare const retractReaction: (post: PostWithMeta, profile: Profile) =>
|
|
|
265
265
|
};
|
|
266
266
|
description?: string | undefined;
|
|
267
267
|
blurhash?: string | undefined;
|
|
268
|
-
status?: "failed" | "
|
|
268
|
+
status?: "failed" | "ready" | "processing" | undefined;
|
|
269
269
|
error?: string | undefined;
|
|
270
270
|
}[] | undefined;
|
|
271
271
|
customEmojis?: {
|
|
@@ -302,7 +302,7 @@ export declare const retractReaction: (post: PostWithMeta, profile: Profile) =>
|
|
|
302
302
|
};
|
|
303
303
|
description?: string | undefined;
|
|
304
304
|
blurhash?: string | undefined;
|
|
305
|
-
status?: "failed" | "
|
|
305
|
+
status?: "failed" | "ready" | "processing" | undefined;
|
|
306
306
|
error?: string | undefined;
|
|
307
307
|
}[] | undefined;
|
|
308
308
|
customEmojis?: {
|
|
@@ -340,7 +340,7 @@ export declare const retractReaction: (post: PostWithMeta, profile: Profile) =>
|
|
|
340
340
|
};
|
|
341
341
|
description?: string | undefined;
|
|
342
342
|
blurhash?: string | undefined;
|
|
343
|
-
status?: "failed" | "
|
|
343
|
+
status?: "failed" | "ready" | "processing" | undefined;
|
|
344
344
|
error?: string | undefined;
|
|
345
345
|
}[] | undefined;
|
|
346
346
|
customEmojis?: {
|
|
@@ -422,7 +422,7 @@ export declare const retractReaction: (post: PostWithMeta, profile: Profile) =>
|
|
|
422
422
|
};
|
|
423
423
|
description?: string | undefined;
|
|
424
424
|
blurhash?: string | undefined;
|
|
425
|
-
status?: "failed" | "
|
|
425
|
+
status?: "failed" | "ready" | "processing" | undefined;
|
|
426
426
|
error?: string | undefined;
|
|
427
427
|
}[] | undefined;
|
|
428
428
|
customEmojis?: {
|
|
@@ -438,7 +438,7 @@ export declare const retractReaction: (post: PostWithMeta, profile: Profile) =>
|
|
|
438
438
|
} | {
|
|
439
439
|
type: "resource";
|
|
440
440
|
title: string;
|
|
441
|
-
resourceKind: "
|
|
441
|
+
resourceKind: "file" | "link" | "video" | "gallery" | "audio";
|
|
442
442
|
content?: string | undefined;
|
|
443
443
|
sensitive?: boolean | undefined;
|
|
444
444
|
spoilerText?: string | undefined;
|
|
@@ -459,7 +459,7 @@ export declare const retractReaction: (post: PostWithMeta, profile: Profile) =>
|
|
|
459
459
|
};
|
|
460
460
|
description?: string | undefined;
|
|
461
461
|
blurhash?: string | undefined;
|
|
462
|
-
status?: "failed" | "
|
|
462
|
+
status?: "failed" | "ready" | "processing" | undefined;
|
|
463
463
|
error?: string | undefined;
|
|
464
464
|
}[] | undefined;
|
|
465
465
|
customEmojis?: {
|
|
@@ -485,7 +485,7 @@ export declare const retractReaction: (post: PostWithMeta, profile: Profile) =>
|
|
|
485
485
|
} | {
|
|
486
486
|
type: "rsvp";
|
|
487
487
|
data: {
|
|
488
|
-
response: "
|
|
488
|
+
response: "no" | "yes" | "tentative" | "removed";
|
|
489
489
|
recurrenceId?: string | undefined;
|
|
490
490
|
};
|
|
491
491
|
} | {
|
package/dist/posts/mutations.js
CHANGED
|
@@ -137,15 +137,13 @@ export const updatePost = async (post, profile, data) => {
|
|
|
137
137
|
else {
|
|
138
138
|
await cancelPollEnd(post.id);
|
|
139
139
|
}
|
|
140
|
-
hub.emit('postUpdated', newPost);
|
|
140
|
+
hub.emit('postUpdated', newPost, previousEvent?.jam?.moderators ?? []);
|
|
141
141
|
return newPost;
|
|
142
142
|
};
|
|
143
143
|
export const reactToPost = async (post, profile, data) => allpeepDb().then(({ db }) => entryConnector(db, profile, post, {
|
|
144
144
|
type: 'reaction',
|
|
145
145
|
data: { reaction: data.reaction },
|
|
146
|
-
})
|
|
147
|
-
.then(() => bumpConversationActivity(db, post.id))
|
|
148
|
-
.then(() => hub.emit('reactionCreated', profile, post, {
|
|
146
|
+
}).then(() => hub.emit('reactionCreated', profile, post, {
|
|
149
147
|
type: 'reaction',
|
|
150
148
|
...data,
|
|
151
149
|
})));
|
|
@@ -14,6 +14,7 @@ export declare const profileSettingsMapping: import("../db/pg/map").Mapping<{
|
|
|
14
14
|
push: boolean;
|
|
15
15
|
email: boolean;
|
|
16
16
|
}> | undefined;
|
|
17
|
+
groupNotificationLevels?: Record<string, "off" | "all" | "mostRelevant"> | undefined;
|
|
17
18
|
jamSettings?: {
|
|
18
19
|
backgroundObfuscation?: {
|
|
19
20
|
type: "blur";
|
|
@@ -5,7 +5,7 @@ export declare const baseProfileRelations: Relation[];
|
|
|
5
5
|
export declare const profileRelations: Relation[];
|
|
6
6
|
export declare const baseProfilesMapping: import("../db/pg/map").Mapping<{
|
|
7
7
|
handle: string;
|
|
8
|
-
type: "
|
|
8
|
+
type: "local" | "guest" | "federated";
|
|
9
9
|
deletedHandle?: string | undefined;
|
|
10
10
|
avatar?: string | null | undefined;
|
|
11
11
|
header?: string | null | undefined;
|
|
@@ -35,7 +35,7 @@ export declare const baseProfilesMapping: import("../db/pg/map").Mapping<{
|
|
|
35
35
|
guestData?: {
|
|
36
36
|
email?: string | undefined;
|
|
37
37
|
resource?: {
|
|
38
|
-
type: "
|
|
38
|
+
type: "db" | "jams" | "profiles" | "self" | "*" | "notifications" | "posts" | "groups" | "reports" | "webhooks" | "analytics" | "render";
|
|
39
39
|
id?: string | undefined;
|
|
40
40
|
} | undefined;
|
|
41
41
|
} | undefined;
|
|
@@ -44,7 +44,7 @@ export declare const baseProfilesMapping: import("../db/pg/map").Mapping<{
|
|
|
44
44
|
/** Lean mapping for public search results (memberships only). */
|
|
45
45
|
export declare const publicProfilesSearchMapping: import("../db/pg/map").Mapping<{
|
|
46
46
|
handle: string;
|
|
47
|
-
type: "
|
|
47
|
+
type: "local" | "guest" | "federated";
|
|
48
48
|
deletedHandle?: string | undefined;
|
|
49
49
|
avatar?: string | null | undefined;
|
|
50
50
|
header?: string | null | undefined;
|
|
@@ -74,7 +74,7 @@ export declare const publicProfilesSearchMapping: import("../db/pg/map").Mapping
|
|
|
74
74
|
guestData?: {
|
|
75
75
|
email?: string | undefined;
|
|
76
76
|
resource?: {
|
|
77
|
-
type: "
|
|
77
|
+
type: "db" | "jams" | "profiles" | "self" | "*" | "notifications" | "posts" | "groups" | "reports" | "webhooks" | "analytics" | "render";
|
|
78
78
|
id?: string | undefined;
|
|
79
79
|
} | undefined;
|
|
80
80
|
} | undefined;
|
|
@@ -86,7 +86,7 @@ export declare const publicProfilesSearchMapping: import("../db/pg/map").Mapping
|
|
|
86
86
|
*/
|
|
87
87
|
export declare const publicProfilesMapping: import("../db/pg/map").Mapping<{
|
|
88
88
|
handle: string;
|
|
89
|
-
type: "
|
|
89
|
+
type: "local" | "guest" | "federated";
|
|
90
90
|
deletedHandle?: string | undefined;
|
|
91
91
|
avatar?: string | null | undefined;
|
|
92
92
|
header?: string | null | undefined;
|
|
@@ -116,7 +116,7 @@ export declare const publicProfilesMapping: import("../db/pg/map").Mapping<{
|
|
|
116
116
|
guestData?: {
|
|
117
117
|
email?: string | undefined;
|
|
118
118
|
resource?: {
|
|
119
|
-
type: "
|
|
119
|
+
type: "db" | "jams" | "profiles" | "self" | "*" | "notifications" | "posts" | "groups" | "reports" | "webhooks" | "analytics" | "render";
|
|
120
120
|
id?: string | undefined;
|
|
121
121
|
} | undefined;
|
|
122
122
|
} | undefined;
|
|
@@ -124,7 +124,7 @@ export declare const publicProfilesMapping: import("../db/pg/map").Mapping<{
|
|
|
124
124
|
}, ProfileWithMeta, ProfileWithMeta>;
|
|
125
125
|
export declare const profilesMapping: import("../db/pg/map").Mapping<{
|
|
126
126
|
handle: string;
|
|
127
|
-
type: "
|
|
127
|
+
type: "local" | "guest" | "federated";
|
|
128
128
|
deletedHandle?: string | undefined;
|
|
129
129
|
avatar?: string | null | undefined;
|
|
130
130
|
header?: string | null | undefined;
|
|
@@ -154,7 +154,7 @@ export declare const profilesMapping: import("../db/pg/map").Mapping<{
|
|
|
154
154
|
guestData?: {
|
|
155
155
|
email?: string | undefined;
|
|
156
156
|
resource?: {
|
|
157
|
-
type: "
|
|
157
|
+
type: "db" | "jams" | "profiles" | "self" | "*" | "notifications" | "posts" | "groups" | "reports" | "webhooks" | "analytics" | "render";
|
|
158
158
|
id?: string | undefined;
|
|
159
159
|
} | undefined;
|
|
160
160
|
} | undefined;
|
|
@@ -162,7 +162,7 @@ export declare const profilesMapping: import("../db/pg/map").Mapping<{
|
|
|
162
162
|
}, ProfileWithMeta, ProfileWithMeta>;
|
|
163
163
|
export declare const membersExportMapping: import("../db/pg/map").Mapping<{
|
|
164
164
|
handle: string;
|
|
165
|
-
type: "
|
|
165
|
+
type: "local" | "guest" | "federated";
|
|
166
166
|
deletedHandle?: string | undefined;
|
|
167
167
|
avatar?: string | null | undefined;
|
|
168
168
|
header?: string | null | undefined;
|
|
@@ -192,7 +192,7 @@ export declare const membersExportMapping: import("../db/pg/map").Mapping<{
|
|
|
192
192
|
guestData?: {
|
|
193
193
|
email?: string | undefined;
|
|
194
194
|
resource?: {
|
|
195
|
-
type: "
|
|
195
|
+
type: "db" | "jams" | "profiles" | "self" | "*" | "notifications" | "posts" | "groups" | "reports" | "webhooks" | "analytics" | "render";
|
|
196
196
|
id?: string | undefined;
|
|
197
197
|
} | undefined;
|
|
198
198
|
} | undefined;
|
|
@@ -5,5 +5,5 @@ export declare const reportsMapping: import("../db/pg/map").Mapping<{
|
|
|
5
5
|
uri?: string | undefined;
|
|
6
6
|
forward?: boolean | undefined;
|
|
7
7
|
ruleIds?: number[] | undefined;
|
|
8
|
-
resolution?: "
|
|
8
|
+
resolution?: "remove" | "warn" | "ignore" | "other" | "ban" | undefined;
|
|
9
9
|
}, ReportWithMeta, ReportWithMeta>;
|
package/dist/stats/mapping.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export declare const postsWithActivityScoreMapping: import("../db/pg/map").Mappi
|
|
|
27
27
|
};
|
|
28
28
|
description?: string | undefined;
|
|
29
29
|
blurhash?: string | undefined;
|
|
30
|
-
status?: "failed" | "
|
|
30
|
+
status?: "failed" | "ready" | "processing" | undefined;
|
|
31
31
|
error?: string | undefined;
|
|
32
32
|
}[] | undefined;
|
|
33
33
|
customEmojis?: {
|
|
@@ -64,7 +64,7 @@ export declare const postsWithActivityScoreMapping: import("../db/pg/map").Mappi
|
|
|
64
64
|
};
|
|
65
65
|
description?: string | undefined;
|
|
66
66
|
blurhash?: string | undefined;
|
|
67
|
-
status?: "failed" | "
|
|
67
|
+
status?: "failed" | "ready" | "processing" | undefined;
|
|
68
68
|
error?: string | undefined;
|
|
69
69
|
}[] | undefined;
|
|
70
70
|
customEmojis?: {
|
|
@@ -102,7 +102,7 @@ export declare const postsWithActivityScoreMapping: import("../db/pg/map").Mappi
|
|
|
102
102
|
};
|
|
103
103
|
description?: string | undefined;
|
|
104
104
|
blurhash?: string | undefined;
|
|
105
|
-
status?: "failed" | "
|
|
105
|
+
status?: "failed" | "ready" | "processing" | undefined;
|
|
106
106
|
error?: string | undefined;
|
|
107
107
|
}[] | undefined;
|
|
108
108
|
customEmojis?: {
|
|
@@ -184,7 +184,7 @@ export declare const postsWithActivityScoreMapping: import("../db/pg/map").Mappi
|
|
|
184
184
|
};
|
|
185
185
|
description?: string | undefined;
|
|
186
186
|
blurhash?: string | undefined;
|
|
187
|
-
status?: "failed" | "
|
|
187
|
+
status?: "failed" | "ready" | "processing" | undefined;
|
|
188
188
|
error?: string | undefined;
|
|
189
189
|
}[] | undefined;
|
|
190
190
|
customEmojis?: {
|
|
@@ -200,7 +200,7 @@ export declare const postsWithActivityScoreMapping: import("../db/pg/map").Mappi
|
|
|
200
200
|
} | {
|
|
201
201
|
type: "resource";
|
|
202
202
|
title: string;
|
|
203
|
-
resourceKind: "
|
|
203
|
+
resourceKind: "file" | "link" | "video" | "gallery" | "audio";
|
|
204
204
|
content?: string | undefined;
|
|
205
205
|
sensitive?: boolean | undefined;
|
|
206
206
|
spoilerText?: string | undefined;
|
|
@@ -221,7 +221,7 @@ export declare const postsWithActivityScoreMapping: import("../db/pg/map").Mappi
|
|
|
221
221
|
};
|
|
222
222
|
description?: string | undefined;
|
|
223
223
|
blurhash?: string | undefined;
|
|
224
|
-
status?: "failed" | "
|
|
224
|
+
status?: "failed" | "ready" | "processing" | undefined;
|
|
225
225
|
error?: string | undefined;
|
|
226
226
|
}[] | undefined;
|
|
227
227
|
customEmojis?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openpeepshq/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"dependencies": {
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"type-fest": "^4.31.0",
|
|
38
38
|
"uuidv7": "^1.0.2",
|
|
39
39
|
"web-push": "^3.6.7",
|
|
40
|
-
"@openpeepshq/common": "0.
|
|
40
|
+
"@openpeepshq/common": "0.4.0",
|
|
41
41
|
"@openpeepshq/fetch-client": "^0.2.1",
|
|
42
|
-
"@openpeepshq/i18n": "^0.
|
|
42
|
+
"@openpeepshq/i18n": "^0.2.0",
|
|
43
43
|
"@openpeepshq/geocoder": "^0.1.2"
|
|
44
44
|
},
|
|
45
45
|
"main": "dist/index.js",
|