@gandalan/weblibs 1.5.32 → 1.5.34

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.
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @typedef {import('../fluentApi.js').FluentApi} FluentApi
3
3
  * @typedef {import('../dtos/index.js').WarenGruppeDTO} WarenGruppeDTO
4
+ * @typedef {import('../dtos/index.js').WarenGruppeListDTO} WarenGruppeListDTO
4
5
  * @typedef {import('../dtos/index.js').KatalogArtikelDTO} KatalogArtikelDTO
5
6
  * @typedef {import('../dtos/index.js').ProduktGruppeDTO} ProduktGruppeDTO
6
7
  * @typedef {import('../dtos/index.js').ProduktFamilieDTO} ProduktFamilieDTO
@@ -18,12 +19,12 @@
18
19
  */
19
20
  export function createArtikelApi(fluentApi) {
20
21
  return {
21
- // ArtikelWebRoutinen
22
- /**
23
- * Get all articles
24
- * @param {Date} [changedSince] - Filter by change date
25
- * @returns {Promise<WarenGruppeDTO[]>}
26
- */
22
+ // ArtikelWebRoutinen
23
+ /**
24
+ * Get all articles
25
+ * @param {Date} [changedSince] - Filter by change date
26
+ * @returns {Promise<WarenGruppeDTO[]>}
27
+ */
27
28
  getAll: (changedSince) => {
28
29
  const url = changedSince
29
30
  ? `Artikel?changedSince=${changedSince.toISOString()}`
@@ -32,25 +33,25 @@ export function createArtikelApi(fluentApi) {
32
33
  },
33
34
 
34
35
  /**
35
- * Save article
36
- * @param {KatalogArtikelDTO} artikel
37
- * @returns {Promise<KatalogArtikelDTO>}
38
- */
36
+ * Save article
37
+ * @param {KatalogArtikelDTO} artikel
38
+ * @returns {Promise<KatalogArtikelDTO>}
39
+ */
39
40
  saveArtikel: (artikel) => fluentApi.put(`Artikel/${artikel.KatalogArtikelGuid}`, artikel),
40
41
 
41
42
  /**
42
- * Delete article
43
- * @param {KatalogArtikelDTO} artikel
44
- * @returns {Promise<void>}
45
- */
43
+ * Delete article
44
+ * @param {KatalogArtikelDTO} artikel
45
+ * @returns {Promise<void>}
46
+ */
46
47
  deleteArtikel: (artikel) => fluentApi.delete(`Artikel/${artikel.KatalogArtikelGuid}`),
47
48
 
48
49
  // ArtikelIndiDatenWebRoutinen
49
50
  /**
50
- * Get all article individual data
51
- * @param {Date} [changedSince] - Filter by change date
52
- * @returns {Promise<KatalogArtikelIndiDatenDTO[]>}
53
- */
51
+ * Get all article individual data
52
+ * @param {Date} [changedSince] - Filter by change date
53
+ * @returns {Promise<KatalogArtikelIndiDatenDTO[]>}
54
+ */
54
55
  getAllIndiDaten: (changedSince) => {
55
56
  const url = changedSince
56
57
  ? `ArtikelIndiDaten?changedSince=${changedSince.toISOString()}`
@@ -59,99 +60,132 @@ export function createArtikelApi(fluentApi) {
59
60
  },
60
61
 
61
62
  /**
62
- * Save article individual data
63
- * @param {KatalogArtikelIndiDatenDTO} daten
64
- * @returns {Promise<void>}
65
- */
63
+ * Save article individual data
64
+ * @param {KatalogArtikelIndiDatenDTO} daten
65
+ * @returns {Promise<void>}
66
+ */
66
67
  saveArtikelIndiDaten: (daten) => fluentApi.put(`ArtikelIndiDaten/${daten.KatalogArtikelGuid}`, daten),
67
68
 
68
69
  /**
69
- * Delete article individual data
70
- * @param {KatalogArtikelIndiDatenDTO} daten
71
- * @returns {Promise<void>}
72
- */
70
+ * Delete article individual data
71
+ * @param {KatalogArtikelIndiDatenDTO} daten
72
+ * @returns {Promise<void>}
73
+ * */
73
74
  deleteArtikelIndiDaten: (daten) => fluentApi.delete(`ArtikelIndiDaten/${daten.KatalogArtikelGuid}`),
74
75
 
75
76
  // WarenGruppeWebRoutinen
76
77
  /**
77
- * Get all product groups
78
- * @returns {Promise<WarenGruppeDTO[]>}
79
- */
80
- getAllWarenGruppen: () => fluentApi.get("WarenGruppe"),
78
+ * Get all commodity groups
79
+ * @param {Date} [changedSince] - Filter by change date
80
+ * @param {boolean} [includeArtikel=true] - Whether to include full article data
81
+ * @returns {Promise<WarenGruppeDTO[]>}
82
+ */
83
+ getAllWarenGruppen: (changedSince, includeArtikel = true) => {
84
+ let url = `WarenGruppe?includeArtikel=${includeArtikel}`;
85
+ if (changedSince) url += `&changedSince=${changedSince.toISOString()}`;
86
+ return fluentApi.get(url);
87
+ },
88
+
89
+ /**
90
+ * Get compact commodity group list (with ArtikelGuids, without full article graph)
91
+ * @param {Date} [changedSince] - Filter by change date
92
+ * @returns {Promise<WarenGruppeListDTO[]>}
93
+ */
94
+ getWarenGruppenList: (changedSince) => {
95
+ const url = changedSince
96
+ ? `WarenGruppe/list?changedSince=${changedSince.toISOString()}`
97
+ : "WarenGruppe/list";
98
+ return fluentApi.get(url);
99
+ },
81
100
 
82
101
  /**
83
- * Save product group
84
- * @param {WarenGruppeDTO} dto
85
- * @returns {Promise<void>}
86
- */
102
+ * Save commodity group
103
+ * @param {WarenGruppeDTO} dto
104
+ * @returns {Promise<void>}
105
+ **/
87
106
  saveWarenGruppe: (dto) => fluentApi.put(`WarenGruppe/${dto.WarenGruppeGuid}`, dto),
88
107
 
108
+ /**
109
+ * Get commodity group by GUID
110
+ * @param {string} warenGruppeGuid - The GUID of the commodity group
111
+ * @param {boolean} [includeArtikel=true] - Whether to include articles
112
+ * @returns {Promise<WarenGruppeDTO>}
113
+ */
114
+ getWarenGruppe: (warenGruppeGuid, includeArtikel = true) => fluentApi.get(`WarenGruppe/${warenGruppeGuid}?includeArtikel=${includeArtikel}`),
115
+
116
+ /**
117
+ * Get articles for a commodity group
118
+ * @param {string} warenGruppeGuid - The GUID of the commodity group
119
+ * @returns {Promise<KatalogArtikelDTO[]>}
120
+ */
121
+ getArtikelForWarengruppe: (warenGruppeGuid) => fluentApi.get(`WarenGruppe/${warenGruppeGuid}/artikel`),
122
+
89
123
  // ProduktGruppenWebRoutinen
90
124
  /**
91
- * Get all product groups
92
- * @param {boolean} [includeFamilien=true] - Include families and variants
93
- * @returns {Promise<ProduktGruppeDTO[]>}
94
- */
125
+ * Get all product groups
126
+ * @param {boolean} [includeFamilien=true] - Include families and variants
127
+ * @returns {Promise<ProduktGruppeDTO[]>}
128
+ */
95
129
  getAllProduktGruppen: (includeFamilien = true) =>
96
130
  fluentApi.get(`ProduktGruppe?includeFamilien=${includeFamilien}&includeVarianten=${includeFamilien}&includeUIDefs=${includeFamilien}&maxLevel=99`),
97
131
 
98
132
  /**
99
- * Save product group
100
- * @param {ProduktGruppeDTO} produktGruppe
101
- * @returns {Promise<ProduktGruppeDTO>}
102
- */
133
+ * Save product group
134
+ * @param {ProduktGruppeDTO} produktGruppe
135
+ * @returns {Promise<ProduktGruppeDTO>}
136
+ */
103
137
  saveProduktGruppe: (produktGruppe) =>
104
138
  fluentApi.put(`ProduktGruppe/${produktGruppe.ProduktGruppeGuid}`, produktGruppe),
105
139
 
106
140
  // ProduktFamilienWebRoutinen
107
141
  /**
108
- * Get all product families
109
- * @param {boolean} [includeVarianten=true] - Include variants
110
- * @returns {Promise<ProduktFamilieDTO[]>}
111
- */
142
+ * Get all product families
143
+ * @param {boolean} [includeVarianten=true] - Include variants
144
+ * @returns {Promise<ProduktFamilieDTO[]>}
145
+ */
112
146
  getAllProduktFamilien: (includeVarianten = true) =>
113
147
  fluentApi.get(`ProduktFamilie?includeVarianten=${includeVarianten}&includeUIDefs=${includeVarianten}&maxLevel=99`),
114
148
 
115
149
  /**
116
- * Save product family
117
- * @param {ProduktFamilieDTO} produktFamilie
118
- * @returns {Promise<ProduktFamilieDTO>}
119
- */
150
+ * Save product family
151
+ * @param {ProduktFamilieDTO} produktFamilie
152
+ * @returns {Promise<ProduktFamilieDTO>}
153
+ */
120
154
  saveProduktFamilie: (produktFamilie) =>
121
155
  fluentApi.put(`ProduktFamilie/${produktFamilie.ProduktFamilieGuid}`, produktFamilie),
122
156
 
123
157
  // KomponentenWebRoutinen
124
158
  /**
125
- * Get all components
126
- * @returns {Promise<KomponenteDTO[]>}
127
- */
159
+ * Get all components
160
+ * @returns {Promise<KomponenteDTO[]>}
161
+ */
128
162
  getAllKomponenten: () => fluentApi.get("Komponente"),
129
163
 
130
164
  /**
131
- * Save component
132
- * @param {KomponenteDTO} dto
133
- * @returns {Promise<void>}
134
- */
165
+ * Save component
166
+ * @param {KomponenteDTO} dto
167
+ * @returns {Promise<void>}
168
+ */
135
169
  saveKomponente: (dto) => fluentApi.put("Komponente", dto),
136
170
 
137
171
  // VariantenWebRoutinen
138
172
  /**
139
- * Get all variants
140
- * @returns {Promise<VarianteDTO[]>}
141
- */
173
+ * Get all variants
174
+ * @returns {Promise<VarianteDTO[]>}
175
+ */
142
176
  getAllVarianten: () => fluentApi.get("Variante?includeUIDefs=true&maxLevel=99"),
143
177
 
144
178
  /**
145
- * Get all variant GUIDs
146
- * @returns {Promise<string[]>}
147
- */
179
+ * Get all variant GUIDs
180
+ * @returns {Promise<string[]>}
181
+ */
148
182
  getAllVariantenGuids: () => fluentApi.get("Variante/GetAllGuids"),
149
183
 
150
184
  /**
151
- * Get all variant changes since date
152
- * @param {Date} [changedSince]
153
- * @returns {Promise<string[]>}
154
- */
185
+ * Get all variant changes since date
186
+ * @param {Date} [changedSince]
187
+ * @returns {Promise<string[]>}
188
+ */
155
189
  getAllVariantenChanges: (changedSince) => {
156
190
  const url = changedSince
157
191
  ? `Variante/GetAllVariantenChanges?changedSince=${changedSince.toISOString()}`
@@ -160,83 +194,83 @@ export function createArtikelApi(fluentApi) {
160
194
  },
161
195
 
162
196
  /**
163
- * Get variant by GUID
164
- * @param {string} varianteGuid
165
- * @param {boolean} [includeUIDefs=true]
166
- * @param {boolean} [includeKonfigs=true]
167
- * @returns {Promise<VarianteDTO>}
168
- */
197
+ * Get variant by GUID
198
+ * @param {string} varianteGuid
199
+ * @param {boolean} [includeUIDefs=true]
200
+ * @param {boolean} [includeKonfigs=true]
201
+ * @returns {Promise<VarianteDTO>}
202
+ */
169
203
  getVariante: (varianteGuid, includeUIDefs = true, includeKonfigs = true) =>
170
204
  fluentApi.get(`Variante/${varianteGuid}?includeUIDefs=${includeUIDefs}&maxLevel=99&includeKonfigs=${includeKonfigs}`),
171
205
 
172
206
  /**
173
- * Save variant
174
- * @param {VarianteDTO} variante
175
- * @returns {Promise<VarianteDTO>}
176
- */
207
+ * Save variant
208
+ * @param {VarianteDTO} variante
209
+ * @returns {Promise<VarianteDTO>}
210
+ */
177
211
  saveVariante: (variante) => fluentApi.put(`Variante/${variante.VarianteGuid}`, variante),
178
212
 
179
213
  /**
180
- * Trigger variant cache web job
181
- * @returns {Promise<void>}
182
- */
214
+ * Trigger variant cache web job
215
+ * @returns {Promise<void>}
216
+ */
183
217
  cacheWebJob: () => fluentApi.post("Variante/CacheWebJob", null),
184
218
 
185
219
  // KonturenWebRoutinen
186
220
  /**
187
- * Get all contours
188
- * @returns {Promise<KonturDTO[]>}
189
- */
221
+ * Get all contours
222
+ * @returns {Promise<KonturDTO[]>}
223
+ */
190
224
  getAllKonturen: () => fluentApi.get("Kontur"),
191
225
 
192
226
  /**
193
- * Save contour
194
- * @param {KonturDTO} dto
195
- * @returns {Promise<void>}
196
- */
227
+ * Save contour
228
+ * @param {KonturDTO} dto
229
+ * @returns {Promise<void>}
230
+ */
197
231
  saveKontur: (dto) => fluentApi.put("Kontur", dto),
198
232
 
199
233
  // SchnitteWebRoutinen
200
234
  /**
201
- * Get all cuts
202
- * @returns {Promise<SchnittDTO[]>}
203
- */
235
+ * Get all cuts
236
+ * @returns {Promise<SchnittDTO[]>}
237
+ */
204
238
  getAllSchnitte: () => fluentApi.get("Schnitt"),
205
239
 
206
240
  /**
207
- * Save cut
208
- * @param {SchnittDTO} dto
209
- * @returns {Promise<void>}
210
- */
241
+ * Save cut
242
+ * @param {SchnittDTO} dto
243
+ * @returns {Promise<void>}
244
+ */
211
245
  saveSchnitt: (dto) => fluentApi.put("Schnitt", dto),
212
246
 
213
247
  // SonderfarbWebRoutinen
214
248
  /**
215
- * Calculate special colors for beleg
216
- * @param {string} belegGuid
217
- * @returns {Promise<BelegDTO>}
218
- */
249
+ * Calculate special colors for beleg
250
+ * @param {string} belegGuid
251
+ * @returns {Promise<BelegDTO>}
252
+ */
219
253
  berechneSonderfarben: (belegGuid) => fluentApi.post(`BelegSonderfarben?bguid=${belegGuid}`, null),
220
254
 
221
255
  // BenutzerVariantenWebRoutinen
222
256
  /**
223
- * Get user variants
224
- * @param {string} benutzerGuid
225
- * @param {boolean} mitSperrliste
226
- * @returns {Promise<VarianteDTO[]>}
227
- */
257
+ * Get user variants
258
+ * @param {string} benutzerGuid
259
+ * @param {boolean} mitSperrliste
260
+ * @returns {Promise<VarianteDTO[]>}
261
+ */
228
262
  getBenutzerVarianten: (benutzerGuid, mitSperrliste) =>
229
263
  fluentApi.get(`BenutzerVarianten?id=${benutzerGuid}&mitSperrliste=${mitSperrliste}`),
230
264
 
231
265
  // ResetCacheVariantenListenWebRoutinen
232
266
  /**
233
- * Reset variant list cache
234
- * @returns {Promise<void>}
235
- */
267
+ * Reset variant list cache
268
+ * @returns {Promise<void>}
269
+ */
236
270
  resetCacheVariantenListen: () => fluentApi.put("ResetCacheVariantenListen", null),
237
271
  };
238
272
  }
239
273
 
240
274
  /**
241
- * @typedef {ReturnType<typeof createArtikelApi>} ArtikelApi
242
- */
275
+ * @typedef {ReturnType<typeof createArtikelApi>} ArtikelApi
276
+ */
@@ -21,343 +21,355 @@
21
21
  * @param {FluentApi} fluentApi
22
22
  */
23
23
  export function createBelegApi(fluentApi) {
24
- return {
25
- // BelegStatusWebRoutinen
26
- /**
27
- * Get beleg status
28
- * @param {string} belegGuid
29
- * @returns {Promise<BelegStatusDTO>}
30
- */
31
- getBelegStatus: (belegGuid) => fluentApi.get(`BelegStatus?id=${belegGuid}`),
32
-
33
- /**
34
- * Set beleg status
35
- * @param {string} belegGuid
36
- * @param {string} statusCode
37
- * @param {string} [statusText]
38
- * @returns {Promise<BelegStatusDTO>}
39
- */
40
- setBelegStatus: (belegGuid, statusCode, statusText = "") =>
41
- fluentApi.put("BelegStatus", { belegGuid, neuerStatus: statusCode, neuerStatusText: statusText }),
42
-
43
- // BelegArtWebRoutinen
44
- /**
45
- * Copy beleg with new beleg art
46
- * @param {string} belegGuid
47
- * @param {string} neueBelegArt
48
- * @param {boolean} [saldenKopieren=false]
49
- * @returns {Promise<VorgangDTO>}
50
- */
51
- belegKopieren: (belegGuid, neueBelegArt, saldenKopieren = false) =>
52
- fluentApi.post(`BelegArt?bguid=${belegGuid}&saldenKopieren=${saldenKopieren}&neueBelegArt=${neueBelegArt}`, {}),
53
-
54
- // BelegArtPosWebRoutinen
55
- /**
56
- * Change beleg art for position
57
- * @param {BelegartWechselDTO} dto
58
- * @returns {Promise<VorgangDTO>}
59
- */
60
- belegWechsel: (dto) => fluentApi.put("BelegArtPos", dto),
61
-
62
- // BelegLoeschenWebRoutinen
63
- /**
64
- * Delete beleg
65
- * @param {string} belegGuid
66
- * @returns {Promise<VorgangDTO>}
67
- */
68
- belegLoeschen: (belegGuid) => fluentApi.delete(`Vorgang/DeleteBeleg/${belegGuid}`),
69
-
70
- // VorgangListeWebRoutinen
71
- /**
72
- * Load vorgang list by year
73
- * @param {number} jahr
74
- * @param {boolean} [includeASP=false]
75
- * @param {boolean} [includeAdditionalProperties=false]
76
- * @returns {Promise<VorgangListItemDTO[]>}
77
- */
78
- ladeVorgangsListeByJahr: (jahr, includeASP = false, includeAdditionalProperties = false) =>
79
- fluentApi.get(`VorgangListe/?jahr=${jahr}&includeASP=${includeASP}&includeAdditionalProperties=${includeAdditionalProperties}`),
80
-
81
- /**
82
- * Load vorgang list by status and year
83
- * @param {string} status
84
- * @param {number} jahr
85
- * @param {boolean} [includeASP=false]
86
- * @param {boolean} [includeAdditionalProperties=false]
87
- * @returns {Promise<VorgangListItemDTO[]>}
88
- */
89
- ladeVorgangsListeByStatus: (status, jahr, includeASP = false, includeAdditionalProperties = false) =>
90
- fluentApi.get(`VorgangListe/?status=${status}&jahr=${jahr}&includeASP=${includeASP}&includeAdditionalProperties=${includeAdditionalProperties}`),
91
-
92
- /**
93
- * Load vorgang list by status, year, and change date
94
- * @param {string} status
95
- * @param {number} jahr
96
- * @param {Date} changedSince
97
- * @param {boolean} [includeASP=false]
98
- * @param {boolean} [includeAdditionalProperties=false]
99
- * @returns {Promise<VorgangListItemDTO[]>}
100
- */
101
- ladeVorgangsListeByStatusAndDate: (status, jahr, changedSince, includeASP = false, includeAdditionalProperties = false) =>
102
- fluentApi.get(`VorgangListe/?status=${status}&jahr=${jahr}&changedSince=${changedSince.toISOString()}&includeASP=${includeASP}&includeAdditionalProperties=${includeAdditionalProperties}`),
103
-
104
- /**
105
- * Load vorgang list with full filters
106
- * @param {number} jahr
107
- * @param {string} status
108
- * @param {Date} changedSince
109
- * @param {string} [art]
110
- * @param {boolean} [includeArchive=false]
111
- * @param {boolean} [includeOthersData=false]
112
- * @param {string} [search]
113
- * @param {boolean} [includeASP=false]
114
- * @param {boolean} [includeAdditionalProperties=false]
115
- * @returns {Promise<VorgangListItemDTO[]>}
116
- */
117
- ladeVorgangsListe: (jahr, status, changedSince, art = "", includeArchive = false, includeOthersData = false, search = "", includeASP = false, includeAdditionalProperties = false) =>
118
- fluentApi.get(`VorgangListe/?status=${status}&jahr=${jahr}&changedSince=${changedSince.toISOString()}&art=${art}&includeArchive=${includeArchive}&includeOthersData=${includeOthersData}&search=${search}&includeASP=${includeASP}&includeAdditionalProperties=${includeAdditionalProperties}`),
119
-
120
- /**
121
- * Load vorgang list by customer
122
- * @param {string} kundeGuid
123
- * @returns {Promise<VorgangListItemDTO[]>}
124
- */
125
- ladeVorgangsListeByKunde: (kundeGuid) => fluentApi.get(`VorgangListe/?kundeGuid=${kundeGuid}`),
126
-
127
- // VorgangStatusTableWebRoutinen
128
- /**
129
- * Update vorgang status table for function
130
- * @param {VorgangStatusTableDTO} dto
131
- * @returns {Promise<void>}
132
- */
133
- updateVorgangStatusTableForFunction: (dto) => fluentApi.post("VorgangStatus/UpdateVorgangStatusTableForFunction", dto),
134
-
135
- /**
136
- * Get not calculated vorgang status table for function
137
- * @returns {Promise<VorgangStatusTableDTO[]>}
138
- */
139
- getNotCalculatedVorgangStatusTableForFunction: () =>
140
- fluentApi.get("VorgangStatus/GetNotCalculatedVorgangStatusTableForFunction"),
141
-
142
- // VorgangReaktivierenWebRoutinen
143
- /**
144
- * Reactivate vorgang
145
- * @param {BelegartWechselDTO} dto
146
- * @returns {Promise<VorgangDTO>}
147
- */
148
- vorgangReaktivieren: (dto) => fluentApi.put("VorgangReaktivieren", dto),
149
-
150
- // LieferscheineWebRoutinen
151
- /**
152
- * Load delivery note list by year
153
- * @param {number} jahr
154
- * @returns {Promise<BaseListItemDTO[]>}
155
- */
156
- ladeLieferscheinListeByJahr: (jahr) => fluentApi.get(`Lieferscheine/?jahr=${jahr}`),
157
-
158
- /**
159
- * Load delivery note list by status and year
160
- * @param {string} status
161
- * @param {number} jahr
162
- * @returns {Promise<BaseListItemDTO[]>}
163
- */
164
- ladeLieferscheinListeByStatus: (status, jahr) => fluentApi.get(`Lieferscheine/?status=${status}&jahr=${jahr}`),
165
-
166
- /**
167
- * Load delivery note list by status, year, and change date
168
- * @param {string} status
169
- * @param {number} jahr
170
- * @param {Date} changedSince
171
- * @returns {Promise<BaseListItemDTO[]>}
172
- */
173
- ladeLieferscheinListeByStatusAndDate: (status, jahr, changedSince) =>
174
- fluentApi.get(`Lieferscheine/?status=${status}&jahr=${jahr}&changedSince=${changedSince.toISOString()}`),
175
-
176
- /**
177
- * Load delivery note list with full filters
178
- * @param {number} jahr
179
- * @param {string} status
180
- * @param {Date} changedSince
181
- * @param {string} [art]
182
- * @param {boolean} [includeArchive=false]
183
- * @param {boolean} [includeOthersData=false]
184
- * @param {string} [search]
185
- * @returns {Promise<BaseListItemDTO[]>}
186
- */
187
- ladeLieferscheinListe: (jahr, status, changedSince, art = "", includeArchive = false, includeOthersData = false, search = "") =>
188
- fluentApi.get(`Lieferscheine/?status=${status}&jahr=${jahr}&changedSince=${changedSince.toISOString()}&art=${art}&includeArchive=${includeArchive}&includeOthersData=${includeOthersData}&search=${search}`),
189
-
190
- /**
191
- * Get vorgang by delivery note GUID
192
- * @param {string} lieferscheinGuid
193
- * @returns {Promise<VorgangDTO>}
194
- */
195
- getVorgangByLieferscheinGuid: (lieferscheinGuid) => fluentApi.get(`Lieferscheine/${lieferscheinGuid}`),
196
-
197
- /**
198
- * Get vorgang status
199
- * @param {string} vorgangGuid
200
- * @returns {Promise<VorgangStatusDTO>}
201
- */
202
- getLieferscheinStatus: (vorgangGuid) => fluentApi.get(`VorgangStatus/${vorgangGuid}`),
203
-
204
- /**
205
- * Set vorgang status
206
- * @param {string} vorgangGuid
207
- * @param {string} statusCode
208
- * @returns {Promise<VorgangStatusDTO>}
209
- */
210
- setLieferscheinStatus: (vorgangGuid, statusCode) =>
211
- fluentApi.put("VorgangStatus", { vorgangGuid, neuerStatus: statusCode }),
212
-
213
- // HistorieWebRoutinen
214
- /**
215
- * Get vorgang history
216
- * @param {string} vorgangGuid
217
- * @param {boolean} [includeBelege=false]
218
- * @param {boolean} [includePositionen=false]
24
+ return {
25
+ // BelegStatusWebRoutinen
26
+ /**
27
+ * Get beleg status
28
+ * @param {string} belegGuid
29
+ * @returns {Promise<BelegStatusDTO>}
30
+ */
31
+ getBelegStatus: (belegGuid) => fluentApi.get(`BelegStatus?id=${belegGuid}`),
32
+
33
+ /**
34
+ * Set beleg status
35
+ * @param {string} belegGuid
36
+ * @param {string} statusCode
37
+ * @param {string} [statusText]
38
+ * @returns {Promise<BelegStatusDTO>}
39
+ */
40
+ setBelegStatus: (belegGuid, statusCode, statusText = "") =>
41
+ fluentApi.put("BelegStatus", { belegGuid, neuerStatus: statusCode, neuerStatusText: statusText }),
42
+
43
+ // BelegArtWebRoutinen
44
+ /**
45
+ * Copy beleg with new beleg art
46
+ * @param {string} belegGuid
47
+ * @param {string} neueBelegArt
48
+ * @param {boolean} [saldenKopieren=false]
49
+ * @returns {Promise<VorgangDTO>}
50
+ */
51
+ belegKopieren: (belegGuid, neueBelegArt, saldenKopieren = false) =>
52
+ fluentApi.post(`BelegArt?bguid=${belegGuid}&saldenKopieren=${saldenKopieren}&neueBelegArt=${neueBelegArt}`, {}),
53
+
54
+ // BelegListeWebRoutinen
55
+ /**
56
+ * Get beleg list
57
+ * @param {number} jahr
58
+ * @param {string} belegart
59
+ * @param {string} kundennummer
60
+ * @param {boolean} [includeArtikel=false]
61
+ * @returns {Promise<VorgangListItemDTO[]>}
62
+ */
63
+ belegListe: (jahr, belegart, kundennummer, includeArtikel = true) =>
64
+ fluentApi.get(`BelegListe?jahr=${jahr}&belegart=${belegart}&kundennummer=${kundennummer}&includeArtikel=${includeArtikel}`),
65
+
66
+ // BelegArtPosWebRoutinen
67
+ /**
68
+ * Change beleg art for position
69
+ * @param {BelegartWechselDTO} dto
70
+ * @returns {Promise<VorgangDTO>}
71
+ */
72
+ belegWechsel: (dto) => fluentApi.put("BelegArtPos", dto),
73
+
74
+ // BelegLoeschenWebRoutinen
75
+ /**
76
+ * Delete beleg
77
+ * @param {string} belegGuid
78
+ * @returns {Promise<VorgangDTO>}
79
+ */
80
+ belegLoeschen: (belegGuid) => fluentApi.delete(`Vorgang/DeleteBeleg/${belegGuid}`),
81
+
82
+ // VorgangListeWebRoutinen
83
+ /**
84
+ * Load vorgang list by year
85
+ * @param {number} jahr
86
+ * @param {boolean} [includeASP=false]
87
+ * @param {boolean} [includeAdditionalProperties=false]
88
+ * @returns {Promise<VorgangListItemDTO[]>}
89
+ */
90
+ ladeVorgangsListeByJahr: (jahr, includeASP = false, includeAdditionalProperties = false) =>
91
+ fluentApi.get(`VorgangListe/?jahr=${jahr}&includeASP=${includeASP}&includeAdditionalProperties=${includeAdditionalProperties}`),
92
+
93
+ /**
94
+ * Load vorgang list by status and year
95
+ * @param {string} status
96
+ * @param {number} jahr
97
+ * @param {boolean} [includeASP=false]
98
+ * @param {boolean} [includeAdditionalProperties=false]
99
+ * @returns {Promise<VorgangListItemDTO[]>}
100
+ */
101
+ ladeVorgangsListeByStatus: (status, jahr, includeASP = false, includeAdditionalProperties = false) =>
102
+ fluentApi.get(`VorgangListe/?status=${status}&jahr=${jahr}&includeASP=${includeASP}&includeAdditionalProperties=${includeAdditionalProperties}`),
103
+
104
+ /**
105
+ * Load vorgang list by status, year, and change date
106
+ * @param {string} status
107
+ * @param {number} jahr
108
+ * @param {Date} changedSince
109
+ * @param {boolean} [includeASP=false]
110
+ * @param {boolean} [includeAdditionalProperties=false]
111
+ * @returns {Promise<VorgangListItemDTO[]>}
112
+ */
113
+ ladeVorgangsListeByStatusAndDate: (status, jahr, changedSince, includeASP = false, includeAdditionalProperties = false) =>
114
+ fluentApi.get(`VorgangListe/?status=${status}&jahr=${jahr}&changedSince=${changedSince.toISOString()}&includeASP=${includeASP}&includeAdditionalProperties=${includeAdditionalProperties}`),
115
+
116
+ /**
117
+ * Load vorgang list with full filters
118
+ * @param {number} jahr
119
+ * @param {string} status
120
+ * @param {Date} changedSince
121
+ * @param {string} [art]
122
+ * @param {boolean} [includeArchive=false]
123
+ * @param {boolean} [includeOthersData=false]
124
+ * @param {string} [search]
125
+ * @param {boolean} [includeASP=false]
126
+ * @param {boolean} [includeAdditionalProperties=false]
127
+ * @returns {Promise<VorgangListItemDTO[]>}
128
+ */
129
+ ladeVorgangsListe: (jahr, status, changedSince, art = "", includeArchive = false, includeOthersData = false, search = "", includeASP = false, includeAdditionalProperties = false) =>
130
+ fluentApi.get(`VorgangListe/?status=${status}&jahr=${jahr}&changedSince=${changedSince.toISOString()}&art=${art}&includeArchive=${includeArchive}&includeOthersData=${includeOthersData}&search=${search}&includeASP=${includeASP}&includeAdditionalProperties=${includeAdditionalProperties}`),
131
+
132
+ /**
133
+ * Load vorgang list by customer
134
+ * @param {string} kundeGuid
135
+ * @returns {Promise<VorgangListItemDTO[]>}
136
+ */
137
+ ladeVorgangsListeByKunde: (kundeGuid) => fluentApi.get(`VorgangListe/?kundeGuid=${kundeGuid}`),
138
+
139
+ // VorgangStatusTableWebRoutinen
140
+ /**
141
+ * Update vorgang status table for function
142
+ * @param {VorgangStatusTableDTO} dto
143
+ * @returns {Promise<void>}
144
+ */
145
+ updateVorgangStatusTableForFunction: (dto) => fluentApi.post("VorgangStatus/UpdateVorgangStatusTableForFunction", dto),
146
+
147
+ /**
148
+ * Get not calculated vorgang status table for function
149
+ * @returns {Promise<VorgangStatusTableDTO[]>}
150
+ */
151
+ getNotCalculatedVorgangStatusTableForFunction: () =>
152
+ fluentApi.get("VorgangStatus/GetNotCalculatedVorgangStatusTableForFunction"),
153
+
154
+ // VorgangReaktivierenWebRoutinen
155
+ /**
156
+ * Reactivate vorgang
157
+ * @param {BelegartWechselDTO} dto
158
+ * @returns {Promise<VorgangDTO>}
159
+ */
160
+ vorgangReaktivieren: (dto) => fluentApi.put("VorgangReaktivieren", dto),
161
+
162
+ // LieferscheineWebRoutinen
163
+ /**
164
+ * Load delivery note list by year
165
+ * @param {number} jahr
166
+ * @returns {Promise<BaseListItemDTO[]>}
167
+ */
168
+ ladeLieferscheinListeByJahr: (jahr) => fluentApi.get(`Lieferscheine/?jahr=${jahr}`),
169
+
170
+ /**
171
+ * Load delivery note list by status and year
172
+ * @param {string} status
173
+ * @param {number} jahr
174
+ * @returns {Promise<BaseListItemDTO[]>}
175
+ */
176
+ ladeLieferscheinListeByStatus: (status, jahr) => fluentApi.get(`Lieferscheine/?status=${status}&jahr=${jahr}`),
177
+
178
+ /**
179
+ * Load delivery note list by status, year, and change date
180
+ * @param {string} status
181
+ * @param {number} jahr
182
+ * @param {Date} changedSince
183
+ * @returns {Promise<BaseListItemDTO[]>}
184
+ */
185
+ ladeLieferscheinListeByStatusAndDate: (status, jahr, changedSince) =>
186
+ fluentApi.get(`Lieferscheine/?status=${status}&jahr=${jahr}&changedSince=${changedSince.toISOString()}`),
187
+
188
+ /**
189
+ * Load delivery note list with full filters
190
+ * @param {number} jahr
191
+ * @param {string} status
192
+ * @param {Date} changedSince
193
+ * @param {string} [art]
194
+ * @param {boolean} [includeArchive=false]
195
+ * @param {boolean} [includeOthersData=false]
196
+ * @param {string} [search]
197
+ * @returns {Promise<BaseListItemDTO[]>}
198
+ */
199
+ ladeLieferscheinListe: (jahr, status, changedSince, art = "", includeArchive = false, includeOthersData = false, search = "") =>
200
+ fluentApi.get(`Lieferscheine/?status=${status}&jahr=${jahr}&changedSince=${changedSince.toISOString()}&art=${art}&includeArchive=${includeArchive}&includeOthersData=${includeOthersData}&search=${search}`),
201
+
202
+ /**
203
+ * Get vorgang by delivery note GUID
204
+ * @param {string} lieferscheinGuid
205
+ * @returns {Promise<VorgangDTO>}
206
+ */
207
+ getVorgangByLieferscheinGuid: (lieferscheinGuid) => fluentApi.get(`Lieferscheine/${lieferscheinGuid}`),
208
+
209
+ /**
210
+ * Get vorgang status
211
+ * @param {string} vorgangGuid
212
+ * @returns {Promise<VorgangStatusDTO>}
213
+ */
214
+ getLieferscheinStatus: (vorgangGuid) => fluentApi.get(`VorgangStatus/${vorgangGuid}`),
215
+
216
+ /**
217
+ * Set vorgang status
218
+ * @param {string} vorgangGuid
219
+ * @param {string} statusCode
220
+ * @returns {Promise<VorgangStatusDTO>}
221
+ */
222
+ setLieferscheinStatus: (vorgangGuid, statusCode) =>
223
+ fluentApi.put("VorgangStatus", { vorgangGuid, neuerStatus: statusCode }),
224
+
225
+ // HistorieWebRoutinen
226
+ /**
227
+ * Get vorgang history
228
+ * @param {string} vorgangGuid
229
+ * @param {boolean} [includeBelege=false]
230
+ * @param {boolean} [includePositionen=false]
219
231
  * @returns {Promise<VorgangHistorienDTO>}
220
- */
221
- getVorgangHistorie: (vorgangGuid, includeBelege = false, includePositionen = false) =>
222
- fluentApi.get(`HistorieVorgang?vorgangGuid=${vorgangGuid}&includeBelege=${includeBelege}&includePositionen=${includePositionen}`),
223
-
224
- /**
225
- * Get beleg history
226
- * @param {string} belegGuid
227
- * @param {boolean} [includePositionen=false]
232
+ */
233
+ getVorgangHistorie: (vorgangGuid, includeBelege = false, includePositionen = false) =>
234
+ fluentApi.get(`HistorieVorgang?vorgangGuid=${vorgangGuid}&includeBelege=${includeBelege}&includePositionen=${includePositionen}`),
235
+
236
+ /**
237
+ * Get beleg history
238
+ * @param {string} belegGuid
239
+ * @param {boolean} [includePositionen=false]
228
240
  * @returns {Promise<BelegHistorienDTO>}
229
- */
230
- getBelegHistorie: (belegGuid, includePositionen = false) =>
231
- fluentApi.get(`HistorieBeleg?belegGuid=${belegGuid}&includePositionen=${includePositionen}`),
241
+ */
242
+ getBelegHistorie: (belegGuid, includePositionen = false) =>
243
+ fluentApi.get(`HistorieBeleg?belegGuid=${belegGuid}&includePositionen=${includePositionen}`),
232
244
 
233
- /**
234
- * Get beleg position history
235
- * @param {string} positionGuid
245
+ /**
246
+ * Get beleg position history
247
+ * @param {string} positionGuid
236
248
  * @returns {Promise<BelegPositionHistorienDTO>}
237
- */
238
- getBelegPositionHistorie: (positionGuid) =>
239
- fluentApi.get(`HistorieBelegPosition?positionGuid=${positionGuid}`),
249
+ */
250
+ getBelegPositionHistorie: (positionGuid) =>
251
+ fluentApi.get(`HistorieBelegPosition?positionGuid=${positionGuid}`),
240
252
 
241
- /**
242
- * Get serie history since date
243
- * @param {Date} sinceWhen
253
+ /**
254
+ * Get serie history since date
255
+ * @param {Date} sinceWhen
244
256
  * @returns {Promise<SerieHistorieDTO[]>}
245
- */
246
- getSerieHistorieSince: (sinceWhen) =>
247
- fluentApi.get(`HistorieSerie?createdSince=${sinceWhen.toISOString()}`),
257
+ */
258
+ getSerieHistorieSince: (sinceWhen) =>
259
+ fluentApi.get(`HistorieSerie?createdSince=${sinceWhen.toISOString()}`),
248
260
 
249
- /**
250
- * Get serie history by GUID
251
- * @param {string} serieGuid
261
+ /**
262
+ * Get serie history by GUID
263
+ * @param {string} serieGuid
252
264
  * @returns {Promise<SerieHistorieDTO[]>}
253
- */
254
- getSerieHistorie: (serieGuid) => fluentApi.get(`HistorieSerie?serieGuid=${serieGuid}`),
265
+ */
266
+ getSerieHistorie: (serieGuid) => fluentApi.get(`HistorieSerie?serieGuid=${serieGuid}`),
255
267
 
256
- /**
257
- * Add vorgang history
258
- * @param {string} vorgangGuid
268
+ /**
269
+ * Add vorgang history
270
+ * @param {string} vorgangGuid
259
271
  * @param {VorgangHistorieDTO} historyDto
260
- * @returns {Promise<void>}
261
- */
262
- addVorgangHistorie: (vorgangGuid, historyDto) =>
263
- fluentApi.post(`HistorieVorgang?vorgangGuid=${vorgangGuid}`, historyDto),
264
-
265
- /**
266
- * Add beleg history
267
- * @param {string} belegGuid
272
+ * @returns {Promise<void>}
273
+ */
274
+ addVorgangHistorie: (vorgangGuid, historyDto) =>
275
+ fluentApi.post(`HistorieVorgang?vorgangGuid=${vorgangGuid}`, historyDto),
276
+
277
+ /**
278
+ * Add beleg history
279
+ * @param {string} belegGuid
268
280
  * @param {BelegHistorieDTO} historyDto
269
- * @returns {Promise<void>}
270
- */
271
- addBelegHistorie: (belegGuid, historyDto) =>
272
- fluentApi.post(`HistorieBeleg?belegGuid=${belegGuid}`, historyDto),
273
-
274
- /**
275
- * Add beleg position history
276
- * @param {string} positionGuid
281
+ * @returns {Promise<void>}
282
+ */
283
+ addBelegHistorie: (belegGuid, historyDto) =>
284
+ fluentApi.post(`HistorieBeleg?belegGuid=${belegGuid}`, historyDto),
285
+
286
+ /**
287
+ * Add beleg position history
288
+ * @param {string} positionGuid
277
289
  * @param {BelegPositionHistorieDTO} historyDto
278
- * @returns {Promise<void>}
279
- */
280
- addBelegPositionHistorie: (positionGuid, historyDto) =>
281
- fluentApi.post(`HistorieBelegPosition?positionGuid=${positionGuid}`, historyDto),
290
+ * @returns {Promise<void>}
291
+ */
292
+ addBelegPositionHistorie: (positionGuid, historyDto) =>
293
+ fluentApi.post(`HistorieBelegPosition?positionGuid=${positionGuid}`, historyDto),
282
294
 
283
- /**
284
- * Add serie history
295
+ /**
296
+ * Add serie history
285
297
  * @param {SerieHistorieDTO} historyDto
286
- * @returns {Promise<void>}
287
- */
288
- addSerieHistorie: (historyDto) => fluentApi.post("HistorieSerie", historyDto),
298
+ * @returns {Promise<void>}
299
+ */
300
+ addSerieHistorie: (historyDto) => fluentApi.post("HistorieSerie", historyDto),
289
301
 
290
- /**
291
- * Add vorgang history from function
292
- * @param {string} vorgangGuid
302
+ /**
303
+ * Add vorgang history from function
304
+ * @param {string} vorgangGuid
293
305
  * @param {VorgangHistorieDTO} historyDto
294
- * @param {number} mandantID
295
- * @returns {Promise<void>}
296
- */
297
- addVorgangHistorieFromFunction: (vorgangGuid, historyDto, mandantID) =>
298
- fluentApi.post(`AddVorgangHistorieFromFunction?vorgangGuid=${vorgangGuid}&mandantID=${mandantID}`, historyDto),
299
-
300
- /**
301
- * Add beleg position history from function
302
- * @param {string} positionGuid
306
+ * @param {number} mandantID
307
+ * @returns {Promise<void>}
308
+ */
309
+ addVorgangHistorieFromFunction: (vorgangGuid, historyDto, mandantID) =>
310
+ fluentApi.post(`AddVorgangHistorieFromFunction?vorgangGuid=${vorgangGuid}&mandantID=${mandantID}`, historyDto),
311
+
312
+ /**
313
+ * Add beleg position history from function
314
+ * @param {string} positionGuid
303
315
  * @param {BelegPositionHistorieDTO} historyDto
304
- * @param {number} mandantID
305
- * @returns {Promise<void>}
306
- */
307
- addBelegPositionHistorieFromFunction: (positionGuid, historyDto, mandantID) =>
308
- fluentApi.post(`AddBelegPositionHistorieFromFunction?positionGuid=${positionGuid}&mandantID=${mandantID}`, historyDto),
309
-
310
- /**
311
- * Add serie history from function
316
+ * @param {number} mandantID
317
+ * @returns {Promise<void>}
318
+ */
319
+ addBelegPositionHistorieFromFunction: (positionGuid, historyDto, mandantID) =>
320
+ fluentApi.post(`AddBelegPositionHistorieFromFunction?positionGuid=${positionGuid}&mandantID=${mandantID}`, historyDto),
321
+
322
+ /**
323
+ * Add serie history from function
312
324
  * @param {SerieHistorieDTO} historyDto
313
- * @param {number} mandantID
314
- * @returns {Promise<void>}
315
- */
316
- addSerieHistorieFromFunction: (historyDto, mandantID) =>
317
- fluentApi.post(`AddBelegPositionHistorieFromFunction?mandantID=${mandantID}`, historyDto),
318
-
319
- /**
320
- * Get last editor for beleg
321
- * @param {string} belegGuid
322
- * @returns {Promise<string>}
323
- */
324
- getLetzterBearbeiter: (belegGuid) =>
325
- fluentApi.get(`HistorieBeleg/LetzterBearbeiter?belegGuid=${belegGuid}`),
326
-
327
- /**
328
- * Get last editors for belege
329
- * @param {string[]} belegGuids
330
- * @returns {Promise<Record<string, string>>}
331
- */
332
- getLetzteBearbeiter: (belegGuids) =>
333
- fluentApi.post("HistorieBeleg/LetzteBearbeiter", belegGuids),
334
-
335
- // PositionStornoWebRoutinen
336
- /**
337
- * Storniere position
338
- * @param {string} positionGuid
339
- * @returns {Promise<void>}
340
- */
341
- positionStornieren: (positionGuid) =>
342
- fluentApi.post(`PositionStorno?posGuid=${positionGuid}`, null),
343
-
344
- /**
345
- * Storniere beleg
346
- * @param {string} belegGuid
347
- * @returns {Promise<void>}
348
- */
349
- belegStornieren: (belegGuid) =>
350
- fluentApi.post(`BelegStorno?belegGuid=${belegGuid}`, null),
351
-
352
- // FremdfertigungWebRoutinen
353
- /**
354
- * Order external production
355
- * @param {string} belegGuid
356
- * @returns {Promise<void>}
357
- */
358
- fremdfertigungBestellen: (belegGuid) =>
359
- fluentApi.put(`Fremdfertigung/?bguid=${belegGuid}`, null),
360
- };
325
+ * @param {number} mandantID
326
+ * @returns {Promise<void>}
327
+ */
328
+ addSerieHistorieFromFunction: (historyDto, mandantID) =>
329
+ fluentApi.post(`AddBelegPositionHistorieFromFunction?mandantID=${mandantID}`, historyDto),
330
+
331
+ /**
332
+ * Get last editor for beleg
333
+ * @param {string} belegGuid
334
+ * @returns {Promise<string>}
335
+ */
336
+ getLetzterBearbeiter: (belegGuid) =>
337
+ fluentApi.get(`HistorieBeleg/LetzterBearbeiter?belegGuid=${belegGuid}`),
338
+
339
+ /**
340
+ * Get last editors for belege
341
+ * @param {string[]} belegGuids
342
+ * @returns {Promise<Record<string, string>>}
343
+ */
344
+ getLetzteBearbeiter: (belegGuids) =>
345
+ fluentApi.post("HistorieBeleg/LetzteBearbeiter", belegGuids),
346
+
347
+ // PositionStornoWebRoutinen
348
+ /**
349
+ * Storniere position
350
+ * @param {string} positionGuid
351
+ * @returns {Promise<void>}
352
+ */
353
+ positionStornieren: (positionGuid) =>
354
+ fluentApi.post(`PositionStorno?posGuid=${positionGuid}`, null),
355
+
356
+ /**
357
+ * Storniere beleg
358
+ * @param {string} belegGuid
359
+ * @returns {Promise<void>}
360
+ */
361
+ belegStornieren: (belegGuid) =>
362
+ fluentApi.post(`BelegStorno?belegGuid=${belegGuid}`, null),
363
+
364
+ // FremdfertigungWebRoutinen
365
+ /**
366
+ * Order external production
367
+ * @param {string} belegGuid
368
+ * @returns {Promise<void>}
369
+ */
370
+ fremdfertigungBestellen: (belegGuid) =>
371
+ fluentApi.put(`Fremdfertigung/?bguid=${belegGuid}`, null),
372
+ };
361
373
  }
362
374
 
363
375
  /**
package/api/dtos/index.js CHANGED
@@ -223,6 +223,7 @@
223
223
  /** @typedef {import("./ui.js").VarianteDTOListe} VarianteDTOListe */
224
224
  /** @typedef {import("./ui.js").WarenGruppeDTO} WarenGruppeDTO */
225
225
  /** @typedef {import("./ui.js").WarenGruppeDTOListe} WarenGruppeDTOListe */
226
+ /** @typedef {import("./ui.js").WarenGruppeListDTO} WarenGruppeListDTO */
226
227
  /** @typedef {import("./ui.js").WerteListeDTO} WerteListeDTO */
227
228
  /** @typedef {import("./ui.js").WerteListeDTOListe} WerteListeDTOListe */
228
229
  /** @typedef {import("./ui.js").WerteListeItemDTO} WerteListeItemDTO */
package/api/dtos/ui.js CHANGED
@@ -100,6 +100,19 @@
100
100
  * @property {string} FrontendLogik
101
101
  */
102
102
 
103
+ /**
104
+ * @typedef {Object} WarenGruppeListDTO
105
+ * @property {string} WarenGruppeGuid
106
+ * @property {number} Nummer
107
+ * @property {string} Bezeichnung
108
+ * @property {boolean} IstEKPWarengruppe
109
+ * @property {string} FrontendLogik
110
+ * @property {number} Version
111
+ * @property {string} ChangedDate
112
+ * @property {number} ArtikelAnzahl
113
+ * @property {string[]} ArtikelGuids
114
+ */
115
+
103
116
  // ============================================================================
104
117
  // Enums
105
118
  // ============================================================================
@@ -457,11 +470,11 @@ export const DTO_TYPES = {
457
470
  KatalogArtikelFarbZuordnungDTO: "KatalogArtikelFarbZuordnungDTO",
458
471
  KatalogArtikelDTO: "KatalogArtikelDTO",
459
472
  WarenGruppeDTO: "WarenGruppeDTO",
460
-
473
+
461
474
  // Enums
462
475
  FarbArt: "FarbArt",
463
476
  UIEingabeFeldRegelNames: "UIEingabeFeldRegelNames",
464
-
477
+
465
478
  // UI DTOs
466
479
  GuidListDTO: "GuidListDTO",
467
480
  InfoScreenConfigDTO: "InfoScreenConfigDTO",
@@ -64,9 +64,10 @@
64
64
  * @property {boolean} [selected] - Indicates if the menu item is currently selected (managed by the menu system)
65
65
  * @property {string} [icon] - URL to an icon
66
66
  * @property {string | null} [url] - Relative URL to use for routes
67
- * @property {string} text - Display text
67
+ * @property {string} [text] - Display text (ignored for separator items)
68
68
  * @property {string | null} [parent] - Parent menu item (optional). If not set, the item will be added to the top level menu.
69
69
  * @property {boolean} [hidden] - If true, the menu item will not be displayed
70
+ * @property {boolean} [separator] - If true, renders as a non-interactive divider between items (text/icon/url are ignored). Use `parent` to place the separator inside a sub-menu.
70
71
  */
71
72
 
72
73
  /**
package/index.d.ts CHANGED
@@ -116,8 +116,11 @@ export type ArtikelApi = {
116
116
  getAllIndiDaten: (changedSince?: Date) => Promise<KatalogArtikelIndiDatenDTO[]>;
117
117
  saveArtikelIndiDaten: (daten: KatalogArtikelIndiDatenDTO) => Promise<void>;
118
118
  deleteArtikelIndiDaten: (daten: KatalogArtikelIndiDatenDTO) => Promise<void>;
119
- getAllWarenGruppen: () => Promise<WarenGruppeDTO[]>;
119
+ getAllWarenGruppen: (changedSince?: Date, includeArtikel?: boolean) => Promise<WarenGruppeDTO[]>;
120
+ getWarenGruppenList: (changedSince?: Date) => Promise<WarenGruppeListDTO[]>;
120
121
  saveWarenGruppe: (dto: WarenGruppeDTO) => Promise<void>;
122
+ getWarenGruppe: (warenGruppeGuid: string, includeArtikel?: boolean) => Promise<WarenGruppeDTO>;
123
+ getArtikelForWarengruppe: (warenGruppeGuid: string) => Promise<KatalogArtikelDTO[]>;
121
124
  getAllProduktGruppen: (includeFamilien?: boolean) => Promise<ProduktGruppeDTO[]>;
122
125
  saveProduktGruppe: (produktGruppe: ProduktGruppeDTO) => Promise<ProduktGruppeDTO>;
123
126
  getAllProduktFamilien: (includeVarianten?: boolean) => Promise<ProduktFamilieDTO[]>;
@@ -334,6 +337,7 @@ export type BelegApi = {
334
337
  getBelegStatus: (belegGuid: string) => Promise<BelegStatusDTO>;
335
338
  setBelegStatus: (belegGuid: string, statusCode: string, statusText?: string) => Promise<BelegStatusDTO>;
336
339
  belegKopieren: (belegGuid: string, neueBelegArt: string, saldenKopieren?: boolean) => Promise<VorgangDTO>;
340
+ belegListe: (jahr: number, belegart: string, kundennummer: string, includeArtikel?: boolean) => Promise<VorgangListItemDTO[]>;
337
341
  belegWechsel: (dto: BelegartWechselDTO) => Promise<VorgangDTO>;
338
342
  belegLoeschen: (belegGuid: string) => Promise<VorgangDTO>;
339
343
  ladeVorgangsListeByJahr: (jahr: number, includeASP?: boolean, includeAdditionalProperties?: boolean) => Promise<VorgangListItemDTO[]>;
@@ -1995,9 +1999,10 @@ export type NeherApp3MenuItem = {
1995
1999
  selected?: boolean;
1996
2000
  icon?: string;
1997
2001
  url?: string | null;
1998
- text: string;
2002
+ text?: string;
1999
2003
  parent?: string | null;
2000
2004
  hidden?: boolean;
2005
+ separator?: boolean;
2001
2006
  };
2002
2007
 
2003
2008
  export type NeherApp3Module = {
@@ -3124,6 +3129,18 @@ export type WarenGruppeDTO = {
3124
3129
 
3125
3130
  export type WarenGruppeDTOListe = Array<WarenGruppeDTO>;
3126
3131
 
3132
+ export type WarenGruppeListDTO = {
3133
+ WarenGruppeGuid: string;
3134
+ Nummer: number;
3135
+ Bezeichnung: string;
3136
+ IstEKPWarengruppe: boolean;
3137
+ FrontendLogik: string;
3138
+ Version: number;
3139
+ ChangedDate: string;
3140
+ ArtikelAnzahl: number;
3141
+ ArtikelGuids: string[];
3142
+ };
3143
+
3127
3144
  export type WebJobHistorieDTO = {
3128
3145
  WebJobHistorieGuid: string;
3129
3146
  WebJobName: string;
package/index.js CHANGED
@@ -221,6 +221,7 @@ export * from "./api/dtos/index.js";
221
221
  /** @typedef {import("./api/dtos/index.js").VarianteDTOListe} VarianteDTOListe */
222
222
  /** @typedef {import("./api/dtos/index.js").WarenGruppeDTO} WarenGruppeDTO */
223
223
  /** @typedef {import("./api/dtos/index.js").WarenGruppeDTOListe} WarenGruppeDTOListe */
224
+ /** @typedef {import("./api/dtos/index.js").WarenGruppeListDTO} WarenGruppeListDTO */
224
225
  /** @typedef {import("./api/dtos/index.js").WerteListeDTO} WerteListeDTO */
225
226
  /** @typedef {import("./api/dtos/index.js").WerteListeDTOListe} WerteListeDTOListe */
226
227
  /** @typedef {import("./api/dtos/index.js").WerteListeItemDTO} WerteListeItemDTO */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gandalan/weblibs",
3
- "version": "1.5.32",
3
+ "version": "1.5.34",
4
4
  "description": "WebLibs for Gandalan JS/TS projects",
5
5
  "keywords": [
6
6
  "gandalan"