@spooky-sync/core 0.0.1-canary.263 → 0.0.1-canary.265
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/AGENTS.md +1 -1
- package/dist/index.d.ts +11 -87
- package/dist/index.js +239 -121
- package/dist/types.d.ts +147 -1
- package/package.json +3 -3
- package/src/client/sp00ky-client.ts +25 -4
- package/src/modules/auth/impersonation-banner.ts +310 -140
- package/src/modules/auth/impersonation.test.ts +73 -0
- package/src/types.ts +12 -0
package/src/types.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ImpersonationBannerConfig } from './modules/auth/impersonation-banner';
|
|
1
2
|
import type { RecordId, SchemaStructure, QueryPlan } from '@spooky-sync/query-builder';
|
|
2
3
|
import type { Level, LoggerOptions } from 'pino';
|
|
3
4
|
import type { PushEventOptions } from './events/index';
|
|
@@ -331,6 +332,17 @@ export interface Sp00kyConfig<S extends SchemaStructure> {
|
|
|
331
332
|
* flag is `true`. Defaults to `false`.
|
|
332
333
|
*/
|
|
333
334
|
allowRawRemote?: boolean;
|
|
335
|
+
/**
|
|
336
|
+
* How the "you are impersonating" warning is shown while an admin acts as
|
|
337
|
+
* another user. The built-in one (hazard stripes at the top, the page
|
|
338
|
+
* shifted down onto them) needs no configuration; this is for restyling it,
|
|
339
|
+
* or replacing it with the app's own.
|
|
340
|
+
*
|
|
341
|
+
* See `ImpersonationBannerConfig`. Replacing it does not mean "no warning":
|
|
342
|
+
* if the app has not acknowledged its own banner shortly after impersonation
|
|
343
|
+
* starts, the built-in one appears anyway.
|
|
344
|
+
*/
|
|
345
|
+
impersonationBanner?: ImpersonationBannerConfig;
|
|
334
346
|
/**
|
|
335
347
|
* Surface sustained sync failures as a "degraded" health status that the app
|
|
336
348
|
* can observe via `subscribeToSyncHealth` (or the client-solid
|