@gandalan/weblibs 2.0.16 → 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.
@@ -12,45 +12,6 @@
12
12
  * @typedef {0 | 1 | 2} NeherApp3NotifyType
13
13
  */
14
14
 
15
- /**
16
- * @typedef {Object} ArtikelstammEintrag
17
- * @property {string} [KatalogArtikelGuid]
18
- * @property {string} [KatalogNummer]
19
- * @property {string} [Katalognummer]
20
- * @property {string} [Nummer]
21
- */
22
-
23
- /**
24
- * @typedef {Object} Variante
25
- * @property {string} [VarianteGuid]
26
- * @property {string} [Name]
27
- * @property {string} [Kuerzel]
28
- */
29
-
30
- /**
31
- * @typedef {Object} Werteliste
32
- * @property {string} [WerteListeGuid]
33
- * @property {string} [Name]
34
- */
35
-
36
- /**
37
- * @typedef {Object} NeherApp3ArtikelstammCache
38
- * @property {() => Promise<ArtikelstammEintrag[]>} getArtikelStamm
39
- * @property {() => Promise<Object[]>} getWarenGruppen
40
- * @property {(guid: string) => Promise<ArtikelstammEintrag | undefined>} getArtikelByGuid
41
- * @property {(nummer: string) => Promise<ArtikelstammEintrag | undefined>} getArtikelByKatalognummer
42
- */
43
-
44
- /**
45
- * @typedef {Object} NeherApp3ErfassungCache
46
- * @property {() => Promise<Variante[]>} getVarianten
47
- * @property {(variantenNameOderKuerzel: string) => Promise<Variante | undefined>} getVariante
48
- * @property {() => Promise<Werteliste[]>} getWertelisten
49
- * @property {(name: string) => Promise<Werteliste | undefined>} getWerteliste
50
- * @property {() => Promise<Object[]>} getScripts
51
- * @property {(v: Variante) => void} createUIMachine
52
- */
53
-
54
15
  /**
55
16
  * @typedef {Object} NeherApp3Props
56
17
  * @property {import("./fluentApi.js").FluentApi} api
@@ -94,12 +55,6 @@
94
55
  * @property {import("./fluentApi.js").FluentApi} [hostingEnvironment]
95
56
  */
96
57
 
97
- /**
98
- * @typedef {Object} NeherApp3CacheCollection
99
- * @property {NeherApp3ArtikelstammCache} artikelstamm
100
- * @property {NeherApp3ErfassungCache} erfassung
101
- */
102
-
103
58
  /**
104
59
  * A single message envelope delivered to handlers.
105
60
  * @typedef {Object} NeherMessage
@@ -107,7 +62,7 @@
107
62
  * @property {string} type - Message kind, e.g. `"artikel.selected"`.
108
63
  * @property {string | null} to - Target module name (directed) or `null` (broadcast).
109
64
  * @property {string | null} from - Sender module name (stamped by the endpoint) or `null`.
110
- * @property {any} payload - Arbitrary payload.
65
+ * @property {any} payload - JSON-serializable payload.
111
66
  * @property {number} ts - Timestamp (`Date.now`).
112
67
  */
113
68
 
@@ -127,13 +82,7 @@
127
82
  /**
128
83
  * Options for `send`/`broadcast`.
129
84
  * @typedef {Object} SendOptions
130
- * @property {string} [from] - Sender module name (bus-level `send`/`broadcast` only; set automatically via an endpoint).
131
85
  * @property {boolean} [retain] - Keep this `(to, type)` as a last value; subscribers that register later receive it immediately. Default `false`.
132
- * @property {boolean} [requireRecipient] - If nobody received it, call `onUndeliverable` instead of silently dropping. Default `false`.
133
- * @property {boolean} [deliverWhenAvailable] - If nobody is listening, buffer the directed message and deliver it when the target registers. Default `false`.
134
- * @property {boolean} [echo] - For broadcast: also deliver to the sender itself. Default `false`.
135
- * @property {number} [ttlMs] - Lifetime for buffered messages. Default `30000`.
136
- * @property {(message: NeherMessage) => void} [onUndeliverable] - Callback invoked with the envelope when `requireRecipient` and no recipient.
137
86
  */
