@kommerz/ts-client 1.191.0 → 1.192.0

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.
@@ -0,0 +1,387 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Kommerz API Specification
6
+ * API specification for Kommerz Services. - /ui/ for services consumed by the frontend - /intern/ for internal administration endpoints - /extern/ for services consumed by external services - /stats/ for monitoring endpoints - /actuator/ for health endpoints (e.g. /actuator/health ) All endpoints are postfixed with a version number.
7
+ *
8
+ * Contact: info@kommerz.app
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __extends = (this && this.__extends) || (function () {
15
+ var extendStatics = function (d, b) {
16
+ extendStatics = Object.setPrototypeOf ||
17
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
19
+ return extendStatics(d, b);
20
+ };
21
+ return function (d, b) {
22
+ if (typeof b !== "function" && b !== null)
23
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
24
+ extendStatics(d, b);
25
+ function __() { this.constructor = d; }
26
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
27
+ };
28
+ })();
29
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
30
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
31
+ return new (P || (P = Promise))(function (resolve, reject) {
32
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
33
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
34
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
35
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
36
+ });
37
+ };
38
+ var __generator = (this && this.__generator) || function (thisArg, body) {
39
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
40
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
41
+ function verb(n) { return function (v) { return step([n, v]); }; }
42
+ function step(op) {
43
+ if (f) throw new TypeError("Generator is already executing.");
44
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
45
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
46
+ if (y = 0, t) op = [op[0] & 2, t.value];
47
+ switch (op[0]) {
48
+ case 0: case 1: t = op; break;
49
+ case 4: _.label++; return { value: op[1], done: false };
50
+ case 5: _.label++; y = op[1]; op = [0]; continue;
51
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
52
+ default:
53
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
54
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
55
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
56
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
57
+ if (t[2]) _.ops.pop();
58
+ _.trys.pop(); continue;
59
+ }
60
+ op = body.call(thisArg, _);
61
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
62
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
63
+ }
64
+ };
65
+ Object.defineProperty(exports, "__esModule", { value: true });
66
+ exports.AppointmentsApi = void 0;
67
+ var runtime = require("../runtime");
68
+ var AppointmentDto_1 = require("../models/AppointmentDto");
69
+ var GetAllAppointments200Response_1 = require("../models/GetAllAppointments200Response");
70
+ /**
71
+ *
72
+ */
73
+ var AppointmentsApi = /** @class */ (function (_super) {
74
+ __extends(AppointmentsApi, _super);
75
+ function AppointmentsApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ * Creates request options for createAppointment without sending the request
80
+ */
81
+ AppointmentsApi.prototype.createAppointmentRequestOpts = function (requestParameters) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var queryParameters, headerParameters, urlPath;
84
+ return __generator(this, function (_a) {
85
+ if (requestParameters['appointmentDto'] == null) {
86
+ throw new runtime.RequiredError('appointmentDto', 'Required parameter "appointmentDto" was null or undefined when calling createAppointment().');
87
+ }
88
+ queryParameters = {};
89
+ headerParameters = {};
90
+ headerParameters['Content-Type'] = 'application/json';
91
+ urlPath = "/ui/appointments/v1";
92
+ return [2 /*return*/, {
93
+ path: urlPath,
94
+ method: 'POST',
95
+ headers: headerParameters,
96
+ query: queryParameters,
97
+ body: (0, AppointmentDto_1.AppointmentDtoToJSON)(requestParameters['appointmentDto']),
98
+ }];
99
+ });
100
+ });
101
+ };
102
+ /**
103
+ * create an appointment of the logged-in user
104
+ */
105
+ AppointmentsApi.prototype.createAppointmentRaw = function (requestParameters, initOverrides) {
106
+ return __awaiter(this, void 0, void 0, function () {
107
+ var requestOptions, response;
108
+ return __generator(this, function (_a) {
109
+ switch (_a.label) {
110
+ case 0: return [4 /*yield*/, this.createAppointmentRequestOpts(requestParameters)];
111
+ case 1:
112
+ requestOptions = _a.sent();
113
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
114
+ case 2:
115
+ response = _a.sent();
116
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, AppointmentDto_1.AppointmentDtoFromJSON)(jsonValue); })];
117
+ }
118
+ });
119
+ });
120
+ };
121
+ /**
122
+ * create an appointment of the logged-in user
123
+ */
124
+ AppointmentsApi.prototype.createAppointment = function (requestParameters, initOverrides) {
125
+ return __awaiter(this, void 0, void 0, function () {
126
+ var response;
127
+ return __generator(this, function (_a) {
128
+ switch (_a.label) {
129
+ case 0: return [4 /*yield*/, this.createAppointmentRaw(requestParameters, initOverrides)];
130
+ case 1:
131
+ response = _a.sent();
132
+ return [4 /*yield*/, response.value()];
133
+ case 2: return [2 /*return*/, _a.sent()];
134
+ }
135
+ });
136
+ });
137
+ };
138
+ /**
139
+ * Creates request options for deleteAppointment without sending the request
140
+ */
141
+ AppointmentsApi.prototype.deleteAppointmentRequestOpts = function (requestParameters) {
142
+ return __awaiter(this, void 0, void 0, function () {
143
+ var queryParameters, headerParameters, urlPath;
144
+ return __generator(this, function (_a) {
145
+ if (requestParameters['id'] == null) {
146
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteAppointment().');
147
+ }
148
+ queryParameters = {};
149
+ headerParameters = {};
150
+ urlPath = "/ui/appointments/v1/{id}";
151
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
152
+ return [2 /*return*/, {
153
+ path: urlPath,
154
+ method: 'DELETE',
155
+ headers: headerParameters,
156
+ query: queryParameters,
157
+ }];
158
+ });
159
+ });
160
+ };
161
+ /**
162
+ * delete an appointment
163
+ */
164
+ AppointmentsApi.prototype.deleteAppointmentRaw = function (requestParameters, initOverrides) {
165
+ return __awaiter(this, void 0, void 0, function () {
166
+ var requestOptions, response;
167
+ return __generator(this, function (_a) {
168
+ switch (_a.label) {
169
+ case 0: return [4 /*yield*/, this.deleteAppointmentRequestOpts(requestParameters)];
170
+ case 1:
171
+ requestOptions = _a.sent();
172
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
173
+ case 2:
174
+ response = _a.sent();
175
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
176
+ }
177
+ });
178
+ });
179
+ };
180
+ /**
181
+ * delete an appointment
182
+ */
183
+ AppointmentsApi.prototype.deleteAppointment = function (requestParameters, initOverrides) {
184
+ return __awaiter(this, void 0, void 0, function () {
185
+ return __generator(this, function (_a) {
186
+ switch (_a.label) {
187
+ case 0: return [4 /*yield*/, this.deleteAppointmentRaw(requestParameters, initOverrides)];
188
+ case 1:
189
+ _a.sent();
190
+ return [2 /*return*/];
191
+ }
192
+ });
193
+ });
194
+ };
195
+ /**
196
+ * Creates request options for getAllAppointments without sending the request
197
+ */
198
+ AppointmentsApi.prototype.getAllAppointmentsRequestOpts = function (requestParameters) {
199
+ return __awaiter(this, void 0, void 0, function () {
200
+ var queryParameters, headerParameters, urlPath;
201
+ return __generator(this, function (_a) {
202
+ if (requestParameters['pageable'] == null) {
203
+ throw new runtime.RequiredError('pageable', 'Required parameter "pageable" was null or undefined when calling getAllAppointments().');
204
+ }
205
+ queryParameters = {};
206
+ if (requestParameters['pageable'] != null) {
207
+ queryParameters['pageable'] = requestParameters['pageable'];
208
+ }
209
+ if (requestParameters['filter'] != null) {
210
+ queryParameters['filter'] = requestParameters['filter'];
211
+ }
212
+ headerParameters = {};
213
+ urlPath = "/ui/appointments/v1";
214
+ return [2 /*return*/, {
215
+ path: urlPath,
216
+ method: 'GET',
217
+ headers: headerParameters,
218
+ query: queryParameters,
219
+ }];
220
+ });
221
+ });
222
+ };
223
+ /**
224
+ * get all appointments of the tenant
225
+ */
226
+ AppointmentsApi.prototype.getAllAppointmentsRaw = function (requestParameters, initOverrides) {
227
+ return __awaiter(this, void 0, void 0, function () {
228
+ var requestOptions, response;
229
+ return __generator(this, function (_a) {
230
+ switch (_a.label) {
231
+ case 0: return [4 /*yield*/, this.getAllAppointmentsRequestOpts(requestParameters)];
232
+ case 1:
233
+ requestOptions = _a.sent();
234
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
235
+ case 2:
236
+ response = _a.sent();
237
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, GetAllAppointments200Response_1.GetAllAppointments200ResponseFromJSON)(jsonValue); })];
238
+ }
239
+ });
240
+ });
241
+ };
242
+ /**
243
+ * get all appointments of the tenant
244
+ */
245
+ AppointmentsApi.prototype.getAllAppointments = function (requestParameters, initOverrides) {
246
+ return __awaiter(this, void 0, void 0, function () {
247
+ var response;
248
+ return __generator(this, function (_a) {
249
+ switch (_a.label) {
250
+ case 0: return [4 /*yield*/, this.getAllAppointmentsRaw(requestParameters, initOverrides)];
251
+ case 1:
252
+ response = _a.sent();
253
+ return [4 /*yield*/, response.value()];
254
+ case 2: return [2 /*return*/, _a.sent()];
255
+ }
256
+ });
257
+ });
258
+ };
259
+ /**
260
+ * Creates request options for getAppointment without sending the request
261
+ */
262
+ AppointmentsApi.prototype.getAppointmentRequestOpts = function (requestParameters) {
263
+ return __awaiter(this, void 0, void 0, function () {
264
+ var queryParameters, headerParameters, urlPath;
265
+ return __generator(this, function (_a) {
266
+ if (requestParameters['id'] == null) {
267
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getAppointment().');
268
+ }
269
+ queryParameters = {};
270
+ headerParameters = {};
271
+ urlPath = "/ui/appointments/v1/{id}";
272
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
273
+ return [2 /*return*/, {
274
+ path: urlPath,
275
+ method: 'GET',
276
+ headers: headerParameters,
277
+ query: queryParameters,
278
+ }];
279
+ });
280
+ });
281
+ };
282
+ /**
283
+ * read one appointment
284
+ */
285
+ AppointmentsApi.prototype.getAppointmentRaw = function (requestParameters, initOverrides) {
286
+ return __awaiter(this, void 0, void 0, function () {
287
+ var requestOptions, response;
288
+ return __generator(this, function (_a) {
289
+ switch (_a.label) {
290
+ case 0: return [4 /*yield*/, this.getAppointmentRequestOpts(requestParameters)];
291
+ case 1:
292
+ requestOptions = _a.sent();
293
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
294
+ case 2:
295
+ response = _a.sent();
296
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, AppointmentDto_1.AppointmentDtoFromJSON)(jsonValue); })];
297
+ }
298
+ });
299
+ });
300
+ };
301
+ /**
302
+ * read one appointment
303
+ */
304
+ AppointmentsApi.prototype.getAppointment = function (requestParameters, initOverrides) {
305
+ return __awaiter(this, void 0, void 0, function () {
306
+ var response;
307
+ return __generator(this, function (_a) {
308
+ switch (_a.label) {
309
+ case 0: return [4 /*yield*/, this.getAppointmentRaw(requestParameters, initOverrides)];
310
+ case 1:
311
+ response = _a.sent();
312
+ return [4 /*yield*/, response.value()];
313
+ case 2: return [2 /*return*/, _a.sent()];
314
+ }
315
+ });
316
+ });
317
+ };
318
+ /**
319
+ * Creates request options for updateAppointment without sending the request
320
+ */
321
+ AppointmentsApi.prototype.updateAppointmentRequestOpts = function (requestParameters) {
322
+ return __awaiter(this, void 0, void 0, function () {
323
+ var queryParameters, headerParameters, urlPath;
324
+ return __generator(this, function (_a) {
325
+ if (requestParameters['id'] == null) {
326
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateAppointment().');
327
+ }
328
+ if (requestParameters['appointmentDto'] == null) {
329
+ throw new runtime.RequiredError('appointmentDto', 'Required parameter "appointmentDto" was null or undefined when calling updateAppointment().');
330
+ }
331
+ queryParameters = {};
332
+ if (requestParameters['force'] != null) {
333
+ queryParameters['force'] = requestParameters['force'];
334
+ }
335
+ headerParameters = {};
336
+ headerParameters['Content-Type'] = 'application/json';
337
+ urlPath = "/ui/appointments/v1/{id}";
338
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
339
+ return [2 /*return*/, {
340
+ path: urlPath,
341
+ method: 'PUT',
342
+ headers: headerParameters,
343
+ query: queryParameters,
344
+ body: (0, AppointmentDto_1.AppointmentDtoToJSON)(requestParameters['appointmentDto']),
345
+ }];
346
+ });
347
+ });
348
+ };
349
+ /**
350
+ * update an appointment, e.g. to confirm it
351
+ */
352
+ AppointmentsApi.prototype.updateAppointmentRaw = function (requestParameters, initOverrides) {
353
+ return __awaiter(this, void 0, void 0, function () {
354
+ var requestOptions, response;
355
+ return __generator(this, function (_a) {
356
+ switch (_a.label) {
357
+ case 0: return [4 /*yield*/, this.updateAppointmentRequestOpts(requestParameters)];
358
+ case 1:
359
+ requestOptions = _a.sent();
360
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
361
+ case 2:
362
+ response = _a.sent();
363
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, AppointmentDto_1.AppointmentDtoFromJSON)(jsonValue); })];
364
+ }
365
+ });
366
+ });
367
+ };
368
+ /**
369
+ * update an appointment, e.g. to confirm it
370
+ */
371
+ AppointmentsApi.prototype.updateAppointment = function (requestParameters, initOverrides) {
372
+ return __awaiter(this, void 0, void 0, function () {
373
+ var response;
374
+ return __generator(this, function (_a) {
375
+ switch (_a.label) {
376
+ case 0: return [4 /*yield*/, this.updateAppointmentRaw(requestParameters, initOverrides)];
377
+ case 1:
378
+ response = _a.sent();
379
+ return [4 /*yield*/, response.value()];
380
+ case 2: return [2 /*return*/, _a.sent()];
381
+ }
382
+ });
383
+ });
384
+ };
385
+ return AppointmentsApi;
386
+ }(runtime.BaseAPI));
387
+ exports.AppointmentsApi = AppointmentsApi;
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Kommerz API Specification
3
+ * API specification for Kommerz Services. - /ui/ for services consumed by the frontend - /intern/ for internal administration endpoints - /extern/ for services consumed by external services - /stats/ for monitoring endpoints - /actuator/ for health endpoints (e.g. /actuator/health ) All endpoints are postfixed with a version number.
4
+ *
5
+ * Contact: info@kommerz.app
6
+ *
7
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
+ * https://openapi-generator.tech
9
+ * Do not edit the class manually.
10
+ */
11
+ import * as runtime from '../runtime';
12
+ export interface GetMapGlyphsRequest {
13
+ /**
14
+ * name of the font
15
+ */
16
+ fontStack: string;
17
+ /**
18
+ * range of unicode code points, as requested by MapLibre
19
+ */
20
+ glyphRange: string;
21
+ }
22
+ export interface GetMapSpriteRequest {
23
+ /**
24
+ * file name of the sprite, as requested by MapLibre
25
+ */
26
+ name: string;
27
+ }
28
+ export interface GetMapTilesetRequest {
29
+ /**
30
+ * file name of the archive
31
+ */
32
+ name: string;
33
+ /**
34
+ * byte range of the object, forwarded unchanged to the storage, e.g. "bytes=0-16383"
35
+ */
36
+ range?: string;
37
+ }
38
+ /**
39
+ *
40
+ */
41
+ export declare class MapsApi extends runtime.BaseAPI {
42
+ /**
43
+ * Creates request options for getMapGlyphs without sending the request
44
+ */
45
+ getMapGlyphsRequestOpts(requestParameters: GetMapGlyphsRequest): Promise<runtime.RequestOpts>;
46
+ /**
47
+ * Every valid Kommerz login is accepted, no permission is checked.
48
+ * get the glyphs of a font that the street map renders its labels with
49
+ */
50
+ getMapGlyphsRaw(requestParameters: GetMapGlyphsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<runtime.HttpFile>>;
51
+ /**
52
+ * Every valid Kommerz login is accepted, no permission is checked.
53
+ * get the glyphs of a font that the street map renders its labels with
54
+ */
55
+ getMapGlyphs(requestParameters: GetMapGlyphsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.HttpFile>;
56
+ /**
57
+ * Creates request options for getMapSprite without sending the request
58
+ */
59
+ getMapSpriteRequestOpts(requestParameters: GetMapSpriteRequest): Promise<runtime.RequestOpts>;
60
+ /**
61
+ * Every valid Kommerz login is accepted, no permission is checked.
62
+ * get the index or the image of a sprite with the icons of the street map
63
+ */
64
+ getMapSpriteRaw(requestParameters: GetMapSpriteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<runtime.HttpFile>>;
65
+ /**
66
+ * Every valid Kommerz login is accepted, no permission is checked.
67
+ * get the index or the image of a sprite with the icons of the street map
68
+ */
69
+ getMapSprite(requestParameters: GetMapSpriteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.HttpFile>;
70
+ /**
71
+ * Creates request options for getMapTileset without sending the request
72
+ */
73
+ getMapTilesetRequestOpts(requestParameters: GetMapTilesetRequest): Promise<runtime.RequestOpts>;
74
+ /**
75
+ * Every valid Kommerz login is accepted, no permission is checked. The Range header is forwarded to the storage, so a client reads the archive piece by piece.
76
+ * get the bytes of a PMTiles archive with vector tiles of the street map
77
+ */
78
+ getMapTilesetRaw(requestParameters: GetMapTilesetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<runtime.HttpFile>>;
79
+ /**
80
+ * Every valid Kommerz login is accepted, no permission is checked. The Range header is forwarded to the storage, so a client reads the archive piece by piece.
81
+ * get the bytes of a PMTiles archive with vector tiles of the street map
82
+ */
83
+ getMapTileset(requestParameters: GetMapTilesetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.HttpFile>;
84
+ }