@kommerz/ts-client 1.190.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.
Files changed (39) hide show
  1. package/dist/apis/AppointmentPortalApi.d.ts +172 -0
  2. package/dist/apis/AppointmentPortalApi.js +478 -0
  3. package/dist/apis/AppointmentsApi.d.ts +121 -0
  4. package/dist/apis/AppointmentsApi.js +387 -0
  5. package/dist/apis/MapsApi.d.ts +84 -0
  6. package/dist/apis/MapsApi.js +268 -0
  7. package/dist/apis/UsersMeApi.d.ts +13 -0
  8. package/dist/apis/UsersMeApi.js +56 -0
  9. package/dist/apis/index.d.ts +3 -0
  10. package/dist/apis/index.js +3 -0
  11. package/dist/models/AccountAppointmentDto.d.ts +38 -0
  12. package/dist/models/AccountAppointmentDto.js +59 -0
  13. package/dist/models/AppointmentDto.d.ts +55 -0
  14. package/dist/models/AppointmentDto.js +64 -0
  15. package/dist/models/AppointmentPortalDto.d.ts +43 -0
  16. package/dist/models/AppointmentPortalDto.js +62 -0
  17. package/dist/models/AppointmentSlotDistance.d.ts +25 -0
  18. package/dist/models/AppointmentSlotDistance.js +51 -0
  19. package/dist/models/AppointmentSlotDto.d.ts +43 -0
  20. package/dist/models/AppointmentSlotDto.js +60 -0
  21. package/dist/models/AppointmentStatus.d.ts +26 -0
  22. package/dist/models/AppointmentStatus.js +52 -0
  23. package/dist/models/CalendarEntryTypeDto.d.ts +12 -0
  24. package/dist/models/CalendarEntryTypeDto.js +6 -0
  25. package/dist/models/ConfigKey.d.ts +1 -0
  26. package/dist/models/ConfigKey.js +1 -0
  27. package/dist/models/EntityType.d.ts +1 -0
  28. package/dist/models/EntityType.js +1 -0
  29. package/dist/models/GetAllAppointmentSlots200Response.d.ts +42 -0
  30. package/dist/models/GetAllAppointmentSlots200Response.js +59 -0
  31. package/dist/models/GetAllAppointments200Response.d.ts +42 -0
  32. package/dist/models/GetAllAppointments200Response.js +59 -0
  33. package/dist/models/Permissions.d.ts +4 -0
  34. package/dist/models/Permissions.js +4 -0
  35. package/dist/models/RoutingConfigDto.d.ts +89 -0
  36. package/dist/models/RoutingConfigDto.js +108 -0
  37. package/dist/models/index.d.ts +9 -0
  38. package/dist/models/index.js +9 -0
  39. package/package.json +1 -1
