@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.
Files changed (56) hide show
  1. package/JSDOC.md +661 -0
  2. package/README.md +106 -17
  3. package/api/business/ablageApi.js +106 -0
  4. package/api/business/anpassungApi.js +74 -0
  5. package/api/business/artikelApi.js +242 -0
  6. package/api/business/authApi.js +63 -0
  7. package/api/business/avApi.js +458 -0
  8. package/api/business/belegApi.js +365 -0
  9. package/api/business/belegPositionenApi.js +52 -0
  10. package/api/business/benutzerApi.js +96 -0
  11. package/api/business/fakturaApi.js +88 -0
  12. package/api/business/farbeApi.js +129 -0
  13. package/api/business/fileApi.js +72 -0
  14. package/api/business/historieApi.js +144 -0
  15. package/api/business/index.js +63 -0
  16. package/api/business/kontaktApi.js +70 -0
  17. package/api/business/lagerApi.js +162 -0
  18. package/api/business/lieferungApi.js +127 -0
  19. package/api/business/mailApi.js +41 -0
  20. package/api/business/mandantApi.js +137 -0
  21. package/api/business/materialApi.js +37 -0
  22. package/api/business/printApi.js +49 -0
  23. package/api/business/produktionApi.js +141 -0
  24. package/api/business/rechnungApi.js +155 -0
  25. package/api/business/serienApi.js +375 -0
  26. package/api/business/settingsApi.js +168 -0
  27. package/api/business/systemApi.js +209 -0
  28. package/api/business/uiApi.js +256 -0
  29. package/api/business/utilityApi.js +288 -0
  30. package/api/business/vorgangApi.js +128 -0
  31. package/api/dtos/allgemein.js +107 -0
  32. package/api/dtos/artikel.js +46 -0
  33. package/api/dtos/av.js +171 -0
  34. package/api/dtos/belege.js +614 -0
  35. package/api/dtos/benutzer.js +101 -0
  36. package/api/dtos/druck.js +50 -0
  37. package/api/dtos/faktura.js +128 -0
  38. package/api/dtos/farben.js +93 -0
  39. package/api/dtos/index.js +501 -0
  40. package/api/dtos/kunden.js +217 -0
  41. package/api/dtos/lager.js +66 -0
  42. package/api/dtos/mail.js +30 -0
  43. package/api/dtos/mandanten.js +60 -0
  44. package/api/dtos/nachrichten.js +18 -0
  45. package/api/dtos/produktGruppen.js +18 -0
  46. package/api/dtos/produktion.js +564 -0
  47. package/api/dtos/settings.js +172 -0
  48. package/api/dtos/technik.js +163 -0
  49. package/api/dtos/ui.js +496 -0
  50. package/api/dtos/webjob.js +12 -0
  51. package/api/fluentApi.js +10 -8
  52. package/api/fluentAuthManager.js +22 -14
  53. package/api/fluentRestClient.js +7 -7
  54. package/api/idasFluentApi.js +458 -0
  55. package/index.js +53 -6
  56. package/package.json +1 -1
