@openpeepshq/common 0.1.45 → 0.1.46
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/lib/capabilitiesHelpers.d.ts +9 -7
- package/dist/lib/capabilitiesHelpers.js +17 -2
- package/dist/lib/eventIcs.d.ts +17 -0
- package/dist/lib/eventIcs.js +82 -0
- package/dist/lib/eventRecurrence.d.ts +2 -0
- package/dist/lib/eventRecurrence.js +9 -4
- package/dist/lib/eventTime.d.ts +7 -0
- package/dist/lib/eventTime.js +16 -0
- package/dist/lib/federationHosts.d.ts +3 -0
- package/dist/lib/federationHosts.js +17 -0
- package/dist/lib/feedCursor.d.ts +14 -0
- package/dist/lib/feedCursor.js +22 -0
- package/dist/lib/feedFormat.d.ts +12 -0
- package/dist/lib/feedFormat.js +14 -0
- package/dist/lib/index.d.ts +7 -0
- package/dist/lib/index.js +7 -0
- package/dist/lib/jamHelpers.d.ts +11 -2
- package/dist/lib/jamHelpers.js +37 -0
- package/dist/lib/legacyThemeRoot.d.ts +3 -0
- package/dist/lib/legacyThemeRoot.js +10 -0
- package/dist/lib/markdownHelpers.d.ts +8 -0
- package/dist/lib/markdownHelpers.js +32 -3
- package/dist/lib/postHelpers.d.ts +142 -3
- package/dist/lib/postHelpers.js +307 -4
- package/dist/lib/profileHelpers.d.ts +11 -0
- package/dist/lib/profileHelpers.js +31 -0
- package/dist/lib/reactions.d.ts +17 -0
- package/dist/lib/reactions.js +37 -0
- package/dist/lib/scopeHelpers.d.ts +31 -2
- package/dist/lib/scopeHelpers.js +37 -3
- package/dist/lib/ssoProviders.d.ts +72 -0
- package/dist/lib/ssoProviders.js +370 -0
- package/dist/lib/timeZone.d.ts +9 -0
- package/dist/lib/timeZone.js +44 -0
- package/dist/types/analytics.d.ts +20 -0
- package/dist/types/analytics.js +4 -0
- package/dist/types/api.d.ts +41799 -11853
- package/dist/types/api.js +52 -4
- package/dist/types/auth.d.ts +20 -6
- package/dist/types/capabilities.d.ts +15 -1
- package/dist/types/capabilities.js +51 -0
- package/dist/types/config.d.ts +96 -0
- package/dist/types/config.js +53 -4
- package/dist/types/db.d.ts +1155 -164
- package/dist/types/db.js +14 -0
- package/dist/types/export.d.ts +120 -0
- package/dist/types/export.js +7 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/internal.d.ts +2577 -524
- package/dist/types/internal.js +6 -0
- package/dist/types/models.d.ts +63 -7
- package/dist/types/models.js +39 -2
- package/dist/types/plugins.d.ts +22 -0
- package/dist/types/plugins.js +66 -0
- package/dist/types/roleDefaults.d.ts +31 -0
- package/dist/types/roleDefaults.js +110 -0
- package/dist/types/stats.d.ts +54606 -6065
- package/dist/types/stats.js +30 -0
- package/dist/types/utils.d.ts +2 -0
- package/dist/types/utils.js +1 -3
- package/package.json +1 -1
package/dist/types/stats.js
CHANGED
|
@@ -99,6 +99,11 @@ export const serverCountsSchema = z.object({
|
|
|
99
99
|
reactions: z.number(),
|
|
100
100
|
rsvps: z.number(),
|
|
101
101
|
});
|
|
102
|
+
export const hostResourceStatsSchema = z.object({
|
|
103
|
+
memoryUsedBytes: z.number().nonnegative(),
|
|
104
|
+
memoryTotalBytes: z.number().nonnegative(),
|
|
105
|
+
cpuUsedPercent: z.number().min(0).max(100),
|
|
106
|
+
});
|
|
102
107
|
export const adminServerStatsSchema = z.object({
|
|
103
108
|
profiles: profilesStatsSchema,
|
|
104
109
|
posts: postsStatsSchema,
|
|
@@ -106,4 +111,29 @@ export const adminServerStatsSchema = z.object({
|
|
|
106
111
|
jams: jamsStatsSchema,
|
|
107
112
|
topLists: topListsStatsSchema,
|
|
108
113
|
timelines: timelinesStatsSchema,
|
|
114
|
+
host: hostResourceStatsSchema,
|
|
115
|
+
});
|
|
116
|
+
export const profileActivitySummarySchema = z.object({
|
|
117
|
+
postsCount: z.number().int().nonnegative(),
|
|
118
|
+
repliesCount: z.number().int().nonnegative(),
|
|
119
|
+
eventsCount: z.number().int().nonnegative(),
|
|
120
|
+
reactionsGiven: z.number().int().nonnegative(),
|
|
121
|
+
reactionsReceived: z.number().int().nonnegative(),
|
|
122
|
+
repostsCount: z.number().int().nonnegative(),
|
|
123
|
+
repostsReceived: z.number().int().nonnegative(),
|
|
124
|
+
repliesReceived: z.number().int().nonnegative(),
|
|
125
|
+
rsvpsCount: z.number().int().nonnegative(),
|
|
126
|
+
bookmarksCount: z.number().int().nonnegative(),
|
|
127
|
+
groupsCount: z.number().int().nonnegative(),
|
|
128
|
+
topPosts: publicPostWithActivityScoreSchema.array().max(5),
|
|
129
|
+
});
|
|
130
|
+
export const adminProfileSummarySchema = z.object({
|
|
131
|
+
profile: publicProfileSchema,
|
|
132
|
+
activity: profileActivitySummarySchema,
|
|
133
|
+
createdAt: z.string().datetime(),
|
|
134
|
+
email: z.string().optional(),
|
|
135
|
+
followersCount: z.number().int().nonnegative(),
|
|
136
|
+
followingCount: z.number().int().nonnegative(),
|
|
137
|
+
reportsCount: z.number().int().nonnegative(),
|
|
138
|
+
blockedByCount: z.number().int().nonnegative(),
|
|
109
139
|
});
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -57,6 +57,8 @@ export interface EmailGlobals {
|
|
|
57
57
|
i18n: i18n;
|
|
58
58
|
t: i18n['t'];
|
|
59
59
|
};
|
|
60
|
+
/** Recipient display timezone: profile setting, else community, else UTC. */
|
|
61
|
+
timeZone: string;
|
|
60
62
|
}
|
|
61
63
|
export interface EmailOptionsWithGlobals extends EmailOptions {
|
|
62
64
|
globals: EmailGlobals;
|
package/dist/types/utils.js
CHANGED
|
@@ -8,9 +8,7 @@ import { z } from 'zod';
|
|
|
8
8
|
export const jsonSchema = z
|
|
9
9
|
.any()
|
|
10
10
|
.openapi('JsonValue', { type: 'object' });
|
|
11
|
-
export const i18nResourceKeySchema = z
|
|
12
|
-
.any()
|
|
13
|
-
.openapi('I18nResourceKey', {
|
|
11
|
+
export const i18nResourceKeySchema = z.any().openapi('I18nResourceKey', {
|
|
14
12
|
type: 'object',
|
|
15
13
|
});
|
|
16
14
|
export const i18nResourceLanguageSchema = z.record(z.string(), i18nResourceKeySchema);
|