@gandalan/weblibs 2.0.18 → 2.0.20

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.
@@ -60,8 +60,8 @@
60
60
  * @typedef {Object} NeherMessage
61
61
  * @property {string} id - Unique message id (`crypto.randomUUID`).
62
62
  * @property {string} type - Message kind, e.g. `"artikel.selected"`.
63
- * @property {string | null} to - Target module name (directed) or `null` (broadcast).
64
- * @property {string | null} from - Sender module name (stamped by the endpoint) or `null`.
63
+ * @property {string | null} to - Target: module name, a server address (`user:…`, `app:…`, `bot:…`) or `null` (broadcast).
64
+ * @property {string | null} from - Sender, always stamped: the module name locally; from the server `user:<guid>/app:<module>`, `bot:<name>`, `service/app:<module>` (an app backend sending with an IDAS ServiceToken) or `system`.
65
65
  * @property {any} payload - JSON-serializable payload.
66
66
  * @property {number} ts - Timestamp (`Date.now`).
67
67
  */
@@ -98,7 +98,7 @@
98
98
  * @typedef {Object} Endpoint
99
99
  * @property {string} name - The module name of this endpoint.
100
100
  * @property {(type: TypePattern, handler: MessageHandler) => (() => void)} on - Subscribe; returns an unsubscribe function.
101
- * @property {(to: string, type: string, payload?: any, options?: SendOptions) => Delivery} send - Directed message (`from` is stamped automatically).
101
+ * @property {(to: string, type: string, payload?: any, options?: SendOptions) => Delivery} send - Directed message (`from` is stamped automatically). `to` is a module name, or `user:…`/`app:…`/`bot:…` for delivery via the server (`delivered` then means "handed to the server"; replies arrive as local broadcasts).
102
102
  * @property {(type: string, payload?: any, options?: SendOptions) => Delivery} broadcast - Broadcast to all other endpoints (`from` is stamped automatically; the sender does not receive its own broadcast).
103
103
  * @property {() => void} dispose - Remove all subscriptions created through this handle.
104
104
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gandalan/weblibs",
3
- "version": "2.0.18",
3
+ "version": "2.0.20",
4
4
  "description": "WebLibs for Gandalan JS/TS projects",
5
5
  "keywords": [
6
6
  "gandalan"