@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.
Files changed (62) hide show
  1. package/dist/lib/capabilitiesHelpers.d.ts +9 -7
  2. package/dist/lib/capabilitiesHelpers.js +17 -2
  3. package/dist/lib/eventIcs.d.ts +17 -0
  4. package/dist/lib/eventIcs.js +82 -0
  5. package/dist/lib/eventRecurrence.d.ts +2 -0
  6. package/dist/lib/eventRecurrence.js +9 -4
  7. package/dist/lib/eventTime.d.ts +7 -0
  8. package/dist/lib/eventTime.js +16 -0
  9. package/dist/lib/federationHosts.d.ts +3 -0
  10. package/dist/lib/federationHosts.js +17 -0
  11. package/dist/lib/feedCursor.d.ts +14 -0
  12. package/dist/lib/feedCursor.js +22 -0
  13. package/dist/lib/feedFormat.d.ts +12 -0
  14. package/dist/lib/feedFormat.js +14 -0
  15. package/dist/lib/index.d.ts +7 -0
  16. package/dist/lib/index.js +7 -0
  17. package/dist/lib/jamHelpers.d.ts +11 -2
  18. package/dist/lib/jamHelpers.js +37 -0
  19. package/dist/lib/legacyThemeRoot.d.ts +3 -0
  20. package/dist/lib/legacyThemeRoot.js +10 -0
  21. package/dist/lib/markdownHelpers.d.ts +8 -0
  22. package/dist/lib/markdownHelpers.js +32 -3
  23. package/dist/lib/postHelpers.d.ts +142 -3
  24. package/dist/lib/postHelpers.js +307 -4
  25. package/dist/lib/profileHelpers.d.ts +11 -0
  26. package/dist/lib/profileHelpers.js +31 -0
  27. package/dist/lib/reactions.d.ts +17 -0
  28. package/dist/lib/reactions.js +37 -0
  29. package/dist/lib/scopeHelpers.d.ts +31 -2
  30. package/dist/lib/scopeHelpers.js +37 -3
  31. package/dist/lib/ssoProviders.d.ts +72 -0
  32. package/dist/lib/ssoProviders.js +370 -0
  33. package/dist/lib/timeZone.d.ts +9 -0
  34. package/dist/lib/timeZone.js +44 -0
  35. package/dist/types/analytics.d.ts +20 -0
  36. package/dist/types/analytics.js +4 -0
  37. package/dist/types/api.d.ts +41799 -11853
  38. package/dist/types/api.js +52 -4
  39. package/dist/types/auth.d.ts +20 -6
  40. package/dist/types/capabilities.d.ts +15 -1
  41. package/dist/types/capabilities.js +51 -0
  42. package/dist/types/config.d.ts +96 -0
  43. package/dist/types/config.js +53 -4
  44. package/dist/types/db.d.ts +1155 -164
  45. package/dist/types/db.js +14 -0
  46. package/dist/types/export.d.ts +120 -0
  47. package/dist/types/export.js +7 -0
  48. package/dist/types/index.d.ts +2 -0
  49. package/dist/types/index.js +2 -0
  50. package/dist/types/internal.d.ts +2577 -524
  51. package/dist/types/internal.js +6 -0
  52. package/dist/types/models.d.ts +63 -7
  53. package/dist/types/models.js +39 -2
  54. package/dist/types/plugins.d.ts +22 -0
  55. package/dist/types/plugins.js +66 -0
  56. package/dist/types/roleDefaults.d.ts +31 -0
  57. package/dist/types/roleDefaults.js +110 -0
  58. package/dist/types/stats.d.ts +54606 -6065
  59. package/dist/types/stats.js +30 -0
  60. package/dist/types/utils.d.ts +2 -0
  61. package/dist/types/utils.js +1 -3
  62. package/package.json +1 -1
package/dist/types/api.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { notificationStatsSchema, pushNotificationSchema, } from './notifications.js';
3
- import { accessTokenSchema, accountInteractionsSchema, accountNameSchema, accountSchema, answerSchema, applicationDataSchema, groupDataSchema, groupRoleSchema, groupSchema, guestDataSchema, hashtagSchema, inviteLinkSchema, latLngSchema, locationSchema, mediaAttachmentSchema, mentionDataSchema, postDataUnionSchema, postTypeSchema, profileDataSchema, profileStatsSchema, reactionDataSchema, reportDataSchema, reportSchema, resourceSchema, rsvpSchema, scopeSchema, visibilityTypeSchema, } from './models.js';
3
+ import { accessTokenSchema, accountInteractionsSchema, accountNameSchema, accountSchema, answerSchema, applicationDataSchema, groupDataSchema, groupRoleSchema, groupSchema, guestDataSchema, hashtagSchema, inviteLinkSchema, jamRecordingStatusSchema, latLngSchema, locationSchema, mediaAttachmentSchema, mentionDataSchema, postDataUnionSchema, postTypeSchema, profileDataSchema, profileStatsSchema, reactionDataSchema, roleDataSchema, reportDataSchema, reportSchema, resourceSchema, rsvpSchema, scopeSchema, visibilityTypeSchema, } from './models.js';
4
4
  import { groupWithMetaSchema } from './internal.js';
