@openpeepshq/common 0.1.43

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 (78) hide show
  1. package/LICENSE.md +21 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.js +3 -0
  4. package/dist/lib/adminSections.d.ts +53 -0
  5. package/dist/lib/adminSections.js +62 -0
  6. package/dist/lib/attachmentHelpers.d.ts +1 -0
  7. package/dist/lib/attachmentHelpers.js +13 -0
  8. package/dist/lib/capabilitiesHelpers.d.ts +118 -0
  9. package/dist/lib/capabilitiesHelpers.js +238 -0
  10. package/dist/lib/colors.d.ts +5 -0
  11. package/dist/lib/colors.js +17 -0
  12. package/dist/lib/csvHelpers.d.ts +6 -0
  13. package/dist/lib/csvHelpers.js +17 -0
  14. package/dist/lib/eventIcs.d.ts +4 -0
  15. package/dist/lib/eventIcs.js +83 -0
  16. package/dist/lib/groupHelpers.d.ts +134 -0
  17. package/dist/lib/groupHelpers.js +216 -0
  18. package/dist/lib/index.d.ts +17 -0
  19. package/dist/lib/index.js +17 -0
  20. package/dist/lib/jamHelpers.d.ts +5 -0
  21. package/dist/lib/jamHelpers.js +37 -0
  22. package/dist/lib/markdownHelpers.d.ts +1 -0
  23. package/dist/lib/markdownHelpers.js +24 -0
  24. package/dist/lib/mediaDimensions.d.ts +19 -0
  25. package/dist/lib/mediaDimensions.js +19 -0
  26. package/dist/lib/postHelpers.d.ts +146 -0
  27. package/dist/lib/postHelpers.js +144 -0
  28. package/dist/lib/profileHelpers.d.ts +30 -0
  29. package/dist/lib/profileHelpers.js +75 -0
  30. package/dist/lib/pushHelpers.d.ts +4 -0
  31. package/dist/lib/pushHelpers.js +6 -0
  32. package/dist/lib/scopeHelpers.d.ts +25 -0
  33. package/dist/lib/scopeHelpers.js +85 -0
  34. package/dist/lib/text.d.ts +3 -0
  35. package/dist/lib/text.js +18 -0
  36. package/dist/lib/tokenHelpers.d.ts +21 -0
  37. package/dist/lib/tokenHelpers.js +81 -0
  38. package/dist/lib/utils.d.ts +43 -0
  39. package/dist/lib/utils.js +200 -0
  40. package/dist/types/admin-db.d.ts +62 -0
  41. package/dist/types/admin-db.js +41 -0
  42. package/dist/types/admin-email.d.ts +39 -0
  43. package/dist/types/admin-email.js +41 -0
  44. package/dist/types/admin-jobs.d.ts +15 -0
  45. package/dist/types/admin-jobs.js +14 -0
  46. package/dist/types/admin-performance.d.ts +23 -0
  47. package/dist/types/admin-performance.js +14 -0
  48. package/dist/types/analytics.d.ts +583 -0
  49. package/dist/types/analytics.js +213 -0
  50. package/dist/types/api.d.ts +20076 -0
  51. package/dist/types/api.js +492 -0
  52. package/dist/types/apple-app-site-association.d.ts +50 -0
  53. package/dist/types/apple-app-site-association.js +38 -0
  54. package/dist/types/auth.d.ts +367 -0
  55. package/dist/types/auth.js +17 -0
  56. package/dist/types/capabilities.d.ts +24 -0
  57. package/dist/types/capabilities.js +144 -0
  58. package/dist/types/config.d.ts +858 -0
  59. package/dist/types/config.js +352 -0
  60. package/dist/types/db.d.ts +8780 -0
  61. package/dist/types/db.js +65 -0
  62. package/dist/types/index.d.ts +18 -0
  63. package/dist/types/index.js +18 -0
  64. package/dist/types/internal.d.ts +44337 -0
  65. package/dist/types/internal.js +154 -0
  66. package/dist/types/models.d.ts +2619 -0
  67. package/dist/types/models.js +599 -0
  68. package/dist/types/notifications.d.ts +148 -0
  69. package/dist/types/notifications.js +40 -0
  70. package/dist/types/plugins.d.ts +66 -0
  71. package/dist/types/plugins.js +29 -0
  72. package/dist/types/stats.d.ts +10216 -0
  73. package/dist/types/stats.js +109 -0
  74. package/dist/types/stripe.d.ts +42 -0
  75. package/dist/types/stripe.js +35 -0
  76. package/dist/types/utils.d.ts +84 -0
  77. package/dist/types/utils.js +39 -0
  78. package/package.json +54 -0