@@ -0,0 +1,172 @@
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
+ import { type AppointmentPortalDto } from '../models/AppointmentPortalDto';
13
+ import { type GetAllAppointmentSlots200Response } from '../models/GetAllAppointmentSlots200Response';
14
+ import { type KommerzPageable } from '../models/KommerzPageable';
15
+ import { type TimeSpanDto } from '../models/TimeSpanDto';
16
+ export interface DeleteOwnAppointmentRequest {
17
+ /**
18
+ * handle of the tenant, compared case-insensitively
19
+ */
20
+ handle: string;
21
+ /**
22
+ * id of entity
23
+ */
24
+ id: string;
25
+ }
26
+ export interface GetAllAppointmentSlotsRequest {
27
+ /**
28
+ * handle of the tenant, compared case-insensitively
29
+ */
30
+ handle: string;
31
+ /**
32
+ * Pageable query parameters
33
+ */
34
+ pageable: KommerzPageable;
35
+ /**
36
+ * Filter query parameters. Operators: sim, nsim, eq, neq, leq, less, geq, gtr). Values have to be url-encoded.
37
+ */
38
+ filter?: Array<string>;
39
+ /**
40
+ * latitude of the location of the requester
41
+ */
42
+ lat?: number;
43
+ /**
44
+ * longitude of the location of the requester
45
+ */
46
+ _long?: number;
47
+ }
48
+ export interface GetOwnAppointmentRequest {
49
+ /**
50
+ * handle of the tenant, compared case-insensitively
51
+ */
52
+ handle: string;
53
+ /**
54
+ * id of entity
55
+ */
56
+ id: string;
57
+ }
58
+ export interface GetOwnAppointmentsRequest {
59
+ /**
60
+ * handle of the tenant, compared case-insensitively
61
+ */
62
+ handle: string;
63
+ }
64
+ export interface SubmitAppointmentsRequest {
65
+ /**
66
+ * handle of the tenant, compared case-insensitively
67
+ */
68
+ handle: string;
69
+ /**
70
+ *
71
+ */
72
+ timeSpanDto: Array<TimeSpanDto>;
73
+ }
74
+ export interface UpdateOwnAppointmentRequest {
75
+ /**
76
+ * handle of the tenant, compared case-insensitively
77
+ */
78
+ handle: string;
79
+ /**
80
+ * id of entity
81
+ */
82
+ id: string;
83
+ /**
84
+ *
85
+ */
86
+ timeSpanDto: TimeSpanDto;
87
+ }
88
+ /**
89
+ *
90
+ */
91
+ export declare class AppointmentPortalApi extends runtime.BaseAPI {
92
+ /**
93
+ * Creates request options for deleteOwnAppointment without sending the request
94
+ */
95
+ deleteOwnAppointmentRequestOpts(requestParameters: DeleteOwnAppointmentRequest): Promise<runtime.RequestOpts>;
96
+ /**
97
+ * withdraw an unconfirmed appointment the logged-in user requested at the tenant
98
+ */
99
+ deleteOwnAppointmentRaw(requestParameters: DeleteOwnAppointmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
100
+ /**
101
+ * withdraw an unconfirmed appointment the logged-in user requested at the tenant
102
+ */
103
+ deleteOwnAppointment(requestParameters: DeleteOwnAppointmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
104
+ /**
105
+ * Creates request options for getAllAppointmentSlots without sending the request
106
+ */
107
+ getAllAppointmentSlotsRequestOpts(requestParameters: GetAllAppointmentSlotsRequest): Promise<runtime.RequestOpts>;
108
+ /**
109
+ * Available without login. An OIDC token is accepted when the requester is logged in. Slots whose type requires an appointment location are only returned when lat and long are given.
110
+ * get the bookable appointment slots of a tenant that have not ended yet
111
+ */
112
+ getAllAppointmentSlotsRaw(requestParameters: GetAllAppointmentSlotsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAllAppointmentSlots200Response>>;
113
+ /**
114
+ * Available without login. An OIDC token is accepted when the requester is logged in. Slots whose type requires an appointment location are only returned when lat and long are given.
115
+ * get the bookable appointment slots of a tenant that have not ended yet
116
+ */
117
+ getAllAppointmentSlots(requestParameters: GetAllAppointmentSlotsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAllAppointmentSlots200Response>;
118
+ /**
119
+ * Creates request options for getOwnAppointment without sending the request
120
+ */
121
+ getOwnAppointmentRequestOpts(requestParameters: GetOwnAppointmentRequest): Promise<runtime.RequestOpts>;
122
+ /**
123
+ * read an appointment the logged-in user requested at the tenant
124
+ */
125
+ getOwnAppointmentRaw(requestParameters: GetOwnAppointmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppointmentPortalDto>>;
126
+ /**
127
+ * read an appointment the logged-in user requested at the tenant
128
+ */
129
+ getOwnAppointment(requestParameters: GetOwnAppointmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppointmentPortalDto>;
130
+ /**
131
+ * Creates request options for getOwnAppointments without sending the request
132
+ */
133
+ getOwnAppointmentsRequestOpts(requestParameters: GetOwnAppointmentsRequest): Promise<runtime.RequestOpts>;
134
+ /**
135
+ * Requires the OIDC token of a logged-in user, who does not need to be a member of the tenant.
136
+ * get the appointments the logged-in user requested at the tenant
137
+ */
138
+ getOwnAppointmentsRaw(requestParameters: GetOwnAppointmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AppointmentPortalDto>>>;
139
+ /**
140
+ * Requires the OIDC token of a logged-in user, who does not need to be a member of the tenant.
141
+ * get the appointments the logged-in user requested at the tenant
142
+ */
143
+ getOwnAppointments(requestParameters: GetOwnAppointmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AppointmentPortalDto>>;
144
+ /**
145
+ * Creates request options for submitAppointments without sending the request
146
+ */
147
+ submitAppointmentsRequestOpts(requestParameters: SubmitAppointmentsRequest): Promise<runtime.RequestOpts>;
148
+ /**
149
+ * Requires the OIDC token of a logged-in user, who does not need to be a member of the tenant. Every time span has to lie within a bookable slot of the tenant that has not ended yet.
150
+ * request an appointment for each of the time spans
151
+ */
152
+ submitAppointmentsRaw(requestParameters: SubmitAppointmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AppointmentPortalDto>>>;
153
+ /**
154
+ * Requires the OIDC token of a logged-in user, who does not need to be a member of the tenant. Every time span has to lie within a bookable slot of the tenant that has not ended yet.
155
+ * request an appointment for each of the time spans
156
+ */
157
+ submitAppointments(requestParameters: SubmitAppointmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AppointmentPortalDto>>;
158
+ /**
159
+ * Creates request options for updateOwnAppointment without sending the request
160
+ */
161
+ updateOwnAppointmentRequestOpts(requestParameters: UpdateOwnAppointmentRequest): Promise<runtime.RequestOpts>;
162
+ /**
163
+ * The time span has to lie within a bookable slot of the tenant that has not ended yet.
164
+ * change the time span of an unconfirmed appointment the logged-in user requested at the tenant
165
+ */
166
+ updateOwnAppointmentRaw(requestParameters: UpdateOwnAppointmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppointmentPortalDto>>;
167
+ /**
168
+ * The time span has to lie within a bookable slot of the tenant that has not ended yet.
169
+ * change the time span of an unconfirmed appointment the logged-in user requested at the tenant
170
+ */
171
+ updateOwnAppointment(requestParameters: UpdateOwnAppointmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppointmentPortalDto>;
172
+ }
@@ -0,0 +1,478 @@
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.AppointmentPortalApi = void 0;
67
+ var runtime = require("../runtime");
68
+ var AppointmentPortalDto_1 = require("../models/AppointmentPortalDto");
69
+ var GetAllAppointmentSlots200Response_1 = require("../models/GetAllAppointmentSlots200Response");
70
+ var TimeSpanDto_1 = require("../models/TimeSpanDto");
71
+ /**
72
+ *
73
+ */
74
+ var AppointmentPortalApi = /** @class */ (function (_super) {
75
+ __extends(AppointmentPortalApi, _super);
76
+ function AppointmentPortalApi() {
77
+ return _super !== null && _super.apply(this, arguments) || this;
78
+ }
79
+ /**
80
+ * Creates request options for deleteOwnAppointment without sending the request
81
+ */
82
+ AppointmentPortalApi.prototype.deleteOwnAppointmentRequestOpts = function (requestParameters) {
83
+ return __awaiter(this, void 0, void 0, function () {
84
+ var queryParameters, headerParameters, urlPath;
85
+ return __generator(this, function (_a) {
86
+ if (requestParameters['handle'] == null) {
87
+ throw new runtime.RequiredError('handle', 'Required parameter "handle" was null or undefined when calling deleteOwnAppointment().');
88
+ }
89
+ if (requestParameters['id'] == null) {
90
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteOwnAppointment().');
91
+ }
92
+ queryParameters = {};
93
+ headerParameters = {};
94
+ urlPath = "/ui/tenant-portal/v1/{handle}/appointments/{id}";
95
+ urlPath = urlPath.replace('{handle}', encodeURIComponent(String(requestParameters['handle'])));
96
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
97
+ return [2 /*return*/, {
98
+ path: urlPath,
99
+ method: 'DELETE',
100
+ headers: headerParameters,
101
+ query: queryParameters,
102
+ }];
103
+ });
104
+ });
105
+ };
106
+ /**
107
+ * withdraw an unconfirmed appointment the logged-in user requested at the tenant
108
+ */
109
+ AppointmentPortalApi.prototype.deleteOwnAppointmentRaw = function (requestParameters, initOverrides) {
110
+ return __awaiter(this, void 0, void 0, function () {
111
+ var requestOptions, response;
112
+ return __generator(this, function (_a) {
113
+ switch (_a.label) {
114
+ case 0: return [4 /*yield*/, this.deleteOwnAppointmentRequestOpts(requestParameters)];
115
+ case 1:
116
+ requestOptions = _a.sent();
117
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
118
+ case 2:
119
+ response = _a.sent();
120
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
121
+ }
122
+ });
123
+ });
124
+ };
125
+ /**
126
+ * withdraw an unconfirmed appointment the logged-in user requested at the tenant
127
+ */
128
+ AppointmentPortalApi.prototype.deleteOwnAppointment = function (requestParameters, initOverrides) {
129
+ return __awaiter(this, void 0, void 0, function () {
130
+ return __generator(this, function (_a) {
131
+ switch (_a.label) {
132
+ case 0: return [4 /*yield*/, this.deleteOwnAppointmentRaw(requestParameters, initOverrides)];
133
+ case 1:
134
+ _a.sent();
135
+ return [2 /*return*/];
136
+ }
137
+ });
138
+ });
139
+ };
140
+ /**
141
+ * Creates request options for getAllAppointmentSlots without sending the request
142
+ */
143
+ AppointmentPortalApi.prototype.getAllAppointmentSlotsRequestOpts = function (requestParameters) {
144
+ return __awaiter(this, void 0, void 0, function () {
145
+ var queryParameters, headerParameters, urlPath;
146
+ return __generator(this, function (_a) {
147
+ if (requestParameters['handle'] == null) {
148
+ throw new runtime.RequiredError('handle', 'Required parameter "handle" was null or undefined when calling getAllAppointmentSlots().');
149
+ }
150
+ if (requestParameters['pageable'] == null) {
151
+ throw new runtime.RequiredError('pageable', 'Required parameter "pageable" was null or undefined when calling getAllAppointmentSlots().');
152
+ }
153
+ queryParameters = {};
154
+ if (requestParameters['pageable'] != null) {
155
+ queryParameters['pageable'] = requestParameters['pageable'];
156
+ }
157
+ if (requestParameters['filter'] != null) {
158
+ queryParameters['filter'] = requestParameters['filter'];
159
+ }
160
+ if (requestParameters['lat'] != null) {
161
+ queryParameters['lat'] = requestParameters['lat'];
162
+ }
163
+ if (requestParameters['_long'] != null) {
164
+ queryParameters['long'] = requestParameters['_long'];
165
+ }
166
+ headerParameters = {};
167
+ urlPath = "/ui/tenant-portal/v1/{handle}/appointments/slots";
168
+ urlPath = urlPath.replace('{handle}', encodeURIComponent(String(requestParameters['handle'])));
169
+ return [2 /*return*/, {
170
+ path: urlPath,
171
+ method: 'GET',
172
+ headers: headerParameters,
173
+ query: queryParameters,
174
+ }];
175
+ });
176
+ });
177
+ };
178
+ /**
179
+ * Available without login. An OIDC token is accepted when the requester is logged in. Slots whose type requires an appointment location are only returned when lat and long are given.
180
+ * get the bookable appointment slots of a tenant that have not ended yet
181
+ */
182
+ AppointmentPortalApi.prototype.getAllAppointmentSlotsRaw = function (requestParameters, initOverrides) {
183
+ return __awaiter(this, void 0, void 0, function () {
184
+ var requestOptions, response;
185
+ return __generator(this, function (_a) {
186
+ switch (_a.label) {
187
+ case 0: return [4 /*yield*/, this.getAllAppointmentSlotsRequestOpts(requestParameters)];
188
+ case 1:
189
+ requestOptions = _a.sent();
190
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
191
+ case 2:
192
+ response = _a.sent();
193
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, GetAllAppointmentSlots200Response_1.GetAllAppointmentSlots200ResponseFromJSON)(jsonValue); })];
194
+ }
195
+ });
196
+ });
197
+ };
198
+ /**
199
+ * Available without login. An OIDC token is accepted when the requester is logged in. Slots whose type requires an appointment location are only returned when lat and long are given.
200
+ * get the bookable appointment slots of a tenant that have not ended yet
201
+ */
202
+ AppointmentPortalApi.prototype.getAllAppointmentSlots = function (requestParameters, initOverrides) {
203
+ return __awaiter(this, void 0, void 0, function () {
204
+ var response;
205
+ return __generator(this, function (_a) {
206
+ switch (_a.label) {
207
+ case 0: return [4 /*yield*/, this.getAllAppointmentSlotsRaw(requestParameters, initOverrides)];
208
+ case 1:
209
+ response = _a.sent();
210
+ return [4 /*yield*/, response.value()];
211
+ case 2: return [2 /*return*/, _a.sent()];
212
+ }
213
+ });
214
+ });
215
+ };
216
+ /**
217
+ * Creates request options for getOwnAppointment without sending the request
218
+ */
219
+ AppointmentPortalApi.prototype.getOwnAppointmentRequestOpts = function (requestParameters) {
220
+ return __awaiter(this, void 0, void 0, function () {
221
+ var queryParameters, headerParameters, urlPath;
222
+ return __generator(this, function (_a) {
223
+ if (requestParameters['handle'] == null) {
224
+ throw new runtime.RequiredError('handle', 'Required parameter "handle" was null or undefined when calling getOwnAppointment().');
225
+ }
226
+ if (requestParameters['id'] == null) {
227
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getOwnAppointment().');
228
+ }
229
+ queryParameters = {};
230
+ headerParameters = {};
231
+ urlPath = "/ui/tenant-portal/v1/{handle}/appointments/{id}";
232
+ urlPath = urlPath.replace('{handle}', encodeURIComponent(String(requestParameters['handle'])));
233
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
234
+ return [2 /*return*/, {
235
+ path: urlPath,
236
+ method: 'GET',
237
+ headers: headerParameters,
238
+ query: queryParameters,
239
+ }];
240
+ });
241
+ });
242
+ };
243
+ /**
244
+ * read an appointment the logged-in user requested at the tenant
245
+ */
246
+ AppointmentPortalApi.prototype.getOwnAppointmentRaw = function (requestParameters, initOverrides) {
247
+ return __awaiter(this, void 0, void 0, function () {
248
+ var requestOptions, response;
249
+ return __generator(this, function (_a) {
250
+ switch (_a.label) {
251
+ case 0: return [4 /*yield*/, this.getOwnAppointmentRequestOpts(requestParameters)];
252
+ case 1:
253
+ requestOptions = _a.sent();
254
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
255
+ case 2:
256
+ response = _a.sent();
257
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, AppointmentPortalDto_1.AppointmentPortalDtoFromJSON)(jsonValue); })];
258
+ }
259
+ });
260
+ });
261
+ };
262
+ /**
263
+ * read an appointment the logged-in user requested at the tenant
264
+ */
265
+ AppointmentPortalApi.prototype.getOwnAppointment = function (requestParameters, initOverrides) {
266
+ return __awaiter(this, void 0, void 0, function () {
267
+ var response;
268
+ return __generator(this, function (_a) {
269
+ switch (_a.label) {
270
+ case 0: return [4 /*yield*/, this.getOwnAppointmentRaw(requestParameters, initOverrides)];
271
+ case 1:
272
+ response = _a.sent();
273
+ return [4 /*yield*/, response.value()];
274
+ case 2: return [2 /*return*/, _a.sent()];
275
+ }
276
+ });
277
+ });
278
+ };
279
+ /**
280
+ * Creates request options for getOwnAppointments without sending the request
281
+ */
282
+ AppointmentPortalApi.prototype.getOwnAppointmentsRequestOpts = function (requestParameters) {
283
+ return __awaiter(this, void 0, void 0, function () {
284
+ var queryParameters, headerParameters, urlPath;
285
+ return __generator(this, function (_a) {
286
+ if (requestParameters['handle'] == null) {
287
+ throw new runtime.RequiredError('handle', 'Required parameter "handle" was null or undefined when calling getOwnAppointments().');
288
+ }
289
+ queryParameters = {};
290
+ headerParameters = {};
291
+ urlPath = "/ui/tenant-portal/v1/{handle}/appointments";
292
+ urlPath = urlPath.replace('{handle}', encodeURIComponent(String(requestParameters['handle'])));
293
+ return [2 /*return*/, {
294
+ path: urlPath,
295
+ method: 'GET',
296
+ headers: headerParameters,
297
+ query: queryParameters,
298
+ }];
299
+ });
300
+ });
301
+ };
302
+ /**
303
+ * Requires the OIDC token of a logged-in user, who does not need to be a member of the tenant.
304
+ * get the appointments the logged-in user requested at the tenant
305
+ */
306
+ AppointmentPortalApi.prototype.getOwnAppointmentsRaw = function (requestParameters, initOverrides) {
307
+ return __awaiter(this, void 0, void 0, function () {
308
+ var requestOptions, response;
309
+ return __generator(this, function (_a) {
310
+ switch (_a.label) {
311
+ case 0: return [4 /*yield*/, this.getOwnAppointmentsRequestOpts(requestParameters)];
312
+ case 1:
313
+ requestOptions = _a.sent();
314
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
315
+ case 2:
316
+ response = _a.sent();
317
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(AppointmentPortalDto_1.AppointmentPortalDtoFromJSON); })];
318
+ }
319
+ });
320
+ });
321
+ };
322
+ /**
323
+ * Requires the OIDC token of a logged-in user, who does not need to be a member of the tenant.
324
+ * get the appointments the logged-in user requested at the tenant
325
+ */
326
+ AppointmentPortalApi.prototype.getOwnAppointments = function (requestParameters, initOverrides) {
327
+ return __awaiter(this, void 0, void 0, function () {
328
+ var response;
329
+ return __generator(this, function (_a) {
330
+ switch (_a.label) {
331
+ case 0: return [4 /*yield*/, this.getOwnAppointmentsRaw(requestParameters, initOverrides)];
332
+ case 1:
333
+ response = _a.sent();
334
+ return [4 /*yield*/, response.value()];
335
+ case 2: return [2 /*return*/, _a.sent()];
336
+ }
337
+ });
338
+ });
339
+ };
340
+ /**
341
+ * Creates request options for submitAppointments without sending the request
342
+ */
343
+ AppointmentPortalApi.prototype.submitAppointmentsRequestOpts = function (requestParameters) {
344
+ return __awaiter(this, void 0, void 0, function () {
345
+ var queryParameters, headerParameters, urlPath;
346
+ return __generator(this, function (_a) {
347
+ if (requestParameters['handle'] == null) {
348
+ throw new runtime.RequiredError('handle', 'Required parameter "handle" was null or undefined when calling submitAppointments().');
349
+ }
350
+ if (requestParameters['timeSpanDto'] == null) {
351
+ throw new runtime.RequiredError('timeSpanDto', 'Required parameter "timeSpanDto" was null or undefined when calling submitAppointments().');
352
+ }
353
+ queryParameters = {};
354
+ headerParameters = {};
355
+ headerParameters['Content-Type'] = 'application/json';
356
+ urlPath = "/ui/tenant-portal/v1/{handle}/appointments";
357
+ urlPath = urlPath.replace('{handle}', encodeURIComponent(String(requestParameters['handle'])));
358
+ return [2 /*return*/, {
359
+ path: urlPath,
360
+ method: 'POST',
361
+ headers: headerParameters,
362
+ query: queryParameters,
363
+ body: requestParameters['timeSpanDto'].map(TimeSpanDto_1.TimeSpanDtoToJSON),
364
+ }];
365
+ });
366
+ });
367
+ };
368
+ /**
369
+ * Requires the OIDC token of a logged-in user, who does not need to be a member of the tenant. Every time span has to lie within a bookable slot of the tenant that has not ended yet.
370
+ * request an appointment for each of the time spans
371
+ */
372
+ AppointmentPortalApi.prototype.submitAppointmentsRaw = function (requestParameters, initOverrides) {
373
+ return __awaiter(this, void 0, void 0, function () {
374
+ var requestOptions, response;
375
+ return __generator(this, function (_a) {
376
+ switch (_a.label) {
377
+ case 0: return [4 /*yield*/, this.submitAppointmentsRequestOpts(requestParameters)];
378
+ case 1:
379
+ requestOptions = _a.sent();
380
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
381
+ case 2:
382
+ response = _a.sent();
383
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(AppointmentPortalDto_1.AppointmentPortalDtoFromJSON); })];
384
+ }
385
+ });
386
+ });
387
+ };
388
+ /**
389
+ * Requires the OIDC token of a logged-in user, who does not need to be a member of the tenant. Every time span has to lie within a bookable slot of the tenant that has not ended yet.
390
+ * request an appointment for each of the time spans
391
+ */
392
+ AppointmentPortalApi.prototype.submitAppointments = function (requestParameters, initOverrides) {
393
+ return __awaiter(this, void 0, void 0, function () {
394
+ var response;
395
+ return __generator(this, function (_a) {
396
+ switch (_a.label) {
397
+ case 0: return [4 /*yield*/, this.submitAppointmentsRaw(requestParameters, initOverrides)];
398
+ case 1:
399
+ response = _a.sent();
400
+ return [4 /*yield*/, response.value()];
401
+ case 2: return [2 /*return*/, _a.sent()];
402
+ }
403
+ });
404
+ });
405
+ };
406
+ /**
407
+ * Creates request options for updateOwnAppointment without sending the request
408
+ */
409
+ AppointmentPortalApi.prototype.updateOwnAppointmentRequestOpts = function (requestParameters) {
410
+ return __awaiter(this, void 0, void 0, function () {
411
+ var queryParameters, headerParameters, urlPath;
412
+ return __generator(this, function (_a) {
413
+ if (requestParameters['handle'] == null) {
414
+ throw new runtime.RequiredError('handle', 'Required parameter "handle" was null or undefined when calling updateOwnAppointment().');
415
+ }
416
+ if (requestParameters['id'] == null) {
417
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateOwnAppointment().');
418
+ }
419
+ if (requestParameters['timeSpanDto'] == null) {
420
+ throw new runtime.RequiredError('timeSpanDto', 'Required parameter "timeSpanDto" was null or undefined when calling updateOwnAppointment().');
421
+ }
422
+ queryParameters = {};
423
+ headerParameters = {};
424
+ headerParameters['Content-Type'] = 'application/json';
425
+ urlPath = "/ui/tenant-portal/v1/{handle}/appointments/{id}";
426
+ urlPath = urlPath.replace('{handle}', encodeURIComponent(String(requestParameters['handle'])));
427
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
428
+ return [2 /*return*/, {
429
+ path: urlPath,
430
+ method: 'PUT',
431
+ headers: headerParameters,
432
+ query: queryParameters,
433
+ body: (0, TimeSpanDto_1.TimeSpanDtoToJSON)(requestParameters['timeSpanDto']),
434
+ }];
435
+ });
436
+ });
437
+ };
438
+ /**
439
+ * The time span has to lie within a bookable slot of the tenant that has not ended yet.
440
+ * change the time span of an unconfirmed appointment the logged-in user requested at the tenant
441
+ */
442
+ AppointmentPortalApi.prototype.updateOwnAppointmentRaw = function (requestParameters, initOverrides) {
443
+ return __awaiter(this, void 0, void 0, function () {
444
+ var requestOptions, response;
445
+ return __generator(this, function (_a) {
446
+ switch (_a.label) {
447
+ case 0: return [4 /*yield*/, this.updateOwnAppointmentRequestOpts(requestParameters)];
448
+ case 1:
449
+ requestOptions = _a.sent();
450
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
451
+ case 2:
452
+ response = _a.sent();
453
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, AppointmentPortalDto_1.AppointmentPortalDtoFromJSON)(jsonValue); })];
454
+ }
455
+ });
456
+ });
457
+ };
458
+ /**
459
+ * The time span has to lie within a bookable slot of the tenant that has not ended yet.
460
+ * change the time span of an unconfirmed appointment the logged-in user requested at the tenant
461
+ */
462
+ AppointmentPortalApi.prototype.updateOwnAppointment = function (requestParameters, initOverrides) {
463
+ return __awaiter(this, void 0, void 0, function () {
464
+ var response;
465
+ return __generator(this, function (_a) {
466
+ switch (_a.label) {
467
+ case 0: return [4 /*yield*/, this.updateOwnAppointmentRaw(requestParameters, initOverrides)];
468
+ case 1:
469
+ response = _a.sent();
470
+ return [4 /*yield*/, response.value()];
471
+ case 2: return [2 /*return*/, _a.sent()];
472
+ }
473
+ });
474
+ });
475
+ };
476
+ return AppointmentPortalApi;
477
+ }(runtime.BaseAPI));
478
+ exports.AppointmentPortalApi = AppointmentPortalApi;