@gandalan/weblibs 2.0.17 → 2.0.18

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.
@@ -62,7 +62,7 @@
62
62
  * @property {string} type - Message kind, e.g. `"artikel.selected"`.
63
63
  * @property {string | null} to - Target module name (directed) or `null` (broadcast).
64
64
  * @property {string | null} from - Sender module name (stamped by the endpoint) or `null`.
65
- * @property {any} payload - Arbitrary payload.
65
+ * @property {any} payload - JSON-serializable payload.
66
66
  * @property {number} ts - Timestamp (`Date.now`).
67
67
  */
68
68
 
@@ -82,13 +82,7 @@
82
82
  /**
83
83
  * Options for `send`/`broadcast`.
84
84
  * @typedef {Object} SendOptions
85
- * @property {string} [from] - Sender module name (bus-level `send`/`broadcast` only; set automatically via an endpoint).
86
85
  * @property {boolean} [retain] - Keep this `(to, type)` as a last value; subscribers that register later receive it immediately. Default `false`.
87
- * @property {boolean} [requireRecipient] - If nobody received it, call `onUndeliverable` instead of silently dropping. Default `false`.
88
- * @property {boolean} [deliverWhenAvailable] - If nobody is listening, buffer the directed message and deliver it when the target registers. Default `false`.
89
- * @property {boolean} [echo] - For broadcast: also deliver to the sender itself. Default `false`.
90
- * @property {number} [ttlMs] - Lifetime for buffered messages. Default `30000`.
91
- * @property {(message: NeherMessage) => void} [onUndeliverable] - Callback invoked with the envelope when `requireRecipient` and no recipient.
92
86
  */
93
87
 
94
88
  /**
@@ -96,7 +90,6 @@
96
90
  * @typedef {Object} Delivery
97
91
  * @property {boolean} delivered - At least one recipient was reached.
98
92
  * @property {number} recipients - Number of distinct modules delivered to.
99
- * @property {boolean} queued - Buffered for a later recipient.
100
93
  */
101
94
 
102
95
  /**
@@ -106,7 +99,7 @@
106
99
  * @property {string} name - The module name of this endpoint.
107
100
  * @property {(type: TypePattern, handler: MessageHandler) => (() => void)} on - Subscribe; returns an unsubscribe function.
108
101
  * @property {(to: string, type: string, payload?: any, options?: SendOptions) => Delivery} send - Directed message (`from` is stamped automatically).
109
- * @property {(type: string, payload?: any, options?: SendOptions) => Delivery} broadcast - Broadcast (`from` is stamped automatically).
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).
110
103
  * @property {() => void} dispose - Remove all subscriptions created through this handle.
111
104
  */
112
105
 
@@ -119,12 +112,8 @@
119
112
  * `{ locale: string }` (sent with `retain: true`, so late subscribers receive
120
113
  * the current language as well).
121
114
  * @typedef {Object} NeherApp3Messages
122
- * @property {(moduleName: string) => Endpoint} register - Register a module as a reachable endpoint.
123
- * @property {(to: string, type: string, payload?: any, options?: SendOptions) => Delivery} send - Directed message (`from` via `options.from`).
124
- * @property {(type: string, payload?: any, options?: SendOptions) => Delivery} broadcast - Broadcast to all subscribers (`from` via `options.from`).
115
+ * @property {(moduleName: string) => Endpoint} register - Register a module as an endpoint; all sending goes through it.
125
116
  * @property {(moduleName: string) => boolean} isReachable - Does the module have at least one live handler?
126
- * @property {(moduleName: string) => boolean} isKnown - Is the module registered (loaded via `addApp`)?
127
- * @property {string[]} reachable - Reactive list of all currently reachable module names.
128
117
  */
129
118
 
130
119
  /**
package/index.d.ts CHANGED
@@ -912,7 +912,6 @@ export type CsvExportCombinationDTO = {
912
912
  export type Delivery = {
913
913
  delivered: boolean;
914
914
  recipients: number;
915
- queued: boolean;
916
915
  };
917
916
 
918
917
  export type DevOpsStatusDTO = {
@@ -2143,11 +2142,7 @@ export type NeherApp3MenuItem = {
2143
2142
 
2144
2143
  export type NeherApp3Messages = {
2145
2144
  register: (moduleName: string) => Endpoint;
2146
- send: (to: string, type: string, payload?: any, options?: SendOptions) => Delivery;
2147
- broadcast: (type: string, payload?: any, options?: SendOptions) => Delivery;
2148
2145
  isReachable: (moduleName: string) => boolean;
2149
- isKnown: (moduleName: string) => boolean;
2150
- reachable: string[];
2151
2146
  };
2152
2147
 
2153
2148
  export type NeherApp3Module = {
@@ -2778,13 +2773,7 @@ export type SchnittKonturOperationDTO = {
2778
2773
  export type SchnittoptimierungsOptionen = ('Keine'|'Lieferdatum'|'Serie'|'FarbeOberflaeche');
2779
2774
 
2780
2775
  export type SendOptions = {
2781
- from?: string;
2782
2776
  retain?: boolean;
2783
- requireRecipient?: boolean;
2784
- deliverWhenAvailable?: boolean;
2785
- echo?: boolean;
2786
- ttlMs?: number;
2787
- onUndeliverable?: (message: NeherMessage) => void;
2788
2777
  };
2789
2778
 
2790
2779
  export type SerieAuslastungDTO = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gandalan/weblibs",
3
- "version": "2.0.17",
3
+ "version": "2.0.18",
4
4
  "description": "WebLibs for Gandalan JS/TS projects",
5
5
  "keywords": [
6
6
  "gandalan"