@holo-js/core 0.1.1 → 0.1.3
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/chunk-AD2ZYGLN.mjs +2741 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.mjs +29 -14
- package/dist/runtime/index.d.ts +805 -3
- package/dist/runtime/index.mjs +13 -1
- package/package.json +59 -7
- package/dist/chunk-SVCNZBIQ.mjs +0 -703
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { HoloConfigMap, LoadedHoloConfig, DotPath, ValueAtPath } from '@holo-js/config';
|
|
2
|
-
import { QueueRuntimeBinding } from '@holo-js/queue';
|
|
3
2
|
import { resolveRuntimeConnectionManagerOptions } from '@holo-js/db';
|
|
4
3
|
export { RuntimeConfigInput, RuntimeConnectionConfig, RuntimeDatabaseConfig, RuntimeHoloConfig, SupportedDatabaseDriver, createAdapter, createDialect, createRuntimeConnectionOptions, createRuntimeLogger, isSupportedDatabaseDriver, parseDatabaseDriver, resolveRuntimeConnectionManagerOptions } from '@holo-js/db';
|
|
5
4
|
|
|
@@ -43,6 +42,36 @@ interface GeneratedListenerRegistryEntry {
|
|
|
43
42
|
readonly eventNames: readonly string[];
|
|
44
43
|
readonly exportName?: string;
|
|
45
44
|
}
|
|
45
|
+
interface GeneratedBroadcastRegistryEntry {
|
|
46
|
+
readonly sourcePath: string;
|
|
47
|
+
readonly name: string;
|
|
48
|
+
readonly exportName?: string;
|
|
49
|
+
readonly channels: readonly {
|
|
50
|
+
readonly type: 'public' | 'private' | 'presence';
|
|
51
|
+
readonly pattern: string;
|
|
52
|
+
}[];
|
|
53
|
+
}
|
|
54
|
+
interface GeneratedChannelRegistryEntry {
|
|
55
|
+
readonly sourcePath: string;
|
|
56
|
+
readonly pattern: string;
|
|
57
|
+
readonly exportName?: string;
|
|
58
|
+
readonly type: 'private' | 'presence';
|
|
59
|
+
readonly params: readonly string[];
|
|
60
|
+
readonly whispers: readonly string[];
|
|
61
|
+
}
|
|
62
|
+
interface GeneratedAuthorizationPolicyRegistryEntry {
|
|
63
|
+
readonly sourcePath: string;
|
|
64
|
+
readonly name: string;
|
|
65
|
+
readonly exportName?: string;
|
|
66
|
+
readonly target: string;
|
|
67
|
+
readonly classActions: readonly string[];
|
|
68
|
+
readonly recordActions: readonly string[];
|
|
69
|
+
}
|
|
70
|
+
interface GeneratedAuthorizationAbilityRegistryEntry {
|
|
71
|
+
readonly sourcePath: string;
|
|
72
|
+
readonly name: string;
|
|
73
|
+
readonly exportName?: string;
|
|
74
|
+
}
|
|
46
75
|
interface GeneratedProjectRegistry {
|
|
47
76
|
readonly version: 1;
|
|
48
77
|
readonly generatedAt: string;
|
|
@@ -54,6 +83,10 @@ interface GeneratedProjectRegistry {
|
|
|
54
83
|
readonly jobs: string;
|
|
55
84
|
readonly events: string;
|
|
56
85
|
readonly listeners: string;
|
|
86
|
+
readonly broadcast: string;
|
|
87
|
+
readonly channels: string;
|
|
88
|
+
readonly authorizationPolicies: string;
|
|
89
|
+
readonly authorizationAbilities: string;
|
|
57
90
|
readonly generatedSchema: string;
|
|
58
91
|
};
|
|
59
92
|
readonly models: readonly GeneratedModelRegistryEntry[];
|
|
@@ -63,12 +96,40 @@ interface GeneratedProjectRegistry {
|
|
|
63
96
|
readonly jobs: readonly GeneratedJobRegistryEntry[];
|
|
64
97
|
readonly events: readonly GeneratedEventRegistryEntry[];
|
|
65
98
|
readonly listeners: readonly GeneratedListenerRegistryEntry[];
|
|
99
|
+
readonly broadcast: readonly GeneratedBroadcastRegistryEntry[];
|
|
100
|
+
readonly channels: readonly GeneratedChannelRegistryEntry[];
|
|
101
|
+
readonly authorizationPolicies: readonly GeneratedAuthorizationPolicyRegistryEntry[];
|
|
102
|
+
readonly authorizationAbilities: readonly GeneratedAuthorizationAbilityRegistryEntry[];
|
|
103
|
+
}
|
|
104
|
+
interface GeneratedBroadcastManifestEvent {
|
|
105
|
+
readonly name: string;
|
|
106
|
+
readonly channels: readonly {
|
|
107
|
+
readonly type: 'public' | 'private' | 'presence';
|
|
108
|
+
readonly pattern: string;
|
|
109
|
+
}[];
|
|
110
|
+
}
|
|
111
|
+
interface GeneratedBroadcastManifestChannel {
|
|
112
|
+
readonly name: string;
|
|
113
|
+
readonly pattern: string;
|
|
114
|
+
readonly type: 'private' | 'presence';
|
|
115
|
+
readonly params: readonly string[];
|
|
116
|
+
readonly whispers: readonly string[];
|
|
117
|
+
readonly member?: Readonly<Record<string, unknown>>;
|
|
118
|
+
}
|
|
119
|
+
interface GeneratedBroadcastManifest {
|
|
120
|
+
readonly version: 1;
|
|
121
|
+
readonly generatedAt: string;
|
|
122
|
+
readonly events: readonly GeneratedBroadcastManifestEvent[];
|
|
123
|
+
readonly channels: readonly GeneratedBroadcastManifestChannel[];
|
|
66
124
|
}
|
|
67
125
|
declare function normalizeLegacyGeneratedProjectRegistry(value: Record<string, unknown>): void;
|
|
68
126
|
declare function isGeneratedProjectRegistry(value: unknown): value is GeneratedProjectRegistry;
|
|
69
127
|
declare function resolveGeneratedProjectRegistryPath(projectRoot: string): string;
|
|
70
128
|
declare function loadGeneratedProjectRegistry(projectRoot: string): Promise<GeneratedProjectRegistry | undefined>;
|
|
129
|
+
declare function createGeneratedBroadcastManifest(registry: Pick<GeneratedProjectRegistry, 'generatedAt' | 'broadcast' | 'channels'>): GeneratedBroadcastManifest;
|
|
130
|
+
declare function loadGeneratedBroadcastManifest(projectRoot: string): Promise<GeneratedBroadcastManifest | undefined>;
|
|
71
131
|
declare const registryInternals: {
|
|
132
|
+
createGeneratedBroadcastManifest: typeof createGeneratedBroadcastManifest;
|
|
72
133
|
isGeneratedProjectRegistry: typeof isGeneratedProjectRegistry;
|
|
73
134
|
normalizeLegacyGeneratedProjectRegistry: typeof normalizeLegacyGeneratedProjectRegistry;
|
|
74
135
|
};
|
|
@@ -78,12 +139,518 @@ type PortableRuntimeConfig<TCustom extends HoloConfigMap> = {
|
|
|
78
139
|
readonly db: LoadedHoloConfig<TCustom>['database'];
|
|
79
140
|
readonly queue: LoadedHoloConfig<TCustom>['queue'];
|
|
80
141
|
};
|
|
142
|
+
type CoreNotificationJsonPrimitive = string | number | boolean | null;
|
|
143
|
+
type CoreNotificationJsonValue = CoreNotificationJsonPrimitive | readonly CoreNotificationJsonValue[] | {
|
|
144
|
+
readonly [key: string]: CoreNotificationJsonValue;
|
|
145
|
+
};
|
|
146
|
+
interface CoreNotificationDatabaseRoute {
|
|
147
|
+
readonly id: string | number;
|
|
148
|
+
readonly type: string;
|
|
149
|
+
}
|
|
150
|
+
interface CoreNotificationRecord<TData extends CoreNotificationJsonValue = CoreNotificationJsonValue> {
|
|
151
|
+
readonly id: string;
|
|
152
|
+
readonly type?: string;
|
|
153
|
+
readonly notifiableType: string;
|
|
154
|
+
readonly notifiableId: string | number;
|
|
155
|
+
readonly data: TData;
|
|
156
|
+
readonly readAt?: Date | null;
|
|
157
|
+
readonly createdAt: Date;
|
|
158
|
+
readonly updatedAt: Date;
|
|
159
|
+
}
|
|
160
|
+
interface CoreNotificationStore {
|
|
161
|
+
create(record: CoreNotificationRecord): Promise<void>;
|
|
162
|
+
list(notifiable: CoreNotificationDatabaseRoute): Promise<readonly CoreNotificationRecord[]>;
|
|
163
|
+
unread(notifiable: CoreNotificationDatabaseRoute): Promise<readonly CoreNotificationRecord[]>;
|
|
164
|
+
markAsRead(ids: readonly string[]): Promise<number>;
|
|
165
|
+
markAsUnread(ids: readonly string[]): Promise<number>;
|
|
166
|
+
delete(ids: readonly string[]): Promise<number>;
|
|
167
|
+
}
|
|
168
|
+
interface HoloSessionRuntimeBinding {
|
|
169
|
+
create(input?: {
|
|
170
|
+
readonly store?: string;
|
|
171
|
+
readonly data?: Readonly<Record<string, unknown>>;
|
|
172
|
+
readonly id?: string;
|
|
173
|
+
}): Promise<unknown>;
|
|
174
|
+
write(record: unknown): Promise<unknown>;
|
|
175
|
+
read(sessionId: string, options?: {
|
|
176
|
+
readonly store?: string;
|
|
177
|
+
}): Promise<unknown | null>;
|
|
178
|
+
rotate(sessionId: string, options?: {
|
|
179
|
+
readonly store?: string;
|
|
180
|
+
readonly newId?: string;
|
|
181
|
+
}): Promise<unknown>;
|
|
182
|
+
invalidate(sessionId: string, options?: {
|
|
183
|
+
readonly store?: string;
|
|
184
|
+
}): Promise<void>;
|
|
185
|
+
touch(sessionId: string, options?: {
|
|
186
|
+
readonly store?: string;
|
|
187
|
+
}): Promise<unknown | null>;
|
|
188
|
+
issueRememberMeToken(sessionId: string, options?: {
|
|
189
|
+
readonly store?: string;
|
|
190
|
+
}): Promise<string>;
|
|
191
|
+
consumeRememberMeToken(token: string, options?: {
|
|
192
|
+
readonly store?: string;
|
|
193
|
+
}): Promise<unknown | null>;
|
|
194
|
+
cookie(name: string, value: string, options?: Record<string, unknown>): string;
|
|
195
|
+
sessionCookie(value: string, options?: Record<string, unknown>): string;
|
|
196
|
+
rememberMeCookie(value: string, options?: Record<string, unknown>): string;
|
|
197
|
+
}
|
|
198
|
+
interface HoloAuthRuntimeBinding {
|
|
199
|
+
check(): Promise<boolean>;
|
|
200
|
+
user(): Promise<unknown | null>;
|
|
201
|
+
refreshUser(): Promise<unknown | null>;
|
|
202
|
+
id(): Promise<string | number | null>;
|
|
203
|
+
currentAccessToken(): Promise<unknown | null>;
|
|
204
|
+
hashPassword(password: string): Promise<string>;
|
|
205
|
+
verifyPassword(password: string, digest: string): Promise<boolean>;
|
|
206
|
+
needsPasswordRehash(digest: string): Promise<boolean>;
|
|
207
|
+
login(credentials: Readonly<Record<string, unknown>> & {
|
|
208
|
+
readonly password: string;
|
|
209
|
+
readonly remember?: boolean;
|
|
210
|
+
}): Promise<{
|
|
211
|
+
readonly guard: string;
|
|
212
|
+
readonly user: unknown;
|
|
213
|
+
readonly sessionId: string;
|
|
214
|
+
readonly rememberToken?: string;
|
|
215
|
+
readonly cookies: readonly string[];
|
|
216
|
+
}>;
|
|
217
|
+
loginUsing(user: unknown, options?: {
|
|
218
|
+
readonly remember?: boolean;
|
|
219
|
+
}): Promise<{
|
|
220
|
+
readonly guard: string;
|
|
221
|
+
readonly user: unknown;
|
|
222
|
+
readonly sessionId: string;
|
|
223
|
+
readonly rememberToken?: string;
|
|
224
|
+
readonly cookies: readonly string[];
|
|
225
|
+
}>;
|
|
226
|
+
loginUsingId(userId: string | number, options?: {
|
|
227
|
+
readonly remember?: boolean;
|
|
228
|
+
}): Promise<{
|
|
229
|
+
readonly guard: string;
|
|
230
|
+
readonly user: unknown;
|
|
231
|
+
readonly sessionId: string;
|
|
232
|
+
readonly rememberToken?: string;
|
|
233
|
+
readonly cookies: readonly string[];
|
|
234
|
+
}>;
|
|
235
|
+
impersonate(user: unknown, options?: {
|
|
236
|
+
readonly remember?: boolean;
|
|
237
|
+
readonly actorGuard?: string;
|
|
238
|
+
}): Promise<{
|
|
239
|
+
readonly guard: string;
|
|
240
|
+
readonly user: unknown;
|
|
241
|
+
readonly sessionId: string;
|
|
242
|
+
readonly rememberToken?: string;
|
|
243
|
+
readonly cookies: readonly string[];
|
|
244
|
+
}>;
|
|
245
|
+
impersonateById(userId: string | number, options?: {
|
|
246
|
+
readonly remember?: boolean;
|
|
247
|
+
readonly actorGuard?: string;
|
|
248
|
+
}): Promise<{
|
|
249
|
+
readonly guard: string;
|
|
250
|
+
readonly user: unknown;
|
|
251
|
+
readonly sessionId: string;
|
|
252
|
+
readonly rememberToken?: string;
|
|
253
|
+
readonly cookies: readonly string[];
|
|
254
|
+
}>;
|
|
255
|
+
impersonation(): Promise<unknown | null>;
|
|
256
|
+
stopImpersonating(): Promise<unknown | null>;
|
|
257
|
+
logout(): Promise<{
|
|
258
|
+
readonly guard: string;
|
|
259
|
+
readonly cookies: readonly string[];
|
|
260
|
+
}>;
|
|
261
|
+
register(input: Readonly<Record<string, unknown>> & {
|
|
262
|
+
readonly password: string;
|
|
263
|
+
readonly passwordConfirmation: string;
|
|
264
|
+
readonly remember?: boolean;
|
|
265
|
+
}): Promise<unknown>;
|
|
266
|
+
logoutAll(guardName?: string): Promise<readonly {
|
|
267
|
+
readonly guard: string;
|
|
268
|
+
readonly cookies: readonly string[];
|
|
269
|
+
}[]>;
|
|
270
|
+
guard(name: string): {
|
|
271
|
+
check(): Promise<boolean>;
|
|
272
|
+
user(): Promise<unknown | null>;
|
|
273
|
+
refreshUser(): Promise<unknown | null>;
|
|
274
|
+
id(): Promise<string | number | null>;
|
|
275
|
+
currentAccessToken(): Promise<unknown | null>;
|
|
276
|
+
login(credentials: Readonly<Record<string, unknown>> & {
|
|
277
|
+
readonly password: string;
|
|
278
|
+
readonly remember?: boolean;
|
|
279
|
+
}): Promise<{
|
|
280
|
+
readonly guard: string;
|
|
281
|
+
readonly user: unknown;
|
|
282
|
+
readonly sessionId: string;
|
|
283
|
+
readonly rememberToken?: string;
|
|
284
|
+
readonly cookies: readonly string[];
|
|
285
|
+
}>;
|
|
286
|
+
loginUsing(user: unknown, options?: {
|
|
287
|
+
readonly remember?: boolean;
|
|
288
|
+
}): Promise<{
|
|
289
|
+
readonly guard: string;
|
|
290
|
+
readonly user: unknown;
|
|
291
|
+
readonly sessionId: string;
|
|
292
|
+
readonly rememberToken?: string;
|
|
293
|
+
readonly cookies: readonly string[];
|
|
294
|
+
}>;
|
|
295
|
+
loginUsingId(userId: string | number, options?: {
|
|
296
|
+
readonly remember?: boolean;
|
|
297
|
+
}): Promise<{
|
|
298
|
+
readonly guard: string;
|
|
299
|
+
readonly user: unknown;
|
|
300
|
+
readonly sessionId: string;
|
|
301
|
+
readonly rememberToken?: string;
|
|
302
|
+
readonly cookies: readonly string[];
|
|
303
|
+
}>;
|
|
304
|
+
impersonate(user: unknown, options?: {
|
|
305
|
+
readonly remember?: boolean;
|
|
306
|
+
readonly actorGuard?: string;
|
|
307
|
+
}): Promise<{
|
|
308
|
+
readonly guard: string;
|
|
309
|
+
readonly user: unknown;
|
|
310
|
+
readonly sessionId: string;
|
|
311
|
+
readonly rememberToken?: string;
|
|
312
|
+
readonly cookies: readonly string[];
|
|
313
|
+
}>;
|
|
314
|
+
impersonateById(userId: string | number, options?: {
|
|
315
|
+
readonly remember?: boolean;
|
|
316
|
+
readonly actorGuard?: string;
|
|
317
|
+
}): Promise<{
|
|
318
|
+
readonly guard: string;
|
|
319
|
+
readonly user: unknown;
|
|
320
|
+
readonly sessionId: string;
|
|
321
|
+
readonly rememberToken?: string;
|
|
322
|
+
readonly cookies: readonly string[];
|
|
323
|
+
}>;
|
|
324
|
+
impersonation(): Promise<unknown | null>;
|
|
325
|
+
stopImpersonating(): Promise<unknown | null>;
|
|
326
|
+
logout(): Promise<{
|
|
327
|
+
readonly guard: string;
|
|
328
|
+
readonly cookies: readonly string[];
|
|
329
|
+
}>;
|
|
330
|
+
};
|
|
331
|
+
tokens: {
|
|
332
|
+
create(user: unknown, options: {
|
|
333
|
+
readonly name: string;
|
|
334
|
+
readonly abilities?: readonly string[];
|
|
335
|
+
readonly expiresAt?: Date | null;
|
|
336
|
+
readonly guard?: string;
|
|
337
|
+
}): Promise<unknown>;
|
|
338
|
+
list(user: unknown, options?: {
|
|
339
|
+
readonly guard?: string;
|
|
340
|
+
}): Promise<readonly unknown[]>;
|
|
341
|
+
revoke(options?: {
|
|
342
|
+
readonly guard?: string;
|
|
343
|
+
}): Promise<void>;
|
|
344
|
+
revokeAll(user: unknown, options?: {
|
|
345
|
+
readonly guard?: string;
|
|
346
|
+
}): Promise<number>;
|
|
347
|
+
authenticate(plainTextToken: string): Promise<unknown | null>;
|
|
348
|
+
can(token: string, ability: string): Promise<boolean>;
|
|
349
|
+
};
|
|
350
|
+
verification: {
|
|
351
|
+
create(user: unknown, options?: {
|
|
352
|
+
readonly guard?: string;
|
|
353
|
+
readonly expiresAt?: Date;
|
|
354
|
+
}): Promise<unknown>;
|
|
355
|
+
consume(plainTextToken: string): Promise<unknown>;
|
|
356
|
+
};
|
|
357
|
+
passwords: {
|
|
358
|
+
request(email: string, options?: {
|
|
359
|
+
readonly broker?: string;
|
|
360
|
+
readonly expiresAt?: Date;
|
|
361
|
+
}): Promise<void>;
|
|
362
|
+
consume(input: {
|
|
363
|
+
readonly token: string;
|
|
364
|
+
readonly password: string;
|
|
365
|
+
readonly passwordConfirmation: string;
|
|
366
|
+
}): Promise<unknown>;
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
interface HoloQueueRuntimeBinding {
|
|
370
|
+
readonly config: LoadedHoloConfig['queue'];
|
|
371
|
+
readonly drivers: ReadonlyMap<string, HoloQueueDriverBinding>;
|
|
372
|
+
}
|
|
373
|
+
interface HoloQueueDriverBinding {
|
|
374
|
+
readonly name: string;
|
|
375
|
+
readonly driver: string;
|
|
376
|
+
readonly mode: 'async' | 'sync';
|
|
377
|
+
}
|
|
378
|
+
interface HoloServerViewRenderInput {
|
|
379
|
+
readonly view: string;
|
|
380
|
+
readonly props?: Readonly<Record<string, unknown>>;
|
|
381
|
+
}
|
|
382
|
+
type HoloServerViewRenderer = (input: HoloServerViewRenderInput) => string | Promise<string>;
|
|
383
|
+
type QueueModule = {
|
|
384
|
+
configureQueueRuntime(options: {
|
|
385
|
+
config: LoadedHoloConfig['queue'];
|
|
386
|
+
redisConfig?: LoadedHoloConfig['redis'];
|
|
387
|
+
} & Record<string, unknown>): void;
|
|
388
|
+
getRegisteredQueueJob(name: string): {
|
|
389
|
+
sourcePath?: string;
|
|
390
|
+
} | undefined;
|
|
391
|
+
getQueueRuntime(): HoloQueueRuntimeBinding;
|
|
392
|
+
isQueueJobDefinition(value: unknown): boolean;
|
|
393
|
+
normalizeQueueJobDefinition(value: unknown): NormalizedQueueJobDefinition;
|
|
394
|
+
registerQueueJob(definition: NormalizedQueueJobDefinition, options: {
|
|
395
|
+
name: string;
|
|
396
|
+
sourcePath?: string;
|
|
397
|
+
replaceExisting?: boolean;
|
|
398
|
+
}): void;
|
|
399
|
+
shutdownQueueRuntime(): Promise<void>;
|
|
400
|
+
unregisterQueueJob(name: string): void;
|
|
401
|
+
};
|
|
402
|
+
type SessionModule = {
|
|
403
|
+
configureSessionRuntime(options?: {
|
|
404
|
+
readonly config: LoadedHoloConfig['session'];
|
|
405
|
+
readonly stores: Readonly<Record<string, {
|
|
406
|
+
read(sessionId: string): Promise<unknown | null>;
|
|
407
|
+
write(record: unknown): Promise<void>;
|
|
408
|
+
delete(sessionId: string): Promise<void>;
|
|
409
|
+
}>>;
|
|
410
|
+
}): void;
|
|
411
|
+
createDatabaseSessionStore(adapter: {
|
|
412
|
+
read(sessionId: string): Promise<unknown | null>;
|
|
413
|
+
write(record: unknown): Promise<void>;
|
|
414
|
+
delete(sessionId: string): Promise<void>;
|
|
415
|
+
}): {
|
|
416
|
+
read(sessionId: string): Promise<unknown | null>;
|
|
417
|
+
write(record: unknown): Promise<void>;
|
|
418
|
+
delete(sessionId: string): Promise<void>;
|
|
419
|
+
};
|
|
420
|
+
createFileSessionStore(root: string): {
|
|
421
|
+
read(sessionId: string): Promise<unknown | null>;
|
|
422
|
+
write(record: unknown): Promise<void>;
|
|
423
|
+
delete(sessionId: string): Promise<void>;
|
|
424
|
+
};
|
|
425
|
+
createRedisSessionStore(adapter: SessionRedisAdapter): {
|
|
426
|
+
read(sessionId: string): Promise<unknown | null>;
|
|
427
|
+
write(record: unknown): Promise<void>;
|
|
428
|
+
delete(sessionId: string): Promise<void>;
|
|
429
|
+
};
|
|
430
|
+
getSessionRuntime(): HoloSessionRuntimeBinding;
|
|
431
|
+
resetSessionRuntime(): void;
|
|
432
|
+
};
|
|
433
|
+
type SessionRedisAdapter = {
|
|
434
|
+
connect?(): Promise<void>;
|
|
435
|
+
disconnect?(): Promise<void>;
|
|
436
|
+
get(sessionId: string): Promise<unknown | null>;
|
|
437
|
+
set(record: unknown): Promise<void>;
|
|
438
|
+
del(sessionId: string): Promise<void>;
|
|
439
|
+
close?(): Promise<void>;
|
|
440
|
+
};
|
|
441
|
+
type NotificationsModule = {
|
|
442
|
+
configureNotificationsRuntime(options?: {
|
|
443
|
+
readonly config: LoadedHoloConfig['notifications'];
|
|
444
|
+
readonly mailer?: {
|
|
445
|
+
send(message: {
|
|
446
|
+
readonly subject: string;
|
|
447
|
+
readonly greeting?: string;
|
|
448
|
+
readonly lines?: readonly string[];
|
|
449
|
+
readonly action?: {
|
|
450
|
+
readonly label: string;
|
|
451
|
+
readonly url: string;
|
|
452
|
+
};
|
|
453
|
+
readonly html?: string;
|
|
454
|
+
readonly text?: string;
|
|
455
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
456
|
+
}, context: {
|
|
457
|
+
readonly route?: string | {
|
|
458
|
+
readonly email: string;
|
|
459
|
+
readonly name?: string;
|
|
460
|
+
};
|
|
461
|
+
}): Promise<void>;
|
|
462
|
+
};
|
|
463
|
+
readonly store?: {
|
|
464
|
+
create(record: unknown): Promise<void>;
|
|
465
|
+
list(notifiable: {
|
|
466
|
+
id: string | number;
|
|
467
|
+
type: string;
|
|
468
|
+
}): Promise<readonly unknown[]>;
|
|
469
|
+
unread(notifiable: {
|
|
470
|
+
id: string | number;
|
|
471
|
+
type: string;
|
|
472
|
+
}): Promise<readonly unknown[]>;
|
|
473
|
+
markAsRead(ids: readonly string[]): Promise<number>;
|
|
474
|
+
markAsUnread(ids: readonly string[]): Promise<number>;
|
|
475
|
+
delete(ids: readonly string[]): Promise<number>;
|
|
476
|
+
};
|
|
477
|
+
readonly broadcaster?: ReturnType<typeof createCoreNotificationBroadcaster>;
|
|
478
|
+
}): void;
|
|
479
|
+
getNotificationsRuntimeBindings(): {
|
|
480
|
+
readonly mailer?: {
|
|
481
|
+
send(message: {
|
|
482
|
+
readonly subject: string;
|
|
483
|
+
}, context: {
|
|
484
|
+
readonly route?: string | {
|
|
485
|
+
readonly email: string;
|
|
486
|
+
readonly name?: string;
|
|
487
|
+
};
|
|
488
|
+
}): Promise<void>;
|
|
489
|
+
};
|
|
490
|
+
readonly broadcaster?: {
|
|
491
|
+
send(message: unknown, context: {
|
|
492
|
+
readonly channel: string;
|
|
493
|
+
readonly route?: unknown;
|
|
494
|
+
}): Promise<void>;
|
|
495
|
+
};
|
|
496
|
+
readonly store?: {
|
|
497
|
+
create(record: unknown): Promise<void>;
|
|
498
|
+
list(notifiable: {
|
|
499
|
+
id: string | number;
|
|
500
|
+
type: string;
|
|
501
|
+
}): Promise<readonly unknown[]>;
|
|
502
|
+
unread(notifiable: {
|
|
503
|
+
id: string | number;
|
|
504
|
+
type: string;
|
|
505
|
+
}): Promise<readonly unknown[]>;
|
|
506
|
+
markAsRead(ids: readonly string[]): Promise<number>;
|
|
507
|
+
markAsUnread(ids: readonly string[]): Promise<number>;
|
|
508
|
+
delete(ids: readonly string[]): Promise<number>;
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
defineNotification(definition: {
|
|
512
|
+
readonly type?: string;
|
|
513
|
+
via(notifiable: unknown, context: {
|
|
514
|
+
readonly anonymous: boolean;
|
|
515
|
+
}): readonly string[];
|
|
516
|
+
readonly build: Readonly<Record<string, (notifiable: unknown, context: {
|
|
517
|
+
readonly channel: string;
|
|
518
|
+
readonly anonymous: boolean;
|
|
519
|
+
}) => unknown>>;
|
|
520
|
+
}): unknown;
|
|
521
|
+
notify(notifiable: unknown, notification: unknown): PromiseLike<unknown>;
|
|
522
|
+
notifyUsing(): {
|
|
523
|
+
channel(channel: 'email', route: string | {
|
|
524
|
+
readonly email: string;
|
|
525
|
+
readonly name?: string;
|
|
526
|
+
}): {
|
|
527
|
+
notify(notification: unknown): PromiseLike<unknown>;
|
|
528
|
+
};
|
|
529
|
+
};
|
|
530
|
+
resetNotificationsRuntime(): void;
|
|
531
|
+
};
|
|
532
|
+
type BroadcastModule = {
|
|
533
|
+
configureBroadcastRuntime(options?: {
|
|
534
|
+
readonly config: LoadedHoloConfig['broadcast'];
|
|
535
|
+
readonly publish?: (input: {
|
|
536
|
+
readonly connection: string;
|
|
537
|
+
readonly event: string;
|
|
538
|
+
readonly channels: readonly string[];
|
|
539
|
+
readonly payload: Readonly<Record<string, unknown>>;
|
|
540
|
+
readonly socketId?: string;
|
|
541
|
+
}, context: {
|
|
542
|
+
readonly connection: string;
|
|
543
|
+
readonly driver: string;
|
|
544
|
+
readonly queued: boolean;
|
|
545
|
+
readonly delayed: boolean;
|
|
546
|
+
}) => Promise<unknown> | unknown;
|
|
547
|
+
}): void;
|
|
548
|
+
getBroadcastRuntimeBindings(): {
|
|
549
|
+
readonly config?: LoadedHoloConfig['broadcast'];
|
|
550
|
+
readonly publish?: (input: {
|
|
551
|
+
readonly connection: string;
|
|
552
|
+
readonly event: string;
|
|
553
|
+
readonly channels: readonly string[];
|
|
554
|
+
readonly payload: Readonly<Record<string, unknown>>;
|
|
555
|
+
readonly socketId?: string;
|
|
556
|
+
}, context: {
|
|
557
|
+
readonly connection: string;
|
|
558
|
+
readonly driver: string;
|
|
559
|
+
readonly queued: boolean;
|
|
560
|
+
readonly delayed: boolean;
|
|
561
|
+
}) => Promise<unknown> | unknown;
|
|
562
|
+
};
|
|
563
|
+
broadcastRaw(input: {
|
|
564
|
+
readonly connection?: string;
|
|
565
|
+
readonly event: string;
|
|
566
|
+
readonly channels: readonly string[];
|
|
567
|
+
readonly payload: Readonly<Record<string, unknown>>;
|
|
568
|
+
readonly socketId?: string;
|
|
569
|
+
}): PromiseLike<unknown>;
|
|
570
|
+
resetBroadcastRuntime(): void;
|
|
571
|
+
};
|
|
572
|
+
type MailModule = {
|
|
573
|
+
configureMailRuntime(options?: {
|
|
574
|
+
readonly config: LoadedHoloConfig['mail'];
|
|
575
|
+
readonly renderView?: HoloServerViewRenderer;
|
|
576
|
+
}): void;
|
|
577
|
+
getMailRuntimeBindings(): {
|
|
578
|
+
readonly send?: unknown;
|
|
579
|
+
readonly preview?: unknown;
|
|
580
|
+
readonly renderPreview?: unknown;
|
|
581
|
+
readonly renderView?: HoloServerViewRenderer;
|
|
582
|
+
};
|
|
583
|
+
sendMail(mail: {
|
|
584
|
+
readonly mailer?: string;
|
|
585
|
+
readonly from?: unknown;
|
|
586
|
+
readonly replyTo?: unknown;
|
|
587
|
+
readonly to: unknown;
|
|
588
|
+
readonly cc?: unknown;
|
|
589
|
+
readonly bcc?: unknown;
|
|
590
|
+
readonly subject: string;
|
|
591
|
+
readonly text?: string;
|
|
592
|
+
readonly html?: string;
|
|
593
|
+
readonly markdown?: string;
|
|
594
|
+
readonly render?: {
|
|
595
|
+
readonly view: string;
|
|
596
|
+
readonly props?: Readonly<Record<string, unknown>>;
|
|
597
|
+
};
|
|
598
|
+
readonly markdownWrapper?: string;
|
|
599
|
+
readonly attachments?: readonly unknown[];
|
|
600
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
601
|
+
readonly tags?: readonly string[];
|
|
602
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
603
|
+
readonly priority?: 'high' | 'normal' | 'low';
|
|
604
|
+
readonly queue?: boolean | {
|
|
605
|
+
readonly queued?: boolean;
|
|
606
|
+
readonly connection?: string;
|
|
607
|
+
readonly queue?: string;
|
|
608
|
+
readonly afterCommit?: boolean;
|
|
609
|
+
};
|
|
610
|
+
readonly delay?: number | Date;
|
|
611
|
+
}): PromiseLike<unknown>;
|
|
612
|
+
resetMailRuntime(): void;
|
|
613
|
+
};
|
|
614
|
+
type AuthorizationModule = {
|
|
615
|
+
isAuthorizationPolicyDefinition(value: unknown): boolean;
|
|
616
|
+
isAuthorizationAbilityDefinition(value: unknown): boolean;
|
|
617
|
+
authorizationInternals: {
|
|
618
|
+
getAuthorizationRuntimeState(): {
|
|
619
|
+
policiesByName: Map<string, unknown>;
|
|
620
|
+
abilitiesByName: Map<string, unknown>;
|
|
621
|
+
};
|
|
622
|
+
getAuthorizationAuthIntegration(): {
|
|
623
|
+
hasGuard(guardName: string): boolean;
|
|
624
|
+
resolveDefaultActor(): Promise<object | null> | object | null;
|
|
625
|
+
resolveGuardActor(guardName: string): Promise<object | null> | object | null;
|
|
626
|
+
};
|
|
627
|
+
registerPolicyDefinition?(definition: unknown): unknown;
|
|
628
|
+
registerAbilityDefinition?(definition: unknown): unknown;
|
|
629
|
+
configureAuthorizationAuthIntegration(options?: {
|
|
630
|
+
hasGuard(guardName: string): boolean;
|
|
631
|
+
resolveDefaultActor(): Promise<object | null> | object | null;
|
|
632
|
+
resolveGuardActor(guardName: string): Promise<object | null> | object | null;
|
|
633
|
+
}): void;
|
|
634
|
+
resetAuthorizationAuthIntegration(): void;
|
|
635
|
+
resetAuthorizationRuntimeState(): void;
|
|
636
|
+
unregisterPolicyDefinition(name: string): void;
|
|
637
|
+
unregisterAbilityDefinition(name: string): void;
|
|
638
|
+
};
|
|
639
|
+
};
|
|
81
640
|
type PortableConnectionManager = ReturnType<typeof resolveRuntimeConnectionManagerOptions>;
|
|
641
|
+
type NormalizedQueueJobDefinition = {
|
|
642
|
+
readonly connection?: string;
|
|
643
|
+
readonly queue?: string;
|
|
644
|
+
readonly tries?: number;
|
|
645
|
+
readonly backoff?: number | readonly number[];
|
|
646
|
+
readonly timeout?: number;
|
|
647
|
+
};
|
|
82
648
|
interface CreateHoloOptions {
|
|
83
649
|
readonly envName?: string;
|
|
84
650
|
readonly preferCache?: boolean;
|
|
85
651
|
readonly processEnv?: NodeJS.ProcessEnv;
|
|
86
652
|
readonly registerProjectQueueJobs?: boolean;
|
|
653
|
+
readonly renderView?: HoloServerViewRenderer;
|
|
87
654
|
}
|
|
88
655
|
interface HoloRuntime<TCustom extends HoloConfigMap = HoloConfigMap> {
|
|
89
656
|
readonly projectRoot: string;
|
|
@@ -91,7 +658,9 @@ interface HoloRuntime<TCustom extends HoloConfigMap = HoloConfigMap> {
|
|
|
91
658
|
readonly registry?: GeneratedProjectRegistry;
|
|
92
659
|
readonly manager: PortableConnectionManager;
|
|
93
660
|
readonly runtimeConfig: PortableRuntimeConfig<TCustom>;
|
|
94
|
-
readonly queue:
|
|
661
|
+
readonly queue: HoloQueueRuntimeBinding;
|
|
662
|
+
readonly session?: HoloSessionRuntimeBinding;
|
|
663
|
+
readonly auth?: HoloAuthRuntimeBinding;
|
|
95
664
|
readonly initialized: boolean;
|
|
96
665
|
initialize(): Promise<void>;
|
|
97
666
|
shutdown(): Promise<void>;
|
|
@@ -99,6 +668,211 @@ interface HoloRuntime<TCustom extends HoloConfigMap = HoloConfigMap> {
|
|
|
99
668
|
useConfig<TPath extends DotPath<RuntimeConfigRegistry<TCustom>>>(path: TPath): ValueAtPath<RuntimeConfigRegistry<TCustom>, TPath>;
|
|
100
669
|
config<TPath extends DotPath<RuntimeConfigRegistry<TCustom>>>(path: TPath): ValueAtPath<RuntimeConfigRegistry<TCustom>, TPath>;
|
|
101
670
|
}
|
|
671
|
+
declare function configureHoloRenderingRuntime(bindings?: {
|
|
672
|
+
readonly renderView?: HoloServerViewRenderer;
|
|
673
|
+
}): void;
|
|
674
|
+
declare function resetHoloRenderingRuntime(): void;
|
|
675
|
+
declare function importOptionalModule<TModule>(specifier: string, options?: {
|
|
676
|
+
readonly projectRoot?: string;
|
|
677
|
+
}): Promise<TModule | undefined>;
|
|
678
|
+
declare function bindAuthRuntimeToContext(runtime: HoloAuthRuntimeBinding, authContext: {
|
|
679
|
+
activate(): void;
|
|
680
|
+
}): HoloAuthRuntimeBinding;
|
|
681
|
+
declare function loadAuthorizationModule(required?: boolean): Promise<AuthorizationModule | undefined>;
|
|
682
|
+
declare function resolveAuthorizationDefinitionExport(moduleValue: unknown, exportName: string | undefined, matcher: (value: unknown) => boolean): unknown | undefined;
|
|
683
|
+
declare function normalizeNotificationRecordFromRow(row: Record<string, unknown>): CoreNotificationRecord<CoreNotificationJsonValue>;
|
|
684
|
+
declare function serializeNotificationRecordForRow(record: {
|
|
685
|
+
readonly id: string;
|
|
686
|
+
readonly type?: string;
|
|
687
|
+
readonly notifiableType: string;
|
|
688
|
+
readonly notifiableId: string | number;
|
|
689
|
+
readonly data: unknown;
|
|
690
|
+
readonly readAt?: Date | null;
|
|
691
|
+
readonly createdAt: Date;
|
|
692
|
+
readonly updatedAt: Date;
|
|
693
|
+
}): Record<string, unknown>;
|
|
694
|
+
declare function markProviderUser<T>(value: T, providerName: string): T;
|
|
695
|
+
declare function createCoreSessionStores<TCustom extends HoloConfigMap>(projectRoot: string, loadedConfig: LoadedHoloConfig<TCustom>, sessionModule: SessionModule): Promise<Readonly<Record<string, {
|
|
696
|
+
read(sessionId: string): Promise<unknown | null>;
|
|
697
|
+
write(record: unknown): Promise<void>;
|
|
698
|
+
delete(sessionId: string): Promise<void>;
|
|
699
|
+
}>>>;
|
|
700
|
+
declare function createCoreNotificationStore<TCustom extends HoloConfigMap>(loadedConfig: LoadedHoloConfig<TCustom>): CoreNotificationStore;
|
|
701
|
+
declare function createAuthNotificationsDeliveryHook(notificationsModule: NotificationsModule): {
|
|
702
|
+
sendEmailVerification(input: {
|
|
703
|
+
readonly provider: string;
|
|
704
|
+
readonly user: unknown;
|
|
705
|
+
readonly email: string;
|
|
706
|
+
readonly token: {
|
|
707
|
+
readonly id: string;
|
|
708
|
+
readonly plainTextToken: string;
|
|
709
|
+
readonly expiresAt: Date;
|
|
710
|
+
};
|
|
711
|
+
}): Promise<void>;
|
|
712
|
+
sendPasswordReset(input: {
|
|
713
|
+
readonly provider: string;
|
|
714
|
+
readonly email: string;
|
|
715
|
+
readonly token: {
|
|
716
|
+
readonly id: string;
|
|
717
|
+
readonly plainTextToken: string;
|
|
718
|
+
readonly expiresAt: Date;
|
|
719
|
+
};
|
|
720
|
+
}): Promise<void>;
|
|
721
|
+
};
|
|
722
|
+
declare function createCoreNotificationBroadcaster(broadcastModule: BroadcastModule): {
|
|
723
|
+
send(message: {
|
|
724
|
+
readonly event?: string;
|
|
725
|
+
readonly data: unknown;
|
|
726
|
+
}, context: {
|
|
727
|
+
readonly route?: unknown;
|
|
728
|
+
readonly notificationType?: string;
|
|
729
|
+
}): Promise<void>;
|
|
730
|
+
};
|
|
731
|
+
declare function createNotificationMailText(message: {
|
|
732
|
+
readonly greeting?: string;
|
|
733
|
+
readonly lines?: readonly string[];
|
|
734
|
+
readonly action?: {
|
|
735
|
+
readonly label: string;
|
|
736
|
+
readonly url: string;
|
|
737
|
+
};
|
|
738
|
+
}): string | undefined;
|
|
739
|
+
declare function createCoreNotificationMailSender(mailModule: MailModule): {
|
|
740
|
+
send(message: {
|
|
741
|
+
readonly subject: string;
|
|
742
|
+
readonly greeting?: string;
|
|
743
|
+
readonly lines?: readonly string[];
|
|
744
|
+
readonly action?: {
|
|
745
|
+
readonly label: string;
|
|
746
|
+
readonly url: string;
|
|
747
|
+
};
|
|
748
|
+
readonly html?: string;
|
|
749
|
+
readonly text?: string;
|
|
750
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
751
|
+
}, context: {
|
|
752
|
+
readonly route?: string | {
|
|
753
|
+
readonly email: string;
|
|
754
|
+
readonly name?: string;
|
|
755
|
+
};
|
|
756
|
+
}): Promise<void>;
|
|
757
|
+
};
|
|
758
|
+
declare function createAuthMailDeliveryHook(mailModule: MailModule): {
|
|
759
|
+
sendEmailVerification(input: {
|
|
760
|
+
readonly provider: string;
|
|
761
|
+
readonly user: unknown;
|
|
762
|
+
readonly email: string;
|
|
763
|
+
readonly token: {
|
|
764
|
+
readonly id: string;
|
|
765
|
+
readonly plainTextToken: string;
|
|
766
|
+
readonly expiresAt: Date;
|
|
767
|
+
};
|
|
768
|
+
}): Promise<void>;
|
|
769
|
+
sendPasswordReset(input: {
|
|
770
|
+
readonly provider: string;
|
|
771
|
+
readonly email: string;
|
|
772
|
+
readonly token: {
|
|
773
|
+
readonly id: string;
|
|
774
|
+
readonly plainTextToken: string;
|
|
775
|
+
readonly expiresAt: Date;
|
|
776
|
+
};
|
|
777
|
+
}): Promise<void>;
|
|
778
|
+
};
|
|
779
|
+
declare function loadConfiguredSocialProviders<TCustom extends HoloConfigMap>(projectRootOrLoadedConfig: string | LoadedHoloConfig<TCustom>, maybeLoadedConfig?: LoadedHoloConfig<TCustom>): Promise<Readonly<Record<string, unknown>>>;
|
|
780
|
+
declare function normalizeDateValue(value: unknown): Date;
|
|
781
|
+
declare function normalizeJsonValue(value: unknown): unknown;
|
|
782
|
+
declare function normalizeEmailVerificationTokenRecord(row: Record<string, unknown>): {
|
|
783
|
+
readonly id: string;
|
|
784
|
+
readonly provider: string;
|
|
785
|
+
readonly userId: string | number;
|
|
786
|
+
readonly email: string;
|
|
787
|
+
readonly tokenHash: string;
|
|
788
|
+
readonly createdAt: Date;
|
|
789
|
+
readonly expiresAt: Date;
|
|
790
|
+
};
|
|
791
|
+
declare function normalizePasswordResetTokenRecord(row: Record<string, unknown>): {
|
|
792
|
+
readonly id: string;
|
|
793
|
+
readonly provider: string;
|
|
794
|
+
readonly email: string;
|
|
795
|
+
readonly table?: string;
|
|
796
|
+
readonly tokenHash: string;
|
|
797
|
+
readonly createdAt: Date;
|
|
798
|
+
readonly expiresAt: Date;
|
|
799
|
+
};
|
|
800
|
+
declare function createCoreSocialBindings<TCustom extends HoloConfigMap>(projectRootOrLoadedConfig: string | LoadedHoloConfig<TCustom>, loadedConfigOrSessionModule: LoadedHoloConfig<TCustom> | SessionModule, maybeSessionModule?: SessionModule): Promise<{
|
|
801
|
+
readonly providers: Readonly<Record<string, unknown>>;
|
|
802
|
+
readonly stateStore: {
|
|
803
|
+
create(record: {
|
|
804
|
+
readonly provider: string;
|
|
805
|
+
readonly state: string;
|
|
806
|
+
readonly codeVerifier: string;
|
|
807
|
+
readonly guard: string;
|
|
808
|
+
readonly createdAt: Date;
|
|
809
|
+
}): Promise<void>;
|
|
810
|
+
read(provider: string, state: string): Promise<{
|
|
811
|
+
readonly provider: string;
|
|
812
|
+
readonly state: string;
|
|
813
|
+
readonly codeVerifier: string;
|
|
814
|
+
readonly guard: string;
|
|
815
|
+
readonly createdAt: Date;
|
|
816
|
+
} | null>;
|
|
817
|
+
delete(provider: string, state: string): Promise<void>;
|
|
818
|
+
};
|
|
819
|
+
readonly identityStore: {
|
|
820
|
+
findByProviderUserId(provider: string, providerUserId: string): Promise<unknown | null>;
|
|
821
|
+
save(record: unknown): Promise<void>;
|
|
822
|
+
};
|
|
823
|
+
}>;
|
|
824
|
+
declare function fromHostedIdentityProviderValue(namespace: string, provider: string): string;
|
|
825
|
+
declare function createCoreHostedIdentityStore(namespace: string): {
|
|
826
|
+
findByProviderUserId(provider: string, providerUserId: string): Promise<unknown | null>;
|
|
827
|
+
findByUserId(provider: string, authProvider: string, userId: string | number): Promise<unknown | null>;
|
|
828
|
+
save(record: unknown): Promise<void>;
|
|
829
|
+
};
|
|
830
|
+
declare function createCoreAuthStores<TCustom extends HoloConfigMap>(loadedConfig: LoadedHoloConfig<TCustom>): {
|
|
831
|
+
readonly tokens: {
|
|
832
|
+
create(record: unknown): Promise<void>;
|
|
833
|
+
findById(id: string): Promise<unknown | null>;
|
|
834
|
+
listByUserId(provider: string, userId: string | number): Promise<readonly unknown[]>;
|
|
835
|
+
update(record: unknown): Promise<void>;
|
|
836
|
+
delete(id: string): Promise<void>;
|
|
837
|
+
deleteByUserId(provider: string, userId: string | number): Promise<number>;
|
|
838
|
+
};
|
|
839
|
+
readonly emailVerificationTokens: {
|
|
840
|
+
create(record: unknown): Promise<void>;
|
|
841
|
+
findById(id: string): Promise<unknown | null>;
|
|
842
|
+
delete(id: string): Promise<void>;
|
|
843
|
+
deleteByUserId(provider: string, userId: string | number): Promise<number>;
|
|
844
|
+
};
|
|
845
|
+
readonly passwordResetTokens: {
|
|
846
|
+
create(record: unknown): Promise<void>;
|
|
847
|
+
findById(id: string): Promise<unknown | null>;
|
|
848
|
+
findLatestByEmail(provider: string, email: string, options?: {
|
|
849
|
+
readonly table?: string;
|
|
850
|
+
}): Promise<unknown | null>;
|
|
851
|
+
delete(id: string, options?: {
|
|
852
|
+
readonly table?: string;
|
|
853
|
+
}): Promise<void>;
|
|
854
|
+
deleteByEmail(provider: string, email: string, options?: {
|
|
855
|
+
readonly table?: string;
|
|
856
|
+
}): Promise<number>;
|
|
857
|
+
};
|
|
858
|
+
};
|
|
859
|
+
declare function createCoreAuthProviders<TCustom extends HoloConfigMap>(projectRoot: string, loadedConfig: LoadedHoloConfig<TCustom>): Promise<Readonly<Record<string, unknown>>>;
|
|
860
|
+
declare function registerProjectAuthorizationDefinitions(projectRoot: string, registry: GeneratedProjectRegistry | undefined, authorizationModule: AuthorizationModule | undefined): Promise<{
|
|
861
|
+
readonly policyNames: readonly string[];
|
|
862
|
+
readonly abilityNames: readonly string[];
|
|
863
|
+
}>;
|
|
864
|
+
declare function unregisterProjectAuthorizationDefinitions(authorizationModule: AuthorizationModule | undefined, policyNames: readonly string[], abilityNames: readonly string[]): void;
|
|
865
|
+
declare function reconfigureOptionalHoloSubsystems<TCustom extends HoloConfigMap = HoloConfigMap>(projectRoot: string, loadedConfig: LoadedHoloConfig<TCustom>, options?: {
|
|
866
|
+
readonly renderView?: HoloServerViewRenderer;
|
|
867
|
+
}): Promise<{
|
|
868
|
+
readonly queueModule?: QueueModule;
|
|
869
|
+
readonly session?: HoloSessionRuntimeBinding;
|
|
870
|
+
readonly auth?: HoloAuthRuntimeBinding;
|
|
871
|
+
readonly authContext?: {
|
|
872
|
+
activate(): void;
|
|
873
|
+
};
|
|
874
|
+
}>;
|
|
875
|
+
declare function resetOptionalHoloSubsystems(): Promise<void>;
|
|
102
876
|
declare function createHolo<TCustom extends HoloConfigMap = HoloConfigMap>(projectRoot: string, options?: CreateHoloOptions): Promise<HoloRuntime<TCustom>>;
|
|
103
877
|
declare function initializeHolo<TCustom extends HoloConfigMap = HoloConfigMap>(projectRoot: string, options?: CreateHoloOptions): Promise<HoloRuntime<TCustom>>;
|
|
104
878
|
declare function peekHolo<TCustom extends HoloConfigMap = HoloConfigMap>(): HoloRuntime<TCustom> | undefined;
|
|
@@ -108,8 +882,36 @@ declare function resetHoloRuntime(): Promise<void>;
|
|
|
108
882
|
declare function getConfigValue(path: string): unknown;
|
|
109
883
|
declare function getConfigSection(key: string): unknown;
|
|
110
884
|
declare const holoRuntimeInternals: {
|
|
885
|
+
createAuthMailDeliveryHook: typeof createAuthMailDeliveryHook;
|
|
886
|
+
createAuthNotificationsDeliveryHook: typeof createAuthNotificationsDeliveryHook;
|
|
887
|
+
createCoreNotificationBroadcaster: typeof createCoreNotificationBroadcaster;
|
|
888
|
+
createCoreNotificationMailSender: typeof createCoreNotificationMailSender;
|
|
889
|
+
bindAuthRuntimeToContext: typeof bindAuthRuntimeToContext;
|
|
890
|
+
createCoreAuthProviders: typeof createCoreAuthProviders;
|
|
891
|
+
createCoreAuthStores: typeof createCoreAuthStores;
|
|
892
|
+
createCoreHostedIdentityStore: typeof createCoreHostedIdentityStore;
|
|
893
|
+
createCoreNotificationStore: typeof createCoreNotificationStore;
|
|
894
|
+
createNotificationMailText: typeof createNotificationMailText;
|
|
895
|
+
createCoreSessionStores: typeof createCoreSessionStores;
|
|
896
|
+
registerProjectAuthorizationDefinitions: typeof registerProjectAuthorizationDefinitions;
|
|
897
|
+
unregisterProjectAuthorizationDefinitions: typeof unregisterProjectAuthorizationDefinitions;
|
|
898
|
+
resolveAuthorizationDefinitionExport: typeof resolveAuthorizationDefinitionExport;
|
|
899
|
+
fromHostedIdentityProviderValue: typeof fromHostedIdentityProviderValue;
|
|
111
900
|
getConfigSection: typeof getConfigSection;
|
|
112
901
|
getConfigValue: typeof getConfigValue;
|
|
902
|
+
createCoreSocialBindings: typeof createCoreSocialBindings;
|
|
903
|
+
normalizeNotificationRecordFromRow: typeof normalizeNotificationRecordFromRow;
|
|
904
|
+
loadConfiguredSocialProviders: typeof loadConfiguredSocialProviders;
|
|
905
|
+
loadAuthorizationModule: typeof loadAuthorizationModule;
|
|
906
|
+
markProviderUser: typeof markProviderUser;
|
|
907
|
+
normalizeDateValue: typeof normalizeDateValue;
|
|
908
|
+
normalizeEmailVerificationTokenRecord: typeof normalizeEmailVerificationTokenRecord;
|
|
909
|
+
normalizeJsonValue: typeof normalizeJsonValue;
|
|
910
|
+
normalizePasswordResetTokenRecord: typeof normalizePasswordResetTokenRecord;
|
|
911
|
+
serializeNotificationRecordForRow: typeof serializeNotificationRecordForRow;
|
|
912
|
+
moduleInternals: {
|
|
913
|
+
importOptionalModule: typeof importOptionalModule;
|
|
914
|
+
};
|
|
113
915
|
};
|
|
114
916
|
|
|
115
|
-
export { type CreateHoloOptions, type GeneratedCommandRegistryEntry, type GeneratedEventRegistryEntry, type GeneratedJobRegistryEntry, type GeneratedListenerRegistryEntry, type GeneratedMigrationRegistryEntry, type GeneratedModelRegistryEntry, type GeneratedProjectRegistry, type GeneratedSeederRegistryEntry, type HoloRuntime, createHolo, ensureHolo, getHolo, holoRuntimeInternals, initializeHolo, loadGeneratedProjectRegistry, peekHolo, registryInternals, resetHoloRuntime, resolveGeneratedProjectRegistryPath };
|
|
917
|
+
export { type CreateHoloOptions, type GeneratedAuthorizationAbilityRegistryEntry, type GeneratedAuthorizationPolicyRegistryEntry, type GeneratedBroadcastManifest, type GeneratedBroadcastManifestChannel, type GeneratedBroadcastManifestEvent, type GeneratedBroadcastRegistryEntry, type GeneratedChannelRegistryEntry, type GeneratedCommandRegistryEntry, type GeneratedEventRegistryEntry, type GeneratedJobRegistryEntry, type GeneratedListenerRegistryEntry, type GeneratedMigrationRegistryEntry, type GeneratedModelRegistryEntry, type GeneratedProjectRegistry, type GeneratedSeederRegistryEntry, type HoloAuthRuntimeBinding, type HoloQueueDriverBinding, type HoloQueueRuntimeBinding, type HoloRuntime, type HoloServerViewRenderInput, type HoloServerViewRenderer, type HoloSessionRuntimeBinding, configureHoloRenderingRuntime, createGeneratedBroadcastManifest, createHolo, ensureHolo, getHolo, holoRuntimeInternals, initializeHolo, loadGeneratedBroadcastManifest, loadGeneratedProjectRegistry, peekHolo, reconfigureOptionalHoloSubsystems, registryInternals, resetHoloRenderingRuntime, resetHoloRuntime, resetOptionalHoloSubsystems, resolveGeneratedProjectRegistryPath };
|