@@ -0,0 +1,858 @@
1
+ import type { ReadableStream } from 'node:stream/web';
2
+ import { z, ZodString, type ZodType } from 'zod';
3
+ export declare const passwordPlaceHolder = "*********";
4
+ export declare const password: (sanitize?: boolean) => z.ZodString | z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
5
+ export declare const fixed: <T extends ZodType>(type: T, sanitize?: boolean) => T;
6
+ export declare const hidden: <T extends ZodType>(type: T) => T;
7
+ export declare const longText: (type: ZodString) => z.ZodString;
8
+ export declare const mediaStorageParamsSchema: z.ZodObject<{
9
+ path: z.ZodString;
10
+ prefix: z.ZodString;
11
+ host: z.ZodOptional<z.ZodString>;
12
+ }, z.core.$strip>;
13
+ export type MediaStorageParams = z.infer<typeof mediaStorageParamsSchema>;
14
+ export declare const stripePaymentConfigSchema: (sanitize?: boolean) => z.ZodObject<{
15
+ paidMembership: z.ZodOptional<z.ZodObject<{
16
+ enabled: z.ZodBoolean;
17
+ productId: z.ZodOptional<z.ZodString>;
18
+ trialPeriodDays: z.ZodOptional<z.ZodNumber>;
19
+ }, z.core.$strip>>;
20
+ publishableKey: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
21
+ secretKey: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
22
+ webhookSecret: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
23
+ }, z.core.$strip>;
24
+ export type StripePaymentConfig = z.infer<ReturnType<typeof stripePaymentConfigSchema>>;
25
+ export declare const emailConfigSchemaFactory: (sanitize?: boolean) => z.ZodObject<{
26
+ service: z.ZodString;
27
+ defaultTemplatePath: z.ZodString;
28
+ defaultFrom: z.ZodOptional<z.ZodString>;
29
+ transportConfig: z.ZodObject<{
30
+ host: z.ZodString;
31
+ port: z.ZodNumber;
32
+ secure: z.ZodDefault<z.ZodBoolean>;
33
+ auth: z.ZodOptional<z.ZodObject<{
34
+ user: z.ZodOptional<z.ZodString>;
35
+ pass: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
36
+ }, z.core.$strip>>;
37
+ }, z.core.$strip>;
38
+ }, z.core.$strip>;
39
+ export declare const emailConfigSchema: z.ZodObject<{
40
+ service: z.ZodString;
41
+ defaultTemplatePath: z.ZodString;
42
+ defaultFrom: z.ZodOptional<z.ZodString>;
43
+ transportConfig: z.ZodObject<{
44
+ host: z.ZodString;
45
+ port: z.ZodNumber;
46
+ secure: z.ZodDefault<z.ZodBoolean>;
47
+ auth: z.ZodOptional<z.ZodObject<{
48
+ user: z.ZodOptional<z.ZodString>;
49
+ pass: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
50
+ }, z.core.$strip>>;
51
+ }, z.core.$strip>;
52
+ }, z.core.$strip>;
53
+ export declare const emailConfigSanitizedSchema: z.ZodObject<{
54
+ service: z.ZodString;
55
+ defaultTemplatePath: z.ZodString;
56
+ defaultFrom: z.ZodOptional<z.ZodString>;
57
+ transportConfig: z.ZodObject<{
58
+ host: z.ZodString;
59
+ port: z.ZodNumber;
60
+ secure: z.ZodDefault<z.ZodBoolean>;
61
+ auth: z.ZodOptional<z.ZodObject<{
62
+ user: z.ZodOptional<z.ZodString>;
63
+ pass: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
64
+ }, z.core.$strip>>;
65
+ }, z.core.$strip>;
66
+ }, z.core.$strip>;
67
+ export type EmailConfig = z.infer<typeof emailConfigSchema>;
68
+ export type ConfigValue = string | number | boolean | undefined;
69
+ export interface ConfigTree {
70
+ [key: string]: ConfigTree | ConfigValue | (ConfigTree | undefined)[] | (ConfigValue | undefined)[];
71
+ }
72
+ export type ConfigElement = ConfigTree | ConfigValue | (ConfigTree | undefined)[] | (ConfigValue | undefined)[];
73
+ export type ConfigSchemaFactory<T> = (sanitize?: boolean) => ZodType<T>;
74
+ export interface ConfigSchema<T> {
75
+ factory: ConfigSchemaFactory<T>;
76
+ defaults: T;
77
+ }
78
+ export declare const coreConfigSchemaFactory: (sanitize?: boolean) => z.ZodObject<{
79
+ version: z.ZodString;
80
+ environment: z.ZodString;
81
+ server: z.ZodObject<{
82
+ host: z.ZodString;
83
+ signUpsOpen: z.ZodBoolean;
84
+ publicContent: z.ZodBoolean;
85
+ maxProfiles: z.ZodOptional<z.ZodNumber>;
86
+ }, z.core.$strip>;
87
+ db: z.ZodObject<{
88
+ url: z.ZodString;
89
+ databaseName: z.ZodOptional<z.ZodString>;
90
+ databaseUrl: z.ZodString;
91
+ }, z.core.$strip>;
92
+ redis: z.ZodObject<{
93
+ host: z.ZodString;
94
+ }, z.core.$strip>;
95
+ email: z.ZodObject<{
96
+ service: z.ZodString;
97
+ defaultTemplatePath: z.ZodString;
98
+ defaultFrom: z.ZodOptional<z.ZodString>;
99
+ transportConfig: z.ZodObject<{
100
+ host: z.ZodString;
101
+ port: z.ZodNumber;
102
+ secure: z.ZodDefault<z.ZodBoolean>;
103
+ auth: z.ZodOptional<z.ZodObject<{
104
+ user: z.ZodOptional<z.ZodString>;
105
+ pass: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
106
+ }, z.core.$strip>>;
107
+ }, z.core.$strip>;
108
+ }, z.core.$strip>;
109
+ logs: z.ZodObject<{
110
+ local: z.ZodObject<{
111
+ path: z.ZodString;
112
+ }, z.core.$strip>;
113
+ }, z.core.$strip>;
114
+ media: z.ZodObject<{
115
+ storage: z.ZodObject<{
116
+ driver: z.ZodEnum<{
117
+ openpeeps: "openpeeps";
118
+ }>;
119
+ params: z.ZodObject<{
120
+ path: z.ZodString;
121
+ prefix: z.ZodString;
122
+ host: z.ZodOptional<z.ZodString>;
123
+ }, z.core.$strip>;
124
+ }, z.core.$strip>;
125
+ }, z.core.$strip>;
126
+ network: z.ZodObject<{
127
+ port: z.ZodNumber;
128
+ }, z.core.$strip>;
129
+ plugins: z.ZodObject<{
130
+ path: z.ZodString;
131
+ }, z.core.$strip>;
132
+ secrets: z.ZodObject<{
133
+ jwt: z.ZodString | z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
134
+ }, z.core.$strip>;
135
+ jams: z.ZodObject<{
136
+ livekit: z.ZodObject<{
137
+ url: z.ZodString;
138
+ apiKey: z.ZodOptional<z.ZodString>;
139
+ apiSecret: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
140
+ recordingEnabled: z.ZodOptional<z.ZodBoolean>;
141
+ }, z.core.$strip>;
142
+ }, z.core.$strip>;
143
+ vapid: z.ZodObject<{
144
+ privateKey: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
145
+ publicKey: z.ZodOptional<z.ZodString>;
146
+ }, z.core.$strip>;
147
+ federation: z.ZodObject<{
148
+ active: z.ZodBoolean;
149
+ }, z.core.$strip>;
150
+ activityPub: z.ZodObject<{
151
+ defaultDomain: z.ZodString;
152
+ itemsPerPage: z.ZodNumber;
153
+ threadDepth: z.ZodNumber;
154
+ federation: z.ZodObject<{
155
+ requestTimeout: z.ZodNumber;
156
+ }, z.core.$strip>;
157
+ }, z.core.$strip>;
158
+ sso: z.ZodObject<{
159
+ generic: z.ZodArray<z.ZodDefault<z.ZodObject<{
160
+ userProfileRequest: z.ZodObject<{
161
+ url: z.ZodString;
162
+ authHeader: z.ZodOptional<z.ZodString>;
163
+ }, z.core.$strip>;
164
+ userProfilePaths: z.ZodObject<{
165
+ email: z.ZodString;
166
+ handle: z.ZodOptional<z.ZodString>;
167
+ avatar: z.ZodOptional<z.ZodString>;
168
+ displayName: z.ZodOptional<z.ZodString>;
169
+ }, z.core.$strip>;
170
+ createAccounts: z.ZodOptional<z.ZodBoolean>;
171
+ createProfiles: z.ZodOptional<z.ZodBoolean>;
172
+ }, z.core.$strip>>>;
173
+ oidc: z.ZodArray<z.ZodDefault<z.ZodObject<{
174
+ id: z.ZodString;
175
+ name: z.ZodString;
176
+ authorizationUrl: z.ZodString;
177
+ tokenUrl: z.ZodString;
178
+ userinfoUrl: z.ZodString;
179
+ jwksUri: z.ZodOptional<z.ZodString>;
180
+ clientId: z.ZodString;
181
+ clientSecret: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
182
+ scope: z.ZodOptional<z.ZodString>;
183
+ claimMapping: z.ZodOptional<z.ZodObject<{
184
+ email: z.ZodOptional<z.ZodString>;
185
+ handle: z.ZodOptional<z.ZodString>;
186
+ displayName: z.ZodOptional<z.ZodString>;
187
+ avatar: z.ZodOptional<z.ZodString>;
188
+ }, z.core.$strip>>;
189
+ approvalRequired: z.ZodOptional<z.ZodBoolean>;
190
+ }, z.core.$strip>>>;
191
+ }, z.core.$strip>;
192
+ services: z.ZodObject<{
193
+ sentry: z.ZodObject<{
194
+ enabled: z.ZodBoolean;
195
+ dsn: z.ZodOptional<z.ZodString>;
196
+ replayEnabled: z.ZodOptional<z.ZodBoolean>;
197
+ }, z.core.$strip>;
198
+ location: z.ZodObject<{
199
+ type: z.ZodString;
200
+ url: z.ZodString;
201
+ apiKey: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
202
+ }, z.core.$strip>;
203
+ }, z.core.$strip>;
204
+ apps: z.ZodObject<{
205
+ ios: z.ZodObject<{
206
+ url: z.ZodOptional<z.ZodString>;
207
+ bundleIdentifier: z.ZodOptional<z.ZodString>;
208
+ teamId: z.ZodOptional<z.ZodString>;
209
+ appId: z.ZodOptional<z.ZodString>;
210
+ apnKeyId: z.ZodOptional<z.ZodString>;
211
+ apnSigningKey: z.ZodOptional<z.ZodString>;
212
+ }, z.core.$strip>;
213
+ android: z.ZodObject<{
214
+ url: z.ZodOptional<z.ZodString>;
215
+ packageName: z.ZodOptional<z.ZodString>;
216
+ appId: z.ZodOptional<z.ZodString>;
217
+ fcmCredentials: z.ZodOptional<z.ZodString>;
218
+ }, z.core.$strip>;
219
+ }, z.core.$strip>;
220
+ payments: z.ZodObject<{
221
+ stripe: z.ZodObject<{
222
+ paidMembership: z.ZodOptional<z.ZodObject<{
223
+ enabled: z.ZodBoolean;
224
+ productId: z.ZodOptional<z.ZodString>;
225
+ trialPeriodDays: z.ZodOptional<z.ZodNumber>;
226
+ }, z.core.$strip>>;
227
+ publishableKey: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
228
+ secretKey: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
229
+ webhookSecret: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
230
+ }, z.core.$strip>;
231
+ }, z.core.$strip>;
232
+ }, z.core.$strip>;
233
+ export declare const coreConfigSchema: z.ZodObject<{
234
+ version: z.ZodString;
235
+ environment: z.ZodString;
236
+ server: z.ZodObject<{
237
+ host: z.ZodString;
238
+ signUpsOpen: z.ZodBoolean;
239
+ publicContent: z.ZodBoolean;
240
+ maxProfiles: z.ZodOptional<z.ZodNumber>;
241
+ }, z.core.$strip>;
242
+ db: z.ZodObject<{
243
+ url: z.ZodString;
244
+ databaseName: z.ZodOptional<z.ZodString>;
245
+ databaseUrl: z.ZodString;
246
+ }, z.core.$strip>;
247
+ redis: z.ZodObject<{
248
+ host: z.ZodString;
249
+ }, z.core.$strip>;
250
+ email: z.ZodObject<{
251
+ service: z.ZodString;
252
+ defaultTemplatePath: z.ZodString;
253
+ defaultFrom: z.ZodOptional<z.ZodString>;
254
+ transportConfig: z.ZodObject<{
255
+ host: z.ZodString;
256
+ port: z.ZodNumber;
257
+ secure: z.ZodDefault<z.ZodBoolean>;
258
+ auth: z.ZodOptional<z.ZodObject<{
259
+ user: z.ZodOptional<z.ZodString>;
260
+ pass: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
261
+ }, z.core.$strip>>;
262
+ }, z.core.$strip>;
263
+ }, z.core.$strip>;
264
+ logs: z.ZodObject<{
265
+ local: z.ZodObject<{
266
+ path: z.ZodString;
267
+ }, z.core.$strip>;
268
+ }, z.core.$strip>;
269
+ media: z.ZodObject<{
270
+ storage: z.ZodObject<{
271
+ driver: z.ZodEnum<{
272
+ openpeeps: "openpeeps";
273
+ }>;
274
+ params: z.ZodObject<{
275
+ path: z.ZodString;
276
+ prefix: z.ZodString;
277
+ host: z.ZodOptional<z.ZodString>;
278
+ }, z.core.$strip>;
279
+ }, z.core.$strip>;
280
+ }, z.core.$strip>;
281
+ network: z.ZodObject<{
282
+ port: z.ZodNumber;
283
+ }, z.core.$strip>;
284
+ plugins: z.ZodObject<{
285
+ path: z.ZodString;
286
+ }, z.core.$strip>;
287
+ secrets: z.ZodObject<{
288
+ jwt: z.ZodString | z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
289
+ }, z.core.$strip>;
290
+ jams: z.ZodObject<{
291
+ livekit: z.ZodObject<{
292
+ url: z.ZodString;
293
+ apiKey: z.ZodOptional<z.ZodString>;
294
+ apiSecret: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
295
+ recordingEnabled: z.ZodOptional<z.ZodBoolean>;
296
+ }, z.core.$strip>;
297
+ }, z.core.$strip>;
298
+ vapid: z.ZodObject<{
299
+ privateKey: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
300
+ publicKey: z.ZodOptional<z.ZodString>;
301
+ }, z.core.$strip>;
302
+ federation: z.ZodObject<{
303
+ active: z.ZodBoolean;
304
+ }, z.core.$strip>;
305
+ activityPub: z.ZodObject<{
306
+ defaultDomain: z.ZodString;
307
+ itemsPerPage: z.ZodNumber;
308
+ threadDepth: z.ZodNumber;
309
+ federation: z.ZodObject<{
310
+ requestTimeout: z.ZodNumber;
311
+ }, z.core.$strip>;
312
+ }, z.core.$strip>;
313
+ sso: z.ZodObject<{
314
+ generic: z.ZodArray<z.ZodDefault<z.ZodObject<{
315
+ userProfileRequest: z.ZodObject<{
316
+ url: z.ZodString;
317
+ authHeader: z.ZodOptional<z.ZodString>;
318
+ }, z.core.$strip>;
319
+ userProfilePaths: z.ZodObject<{
320
+ email: z.ZodString;
321
+ handle: z.ZodOptional<z.ZodString>;
322
+ avatar: z.ZodOptional<z.ZodString>;
323
+ displayName: z.ZodOptional<z.ZodString>;
324
+ }, z.core.$strip>;
325
+ createAccounts: z.ZodOptional<z.ZodBoolean>;
326
+ createProfiles: z.ZodOptional<z.ZodBoolean>;
327
+ }, z.core.$strip>>>;
328
+ oidc: z.ZodArray<z.ZodDefault<z.ZodObject<{
329
+ id: z.ZodString;
330
+ name: z.ZodString;
331
+ authorizationUrl: z.ZodString;
332
+ tokenUrl: z.ZodString;
333
+ userinfoUrl: z.ZodString;
334
+ jwksUri: z.ZodOptional<z.ZodString>;
335
+ clientId: z.ZodString;
336
+ clientSecret: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
337
+ scope: z.ZodOptional<z.ZodString>;
338
+ claimMapping: z.ZodOptional<z.ZodObject<{
339
+ email: z.ZodOptional<z.ZodString>;
340
+ handle: z.ZodOptional<z.ZodString>;
341
+ displayName: z.ZodOptional<z.ZodString>;
342
+ avatar: z.ZodOptional<z.ZodString>;
343
+ }, z.core.$strip>>;
344
+ approvalRequired: z.ZodOptional<z.ZodBoolean>;
345
+ }, z.core.$strip>>>;
346
+ }, z.core.$strip>;
347
+ services: z.ZodObject<{
348
+ sentry: z.ZodObject<{
349
+ enabled: z.ZodBoolean;
350
+ dsn: z.ZodOptional<z.ZodString>;
351
+ replayEnabled: z.ZodOptional<z.ZodBoolean>;
352
+ }, z.core.$strip>;
353
+ location: z.ZodObject<{
354
+ type: z.ZodString;
355
+ url: z.ZodString;
356
+ apiKey: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
357
+ }, z.core.$strip>;
358
+ }, z.core.$strip>;
359
+ apps: z.ZodObject<{
360
+ ios: z.ZodObject<{
361
+ url: z.ZodOptional<z.ZodString>;
362
+ bundleIdentifier: z.ZodOptional<z.ZodString>;
363
+ teamId: z.ZodOptional<z.ZodString>;
364
+ appId: z.ZodOptional<z.ZodString>;
365
+ apnKeyId: z.ZodOptional<z.ZodString>;
366
+ apnSigningKey: z.ZodOptional<z.ZodString>;
367
+ }, z.core.$strip>;
368
+ android: z.ZodObject<{
369
+ url: z.ZodOptional<z.ZodString>;
370
+ packageName: z.ZodOptional<z.ZodString>;
371
+ appId: z.ZodOptional<z.ZodString>;
372
+ fcmCredentials: z.ZodOptional<z.ZodString>;
373
+ }, z.core.$strip>;
374
+ }, z.core.$strip>;
375
+ payments: z.ZodObject<{
376
+ stripe: z.ZodObject<{
377
+ paidMembership: z.ZodOptional<z.ZodObject<{
378
+ enabled: z.ZodBoolean;
379
+ productId: z.ZodOptional<z.ZodString>;
380
+ trialPeriodDays: z.ZodOptional<z.ZodNumber>;
381
+ }, z.core.$strip>>;
382
+ publishableKey: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
383
+ secretKey: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
384
+ webhookSecret: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
385
+ }, z.core.$strip>;
386
+ }, z.core.$strip>;
387
+ }, z.core.$strip>;
388
+ export declare const coreConfigSanitizedSchema: z.ZodObject<{
389
+ version: z.ZodString;
390
+ environment: z.ZodString;
391
+ server: z.ZodObject<{
392
+ host: z.ZodString;
393
+ signUpsOpen: z.ZodBoolean;
394
+ publicContent: z.ZodBoolean;
395
+ maxProfiles: z.ZodOptional<z.ZodNumber>;
396
+ }, z.core.$strip>;
397
+ db: z.ZodObject<{
398
+ url: z.ZodString;
399
+ databaseName: z.ZodOptional<z.ZodString>;
400
+ databaseUrl: z.ZodString;
401
+ }, z.core.$strip>;
402
+ redis: z.ZodObject<{
403
+ host: z.ZodString;
404
+ }, z.core.$strip>;
405
+ email: z.ZodObject<{
406
+ service: z.ZodString;
407
+ defaultTemplatePath: z.ZodString;
408
+ defaultFrom: z.ZodOptional<z.ZodString>;
409
+ transportConfig: z.ZodObject<{
410
+ host: z.ZodString;
411
+ port: z.ZodNumber;
412
+ secure: z.ZodDefault<z.ZodBoolean>;
413
+ auth: z.ZodOptional<z.ZodObject<{
414
+ user: z.ZodOptional<z.ZodString>;
415
+ pass: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
416
+ }, z.core.$strip>>;
417
+ }, z.core.$strip>;
418
+ }, z.core.$strip>;
419
+ logs: z.ZodObject<{
420
+ local: z.ZodObject<{
421
+ path: z.ZodString;
422
+ }, z.core.$strip>;
423
+ }, z.core.$strip>;
424
+ media: z.ZodObject<{
425
+ storage: z.ZodObject<{
426
+ driver: z.ZodEnum<{
427
+ openpeeps: "openpeeps";
428
+ }>;
429
+ params: z.ZodObject<{
430
+ path: z.ZodString;
431
+ prefix: z.ZodString;
432
+ host: z.ZodOptional<z.ZodString>;
433
+ }, z.core.$strip>;
434
+ }, z.core.$strip>;
435
+ }, z.core.$strip>;
436
+ network: z.ZodObject<{
437
+ port: z.ZodNumber;
438
+ }, z.core.$strip>;
439
+ plugins: z.ZodObject<{
440
+ path: z.ZodString;
441
+ }, z.core.$strip>;
442
+ secrets: z.ZodObject<{
443
+ jwt: z.ZodString | z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
444
+ }, z.core.$strip>;
445
+ jams: z.ZodObject<{
446
+ livekit: z.ZodObject<{
447
+ url: z.ZodString;
448
+ apiKey: z.ZodOptional<z.ZodString>;
449
+ apiSecret: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
450
+ recordingEnabled: z.ZodOptional<z.ZodBoolean>;
451
+ }, z.core.$strip>;
452
+ }, z.core.$strip>;
453
+ vapid: z.ZodObject<{
454
+ privateKey: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
455
+ publicKey: z.ZodOptional<z.ZodString>;
456
+ }, z.core.$strip>;
457
+ federation: z.ZodObject<{
458
+ active: z.ZodBoolean;
459
+ }, z.core.$strip>;
460
+ activityPub: z.ZodObject<{
461
+ defaultDomain: z.ZodString;
462
+ itemsPerPage: z.ZodNumber;
463
+ threadDepth: z.ZodNumber;
464
+ federation: z.ZodObject<{
465
+ requestTimeout: z.ZodNumber;
466
+ }, z.core.$strip>;
467
+ }, z.core.$strip>;
468
+ sso: z.ZodObject<{
469
+ generic: z.ZodArray<z.ZodDefault<z.ZodObject<{
470
+ userProfileRequest: z.ZodObject<{
471
+ url: z.ZodString;
472
+ authHeader: z.ZodOptional<z.ZodString>;
473
+ }, z.core.$strip>;
474
+ userProfilePaths: z.ZodObject<{
475
+ email: z.ZodString;
476
+ handle: z.ZodOptional<z.ZodString>;
477
+ avatar: z.ZodOptional<z.ZodString>;
478
+ displayName: z.ZodOptional<z.ZodString>;
479
+ }, z.core.$strip>;
480
+ createAccounts: z.ZodOptional<z.ZodBoolean>;
481
+ createProfiles: z.ZodOptional<z.ZodBoolean>;
482
+ }, z.core.$strip>>>;
483
+ oidc: z.ZodArray<z.ZodDefault<z.ZodObject<{
484
+ id: z.ZodString;
485
+ name: z.ZodString;
486
+ authorizationUrl: z.ZodString;
487
+ tokenUrl: z.ZodString;
488
+ userinfoUrl: z.ZodString;
489
+ jwksUri: z.ZodOptional<z.ZodString>;
490
+ clientId: z.ZodString;
491
+ clientSecret: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
492
+ scope: z.ZodOptional<z.ZodString>;
493
+ claimMapping: z.ZodOptional<z.ZodObject<{
494
+ email: z.ZodOptional<z.ZodString>;
495
+ handle: z.ZodOptional<z.ZodString>;
496
+ displayName: z.ZodOptional<z.ZodString>;
497
+ avatar: z.ZodOptional<z.ZodString>;
498
+ }, z.core.$strip>>;
499
+ approvalRequired: z.ZodOptional<z.ZodBoolean>;
500
+ }, z.core.$strip>>>;
501
+ }, z.core.$strip>;
502
+ services: z.ZodObject<{
503
+ sentry: z.ZodObject<{
504
+ enabled: z.ZodBoolean;
505
+ dsn: z.ZodOptional<z.ZodString>;
506
+ replayEnabled: z.ZodOptional<z.ZodBoolean>;
507
+ }, z.core.$strip>;
508
+ location: z.ZodObject<{
509
+ type: z.ZodString;
510
+ url: z.ZodString;
511
+ apiKey: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
512
+ }, z.core.$strip>;
513
+ }, z.core.$strip>;
514
+ apps: z.ZodObject<{
515
+ ios: z.ZodObject<{
516
+ url: z.ZodOptional<z.ZodString>;
517
+ bundleIdentifier: z.ZodOptional<z.ZodString>;
518
+ teamId: z.ZodOptional<z.ZodString>;
519
+ appId: z.ZodOptional<z.ZodString>;
520
+ apnKeyId: z.ZodOptional<z.ZodString>;
521
+ apnSigningKey: z.ZodOptional<z.ZodString>;
522
+ }, z.core.$strip>;
523
+ android: z.ZodObject<{
524
+ url: z.ZodOptional<z.ZodString>;
525
+ packageName: z.ZodOptional<z.ZodString>;
526
+ appId: z.ZodOptional<z.ZodString>;
527
+ fcmCredentials: z.ZodOptional<z.ZodString>;
528
+ }, z.core.$strip>;
529
+ }, z.core.$strip>;
530
+ payments: z.ZodObject<{
531
+ stripe: z.ZodObject<{
532
+ paidMembership: z.ZodOptional<z.ZodObject<{
533
+ enabled: z.ZodBoolean;
534
+ productId: z.ZodOptional<z.ZodString>;
535
+ trialPeriodDays: z.ZodOptional<z.ZodNumber>;
536
+ }, z.core.$strip>>;
537
+ publishableKey: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
538
+ secretKey: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
539
+ webhookSecret: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
540
+ }, z.core.$strip>;
541
+ }, z.core.$strip>;
542
+ }, z.core.$strip>;
543
+ export type CoreConfig = z.infer<typeof coreConfigSchema>;
544
+ export declare const communityConfigSchemaFactory: (_sanitize?: boolean) => z.ZodObject<{
545
+ theme: z.ZodObject<{
546
+ base: z.ZodString;
547
+ icon: z.ZodOptional<z.ZodString>;
548
+ mobileIcon: z.ZodOptional<z.ZodString>;
549
+ primaryHex: z.ZodString;
550
+ logoFull: z.ZodOptional<z.ZodString>;
551
+ logoSmall: z.ZodOptional<z.ZodString>;
552
+ defaultProfileAvatar: z.ZodOptional<z.ZodString>;
553
+ defaultGroupAvatar: z.ZodOptional<z.ZodString>;
554
+ backgroundAuth: z.ZodOptional<z.ZodString>;
555
+ background: z.ZodOptional<z.ZodString>;
556
+ light: z.ZodObject<{
557
+ primaryHex: z.ZodString;
558
+ logoSmall: z.ZodOptional<z.ZodString>;
559
+ defaultProfileAvatar: z.ZodOptional<z.ZodString>;
560
+ defaultGroupAvatar: z.ZodOptional<z.ZodString>;
561
+ backgroundAuth: z.ZodOptional<z.ZodString>;
562
+ background: z.ZodOptional<z.ZodString>;
563
+ }, z.core.$strip>;
564
+ dark: z.ZodObject<{
565
+ primaryHex: z.ZodString;
566
+ logoSmall: z.ZodOptional<z.ZodString>;
567
+ defaultProfileAvatar: z.ZodOptional<z.ZodString>;
568
+ defaultGroupAvatar: z.ZodOptional<z.ZodString>;
569
+ backgroundAuth: z.ZodOptional<z.ZodString>;
570
+ background: z.ZodOptional<z.ZodString>;
571
+ }, z.core.$strip>;
572
+ }, z.core.$strip>;
573
+ profiles: z.ZodOptional<z.ZodObject<{
574
+ additionalFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
575
+ key: z.ZodString;
576
+ label: z.ZodString;
577
+ icon: z.ZodOptional<z.ZodString>;
578
+ linkPattern: z.ZodOptional<z.ZodString>;
579
+ }, z.core.$strip>>>;
580
+ }, z.core.$strip>>;
581
+ info: z.ZodObject<{
582
+ name: z.ZodString;
583
+ tagLine: z.ZodString;
584
+ contactEmail: z.ZodOptional<z.ZodString>;
585
+ privacyPolicy: z.ZodOptional<z.ZodString>;
586
+ termsAndConditions: z.ZodOptional<z.ZodString>;
587
+ }, z.core.$strip>;
588
+ content: z.ZodObject<{
589
+ aboutPage: z.ZodOptional<z.ZodString>;
590
+ welcomePage: z.ZodOptional<z.ZodString>;
591
+ codeOfConduct: z.ZodOptional<z.ZodString>;
592
+ welcomeEmail: z.ZodOptional<z.ZodString>;
593
+ pinnedPost: z.ZodOptional<z.ZodString>;
594
+ }, z.core.$strip>;
595
+ settings: z.ZodObject<{
596
+ openRegistrations: z.ZodBoolean;
597
+ defaultLanguage: z.ZodOptional<z.ZodString>;
598
+ }, z.core.$strip>;
599
+ roles: z.ZodObject<{
600
+ onRegistration: z.ZodObject<{
601
+ add: z.ZodArray<z.ZodString>;
602
+ remove: z.ZodArray<z.ZodString>;
603
+ }, z.core.$strip>;
604
+ onEmailValidation: z.ZodObject<{
605
+ add: z.ZodArray<z.ZodString>;
606
+ remove: z.ZodArray<z.ZodString>;
607
+ }, z.core.$strip>;
608
+ }, z.core.$strip>;
609
+ }, z.core.$strip>;
610
+ export declare const communityConfigSchema: z.ZodObject<{
611
+ theme: z.ZodObject<{
612
+ base: z.ZodString;
613
+ icon: z.ZodOptional<z.ZodString>;
614
+ mobileIcon: z.ZodOptional<z.ZodString>;
615
+ primaryHex: z.ZodString;
616
+ logoFull: z.ZodOptional<z.ZodString>;
617
+ logoSmall: z.ZodOptional<z.ZodString>;
618
+ defaultProfileAvatar: z.ZodOptional<z.ZodString>;
619
+ defaultGroupAvatar: z.ZodOptional<z.ZodString>;
620
+ backgroundAuth: z.ZodOptional<z.ZodString>;
621
+ background: z.ZodOptional<z.ZodString>;
622
+ light: z.ZodObject<{
623
+ primaryHex: z.ZodString;
624
+ logoSmall: z.ZodOptional<z.ZodString>;
625
+ defaultProfileAvatar: z.ZodOptional<z.ZodString>;
626
+ defaultGroupAvatar: z.ZodOptional<z.ZodString>;
627
+ backgroundAuth: z.ZodOptional<z.ZodString>;
628
+ background: z.ZodOptional<z.ZodString>;
629
+ }, z.core.$strip>;
630
+ dark: z.ZodObject<{
631
+ primaryHex: z.ZodString;
632
+ logoSmall: z.ZodOptional<z.ZodString>;
633
+ defaultProfileAvatar: z.ZodOptional<z.ZodString>;
634
+ defaultGroupAvatar: z.ZodOptional<z.ZodString>;
635
+ backgroundAuth: z.ZodOptional<z.ZodString>;
636
+ background: z.ZodOptional<z.ZodString>;
637
+ }, z.core.$strip>;
638
+ }, z.core.$strip>;
639
+ profiles: z.ZodOptional<z.ZodObject<{
640
+ additionalFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
641
+ key: z.ZodString;
642
+ label: z.ZodString;
643
+ icon: z.ZodOptional<z.ZodString>;
644
+ linkPattern: z.ZodOptional<z.ZodString>;
645
+ }, z.core.$strip>>>;
646
+ }, z.core.$strip>>;
647
+ info: z.ZodObject<{
648
+ name: z.ZodString;
649
+ tagLine: z.ZodString;
650
+ contactEmail: z.ZodOptional<z.ZodString>;
651
+ privacyPolicy: z.ZodOptional<z.ZodString>;
652
+ termsAndConditions: z.ZodOptional<z.ZodString>;
653
+ }, z.core.$strip>;
654
+ content: z.ZodObject<{
655
+ aboutPage: z.ZodOptional<z.ZodString>;
656
+ welcomePage: z.ZodOptional<z.ZodString>;
657
+ codeOfConduct: z.ZodOptional<z.ZodString>;
658
+ welcomeEmail: z.ZodOptional<z.ZodString>;
659
+ pinnedPost: z.ZodOptional<z.ZodString>;
660
+ }, z.core.$strip>;
661
+ settings: z.ZodObject<{
662
+ openRegistrations: z.ZodBoolean;
663
+ defaultLanguage: z.ZodOptional<z.ZodString>;
664
+ }, z.core.$strip>;
665
+ roles: z.ZodObject<{
666
+ onRegistration: z.ZodObject<{
667
+ add: z.ZodArray<z.ZodString>;
668
+ remove: z.ZodArray<z.ZodString>;
669
+ }, z.core.$strip>;
670
+ onEmailValidation: z.ZodObject<{
671
+ add: z.ZodArray<z.ZodString>;
672
+ remove: z.ZodArray<z.ZodString>;
673
+ }, z.core.$strip>;
674
+ }, z.core.$strip>;
675
+ }, z.core.$strip>;
676
+ export declare const communityConfigSanitizedSchema: z.ZodObject<{
677
+ theme: z.ZodObject<{
678
+ base: z.ZodString;
679
+ icon: z.ZodOptional<z.ZodString>;
680
+ mobileIcon: z.ZodOptional<z.ZodString>;
681
+ primaryHex: z.ZodString;
682
+ logoFull: z.ZodOptional<z.ZodString>;
683
+ logoSmall: z.ZodOptional<z.ZodString>;
684
+ defaultProfileAvatar: z.ZodOptional<z.ZodString>;
685
+ defaultGroupAvatar: z.ZodOptional<z.ZodString>;
686
+ backgroundAuth: z.ZodOptional<z.ZodString>;
687
+ background: z.ZodOptional<z.ZodString>;
688
+ light: z.ZodObject<{
689
+ primaryHex: z.ZodString;
690
+ logoSmall: z.ZodOptional<z.ZodString>;
691
+ defaultProfileAvatar: z.ZodOptional<z.ZodString>;
692
+ defaultGroupAvatar: z.ZodOptional<z.ZodString>;
693
+ backgroundAuth: z.ZodOptional<z.ZodString>;
694
+ background: z.ZodOptional<z.ZodString>;
695
+ }, z.core.$strip>;
696
+ dark: z.ZodObject<{
697
+ primaryHex: z.ZodString;
698
+ logoSmall: z.ZodOptional<z.ZodString>;
699
+ defaultProfileAvatar: z.ZodOptional<z.ZodString>;
700
+ defaultGroupAvatar: z.ZodOptional<z.ZodString>;
701
+ backgroundAuth: z.ZodOptional<z.ZodString>;
702
+ background: z.ZodOptional<z.ZodString>;
703
+ }, z.core.$strip>;
704
+ }, z.core.$strip>;
705
+ profiles: z.ZodOptional<z.ZodObject<{
706
+ additionalFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
707
+ key: z.ZodString;
708
+ label: z.ZodString;
709
+ icon: z.ZodOptional<z.ZodString>;
710
+ linkPattern: z.ZodOptional<z.ZodString>;
711
+ }, z.core.$strip>>>;
712
+ }, z.core.$strip>>;
713
+ info: z.ZodObject<{
714
+ name: z.ZodString;
715
+ tagLine: z.ZodString;
716
+ contactEmail: z.ZodOptional<z.ZodString>;
717
+ privacyPolicy: z.ZodOptional<z.ZodString>;
718
+ termsAndConditions: z.ZodOptional<z.ZodString>;
719
+ }, z.core.$strip>;
720
+ content: z.ZodObject<{
721
+ aboutPage: z.ZodOptional<z.ZodString>;
722
+ welcomePage: z.ZodOptional<z.ZodString>;
723
+ codeOfConduct: z.ZodOptional<z.ZodString>;
724
+ welcomeEmail: z.ZodOptional<z.ZodString>;
725
+ pinnedPost: z.ZodOptional<z.ZodString>;
726
+ }, z.core.$strip>;
727
+ settings: z.ZodObject<{
728
+ openRegistrations: z.ZodBoolean;
729
+ defaultLanguage: z.ZodOptional<z.ZodString>;
730
+ }, z.core.$strip>;
731
+ roles: z.ZodObject<{
732
+ onRegistration: z.ZodObject<{
733
+ add: z.ZodArray<z.ZodString>;
734
+ remove: z.ZodArray<z.ZodString>;
735
+ }, z.core.$strip>;
736
+ onEmailValidation: z.ZodObject<{
737
+ add: z.ZodArray<z.ZodString>;
738
+ remove: z.ZodArray<z.ZodString>;
739
+ }, z.core.$strip>;
740
+ }, z.core.$strip>;
741
+ }, z.core.$strip>;
742
+ export type CommunityConfig = z.infer<typeof communityConfigSchema>;
743
+ export declare const capabilitiesSchema: z.ZodOptional<z.ZodObject<{
744
+ add: z.ZodOptional<z.ZodArray<z.ZodString>>;
745
+ remove: z.ZodOptional<z.ZodArray<z.ZodString>>;
746
+ }, z.core.$strip>>;
747
+ export type Capabilities = z.infer<typeof capabilitiesSchema>;
748
+ export declare const capabilitiesConfigSchema: z.ZodObject<{
749
+ post: z.ZodObject<{
750
+ [x: string]: z.ZodDefault<z.ZodOptional<z.ZodObject<{
751
+ add: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
752
+ [x: string]: string;
753
+ }>>>>;
754
+ remove: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
755
+ [x: string]: string;
756
+ }>>>>;
757
+ }, z.core.$strip>>>;
758
+ }, z.core.$strip>;
759
+ profile: z.ZodObject<{
760
+ [x: string]: z.ZodDefault<z.ZodOptional<z.ZodObject<{
761
+ add: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
762
+ [x: string]: string;
763
+ }>>>>;
764
+ remove: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
765
+ [x: string]: string;
766
+ }>>>>;
767
+ }, z.core.$strip>>>;
768
+ }, z.core.$strip>;
769
+ report: z.ZodObject<{
770
+ [x: string]: z.ZodDefault<z.ZodOptional<z.ZodObject<{
771
+ add: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
772
+ [x: string]: string;
773
+ }>>>>;
774
+ remove: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
775
+ [x: string]: string;
776
+ }>>>>;
777
+ }, z.core.$strip>>>;
778
+ }, z.core.$strip>;
779
+ accessToken: z.ZodObject<{
780
+ [x: string]: z.ZodDefault<z.ZodOptional<z.ZodObject<{
781
+ add: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
782
+ [x: string]: string;
783
+ }>>>>;
784
+ remove: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
785
+ [x: string]: string;
786
+ }>>>>;
787
+ }, z.core.$strip>>>;
788
+ }, z.core.$strip>;
789
+ }, z.core.$strip>;
790
+ export declare const capabilitiesConfigSchemaFactory: (_sanitize?: boolean) => z.ZodObject<{
791
+ post: z.ZodObject<{
792
+ [x: string]: z.ZodDefault<z.ZodOptional<z.ZodObject<{
793
+ add: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
794
+ [x: string]: string;
795
+ }>>>>;
796
+ remove: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
797
+ [x: string]: string;
798
+ }>>>>;
799
+ }, z.core.$strip>>>;
800
+ }, z.core.$strip>;
801
+ profile: z.ZodObject<{
802
+ [x: string]: z.ZodDefault<z.ZodOptional<z.ZodObject<{
803
+ add: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
804
+ [x: string]: string;
805
+ }>>>>;
806
+ remove: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
807
+ [x: string]: string;
808
+ }>>>>;
809
+ }, z.core.$strip>>>;
810
+ }, z.core.$strip>;
811
+ report: z.ZodObject<{
812
+ [x: string]: z.ZodDefault<z.ZodOptional<z.ZodObject<{
813
+ add: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
814
+ [x: string]: string;
815
+ }>>>>;
816
+ remove: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
817
+ [x: string]: string;
818
+ }>>>>;
819
+ }, z.core.$strip>>>;
820
+ }, z.core.$strip>;
821
+ accessToken: z.ZodObject<{
822
+ [x: string]: z.ZodDefault<z.ZodOptional<z.ZodObject<{
823
+ add: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
824
+ [x: string]: string;
825
+ }>>>>;
826
+ remove: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
827
+ [x: string]: string;
828
+ }>>>>;
829
+ }, z.core.$strip>>>;
830
+ }, z.core.$strip>;
831
+ }, z.core.$strip>;
832
+ export type CapabilitiesConfig = z.infer<typeof capabilitiesConfigSchema>;
833
+ export type CapabilitiesConfigInput = z.input<typeof capabilitiesConfigSchema>;
834
+ export interface MediaStorage {
835
+ store: (data: ArrayBuffer | SharedArrayBuffer) => Promise<string>;
836
+ /**
837
+ * Stream-based variant of {@link MediaStorage.store}. Consumes the given
838
+ * web `ReadableStream`, hashes its bytes while writing them straight to disk,
839
+ * and resolves to the resulting content-addressed key plus the byte count
840
+ * that was actually written. This avoids buffering the full payload in
841
+ * memory before persisting it, which matters for large media uploads.
842
+ *
843
+ * The chunk type is intentionally untyped here: the DOM lib's
844
+ * `ReadableStream<Uint8Array>` and `node:stream/web`'s ditto are
845
+ * structurally identical at runtime but TypeScript treats them as
846
+ * incompatible, so leaving the chunk type open keeps both call sites
847
+ * — `File.stream()` in the request handler and `Readable.fromWeb` in the
848
+ * Node implementation — assignable without explicit casts at the boundary.
849
+ */
850
+ storeStream: (stream: ReadableStream) => Promise<{
851
+ key: string;
852
+ size: number;
853
+ }>;
854
+ getPath: (id: string, filename: string) => string;
855
+ getStream: (id: string) => Promise<ReadableStream>;
856
+ getData: (id: string) => Promise<ArrayBuffer | SharedArrayBuffer>;
857
+ isLocal: () => boolean;
858
+ }