@elliemae/microfe-common 2.23.4 → 2.24.0
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.
|
@@ -10,5 +10,5 @@ export { MessageType } from './messageType.js';
|
|
|
10
10
|
export type { EventListeners, Listener } from './common.js';
|
|
11
11
|
export type { ISSFGuest, ConnectParam } from './guest.js';
|
|
12
12
|
export { ScriptingObjectManager, SecurityContext, } from './scriptingObjectManager.js';
|
|
13
|
-
export type { AddScriptingObjectParams, GetObjectParams, GuestContext, } from './scriptingObjectManager.js';
|
|
13
|
+
export type { AddScriptingObjectParams, CallContext, CallerInfo, GetObjectParams, GuestContext, } from './scriptingObjectManager.js';
|
|
14
14
|
export { ScriptingObjectProxy, isScriptingObjectProxy } from './proxy.js';
|
|
@@ -11,6 +11,41 @@ export type GuestContext = {
|
|
|
11
11
|
*/
|
|
12
12
|
id: string;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* identity and optional host-supplied metadata for a caller
|
|
16
|
+
* in the call chain.
|
|
17
|
+
*/
|
|
18
|
+
export type CallerInfo = GuestContext & {
|
|
19
|
+
/**
|
|
20
|
+
* arbitrary metadata the intermediate host associates with
|
|
21
|
+
* this guest (e.g. security role, tenant id, permissions).
|
|
22
|
+
* Supplied via the `metadata` option in loadGuest().
|
|
23
|
+
*/
|
|
24
|
+
metadata?: Record<string, unknown>;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Context attached to scripting object method calls.
|
|
28
|
+
* `guest` identifies the direct caller (verified via sourceWin);
|
|
29
|
+
* `callChain` traces the full path from the original caller when
|
|
30
|
+
* the call is forwarded through intermediate host/guest layers.
|
|
31
|
+
*
|
|
32
|
+
* **Trust model**: `guest` is host-verified (derived from the
|
|
33
|
+
* message source window). `callChain` is self-reported by the
|
|
34
|
+
* intermediate guest and carries the same trust level as the
|
|
35
|
+
* direct caller — if you trust guest B, you can trust the
|
|
36
|
+
* callChain it supplies.
|
|
37
|
+
*/
|
|
38
|
+
export type CallContext = {
|
|
39
|
+
guest: GuestContext;
|
|
40
|
+
/**
|
|
41
|
+
* Ordered list of callers when a call is forwarded through
|
|
42
|
+
* intermediate guests (e.g. A hosts B hosts C, C calls a
|
|
43
|
+
* scripting object — callChain will be [{ id: "C" }]).
|
|
44
|
+
* Each entry may carry host-supplied metadata.
|
|
45
|
+
* Absent for direct (non-forwarded) calls.
|
|
46
|
+
*/
|
|
47
|
+
callChain?: CallerInfo[];
|
|
48
|
+
};
|
|
14
49
|
/**
|
|
15
50
|
* security context under which the guest application is running
|
|
16
51
|
*/
|