@gandalan/weblibs 1.5.17 → 1.5.19
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.
- package/JSDOC.md +661 -0
- package/README.md +106 -17
- package/api/business/ablageApi.js +106 -0
- package/api/business/anpassungApi.js +74 -0
- package/api/business/artikelApi.js +242 -0
- package/api/business/authApi.js +63 -0
- package/api/business/avApi.js +458 -0
- package/api/business/belegApi.js +365 -0
- package/api/business/belegPositionenApi.js +52 -0
- package/api/business/benutzerApi.js +96 -0
- package/api/business/fakturaApi.js +88 -0
- package/api/business/farbeApi.js +129 -0
- package/api/business/fileApi.js +72 -0
- package/api/business/historieApi.js +144 -0
- package/api/business/index.js +63 -0
- package/api/business/kontaktApi.js +70 -0
- package/api/business/lagerApi.js +162 -0
- package/api/business/lieferungApi.js +127 -0
- package/api/business/mailApi.js +41 -0
- package/api/business/mandantApi.js +137 -0
- package/api/business/materialApi.js +37 -0
- package/api/business/printApi.js +49 -0
- package/api/business/produktionApi.js +141 -0
- package/api/business/rechnungApi.js +155 -0
- package/api/business/serienApi.js +375 -0
- package/api/business/settingsApi.js +168 -0
- package/api/business/systemApi.js +209 -0
- package/api/business/uiApi.js +256 -0
- package/api/business/utilityApi.js +288 -0
- package/api/business/vorgangApi.js +128 -0
- package/api/dtos/allgemein.js +107 -0
- package/api/dtos/artikel.js +46 -0
- package/api/dtos/av.js +171 -0
- package/api/dtos/belege.js +614 -0
- package/api/dtos/benutzer.js +101 -0
- package/api/dtos/druck.js +50 -0
- package/api/dtos/faktura.js +128 -0
- package/api/dtos/farben.js +93 -0
- package/api/dtos/index.js +501 -0
- package/api/dtos/kunden.js +217 -0
- package/api/dtos/lager.js +66 -0
- package/api/dtos/mail.js +30 -0
- package/api/dtos/mandanten.js +60 -0
- package/api/dtos/nachrichten.js +18 -0
- package/api/dtos/produktGruppen.js +18 -0
- package/api/dtos/produktion.js +564 -0
- package/api/dtos/settings.js +172 -0
- package/api/dtos/technik.js +163 -0
- package/api/dtos/ui.js +496 -0
- package/api/dtos/webjob.js +12 -0
- package/api/fluentApi.js +10 -8
- package/api/fluentAuthManager.js +22 -14
- package/api/fluentRestClient.js +7 -7
- package/api/idasFluentApi.js +458 -0
- package/index.js +53 -6
- package/package.json +1 -1
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import { createApi } from "./fluentApi";
|
|
2
|
+
import { createVorgangApi } from "./business/vorgangApi";
|
|
3
|
+
import { createKontaktApi } from "./business/kontaktApi";
|
|
4
|
+
import { createBelegPositionenApi } from "./business/belegPositionenApi";
|
|
5
|
+
import { createMaterialApi } from "./business/materialApi";
|
|
6
|
+
import { createSerienApi } from "./business/serienApi";
|
|
7
|
+
import { createBenutzerApi } from "./business/benutzerApi";
|
|
8
|
+
import { createArtikelApi } from "./business/artikelApi";
|
|
9
|
+
import { createBelegApi } from "./business/belegApi";
|
|
10
|
+
import { createProduktionApi } from "./business/produktionApi";
|
|
11
|
+
import { createFakturaApi } from "./business/fakturaApi";
|
|
12
|
+
import { createRechnungApi } from "./business/rechnungApi";
|
|
13
|
+
import { createSettingsApi } from "./business/settingsApi";
|
|
14
|
+
import { createUiApi } from "./business/uiApi";
|
|
15
|
+
import { createUtilityApi } from "./business/utilityApi";
|
|
16
|
+
import { createAblageApi } from "./business/ablageApi";
|
|
17
|
+
import { createAvApi } from "./business/avApi";
|
|
18
|
+
import { createFarbeApi } from "./business/farbeApi";
|
|
19
|
+
import { createLagerApi } from "./business/lagerApi";
|
|
20
|
+
import { createLieferungApi } from "./business/lieferungApi";
|
|
21
|
+
import { createMandantApi } from "./business/mandantApi";
|
|
22
|
+
import { createPrintApi } from "./business/printApi";
|
|
23
|
+
import { createHistorieApi } from "./business/historieApi";
|
|
24
|
+
import { createSystemApi } from "./business/systemApi";
|
|
25
|
+
import { createFileApi } from "./business/fileApi";
|
|
26
|
+
import { createMailApi } from "./business/mailApi";
|
|
27
|
+
import { createAnpassungApi } from "./business/anpassungApi";
|
|
28
|
+
import { createAuthApi } from "./business/authApi";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @typedef {import("./business/vorgangApi.js").VorgangApi} VorgangApi
|
|
32
|
+
* @typedef {import("./business/kontaktApi.js").KontaktApi} KontaktApi
|
|
33
|
+
* @typedef {import("./business/belegPositionenApi.js").BelegPositionenApi} BelegPositionenApi
|
|
34
|
+
* @typedef {import("./business/materialApi.js").MaterialApi} MaterialApi
|
|
35
|
+
* @typedef {import("./business/serienApi.js").SerienApi} SerienApi
|
|
36
|
+
* @typedef {import("./business/benutzerApi.js").BenutzerApi} BenutzerApi
|
|
37
|
+
* @typedef {import("./business/artikelApi.js").ArtikelApi} ArtikelApi
|
|
38
|
+
* @typedef {import("./business/belegApi.js").BelegApi} BelegApi
|
|
39
|
+
* @typedef {import("./business/produktionApi.js").ProduktionApi} ProduktionApi
|
|
40
|
+
* @typedef {import("./business/fakturaApi.js").FakturaApi} FakturaApi
|
|
41
|
+
* @typedef {import("./business/rechnungApi.js").RechnungApi} RechnungApi
|
|
42
|
+
* @typedef {import("./business/settingsApi.js").SettingsApi} SettingsApi
|
|
43
|
+
* @typedef {import("./business/uiApi.js").UiApi} UiApi
|
|
44
|
+
* @typedef {import("./business/utilityApi.js").UtilityApi} UtilityApi
|
|
45
|
+
* @typedef {import("./business/ablageApi.js").AblageApi} AblageApi
|
|
46
|
+
* @typedef {import("./business/avApi.js").AvApi} AvApi
|
|
47
|
+
* @typedef {import("./business/farbeApi.js").FarbeApi} FarbeApi
|
|
48
|
+
* @typedef {import("./business/lagerApi.js").LagerApi} LagerApi
|
|
49
|
+
* @typedef {import("./business/lieferungApi.js").LieferungApi} LieferungApi
|
|
50
|
+
* @typedef {import("./business/mandantApi.js").MandantApi} MandantApi
|
|
51
|
+
* @typedef {import("./business/printApi.js").PrintApi} PrintApi
|
|
52
|
+
* @typedef {import("./business/historieApi.js").HistorieApi} HistorieApi
|
|
53
|
+
* @typedef {import("./business/systemApi.js").SystemApi} SystemApi
|
|
54
|
+
* @typedef {import("./business/fileApi.js").FileApi} FileApi
|
|
55
|
+
* @typedef {import("./business/mailApi.js").MailApi} MailApi
|
|
56
|
+
* @typedef {import("./business/anpassungApi.js").AnpassungApi} AnpassungApi
|
|
57
|
+
* @typedef {import("./business/authApi.js").AuthApi} AuthApi
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @typedef {import("./fluentApi.js").FluentApi & {
|
|
62
|
+
* vorgang: VorgangApi;
|
|
63
|
+
* kontakt: KontaktApi;
|
|
64
|
+
* belegPositionen: BelegPositionenApi;
|
|
65
|
+
* material: MaterialApi;
|
|
66
|
+
* serien: SerienApi;
|
|
67
|
+
* benutzer: BenutzerApi;
|
|
68
|
+
* artikel: ArtikelApi;
|
|
69
|
+
* beleg: BelegApi;
|
|
70
|
+
* produktion: ProduktionApi;
|
|
71
|
+
* faktura: FakturaApi;
|
|
72
|
+
* rechnung: RechnungApi;
|
|
73
|
+
* settings: SettingsApi;
|
|
74
|
+
* ui: UiApi;
|
|
75
|
+
* utility: UtilityApi;
|
|
76
|
+
* ablage: AblageApi;
|
|
77
|
+
* av: AvApi;
|
|
78
|
+
* farbe: FarbeApi;
|
|
79
|
+
* lager: LagerApi;
|
|
80
|
+
* lieferung: LieferungApi;
|
|
81
|
+
* mandant: MandantApi;
|
|
82
|
+
* print: PrintApi;
|
|
83
|
+
* historie: HistorieApi;
|
|
84
|
+
* system: SystemApi;
|
|
85
|
+
* file: FileApi;
|
|
86
|
+
* mail: MailApi;
|
|
87
|
+
* anpassung: AnpassungApi;
|
|
88
|
+
* auth: AuthApi;
|
|
89
|
+
* userInfo: import("./fluentAuthManager.js").FluentAuthManager["userInfo"];
|
|
90
|
+
* }} IDASFluentApi
|
|
91
|
+
* @description IDAS API client with all business routine getters. Extends FluentApi with IDAS-specific business routines:
|
|
92
|
+
* - vorgang: Vorgang (Auftrag) business routines
|
|
93
|
+
* - kontakt: Kontakt (Kunden/Lieferanten) business routines
|
|
94
|
+
* - belegPositionen: BelegPositionen business routines
|
|
95
|
+
* - material: Material business routines
|
|
96
|
+
* - serien: Serien/AV business routines
|
|
97
|
+
* - benutzer: Benutzer/Rollen business routines
|
|
98
|
+
* - artikel: Artikel/Stammdaten business routines
|
|
99
|
+
* - beleg: Beleg/Status/Historie business routines
|
|
100
|
+
* - produktion: Produktion business routines
|
|
101
|
+
* - faktura: Faktura kennzeichen (status flags) business routines
|
|
102
|
+
* - rechnung: Rechnungen/Sammelrechnungen (invoicing) business routines
|
|
103
|
+
* - settings: Settings/Contracts business routines
|
|
104
|
+
* - ui: UI/Scripts/Filter business routines
|
|
105
|
+
* - utility: Utility/File/Mail/Print business routines
|
|
106
|
+
* - ablage: Storage/bin management business routines
|
|
107
|
+
* - av: Arbeitsvorbereitung (work preparation) business routines
|
|
108
|
+
* - farbe: Color management business routines
|
|
109
|
+
* - lager: Warehouse/inventory management business routines
|
|
110
|
+
* - lieferung: Delivery/shipping management business routines
|
|
111
|
+
* - mandant: Tenant/client management business routines
|
|
112
|
+
* - print: Printing management business routines
|
|
113
|
+
* - historie: History tracking business routines
|
|
114
|
+
* - system: System information business routines
|
|
115
|
+
* - file: File operations business routines
|
|
116
|
+
* - mail: Email operations business routines
|
|
117
|
+
* - anpassung: Customization/adaptation business routines
|
|
118
|
+
* - auth: Authentication management business routines
|
|
119
|
+
* - userInfo: Decoded auth user info from authManager
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Creates an IDAS API client with all business routine getters.
|
|
124
|
+
*
|
|
125
|
+
* @return {IDASFluentApi} A configured IDAS API client instance with business routines.
|
|
126
|
+
*/
|
|
127
|
+
export function createIDASApi() {
|
|
128
|
+
const api = createApi();
|
|
129
|
+
|
|
130
|
+
// Define all business routine getters - lazy loaded on first access
|
|
131
|
+
Object.defineProperty(api, "vorgang", {
|
|
132
|
+
get() {
|
|
133
|
+
if (!this._vorgangApi) {
|
|
134
|
+
this._vorgangApi = createVorgangApi(this);
|
|
135
|
+
}
|
|
136
|
+
return this._vorgangApi;
|
|
137
|
+
},
|
|
138
|
+
configurable: true,
|
|
139
|
+
enumerable: true
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
Object.defineProperty(api, "kontakt", {
|
|
143
|
+
get() {
|
|
144
|
+
if (!this._kontaktApi) {
|
|
145
|
+
this._kontaktApi = createKontaktApi(this);
|
|
146
|
+
}
|
|
147
|
+
return this._kontaktApi;
|
|
148
|
+
},
|
|
149
|
+
configurable: true,
|
|
150
|
+
enumerable: true
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
Object.defineProperty(api, "belegPositionen", {
|
|
154
|
+
get() {
|
|
155
|
+
if (!this._belegPositionenApi) {
|
|
156
|
+
this._belegPositionenApi = createBelegPositionenApi(this);
|
|
157
|
+
}
|
|
158
|
+
return this._belegPositionenApi;
|
|
159
|
+
},
|
|
160
|
+
configurable: true,
|
|
161
|
+
enumerable: true
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
Object.defineProperty(api, "material", {
|
|
165
|
+
get() {
|
|
166
|
+
if (!this._materialApi) {
|
|
167
|
+
this._materialApi = createMaterialApi(this);
|
|
168
|
+
}
|
|
169
|
+
return this._materialApi;
|
|
170
|
+
},
|
|
171
|
+
configurable: true,
|
|
172
|
+
enumerable: true
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
Object.defineProperty(api, "serien", {
|
|
176
|
+
get() {
|
|
177
|
+
if (!this._serienApi) {
|
|
178
|
+
this._serienApi = createSerienApi(this);
|
|
179
|
+
}
|
|
180
|
+
return this._serienApi;
|
|
181
|
+
},
|
|
182
|
+
configurable: true,
|
|
183
|
+
enumerable: true
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
Object.defineProperty(api, "benutzer", {
|
|
187
|
+
get() {
|
|
188
|
+
if (!this._benutzerApi) {
|
|
189
|
+
this._benutzerApi = createBenutzerApi(this);
|
|
190
|
+
}
|
|
191
|
+
return this._benutzerApi;
|
|
192
|
+
},
|
|
193
|
+
configurable: true,
|
|
194
|
+
enumerable: true
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
Object.defineProperty(api, "artikel", {
|
|
198
|
+
get() {
|
|
199
|
+
if (!this._artikelApi) {
|
|
200
|
+
this._artikelApi = createArtikelApi(this);
|
|
201
|
+
}
|
|
202
|
+
return this._artikelApi;
|
|
203
|
+
},
|
|
204
|
+
configurable: true,
|
|
205
|
+
enumerable: true
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
Object.defineProperty(api, "beleg", {
|
|
209
|
+
get() {
|
|
210
|
+
if (!this._belegApi) {
|
|
211
|
+
this._belegApi = createBelegApi(this);
|
|
212
|
+
}
|
|
213
|
+
return this._belegApi;
|
|
214
|
+
},
|
|
215
|
+
configurable: true,
|
|
216
|
+
enumerable: true
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
Object.defineProperty(api, "produktion", {
|
|
220
|
+
get() {
|
|
221
|
+
if (!this._produktionApi) {
|
|
222
|
+
this._produktionApi = createProduktionApi(this);
|
|
223
|
+
}
|
|
224
|
+
return this._produktionApi;
|
|
225
|
+
},
|
|
226
|
+
configurable: true,
|
|
227
|
+
enumerable: true
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
Object.defineProperty(api, "faktura", {
|
|
231
|
+
get() {
|
|
232
|
+
if (!this._fakturaApi) {
|
|
233
|
+
this._fakturaApi = createFakturaApi(this);
|
|
234
|
+
}
|
|
235
|
+
return this._fakturaApi;
|
|
236
|
+
},
|
|
237
|
+
configurable: true,
|
|
238
|
+
enumerable: true
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
Object.defineProperty(api, "rechnung", {
|
|
242
|
+
get() {
|
|
243
|
+
if (!this._rechnungApi) {
|
|
244
|
+
this._rechnungApi = createRechnungApi(this);
|
|
245
|
+
}
|
|
246
|
+
return this._rechnungApi;
|
|
247
|
+
},
|
|
248
|
+
configurable: true,
|
|
249
|
+
enumerable: true
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
Object.defineProperty(api, "settings", {
|
|
253
|
+
get() {
|
|
254
|
+
if (!this._settingsApi) {
|
|
255
|
+
this._settingsApi = createSettingsApi(this);
|
|
256
|
+
}
|
|
257
|
+
return this._settingsApi;
|
|
258
|
+
},
|
|
259
|
+
configurable: true,
|
|
260
|
+
enumerable: true
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
Object.defineProperty(api, "ui", {
|
|
264
|
+
get() {
|
|
265
|
+
if (!this._uiApi) {
|
|
266
|
+
this._uiApi = createUiApi(this);
|
|
267
|
+
}
|
|
268
|
+
return this._uiApi;
|
|
269
|
+
},
|
|
270
|
+
configurable: true,
|
|
271
|
+
enumerable: true
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
Object.defineProperty(api, "utility", {
|
|
275
|
+
get() {
|
|
276
|
+
if (!this._utilityApi) {
|
|
277
|
+
this._utilityApi = createUtilityApi(this);
|
|
278
|
+
}
|
|
279
|
+
return this._utilityApi;
|
|
280
|
+
},
|
|
281
|
+
configurable: true,
|
|
282
|
+
enumerable: true
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
Object.defineProperty(api, "ablage", {
|
|
286
|
+
get() {
|
|
287
|
+
if (!this._ablageApi) {
|
|
288
|
+
this._ablageApi = createAblageApi(this);
|
|
289
|
+
}
|
|
290
|
+
return this._ablageApi;
|
|
291
|
+
},
|
|
292
|
+
configurable: true,
|
|
293
|
+
enumerable: true
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
Object.defineProperty(api, "av", {
|
|
297
|
+
get() {
|
|
298
|
+
if (!this._avApi) {
|
|
299
|
+
this._avApi = createAvApi(this);
|
|
300
|
+
}
|
|
301
|
+
return this._avApi;
|
|
302
|
+
},
|
|
303
|
+
configurable: true,
|
|
304
|
+
enumerable: true
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
Object.defineProperty(api, "farbe", {
|
|
308
|
+
get() {
|
|
309
|
+
if (!this._farbeApi) {
|
|
310
|
+
this._farbeApi = createFarbeApi(this);
|
|
311
|
+
}
|
|
312
|
+
return this._farbeApi;
|
|
313
|
+
},
|
|
314
|
+
configurable: true,
|
|
315
|
+
enumerable: true
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
Object.defineProperty(api, "lager", {
|
|
319
|
+
get() {
|
|
320
|
+
if (!this._lagerApi) {
|
|
321
|
+
this._lagerApi = createLagerApi(this);
|
|
322
|
+
}
|
|
323
|
+
return this._lagerApi;
|
|
324
|
+
},
|
|
325
|
+
configurable: true,
|
|
326
|
+
enumerable: true
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
Object.defineProperty(api, "lieferung", {
|
|
330
|
+
get() {
|
|
331
|
+
if (!this._lieferungApi) {
|
|
332
|
+
this._lieferungApi = createLieferungApi(this);
|
|
333
|
+
}
|
|
334
|
+
return this._lieferungApi;
|
|
335
|
+
},
|
|
336
|
+
configurable: true,
|
|
337
|
+
enumerable: true
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
Object.defineProperty(api, "mandant", {
|
|
341
|
+
get() {
|
|
342
|
+
if (!this._mandantApi) {
|
|
343
|
+
this._mandantApi = createMandantApi(this);
|
|
344
|
+
}
|
|
345
|
+
return this._mandantApi;
|
|
346
|
+
},
|
|
347
|
+
configurable: true,
|
|
348
|
+
enumerable: true
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
Object.defineProperty(api, "print", {
|
|
352
|
+
get() {
|
|
353
|
+
if (!this._printApi) {
|
|
354
|
+
this._printApi = createPrintApi(this);
|
|
355
|
+
}
|
|
356
|
+
return this._printApi;
|
|
357
|
+
},
|
|
358
|
+
configurable: true,
|
|
359
|
+
enumerable: true
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
Object.defineProperty(api, "historie", {
|
|
363
|
+
get() {
|
|
364
|
+
if (!this._historieApi) {
|
|
365
|
+
this._historieApi = createHistorieApi(this);
|
|
366
|
+
}
|
|
367
|
+
return this._historieApi;
|
|
368
|
+
},
|
|
369
|
+
configurable: true,
|
|
370
|
+
enumerable: true
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
Object.defineProperty(api, "system", {
|
|
374
|
+
get() {
|
|
375
|
+
if (!this._systemApi) {
|
|
376
|
+
this._systemApi = createSystemApi(this);
|
|
377
|
+
}
|
|
378
|
+
return this._systemApi;
|
|
379
|
+
},
|
|
380
|
+
configurable: true,
|
|
381
|
+
enumerable: true
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
Object.defineProperty(api, "file", {
|
|
385
|
+
get() {
|
|
386
|
+
if (!this._fileApi) {
|
|
387
|
+
this._fileApi = createFileApi(this);
|
|
388
|
+
}
|
|
389
|
+
return this._fileApi;
|
|
390
|
+
},
|
|
391
|
+
configurable: true,
|
|
392
|
+
enumerable: true
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
Object.defineProperty(api, "mail", {
|
|
396
|
+
get() {
|
|
397
|
+
if (!this._mailApi) {
|
|
398
|
+
this._mailApi = createMailApi(this);
|
|
399
|
+
}
|
|
400
|
+
return this._mailApi;
|
|
401
|
+
},
|
|
402
|
+
configurable: true,
|
|
403
|
+
enumerable: true
|
|
404
|
+
});
|
|
405
|
+
|
|
406
|
+
Object.defineProperty(api, "anpassung", {
|
|
407
|
+
get() {
|
|
408
|
+
if (!this._anpassungApi) {
|
|
409
|
+
this._anpassungApi = createAnpassungApi(this);
|
|
410
|
+
}
|
|
411
|
+
return this._anpassungApi;
|
|
412
|
+
},
|
|
413
|
+
configurable: true,
|
|
414
|
+
enumerable: true
|
|
415
|
+
});
|
|
416
|
+
|
|
417
|
+
Object.defineProperty(api, "auth", {
|
|
418
|
+
get() {
|
|
419
|
+
if (!this._authApi) {
|
|
420
|
+
this._authApi = createAuthApi(this);
|
|
421
|
+
}
|
|
422
|
+
return this._authApi;
|
|
423
|
+
},
|
|
424
|
+
configurable: true,
|
|
425
|
+
enumerable: true
|
|
426
|
+
});
|
|
427
|
+
|
|
428
|
+
Object.defineProperty(api, "userInfo", {
|
|
429
|
+
get() {
|
|
430
|
+
return this.authManager?.userInfo;
|
|
431
|
+
},
|
|
432
|
+
configurable: true,
|
|
433
|
+
enumerable: true
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
return api;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Sets up an IDAS API client with business routines.
|
|
441
|
+
*
|
|
442
|
+
* - Requests will be sent to the url provided.
|
|
443
|
+
* - Example usage:
|
|
444
|
+
* const api = idasFluentApi("https://api.idas.de", authManager, "myService");
|
|
445
|
+
* api.vorgang.getByGuid(guid); // Access Vorgang business routines
|
|
446
|
+
*
|
|
447
|
+
* @export
|
|
448
|
+
* @param {string} url - The base URL for API requests.
|
|
449
|
+
* @param {import("./fluentAuthManager.js").FluentAuthManager} authManager - The authentication manager instance.
|
|
450
|
+
* @param {string} serviceName - The name of the service using this API.
|
|
451
|
+
* @return {IDASFluentApi} Configured IDAS API instance with business routines.
|
|
452
|
+
*/
|
|
453
|
+
export function idasFluentApi(url, authManager, serviceName) {
|
|
454
|
+
return createIDASApi()
|
|
455
|
+
.useAuthManager(authManager)
|
|
456
|
+
.useBaseUrl(url)
|
|
457
|
+
.useServiceName(serviceName);
|
|
458
|
+
}
|
package/index.js
CHANGED
|
@@ -4,17 +4,52 @@ import { initIDAS } from "./api/authUtils";
|
|
|
4
4
|
export { IDASFactory, initIDAS, RESTClient };
|
|
5
5
|
|
|
6
6
|
export { createApi, fluentApi } from "./api/fluentApi";
|
|
7
|
+
export { createIDASApi, idasFluentApi } from "./api/idasFluentApi";
|
|
7
8
|
export { createAuthManager, fluentIdasAuthManager } from "./api/fluentAuthManager";
|
|
8
9
|
export { fetchEnvConfig } from "./api/fluentEnvUtils";
|
|
9
10
|
export { restClient } from "./api/fluentRestClient";
|
|
10
11
|
|
|
12
|
+
// Business Routines APIs
|
|
13
|
+
export {
|
|
14
|
+
createVorgangApi,
|
|
15
|
+
createKontaktApi,
|
|
16
|
+
createBelegPositionenApi,
|
|
17
|
+
createMaterialApi,
|
|
18
|
+
createSerienApi,
|
|
19
|
+
createBenutzerApi,
|
|
20
|
+
createArtikelApi,
|
|
21
|
+
createBelegApi,
|
|
22
|
+
createProduktionApi,
|
|
23
|
+
createFakturaApi,
|
|
24
|
+
createSettingsApi,
|
|
25
|
+
createUiApi,
|
|
26
|
+
createUtilityApi
|
|
27
|
+
} from "./api/business/index.js";
|
|
28
|
+
|
|
29
|
+
// DTO Type Definitions - re-exported for JSDoc type imports
|
|
30
|
+
// Usage: @typedef {import('@gandalan/idas-weblibs').VorgangDTO} VorgangDTO
|
|
31
|
+
export * from "./api/dtos/index.js";
|
|
32
|
+
|
|
11
33
|
// re-export all modules from the ui folder as named exports
|
|
12
34
|
export * from "./ui/index.js";
|
|
13
35
|
|
|
14
36
|
/**
|
|
15
37
|
* @typedef {import("./api/fluentApi").FluentApi} FluentApi
|
|
38
|
+
* @typedef {import("./api/idasFluentApi").IDASFluentApi} IDASFluentApi
|
|
16
39
|
* @typedef {import("./api/fluentAuthManager").FluentAuthManager} FluentAuthManager
|
|
17
|
-
* @typedef {import("./api/
|
|
40
|
+
* @typedef {import("./api/business/vorgangApi").VorgangApi} VorgangApi
|
|
41
|
+
* @typedef {import("./api/business/kontaktApi").KontaktApi} KontaktApi
|
|
42
|
+
* @typedef {import("./api/business/belegPositionenApi").BelegPositionenApi} BelegPositionenApi
|
|
43
|
+
* @typedef {import("./api/business/materialApi").MaterialApi} MaterialApi
|
|
44
|
+
* @typedef {import("./api/business/serienApi").SerienApi} SerienApi
|
|
45
|
+
* @typedef {import("./api/business/benutzerApi").BenutzerApi} BenutzerApi
|
|
46
|
+
* @typedef {import("./api/business/artikelApi").ArtikelApi} ArtikelApi
|
|
47
|
+
* @typedef {import("./api/business/belegApi").BelegApi} BelegApi
|
|
48
|
+
* @typedef {import("./api/business/produktionApi").ProduktionApi} ProduktionApi
|
|
49
|
+
* @typedef {import("./api/business/fakturaApi").FakturaApi} FakturaApi
|
|
50
|
+
* @typedef {import("./api/business/settingsApi").SettingsApi} SettingsApi
|
|
51
|
+
* @typedef {import("./api/business/uiApi").UiApi} UiApi
|
|
52
|
+
* @typedef {import("./api/business/utilityApi").UtilityApi} UtilityApi
|
|
18
53
|
*/
|
|
19
54
|
|
|
20
55
|
/**
|
|
@@ -43,7 +78,7 @@ export * from "./ui/index.js";
|
|
|
43
78
|
*/
|
|
44
79
|
|
|
45
80
|
/**
|
|
46
|
-
* @typedef {Object}
|
|
81
|
+
* @typedef {Object} NeherApp3ArtikelstammCache
|
|
47
82
|
* @property {() => Promise<ArtikelstammEintrag[]>} getArtikelStamm
|
|
48
83
|
* @property {() => Promise<Object[]>} getWarenGruppen
|
|
49
84
|
* @property {(guid: string) => Promise<ArtikelstammEintrag | undefined>} getArtikelByGuid
|
|
@@ -51,7 +86,7 @@ export * from "./ui/index.js";
|
|
|
51
86
|
*/
|
|
52
87
|
|
|
53
88
|
/**
|
|
54
|
-
* @typedef {Object}
|
|
89
|
+
* @typedef {Object} NeherApp3ErfassungCache
|
|
55
90
|
* @property {() => Promise<Variante[]>} getVarianten
|
|
56
91
|
* @property {(variantenNameOderKuerzel: string) => Promise<Variante | undefined>} getVariante
|
|
57
92
|
* @property {() => Promise<Werteliste[]>} getWertelisten
|
|
@@ -64,7 +99,7 @@ export * from "./ui/index.js";
|
|
|
64
99
|
* @typedef {Object} NeherApp3Props
|
|
65
100
|
* @property {FluentApi} api
|
|
66
101
|
* @property {FluentAuthManager} [authManager]
|
|
67
|
-
* @property {
|
|
102
|
+
* @property {IDASFluentApi} idas
|
|
68
103
|
* @property {string} [mainCssPath]
|
|
69
104
|
*/
|
|
70
105
|
|
|
@@ -93,13 +128,25 @@ export * from "./ui/index.js";
|
|
|
93
128
|
* @property {boolean} [useShadowDom] - If true, the app will be embedded in a shadow DOM. This is required for CSS isolation.
|
|
94
129
|
*/
|
|
95
130
|
|
|
131
|
+
/**
|
|
132
|
+
* @typedef {Object} NeherApp3ApiCollection
|
|
133
|
+
* @property {IDASFluentApi} [idas]
|
|
134
|
+
* @property {FluentApi} [hostingEnvironment]
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @typedef {Object} NeherApp3CacheCollection
|
|
139
|
+
* @property {NeherApp3ArtikelstammCache} artikelstamm
|
|
140
|
+
* @property {NeherApp3ErfassungCache} erfassung
|
|
141
|
+
*/
|
|
142
|
+
|
|
96
143
|
/**
|
|
97
144
|
* @typedef {Object} NeherApp3
|
|
98
145
|
* @property {(menuItem: NeherApp3MenuItem) => void} addMenuItem
|
|
99
146
|
* @property {(appModule: NeherApp3Module | string) => Promise<void>} addApp
|
|
100
147
|
* @property {(message: string, type?: NeherApp3NotifyType, cb?: function) => void} notify - Shows a notification. Type defaults to 0 (info). Callback is optional.
|
|
101
|
-
* @property {
|
|
102
|
-
* @property {
|
|
148
|
+
* @property {NeherApp3ApiCollection} api
|
|
149
|
+
* @property {NeherApp3CacheCollection} cache
|
|
103
150
|
*/
|
|
104
151
|
|
|
105
152
|
/**
|