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