138
87
 
139
88
  /**
@@ -141,7 +90,6 @@
141
90
  * @typedef {Object} Delivery
142
91
  * @property {boolean} delivered - At least one recipient was reached.
143
92
  * @property {number} recipients - Number of distinct modules delivered to.
144
- * @property {boolean} queued - Buffered for a later recipient.
145
93
  */
146
94
 
147
95
  /**
@@ -151,7 +99,7 @@
151
99
  * @property {string} name - The module name of this endpoint.
152
100
  * @property {(type: TypePattern, handler: MessageHandler) => (() => void)} on - Subscribe; returns an unsubscribe function.
153
101
  * @property {(to: string, type: string, payload?: any, options?: SendOptions) => Delivery} send - Directed message (`from` is stamped automatically).
154
- * @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).
155
103
  * @property {() => void} dispose - Remove all subscriptions created through this handle.
156
104
  */
157
105
 
@@ -164,12 +112,8 @@
164
112
  * `{ locale: string }` (sent with `retain: true`, so late subscribers receive
165
113
  * the current language as well).
166
114
  * @typedef {Object} NeherApp3Messages
167
- * @property {(moduleName: string) => Endpoint} register - Register a module as a reachable endpoint.
168
- * @property {(to: string, type: string, payload?: any, options?: SendOptions) => Delivery} send - Directed message (`from` via `options.from`).
169
- * @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.
170
116
  * @property {(moduleName: string) => boolean} isReachable - Does the module have at least one live handler?
171
- * @property {(moduleName: string) => boolean} isKnown - Is the module registered (loaded via `addApp`)?
172
- * @property {string[]} reachable - Reactive list of all currently reachable module names.
173
117
  */
174
118
 
