@gewis/grooster-backend-ts 1.3.1 → 1.3.4
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/api.d.ts +1551 -0
- package/dist/api.js +2067 -0
- package/dist/api.js.map +1 -0
- package/dist/base.d.ts +66 -0
- package/dist/base.js +64 -0
- package/dist/base.js.map +1 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +153 -0
- package/dist/common.js.map +1 -0
- package/{src/configuration.ts → dist/configuration.d.ts} +4 -28
- package/dist/configuration.js +51 -0
- package/dist/configuration.js.map +1 -0
- package/{src/index.ts → dist/index.d.ts} +1 -6
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/package.json +5 -2
- package/eslint.config.mjs +0 -10
- package/src/.openapi-generator/FILES +0 -31
- package/src/.openapi-generator/VERSION +0 -1
- package/src/.openapi-generator-ignore +0 -23
- package/src/api.ts +0 -2574
- package/src/base.ts +0 -86
- package/src/common.ts +0 -150
- package/src/docs/AuthApi.md +0 -117
- package/src/docs/GormDeletedAt.md +0 -22
- package/src/docs/Organ.md +0 -31
- package/src/docs/Roster.md +0 -42
- package/src/docs/RosterAnswer.md +0 -34
- package/src/docs/RosterAnswerApi.md +0 -117
- package/src/docs/RosterAnswerCreateRequest.md +0 -26
- package/src/docs/RosterAnswerUpdateRequest.md +0 -20
- package/src/docs/RosterApi.md +0 -545
- package/src/docs/RosterCreateRequest.md +0 -26
- package/src/docs/RosterShift.md +0 -30
- package/src/docs/RosterShiftApi.md +0 -112
- package/src/docs/RosterShiftCreateRequest.md +0 -22
- package/src/docs/RosterTemplate.md +0 -32
- package/src/docs/RosterTemplateCreateRequest.md +0 -24
- package/src/docs/RosterTemplateUpdateParams.md +0 -22
- package/src/docs/RosterUpdateRequest.md +0 -22
- package/src/docs/SavedShift.md +0 -34
- package/src/docs/SavedShiftApi.md +0 -170
- package/src/docs/SavedShiftUpdateRequest.md +0 -20
- package/src/docs/User.md +0 -32
- package/src/docs/UserApi.md +0 -224
- package/src/docs/UserCreateRequest.md +0 -24
- package/src/git_push.sh +0 -57
- package/tsconfig.eslint.json +0 -5
- package/tsconfig.json +0 -23
package/dist/api.js
ADDED
|
@@ -0,0 +1,2067 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GRooster
|
|
6
|
+
* A GEWIS Rooster maker
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.SavedShiftApi = exports.SavedShiftApiFactory = exports.SavedShiftApiFp = exports.SavedShiftApiAxiosParamCreator = exports.RosterShiftApi = exports.RosterShiftApiFactory = exports.RosterShiftApiFp = exports.RosterShiftApiAxiosParamCreator = exports.RosterAnswerApi = exports.RosterAnswerApiFactory = exports.RosterAnswerApiFp = exports.RosterAnswerApiAxiosParamCreator = exports.RosterApi = exports.RosterApiFactory = exports.RosterApiFp = exports.RosterApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = void 0;
|
|
17
|
+
const axios_1 = require("axios");
|
|
18
|
+
// Some imports not used depending on template conditions
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
const common_1 = require("./common");
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
const base_1 = require("./base");
|
|
23
|
+
/**
|
|
24
|
+
* AuthApi - axios parameter creator
|
|
25
|
+
* @export
|
|
26
|
+
*/
|
|
27
|
+
const AuthApiAxiosParamCreator = function (configuration) {
|
|
28
|
+
return {
|
|
29
|
+
/**
|
|
30
|
+
* Validates state, exchanges code for token, and returns user info
|
|
31
|
+
* @summary Handle OAuth2 Callback
|
|
32
|
+
* @param {string} state State returned from provider
|
|
33
|
+
* @param {string} code Authorization code from provider
|
|
34
|
+
* @param {*} [options] Override http request option.
|
|
35
|
+
* @throws {RequiredError}
|
|
36
|
+
*/
|
|
37
|
+
authCallbackGet: async (state, code, options = {}) => {
|
|
38
|
+
// verify required parameter 'state' is not null or undefined
|
|
39
|
+
(0, common_1.assertParamExists)("authCallbackGet", "state", state);
|
|
40
|
+
// verify required parameter 'code' is not null or undefined
|
|
41
|
+
(0, common_1.assertParamExists)("authCallbackGet", "code", code);
|
|
42
|
+
const localVarPath = `/auth/callback`;
|
|
43
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
45
|
+
let baseOptions;
|
|
46
|
+
if (configuration) {
|
|
47
|
+
baseOptions = configuration.baseOptions;
|
|
48
|
+
}
|
|
49
|
+
const localVarRequestOptions = {
|
|
50
|
+
method: "GET",
|
|
51
|
+
...baseOptions,
|
|
52
|
+
...options,
|
|
53
|
+
};
|
|
54
|
+
const localVarHeaderParameter = {};
|
|
55
|
+
const localVarQueryParameter = {};
|
|
56
|
+
if (state !== undefined) {
|
|
57
|
+
localVarQueryParameter["state"] = state;
|
|
58
|
+
}
|
|
59
|
+
if (code !== undefined) {
|
|
60
|
+
localVarQueryParameter["code"] = code;
|
|
61
|
+
}
|
|
62
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
63
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
64
|
+
localVarRequestOptions.headers = {
|
|
65
|
+
...localVarHeaderParameter,
|
|
66
|
+
...headersFromBaseOptions,
|
|
67
|
+
...options.headers,
|
|
68
|
+
};
|
|
69
|
+
return {
|
|
70
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
71
|
+
options: localVarRequestOptions,
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
/**
|
|
75
|
+
* Generates state, sets a cookie, and redirects to Google OIDC
|
|
76
|
+
* @summary Redirect to OIDC provider
|
|
77
|
+
* @param {string} state State returned from provider
|
|
78
|
+
* @param {*} [options] Override http request option.
|
|
79
|
+
* @throws {RequiredError}
|
|
80
|
+
*/
|
|
81
|
+
authRedirectGet: async (state, options = {}) => {
|
|
82
|
+
// verify required parameter 'state' is not null or undefined
|
|
83
|
+
(0, common_1.assertParamExists)("authRedirectGet", "state", state);
|
|
84
|
+
const localVarPath = `/auth/redirect`;
|
|
85
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
86
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
87
|
+
let baseOptions;
|
|
88
|
+
if (configuration) {
|
|
89
|
+
baseOptions = configuration.baseOptions;
|
|
90
|
+
}
|
|
91
|
+
const localVarRequestOptions = {
|
|
92
|
+
method: "GET",
|
|
93
|
+
...baseOptions,
|
|
94
|
+
...options,
|
|
95
|
+
};
|
|
96
|
+
const localVarHeaderParameter = {};
|
|
97
|
+
const localVarQueryParameter = {};
|
|
98
|
+
if (state !== undefined) {
|
|
99
|
+
localVarQueryParameter["state"] = state;
|
|
100
|
+
}
|
|
101
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
102
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
103
|
+
localVarRequestOptions.headers = {
|
|
104
|
+
...localVarHeaderParameter,
|
|
105
|
+
...headersFromBaseOptions,
|
|
106
|
+
...options.headers,
|
|
107
|
+
};
|
|
108
|
+
return {
|
|
109
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
110
|
+
options: localVarRequestOptions,
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
exports.AuthApiAxiosParamCreator = AuthApiAxiosParamCreator;
|
|
116
|
+
/**
|
|
117
|
+
* AuthApi - functional programming interface
|
|
118
|
+
* @export
|
|
119
|
+
*/
|
|
120
|
+
const AuthApiFp = function (configuration) {
|
|
121
|
+
const localVarAxiosParamCreator = (0, exports.AuthApiAxiosParamCreator)(configuration);
|
|
122
|
+
return {
|
|
123
|
+
/**
|
|
124
|
+
* Validates state, exchanges code for token, and returns user info
|
|
125
|
+
* @summary Handle OAuth2 Callback
|
|
126
|
+
* @param {string} state State returned from provider
|
|
127
|
+
* @param {string} code Authorization code from provider
|
|
128
|
+
* @param {*} [options] Override http request option.
|
|
129
|
+
* @throws {RequiredError}
|
|
130
|
+
*/
|
|
131
|
+
async authCallbackGet(state, code, options) {
|
|
132
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.authCallbackGet(state, code, options);
|
|
133
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
134
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["AuthApi.authCallbackGet"]?.[localVarOperationServerIndex]?.url;
|
|
135
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
136
|
+
},
|
|
137
|
+
/**
|
|
138
|
+
* Generates state, sets a cookie, and redirects to Google OIDC
|
|
139
|
+
* @summary Redirect to OIDC provider
|
|
140
|
+
* @param {string} state State returned from provider
|
|
141
|
+
* @param {*} [options] Override http request option.
|
|
142
|
+
* @throws {RequiredError}
|
|
143
|
+
*/
|
|
144
|
+
async authRedirectGet(state, options) {
|
|
145
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.authRedirectGet(state, options);
|
|
146
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
147
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["AuthApi.authRedirectGet"]?.[localVarOperationServerIndex]?.url;
|
|
148
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
exports.AuthApiFp = AuthApiFp;
|
|
153
|
+
/**
|
|
154
|
+
* AuthApi - factory interface
|
|
155
|
+
* @export
|
|
156
|
+
*/
|
|
157
|
+
const AuthApiFactory = function (configuration, basePath, axios) {
|
|
158
|
+
const localVarFp = (0, exports.AuthApiFp)(configuration);
|
|
159
|
+
return {
|
|
160
|
+
/**
|
|
161
|
+
* Validates state, exchanges code for token, and returns user info
|
|
162
|
+
* @summary Handle OAuth2 Callback
|
|
163
|
+
* @param {string} state State returned from provider
|
|
164
|
+
* @param {string} code Authorization code from provider
|
|
165
|
+
* @param {*} [options] Override http request option.
|
|
166
|
+
* @throws {RequiredError}
|
|
167
|
+
*/
|
|
168
|
+
authCallbackGet(state, code, options) {
|
|
169
|
+
return localVarFp
|
|
170
|
+
.authCallbackGet(state, code, options)
|
|
171
|
+
.then((request) => request(axios, basePath));
|
|
172
|
+
},
|
|
173
|
+
/**
|
|
174
|
+
* Generates state, sets a cookie, and redirects to Google OIDC
|
|
175
|
+
* @summary Redirect to OIDC provider
|
|
176
|
+
* @param {string} state State returned from provider
|
|
177
|
+
* @param {*} [options] Override http request option.
|
|
178
|
+
* @throws {RequiredError}
|
|
179
|
+
*/
|
|
180
|
+
authRedirectGet(state, options) {
|
|
181
|
+
return localVarFp
|
|
182
|
+
.authRedirectGet(state, options)
|
|
183
|
+
.then((request) => request(axios, basePath));
|
|
184
|
+
},
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
exports.AuthApiFactory = AuthApiFactory;
|
|
188
|
+
/**
|
|
189
|
+
* AuthApi - object-oriented interface
|
|
190
|
+
* @export
|
|
191
|
+
* @class AuthApi
|
|
192
|
+
* @extends {BaseAPI}
|
|
193
|
+
*/
|
|
194
|
+
class AuthApi extends base_1.BaseAPI {
|
|
195
|
+
/**
|
|
196
|
+
* Validates state, exchanges code for token, and returns user info
|
|
197
|
+
* @summary Handle OAuth2 Callback
|
|
198
|
+
* @param {string} state State returned from provider
|
|
199
|
+
* @param {string} code Authorization code from provider
|
|
200
|
+
* @param {*} [options] Override http request option.
|
|
201
|
+
* @throws {RequiredError}
|
|
202
|
+
* @memberof AuthApi
|
|
203
|
+
*/
|
|
204
|
+
authCallbackGet(state, code, options) {
|
|
205
|
+
return (0, exports.AuthApiFp)(this.configuration)
|
|
206
|
+
.authCallbackGet(state, code, options)
|
|
207
|
+
.then((request) => request(this.axios, this.basePath));
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Generates state, sets a cookie, and redirects to Google OIDC
|
|
211
|
+
* @summary Redirect to OIDC provider
|
|
212
|
+
* @param {string} state State returned from provider
|
|
213
|
+
* @param {*} [options] Override http request option.
|
|
214
|
+
* @throws {RequiredError}
|
|
215
|
+
* @memberof AuthApi
|
|
216
|
+
*/
|
|
217
|
+
authRedirectGet(state, options) {
|
|
218
|
+
return (0, exports.AuthApiFp)(this.configuration)
|
|
219
|
+
.authRedirectGet(state, options)
|
|
220
|
+
.then((request) => request(this.axios, this.basePath));
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
exports.AuthApi = AuthApi;
|
|
224
|
+
/**
|
|
225
|
+
* RosterApi - axios parameter creator
|
|
226
|
+
* @export
|
|
227
|
+
*/
|
|
228
|
+
const RosterApiAxiosParamCreator = function (configuration) {
|
|
229
|
+
return {
|
|
230
|
+
/**
|
|
231
|
+
*
|
|
232
|
+
* @summary CreateRoster a new roster
|
|
233
|
+
* @param {RosterCreateRequest} createParams Roster input
|
|
234
|
+
* @param {*} [options] Override http request option.
|
|
235
|
+
* @throws {RequiredError}
|
|
236
|
+
*/
|
|
237
|
+
createRoster: async (createParams, options = {}) => {
|
|
238
|
+
// verify required parameter 'createParams' is not null or undefined
|
|
239
|
+
(0, common_1.assertParamExists)("createRoster", "createParams", createParams);
|
|
240
|
+
const localVarPath = `/roster`;
|
|
241
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
242
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
243
|
+
let baseOptions;
|
|
244
|
+
if (configuration) {
|
|
245
|
+
baseOptions = configuration.baseOptions;
|
|
246
|
+
}
|
|
247
|
+
const localVarRequestOptions = {
|
|
248
|
+
method: "POST",
|
|
249
|
+
...baseOptions,
|
|
250
|
+
...options,
|
|
251
|
+
};
|
|
252
|
+
const localVarHeaderParameter = {};
|
|
253
|
+
const localVarQueryParameter = {};
|
|
254
|
+
// authentication BearerAuth required
|
|
255
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
256
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
257
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
258
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
259
|
+
localVarRequestOptions.headers = {
|
|
260
|
+
...localVarHeaderParameter,
|
|
261
|
+
...headersFromBaseOptions,
|
|
262
|
+
...options.headers,
|
|
263
|
+
};
|
|
264
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createParams, localVarRequestOptions, configuration);
|
|
265
|
+
return {
|
|
266
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
267
|
+
options: localVarRequestOptions,
|
|
268
|
+
};
|
|
269
|
+
},
|
|
270
|
+
/**
|
|
271
|
+
*
|
|
272
|
+
* @summary Creates a template of a roster by defining the name of the shifts
|
|
273
|
+
* @param {RosterTemplateCreateRequest} [params] Template Params
|
|
274
|
+
* @param {*} [options] Override http request option.
|
|
275
|
+
* @throws {RequiredError}
|
|
276
|
+
*/
|
|
277
|
+
createRosterTemplate: async (params, options = {}) => {
|
|
278
|
+
const localVarPath = `/roster/template`;
|
|
279
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
280
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
281
|
+
let baseOptions;
|
|
282
|
+
if (configuration) {
|
|
283
|
+
baseOptions = configuration.baseOptions;
|
|
284
|
+
}
|
|
285
|
+
const localVarRequestOptions = {
|
|
286
|
+
method: "POST",
|
|
287
|
+
...baseOptions,
|
|
288
|
+
...options,
|
|
289
|
+
};
|
|
290
|
+
const localVarHeaderParameter = {};
|
|
291
|
+
const localVarQueryParameter = {};
|
|
292
|
+
// authentication BearerAuth required
|
|
293
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
294
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
295
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
296
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
297
|
+
localVarRequestOptions.headers = {
|
|
298
|
+
...localVarHeaderParameter,
|
|
299
|
+
...headersFromBaseOptions,
|
|
300
|
+
...options.headers,
|
|
301
|
+
};
|
|
302
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(params, localVarRequestOptions, configuration);
|
|
303
|
+
return {
|
|
304
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
305
|
+
options: localVarRequestOptions,
|
|
306
|
+
};
|
|
307
|
+
},
|
|
308
|
+
/**
|
|
309
|
+
*
|
|
310
|
+
* @summary DeleteRoster a roster
|
|
311
|
+
* @param {number} id Roster ID
|
|
312
|
+
* @param {*} [options] Override http request option.
|
|
313
|
+
* @throws {RequiredError}
|
|
314
|
+
*/
|
|
315
|
+
deleteRoster: async (id, options = {}) => {
|
|
316
|
+
// verify required parameter 'id' is not null or undefined
|
|
317
|
+
(0, common_1.assertParamExists)("deleteRoster", "id", id);
|
|
318
|
+
const localVarPath = `/roster/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
319
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
320
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
321
|
+
let baseOptions;
|
|
322
|
+
if (configuration) {
|
|
323
|
+
baseOptions = configuration.baseOptions;
|
|
324
|
+
}
|
|
325
|
+
const localVarRequestOptions = {
|
|
326
|
+
method: "DELETE",
|
|
327
|
+
...baseOptions,
|
|
328
|
+
...options,
|
|
329
|
+
};
|
|
330
|
+
const localVarHeaderParameter = {};
|
|
331
|
+
const localVarQueryParameter = {};
|
|
332
|
+
// authentication BearerAuth required
|
|
333
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
334
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
335
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
336
|
+
localVarRequestOptions.headers = {
|
|
337
|
+
...localVarHeaderParameter,
|
|
338
|
+
...headersFromBaseOptions,
|
|
339
|
+
...options.headers,
|
|
340
|
+
};
|
|
341
|
+
return {
|
|
342
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
343
|
+
options: localVarRequestOptions,
|
|
344
|
+
};
|
|
345
|
+
},
|
|
346
|
+
/**
|
|
347
|
+
*
|
|
348
|
+
* @summary Deletes a roster template by ID
|
|
349
|
+
* @param {number} id Template ID
|
|
350
|
+
* @param {*} [options] Override http request option.
|
|
351
|
+
* @throws {RequiredError}
|
|
352
|
+
*/
|
|
353
|
+
deleteRosterTemplate: async (id, options = {}) => {
|
|
354
|
+
// verify required parameter 'id' is not null or undefined
|
|
355
|
+
(0, common_1.assertParamExists)("deleteRosterTemplate", "id", id);
|
|
356
|
+
const localVarPath = `/roster/template/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
357
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
358
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
359
|
+
let baseOptions;
|
|
360
|
+
if (configuration) {
|
|
361
|
+
baseOptions = configuration.baseOptions;
|
|
362
|
+
}
|
|
363
|
+
const localVarRequestOptions = {
|
|
364
|
+
method: "DELETE",
|
|
365
|
+
...baseOptions,
|
|
366
|
+
...options,
|
|
367
|
+
};
|
|
368
|
+
const localVarHeaderParameter = {};
|
|
369
|
+
const localVarQueryParameter = {};
|
|
370
|
+
// authentication BearerAuth required
|
|
371
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
372
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
373
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
374
|
+
localVarRequestOptions.headers = {
|
|
375
|
+
...localVarHeaderParameter,
|
|
376
|
+
...headersFromBaseOptions,
|
|
377
|
+
...options.headers,
|
|
378
|
+
};
|
|
379
|
+
return {
|
|
380
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
381
|
+
options: localVarRequestOptions,
|
|
382
|
+
};
|
|
383
|
+
},
|
|
384
|
+
/**
|
|
385
|
+
*
|
|
386
|
+
* @summary Get a specific roster by id
|
|
387
|
+
* @param {number} id Roster ID
|
|
388
|
+
* @param {*} [options] Override http request option.
|
|
389
|
+
* @throws {RequiredError}
|
|
390
|
+
*/
|
|
391
|
+
getRoster: async (id, options = {}) => {
|
|
392
|
+
// verify required parameter 'id' is not null or undefined
|
|
393
|
+
(0, common_1.assertParamExists)("getRoster", "id", id);
|
|
394
|
+
const localVarPath = `/roster/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
395
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
396
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
397
|
+
let baseOptions;
|
|
398
|
+
if (configuration) {
|
|
399
|
+
baseOptions = configuration.baseOptions;
|
|
400
|
+
}
|
|
401
|
+
const localVarRequestOptions = {
|
|
402
|
+
method: "GET",
|
|
403
|
+
...baseOptions,
|
|
404
|
+
...options,
|
|
405
|
+
};
|
|
406
|
+
const localVarHeaderParameter = {};
|
|
407
|
+
const localVarQueryParameter = {};
|
|
408
|
+
// authentication BearerAuth required
|
|
409
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
410
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
411
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
412
|
+
localVarRequestOptions.headers = {
|
|
413
|
+
...localVarHeaderParameter,
|
|
414
|
+
...headersFromBaseOptions,
|
|
415
|
+
...options.headers,
|
|
416
|
+
};
|
|
417
|
+
return {
|
|
418
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
419
|
+
options: localVarRequestOptions,
|
|
420
|
+
};
|
|
421
|
+
},
|
|
422
|
+
/**
|
|
423
|
+
*
|
|
424
|
+
* @summary Get a roster template by ID
|
|
425
|
+
* @param {number} id Template ID
|
|
426
|
+
* @param {*} [options] Override http request option.
|
|
427
|
+
* @throws {RequiredError}
|
|
428
|
+
*/
|
|
429
|
+
getRosterTemplate: async (id, options = {}) => {
|
|
430
|
+
// verify required parameter 'id' is not null or undefined
|
|
431
|
+
(0, common_1.assertParamExists)("getRosterTemplate", "id", id);
|
|
432
|
+
const localVarPath = `/roster/template/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
433
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
434
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
435
|
+
let baseOptions;
|
|
436
|
+
if (configuration) {
|
|
437
|
+
baseOptions = configuration.baseOptions;
|
|
438
|
+
}
|
|
439
|
+
const localVarRequestOptions = {
|
|
440
|
+
method: "GET",
|
|
441
|
+
...baseOptions,
|
|
442
|
+
...options,
|
|
443
|
+
};
|
|
444
|
+
const localVarHeaderParameter = {};
|
|
445
|
+
const localVarQueryParameter = {};
|
|
446
|
+
// authentication BearerAuth required
|
|
447
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
448
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
449
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
450
|
+
localVarRequestOptions.headers = {
|
|
451
|
+
...localVarHeaderParameter,
|
|
452
|
+
...headersFromBaseOptions,
|
|
453
|
+
...options.headers,
|
|
454
|
+
};
|
|
455
|
+
return {
|
|
456
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
457
|
+
options: localVarRequestOptions,
|
|
458
|
+
};
|
|
459
|
+
},
|
|
460
|
+
/**
|
|
461
|
+
*
|
|
462
|
+
* @summary Get all rosters templates or query by organ ID
|
|
463
|
+
* @param {number} [organId]
|
|
464
|
+
* @param {*} [options] Override http request option.
|
|
465
|
+
* @throws {RequiredError}
|
|
466
|
+
*/
|
|
467
|
+
getRosterTemplates: async (organId, options = {}) => {
|
|
468
|
+
const localVarPath = `/roster/template`;
|
|
469
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
470
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
471
|
+
let baseOptions;
|
|
472
|
+
if (configuration) {
|
|
473
|
+
baseOptions = configuration.baseOptions;
|
|
474
|
+
}
|
|
475
|
+
const localVarRequestOptions = {
|
|
476
|
+
method: "GET",
|
|
477
|
+
...baseOptions,
|
|
478
|
+
...options,
|
|
479
|
+
};
|
|
480
|
+
const localVarHeaderParameter = {};
|
|
481
|
+
const localVarQueryParameter = {};
|
|
482
|
+
// authentication BearerAuth required
|
|
483
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
484
|
+
if (organId !== undefined) {
|
|
485
|
+
localVarQueryParameter["organId"] = organId;
|
|
486
|
+
}
|
|
487
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
488
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
489
|
+
localVarRequestOptions.headers = {
|
|
490
|
+
...localVarHeaderParameter,
|
|
491
|
+
...headersFromBaseOptions,
|
|
492
|
+
...options.headers,
|
|
493
|
+
};
|
|
494
|
+
return {
|
|
495
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
496
|
+
options: localVarRequestOptions,
|
|
497
|
+
};
|
|
498
|
+
},
|
|
499
|
+
/**
|
|
500
|
+
*
|
|
501
|
+
* @summary Get all rosters or query by date and organ
|
|
502
|
+
* @param {string} [date] Date filter (ISO format)
|
|
503
|
+
* @param {number} [organId] Organ ID filter
|
|
504
|
+
* @param {*} [options] Override http request option.
|
|
505
|
+
* @throws {RequiredError}
|
|
506
|
+
*/
|
|
507
|
+
getRosters: async (date, organId, options = {}) => {
|
|
508
|
+
const localVarPath = `/roster`;
|
|
509
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
510
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
511
|
+
let baseOptions;
|
|
512
|
+
if (configuration) {
|
|
513
|
+
baseOptions = configuration.baseOptions;
|
|
514
|
+
}
|
|
515
|
+
const localVarRequestOptions = {
|
|
516
|
+
method: "GET",
|
|
517
|
+
...baseOptions,
|
|
518
|
+
...options,
|
|
519
|
+
};
|
|
520
|
+
const localVarHeaderParameter = {};
|
|
521
|
+
const localVarQueryParameter = {};
|
|
522
|
+
// authentication BearerAuth required
|
|
523
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
524
|
+
if (date !== undefined) {
|
|
525
|
+
localVarQueryParameter["date"] = date;
|
|
526
|
+
}
|
|
527
|
+
if (organId !== undefined) {
|
|
528
|
+
localVarQueryParameter["organId"] = organId;
|
|
529
|
+
}
|
|
530
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
531
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
532
|
+
localVarRequestOptions.headers = {
|
|
533
|
+
...localVarHeaderParameter,
|
|
534
|
+
...headersFromBaseOptions,
|
|
535
|
+
...options.headers,
|
|
536
|
+
};
|
|
537
|
+
return {
|
|
538
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
539
|
+
options: localVarRequestOptions,
|
|
540
|
+
};
|
|
541
|
+
},
|
|
542
|
+
/**
|
|
543
|
+
*
|
|
544
|
+
* @summary Update a roster
|
|
545
|
+
* @param {number} id Roster ID
|
|
546
|
+
* @param {RosterUpdateRequest} updateParams Roster input
|
|
547
|
+
* @param {*} [options] Override http request option.
|
|
548
|
+
* @throws {RequiredError}
|
|
549
|
+
*/
|
|
550
|
+
updateRoster: async (id, updateParams, options = {}) => {
|
|
551
|
+
// verify required parameter 'id' is not null or undefined
|
|
552
|
+
(0, common_1.assertParamExists)("updateRoster", "id", id);
|
|
553
|
+
// verify required parameter 'updateParams' is not null or undefined
|
|
554
|
+
(0, common_1.assertParamExists)("updateRoster", "updateParams", updateParams);
|
|
555
|
+
const localVarPath = `/roster/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
556
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
557
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
558
|
+
let baseOptions;
|
|
559
|
+
if (configuration) {
|
|
560
|
+
baseOptions = configuration.baseOptions;
|
|
561
|
+
}
|
|
562
|
+
const localVarRequestOptions = {
|
|
563
|
+
method: "PATCH",
|
|
564
|
+
...baseOptions,
|
|
565
|
+
...options,
|
|
566
|
+
};
|
|
567
|
+
const localVarHeaderParameter = {};
|
|
568
|
+
const localVarQueryParameter = {};
|
|
569
|
+
// authentication BearerAuth required
|
|
570
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
571
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
572
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
573
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
574
|
+
localVarRequestOptions.headers = {
|
|
575
|
+
...localVarHeaderParameter,
|
|
576
|
+
...headersFromBaseOptions,
|
|
577
|
+
...options.headers,
|
|
578
|
+
};
|
|
579
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateParams, localVarRequestOptions, configuration);
|
|
580
|
+
return {
|
|
581
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
582
|
+
options: localVarRequestOptions,
|
|
583
|
+
};
|
|
584
|
+
},
|
|
585
|
+
/**
|
|
586
|
+
*
|
|
587
|
+
* @summary Updates a roster template by ID
|
|
588
|
+
* @param {number} id Template ID
|
|
589
|
+
* @param {RosterTemplateUpdateParams} [params] Update params
|
|
590
|
+
* @param {*} [options] Override http request option.
|
|
591
|
+
* @throws {RequiredError}
|
|
592
|
+
*/
|
|
593
|
+
updateRosterTemplate: async (id, params, options = {}) => {
|
|
594
|
+
// verify required parameter 'id' is not null or undefined
|
|
595
|
+
(0, common_1.assertParamExists)("updateRosterTemplate", "id", id);
|
|
596
|
+
const localVarPath = `/roster/template/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
597
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
598
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
599
|
+
let baseOptions;
|
|
600
|
+
if (configuration) {
|
|
601
|
+
baseOptions = configuration.baseOptions;
|
|
602
|
+
}
|
|
603
|
+
const localVarRequestOptions = {
|
|
604
|
+
method: "PUT",
|
|
605
|
+
...baseOptions,
|
|
606
|
+
...options,
|
|
607
|
+
};
|
|
608
|
+
const localVarHeaderParameter = {};
|
|
609
|
+
const localVarQueryParameter = {};
|
|
610
|
+
// authentication BearerAuth required
|
|
611
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
612
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
613
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
614
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
615
|
+
localVarRequestOptions.headers = {
|
|
616
|
+
...localVarHeaderParameter,
|
|
617
|
+
...headersFromBaseOptions,
|
|
618
|
+
...options.headers,
|
|
619
|
+
};
|
|
620
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(params, localVarRequestOptions, configuration);
|
|
621
|
+
return {
|
|
622
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
623
|
+
options: localVarRequestOptions,
|
|
624
|
+
};
|
|
625
|
+
},
|
|
626
|
+
};
|
|
627
|
+
};
|
|
628
|
+
exports.RosterApiAxiosParamCreator = RosterApiAxiosParamCreator;
|
|
629
|
+
/**
|
|
630
|
+
* RosterApi - functional programming interface
|
|
631
|
+
* @export
|
|
632
|
+
*/
|
|
633
|
+
const RosterApiFp = function (configuration) {
|
|
634
|
+
const localVarAxiosParamCreator = (0, exports.RosterApiAxiosParamCreator)(configuration);
|
|
635
|
+
return {
|
|
636
|
+
/**
|
|
637
|
+
*
|
|
638
|
+
* @summary CreateRoster a new roster
|
|
639
|
+
* @param {RosterCreateRequest} createParams Roster input
|
|
640
|
+
* @param {*} [options] Override http request option.
|
|
641
|
+
* @throws {RequiredError}
|
|
642
|
+
*/
|
|
643
|
+
async createRoster(createParams, options) {
|
|
644
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createRoster(createParams, options);
|
|
645
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
646
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["RosterApi.createRoster"]?.[localVarOperationServerIndex]?.url;
|
|
647
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
648
|
+
},
|
|
649
|
+
/**
|
|
650
|
+
*
|
|
651
|
+
* @summary Creates a template of a roster by defining the name of the shifts
|
|
652
|
+
* @param {RosterTemplateCreateRequest} [params] Template Params
|
|
653
|
+
* @param {*} [options] Override http request option.
|
|
654
|
+
* @throws {RequiredError}
|
|
655
|
+
*/
|
|
656
|
+
async createRosterTemplate(params, options) {
|
|
657
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createRosterTemplate(params, options);
|
|
658
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
659
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["RosterApi.createRosterTemplate"]?.[localVarOperationServerIndex]?.url;
|
|
660
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
661
|
+
},
|
|
662
|
+
/**
|
|
663
|
+
*
|
|
664
|
+
* @summary DeleteRoster a roster
|
|
665
|
+
* @param {number} id Roster ID
|
|
666
|
+
* @param {*} [options] Override http request option.
|
|
667
|
+
* @throws {RequiredError}
|
|
668
|
+
*/
|
|
669
|
+
async deleteRoster(id, options) {
|
|
670
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRoster(id, options);
|
|
671
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
672
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["RosterApi.deleteRoster"]?.[localVarOperationServerIndex]?.url;
|
|
673
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
674
|
+
},
|
|
675
|
+
/**
|
|
676
|
+
*
|
|
677
|
+
* @summary Deletes a roster template by ID
|
|
678
|
+
* @param {number} id Template ID
|
|
679
|
+
* @param {*} [options] Override http request option.
|
|
680
|
+
* @throws {RequiredError}
|
|
681
|
+
*/
|
|
682
|
+
async deleteRosterTemplate(id, options) {
|
|
683
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRosterTemplate(id, options);
|
|
684
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
685
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["RosterApi.deleteRosterTemplate"]?.[localVarOperationServerIndex]?.url;
|
|
686
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
687
|
+
},
|
|
688
|
+
/**
|
|
689
|
+
*
|
|
690
|
+
* @summary Get a specific roster by id
|
|
691
|
+
* @param {number} id Roster ID
|
|
692
|
+
* @param {*} [options] Override http request option.
|
|
693
|
+
* @throws {RequiredError}
|
|
694
|
+
*/
|
|
695
|
+
async getRoster(id, options) {
|
|
696
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getRoster(id, options);
|
|
697
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
698
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["RosterApi.getRoster"]?.[localVarOperationServerIndex]?.url;
|
|
699
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
700
|
+
},
|
|
701
|
+
/**
|
|
702
|
+
*
|
|
703
|
+
* @summary Get a roster template by ID
|
|
704
|
+
* @param {number} id Template ID
|
|
705
|
+
* @param {*} [options] Override http request option.
|
|
706
|
+
* @throws {RequiredError}
|
|
707
|
+
*/
|
|
708
|
+
async getRosterTemplate(id, options) {
|
|
709
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getRosterTemplate(id, options);
|
|
710
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
711
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["RosterApi.getRosterTemplate"]?.[localVarOperationServerIndex]?.url;
|
|
712
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
713
|
+
},
|
|
714
|
+
/**
|
|
715
|
+
*
|
|
716
|
+
* @summary Get all rosters templates or query by organ ID
|
|
717
|
+
* @param {number} [organId]
|
|
718
|
+
* @param {*} [options] Override http request option.
|
|
719
|
+
* @throws {RequiredError}
|
|
720
|
+
*/
|
|
721
|
+
async getRosterTemplates(organId, options) {
|
|
722
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getRosterTemplates(organId, options);
|
|
723
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
724
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["RosterApi.getRosterTemplates"]?.[localVarOperationServerIndex]?.url;
|
|
725
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
726
|
+
},
|
|
727
|
+
/**
|
|
728
|
+
*
|
|
729
|
+
* @summary Get all rosters or query by date and organ
|
|
730
|
+
* @param {string} [date] Date filter (ISO format)
|
|
731
|
+
* @param {number} [organId] Organ ID filter
|
|
732
|
+
* @param {*} [options] Override http request option.
|
|
733
|
+
* @throws {RequiredError}
|
|
734
|
+
*/
|
|
735
|
+
async getRosters(date, organId, options) {
|
|
736
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getRosters(date, organId, options);
|
|
737
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
738
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["RosterApi.getRosters"]?.[localVarOperationServerIndex]?.url;
|
|
739
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
740
|
+
},
|
|
741
|
+
/**
|
|
742
|
+
*
|
|
743
|
+
* @summary Update a roster
|
|
744
|
+
* @param {number} id Roster ID
|
|
745
|
+
* @param {RosterUpdateRequest} updateParams Roster input
|
|
746
|
+
* @param {*} [options] Override http request option.
|
|
747
|
+
* @throws {RequiredError}
|
|
748
|
+
*/
|
|
749
|
+
async updateRoster(id, updateParams, options) {
|
|
750
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateRoster(id, updateParams, options);
|
|
751
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
752
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["RosterApi.updateRoster"]?.[localVarOperationServerIndex]?.url;
|
|
753
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
754
|
+
},
|
|
755
|
+
/**
|
|
756
|
+
*
|
|
757
|
+
* @summary Updates a roster template by ID
|
|
758
|
+
* @param {number} id Template ID
|
|
759
|
+
* @param {RosterTemplateUpdateParams} [params] Update params
|
|
760
|
+
* @param {*} [options] Override http request option.
|
|
761
|
+
* @throws {RequiredError}
|
|
762
|
+
*/
|
|
763
|
+
async updateRosterTemplate(id, params, options) {
|
|
764
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateRosterTemplate(id, params, options);
|
|
765
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
766
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["RosterApi.updateRosterTemplate"]?.[localVarOperationServerIndex]?.url;
|
|
767
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
768
|
+
},
|
|
769
|
+
};
|
|
770
|
+
};
|
|
771
|
+
exports.RosterApiFp = RosterApiFp;
|
|
772
|
+
/**
|
|
773
|
+
* RosterApi - factory interface
|
|
774
|
+
* @export
|
|
775
|
+
*/
|
|
776
|
+
const RosterApiFactory = function (configuration, basePath, axios) {
|
|
777
|
+
const localVarFp = (0, exports.RosterApiFp)(configuration);
|
|
778
|
+
return {
|
|
779
|
+
/**
|
|
780
|
+
*
|
|
781
|
+
* @summary CreateRoster a new roster
|
|
782
|
+
* @param {RosterCreateRequest} createParams Roster input
|
|
783
|
+
* @param {*} [options] Override http request option.
|
|
784
|
+
* @throws {RequiredError}
|
|
785
|
+
*/
|
|
786
|
+
createRoster(createParams, options) {
|
|
787
|
+
return localVarFp
|
|
788
|
+
.createRoster(createParams, options)
|
|
789
|
+
.then((request) => request(axios, basePath));
|
|
790
|
+
},
|
|
791
|
+
/**
|
|
792
|
+
*
|
|
793
|
+
* @summary Creates a template of a roster by defining the name of the shifts
|
|
794
|
+
* @param {RosterTemplateCreateRequest} [params] Template Params
|
|
795
|
+
* @param {*} [options] Override http request option.
|
|
796
|
+
* @throws {RequiredError}
|
|
797
|
+
*/
|
|
798
|
+
createRosterTemplate(params, options) {
|
|
799
|
+
return localVarFp
|
|
800
|
+
.createRosterTemplate(params, options)
|
|
801
|
+
.then((request) => request(axios, basePath));
|
|
802
|
+
},
|
|
803
|
+
/**
|
|
804
|
+
*
|
|
805
|
+
* @summary DeleteRoster a roster
|
|
806
|
+
* @param {number} id Roster ID
|
|
807
|
+
* @param {*} [options] Override http request option.
|
|
808
|
+
* @throws {RequiredError}
|
|
809
|
+
*/
|
|
810
|
+
deleteRoster(id, options) {
|
|
811
|
+
return localVarFp
|
|
812
|
+
.deleteRoster(id, options)
|
|
813
|
+
.then((request) => request(axios, basePath));
|
|
814
|
+
},
|
|
815
|
+
/**
|
|
816
|
+
*
|
|
817
|
+
* @summary Deletes a roster template by ID
|
|
818
|
+
* @param {number} id Template ID
|
|
819
|
+
* @param {*} [options] Override http request option.
|
|
820
|
+
* @throws {RequiredError}
|
|
821
|
+
*/
|
|
822
|
+
deleteRosterTemplate(id, options) {
|
|
823
|
+
return localVarFp
|
|
824
|
+
.deleteRosterTemplate(id, options)
|
|
825
|
+
.then((request) => request(axios, basePath));
|
|
826
|
+
},
|
|
827
|
+
/**
|
|
828
|
+
*
|
|
829
|
+
* @summary Get a specific roster by id
|
|
830
|
+
* @param {number} id Roster ID
|
|
831
|
+
* @param {*} [options] Override http request option.
|
|
832
|
+
* @throws {RequiredError}
|
|
833
|
+
*/
|
|
834
|
+
getRoster(id, options) {
|
|
835
|
+
return localVarFp
|
|
836
|
+
.getRoster(id, options)
|
|
837
|
+
.then((request) => request(axios, basePath));
|
|
838
|
+
},
|
|
839
|
+
/**
|
|
840
|
+
*
|
|
841
|
+
* @summary Get a roster template by ID
|
|
842
|
+
* @param {number} id Template ID
|
|
843
|
+
* @param {*} [options] Override http request option.
|
|
844
|
+
* @throws {RequiredError}
|
|
845
|
+
*/
|
|
846
|
+
getRosterTemplate(id, options) {
|
|
847
|
+
return localVarFp
|
|
848
|
+
.getRosterTemplate(id, options)
|
|
849
|
+
.then((request) => request(axios, basePath));
|
|
850
|
+
},
|
|
851
|
+
/**
|
|
852
|
+
*
|
|
853
|
+
* @summary Get all rosters templates or query by organ ID
|
|
854
|
+
* @param {number} [organId]
|
|
855
|
+
* @param {*} [options] Override http request option.
|
|
856
|
+
* @throws {RequiredError}
|
|
857
|
+
*/
|
|
858
|
+
getRosterTemplates(organId, options) {
|
|
859
|
+
return localVarFp
|
|
860
|
+
.getRosterTemplates(organId, options)
|
|
861
|
+
.then((request) => request(axios, basePath));
|
|
862
|
+
},
|
|
863
|
+
/**
|
|
864
|
+
*
|
|
865
|
+
* @summary Get all rosters or query by date and organ
|
|
866
|
+
* @param {string} [date] Date filter (ISO format)
|
|
867
|
+
* @param {number} [organId] Organ ID filter
|
|
868
|
+
* @param {*} [options] Override http request option.
|
|
869
|
+
* @throws {RequiredError}
|
|
870
|
+
*/
|
|
871
|
+
getRosters(date, organId, options) {
|
|
872
|
+
return localVarFp
|
|
873
|
+
.getRosters(date, organId, options)
|
|
874
|
+
.then((request) => request(axios, basePath));
|
|
875
|
+
},
|
|
876
|
+
/**
|
|
877
|
+
*
|
|
878
|
+
* @summary Update a roster
|
|
879
|
+
* @param {number} id Roster ID
|
|
880
|
+
* @param {RosterUpdateRequest} updateParams Roster input
|
|
881
|
+
* @param {*} [options] Override http request option.
|
|
882
|
+
* @throws {RequiredError}
|
|
883
|
+
*/
|
|
884
|
+
updateRoster(id, updateParams, options) {
|
|
885
|
+
return localVarFp
|
|
886
|
+
.updateRoster(id, updateParams, options)
|
|
887
|
+
.then((request) => request(axios, basePath));
|
|
888
|
+
},
|
|
889
|
+
/**
|
|
890
|
+
*
|
|
891
|
+
* @summary Updates a roster template by ID
|
|
892
|
+
* @param {number} id Template ID
|
|
893
|
+
* @param {RosterTemplateUpdateParams} [params] Update params
|
|
894
|
+
* @param {*} [options] Override http request option.
|
|
895
|
+
* @throws {RequiredError}
|
|
896
|
+
*/
|
|
897
|
+
updateRosterTemplate(id, params, options) {
|
|
898
|
+
return localVarFp
|
|
899
|
+
.updateRosterTemplate(id, params, options)
|
|
900
|
+
.then((request) => request(axios, basePath));
|
|
901
|
+
},
|
|
902
|
+
};
|
|
903
|
+
};
|
|
904
|
+
exports.RosterApiFactory = RosterApiFactory;
|
|
905
|
+
/**
|
|
906
|
+
* RosterApi - object-oriented interface
|
|
907
|
+
* @export
|
|
908
|
+
* @class RosterApi
|
|
909
|
+
* @extends {BaseAPI}
|
|
910
|
+
*/
|
|
911
|
+
class RosterApi extends base_1.BaseAPI {
|
|
912
|
+
/**
|
|
913
|
+
*
|
|
914
|
+
* @summary CreateRoster a new roster
|
|
915
|
+
* @param {RosterCreateRequest} createParams Roster input
|
|
916
|
+
* @param {*} [options] Override http request option.
|
|
917
|
+
* @throws {RequiredError}
|
|
918
|
+
* @memberof RosterApi
|
|
919
|
+
*/
|
|
920
|
+
createRoster(createParams, options) {
|
|
921
|
+
return (0, exports.RosterApiFp)(this.configuration)
|
|
922
|
+
.createRoster(createParams, options)
|
|
923
|
+
.then((request) => request(this.axios, this.basePath));
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
*
|
|
927
|
+
* @summary Creates a template of a roster by defining the name of the shifts
|
|
928
|
+
* @param {RosterTemplateCreateRequest} [params] Template Params
|
|
929
|
+
* @param {*} [options] Override http request option.
|
|
930
|
+
* @throws {RequiredError}
|
|
931
|
+
* @memberof RosterApi
|
|
932
|
+
*/
|
|
933
|
+
createRosterTemplate(params, options) {
|
|
934
|
+
return (0, exports.RosterApiFp)(this.configuration)
|
|
935
|
+
.createRosterTemplate(params, options)
|
|
936
|
+
.then((request) => request(this.axios, this.basePath));
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
*
|
|
940
|
+
* @summary DeleteRoster a roster
|
|
941
|
+
* @param {number} id Roster ID
|
|
942
|
+
* @param {*} [options] Override http request option.
|
|
943
|
+
* @throws {RequiredError}
|
|
944
|
+
* @memberof RosterApi
|
|
945
|
+
*/
|
|
946
|
+
deleteRoster(id, options) {
|
|
947
|
+
return (0, exports.RosterApiFp)(this.configuration)
|
|
948
|
+
.deleteRoster(id, options)
|
|
949
|
+
.then((request) => request(this.axios, this.basePath));
|
|
950
|
+
}
|
|
951
|
+
/**
|
|
952
|
+
*
|
|
953
|
+
* @summary Deletes a roster template by ID
|
|
954
|
+
* @param {number} id Template ID
|
|
955
|
+
* @param {*} [options] Override http request option.
|
|
956
|
+
* @throws {RequiredError}
|
|
957
|
+
* @memberof RosterApi
|
|
958
|
+
*/
|
|
959
|
+
deleteRosterTemplate(id, options) {
|
|
960
|
+
return (0, exports.RosterApiFp)(this.configuration)
|
|
961
|
+
.deleteRosterTemplate(id, options)
|
|
962
|
+
.then((request) => request(this.axios, this.basePath));
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
*
|
|
966
|
+
* @summary Get a specific roster by id
|
|
967
|
+
* @param {number} id Roster ID
|
|
968
|
+
* @param {*} [options] Override http request option.
|
|
969
|
+
* @throws {RequiredError}
|
|
970
|
+
* @memberof RosterApi
|
|
971
|
+
*/
|
|
972
|
+
getRoster(id, options) {
|
|
973
|
+
return (0, exports.RosterApiFp)(this.configuration)
|
|
974
|
+
.getRoster(id, options)
|
|
975
|
+
.then((request) => request(this.axios, this.basePath));
|
|
976
|
+
}
|
|
977
|
+
/**
|
|
978
|
+
*
|
|
979
|
+
* @summary Get a roster template by ID
|
|
980
|
+
* @param {number} id Template ID
|
|
981
|
+
* @param {*} [options] Override http request option.
|
|
982
|
+
* @throws {RequiredError}
|
|
983
|
+
* @memberof RosterApi
|
|
984
|
+
*/
|
|
985
|
+
getRosterTemplate(id, options) {
|
|
986
|
+
return (0, exports.RosterApiFp)(this.configuration)
|
|
987
|
+
.getRosterTemplate(id, options)
|
|
988
|
+
.then((request) => request(this.axios, this.basePath));
|
|
989
|
+
}
|
|
990
|
+
/**
|
|
991
|
+
*
|
|
992
|
+
* @summary Get all rosters templates or query by organ ID
|
|
993
|
+
* @param {number} [organId]
|
|
994
|
+
* @param {*} [options] Override http request option.
|
|
995
|
+
* @throws {RequiredError}
|
|
996
|
+
* @memberof RosterApi
|
|
997
|
+
*/
|
|
998
|
+
getRosterTemplates(organId, options) {
|
|
999
|
+
return (0, exports.RosterApiFp)(this.configuration)
|
|
1000
|
+
.getRosterTemplates(organId, options)
|
|
1001
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1002
|
+
}
|
|
1003
|
+
/**
|
|
1004
|
+
*
|
|
1005
|
+
* @summary Get all rosters or query by date and organ
|
|
1006
|
+
* @param {string} [date] Date filter (ISO format)
|
|
1007
|
+
* @param {number} [organId] Organ ID filter
|
|
1008
|
+
* @param {*} [options] Override http request option.
|
|
1009
|
+
* @throws {RequiredError}
|
|
1010
|
+
* @memberof RosterApi
|
|
1011
|
+
*/
|
|
1012
|
+
getRosters(date, organId, options) {
|
|
1013
|
+
return (0, exports.RosterApiFp)(this.configuration)
|
|
1014
|
+
.getRosters(date, organId, options)
|
|
1015
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1016
|
+
}
|
|
1017
|
+
/**
|
|
1018
|
+
*
|
|
1019
|
+
* @summary Update a roster
|
|
1020
|
+
* @param {number} id Roster ID
|
|
1021
|
+
* @param {RosterUpdateRequest} updateParams Roster input
|
|
1022
|
+
* @param {*} [options] Override http request option.
|
|
1023
|
+
* @throws {RequiredError}
|
|
1024
|
+
* @memberof RosterApi
|
|
1025
|
+
*/
|
|
1026
|
+
updateRoster(id, updateParams, options) {
|
|
1027
|
+
return (0, exports.RosterApiFp)(this.configuration)
|
|
1028
|
+
.updateRoster(id, updateParams, options)
|
|
1029
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1030
|
+
}
|
|
1031
|
+
/**
|
|
1032
|
+
*
|
|
1033
|
+
* @summary Updates a roster template by ID
|
|
1034
|
+
* @param {number} id Template ID
|
|
1035
|
+
* @param {RosterTemplateUpdateParams} [params] Update params
|
|
1036
|
+
* @param {*} [options] Override http request option.
|
|
1037
|
+
* @throws {RequiredError}
|
|
1038
|
+
* @memberof RosterApi
|
|
1039
|
+
*/
|
|
1040
|
+
updateRosterTemplate(id, params, options) {
|
|
1041
|
+
return (0, exports.RosterApiFp)(this.configuration)
|
|
1042
|
+
.updateRosterTemplate(id, params, options)
|
|
1043
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
exports.RosterApi = RosterApi;
|
|
1047
|
+
/**
|
|
1048
|
+
* RosterAnswerApi - axios parameter creator
|
|
1049
|
+
* @export
|
|
1050
|
+
*/
|
|
1051
|
+
const RosterAnswerApiAxiosParamCreator = function (configuration) {
|
|
1052
|
+
return {
|
|
1053
|
+
/**
|
|
1054
|
+
*
|
|
1055
|
+
* @summary Create a new roster shift answer
|
|
1056
|
+
* @param {RosterAnswerCreateRequest} createParams Roster answer input
|
|
1057
|
+
* @param {*} [options] Override http request option.
|
|
1058
|
+
* @throws {RequiredError}
|
|
1059
|
+
*/
|
|
1060
|
+
createRosterAnswer: async (createParams, options = {}) => {
|
|
1061
|
+
// verify required parameter 'createParams' is not null or undefined
|
|
1062
|
+
(0, common_1.assertParamExists)("createRosterAnswer", "createParams", createParams);
|
|
1063
|
+
const localVarPath = `/roster/answer`;
|
|
1064
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1065
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1066
|
+
let baseOptions;
|
|
1067
|
+
if (configuration) {
|
|
1068
|
+
baseOptions = configuration.baseOptions;
|
|
1069
|
+
}
|
|
1070
|
+
const localVarRequestOptions = {
|
|
1071
|
+
method: "POST",
|
|
1072
|
+
...baseOptions,
|
|
1073
|
+
...options,
|
|
1074
|
+
};
|
|
1075
|
+
const localVarHeaderParameter = {};
|
|
1076
|
+
const localVarQueryParameter = {};
|
|
1077
|
+
// authentication BearerAuth required
|
|
1078
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1079
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
1080
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1081
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1082
|
+
localVarRequestOptions.headers = {
|
|
1083
|
+
...localVarHeaderParameter,
|
|
1084
|
+
...headersFromBaseOptions,
|
|
1085
|
+
...options.headers,
|
|
1086
|
+
};
|
|
1087
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createParams, localVarRequestOptions, configuration);
|
|
1088
|
+
return {
|
|
1089
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1090
|
+
options: localVarRequestOptions,
|
|
1091
|
+
};
|
|
1092
|
+
},
|
|
1093
|
+
/**
|
|
1094
|
+
*
|
|
1095
|
+
* @summary Updates a roster answer with the new value
|
|
1096
|
+
* @param {number} id Roster Answer ID
|
|
1097
|
+
* @param {RosterAnswerUpdateRequest} updateParams New answer value
|
|
1098
|
+
* @param {*} [options] Override http request option.
|
|
1099
|
+
* @throws {RequiredError}
|
|
1100
|
+
*/
|
|
1101
|
+
updateRosterAnswer: async (id, updateParams, options = {}) => {
|
|
1102
|
+
// verify required parameter 'id' is not null or undefined
|
|
1103
|
+
(0, common_1.assertParamExists)("updateRosterAnswer", "id", id);
|
|
1104
|
+
// verify required parameter 'updateParams' is not null or undefined
|
|
1105
|
+
(0, common_1.assertParamExists)("updateRosterAnswer", "updateParams", updateParams);
|
|
1106
|
+
const localVarPath = `/roster/answer/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1107
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1108
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1109
|
+
let baseOptions;
|
|
1110
|
+
if (configuration) {
|
|
1111
|
+
baseOptions = configuration.baseOptions;
|
|
1112
|
+
}
|
|
1113
|
+
const localVarRequestOptions = {
|
|
1114
|
+
method: "PATCH",
|
|
1115
|
+
...baseOptions,
|
|
1116
|
+
...options,
|
|
1117
|
+
};
|
|
1118
|
+
const localVarHeaderParameter = {};
|
|
1119
|
+
const localVarQueryParameter = {};
|
|
1120
|
+
// authentication BearerAuth required
|
|
1121
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1122
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
1123
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1124
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1125
|
+
localVarRequestOptions.headers = {
|
|
1126
|
+
...localVarHeaderParameter,
|
|
1127
|
+
...headersFromBaseOptions,
|
|
1128
|
+
...options.headers,
|
|
1129
|
+
};
|
|
1130
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateParams, localVarRequestOptions, configuration);
|
|
1131
|
+
return {
|
|
1132
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1133
|
+
options: localVarRequestOptions,
|
|
1134
|
+
};
|
|
1135
|
+
},
|
|
1136
|
+
};
|
|
1137
|
+
};
|
|
1138
|
+
exports.RosterAnswerApiAxiosParamCreator = RosterAnswerApiAxiosParamCreator;
|
|
1139
|
+
/**
|
|
1140
|
+
* RosterAnswerApi - functional programming interface
|
|
1141
|
+
* @export
|
|
1142
|
+
*/
|
|
1143
|
+
const RosterAnswerApiFp = function (configuration) {
|
|
1144
|
+
const localVarAxiosParamCreator = (0, exports.RosterAnswerApiAxiosParamCreator)(configuration);
|
|
1145
|
+
return {
|
|
1146
|
+
/**
|
|
1147
|
+
*
|
|
1148
|
+
* @summary Create a new roster shift answer
|
|
1149
|
+
* @param {RosterAnswerCreateRequest} createParams Roster answer input
|
|
1150
|
+
* @param {*} [options] Override http request option.
|
|
1151
|
+
* @throws {RequiredError}
|
|
1152
|
+
*/
|
|
1153
|
+
async createRosterAnswer(createParams, options) {
|
|
1154
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createRosterAnswer(createParams, options);
|
|
1155
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1156
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["RosterAnswerApi.createRosterAnswer"]?.[localVarOperationServerIndex]?.url;
|
|
1157
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1158
|
+
},
|
|
1159
|
+
/**
|
|
1160
|
+
*
|
|
1161
|
+
* @summary Updates a roster answer with the new value
|
|
1162
|
+
* @param {number} id Roster Answer ID
|
|
1163
|
+
* @param {RosterAnswerUpdateRequest} updateParams New answer value
|
|
1164
|
+
* @param {*} [options] Override http request option.
|
|
1165
|
+
* @throws {RequiredError}
|
|
1166
|
+
*/
|
|
1167
|
+
async updateRosterAnswer(id, updateParams, options) {
|
|
1168
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateRosterAnswer(id, updateParams, options);
|
|
1169
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1170
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["RosterAnswerApi.updateRosterAnswer"]?.[localVarOperationServerIndex]?.url;
|
|
1171
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1172
|
+
},
|
|
1173
|
+
};
|
|
1174
|
+
};
|
|
1175
|
+
exports.RosterAnswerApiFp = RosterAnswerApiFp;
|
|
1176
|
+
/**
|
|
1177
|
+
* RosterAnswerApi - factory interface
|
|
1178
|
+
* @export
|
|
1179
|
+
*/
|
|
1180
|
+
const RosterAnswerApiFactory = function (configuration, basePath, axios) {
|
|
1181
|
+
const localVarFp = (0, exports.RosterAnswerApiFp)(configuration);
|
|
1182
|
+
return {
|
|
1183
|
+
/**
|
|
1184
|
+
*
|
|
1185
|
+
* @summary Create a new roster shift answer
|
|
1186
|
+
* @param {RosterAnswerCreateRequest} createParams Roster answer input
|
|
1187
|
+
* @param {*} [options] Override http request option.
|
|
1188
|
+
* @throws {RequiredError}
|
|
1189
|
+
*/
|
|
1190
|
+
createRosterAnswer(createParams, options) {
|
|
1191
|
+
return localVarFp
|
|
1192
|
+
.createRosterAnswer(createParams, options)
|
|
1193
|
+
.then((request) => request(axios, basePath));
|
|
1194
|
+
},
|
|
1195
|
+
/**
|
|
1196
|
+
*
|
|
1197
|
+
* @summary Updates a roster answer with the new value
|
|
1198
|
+
* @param {number} id Roster Answer ID
|
|
1199
|
+
* @param {RosterAnswerUpdateRequest} updateParams New answer value
|
|
1200
|
+
* @param {*} [options] Override http request option.
|
|
1201
|
+
* @throws {RequiredError}
|
|
1202
|
+
*/
|
|
1203
|
+
updateRosterAnswer(id, updateParams, options) {
|
|
1204
|
+
return localVarFp
|
|
1205
|
+
.updateRosterAnswer(id, updateParams, options)
|
|
1206
|
+
.then((request) => request(axios, basePath));
|
|
1207
|
+
},
|
|
1208
|
+
};
|
|
1209
|
+
};
|
|
1210
|
+
exports.RosterAnswerApiFactory = RosterAnswerApiFactory;
|
|
1211
|
+
/**
|
|
1212
|
+
* RosterAnswerApi - object-oriented interface
|
|
1213
|
+
* @export
|
|
1214
|
+
* @class RosterAnswerApi
|
|
1215
|
+
* @extends {BaseAPI}
|
|
1216
|
+
*/
|
|
1217
|
+
class RosterAnswerApi extends base_1.BaseAPI {
|
|
1218
|
+
/**
|
|
1219
|
+
*
|
|
1220
|
+
* @summary Create a new roster shift answer
|
|
1221
|
+
* @param {RosterAnswerCreateRequest} createParams Roster answer input
|
|
1222
|
+
* @param {*} [options] Override http request option.
|
|
1223
|
+
* @throws {RequiredError}
|
|
1224
|
+
* @memberof RosterAnswerApi
|
|
1225
|
+
*/
|
|
1226
|
+
createRosterAnswer(createParams, options) {
|
|
1227
|
+
return (0, exports.RosterAnswerApiFp)(this.configuration)
|
|
1228
|
+
.createRosterAnswer(createParams, options)
|
|
1229
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1230
|
+
}
|
|
1231
|
+
/**
|
|
1232
|
+
*
|
|
1233
|
+
* @summary Updates a roster answer with the new value
|
|
1234
|
+
* @param {number} id Roster Answer ID
|
|
1235
|
+
* @param {RosterAnswerUpdateRequest} updateParams New answer value
|
|
1236
|
+
* @param {*} [options] Override http request option.
|
|
1237
|
+
* @throws {RequiredError}
|
|
1238
|
+
* @memberof RosterAnswerApi
|
|
1239
|
+
*/
|
|
1240
|
+
updateRosterAnswer(id, updateParams, options) {
|
|
1241
|
+
return (0, exports.RosterAnswerApiFp)(this.configuration)
|
|
1242
|
+
.updateRosterAnswer(id, updateParams, options)
|
|
1243
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
exports.RosterAnswerApi = RosterAnswerApi;
|
|
1247
|
+
/**
|
|
1248
|
+
* RosterShiftApi - axios parameter creator
|
|
1249
|
+
* @export
|
|
1250
|
+
*/
|
|
1251
|
+
const RosterShiftApiAxiosParamCreator = function (configuration) {
|
|
1252
|
+
return {
|
|
1253
|
+
/**
|
|
1254
|
+
*
|
|
1255
|
+
* @summary Create a new roster shift
|
|
1256
|
+
* @param {RosterShiftCreateRequest} createParams Roster shift input
|
|
1257
|
+
* @param {*} [options] Override http request option.
|
|
1258
|
+
* @throws {RequiredError}
|
|
1259
|
+
*/
|
|
1260
|
+
createRosterShift: async (createParams, options = {}) => {
|
|
1261
|
+
// verify required parameter 'createParams' is not null or undefined
|
|
1262
|
+
(0, common_1.assertParamExists)("createRosterShift", "createParams", createParams);
|
|
1263
|
+
const localVarPath = `/roster/shift`;
|
|
1264
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1265
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1266
|
+
let baseOptions;
|
|
1267
|
+
if (configuration) {
|
|
1268
|
+
baseOptions = configuration.baseOptions;
|
|
1269
|
+
}
|
|
1270
|
+
const localVarRequestOptions = {
|
|
1271
|
+
method: "POST",
|
|
1272
|
+
...baseOptions,
|
|
1273
|
+
...options,
|
|
1274
|
+
};
|
|
1275
|
+
const localVarHeaderParameter = {};
|
|
1276
|
+
const localVarQueryParameter = {};
|
|
1277
|
+
// authentication BearerAuth required
|
|
1278
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1279
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
1280
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1281
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1282
|
+
localVarRequestOptions.headers = {
|
|
1283
|
+
...localVarHeaderParameter,
|
|
1284
|
+
...headersFromBaseOptions,
|
|
1285
|
+
...options.headers,
|
|
1286
|
+
};
|
|
1287
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createParams, localVarRequestOptions, configuration);
|
|
1288
|
+
return {
|
|
1289
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1290
|
+
options: localVarRequestOptions,
|
|
1291
|
+
};
|
|
1292
|
+
},
|
|
1293
|
+
/**
|
|
1294
|
+
*
|
|
1295
|
+
* @summary Deletes a roster shift
|
|
1296
|
+
* @param {number} id Roster Answer ID
|
|
1297
|
+
* @param {*} [options] Override http request option.
|
|
1298
|
+
* @throws {RequiredError}
|
|
1299
|
+
*/
|
|
1300
|
+
deleteRosterShift: async (id, options = {}) => {
|
|
1301
|
+
// verify required parameter 'id' is not null or undefined
|
|
1302
|
+
(0, common_1.assertParamExists)("deleteRosterShift", "id", id);
|
|
1303
|
+
const localVarPath = `/roster/shift/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1304
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1305
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1306
|
+
let baseOptions;
|
|
1307
|
+
if (configuration) {
|
|
1308
|
+
baseOptions = configuration.baseOptions;
|
|
1309
|
+
}
|
|
1310
|
+
const localVarRequestOptions = {
|
|
1311
|
+
method: "DELETE",
|
|
1312
|
+
...baseOptions,
|
|
1313
|
+
...options,
|
|
1314
|
+
};
|
|
1315
|
+
const localVarHeaderParameter = {};
|
|
1316
|
+
const localVarQueryParameter = {};
|
|
1317
|
+
// authentication BearerAuth required
|
|
1318
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1319
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1320
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1321
|
+
localVarRequestOptions.headers = {
|
|
1322
|
+
...localVarHeaderParameter,
|
|
1323
|
+
...headersFromBaseOptions,
|
|
1324
|
+
...options.headers,
|
|
1325
|
+
};
|
|
1326
|
+
return {
|
|
1327
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1328
|
+
options: localVarRequestOptions,
|
|
1329
|
+
};
|
|
1330
|
+
},
|
|
1331
|
+
};
|
|
1332
|
+
};
|
|
1333
|
+
exports.RosterShiftApiAxiosParamCreator = RosterShiftApiAxiosParamCreator;
|
|
1334
|
+
/**
|
|
1335
|
+
* RosterShiftApi - functional programming interface
|
|
1336
|
+
* @export
|
|
1337
|
+
*/
|
|
1338
|
+
const RosterShiftApiFp = function (configuration) {
|
|
1339
|
+
const localVarAxiosParamCreator = (0, exports.RosterShiftApiAxiosParamCreator)(configuration);
|
|
1340
|
+
return {
|
|
1341
|
+
/**
|
|
1342
|
+
*
|
|
1343
|
+
* @summary Create a new roster shift
|
|
1344
|
+
* @param {RosterShiftCreateRequest} createParams Roster shift input
|
|
1345
|
+
* @param {*} [options] Override http request option.
|
|
1346
|
+
* @throws {RequiredError}
|
|
1347
|
+
*/
|
|
1348
|
+
async createRosterShift(createParams, options) {
|
|
1349
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createRosterShift(createParams, options);
|
|
1350
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1351
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["RosterShiftApi.createRosterShift"]?.[localVarOperationServerIndex]?.url;
|
|
1352
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1353
|
+
},
|
|
1354
|
+
/**
|
|
1355
|
+
*
|
|
1356
|
+
* @summary Deletes a roster shift
|
|
1357
|
+
* @param {number} id Roster Answer ID
|
|
1358
|
+
* @param {*} [options] Override http request option.
|
|
1359
|
+
* @throws {RequiredError}
|
|
1360
|
+
*/
|
|
1361
|
+
async deleteRosterShift(id, options) {
|
|
1362
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRosterShift(id, options);
|
|
1363
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1364
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["RosterShiftApi.deleteRosterShift"]?.[localVarOperationServerIndex]?.url;
|
|
1365
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1366
|
+
},
|
|
1367
|
+
};
|
|
1368
|
+
};
|
|
1369
|
+
exports.RosterShiftApiFp = RosterShiftApiFp;
|
|
1370
|
+
/**
|
|
1371
|
+
* RosterShiftApi - factory interface
|
|
1372
|
+
* @export
|
|
1373
|
+
*/
|
|
1374
|
+
const RosterShiftApiFactory = function (configuration, basePath, axios) {
|
|
1375
|
+
const localVarFp = (0, exports.RosterShiftApiFp)(configuration);
|
|
1376
|
+
return {
|
|
1377
|
+
/**
|
|
1378
|
+
*
|
|
1379
|
+
* @summary Create a new roster shift
|
|
1380
|
+
* @param {RosterShiftCreateRequest} createParams Roster shift input
|
|
1381
|
+
* @param {*} [options] Override http request option.
|
|
1382
|
+
* @throws {RequiredError}
|
|
1383
|
+
*/
|
|
1384
|
+
createRosterShift(createParams, options) {
|
|
1385
|
+
return localVarFp
|
|
1386
|
+
.createRosterShift(createParams, options)
|
|
1387
|
+
.then((request) => request(axios, basePath));
|
|
1388
|
+
},
|
|
1389
|
+
/**
|
|
1390
|
+
*
|
|
1391
|
+
* @summary Deletes a roster shift
|
|
1392
|
+
* @param {number} id Roster Answer ID
|
|
1393
|
+
* @param {*} [options] Override http request option.
|
|
1394
|
+
* @throws {RequiredError}
|
|
1395
|
+
*/
|
|
1396
|
+
deleteRosterShift(id, options) {
|
|
1397
|
+
return localVarFp
|
|
1398
|
+
.deleteRosterShift(id, options)
|
|
1399
|
+
.then((request) => request(axios, basePath));
|
|
1400
|
+
},
|
|
1401
|
+
};
|
|
1402
|
+
};
|
|
1403
|
+
exports.RosterShiftApiFactory = RosterShiftApiFactory;
|
|
1404
|
+
/**
|
|
1405
|
+
* RosterShiftApi - object-oriented interface
|
|
1406
|
+
* @export
|
|
1407
|
+
* @class RosterShiftApi
|
|
1408
|
+
* @extends {BaseAPI}
|
|
1409
|
+
*/
|
|
1410
|
+
class RosterShiftApi extends base_1.BaseAPI {
|
|
1411
|
+
/**
|
|
1412
|
+
*
|
|
1413
|
+
* @summary Create a new roster shift
|
|
1414
|
+
* @param {RosterShiftCreateRequest} createParams Roster shift input
|
|
1415
|
+
* @param {*} [options] Override http request option.
|
|
1416
|
+
* @throws {RequiredError}
|
|
1417
|
+
* @memberof RosterShiftApi
|
|
1418
|
+
*/
|
|
1419
|
+
createRosterShift(createParams, options) {
|
|
1420
|
+
return (0, exports.RosterShiftApiFp)(this.configuration)
|
|
1421
|
+
.createRosterShift(createParams, options)
|
|
1422
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1423
|
+
}
|
|
1424
|
+
/**
|
|
1425
|
+
*
|
|
1426
|
+
* @summary Deletes a roster shift
|
|
1427
|
+
* @param {number} id Roster Answer ID
|
|
1428
|
+
* @param {*} [options] Override http request option.
|
|
1429
|
+
* @throws {RequiredError}
|
|
1430
|
+
* @memberof RosterShiftApi
|
|
1431
|
+
*/
|
|
1432
|
+
deleteRosterShift(id, options) {
|
|
1433
|
+
return (0, exports.RosterShiftApiFp)(this.configuration)
|
|
1434
|
+
.deleteRosterShift(id, options)
|
|
1435
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
exports.RosterShiftApi = RosterShiftApi;
|
|
1439
|
+
/**
|
|
1440
|
+
* SavedShiftApi - axios parameter creator
|
|
1441
|
+
* @export
|
|
1442
|
+
*/
|
|
1443
|
+
const SavedShiftApiAxiosParamCreator = function (configuration) {
|
|
1444
|
+
return {
|
|
1445
|
+
/**
|
|
1446
|
+
*
|
|
1447
|
+
* @summary Get all saved shifts for a specific roster
|
|
1448
|
+
* @param {number} id Roster ID
|
|
1449
|
+
* @param {*} [options] Override http request option.
|
|
1450
|
+
* @throws {RequiredError}
|
|
1451
|
+
*/
|
|
1452
|
+
getSavedRoster: async (id, options = {}) => {
|
|
1453
|
+
// verify required parameter 'id' is not null or undefined
|
|
1454
|
+
(0, common_1.assertParamExists)("getSavedRoster", "id", id);
|
|
1455
|
+
const localVarPath = `/roster/saved-shift/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1456
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1457
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1458
|
+
let baseOptions;
|
|
1459
|
+
if (configuration) {
|
|
1460
|
+
baseOptions = configuration.baseOptions;
|
|
1461
|
+
}
|
|
1462
|
+
const localVarRequestOptions = {
|
|
1463
|
+
method: "GET",
|
|
1464
|
+
...baseOptions,
|
|
1465
|
+
...options,
|
|
1466
|
+
};
|
|
1467
|
+
const localVarHeaderParameter = {};
|
|
1468
|
+
const localVarQueryParameter = {};
|
|
1469
|
+
// authentication BearerAuth required
|
|
1470
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1471
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1472
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1473
|
+
localVarRequestOptions.headers = {
|
|
1474
|
+
...localVarHeaderParameter,
|
|
1475
|
+
...headersFromBaseOptions,
|
|
1476
|
+
...options.headers,
|
|
1477
|
+
};
|
|
1478
|
+
return {
|
|
1479
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1480
|
+
options: localVarRequestOptions,
|
|
1481
|
+
};
|
|
1482
|
+
},
|
|
1483
|
+
/**
|
|
1484
|
+
*
|
|
1485
|
+
* @summary Save a specific roster
|
|
1486
|
+
* @param {number} id Roster ID
|
|
1487
|
+
* @param {*} [options] Override http request option.
|
|
1488
|
+
* @throws {RequiredError}
|
|
1489
|
+
*/
|
|
1490
|
+
rosterSave: async (id, options = {}) => {
|
|
1491
|
+
// verify required parameter 'id' is not null or undefined
|
|
1492
|
+
(0, common_1.assertParamExists)("rosterSave", "id", id);
|
|
1493
|
+
const localVarPath = `/roster/{id}/save`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1494
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1495
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1496
|
+
let baseOptions;
|
|
1497
|
+
if (configuration) {
|
|
1498
|
+
baseOptions = configuration.baseOptions;
|
|
1499
|
+
}
|
|
1500
|
+
const localVarRequestOptions = {
|
|
1501
|
+
method: "POST",
|
|
1502
|
+
...baseOptions,
|
|
1503
|
+
...options,
|
|
1504
|
+
};
|
|
1505
|
+
const localVarHeaderParameter = {};
|
|
1506
|
+
const localVarQueryParameter = {};
|
|
1507
|
+
// authentication BearerAuth required
|
|
1508
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1509
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1510
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1511
|
+
localVarRequestOptions.headers = {
|
|
1512
|
+
...localVarHeaderParameter,
|
|
1513
|
+
...headersFromBaseOptions,
|
|
1514
|
+
...options.headers,
|
|
1515
|
+
};
|
|
1516
|
+
return {
|
|
1517
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1518
|
+
options: localVarRequestOptions,
|
|
1519
|
+
};
|
|
1520
|
+
},
|
|
1521
|
+
/**
|
|
1522
|
+
*
|
|
1523
|
+
* @summary Update a specific saved shift
|
|
1524
|
+
* @param {number} id SavedShift ID
|
|
1525
|
+
* @param {SavedShiftUpdateRequest} updateParams Update data
|
|
1526
|
+
* @param {*} [options] Override http request option.
|
|
1527
|
+
* @throws {RequiredError}
|
|
1528
|
+
*/
|
|
1529
|
+
updateSavedShift: async (id, updateParams, options = {}) => {
|
|
1530
|
+
// verify required parameter 'id' is not null or undefined
|
|
1531
|
+
(0, common_1.assertParamExists)("updateSavedShift", "id", id);
|
|
1532
|
+
// verify required parameter 'updateParams' is not null or undefined
|
|
1533
|
+
(0, common_1.assertParamExists)("updateSavedShift", "updateParams", updateParams);
|
|
1534
|
+
const localVarPath = `/roster/saved-shift/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1535
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1536
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1537
|
+
let baseOptions;
|
|
1538
|
+
if (configuration) {
|
|
1539
|
+
baseOptions = configuration.baseOptions;
|
|
1540
|
+
}
|
|
1541
|
+
const localVarRequestOptions = {
|
|
1542
|
+
method: "PATCH",
|
|
1543
|
+
...baseOptions,
|
|
1544
|
+
...options,
|
|
1545
|
+
};
|
|
1546
|
+
const localVarHeaderParameter = {};
|
|
1547
|
+
const localVarQueryParameter = {};
|
|
1548
|
+
// authentication BearerAuth required
|
|
1549
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1550
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
1551
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1552
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1553
|
+
localVarRequestOptions.headers = {
|
|
1554
|
+
...localVarHeaderParameter,
|
|
1555
|
+
...headersFromBaseOptions,
|
|
1556
|
+
...options.headers,
|
|
1557
|
+
};
|
|
1558
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateParams, localVarRequestOptions, configuration);
|
|
1559
|
+
return {
|
|
1560
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1561
|
+
options: localVarRequestOptions,
|
|
1562
|
+
};
|
|
1563
|
+
},
|
|
1564
|
+
};
|
|
1565
|
+
};
|
|
1566
|
+
exports.SavedShiftApiAxiosParamCreator = SavedShiftApiAxiosParamCreator;
|
|
1567
|
+
/**
|
|
1568
|
+
* SavedShiftApi - functional programming interface
|
|
1569
|
+
* @export
|
|
1570
|
+
*/
|
|
1571
|
+
const SavedShiftApiFp = function (configuration) {
|
|
1572
|
+
const localVarAxiosParamCreator = (0, exports.SavedShiftApiAxiosParamCreator)(configuration);
|
|
1573
|
+
return {
|
|
1574
|
+
/**
|
|
1575
|
+
*
|
|
1576
|
+
* @summary Get all saved shifts for a specific roster
|
|
1577
|
+
* @param {number} id Roster ID
|
|
1578
|
+
* @param {*} [options] Override http request option.
|
|
1579
|
+
* @throws {RequiredError}
|
|
1580
|
+
*/
|
|
1581
|
+
async getSavedRoster(id, options) {
|
|
1582
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getSavedRoster(id, options);
|
|
1583
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1584
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["SavedShiftApi.getSavedRoster"]?.[localVarOperationServerIndex]?.url;
|
|
1585
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1586
|
+
},
|
|
1587
|
+
/**
|
|
1588
|
+
*
|
|
1589
|
+
* @summary Save a specific roster
|
|
1590
|
+
* @param {number} id Roster ID
|
|
1591
|
+
* @param {*} [options] Override http request option.
|
|
1592
|
+
* @throws {RequiredError}
|
|
1593
|
+
*/
|
|
1594
|
+
async rosterSave(id, options) {
|
|
1595
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.rosterSave(id, options);
|
|
1596
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1597
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["SavedShiftApi.rosterSave"]?.[localVarOperationServerIndex]?.url;
|
|
1598
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1599
|
+
},
|
|
1600
|
+
/**
|
|
1601
|
+
*
|
|
1602
|
+
* @summary Update a specific saved shift
|
|
1603
|
+
* @param {number} id SavedShift ID
|
|
1604
|
+
* @param {SavedShiftUpdateRequest} updateParams Update data
|
|
1605
|
+
* @param {*} [options] Override http request option.
|
|
1606
|
+
* @throws {RequiredError}
|
|
1607
|
+
*/
|
|
1608
|
+
async updateSavedShift(id, updateParams, options) {
|
|
1609
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateSavedShift(id, updateParams, options);
|
|
1610
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1611
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["SavedShiftApi.updateSavedShift"]?.[localVarOperationServerIndex]?.url;
|
|
1612
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1613
|
+
},
|
|
1614
|
+
};
|
|
1615
|
+
};
|
|
1616
|
+
exports.SavedShiftApiFp = SavedShiftApiFp;
|
|
1617
|
+
/**
|
|
1618
|
+
* SavedShiftApi - factory interface
|
|
1619
|
+
* @export
|
|
1620
|
+
*/
|
|
1621
|
+
const SavedShiftApiFactory = function (configuration, basePath, axios) {
|
|
1622
|
+
const localVarFp = (0, exports.SavedShiftApiFp)(configuration);
|
|
1623
|
+
return {
|
|
1624
|
+
/**
|
|
1625
|
+
*
|
|
1626
|
+
* @summary Get all saved shifts for a specific roster
|
|
1627
|
+
* @param {number} id Roster ID
|
|
1628
|
+
* @param {*} [options] Override http request option.
|
|
1629
|
+
* @throws {RequiredError}
|
|
1630
|
+
*/
|
|
1631
|
+
getSavedRoster(id, options) {
|
|
1632
|
+
return localVarFp
|
|
1633
|
+
.getSavedRoster(id, options)
|
|
1634
|
+
.then((request) => request(axios, basePath));
|
|
1635
|
+
},
|
|
1636
|
+
/**
|
|
1637
|
+
*
|
|
1638
|
+
* @summary Save a specific roster
|
|
1639
|
+
* @param {number} id Roster ID
|
|
1640
|
+
* @param {*} [options] Override http request option.
|
|
1641
|
+
* @throws {RequiredError}
|
|
1642
|
+
*/
|
|
1643
|
+
rosterSave(id, options) {
|
|
1644
|
+
return localVarFp
|
|
1645
|
+
.rosterSave(id, options)
|
|
1646
|
+
.then((request) => request(axios, basePath));
|
|
1647
|
+
},
|
|
1648
|
+
/**
|
|
1649
|
+
*
|
|
1650
|
+
* @summary Update a specific saved shift
|
|
1651
|
+
* @param {number} id SavedShift ID
|
|
1652
|
+
* @param {SavedShiftUpdateRequest} updateParams Update data
|
|
1653
|
+
* @param {*} [options] Override http request option.
|
|
1654
|
+
* @throws {RequiredError}
|
|
1655
|
+
*/
|
|
1656
|
+
updateSavedShift(id, updateParams, options) {
|
|
1657
|
+
return localVarFp
|
|
1658
|
+
.updateSavedShift(id, updateParams, options)
|
|
1659
|
+
.then((request) => request(axios, basePath));
|
|
1660
|
+
},
|
|
1661
|
+
};
|
|
1662
|
+
};
|
|
1663
|
+
exports.SavedShiftApiFactory = SavedShiftApiFactory;
|
|
1664
|
+
/**
|
|
1665
|
+
* SavedShiftApi - object-oriented interface
|
|
1666
|
+
* @export
|
|
1667
|
+
* @class SavedShiftApi
|
|
1668
|
+
* @extends {BaseAPI}
|
|
1669
|
+
*/
|
|
1670
|
+
class SavedShiftApi extends base_1.BaseAPI {
|
|
1671
|
+
/**
|
|
1672
|
+
*
|
|
1673
|
+
* @summary Get all saved shifts for a specific roster
|
|
1674
|
+
* @param {number} id Roster ID
|
|
1675
|
+
* @param {*} [options] Override http request option.
|
|
1676
|
+
* @throws {RequiredError}
|
|
1677
|
+
* @memberof SavedShiftApi
|
|
1678
|
+
*/
|
|
1679
|
+
getSavedRoster(id, options) {
|
|
1680
|
+
return (0, exports.SavedShiftApiFp)(this.configuration)
|
|
1681
|
+
.getSavedRoster(id, options)
|
|
1682
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1683
|
+
}
|
|
1684
|
+
/**
|
|
1685
|
+
*
|
|
1686
|
+
* @summary Save a specific roster
|
|
1687
|
+
* @param {number} id Roster ID
|
|
1688
|
+
* @param {*} [options] Override http request option.
|
|
1689
|
+
* @throws {RequiredError}
|
|
1690
|
+
* @memberof SavedShiftApi
|
|
1691
|
+
*/
|
|
1692
|
+
rosterSave(id, options) {
|
|
1693
|
+
return (0, exports.SavedShiftApiFp)(this.configuration)
|
|
1694
|
+
.rosterSave(id, options)
|
|
1695
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1696
|
+
}
|
|
1697
|
+
/**
|
|
1698
|
+
*
|
|
1699
|
+
* @summary Update a specific saved shift
|
|
1700
|
+
* @param {number} id SavedShift ID
|
|
1701
|
+
* @param {SavedShiftUpdateRequest} updateParams Update data
|
|
1702
|
+
* @param {*} [options] Override http request option.
|
|
1703
|
+
* @throws {RequiredError}
|
|
1704
|
+
* @memberof SavedShiftApi
|
|
1705
|
+
*/
|
|
1706
|
+
updateSavedShift(id, updateParams, options) {
|
|
1707
|
+
return (0, exports.SavedShiftApiFp)(this.configuration)
|
|
1708
|
+
.updateSavedShift(id, updateParams, options)
|
|
1709
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
exports.SavedShiftApi = SavedShiftApi;
|
|
1713
|
+
/**
|
|
1714
|
+
* UserApi - axios parameter creator
|
|
1715
|
+
* @export
|
|
1716
|
+
*/
|
|
1717
|
+
const UserApiAxiosParamCreator = function (configuration) {
|
|
1718
|
+
return {
|
|
1719
|
+
/**
|
|
1720
|
+
* create user
|
|
1721
|
+
* @summary CreateRoster a new user
|
|
1722
|
+
* @param {UserCreateRequest} createParams User input
|
|
1723
|
+
* @param {*} [options] Override http request option.
|
|
1724
|
+
* @throws {RequiredError}
|
|
1725
|
+
*/
|
|
1726
|
+
userCreatePost: async (createParams, options = {}) => {
|
|
1727
|
+
// verify required parameter 'createParams' is not null or undefined
|
|
1728
|
+
(0, common_1.assertParamExists)("userCreatePost", "createParams", createParams);
|
|
1729
|
+
const localVarPath = `/user/create`;
|
|
1730
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1731
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1732
|
+
let baseOptions;
|
|
1733
|
+
if (configuration) {
|
|
1734
|
+
baseOptions = configuration.baseOptions;
|
|
1735
|
+
}
|
|
1736
|
+
const localVarRequestOptions = {
|
|
1737
|
+
method: "POST",
|
|
1738
|
+
...baseOptions,
|
|
1739
|
+
...options,
|
|
1740
|
+
};
|
|
1741
|
+
const localVarHeaderParameter = {};
|
|
1742
|
+
const localVarQueryParameter = {};
|
|
1743
|
+
// authentication BearerAuth required
|
|
1744
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1745
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
1746
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1747
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1748
|
+
localVarRequestOptions.headers = {
|
|
1749
|
+
...localVarHeaderParameter,
|
|
1750
|
+
...headersFromBaseOptions,
|
|
1751
|
+
...options.headers,
|
|
1752
|
+
};
|
|
1753
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createParams, localVarRequestOptions, configuration);
|
|
1754
|
+
return {
|
|
1755
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1756
|
+
options: localVarRequestOptions,
|
|
1757
|
+
};
|
|
1758
|
+
},
|
|
1759
|
+
/**
|
|
1760
|
+
* Retrieve a list of users with optional query parameter filtering
|
|
1761
|
+
* @summary Get all users with optional filtering
|
|
1762
|
+
* @param {number} [organId] Organ ID
|
|
1763
|
+
* @param {number} [gewisId] GEWIS ID
|
|
1764
|
+
* @param {*} [options] Override http request option.
|
|
1765
|
+
* @throws {RequiredError}
|
|
1766
|
+
*/
|
|
1767
|
+
userGet: async (organId, gewisId, options = {}) => {
|
|
1768
|
+
const localVarPath = `/user/`;
|
|
1769
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1770
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1771
|
+
let baseOptions;
|
|
1772
|
+
if (configuration) {
|
|
1773
|
+
baseOptions = configuration.baseOptions;
|
|
1774
|
+
}
|
|
1775
|
+
const localVarRequestOptions = {
|
|
1776
|
+
method: "GET",
|
|
1777
|
+
...baseOptions,
|
|
1778
|
+
...options,
|
|
1779
|
+
};
|
|
1780
|
+
const localVarHeaderParameter = {};
|
|
1781
|
+
const localVarQueryParameter = {};
|
|
1782
|
+
// authentication BearerAuth required
|
|
1783
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1784
|
+
if (organId !== undefined) {
|
|
1785
|
+
localVarQueryParameter["organId"] = organId;
|
|
1786
|
+
}
|
|
1787
|
+
if (gewisId !== undefined) {
|
|
1788
|
+
localVarQueryParameter["gewisId"] = gewisId;
|
|
1789
|
+
}
|
|
1790
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1791
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1792
|
+
localVarRequestOptions.headers = {
|
|
1793
|
+
...localVarHeaderParameter,
|
|
1794
|
+
...headersFromBaseOptions,
|
|
1795
|
+
...options.headers,
|
|
1796
|
+
};
|
|
1797
|
+
return {
|
|
1798
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1799
|
+
options: localVarRequestOptions,
|
|
1800
|
+
};
|
|
1801
|
+
},
|
|
1802
|
+
/**
|
|
1803
|
+
*
|
|
1804
|
+
* @summary DeleteRoster a user
|
|
1805
|
+
* @param {number} id User ID
|
|
1806
|
+
* @param {*} [options] Override http request option.
|
|
1807
|
+
* @throws {RequiredError}
|
|
1808
|
+
*/
|
|
1809
|
+
userIdDelete: async (id, options = {}) => {
|
|
1810
|
+
// verify required parameter 'id' is not null or undefined
|
|
1811
|
+
(0, common_1.assertParamExists)("userIdDelete", "id", id);
|
|
1812
|
+
const localVarPath = `/user/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1813
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1814
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1815
|
+
let baseOptions;
|
|
1816
|
+
if (configuration) {
|
|
1817
|
+
baseOptions = configuration.baseOptions;
|
|
1818
|
+
}
|
|
1819
|
+
const localVarRequestOptions = {
|
|
1820
|
+
method: "DELETE",
|
|
1821
|
+
...baseOptions,
|
|
1822
|
+
...options,
|
|
1823
|
+
};
|
|
1824
|
+
const localVarHeaderParameter = {};
|
|
1825
|
+
const localVarQueryParameter = {};
|
|
1826
|
+
// authentication BearerAuth required
|
|
1827
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1828
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1829
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1830
|
+
localVarRequestOptions.headers = {
|
|
1831
|
+
...localVarHeaderParameter,
|
|
1832
|
+
...headersFromBaseOptions,
|
|
1833
|
+
...options.headers,
|
|
1834
|
+
};
|
|
1835
|
+
return {
|
|
1836
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1837
|
+
options: localVarRequestOptions,
|
|
1838
|
+
};
|
|
1839
|
+
},
|
|
1840
|
+
/**
|
|
1841
|
+
* Retrieve a specific user by their unique ID
|
|
1842
|
+
* @summary Get user by ID
|
|
1843
|
+
* @param {number} id User ID
|
|
1844
|
+
* @param {*} [options] Override http request option.
|
|
1845
|
+
* @throws {RequiredError}
|
|
1846
|
+
*/
|
|
1847
|
+
userIdGet: async (id, options = {}) => {
|
|
1848
|
+
// verify required parameter 'id' is not null or undefined
|
|
1849
|
+
(0, common_1.assertParamExists)("userIdGet", "id", id);
|
|
1850
|
+
const localVarPath = `/user/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1851
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1852
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1853
|
+
let baseOptions;
|
|
1854
|
+
if (configuration) {
|
|
1855
|
+
baseOptions = configuration.baseOptions;
|
|
1856
|
+
}
|
|
1857
|
+
const localVarRequestOptions = {
|
|
1858
|
+
method: "GET",
|
|
1859
|
+
...baseOptions,
|
|
1860
|
+
...options,
|
|
1861
|
+
};
|
|
1862
|
+
const localVarHeaderParameter = {};
|
|
1863
|
+
const localVarQueryParameter = {};
|
|
1864
|
+
// authentication BearerAuth required
|
|
1865
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1866
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1867
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1868
|
+
localVarRequestOptions.headers = {
|
|
1869
|
+
...localVarHeaderParameter,
|
|
1870
|
+
...headersFromBaseOptions,
|
|
1871
|
+
...options.headers,
|
|
1872
|
+
};
|
|
1873
|
+
return {
|
|
1874
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1875
|
+
options: localVarRequestOptions,
|
|
1876
|
+
};
|
|
1877
|
+
},
|
|
1878
|
+
};
|
|
1879
|
+
};
|
|
1880
|
+
exports.UserApiAxiosParamCreator = UserApiAxiosParamCreator;
|
|
1881
|
+
/**
|
|
1882
|
+
* UserApi - functional programming interface
|
|
1883
|
+
* @export
|
|
1884
|
+
*/
|
|
1885
|
+
const UserApiFp = function (configuration) {
|
|
1886
|
+
const localVarAxiosParamCreator = (0, exports.UserApiAxiosParamCreator)(configuration);
|
|
1887
|
+
return {
|
|
1888
|
+
/**
|
|
1889
|
+
* create user
|
|
1890
|
+
* @summary CreateRoster a new user
|
|
1891
|
+
* @param {UserCreateRequest} createParams User input
|
|
1892
|
+
* @param {*} [options] Override http request option.
|
|
1893
|
+
* @throws {RequiredError}
|
|
1894
|
+
*/
|
|
1895
|
+
async userCreatePost(createParams, options) {
|
|
1896
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.userCreatePost(createParams, options);
|
|
1897
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1898
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["UserApi.userCreatePost"]?.[localVarOperationServerIndex]?.url;
|
|
1899
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1900
|
+
},
|
|
1901
|
+
/**
|
|
1902
|
+
* Retrieve a list of users with optional query parameter filtering
|
|
1903
|
+
* @summary Get all users with optional filtering
|
|
1904
|
+
* @param {number} [organId] Organ ID
|
|
1905
|
+
* @param {number} [gewisId] GEWIS ID
|
|
1906
|
+
* @param {*} [options] Override http request option.
|
|
1907
|
+
* @throws {RequiredError}
|
|
1908
|
+
*/
|
|
1909
|
+
async userGet(organId, gewisId, options) {
|
|
1910
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.userGet(organId, gewisId, options);
|
|
1911
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1912
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["UserApi.userGet"]?.[localVarOperationServerIndex]
|
|
1913
|
+
?.url;
|
|
1914
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1915
|
+
},
|
|
1916
|
+
/**
|
|
1917
|
+
*
|
|
1918
|
+
* @summary DeleteRoster a user
|
|
1919
|
+
* @param {number} id User ID
|
|
1920
|
+
* @param {*} [options] Override http request option.
|
|
1921
|
+
* @throws {RequiredError}
|
|
1922
|
+
*/
|
|
1923
|
+
async userIdDelete(id, options) {
|
|
1924
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.userIdDelete(id, options);
|
|
1925
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1926
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["UserApi.userIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
1927
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1928
|
+
},
|
|
1929
|
+
/**
|
|
1930
|
+
* Retrieve a specific user by their unique ID
|
|
1931
|
+
* @summary Get user by ID
|
|
1932
|
+
* @param {number} id User ID
|
|
1933
|
+
* @param {*} [options] Override http request option.
|
|
1934
|
+
* @throws {RequiredError}
|
|
1935
|
+
*/
|
|
1936
|
+
async userIdGet(id, options) {
|
|
1937
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.userIdGet(id, options);
|
|
1938
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1939
|
+
const localVarOperationServerBasePath = base_1.operationServerMap["UserApi.userIdGet"]?.[localVarOperationServerIndex]
|
|
1940
|
+
?.url;
|
|
1941
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1942
|
+
},
|
|
1943
|
+
};
|
|
1944
|
+
};
|
|
1945
|
+
exports.UserApiFp = UserApiFp;
|
|
1946
|
+
/**
|
|
1947
|
+
* UserApi - factory interface
|
|
1948
|
+
* @export
|
|
1949
|
+
*/
|
|
1950
|
+
const UserApiFactory = function (configuration, basePath, axios) {
|
|
1951
|
+
const localVarFp = (0, exports.UserApiFp)(configuration);
|
|
1952
|
+
return {
|
|
1953
|
+
/**
|
|
1954
|
+
* create user
|
|
1955
|
+
* @summary CreateRoster a new user
|
|
1956
|
+
* @param {UserCreateRequest} createParams User input
|
|
1957
|
+
* @param {*} [options] Override http request option.
|
|
1958
|
+
* @throws {RequiredError}
|
|
1959
|
+
*/
|
|
1960
|
+
userCreatePost(createParams, options) {
|
|
1961
|
+
return localVarFp
|
|
1962
|
+
.userCreatePost(createParams, options)
|
|
1963
|
+
.then((request) => request(axios, basePath));
|
|
1964
|
+
},
|
|
1965
|
+
/**
|
|
1966
|
+
* Retrieve a list of users with optional query parameter filtering
|
|
1967
|
+
* @summary Get all users with optional filtering
|
|
1968
|
+
* @param {number} [organId] Organ ID
|
|
1969
|
+
* @param {number} [gewisId] GEWIS ID
|
|
1970
|
+
* @param {*} [options] Override http request option.
|
|
1971
|
+
* @throws {RequiredError}
|
|
1972
|
+
*/
|
|
1973
|
+
userGet(organId, gewisId, options) {
|
|
1974
|
+
return localVarFp
|
|
1975
|
+
.userGet(organId, gewisId, options)
|
|
1976
|
+
.then((request) => request(axios, basePath));
|
|
1977
|
+
},
|
|
1978
|
+
/**
|
|
1979
|
+
*
|
|
1980
|
+
* @summary DeleteRoster a user
|
|
1981
|
+
* @param {number} id User ID
|
|
1982
|
+
* @param {*} [options] Override http request option.
|
|
1983
|
+
* @throws {RequiredError}
|
|
1984
|
+
*/
|
|
1985
|
+
userIdDelete(id, options) {
|
|
1986
|
+
return localVarFp
|
|
1987
|
+
.userIdDelete(id, options)
|
|
1988
|
+
.then((request) => request(axios, basePath));
|
|
1989
|
+
},
|
|
1990
|
+
/**
|
|
1991
|
+
* Retrieve a specific user by their unique ID
|
|
1992
|
+
* @summary Get user by ID
|
|
1993
|
+
* @param {number} id User ID
|
|
1994
|
+
* @param {*} [options] Override http request option.
|
|
1995
|
+
* @throws {RequiredError}
|
|
1996
|
+
*/
|
|
1997
|
+
userIdGet(id, options) {
|
|
1998
|
+
return localVarFp
|
|
1999
|
+
.userIdGet(id, options)
|
|
2000
|
+
.then((request) => request(axios, basePath));
|
|
2001
|
+
},
|
|
2002
|
+
};
|
|
2003
|
+
};
|
|
2004
|
+
exports.UserApiFactory = UserApiFactory;
|
|
2005
|
+
/**
|
|
2006
|
+
* UserApi - object-oriented interface
|
|
2007
|
+
* @export
|
|
2008
|
+
* @class UserApi
|
|
2009
|
+
* @extends {BaseAPI}
|
|
2010
|
+
*/
|
|
2011
|
+
class UserApi extends base_1.BaseAPI {
|
|
2012
|
+
/**
|
|
2013
|
+
* create user
|
|
2014
|
+
* @summary CreateRoster a new user
|
|
2015
|
+
* @param {UserCreateRequest} createParams User input
|
|
2016
|
+
* @param {*} [options] Override http request option.
|
|
2017
|
+
* @throws {RequiredError}
|
|
2018
|
+
* @memberof UserApi
|
|
2019
|
+
*/
|
|
2020
|
+
userCreatePost(createParams, options) {
|
|
2021
|
+
return (0, exports.UserApiFp)(this.configuration)
|
|
2022
|
+
.userCreatePost(createParams, options)
|
|
2023
|
+
.then((request) => request(this.axios, this.basePath));
|
|
2024
|
+
}
|
|
2025
|
+
/**
|
|
2026
|
+
* Retrieve a list of users with optional query parameter filtering
|
|
2027
|
+
* @summary Get all users with optional filtering
|
|
2028
|
+
* @param {number} [organId] Organ ID
|
|
2029
|
+
* @param {number} [gewisId] GEWIS ID
|
|
2030
|
+
* @param {*} [options] Override http request option.
|
|
2031
|
+
* @throws {RequiredError}
|
|
2032
|
+
* @memberof UserApi
|
|
2033
|
+
*/
|
|
2034
|
+
userGet(organId, gewisId, options) {
|
|
2035
|
+
return (0, exports.UserApiFp)(this.configuration)
|
|
2036
|
+
.userGet(organId, gewisId, options)
|
|
2037
|
+
.then((request) => request(this.axios, this.basePath));
|
|
2038
|
+
}
|
|
2039
|
+
/**
|
|
2040
|
+
*
|
|
2041
|
+
* @summary DeleteRoster a user
|
|
2042
|
+
* @param {number} id User ID
|
|
2043
|
+
* @param {*} [options] Override http request option.
|
|
2044
|
+
* @throws {RequiredError}
|
|
2045
|
+
* @memberof UserApi
|
|
2046
|
+
*/
|
|
2047
|
+
userIdDelete(id, options) {
|
|
2048
|
+
return (0, exports.UserApiFp)(this.configuration)
|
|
2049
|
+
.userIdDelete(id, options)
|
|
2050
|
+
.then((request) => request(this.axios, this.basePath));
|
|
2051
|
+
}
|
|
2052
|
+
/**
|
|
2053
|
+
* Retrieve a specific user by their unique ID
|
|
2054
|
+
* @summary Get user by ID
|
|
2055
|
+
* @param {number} id User ID
|
|
2056
|
+
* @param {*} [options] Override http request option.
|
|
2057
|
+
* @throws {RequiredError}
|
|
2058
|
+
* @memberof UserApi
|
|
2059
|
+
*/
|
|
2060
|
+
userIdGet(id, options) {
|
|
2061
|
+
return (0, exports.UserApiFp)(this.configuration)
|
|
2062
|
+
.userIdGet(id, options)
|
|
2063
|
+
.then((request) => request(this.axios, this.basePath));
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
exports.UserApi = UserApi;
|
|
2067
|
+
//# sourceMappingURL=api.js.map
|