5
5
  import { communityConfigSchema } from './config.js';
6
6
  import { extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi';
@@ -16,6 +16,11 @@ export const publicAccountSchema = z
16
16
  emailValidated: z.boolean().default(false),
17
17
  })
18
18
  .openapi('Account', { type: 'object' });
19
+ /** Role identity on public profiles — capabilities stay internal. */
20
+ export const publicRoleSchema = roleDataSchema.pick({
21
+ key: true,
22
+ displayName: true,
23
+ });
19
24
  export const publicProfileSchema = z.object({
20
25
  id: z.string().uuid(),
21
26
  type: z.enum(['local', 'guest', 'federated']),
@@ -31,6 +36,7 @@ export const publicProfileSchema = z.object({
31
36
  locked: z.boolean().optional(),
32
37
  bot: z.boolean().optional(),
33
38
  discoverable: z.boolean().optional(),
39
+ roles: publicRoleSchema.array().optional(),
34
40
  memberships: z
35
41
  .array(groupRoleSchema.extend({
36
42
  group: groupSchema,
@@ -45,6 +51,8 @@ export const publicProfileSchema = z.object({
45
51
  .max(4)
46
52
  .optional(),
47
53
  profileStats: profileStatsSchema.optional(),
54
+ pinnedPostId: z.string().optional(),
55
+ blockedByMe: z.boolean().optional(),
48
56
  });
49
57
  export const publicAccessTokenSchema = accessTokenSchema
50
58
  .omit({ signedToken: true })
@@ -96,7 +104,7 @@ const repostWithPublicProfileSchema = z.object({
96
104
  profile: publicProfileSchema,
97
105
  createdAt: z.string().datetime(),
98
106
  });
99
- export const publicReplyPostSchema = z.object({
107
+ const publicReplyPostObject = z.object({
100
108
  id: z.string(),
101
109
  type: postTypeSchema,
102
110
  profile: publicProfileSchema,
@@ -107,6 +115,12 @@ export const publicReplyPostSchema = z.object({
107
115
  visibility: visibilityTypeSchema,
108
116
  group: groupWithMetaSchema.optional().nullable(),
109
117
  audience: z.array(publicProfileSchema).optional().nullable(),
118
+ seen: z.boolean().optional(),
119
+ inReplyToId: z.string().optional().nullable(),
120
+ hidden: z.boolean().optional(),
121
+ });
122
+ export const publicReplyPostSchema = publicReplyPostObject.extend({
123
+ replyTo: publicReplyPostObject.optional().nullable(),
110
124
  });
111
125
  export const publicApplicationSchema = applicationDataSchema.pick({
112
126
  name: true,
@@ -122,6 +136,11 @@ const basePublicPostSchema = publicReplyPostSchema.extend({
122
136
  reactions: reactionWithPublicProfileSchema.array(),
123
137
  /** Capped lean list of who reposted (most recent). Count stays in repostCount. */
124
138
  reposts: repostWithPublicProfileSchema.array(),
139
+ /** Newest conversation descendants for a nested timeline preview. */
140
+ latestReplies: publicReplyPostSchema.array().optional(),
141
+ latestRepliesHasMore: z.boolean().optional(),
142
+ /** Last reply or reaction on the conversation root; feeds sort by this. */
143
+ lastActivityAt: z.string().datetime().optional(),
125
144
  application: publicApplicationSchema.optional(),
126
145
  mentions: z.array(mentionWithPublicProfileSchema),
127
146
  tags: z.array(hashtagSchema),
@@ -180,6 +199,7 @@ export const accountCreationDataSchema = z.object({
180
199
  handle: z.string().min(4).max(255),
181
200
  avatar: z.string().url().optional(),
182
201
  displayName: profileDataSchema.shape.displayName,
202
+ bot: profileDataSchema.shape.bot,
183
203
  }),
184
204
  });
185
205
  export const accountUpdateDataSchema = z.object({
@@ -190,8 +210,21 @@ export const accountUpdateDataSchema = z.object({
190
210
  });
191
211
  export const serverInfoSchema = z.object({
192
212
  version: z.string(),
213
+ /** Optional CI/image build identifier (`BUILD`). */
214
+ build: z.string().optional(),
193
215
  environment: z.string(),
194
216
  publicContent: z.boolean(),
217
+ /** Process start time (ISO). */
218
+ startedAt: z.iso.datetime(),
219
+ uptimeSeconds: z.number().nonnegative(),
220
+ /** Local media-folder size and volume free space; null when unreadable. */
221
+ disk: z
222
+ .object({
223
+ folderBytes: z.number().nonnegative(),
224
+ freeBytes: z.number().nonnegative(),
225
+ totalBytes: z.number().nonnegative(),
226
+ })
227
+ .nullable(),
195
228
  /** Latest post view (`post_seen.created_at`); null if none yet. */
196
229
  lastAccessed: z.iso.datetime().nullable(),
197
230
  maxProfiles: z.number().int().nonnegative().optional(),
@@ -310,6 +343,7 @@ export const registerRequestSchema = z.object({
310
343
  confirmPassword: z.string().optional(),
311
344
  privacyPolicyAccepted: z.boolean(),
312
345
  inviteCode: z.string().optional(),
346
+ bot: profileDataSchema.shape.bot,
313
347
  });
314
348
  export const registerFormSchema = registerRequestSchema
315
349
  .refine((data) => data.password === data.confirmPassword, {
@@ -388,8 +422,21 @@ export const mediaStreamRequestSchema = z
388
422
  url: z.string().url(),
389
423
  })
390
424
  .openapi('MediaStreamRequest');
391
- export const updateProfileRequestSchema = profileDataSchema.partial({
425
+ export const updateProfileRequestSchema = profileDataSchema
426
+ .omit({ pinnedPostId: true })
427
+ .partial({
392
428
  handle: true,
429
+ })
430
+ .superRefine((value, ctx) => {
431
+ if (value.handle === undefined || value.type === 'federated')
432
+ return;
433
+ if (!accountNameSchema.safeParse(value.handle).success) {
434
+ ctx.addIssue({
435
+ code: 'custom',
436
+ path: ['handle'],
437
+ message: 'Handle must be 1–16 characters: letters, numbers, underscores, or hyphens (no spaces or punctuation)',
438
+ });
439
+ }
393
440
  });
394
441
  export const updateAccountPasswordRequestSchema = z.object({
395
442
  email: z.string().email().optional(),
@@ -434,6 +481,7 @@ export const publicReportSchema = reportSchema.extend({
434
481
  export const chronologicalInfiniteQueryParamsSchema = z.object({
435
482
  start: z.string().optional(),
436
483
  limit: z.coerce.number().optional(),
484
+ format: z.enum(['threaded', 'linear']).optional(),
437
485
  });
438
486
  export const offsetInfiniteQueryParamsSchema = z.object({
439
487
  offset: z.coerce.number().optional(),
@@ -506,7 +554,7 @@ export const jamRtmpStreamRequestSchema = z.object({
506
554
  });
507
555
  export const jamRtmpStreamResponseSchema = z.object({
508
556
  id: z.string(),
509
- status: z.enum(['requested', 'active', 'completed', 'failed']),
557
+ status: jamRecordingStatusSchema,
510
558
  destinationHost: z.string().optional(),
511
559
  egressId: z.string().optional(),
512
560
  });
@@ -14,10 +14,10 @@ export declare const authorizationSchema: z.ZodObject<{
14
14
  resource: z.ZodObject<{
15
15
  type: z.ZodEnum<{
16
16
  self: "self";
17
+ "*": "*";
17
18
  db: "db";
18
19
  jams: "jams";
19
20
  profiles: "profiles";
20
- "*": "*";
21
21
  notifications: "notifications";
22
22
  posts: "posts";
23
23
  groups: "groups";
@@ -70,10 +70,10 @@ export declare const authorizationDataSchema: z.ZodObject<{
70
70
  resource: z.ZodOptional<z.ZodObject<{
71
71
  type: z.ZodEnum<{
72
72
  self: "self";
73
+ "*": "*";
73
74
  db: "db";
74
75
  jams: "jams";
75
76
  profiles: "profiles";
76
- "*": "*";
77
77
  notifications: "notifications";
78
78
  posts: "posts";
79
79
  groups: "groups";
@@ -85,9 +85,11 @@ export declare const authorizationDataSchema: z.ZodObject<{
85
85
  id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"*">]>>;
86
86
  }, z.core.$strip>>;
87
87
  }, z.core.$strip>>;
88
+ pinnedPostId: z.ZodOptional<z.ZodString>;
88
89
  roles: z.ZodArray<z.ZodObject<{
89
90
  key: z.ZodString;
90
91
  default: z.ZodBoolean;
92
+ baseVersion: z.ZodOptional<z.ZodString>;
91
93
  displayName: z.ZodString;
92
94
  description: z.ZodOptional<z.ZodString>;
93
95
  capabilities: z.ZodOptional<z.ZodObject<{
@@ -137,10 +139,10 @@ export declare const authorizationDataSchema: z.ZodObject<{
137
139
  resource: z.ZodOptional<z.ZodObject<{
138
140
  type: z.ZodEnum<{
139
141
  self: "self";
142
+ "*": "*";
140
143
  db: "db";
141
144
  jams: "jams";
142
145
  profiles: "profiles";
143
- "*": "*";
144
146
  notifications: "notifications";
145
147
  posts: "posts";
146
148
  groups: "groups";
@@ -152,6 +154,7 @@ export declare const authorizationDataSchema: z.ZodObject<{
152
154
  id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"*">]>>;
153
155
  }, z.core.$strip>>;
154
156
  }, z.core.$strip>>;
157
+ pinnedPostId: z.ZodOptional<z.ZodString>;
155
158
  id: z.ZodUUID;
156
159
  createdAt: z.ZodISODateTime;
157
160
  updatedAt: z.ZodISODateTime;
@@ -195,10 +198,10 @@ export declare const authorizationDataSchema: z.ZodObject<{
195
198
  resource: z.ZodOptional<z.ZodObject<{
196
199
  type: z.ZodEnum<{
197
200
  self: "self";
201
+ "*": "*";
198
202
  db: "db";
199
203
  jams: "jams";
200
204
  profiles: "profiles";
201
- "*": "*";
202
205
  notifications: "notifications";
203
206
  posts: "posts";
204
207
  groups: "groups";
@@ -210,6 +213,7 @@ export declare const authorizationDataSchema: z.ZodObject<{
210
213
  id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"*">]>>;
211
214
  }, z.core.$strip>>;
212
215
  }, z.core.$strip>>;
216
+ pinnedPostId: z.ZodOptional<z.ZodString>;
213
217
  id: z.ZodUUID;
214
218
  createdAt: z.ZodISODateTime;
215
219
  updatedAt: z.ZodISODateTime;
@@ -260,6 +264,15 @@ export declare const authorizationDataSchema: z.ZodObject<{
260
264
  followersCount: z.ZodNumber;
261
265
  followingCount: z.ZodNumber;
262
266
  }, z.core.$strip>;
267
+ blockingIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
268
+ blockedByIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
269
+ followedHashtags: z.ZodDefault<z.ZodArray<z.ZodObject<{
270
+ tag: z.ZodOptional<z.ZodString>;
271
+ id: z.ZodUUID;
272
+ createdAt: z.ZodISODateTime;
273
+ updatedAt: z.ZodISODateTime;
274
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
275
+ }, z.core.$strip>>>;
263
276
  id: z.ZodUUID;
264
277
  createdAt: z.ZodISODateTime;
265
278
  updatedAt: z.ZodISODateTime;
@@ -312,10 +325,10 @@ export declare const authorizationDataSchema: z.ZodObject<{
312
325
  resource: z.ZodOptional<z.ZodObject<{
313
326
  type: z.ZodEnum<{
314
327
  self: "self";
328
+ "*": "*";
315
329
  db: "db";
316
330
  jams: "jams";
317
331
  profiles: "profiles";
318
- "*": "*";
319
332
  notifications: "notifications";
320
333
  posts: "posts";
321
334
  groups: "groups";
@@ -327,6 +340,7 @@ export declare const authorizationDataSchema: z.ZodObject<{
327
340
  id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"*">]>>;
328
341
  }, z.core.$strip>>;
329
342
  }, z.core.$strip>>;
343
+ pinnedPostId: z.ZodOptional<z.ZodString>;
330
344
  id: z.ZodUUID;
331
345
  createdAt: z.ZodISODateTime;
332
346
  updatedAt: z.ZodISODateTime;
@@ -343,10 +357,10 @@ export declare const authorizationDataSchema: z.ZodObject<{
343
357
  resource: z.ZodObject<{
344
358
  type: z.ZodEnum<{
345
359
  self: "self";
360
+ "*": "*";
346
361
  db: "db";
347
362
  jams: "jams";
348
363
  profiles: "profiles";
349
- "*": "*";
350
364
  notifications: "notifications";
351
365
  posts: "posts";
352
366
  groups: "groups";
@@ -2,7 +2,7 @@ export type ObjectType = 'post' | 'group' | 'profile' | 'report' | 'community' |
2
2
  export declare const postRelationships: readonly ["none", "local", "audience", "mentioned", "attendee", "collaborator"];
3
3
  export declare const defaultGroupRoles: readonly ["member", "moderator", "admin", "owner"];
4
4
  export declare const groupRelationships: readonly ["member", "moderator", "admin", "owner", "none", "local", "invited"];
5
- export declare const profileRelationships: readonly ["none", "local", "self", "following", "followed-by", "blocked-by", "muted-by"];
5
+ export declare const profileRelationships: readonly ["none", "local", "self", "following", "followed-by", "blocked", "blocked-by", "muted-by"];
6
6
  export declare const reportRelationships: readonly ["none", "local", "reporter", "reported", "acted-on"];
7
7
  export declare const accessTokenRelationships: readonly ["none", "local", "owner"];
8
8
  export type PostRelationship = (typeof postRelationships)[number];
@@ -29,3 +29,17 @@ export type ReportCapability = (typeof reportCapabilities)[number];
29
29
  export type AccessTokenCapability = (typeof accessTokenCapabilities)[number];
30
30
  export declare const roleCapabilities: readonly ["core-local", "core-accounts-read", "core-accounts-create", "core-accounts-update", "core-accounts-delete", "core-reports-create", "core-reports-update", "core-groups-create", "core-groups-read", "core-groups-delete", "core-groups-addMember", "core-groups-removeMember", "core-groups-changeMemberRole", "core-posts-create-note-local", "core-posts-create-note-public", "core-posts-create-note-direct", "core-posts-create-note-private", "core-posts-create-event-local", "core-posts-create-event-public", "core-posts-create-event-direct", "core-posts-create-event-private", "core-posts-create-poll-local", "core-posts-create-poll-public", "core-posts-create-poll-direct", "core-posts-create-poll-private", "core-posts-create-article-local", "core-posts-create-article-public", "core-posts-create-article-direct", "core-posts-create-article-private", "core-posts-read-local", "core-posts-announce", "core-posts-delete", "core-profiles-read", "core-profiles-roles-update", "core-profiles-delete", "core-profiles-suspend", "core-profiles-update", "core-profiles-impersonate", "core-analytics-read", "core-config-update", "core-config-read", "core-customization-read", "core-customization-update", "core-capabilities-read", "core-capabilities-update", "core-backups-create", "core-backups-read", "core-backups-download", "core-backups-restore", "core-db-access", "core-i18n-update", "core-logs-read", "core-roles-read", "core-roles-update", "core-maintenance-restart", "core-inviteLinks-create", "core-inviteLinks-read", "core-inviteLinks-update", "core-inviteLinks-delete", "core-serviceTokens-create", "core-serviceTokens-read", "core-serviceTokens-update", "core-serviceTokens-delete", "core-plugins-manage"];
31
31
  export type RoleCapability = (typeof roleCapabilities)[number];
32
+ /**
33
+ * Capability keys an instance admin can toggle for each role (leaves) plus the
34
+ * wildcard allow-all keys an editor exposes. `*` covers capabilities that do not
35
+ * fall under a `core-<domain>-*` category (e.g. `core-local`).
36
+ */
37
+ export declare const roleCapabilityEditorKeys: readonly ["core-local", "core-accounts-read", "core-accounts-create", "core-accounts-update", "core-accounts-delete", "core-reports-create", "core-reports-update", "core-groups-create", "core-groups-read", "core-groups-delete", "core-groups-addMember", "core-groups-removeMember", "core-groups-changeMemberRole", "core-posts-create-note-local", "core-posts-create-note-public", "core-posts-create-note-direct", "core-posts-create-note-private", "core-posts-create-event-local", "core-posts-create-event-public", "core-posts-create-event-direct", "core-posts-create-event-private", "core-posts-create-poll-local", "core-posts-create-poll-public", "core-posts-create-poll-direct", "core-posts-create-poll-private", "core-posts-create-article-local", "core-posts-create-article-public", "core-posts-create-article-direct", "core-posts-create-article-private", "core-posts-read-local", "core-posts-announce", "core-posts-delete", "core-profiles-read", "core-profiles-roles-update", "core-profiles-delete", "core-profiles-suspend", "core-profiles-update", "core-profiles-impersonate", "core-analytics-read", "core-config-update", "core-config-read", "core-customization-read", "core-customization-update", "core-capabilities-read", "core-capabilities-update", "core-backups-create", "core-backups-read", "core-backups-download", "core-backups-restore", "core-db-access", "core-i18n-update", "core-logs-read", "core-roles-read", "core-roles-update", "core-maintenance-restart", "core-inviteLinks-create", "core-inviteLinks-read", "core-inviteLinks-update", "core-inviteLinks-delete", "core-serviceTokens-create", "core-serviceTokens-read", "core-serviceTokens-update", "core-serviceTokens-delete", "core-plugins-manage", "*", "core-accounts-*", "core-analytics-*", "core-backups-*", "core-capabilities-*", "core-config-*", "core-customization-*", "core-db-*", "core-groups-*", "core-i18n-*", "core-inviteLinks-*", "core-logs-*", "core-maintenance-*", "core-plugins-*", "core-profiles-*", "core-posts-create-*", "core-posts-*", "core-reports-*", "core-roles-*", "core-serviceTokens-*"];
38
+ /** Capability keys an admin can toggle per relationship for posts. */
39
+ export declare const postCapabilityEditorKeys: readonly ["core-posts-read", "core-posts-update", "core-posts-delete", "core-posts-vote", "core-posts-react", "core-posts-rsvp", "core-posts-reply", "core-posts-jam-moderate", "core-posts-jam-speak", "core-posts-jam-read", "core-posts-*"];
40
+ /** Capability keys an admin can toggle per relationship for profiles. */
41
+ export declare const profileCapabilityEditorKeys: readonly ["core-profiles-read", "core-profiles-update", "core-profiles-delete", "core-profiles-requestFollow", "core-profiles-follow", "core-profiles-unfollow", "core-profiles-block", "core-profiles-unblock", "core-profiles-mute", "core-profiles-unmute", "core-posts-read", "core-posts-update", "core-posts-delete", "core-posts-vote", "core-posts-react", "core-posts-rsvp", "core-posts-reply", "core-posts-jam-moderate", "core-posts-jam-speak", "core-posts-jam-read", "core-profiles-*", "core-posts-*"];
42
+ /** Capability keys an admin can toggle per relationship for reports. */
43
+ export declare const reportCapabilityEditorKeys: readonly ["core-reports-create", "core-reports-read", "core-reports-*"];
44
+ /** Capability keys an admin can toggle per relationship for access tokens. */
45
+ export declare const accessTokenCapabilityEditorKeys: readonly ["core-serviceTokens-create", "core-serviceTokens-read", "core-serviceTokens-delete", "core-serviceTokens-*"];
@@ -24,6 +24,7 @@ export const profileRelationships = [
24
24
  'self',
25
25
  'following',
26
26
  'followed-by',
27
+ 'blocked',
27
28
  'blocked-by',
28
29
  'muted-by',
29
30
  ];
@@ -185,3 +186,53 @@ export const roleCapabilities = [
185
186
  'core-serviceTokens-delete',
186
187
  'core-plugins-manage',
187
188
  ];
189
+ /**
190
+ * Capability keys an instance admin can toggle for each role (leaves) plus the
191
+ * wildcard allow-all keys an editor exposes. `*` covers capabilities that do not
192
+ * fall under a `core-<domain>-*` category (e.g. `core-local`).
193
+ */
194
+ export const roleCapabilityEditorKeys = [
195
+ ...roleCapabilities,
196
+ '*',
197
+ 'core-accounts-*',
198
+ 'core-analytics-*',
199
+ 'core-backups-*',
200
+ 'core-capabilities-*',
201
+ 'core-config-*',
202
+ 'core-customization-*',
203
+ 'core-db-*',
204
+ 'core-groups-*',
205
+ 'core-i18n-*',
206
+ 'core-inviteLinks-*',
207
+ 'core-logs-*',
208
+ 'core-maintenance-*',
209
+ 'core-plugins-*',
210
+ 'core-profiles-*',
211
+ 'core-posts-create-*',
212
+ 'core-posts-*',
213
+ 'core-reports-*',
214
+ 'core-roles-*',
215
+ 'core-serviceTokens-*',
216
+ ];
217
+ /** Capability keys an admin can toggle per relationship for posts. */
218
+ export const postCapabilityEditorKeys = [
219
+ ...postCapabilities,
220
+ 'core-posts-*',
221
+ ];
222
+ /** Capability keys an admin can toggle per relationship for profiles. */
223
+ export const profileCapabilityEditorKeys = [
224
+ ...profileCapabilities,
225
+ ...postCapabilities,
226
+ 'core-profiles-*',
227
+ 'core-posts-*',
228
+ ];
229
+ /** Capability keys an admin can toggle per relationship for reports. */
230
+ export const reportCapabilityEditorKeys = [
231
+ ...reportCapabilities,
232
+ 'core-reports-*',
233
+ ];
234
+ /** Capability keys an admin can toggle per relationship for access tokens. */
235
+ export const accessTokenCapabilityEditorKeys = [
236
+ ...accessTokenCapabilities,
237
+ 'core-serviceTokens-*',
238
+ ];
@@ -11,6 +11,9 @@ export declare const mediaStorageParamsSchema: z.ZodObject<{
11
11
  host: z.ZodOptional<z.ZodString>;
12
12
  }, z.core.$strip>;
13
13
  export type MediaStorageParams = z.infer<typeof mediaStorageParamsSchema>;
14
+ /** MiB. 1024 is 1 GiB — the default shown in the admin media section. */
15
+ export declare const DEFAULT_MAX_MEDIA_UPLOAD_MB = 1024;
16
+ export declare const mediaUploadLimitBytes: (maxUploadMb: number) => number;
14
17
  export declare const stripePaymentConfigSchema: (sanitize?: boolean) => z.ZodObject<{
15
18
  paidMembership: z.ZodOptional<z.ZodObject<{
16
19
  enabled: z.ZodBoolean;
@@ -112,6 +115,7 @@ export declare const coreConfigSchemaFactory: (sanitize?: boolean) => z.ZodObjec
112
115
  }, z.core.$strip>;
113
116
  }, z.core.$strip>;
114
117
  media: z.ZodObject<{
118
+ maxUploadMb: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
115
119
  storage: z.ZodObject<{
116
120
  driver: z.ZodEnum<{
117
121
  openpeeps: "openpeeps";
@@ -147,6 +151,7 @@ export declare const coreConfigSchemaFactory: (sanitize?: boolean) => z.ZodObjec
147
151
  }, z.core.$strip>;
148
152
  federation: z.ZodObject<{
149
153
  active: z.ZodBoolean;
154
+ allowedHosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
150
155
  }, z.core.$strip>;
151
156
  activityPub: z.ZodObject<{
152
157
  defaultDomain: z.ZodString;
@@ -178,9 +183,26 @@ export declare const coreConfigSchemaFactory: (sanitize?: boolean) => z.ZodObjec
178
183
  oidc: z.ZodArray<z.ZodDefault<z.ZodObject<{
179
184
  id: z.ZodString;
180
185
  name: z.ZodString;
186
+ kind: z.ZodOptional<z.ZodEnum<{
187
+ oidc: "oidc";
188
+ github: "github";
189
+ gitlab: "gitlab";
190
+ "gitlab-selfhosted": "gitlab-selfhosted";
191
+ google: "google";
192
+ entra: "entra";
193
+ auth0: "auth0";
194
+ keycloak: "keycloak";
195
+ authentik: "authentik";
196
+ okta: "okta";
197
+ discord: "discord";
198
+ pocketid: "pocketid";
199
+ }>>;
200
+ instanceUrl: z.ZodOptional<z.ZodString>;
201
+ tenant: z.ZodOptional<z.ZodString>;
181
202
  authorizationUrl: z.ZodString;
182
203
  tokenUrl: z.ZodString;
183
204
  userinfoUrl: z.ZodString;
205
+ emailsUrl: z.ZodOptional<z.ZodString>;
184
206
  jwksUri: z.ZodOptional<z.ZodString>;
185
207
  clientId: z.ZodString;
186
208
  clientSecret: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
@@ -272,6 +294,7 @@ export declare const coreConfigSchema: z.ZodObject<{
272
294
  }, z.core.$strip>;
273
295
  }, z.core.$strip>;
274
296
  media: z.ZodObject<{
297
+ maxUploadMb: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
275
298
  storage: z.ZodObject<{
276
299
  driver: z.ZodEnum<{
277
300
  openpeeps: "openpeeps";
@@ -307,6 +330,7 @@ export declare const coreConfigSchema: z.ZodObject<{
307
330
  }, z.core.$strip>;
308
331
  federation: z.ZodObject<{
309
332
  active: z.ZodBoolean;
333
+ allowedHosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
310
334
  }, z.core.$strip>;
311
335
  activityPub: z.ZodObject<{
312
336
  defaultDomain: z.ZodString;
@@ -338,9 +362,26 @@ export declare const coreConfigSchema: z.ZodObject<{
338
362
  oidc: z.ZodArray<z.ZodDefault<z.ZodObject<{
339
363
  id: z.ZodString;
340
364
  name: z.ZodString;
365
+ kind: z.ZodOptional<z.ZodEnum<{
366
+ oidc: "oidc";
367
+ github: "github";
368
+ gitlab: "gitlab";
369
+ "gitlab-selfhosted": "gitlab-selfhosted";
370
+ google: "google";
371
+ entra: "entra";
372
+ auth0: "auth0";
373
+ keycloak: "keycloak";
374
+ authentik: "authentik";
375
+ okta: "okta";
376
+ discord: "discord";
377
+ pocketid: "pocketid";
378
+ }>>;
379
+ instanceUrl: z.ZodOptional<z.ZodString>;
380
+ tenant: z.ZodOptional<z.ZodString>;
341
381
  authorizationUrl: z.ZodString;
342
382
  tokenUrl: z.ZodString;
343
383
  userinfoUrl: z.ZodString;
384
+ emailsUrl: z.ZodOptional<z.ZodString>;
344
385
  jwksUri: z.ZodOptional<z.ZodString>;
345
386
  clientId: z.ZodString;
346
387
  clientSecret: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
@@ -432,6 +473,7 @@ export declare const coreConfigSanitizedSchema: z.ZodObject<{
432
473
  }, z.core.$strip>;
433
474
  }, z.core.$strip>;
434
475
  media: z.ZodObject<{
476
+ maxUploadMb: z.ZodCatch<z.ZodDefault<z.ZodNumber>>;
435
477
  storage: z.ZodObject<{
436
478
  driver: z.ZodEnum<{
437
479
  openpeeps: "openpeeps";
@@ -467,6 +509,7 @@ export declare const coreConfigSanitizedSchema: z.ZodObject<{
467
509
  }, z.core.$strip>;
468
510
  federation: z.ZodObject<{
469
511
  active: z.ZodBoolean;
512
+ allowedHosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
470
513
  }, z.core.$strip>;
471
514
  activityPub: z.ZodObject<{
472
515
  defaultDomain: z.ZodString;
@@ -498,9 +541,26 @@ export declare const coreConfigSanitizedSchema: z.ZodObject<{
498
541
  oidc: z.ZodArray<z.ZodDefault<z.ZodObject<{
499
542
  id: z.ZodString;
500
543
  name: z.ZodString;
544
+ kind: z.ZodOptional<z.ZodEnum<{
545
+ oidc: "oidc";
546
+ github: "github";
547
+ gitlab: "gitlab";
548
+ "gitlab-selfhosted": "gitlab-selfhosted";
549
+ google: "google";
550
+ entra: "entra";
551
+ auth0: "auth0";
552
+ keycloak: "keycloak";
553
+ authentik: "authentik";
554
+ okta: "okta";
555
+ discord: "discord";
556
+ pocketid: "pocketid";
557
+ }>>;
558
+ instanceUrl: z.ZodOptional<z.ZodString>;
559
+ tenant: z.ZodOptional<z.ZodString>;
501
560
  authorizationUrl: z.ZodString;
502
561
  tokenUrl: z.ZodString;
503
562
  userinfoUrl: z.ZodString;
563
+ emailsUrl: z.ZodOptional<z.ZodString>;
504
564
  jwksUri: z.ZodOptional<z.ZodString>;
505
565
  clientId: z.ZodString;
506
566
  clientSecret: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
@@ -569,6 +629,13 @@ export declare const communityConfigSchemaFactory: (_sanitize?: boolean) => z.Zo
569
629
  base: z.ZodString;
570
630
  icon: z.ZodOptional<z.ZodString>;
571
631
  mobileIcon: z.ZodOptional<z.ZodString>;
632
+ primaryHex: z.ZodOptional<z.ZodString>;
633
+ logoFull: z.ZodOptional<z.ZodString>;
634
+ logoSmall: z.ZodOptional<z.ZodString>;
635
+ defaultProfileAvatar: z.ZodOptional<z.ZodString>;
636
+ defaultGroupAvatar: z.ZodOptional<z.ZodString>;
637
+ backgroundAuth: z.ZodOptional<z.ZodString>;
638
+ background: z.ZodOptional<z.ZodString>;
572
639
  light: z.ZodObject<{
573
640
  primaryHex: z.ZodString;
574
641
  secondaryHex: z.ZodOptional<z.ZodString>;
@@ -619,6 +686,11 @@ export declare const communityConfigSchemaFactory: (_sanitize?: boolean) => z.Zo
619
686
  settings: z.ZodObject<{
620
687
  openRegistrations: z.ZodBoolean;
621
688
  defaultLanguage: z.ZodOptional<z.ZodString>;
689
+ defaultTimeZone: z.ZodOptional<z.ZodString>;
690
+ defaultFeedFormat: z.ZodOptional<z.ZodEnum<{
691
+ threaded: "threaded";
692
+ linear: "linear";
693
+ }>>;
622
694
  }, z.core.$strip>;
623
695
  roles: z.ZodObject<{
624
696
  onRegistration: z.ZodObject<{
@@ -636,6 +708,13 @@ export declare const communityConfigSchema: z.ZodObject<{
636
708
  base: z.ZodString;
637
709
  icon: z.ZodOptional<z.ZodString>;
638
710
  mobileIcon: z.ZodOptional<z.ZodString>;
711
+ primaryHex: z.ZodOptional<z.ZodString>;
712
+ logoFull: z.ZodOptional<z.ZodString>;
713
+ logoSmall: z.ZodOptional<z.ZodString>;
714
+ defaultProfileAvatar: z.ZodOptional<z.ZodString>;
715
+ defaultGroupAvatar: z.ZodOptional<z.ZodString>;
716
+ backgroundAuth: z.ZodOptional<z.ZodString>;
717
+ background: z.ZodOptional<z.ZodString>;
639
718
  light: z.ZodObject<{
640
719
  primaryHex: z.ZodString;
641
720
  secondaryHex: z.ZodOptional<z.ZodString>;
@@ -686,6 +765,11 @@ export declare const communityConfigSchema: z.ZodObject<{
686
765
  settings: z.ZodObject<{
687
766
  openRegistrations: z.ZodBoolean;
688
767
  defaultLanguage: z.ZodOptional<z.ZodString>;
768
+ defaultTimeZone: z.ZodOptional<z.ZodString>;
769
+ defaultFeedFormat: z.ZodOptional<z.ZodEnum<{
770
+ threaded: "threaded";
771
+ linear: "linear";
772
+ }>>;
689
773
  }, z.core.$strip>;
690
774
  roles: z.ZodObject<{
691
775
  onRegistration: z.ZodObject<{
@@ -703,6 +787,13 @@ export declare const communityConfigSanitizedSchema: z.ZodObject<{
703
787
  base: z.ZodString;
704
788
  icon: z.ZodOptional<z.ZodString>;
705
789
  mobileIcon: z.ZodOptional<z.ZodString>;
790
+ primaryHex: z.ZodOptional<z.ZodString>;
791
+ logoFull: z.ZodOptional<z.ZodString>;
792
+ logoSmall: z.ZodOptional<z.ZodString>;
793
+ defaultProfileAvatar: z.ZodOptional<z.ZodString>;
794
+ defaultGroupAvatar: z.ZodOptional<z.ZodString>;
795
+ backgroundAuth: z.ZodOptional<z.ZodString>;
796
+ background: z.ZodOptional<z.ZodString>;
706
797
  light: z.ZodObject<{
707
798
  primaryHex: z.ZodString;
708
799
  secondaryHex: z.ZodOptional<z.ZodString>;
@@ -753,6 +844,11 @@ export declare const communityConfigSanitizedSchema: z.ZodObject<{
753
844
  settings: z.ZodObject<{
754
845
  openRegistrations: z.ZodBoolean;
755
846
  defaultLanguage: z.ZodOptional<z.ZodString>;
847
+ defaultTimeZone: z.ZodOptional<z.ZodString>;
848
+ defaultFeedFormat: z.ZodOptional<z.ZodEnum<{
849
+ threaded: "threaded";
850
+ linear: "linear";
851
+ }>>;
756
852
  }, z.core.$strip>;
757
853
  roles: z.ZodObject<{
758
854
  onRegistration: z.ZodObject<{