@cldmv/slothlet-types 3.17.0 → 3.18.1
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.
|
@@ -66,6 +66,32 @@ export class EventManager extends ComponentBase {
|
|
|
66
66
|
* @public
|
|
67
67
|
*/
|
|
68
68
|
public emit(event: string, payload?: any): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Resolve the delivery level a given subscriber identity WOULD be granted for an event, WITHOUT
|
|
71
|
+
* subscribing. Host-only (gated like `rules.*` by the built-in `slothlet.event.**` deny), because
|
|
72
|
+
* it is answered for a caller-SUPPLIED identity — the inverse of {@link on}, which derives the
|
|
73
|
+
* subscriber from the live caller and never trusts a supplied one. Here the caller is the trusted
|
|
74
|
+
* host, resolving on behalf of someone else.
|
|
75
|
+
*
|
|
76
|
+
* The motivating consumer is a cross-boundary forwarding layer such as `@cldmv/slothlet-vine`:
|
|
77
|
+
* to carry an instance's events to a subscriber in another instance, the trusted (serving) side
|
|
78
|
+
* resolves that remote subscriber's level here and strips the payload BEFORE it crosses, so a
|
|
79
|
+
* `notify`-level far subscriber's domain payload never leaves this instance. Enforcement stays on
|
|
80
|
+
* the trusted side; the boundary layer never re-implements the policy.
|
|
81
|
+
*
|
|
82
|
+
* Pure and side-effect-free: it registers nothing and mutates no state. Conditional event rules
|
|
83
|
+
* resolve against the current runtime context, exactly as an emit-time resolution would.
|
|
84
|
+
*
|
|
85
|
+
* @param {string|null} subscriberPath - The subscriber's api path to resolve for. `null` denotes a
|
|
86
|
+
* host subscription and always resolves `allow`.
|
|
87
|
+
* @param {string} event - Event name.
|
|
88
|
+
* @returns {"deny"|"notify"|"allow"} The level that identity would be granted for this event under
|
|
89
|
+
* the current rule set and runtime context.
|
|
90
|
+
* @throws {SlothletError} INVALID_ARGUMENT for a non-string/empty event, or a `subscriberPath` that
|
|
91
|
+
* is neither a string nor `null`.
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
94
|
+
public resolveLevel(subscriberPath: string | null, event: string): "deny" | "notify" | "allow";
|
|
69
95
|
/**
|
|
70
96
|
* Tear down all subscriptions. Called from `Slothlet.shutdown()`.
|
|
71
97
|
* @returns {void}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cldmv/slothlet-types",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.18.1",
|
|
4
4
|
"description": "TypeScript declaration files (.d.mts) for @cldmv/slothlet. Install alongside @cldmv/slothlet for editor and type-checker support.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"slothlet",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"LICENSE"
|
|
80
80
|
],
|
|
81
81
|
"peerDependencies": {
|
|
82
|
-
"@cldmv/slothlet": "3.
|
|
82
|
+
"@cldmv/slothlet": "3.18.1"
|
|
83
83
|
},
|
|
84
84
|
"peerDependenciesMeta": {
|
|
85
85
|
"@cldmv/slothlet": {
|