175
119
  /**
@@ -400,7 +344,6 @@
400
344
  * @property {(appModule: NeherApp3Module | string) => Promise<void>} addApp
401
345
  * @property {(message: string, type?: NeherApp3NotifyType, cb?: function) => void} notify - Shows a notification. Type defaults to 0 (info). Callback is optional.
402
346
  * @property {NeherApp3ApiCollection} api
403
- * @property {NeherApp3CacheCollection} cache
404
347
  * @property {NeherApp3Messages} messages - In-realm message bus for module-to-module communication.
405
348
  * @property {NeherApp3I18n} i18n - Localization: register a module's translation catalog, translate, switch language, sort language-aware.
406
349
  * @property {Localize} localize - Shorthand for `i18n.localize` (namespace `shell`): a function for strings, a `use:` action for elements.
package/index.d.ts CHANGED
@@ -166,13 +166,6 @@ export type ArtikelApi = {
166
166
  resetCacheVariantenListen: () => Promise<void>;
167
167
  };
168
168
 
169
- export type ArtikelstammEintrag = {
170
- KatalogArtikelGuid?: string;
171
- KatalogNummer?: string;
172
- Katalognummer?: string;
173
- Nummer?: string;
174
- };
175
-
176
169
  export type ArtosStartSettingsDTO = {
177
170
  MaterialBedarfLogik: MaterialBedarfLogik;
178
171
  UserAuthToken: UserAuthTokenDTO;
@@ -919,7 +912,6 @@ export type CsvExportCombinationDTO = {
919
912
  export type Delivery = {
920
913
  delivered: boolean;
921
914
  recipients: number;
922
- queued: boolean;
923
915
  };
924
916
 
925
917
  export type DevOpsStatusDTO = {
@@ -2094,7 +2086,6 @@ export type NeherApp3 = {
2094
2086
  addApp: (appModule: NeherApp3Module | string) => Promise<void>;
2095
2087
  notify: (message: string, type?: NeherApp3NotifyType, cb?: Function) => void;
2096
2088
  api: NeherApp3ApiCollection;
2097
- cache: NeherApp3CacheCollection;
2098
2089
  messages: NeherApp3Messages;
2099
2090
  i18n: NeherApp3I18n;
2100
2091
  localize: Localize;
@@ -2109,27 +2100,6 @@ export type NeherApp3ApiCollection = {
2109
2100
  hostingEnvironment?: FluentApi;
2110
2101
  };
2111
2102
 
2112
- export type NeherApp3ArtikelstammCache = {
2113
- getArtikelStamm: () => Promise<ArtikelstammEintrag[]>;
2114
- getWarenGruppen: () => Promise<object[]>;
2115
- getArtikelByGuid: (guid: string) => Promise<ArtikelstammEintrag | undefined>;
2116
- getArtikelByKatalognummer: (nummer: string) => Promise<ArtikelstammEintrag | undefined>;
2117
- };
2118
-
2119
- export type NeherApp3CacheCollection = {
2120
- artikelstamm: NeherApp3ArtikelstammCache;
2121
- erfassung: NeherApp3ErfassungCache;
2122
- };
2123
-
2124
- export type NeherApp3ErfassungCache = {
2125
- getVarianten: () => Promise<Variante[]>;
2126
- getVariante: (variantenNameOderKuerzel: string) => Promise<Variante | undefined>;
2127
- getWertelisten: () => Promise<Werteliste[]>;
2128
- getWerteliste: (name: string) => Promise<Werteliste | undefined>;
2129
- getScripts: () => Promise<object[]>;
2130
- createUIMachine: (v: Variante) => void;
2131
- };
2132
-
2133
2103
  export type NeherApp3I18n = {
2134
2104
  register: (namespace: string, translations?: TranslationCatalogs) => NeherApp3I18nEndpoint;
2135
2105
  localize: Localize;
@@ -2172,11 +2142,7 @@ export type NeherApp3MenuItem = {
2172
2142
 
2173
2143
  export type NeherApp3Messages = {
2174
2144
  register: (moduleName: string) => Endpoint;
2175
- send: (to: string, type: string, payload?: any, options?: SendOptions) => Delivery;
2176
- broadcast: (type: string, payload?: any, options?: SendOptions) => Delivery;
2177
2145
  isReachable: (moduleName: string) => boolean;
2178
- isKnown: (moduleName: string) => boolean;
2179
- reachable: string[];
2180
2146
  };
2181
2147
 
2182
2148
  export type NeherApp3Module = {
@@ -2807,13 +2773,7 @@ export type SchnittKonturOperationDTO = {
2807
2773
  export type SchnittoptimierungsOptionen = ('Keine'|'Lieferdatum'|'Serie'|'FarbeOberflaeche');
2808
2774
 
2809
2775
  export type SendOptions = {
2810
- from?: string;
2811
2776
  retain?: boolean;
2812
- requireRecipient?: boolean;
2813
- deliverWhenAvailable?: boolean;
2814
- echo?: boolean;
2815
- ttlMs?: number;
2816
- onUndeliverable?: (message: NeherMessage) => void;
2817
2777
  };
2818
2778
 
2819
2779
  export type SerieAuslastungDTO = {
@@ -3158,12 +3118,6 @@ export type UtilityApi = {
3158
3118
  getOneBenutzerByKunde: (kundeGuid: string, email: string) => Promise<BenutzerDTO | undefined>;
3159
3119
  };
3160
3120
 
3161
- export type Variante = {
3162
- VarianteGuid?: string;
3163
- Name?: string;
3164
- Kuerzel?: string;
3165
- };
3166
-
3167
3121
  export type VarianteDTO = {
3168
3122
  VarianteGuid: string;
3169
3123
  UIDefinitionGuid: string;
@@ -3394,11 +3348,6 @@ export type WebJobHistorieDTO = {
3394
3348
  Text: string;
3395
3349
  };
3396
3350
 
3397
- export type Werteliste = {
3398
- WerteListeGuid?: string;
3399
- Name?: string;
3400
- };
3401
-
3402
3351
  export type WerteListeDTO = {
3403
3352
  Name: string;
3404
3353
  Version: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gandalan/weblibs",
3
- "version": "2.0.16",
3
+ "version": "2.0.18",
4
4
  "description": "WebLibs for Gandalan JS/TS projects",
5
5
  "keywords": [
6
6
  "gandalan"