@@ -0,0 +1,288 @@
1
+ /**
2
+ * @typedef {import('../fluentApi.js').FluentApi} FluentApi
3
+ * @typedef {import('../dtos/belege.js').VorgangDTO} VorgangDTO
4
+ * @typedef {import('../dtos/belege.js').BaseListItemDTO} BaseListItemDTO
5
+ * @typedef {import('../dtos/belege.js').MaterialBestellungListItemDTO} MaterialBestellungListItemDTO
6
+ * @typedef {import('../dtos/belege.js').VorgangExtendedDTO} VorgangExtendedDTO
7
+ * @typedef {import('../dtos/belege.js').BestellungListItemDTO} BestellungListItemDTO
8
+ * @typedef {import('../dtos/produktion.js').MaterialbedarfDTO} MaterialbedarfDTO
9
+ * @typedef {import('../dtos/produktion.js').ZusammenfassungsOptionen} ZusammenfassungsOptionen
10
+ * @typedef {import('../dtos/produktion.js').GesamtMaterialbedarfGetReturn} GesamtMaterialbedarfGetReturn
11
+ * @typedef {import('../dtos/produktion.js').MaterialbedarfCutOptimization} MaterialbedarfCutOptimization
12
+ * @typedef {import('../dtos/index.js').WebJobHistorieDTO} WebJobHistorieDTO
13
+ * @typedef {import('../dtos/index.js').NachrichtenDTO} NachrichtenDTO
14
+ * @typedef {import('../dtos/index.js').BenutzerDTO} BenutzerDTO
15
+ */
16
+
17
+ /**
18
+ * Utility API - Backup, IBOS1 import, material requirements, web jobs, and general utilities
19
+ * @param {FluentApi} fluentApi
20
+ */
21
+ export function createUtilityApi(fluentApi) {
22
+ return {
23
+ // WebJobWebRoutinen
24
+ /**
25
+ * Add web job history
26
+ * @param {WebJobHistorieDTO} historyDto
27
+ * @returns {Promise<void>}
28
+ */
29
+ addWebJobHistorie: (historyDto) => fluentApi.post("Historie", historyDto),
30
+
31
+ /**
32
+ * Delete old web job history
33
+ * @returns {Promise<void>}
34
+ */
35
+ deleteOldWebJobHistorie: () => fluentApi.get("Historie/DeleteOldHistorie"),
36
+
37
+ // MaterialbedarfWebRoutinen
38
+ /**
39
+ * Get cut optimization
40
+ * @param {MaterialbedarfDTO[]} materialbedarfDtos
41
+ * @returns {Promise<Record<string, MaterialbedarfCutOptimization>>}
42
+ */
43
+ getCutOptimization: (materialbedarfDtos) =>
44
+ fluentApi.post("Materialbedarf/CutOptimization", materialbedarfDtos),
45
+
46
+ // GesamtMaterialbedarfWebRoutinen
47
+ /**
48
+ * Get total material requirements
49
+ * @param {ZusammenfassungsOptionen} optionen
50
+ * @param {boolean} stangenoptimierung
51
+ * @param {Date} [stichTag]
52
+ * @param {Date} [bedarfAb]
53
+ * @param {boolean} [filterCsvExportedMaterial=true]
54
+ * @returns {Promise<GesamtMaterialbedarfGetReturn>}
55
+ */
56
+ getGesamtMaterialbedarf: (optionen, stangenoptimierung, stichTag, bedarfAb, filterCsvExportedMaterial = true) =>
57
+ fluentApi.get(`GesamtMaterialbedarf?optionen=${optionen}&stangenoptimierung=${stangenoptimierung}&stichTag=${stichTag?.toISOString() || ""}&bedarfAb=${bedarfAb?.toISOString() || ""}&filterCsvExportedMaterial=${filterCsvExportedMaterial}`),
58
+
59
+ /**
60
+ * Update total material requirement delivery date
61
+ * @param {number} mandantId
62
+ * @param {string} posGuid
63
+ * @returns {Promise<void>}
64
+ */
65
+ gesamtBedarfUpdateLiefertag: (mandantId, posGuid) =>
66
+ fluentApi.post(`GesamtMaterialbedarf/GesamtBedarfUpdateLiefertag?mandantId=${mandantId}&posGuid=${posGuid}`, null),
67
+
68
+ /**
69
+ * Recalculate total material requirement
70
+ * @param {number} mandantId
71
+ * @param {string} avPosGuid
72
+ * @returns {Promise<void>}
73
+ */
74
+ recalculateGesamtbedarf: (mandantId, avPosGuid) =>
75
+ fluentApi.post(`GesamtMaterialbedarf/RecalculateGesamtBedarf?mandantId=${mandantId}&avPosGuid=${avPosGuid}`, null),
76
+
77
+ // MaterialBestellungWebRoutinen
78
+ /**
79
+ * Create vorgang at coater
80
+ * @param {VorgangDTO} vorgang
81
+ * @param {string} mGuid
82
+ * @param {string} produzentenKundenNummer
83
+ * @returns {Promise<VorgangDTO>}
84
+ */
85
+ erzeugeVorgangBeiBeschichter: (vorgang, mGuid, produzentenKundenNummer) =>
86
+ fluentApi.put(`MaterialBestellung?mGuid=${mGuid}&produzentenKundenNummer=${produzentenKundenNummer}`, vorgang),
87
+
88
+ /**
89
+ * Create order vorgang
90
+ * @param {VorgangDTO} vorgang
91
+ * @returns {Promise<VorgangDTO>}
92
+ */
93
+ erzeugeBestellVorgang: (vorgang) =>
94
+ fluentApi.put("MaterialBestellung/BestellungSpeichern", vorgang),
95
+
96
+ /**
97
+ * Create complaint at coater
98
+ * @param {VorgangDTO} vorgang
99
+ * @param {string} quellVorgang
100
+ * @param {string} mGuid
101
+ * @param {string} produzentenKundenNummer
102
+ * @returns {Promise<VorgangDTO>}
103
+ */
104
+ erzeugeReklamationBeiBeschichter: (vorgang, quellVorgang, mGuid, produzentenKundenNummer) =>
105
+ fluentApi.put(`MaterialBestellungReklamation?quellVorgangGuid=${quellVorgang}&mGuid=${mGuid}&produzentenKundenNummer=${produzentenKundenNummer}`, vorgang),
106
+
107
+ /**
108
+ * Update status at producer
109
+ * @param {string} vorgangGuid
110
+ * @param {string} status
111
+ * @param {string} [externeReferenz]
112
+ * @returns {Promise<void>}
113
+ */
114
+ updateStatusBeimProduzenten: (vorgangGuid, status, externeReferenz = "") =>
115
+ fluentApi.post(`MaterialBestellungStatus?vorgangGuid=${vorgangGuid}&status=${status}&externeReferenz=${externeReferenz}`, null),
116
+
117
+ /**
118
+ * Get all material orders by year
119
+ * @param {number} jahr
120
+ * @returns {Promise<BaseListItemDTO[]>}
121
+ */
122
+ getMaterialBestellungenByJahr: (jahr) =>
123
+ fluentApi.get(`MaterialBestellungen/?jahr=${jahr}`),
124
+
125
+ /**
126
+ * Get all material orders
127
+ * @returns {Promise<BaseListItemDTO[]>}
128
+ */
129
+ getMaterialBestellungen: () => fluentApi.get("MaterialBestellungen"),
130
+
131
+ // NewsletterWebRoutinen
132
+ /**
133
+ * Request newsletter subscription by GUID
134
+ * @param {string} guid
135
+ * @returns {Promise<void>}
136
+ */
137
+ requestNewsletterByGuid: (guid) =>
138
+ fluentApi.post(`Newsletter/?id=${guid}&eintragen=true`, null),
139
+
140
+ /**
141
+ * Request newsletter subscription by email
142
+ * @param {string} mail
143
+ * @returns {Promise<void>}
144
+ */
145
+ requestNewsletterByMail: (mail) =>
146
+ fluentApi.post(`Newsletter/?mail=${encodeURIComponent(mail)}&eintragen=true`, null),
147
+
148
+ /**
149
+ * Unsubscribe newsletter by email
150
+ * @param {string} mail
151
+ * @returns {Promise<void>}
152
+ */
153
+ deleteNewsletterByMail: (mail) =>
154
+ fluentApi.post(`Newsletter/?mail=${encodeURIComponent(mail)}&eintragen=false`, null),
155
+
156
+ /**
157
+ * Unsubscribe newsletter by GUID
158
+ * @param {string} guid
159
+ * @returns {Promise<void>}
160
+ */
161
+ deleteNewsletterByGuid: (guid) =>
162
+ fluentApi.post(`Newsletter/?id=${guid}&eintragen=false`, null),
163
+
164
+ // BackupWebRoutinen
165
+ /**
166
+ * Get vorgang GUIDs for backup
167
+ * @param {string} email
168
+ * @param {number} [year=0]
169
+ * @param {boolean} [onlyBills=false]
170
+ * @returns {Promise<string[]>}
171
+ */
172
+ getBackupVorgangGuids: (email, year = 0, onlyBills = false) =>
173
+ fluentApi.get(`Backup/GetVorgangGuids?email=${encodeURIComponent(email)}&jahr=${year}&nurRechnungen=${onlyBills}`),
174
+
175
+ /**
176
+ * Get vorgang for backup
177
+ * @param {string} email
178
+ * @param {string} guid
179
+ * @param {boolean} [onlyBills=false]
180
+ * @returns {Promise<VorgangExtendedDTO>}
181
+ */
182
+ getBackupVorgang: (email, guid, onlyBills = false) =>
183
+ fluentApi.get(`Backup/GetVorgang?email=${encodeURIComponent(email)}&nurRechnungen=${onlyBills}&guid=${guid}`),
184
+
185
+ /**
186
+ * Request backup
187
+ * @param {string} email
188
+ * @param {boolean} onlyBills
189
+ * @param {number} year
190
+ * @returns {Promise<void>}
191
+ */
192
+ requestBackup: (email, onlyBills, year) =>
193
+ fluentApi.post(`Backup/RequestBackup?email=${encodeURIComponent(email)}&nurRechnungen=${onlyBills}&jahr=${year}`, null),
194
+
195
+ // IBOS1ImportRoutinen
196
+ /**
197
+ * Load orders
198
+ * @param {number} [jahr=-1]
199
+ * @param {boolean} [includeAbgeholte=false]
200
+ * @returns {Promise<BestellungListItemDTO[]>}
201
+ */
202
+ ladeBestellungen: (jahr = -1, includeAbgeholte = false) =>
203
+ fluentApi.get(`Bestellungen?jahr=${jahr}&includeAbgeholte=${includeAbgeholte}`),
204
+
205
+ /**
206
+ * Reset orders
207
+ * @param {Date} resetAb
208
+ * @returns {Promise<void>}
209
+ */
210
+ resetBestellungen: (resetAb) =>
211
+ fluentApi.get(`BestellungenReset?resetAb=${resetAb.toISOString()}`),
212
+
213
+ /**
214
+ * Load material orders
215
+ * @param {number} [jahr=-1]
216
+ * @param {string} [vorgangStatusText='Alle']
217
+ * @param {boolean} [includeAbgeholte=false]
218
+ * @param {boolean} [includeArchive=false]
219
+ * @param {boolean} [includeAllTypes=false]
220
+ * @param {boolean} [includeArtosGeloeschtFlag=false]
221
+ * @returns {Promise<MaterialBestellungListItemDTO[]>}
222
+ */
223
+ ladeMaterialBestellungen: (jahr = -1, vorgangStatusText = "Alle", includeAbgeholte = false, includeArchive = false, includeAllTypes = false, includeArtosGeloeschtFlag = false) =>
224
+ fluentApi.get(`MaterialBestellungen?jahr=${jahr}&status=${vorgangStatusText}&includeAbgeholte=${includeAbgeholte}&includeArchive=${includeArchive}&includeAllTypes=${includeAllTypes}&includeArtosGeloeschtFlag=${includeArtosGeloeschtFlag}`),
225
+
226
+ /**
227
+ * Load material orders by date range
228
+ * @param {Date} vonDatum
229
+ * @param {Date} bisDatum
230
+ * @param {string} [vorgangStatusText='Alle']
231
+ * @param {boolean} [includeAbgeholte=false]
232
+ * @param {boolean} [includeArchive=false]
233
+ * @param {boolean} [includeAllTypes=false]
234
+ * @param {boolean} [includeArtosGeloeschtFlag=false]
235
+ * @returns {Promise<MaterialBestellungListItemDTO[]>}
236
+ */
237
+ ladeMaterialBestellungenVonBis: (vonDatum, bisDatum, vorgangStatusText = "Alle", includeAbgeholte = false, includeArchive = false, includeAllTypes = false, includeArtosGeloeschtFlag = false) =>
238
+ fluentApi.get(`MaterialBestellungen?jahr=0&status=${vorgangStatusText}&includeAbgeholte=${includeAbgeholte}&includeArchive=${includeArchive}&includeAllTypes=${includeAllTypes}&vonDatum=${vonDatum.toISOString()}&bisDatum=${bisDatum.toISOString()}`),
239
+
240
+ /**
241
+ * Reset material orders
242
+ * @param {Date} resetAb
243
+ * @returns {Promise<void>}
244
+ */
245
+ resetMaterialBestellungen: (resetAb) =>
246
+ fluentApi.get(`MaterialBestellungenReset?resetAb=${resetAb.toISOString()}`),
247
+
248
+ /**
249
+ * Get gSQL beleg
250
+ * @param {string} belegGuid
251
+ * @returns {Promise<string>}
252
+ */
253
+ getGsqlBeleg: async (belegGuid) => {
254
+ const data = await fluentApi.get(`Bestellungen/${belegGuid}`);
255
+ return new TextDecoder().decode(data);
256
+ },
257
+
258
+ // NotifyWebRoutinen
259
+ /**
260
+ * Get all notifications
261
+ * @returns {Promise<NachrichtenDTO[]>}
262
+ */
263
+ getAllNotifications: () => {
264
+ const mandant = fluentApi.settings?.authToken?.mandant?.mandantGuid;
265
+ const produzent = fluentApi.settings?.authToken?.mandant?.produzentMandantGuid;
266
+ if (!mandant) return Promise.resolve([]);
267
+ return fluentApi.get(`Nachrichten?mandantGuid=${mandant}&produzentGuid=${produzent}`);
268
+ },
269
+
270
+ // AppWebRoutinen - Helper method that doesn't exist in mandantApi.js
271
+ /**
272
+ * Get single user by customer and email
273
+ * @param {string} kundeGuid
274
+ * @param {string} email
275
+ * @returns {Promise<BenutzerDTO | undefined>}
276
+ */
277
+ getOneBenutzerByKunde: async (kundeGuid, email) => {
278
+ const list = await fluentApi.get(`AppBenutzer/${kundeGuid}`);
279
+ return list.find(x => x.emailAdresse === email);
280
+ },
281
+ };
282
+ }
283
+
284
+ /**
285
+ * Utility API contract inferred from createUtilityApi implementation.
286
+ *
287
+ * @typedef {ReturnType<typeof createUtilityApi>} UtilityApi
288
+ */
@@ -0,0 +1,128 @@
1
+ /**
2
+ * @typedef {import('../fluentApi.js').FluentApi} FluentApi
3
+ * @typedef {import('../dtos/belege.js').VorgangDTO} VorgangDTO
4
+ * @typedef {import('../dtos/belege.js').VorgangListItemDTO} VorgangListItemDTO
5
+ * @typedef {import('../dtos/belege.js').VorgangStatusDTO} VorgangStatusDTO
6
+ */
7
+
8
+ /**
9
+ * @typedef {Object} VorgangApi
10
+ * @property {(jahr: number) => Promise<VorgangListItemDTO[]>} getList - Get list of vorgangs by year
11
+ * @property {(status: string, jahr: number) => Promise<VorgangListItemDTO[]>} getListByStatus - Get list by status and year
12
+ * @property {(status: string, jahr: number, changedSince: Date) => Promise<VorgangListItemDTO[]>} getListByStatusAndChangedSince - Get list by status, year, and changed since date
13
+ * @property {(changedSince: Date, jahr: number, status: string, art: string, includeArchive: boolean, includeOthersData: boolean, search: string) => Promise<VorgangListItemDTO[]>} getListWithFilters - Get list with all filter options
14
+ * @property {(jahr: number, status: string, changedSince: Date, art: string, includeArchive: boolean, includeOthersData: boolean, search: string) => Promise<VorgangListItemDTO[]>} getListByYearAndFilters - Get list by year with filters
15
+ * @property {(kundeGuid: string) => Promise<VorgangListItemDTO[]>} getListByKunde - Get list by customer GUID
16
+ * @property {(list: VorgangDTO[]) => Promise<void>} saveList - Save multiple vorgangs
17
+ * @property {(vorgangGuid: string, neueVorgangsNummer: number) => Promise<void>} changeNummer - Change vorgang number
18
+ * @property {(vorgang: VorgangDTO) => Promise<VorgangDTO>} save - Save a single vorgang
19
+ * @property {(vorgangGuid: string, includeKunde: boolean, returnNullIfNotFound: boolean) => Promise<VorgangDTO>} getByGuid - Get vorgang by GUID
20
+ * @property {(vorgangsNummer: number, jahr: number, includeKunde: boolean) => Promise<VorgangDTO>} getByNummer - Get vorgang by number and year
21
+ * @property {(vorgangGuid: string) => Promise<VorgangStatusDTO>} getStatus - Get vorgang status
22
+ * @property {(vorgangGuid: string, statusCode: string) => Promise<VorgangStatusDTO>} setStatus - Set vorgang status
23
+ * @property {(vorgangGuids: string[], textStatus: string) => Promise<void>} setTextStatus - Set text status for multiple vorgangs
24
+ * @property {(vorgangGuid: string) => Promise<void>} archive - Archive a vorgang
25
+ * @property {(vorgangGuidList: string[]) => Promise<void>} archiveList - Archive multiple vorgangs
26
+ * @property {(vorgangGuid: string) => Promise<void>} unarchive - Unarchive a vorgang
27
+ * @property {(belegGuid: string, neueBelegArt: string) => Promise<void>} changeBelegArt - Change beleg art
28
+ * @property {(changedSince: Date) => Promise<Record<number, VorgangListItemDTO[]>>} getAllForFunction - Get all vorgangs for function by changed since date
29
+ * @property {(vorgangGuid: string, mandantId: number) => Promise<VorgangDTO>} getForFunction - Get vorgang for function
30
+ */
31
+
32
+ /**
33
+ * @param {FluentApi} api
34
+ * @returns {VorgangApi}
35
+ */
36
+ export function createVorgangApi(api) {
37
+ return {
38
+ async getList(jahr) {
39
+ return await api.get(`Vorgang/?jahr=${jahr}`);
40
+ },
41
+
42
+ async getListByStatus(status, jahr) {
43
+ return await api.get(`Vorgang/?status=${status}&jahr=${jahr}`);
44
+ },
45
+
46
+ async getListByStatusAndChangedSince(status, jahr, changedSince) {
47
+ return await api.get(`Vorgang/?status=${status}&jahr=${jahr}&changedSince=${changedSince.toISOString()}`);
48
+ },
49
+
50
+ async getListWithFilters(changedSince, jahr = 0, status = "Alle", art = "", includeArchive = false, includeOthersData = false, search = "") {
51
+ return await api.get(`Vorgang/?status=${status}&jahr=${jahr}&changedSince=${changedSince.toISOString()}&art=${art}&includeArchive=${includeArchive}&includeOthersData=${includeOthersData}&search=${search}`);
52
+ },
53
+
54
+ async getListByYearAndFilters(jahr, status, changedSince, art = "", includeArchive = false, includeOthersData = false, search = "") {
55
+ return await api.get(`Vorgang/?status=${status}&jahr=${jahr}&changedSince=${changedSince.toISOString()}&art=${art}&includeArchive=${includeArchive}&includeOthersData=${includeOthersData}&search=${search}`);
56
+ },
57
+
58
+ async getListByKunde(kundeGuid) {
59
+ return await api.get(`Vorgang/?kundeGuid=${kundeGuid}`);
60
+ },
61
+
62
+ async saveList(list) {
63
+ for (const vorgang of list) {
64
+ await this.save(vorgang);
65
+ }
66
+ },
67
+
68
+ async changeNummer(vorgangGuid, neueVorgangsNummer) {
69
+ return await api.put(`Vorgang/${vorgangGuid}/vorgangsnummer`, neueVorgangsNummer);
70
+ },
71
+
72
+ async save(vorgang) {
73
+ return await api.put("Vorgang", vorgang);
74
+ },
75
+
76
+ async getByGuid(vorgangGuid, includeKunde, returnNullIfNotFound = false) {
77
+ return await api.get(`Vorgang/${vorgangGuid}?includeKunde=${includeKunde}&returnNullIfNotFound=${returnNullIfNotFound}`);
78
+ },
79
+
80
+ async getByNummer(vorgangsNummer, jahr, includeKunde = false) {
81
+ return await api.get(`Vorgang/${vorgangsNummer}/${jahr}?includeKunde=${includeKunde}`);
82
+ },
83
+
84
+ async getStatus(vorgangGuid) {
85
+ return await api.get(`VorgangStatus/${vorgangGuid}`);
86
+ },
87
+
88
+ async setStatus(vorgangGuid, statusCode) {
89
+ const set = {
90
+ VorgangGuid: vorgangGuid,
91
+ NeuerStatus: statusCode
92
+ };
93
+ return await api.put("VorgangStatus", set);
94
+ },
95
+
96
+ async setTextStatus(vorgangGuids, textStatus) {
97
+ const set = {
98
+ VorgangGuids: vorgangGuids,
99
+ NeuerTextStatus: textStatus
100
+ };
101
+ return await api.post("VorgangTextStatus", set);
102
+ },
103
+
104
+ async archive(vorgangGuid) {
105
+ return await api.post(`Archivierung/?vguid=${vorgangGuid}`, null);
106
+ },
107
+
108
+ async archiveList(vorgangGuidList) {
109
+ return await api.post("Archivierung/", vorgangGuidList);
110
+ },
111
+
112
+ async unarchive(vorgangGuid) {
113
+ return await api.post(`ArchivierungAufheben/?vguid=${vorgangGuid}`, null);
114
+ },
115
+
116
+ async changeBelegArt(belegGuid, neueBelegArt) {
117
+ return await api.post(`BelegArt/?bguid=${belegGuid}&neueBelegArt=${neueBelegArt}`, null);
118
+ },
119
+
120
+ async getAllForFunction(changedSince) {
121
+ return await api.get(`GetAllVorgangForFunction/?changedSince=${changedSince.toISOString()}`);
122
+ },
123
+
124
+ async getForFunction(vorgangGuid, mandantId) {
125
+ return await api.get(`GetVorgangForFunction?id=${vorgangGuid}&mandantID=${mandantId}`);
126
+ }
127
+ };
128
+ }
@@ -0,0 +1,107 @@
1
+ /**
2
+ * @fileoverview JSDoc type definitions for Allgemein (General/Common) DTOs from Gandalan.IDAS.WebApi.Client
3
+ * Auto-generated from C# DTO files in Gandalan.IDAS.WebApi.Client/DTOs/Contracts/, DTOs/Templates/, DTOs/Update/, DTOs/WebJob/
4
+ */
5
+
6
+ /**
7
+ * @typedef {Object} ContractDTO
8
+ * @property {string} ContractGuid - Eindeutige GUID des Vertrags
9
+ * @property {string} Owner - GUID des Eigentümers
10
+ * @property {string} Partner - GUID des Partners
11
+ * @property {string} Context - Kontext des Vertrags
12
+ * @property {string} Value - Wert des Vertrags
13
+ * @property {number} Version - Versionsnummer
14
+ * @property {string} ChangedDate - ISO date string
15
+ * @property {string} OwnerName - Name des Eigentümers
16
+ * @property {string} PartnerName - Name des Partners
17
+ * @property {boolean} IsEditable - Gibt an, ob der Vertrag bearbeitbar ist
18
+ * @property {boolean} Inherit - Gibt an, ob der Vertrag vererbt wird
19
+ */
20
+
21
+ /**
22
+ * @typedef {Object} TemplateDTO
23
+ * @property {string} TemplateGuid - Eindeutige GUID des Templates
24
+ * @property {string} Titel - Titel des Templates
25
+ * @property {string} Beschreibung - Beschreibung des Templates
26
+ * @property {string} Typ - Typ des Templates
27
+ * @property {string} JsonDaten - Serialisierte Daten als JSON
28
+ * @property {string} ChangedDate - ISO date string
29
+ * @property {string} Benutzer - Benutzer, der das Template erstellt hat
30
+ */
31
+
32
+ /**
33
+ * @typedef {Object} ChangeDTO
34
+ * @property {string} ChangedGuid - GUID des geänderten Objekts
35
+ * @property {string} ChangedWhen - ISO date string
36
+ * @property {string} ChangeType - Typ der Änderung
37
+ * @property {string} ChangeOperation - Art der Änderung (Insert, Update, Delete)
38
+ * @property {number | null} MandantId - Mandanten-ID
39
+ * @property {string | null} MandantGuid - Mandanten-GUID
40
+ * @property {string} Data - JSON-Daten der Änderung
41
+ */
42
+
43
+ /**
44
+ * @typedef {Object} ChangeInfoDTO
45
+ * @property {string} Kontakte - ISO date string
46
+ * @property {string} Vorgaenge - ISO date string
47
+ * @property {string} Serien - ISO date string
48
+ * @property {string} BelegPositionenAV - ISO date string
49
+ * @property {string} Settings - ISO date string
50
+ * @property {string} Lagerbestand - ISO date string
51
+ * @property {string} BelegPositionen - ISO date string
52
+ * @property {string} ProduktionsStati - ISO date string
53
+ * @property {string} TagInfos - ISO date string
54
+ */
55
+
56
+ /**
57
+ * @typedef {Object} UpdateInfoDTO
58
+ * @property {string} KatalogArtikel - ISO date string
59
+ * @property {string} ProduktFamilien - ISO date string
60
+ * @property {string} ProduktGruppen - ISO date string
61
+ * @property {string} Varianten - ISO date string
62
+ * @property {string} UI - ISO date string
63
+ * @property {string} WerteListen - ISO date string
64
+ * @property {string} Farben - ISO date string
65
+ * @property {string} Scripts - ISO date string
66
+ * @property {string} FarbKuerzel - ISO date string
67
+ * @property {string} Oberflaechen - ISO date string
68
+ * @property {string} FarbGruppen - ISO date string
69
+ */
70
+
71
+ /**
72
+ * @typedef {Object} DevOpsStatusDTO
73
+ * @property {string} Env - Umgebung
74
+ * @property {string} DbInfo - Datenbankinformation
75
+ * @property {string} CurrentMigration - Aktuelle Migration
76
+ * @property {string[]} PendingMigrations - Ausstehende Migrationen
77
+ */
78
+
79
+ /**
80
+ * @typedef {Object} WebJobHistorieDTO
81
+ * @property {string} WebJobHistorieGuid - Eindeutige GUID
82
+ * @property {string} WebJobName - Name des WebJobs
83
+ * @property {string} Timestamp - ISO date string
84
+ * @property {string} Status - Status des WebJobs
85
+ * @property {string} Text - Zusätzlicher Text
86
+ */
87
+
88
+ /**
89
+ * @typedef {Object} CreateServiceTokenRequestDTO
90
+ * @property {string} AppTokenGuid - GUID des App-Tokens
91
+ */
92
+
93
+ /**
94
+ * @typedef {Object} ApiVersionDTO
95
+ * @property {string} Version - API-Version
96
+ * @property {string} Environment - Umgebung
97
+ * @property {string} BuildTime - Build-Zeitpunkt
98
+ * @property {string} ReleaseTime - Veröffentlichungszeitpunkt (veraltet, verwende BuildTime)
99
+ */
100
+
101
+ /**
102
+ * @typedef {Object} ExtendedStatusCodeDTO
103
+ * @property {Error | null} Exception - Exception-Information
104
+ * @property {string} Info - Statusinformation
105
+ */
106
+
107
+ export {};
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @fileoverview JSDoc type definitions for Artikel DTOs from Gandalan.IDAS.WebApi.Client
3
+ * Auto-generated from C# DTO files in Gandalan.IDAS.WebApi.Client/DTOs/Artikel/
4
+ */
5
+
6
+ /**
7
+ * @typedef {Object} KatalogArtikelIndiDatenDTO
8
+ * @property {string} KatalogArtikelIndiDatenGuid - UUID
9
+ * @property {string} KatalogArtikelGuid - UUID
10
+ * @property {boolean} IsPassiv
11
+ * @property {boolean} IsInventurPflichtig
12
+ * @property {boolean} IsLagerartikel
13
+ * @property {boolean} BestellMengeAufVERunden
14
+ * @property {string} KundenArtikelNummer
15
+ * @property {Array<IndiFarbDatenDTO>} FarbDaten
16
+ * @property {boolean} Freigabe_IBOS
17
+ * @property {boolean} Freigabe_BestellFix
18
+ * @property {boolean} Freigabe_ARTOS
19
+ * @property {number} InventurBewertung
20
+ * @property {string} ChangedDate - ISO date string
21
+ * @property {string} SerializedOptions
22
+ */
23
+
24
+ /**
25
+ * @typedef {Object} IndiFarbDatenDTO
26
+ * @property {string} IndiFarbDatenGuid - UUID
27
+ * @property {boolean} IsPassiv
28
+ * @property {string} FarbKuerzel
29
+ * @property {boolean} BestellMengeAufVERunden
30
+ * @property {number} SonderPreis
31
+ * @property {boolean} IsInventurpflichtig
32
+ * @property {boolean} Lagerfuehrung
33
+ * @property {boolean} Freigabe_IBOS
34
+ * @property {boolean} Freigabe_BestellFix
35
+ * @property {boolean} Freigabe_ARTOS
36
+ */
37
+
38
+ /**
39
+ * @typedef {Object} MaterialBearbeitungsMethodeDTO
40
+ * @property {string} MaterialBearbeitungsMethodeGuid - UUID
41
+ * @property {string} Bezeichnung
42
+ * @property {number} Version
43
+ * @property {string} ChangedDate - ISO date string
44
+ */
45
+
46
+ export {};