@gewis/grooster-backend-ts 1.3.3 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/api.d.ts +1551 -0
  2. package/dist/api.js +2067 -0
  3. package/dist/api.js.map +1 -0
  4. package/dist/base.d.ts +66 -0
  5. package/dist/base.js +64 -0
  6. package/dist/base.js.map +1 -0
  7. package/dist/common.d.ts +65 -0
  8. package/dist/common.js +153 -0
  9. package/dist/common.js.map +1 -0
  10. package/{src/configuration.ts → dist/configuration.d.ts} +4 -28
  11. package/dist/configuration.js +51 -0
  12. package/dist/configuration.js.map +1 -0
  13. package/{src/index.ts → dist/index.d.ts} +1 -6
  14. package/dist/index.js +31 -0
  15. package/dist/index.js.map +1 -0
  16. package/package.json +4 -1
  17. package/eslint.config.mjs +0 -10
  18. package/src/.openapi-generator/FILES +0 -31
  19. package/src/.openapi-generator/VERSION +0 -1
  20. package/src/.openapi-generator-ignore +0 -23
  21. package/src/api.ts +0 -2574
  22. package/src/base.ts +0 -86
  23. package/src/common.ts +0 -150
  24. package/src/docs/AuthApi.md +0 -117
  25. package/src/docs/GormDeletedAt.md +0 -22
  26. package/src/docs/Organ.md +0 -31
  27. package/src/docs/Roster.md +0 -42
  28. package/src/docs/RosterAnswer.md +0 -34
  29. package/src/docs/RosterAnswerApi.md +0 -117
  30. package/src/docs/RosterAnswerCreateRequest.md +0 -26
  31. package/src/docs/RosterAnswerUpdateRequest.md +0 -20
  32. package/src/docs/RosterApi.md +0 -545
  33. package/src/docs/RosterCreateRequest.md +0 -26
  34. package/src/docs/RosterShift.md +0 -30
  35. package/src/docs/RosterShiftApi.md +0 -112
  36. package/src/docs/RosterShiftCreateRequest.md +0 -22
  37. package/src/docs/RosterTemplate.md +0 -32
  38. package/src/docs/RosterTemplateCreateRequest.md +0 -24
  39. package/src/docs/RosterTemplateUpdateParams.md +0 -22
  40. package/src/docs/RosterUpdateRequest.md +0 -22
  41. package/src/docs/SavedShift.md +0 -34
  42. package/src/docs/SavedShiftApi.md +0 -170
  43. package/src/docs/SavedShiftUpdateRequest.md +0 -20
  44. package/src/docs/User.md +0 -32
  45. package/src/docs/UserApi.md +0 -224
  46. package/src/docs/UserCreateRequest.md +0 -24
  47. package/src/git_push.sh +0 -57
  48. package/tsconfig.eslint.json +0 -5
  49. package/tsconfig.json +0 -23
package/src/api.ts DELETED
@@ -1,2574 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * GRooster
5
- * A GEWIS Rooster maker
6
- *
7
- * The version of the OpenAPI document: 0.1
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
- import type { Configuration } from './configuration';
17
- import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
- import globalAxios from 'axios';
19
- // Some imports not used depending on template conditions
20
- // @ts-ignore
21
- import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
22
- import type { RequestArgs } from './base';
23
- // @ts-ignore
24
- import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
25
-
26
- /**
27
- *
28
- * @export
29
- * @interface GormDeletedAt
30
- */
31
- export interface GormDeletedAt {
32
- /**
33
- *
34
- * @type {string}
35
- * @memberof GormDeletedAt
36
- */
37
- 'time'?: string;
38
- /**
39
- * Valid is true if Time is not NULL
40
- * @type {boolean}
41
- * @memberof GormDeletedAt
42
- */
43
- 'valid'?: boolean;
44
- }
45
- /**
46
- * An organ that users can be part of.
47
- * @export
48
- * @interface Organ
49
- */
50
- export interface Organ {
51
- /**
52
- *
53
- * @type {string}
54
- * @memberof Organ
55
- */
56
- 'createdAt'?: string;
57
- /**
58
- *
59
- * @type {GormDeletedAt}
60
- * @memberof Organ
61
- */
62
- 'deletedAt'?: GormDeletedAt;
63
- /**
64
- *
65
- * @type {number}
66
- * @memberof Organ
67
- */
68
- 'id'?: number;
69
- /**
70
- *
71
- * @type {string}
72
- * @memberof Organ
73
- */
74
- 'name'?: string;
75
- /**
76
- *
77
- * @type {string}
78
- * @memberof Organ
79
- */
80
- 'updatedAt'?: string;
81
- /**
82
- *
83
- * @type {Array<User>}
84
- * @memberof Organ
85
- */
86
- 'users'?: Array<User>;
87
- }
88
- /**
89
- *
90
- * @export
91
- * @interface Roster
92
- */
93
- export interface Roster {
94
- /**
95
- *
96
- * @type {string}
97
- * @memberof Roster
98
- */
99
- 'createdAt'?: string;
100
- /**
101
- *
102
- * @type {string}
103
- * @memberof Roster
104
- */
105
- 'date'?: string;
106
- /**
107
- *
108
- * @type {GormDeletedAt}
109
- * @memberof Roster
110
- */
111
- 'deletedAt'?: GormDeletedAt;
112
- /**
113
- *
114
- * @type {number}
115
- * @memberof Roster
116
- */
117
- 'id'?: number;
118
- /**
119
- *
120
- * @type {string}
121
- * @memberof Roster
122
- */
123
- 'name'?: string;
124
- /**
125
- *
126
- * @type {Organ}
127
- * @memberof Roster
128
- */
129
- 'organ'?: Organ;
130
- /**
131
- *
132
- * @type {number}
133
- * @memberof Roster
134
- */
135
- 'organId'?: number;
136
- /**
137
- *
138
- * @type {Array<RosterAnswer>}
139
- * @memberof Roster
140
- */
141
- 'rosterAnswer'?: Array<RosterAnswer>;
142
- /**
143
- *
144
- * @type {Array<RosterShift>}
145
- * @memberof Roster
146
- */
147
- 'rosterShift'?: Array<RosterShift>;
148
- /**
149
- *
150
- * @type {boolean}
151
- * @memberof Roster
152
- */
153
- 'saved'?: boolean;
154
- /**
155
- *
156
- * @type {string}
157
- * @memberof Roster
158
- */
159
- 'updatedAt'?: string;
160
- /**
161
- *
162
- * @type {Array<string>}
163
- * @memberof Roster
164
- */
165
- 'values'?: Array<string>;
166
- }
167
- /**
168
- *
169
- * @export
170
- * @interface RosterAnswer
171
- */
172
- export interface RosterAnswer {
173
- /**
174
- *
175
- * @type {string}
176
- * @memberof RosterAnswer
177
- */
178
- 'createdAt'?: string;
179
- /**
180
- *
181
- * @type {GormDeletedAt}
182
- * @memberof RosterAnswer
183
- */
184
- 'deletedAt'?: GormDeletedAt;
185
- /**
186
- *
187
- * @type {number}
188
- * @memberof RosterAnswer
189
- */
190
- 'id'?: number;
191
- /**
192
- *
193
- * @type {number}
194
- * @memberof RosterAnswer
195
- */
196
- 'rosterId'?: number;
197
- /**
198
- *
199
- * @type {number}
200
- * @memberof RosterAnswer
201
- */
202
- 'rosterShiftId'?: number;
203
- /**
204
- *
205
- * @type {string}
206
- * @memberof RosterAnswer
207
- */
208
- 'updatedAt'?: string;
209
- /**
210
- *
211
- * @type {number}
212
- * @memberof RosterAnswer
213
- */
214
- 'userId'?: number;
215
- /**
216
- *
217
- * @type {string}
218
- * @memberof RosterAnswer
219
- */
220
- 'value'?: string;
221
- }
222
- /**
223
- *
224
- * @export
225
- * @interface RosterAnswerCreateRequest
226
- */
227
- export interface RosterAnswerCreateRequest {
228
- /**
229
- *
230
- * @type {number}
231
- * @memberof RosterAnswerCreateRequest
232
- */
233
- 'rosterId'?: number;
234
- /**
235
- *
236
- * @type {number}
237
- * @memberof RosterAnswerCreateRequest
238
- */
239
- 'rosterShiftId'?: number;
240
- /**
241
- *
242
- * @type {number}
243
- * @memberof RosterAnswerCreateRequest
244
- */
245
- 'userId'?: number;
246
- /**
247
- *
248
- * @type {string}
249
- * @memberof RosterAnswerCreateRequest
250
- */
251
- 'value'?: string;
252
- }
253
- /**
254
- *
255
- * @export
256
- * @interface RosterAnswerUpdateRequest
257
- */
258
- export interface RosterAnswerUpdateRequest {
259
- /**
260
- *
261
- * @type {string}
262
- * @memberof RosterAnswerUpdateRequest
263
- */
264
- 'value'?: string;
265
- }
266
- /**
267
- *
268
- * @export
269
- * @interface RosterCreateRequest
270
- */
271
- export interface RosterCreateRequest {
272
- /**
273
- *
274
- * @type {string}
275
- * @memberof RosterCreateRequest
276
- */
277
- 'date'?: string;
278
- /**
279
- *
280
- * @type {string}
281
- * @memberof RosterCreateRequest
282
- */
283
- 'name'?: string;
284
- /**
285
- *
286
- * @type {number}
287
- * @memberof RosterCreateRequest
288
- */
289
- 'organId'?: number;
290
- /**
291
- *
292
- * @type {Array<string>}
293
- * @memberof RosterCreateRequest
294
- */
295
- 'shifts'?: Array<string>;
296
- }
297
- /**
298
- *
299
- * @export
300
- * @interface RosterShift
301
- */
302
- export interface RosterShift {
303
- /**
304
- *
305
- * @type {string}
306
- * @memberof RosterShift
307
- */
308
- 'createdAt'?: string;
309
- /**
310
- *
311
- * @type {GormDeletedAt}
312
- * @memberof RosterShift
313
- */
314
- 'deletedAt'?: GormDeletedAt;
315
- /**
316
- *
317
- * @type {number}
318
- * @memberof RosterShift
319
- */
320
- 'id'?: number;
321
- /**
322
- *
323
- * @type {string}
324
- * @memberof RosterShift
325
- */
326
- 'name'?: string;
327
- /**
328
- *
329
- * @type {number}
330
- * @memberof RosterShift
331
- */
332
- 'rosterId'?: number;
333
- /**
334
- *
335
- * @type {string}
336
- * @memberof RosterShift
337
- */
338
- 'updatedAt'?: string;
339
- }
340
- /**
341
- *
342
- * @export
343
- * @interface RosterShiftCreateRequest
344
- */
345
- export interface RosterShiftCreateRequest {
346
- /**
347
- *
348
- * @type {string}
349
- * @memberof RosterShiftCreateRequest
350
- */
351
- 'name'?: string;
352
- /**
353
- *
354
- * @type {number}
355
- * @memberof RosterShiftCreateRequest
356
- */
357
- 'rosterId'?: number;
358
- }
359
- /**
360
- *
361
- * @export
362
- * @interface RosterTemplate
363
- */
364
- export interface RosterTemplate {
365
- /**
366
- *
367
- * @type {string}
368
- * @memberof RosterTemplate
369
- */
370
- 'createdAt'?: string;
371
- /**
372
- *
373
- * @type {GormDeletedAt}
374
- * @memberof RosterTemplate
375
- */
376
- 'deletedAt'?: GormDeletedAt;
377
- /**
378
- *
379
- * @type {number}
380
- * @memberof RosterTemplate
381
- */
382
- 'id'?: number;
383
- /**
384
- *
385
- * @type {string}
386
- * @memberof RosterTemplate
387
- */
388
- 'name'?: string;
389
- /**
390
- *
391
- * @type {number}
392
- * @memberof RosterTemplate
393
- */
394
- 'organId'?: number;
395
- /**
396
- *
397
- * @type {Array<string>}
398
- * @memberof RosterTemplate
399
- */
400
- 'shifts'?: Array<string>;
401
- /**
402
- *
403
- * @type {string}
404
- * @memberof RosterTemplate
405
- */
406
- 'updatedAt'?: string;
407
- }
408
- /**
409
- *
410
- * @export
411
- * @interface RosterTemplateCreateRequest
412
- */
413
- export interface RosterTemplateCreateRequest {
414
- /**
415
- *
416
- * @type {string}
417
- * @memberof RosterTemplateCreateRequest
418
- */
419
- 'name'?: string;
420
- /**
421
- *
422
- * @type {number}
423
- * @memberof RosterTemplateCreateRequest
424
- */
425
- 'organId'?: number;
426
- /**
427
- *
428
- * @type {Array<string>}
429
- * @memberof RosterTemplateCreateRequest
430
- */
431
- 'shifts'?: Array<string>;
432
- }
433
- /**
434
- *
435
- * @export
436
- * @interface RosterTemplateUpdateParams
437
- */
438
- export interface RosterTemplateUpdateParams {
439
- /**
440
- *
441
- * @type {string}
442
- * @memberof RosterTemplateUpdateParams
443
- */
444
- 'name'?: string;
445
- /**
446
- *
447
- * @type {Array<string>}
448
- * @memberof RosterTemplateUpdateParams
449
- */
450
- 'shifts'?: Array<string>;
451
- }
452
- /**
453
- *
454
- * @export
455
- * @interface RosterUpdateRequest
456
- */
457
- export interface RosterUpdateRequest {
458
- /**
459
- *
460
- * @type {string}
461
- * @memberof RosterUpdateRequest
462
- */
463
- 'date'?: string;
464
- /**
465
- *
466
- * @type {string}
467
- * @memberof RosterUpdateRequest
468
- */
469
- 'name'?: string;
470
- }
471
- /**
472
- *
473
- * @export
474
- * @interface SavedShift
475
- */
476
- export interface SavedShift {
477
- /**
478
- *
479
- * @type {string}
480
- * @memberof SavedShift
481
- */
482
- 'createdAt'?: string;
483
- /**
484
- *
485
- * @type {GormDeletedAt}
486
- * @memberof SavedShift
487
- */
488
- 'deletedAt'?: GormDeletedAt;
489
- /**
490
- *
491
- * @type {number}
492
- * @memberof SavedShift
493
- */
494
- 'id'?: number;
495
- /**
496
- *
497
- * @type {number}
498
- * @memberof SavedShift
499
- */
500
- 'rosterId'?: number;
501
- /**
502
- *
503
- * @type {RosterShift}
504
- * @memberof SavedShift
505
- */
506
- 'rosterShift'?: RosterShift;
507
- /**
508
- *
509
- * @type {number}
510
- * @memberof SavedShift
511
- */
512
- 'rosterShiftId'?: number;
513
- /**
514
- *
515
- * @type {string}
516
- * @memberof SavedShift
517
- */
518
- 'updatedAt'?: string;
519
- /**
520
- *
521
- * @type {Array<User>}
522
- * @memberof SavedShift
523
- */
524
- 'users'?: Array<User>;
525
- }
526
- /**
527
- *
528
- * @export
529
- * @interface SavedShiftUpdateRequest
530
- */
531
- export interface SavedShiftUpdateRequest {
532
- /**
533
- *
534
- * @type {Array<number>}
535
- * @memberof SavedShiftUpdateRequest
536
- */
537
- 'users'?: Array<number>;
538
- }
539
- /**
540
- *
541
- * @export
542
- * @interface User
543
- */
544
- export interface User {
545
- /**
546
- *
547
- * @type {string}
548
- * @memberof User
549
- */
550
- 'createdAt'?: string;
551
- /**
552
- *
553
- * @type {GormDeletedAt}
554
- * @memberof User
555
- */
556
- 'deletedAt'?: GormDeletedAt;
557
- /**
558
- *
559
- * @type {number}
560
- * @memberof User
561
- */
562
- 'gewis_id'?: number;
563
- /**
564
- *
565
- * @type {number}
566
- * @memberof User
567
- */
568
- 'id'?: number;
569
- /**
570
- *
571
- * @type {string}
572
- * @memberof User
573
- */
574
- 'name'?: string;
575
- /**
576
- *
577
- * @type {Array<Organ>}
578
- * @memberof User
579
- */
580
- 'organs'?: Array<Organ>;
581
- /**
582
- *
583
- * @type {string}
584
- * @memberof User
585
- */
586
- 'updatedAt'?: string;
587
- }
588
- /**
589
- *
590
- * @export
591
- * @interface UserCreateRequest
592
- */
593
- export interface UserCreateRequest {
594
- /**
595
- *
596
- * @type {number}
597
- * @memberof UserCreateRequest
598
- */
599
- 'gewisid'?: number;
600
- /**
601
- *
602
- * @type {string}
603
- * @memberof UserCreateRequest
604
- */
605
- 'name'?: string;
606
- /**
607
- *
608
- * @type {Array<Organ>}
609
- * @memberof UserCreateRequest
610
- */
611
- 'organs'?: Array<Organ>;
612
- }
613
-
614
- /**
615
- * AuthApi - axios parameter creator
616
- * @export
617
- */
618
- export const AuthApiAxiosParamCreator = function (configuration?: Configuration) {
619
- return {
620
- /**
621
- * Validates state, exchanges code for token, and returns user info
622
- * @summary Handle OAuth2 Callback
623
- * @param {string} state State returned from provider
624
- * @param {string} code Authorization code from provider
625
- * @param {*} [options] Override http request option.
626
- * @throws {RequiredError}
627
- */
628
- authCallbackGet: async (state: string, code: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
629
- // verify required parameter 'state' is not null or undefined
630
- assertParamExists('authCallbackGet', 'state', state)
631
- // verify required parameter 'code' is not null or undefined
632
- assertParamExists('authCallbackGet', 'code', code)
633
- const localVarPath = `/auth/callback`;
634
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
635
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
636
- let baseOptions;
637
- if (configuration) {
638
- baseOptions = configuration.baseOptions;
639
- }
640
-
641
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
642
- const localVarHeaderParameter = {} as any;
643
- const localVarQueryParameter = {} as any;
644
-
645
- if (state !== undefined) {
646
- localVarQueryParameter['state'] = state;
647
- }
648
-
649
- if (code !== undefined) {
650
- localVarQueryParameter['code'] = code;
651
- }
652
-
653
-
654
-
655
- setSearchParams(localVarUrlObj, localVarQueryParameter);
656
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
657
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
658
-
659
- return {
660
- url: toPathString(localVarUrlObj),
661
- options: localVarRequestOptions,
662
- };
663
- },
664
- /**
665
- * Generates state, sets a cookie, and redirects to Google OIDC
666
- * @summary Redirect to OIDC provider
667
- * @param {string} state State returned from provider
668
- * @param {*} [options] Override http request option.
669
- * @throws {RequiredError}
670
- */
671
- authRedirectGet: async (state: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
672
- // verify required parameter 'state' is not null or undefined
673
- assertParamExists('authRedirectGet', 'state', state)
674
- const localVarPath = `/auth/redirect`;
675
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
676
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
677
- let baseOptions;
678
- if (configuration) {
679
- baseOptions = configuration.baseOptions;
680
- }
681
-
682
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
683
- const localVarHeaderParameter = {} as any;
684
- const localVarQueryParameter = {} as any;
685
-
686
- if (state !== undefined) {
687
- localVarQueryParameter['state'] = state;
688
- }
689
-
690
-
691
-
692
- setSearchParams(localVarUrlObj, localVarQueryParameter);
693
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
694
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
695
-
696
- return {
697
- url: toPathString(localVarUrlObj),
698
- options: localVarRequestOptions,
699
- };
700
- },
701
- }
702
- };
703
-
704
- /**
705
- * AuthApi - functional programming interface
706
- * @export
707
- */
708
- export const AuthApiFp = function(configuration?: Configuration) {
709
- const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration)
710
- return {
711
- /**
712
- * Validates state, exchanges code for token, and returns user info
713
- * @summary Handle OAuth2 Callback
714
- * @param {string} state State returned from provider
715
- * @param {string} code Authorization code from provider
716
- * @param {*} [options] Override http request option.
717
- * @throws {RequiredError}
718
- */
719
- async authCallbackGet(state: string, code: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: string; }>> {
720
- const localVarAxiosArgs = await localVarAxiosParamCreator.authCallbackGet(state, code, options);
721
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
722
- const localVarOperationServerBasePath = operationServerMap['AuthApi.authCallbackGet']?.[localVarOperationServerIndex]?.url;
723
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
724
- },
725
- /**
726
- * Generates state, sets a cookie, and redirects to Google OIDC
727
- * @summary Redirect to OIDC provider
728
- * @param {string} state State returned from provider
729
- * @param {*} [options] Override http request option.
730
- * @throws {RequiredError}
731
- */
732
- async authRedirectGet(state: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
733
- const localVarAxiosArgs = await localVarAxiosParamCreator.authRedirectGet(state, options);
734
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
735
- const localVarOperationServerBasePath = operationServerMap['AuthApi.authRedirectGet']?.[localVarOperationServerIndex]?.url;
736
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
737
- },
738
- }
739
- };
740
-
741
- /**
742
- * AuthApi - factory interface
743
- * @export
744
- */
745
- export const AuthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
746
- const localVarFp = AuthApiFp(configuration)
747
- return {
748
- /**
749
- * Validates state, exchanges code for token, and returns user info
750
- * @summary Handle OAuth2 Callback
751
- * @param {string} state State returned from provider
752
- * @param {string} code Authorization code from provider
753
- * @param {*} [options] Override http request option.
754
- * @throws {RequiredError}
755
- */
756
- authCallbackGet(state: string, code: string, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: string; }> {
757
- return localVarFp.authCallbackGet(state, code, options).then((request) => request(axios, basePath));
758
- },
759
- /**
760
- * Generates state, sets a cookie, and redirects to Google OIDC
761
- * @summary Redirect to OIDC provider
762
- * @param {string} state State returned from provider
763
- * @param {*} [options] Override http request option.
764
- * @throws {RequiredError}
765
- */
766
- authRedirectGet(state: string, options?: RawAxiosRequestConfig): AxiosPromise<string> {
767
- return localVarFp.authRedirectGet(state, options).then((request) => request(axios, basePath));
768
- },
769
- };
770
- };
771
-
772
- /**
773
- * AuthApi - object-oriented interface
774
- * @export
775
- * @class AuthApi
776
- * @extends {BaseAPI}
777
- */
778
- export class AuthApi extends BaseAPI {
779
- /**
780
- * Validates state, exchanges code for token, and returns user info
781
- * @summary Handle OAuth2 Callback
782
- * @param {string} state State returned from provider
783
- * @param {string} code Authorization code from provider
784
- * @param {*} [options] Override http request option.
785
- * @throws {RequiredError}
786
- * @memberof AuthApi
787
- */
788
- public authCallbackGet(state: string, code: string, options?: RawAxiosRequestConfig) {
789
- return AuthApiFp(this.configuration).authCallbackGet(state, code, options).then((request) => request(this.axios, this.basePath));
790
- }
791
-
792
- /**
793
- * Generates state, sets a cookie, and redirects to Google OIDC
794
- * @summary Redirect to OIDC provider
795
- * @param {string} state State returned from provider
796
- * @param {*} [options] Override http request option.
797
- * @throws {RequiredError}
798
- * @memberof AuthApi
799
- */
800
- public authRedirectGet(state: string, options?: RawAxiosRequestConfig) {
801
- return AuthApiFp(this.configuration).authRedirectGet(state, options).then((request) => request(this.axios, this.basePath));
802
- }
803
- }
804
-
805
-
806
-
807
- /**
808
- * RosterApi - axios parameter creator
809
- * @export
810
- */
811
- export const RosterApiAxiosParamCreator = function (configuration?: Configuration) {
812
- return {
813
- /**
814
- *
815
- * @summary CreateRoster a new roster
816
- * @param {RosterCreateRequest} createParams Roster input
817
- * @param {*} [options] Override http request option.
818
- * @throws {RequiredError}
819
- */
820
- createRoster: async (createParams: RosterCreateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
821
- // verify required parameter 'createParams' is not null or undefined
822
- assertParamExists('createRoster', 'createParams', createParams)
823
- const localVarPath = `/roster`;
824
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
825
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
826
- let baseOptions;
827
- if (configuration) {
828
- baseOptions = configuration.baseOptions;
829
- }
830
-
831
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
832
- const localVarHeaderParameter = {} as any;
833
- const localVarQueryParameter = {} as any;
834
-
835
- // authentication BearerAuth required
836
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
837
-
838
-
839
-
840
- localVarHeaderParameter['Content-Type'] = 'application/json';
841
-
842
- setSearchParams(localVarUrlObj, localVarQueryParameter);
843
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
844
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
845
- localVarRequestOptions.data = serializeDataIfNeeded(createParams, localVarRequestOptions, configuration)
846
-
847
- return {
848
- url: toPathString(localVarUrlObj),
849
- options: localVarRequestOptions,
850
- };
851
- },
852
- /**
853
- *
854
- * @summary Creates a template of a roster by defining the name of the shifts
855
- * @param {RosterTemplateCreateRequest} [params] Template Params
856
- * @param {*} [options] Override http request option.
857
- * @throws {RequiredError}
858
- */
859
- createRosterTemplate: async (params?: RosterTemplateCreateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
860
- const localVarPath = `/roster/template`;
861
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
862
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
863
- let baseOptions;
864
- if (configuration) {
865
- baseOptions = configuration.baseOptions;
866
- }
867
-
868
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
869
- const localVarHeaderParameter = {} as any;
870
- const localVarQueryParameter = {} as any;
871
-
872
- // authentication BearerAuth required
873
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
874
-
875
-
876
-
877
- localVarHeaderParameter['Content-Type'] = 'application/json';
878
-
879
- setSearchParams(localVarUrlObj, localVarQueryParameter);
880
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
881
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
882
- localVarRequestOptions.data = serializeDataIfNeeded(params, localVarRequestOptions, configuration)
883
-
884
- return {
885
- url: toPathString(localVarUrlObj),
886
- options: localVarRequestOptions,
887
- };
888
- },
889
- /**
890
- *
891
- * @summary DeleteRoster a roster
892
- * @param {number} id Roster ID
893
- * @param {*} [options] Override http request option.
894
- * @throws {RequiredError}
895
- */
896
- deleteRoster: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
897
- // verify required parameter 'id' is not null or undefined
898
- assertParamExists('deleteRoster', 'id', id)
899
- const localVarPath = `/roster/{id}`
900
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
901
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
902
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
903
- let baseOptions;
904
- if (configuration) {
905
- baseOptions = configuration.baseOptions;
906
- }
907
-
908
- const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
909
- const localVarHeaderParameter = {} as any;
910
- const localVarQueryParameter = {} as any;
911
-
912
- // authentication BearerAuth required
913
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
914
-
915
-
916
-
917
- setSearchParams(localVarUrlObj, localVarQueryParameter);
918
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
919
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
920
-
921
- return {
922
- url: toPathString(localVarUrlObj),
923
- options: localVarRequestOptions,
924
- };
925
- },
926
- /**
927
- *
928
- * @summary Deletes a roster template by ID
929
- * @param {number} id Template ID
930
- * @param {*} [options] Override http request option.
931
- * @throws {RequiredError}
932
- */
933
- deleteRosterTemplate: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
934
- // verify required parameter 'id' is not null or undefined
935
- assertParamExists('deleteRosterTemplate', 'id', id)
936
- const localVarPath = `/roster/template/{id}`
937
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
938
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
939
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
940
- let baseOptions;
941
- if (configuration) {
942
- baseOptions = configuration.baseOptions;
943
- }
944
-
945
- const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
946
- const localVarHeaderParameter = {} as any;
947
- const localVarQueryParameter = {} as any;
948
-
949
- // authentication BearerAuth required
950
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
951
-
952
-
953
-
954
- setSearchParams(localVarUrlObj, localVarQueryParameter);
955
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
956
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
957
-
958
- return {
959
- url: toPathString(localVarUrlObj),
960
- options: localVarRequestOptions,
961
- };
962
- },
963
- /**
964
- *
965
- * @summary Get a specific roster by id
966
- * @param {number} id Roster ID
967
- * @param {*} [options] Override http request option.
968
- * @throws {RequiredError}
969
- */
970
- getRoster: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
971
- // verify required parameter 'id' is not null or undefined
972
- assertParamExists('getRoster', 'id', id)
973
- const localVarPath = `/roster/{id}`
974
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
975
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
976
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
977
- let baseOptions;
978
- if (configuration) {
979
- baseOptions = configuration.baseOptions;
980
- }
981
-
982
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
983
- const localVarHeaderParameter = {} as any;
984
- const localVarQueryParameter = {} as any;
985
-
986
- // authentication BearerAuth required
987
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
988
-
989
-
990
-
991
- setSearchParams(localVarUrlObj, localVarQueryParameter);
992
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
993
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
994
-
995
- return {
996
- url: toPathString(localVarUrlObj),
997
- options: localVarRequestOptions,
998
- };
999
- },
1000
- /**
1001
- *
1002
- * @summary Get a roster template by ID
1003
- * @param {number} id Template ID
1004
- * @param {*} [options] Override http request option.
1005
- * @throws {RequiredError}
1006
- */
1007
- getRosterTemplate: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1008
- // verify required parameter 'id' is not null or undefined
1009
- assertParamExists('getRosterTemplate', 'id', id)
1010
- const localVarPath = `/roster/template/{id}`
1011
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1012
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1013
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1014
- let baseOptions;
1015
- if (configuration) {
1016
- baseOptions = configuration.baseOptions;
1017
- }
1018
-
1019
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1020
- const localVarHeaderParameter = {} as any;
1021
- const localVarQueryParameter = {} as any;
1022
-
1023
- // authentication BearerAuth required
1024
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1025
-
1026
-
1027
-
1028
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1029
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1030
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1031
-
1032
- return {
1033
- url: toPathString(localVarUrlObj),
1034
- options: localVarRequestOptions,
1035
- };
1036
- },
1037
- /**
1038
- *
1039
- * @summary Get all rosters templates or query by organ ID
1040
- * @param {number} [organId]
1041
- * @param {*} [options] Override http request option.
1042
- * @throws {RequiredError}
1043
- */
1044
- getRosterTemplates: async (organId?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1045
- const localVarPath = `/roster/template`;
1046
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1047
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1048
- let baseOptions;
1049
- if (configuration) {
1050
- baseOptions = configuration.baseOptions;
1051
- }
1052
-
1053
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1054
- const localVarHeaderParameter = {} as any;
1055
- const localVarQueryParameter = {} as any;
1056
-
1057
- // authentication BearerAuth required
1058
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1059
-
1060
- if (organId !== undefined) {
1061
- localVarQueryParameter['organId'] = organId;
1062
- }
1063
-
1064
-
1065
-
1066
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1067
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1068
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1069
-
1070
- return {
1071
- url: toPathString(localVarUrlObj),
1072
- options: localVarRequestOptions,
1073
- };
1074
- },
1075
- /**
1076
- *
1077
- * @summary Get all rosters or query by date and organ
1078
- * @param {string} [date] Date filter (ISO format)
1079
- * @param {number} [organId] Organ ID filter
1080
- * @param {*} [options] Override http request option.
1081
- * @throws {RequiredError}
1082
- */
1083
- getRosters: async (date?: string, organId?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1084
- const localVarPath = `/roster`;
1085
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1086
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1087
- let baseOptions;
1088
- if (configuration) {
1089
- baseOptions = configuration.baseOptions;
1090
- }
1091
-
1092
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1093
- const localVarHeaderParameter = {} as any;
1094
- const localVarQueryParameter = {} as any;
1095
-
1096
- // authentication BearerAuth required
1097
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1098
-
1099
- if (date !== undefined) {
1100
- localVarQueryParameter['date'] = date;
1101
- }
1102
-
1103
- if (organId !== undefined) {
1104
- localVarQueryParameter['organId'] = organId;
1105
- }
1106
-
1107
-
1108
-
1109
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1110
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1111
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1112
-
1113
- return {
1114
- url: toPathString(localVarUrlObj),
1115
- options: localVarRequestOptions,
1116
- };
1117
- },
1118
- /**
1119
- *
1120
- * @summary Update a roster
1121
- * @param {number} id Roster ID
1122
- * @param {RosterUpdateRequest} updateParams Roster input
1123
- * @param {*} [options] Override http request option.
1124
- * @throws {RequiredError}
1125
- */
1126
- updateRoster: async (id: number, updateParams: RosterUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1127
- // verify required parameter 'id' is not null or undefined
1128
- assertParamExists('updateRoster', 'id', id)
1129
- // verify required parameter 'updateParams' is not null or undefined
1130
- assertParamExists('updateRoster', 'updateParams', updateParams)
1131
- const localVarPath = `/roster/{id}`
1132
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1133
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1134
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1135
- let baseOptions;
1136
- if (configuration) {
1137
- baseOptions = configuration.baseOptions;
1138
- }
1139
-
1140
- const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
1141
- const localVarHeaderParameter = {} as any;
1142
- const localVarQueryParameter = {} as any;
1143
-
1144
- // authentication BearerAuth required
1145
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1146
-
1147
-
1148
-
1149
- localVarHeaderParameter['Content-Type'] = 'application/json';
1150
-
1151
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1152
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1153
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1154
- localVarRequestOptions.data = serializeDataIfNeeded(updateParams, localVarRequestOptions, configuration)
1155
-
1156
- return {
1157
- url: toPathString(localVarUrlObj),
1158
- options: localVarRequestOptions,
1159
- };
1160
- },
1161
- /**
1162
- *
1163
- * @summary Updates a roster template by ID
1164
- * @param {number} id Template ID
1165
- * @param {RosterTemplateUpdateParams} [params] Update params
1166
- * @param {*} [options] Override http request option.
1167
- * @throws {RequiredError}
1168
- */
1169
- updateRosterTemplate: async (id: number, params?: RosterTemplateUpdateParams, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1170
- // verify required parameter 'id' is not null or undefined
1171
- assertParamExists('updateRosterTemplate', 'id', id)
1172
- const localVarPath = `/roster/template/{id}`
1173
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1174
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1175
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1176
- let baseOptions;
1177
- if (configuration) {
1178
- baseOptions = configuration.baseOptions;
1179
- }
1180
-
1181
- const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
1182
- const localVarHeaderParameter = {} as any;
1183
- const localVarQueryParameter = {} as any;
1184
-
1185
- // authentication BearerAuth required
1186
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1187
-
1188
-
1189
-
1190
- localVarHeaderParameter['Content-Type'] = 'application/json';
1191
-
1192
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1193
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1194
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1195
- localVarRequestOptions.data = serializeDataIfNeeded(params, localVarRequestOptions, configuration)
1196
-
1197
- return {
1198
- url: toPathString(localVarUrlObj),
1199
- options: localVarRequestOptions,
1200
- };
1201
- },
1202
- }
1203
- };
1204
-
1205
- /**
1206
- * RosterApi - functional programming interface
1207
- * @export
1208
- */
1209
- export const RosterApiFp = function(configuration?: Configuration) {
1210
- const localVarAxiosParamCreator = RosterApiAxiosParamCreator(configuration)
1211
- return {
1212
- /**
1213
- *
1214
- * @summary CreateRoster a new roster
1215
- * @param {RosterCreateRequest} createParams Roster input
1216
- * @param {*} [options] Override http request option.
1217
- * @throws {RequiredError}
1218
- */
1219
- async createRoster(createParams: RosterCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Roster>> {
1220
- const localVarAxiosArgs = await localVarAxiosParamCreator.createRoster(createParams, options);
1221
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1222
- const localVarOperationServerBasePath = operationServerMap['RosterApi.createRoster']?.[localVarOperationServerIndex]?.url;
1223
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1224
- },
1225
- /**
1226
- *
1227
- * @summary Creates a template of a roster by defining the name of the shifts
1228
- * @param {RosterTemplateCreateRequest} [params] Template Params
1229
- * @param {*} [options] Override http request option.
1230
- * @throws {RequiredError}
1231
- */
1232
- async createRosterTemplate(params?: RosterTemplateCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<RosterTemplate>>> {
1233
- const localVarAxiosArgs = await localVarAxiosParamCreator.createRosterTemplate(params, options);
1234
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1235
- const localVarOperationServerBasePath = operationServerMap['RosterApi.createRosterTemplate']?.[localVarOperationServerIndex]?.url;
1236
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1237
- },
1238
- /**
1239
- *
1240
- * @summary DeleteRoster a roster
1241
- * @param {number} id Roster ID
1242
- * @param {*} [options] Override http request option.
1243
- * @throws {RequiredError}
1244
- */
1245
- async deleteRoster(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
1246
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRoster(id, options);
1247
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1248
- const localVarOperationServerBasePath = operationServerMap['RosterApi.deleteRoster']?.[localVarOperationServerIndex]?.url;
1249
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1250
- },
1251
- /**
1252
- *
1253
- * @summary Deletes a roster template by ID
1254
- * @param {number} id Template ID
1255
- * @param {*} [options] Override http request option.
1256
- * @throws {RequiredError}
1257
- */
1258
- async deleteRosterTemplate(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
1259
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRosterTemplate(id, options);
1260
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1261
- const localVarOperationServerBasePath = operationServerMap['RosterApi.deleteRosterTemplate']?.[localVarOperationServerIndex]?.url;
1262
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1263
- },
1264
- /**
1265
- *
1266
- * @summary Get a specific roster by id
1267
- * @param {number} id Roster ID
1268
- * @param {*} [options] Override http request option.
1269
- * @throws {RequiredError}
1270
- */
1271
- async getRoster(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Roster>> {
1272
- const localVarAxiosArgs = await localVarAxiosParamCreator.getRoster(id, options);
1273
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1274
- const localVarOperationServerBasePath = operationServerMap['RosterApi.getRoster']?.[localVarOperationServerIndex]?.url;
1275
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1276
- },
1277
- /**
1278
- *
1279
- * @summary Get a roster template by ID
1280
- * @param {number} id Template ID
1281
- * @param {*} [options] Override http request option.
1282
- * @throws {RequiredError}
1283
- */
1284
- async getRosterTemplate(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RosterTemplate>> {
1285
- const localVarAxiosArgs = await localVarAxiosParamCreator.getRosterTemplate(id, options);
1286
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1287
- const localVarOperationServerBasePath = operationServerMap['RosterApi.getRosterTemplate']?.[localVarOperationServerIndex]?.url;
1288
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1289
- },
1290
- /**
1291
- *
1292
- * @summary Get all rosters templates or query by organ ID
1293
- * @param {number} [organId]
1294
- * @param {*} [options] Override http request option.
1295
- * @throws {RequiredError}
1296
- */
1297
- async getRosterTemplates(organId?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<RosterTemplate>>> {
1298
- const localVarAxiosArgs = await localVarAxiosParamCreator.getRosterTemplates(organId, options);
1299
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1300
- const localVarOperationServerBasePath = operationServerMap['RosterApi.getRosterTemplates']?.[localVarOperationServerIndex]?.url;
1301
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1302
- },
1303
- /**
1304
- *
1305
- * @summary Get all rosters or query by date and organ
1306
- * @param {string} [date] Date filter (ISO format)
1307
- * @param {number} [organId] Organ ID filter
1308
- * @param {*} [options] Override http request option.
1309
- * @throws {RequiredError}
1310
- */
1311
- async getRosters(date?: string, organId?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Roster>>> {
1312
- const localVarAxiosArgs = await localVarAxiosParamCreator.getRosters(date, organId, options);
1313
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1314
- const localVarOperationServerBasePath = operationServerMap['RosterApi.getRosters']?.[localVarOperationServerIndex]?.url;
1315
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1316
- },
1317
- /**
1318
- *
1319
- * @summary Update a roster
1320
- * @param {number} id Roster ID
1321
- * @param {RosterUpdateRequest} updateParams Roster input
1322
- * @param {*} [options] Override http request option.
1323
- * @throws {RequiredError}
1324
- */
1325
- async updateRoster(id: number, updateParams: RosterUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Roster>> {
1326
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateRoster(id, updateParams, options);
1327
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1328
- const localVarOperationServerBasePath = operationServerMap['RosterApi.updateRoster']?.[localVarOperationServerIndex]?.url;
1329
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1330
- },
1331
- /**
1332
- *
1333
- * @summary Updates a roster template by ID
1334
- * @param {number} id Template ID
1335
- * @param {RosterTemplateUpdateParams} [params] Update params
1336
- * @param {*} [options] Override http request option.
1337
- * @throws {RequiredError}
1338
- */
1339
- async updateRosterTemplate(id: number, params?: RosterTemplateUpdateParams, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RosterTemplate>> {
1340
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateRosterTemplate(id, params, options);
1341
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1342
- const localVarOperationServerBasePath = operationServerMap['RosterApi.updateRosterTemplate']?.[localVarOperationServerIndex]?.url;
1343
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1344
- },
1345
- }
1346
- };
1347
-
1348
- /**
1349
- * RosterApi - factory interface
1350
- * @export
1351
- */
1352
- export const RosterApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1353
- const localVarFp = RosterApiFp(configuration)
1354
- return {
1355
- /**
1356
- *
1357
- * @summary CreateRoster a new roster
1358
- * @param {RosterCreateRequest} createParams Roster input
1359
- * @param {*} [options] Override http request option.
1360
- * @throws {RequiredError}
1361
- */
1362
- createRoster(createParams: RosterCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise<Roster> {
1363
- return localVarFp.createRoster(createParams, options).then((request) => request(axios, basePath));
1364
- },
1365
- /**
1366
- *
1367
- * @summary Creates a template of a roster by defining the name of the shifts
1368
- * @param {RosterTemplateCreateRequest} [params] Template Params
1369
- * @param {*} [options] Override http request option.
1370
- * @throws {RequiredError}
1371
- */
1372
- createRosterTemplate(params?: RosterTemplateCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<RosterTemplate>> {
1373
- return localVarFp.createRosterTemplate(params, options).then((request) => request(axios, basePath));
1374
- },
1375
- /**
1376
- *
1377
- * @summary DeleteRoster a roster
1378
- * @param {number} id Roster ID
1379
- * @param {*} [options] Override http request option.
1380
- * @throws {RequiredError}
1381
- */
1382
- deleteRoster(id: number, options?: RawAxiosRequestConfig): AxiosPromise<string> {
1383
- return localVarFp.deleteRoster(id, options).then((request) => request(axios, basePath));
1384
- },
1385
- /**
1386
- *
1387
- * @summary Deletes a roster template by ID
1388
- * @param {number} id Template ID
1389
- * @param {*} [options] Override http request option.
1390
- * @throws {RequiredError}
1391
- */
1392
- deleteRosterTemplate(id: number, options?: RawAxiosRequestConfig): AxiosPromise<string> {
1393
- return localVarFp.deleteRosterTemplate(id, options).then((request) => request(axios, basePath));
1394
- },
1395
- /**
1396
- *
1397
- * @summary Get a specific roster by id
1398
- * @param {number} id Roster ID
1399
- * @param {*} [options] Override http request option.
1400
- * @throws {RequiredError}
1401
- */
1402
- getRoster(id: number, options?: RawAxiosRequestConfig): AxiosPromise<Roster> {
1403
- return localVarFp.getRoster(id, options).then((request) => request(axios, basePath));
1404
- },
1405
- /**
1406
- *
1407
- * @summary Get a roster template by ID
1408
- * @param {number} id Template ID
1409
- * @param {*} [options] Override http request option.
1410
- * @throws {RequiredError}
1411
- */
1412
- getRosterTemplate(id: number, options?: RawAxiosRequestConfig): AxiosPromise<RosterTemplate> {
1413
- return localVarFp.getRosterTemplate(id, options).then((request) => request(axios, basePath));
1414
- },
1415
- /**
1416
- *
1417
- * @summary Get all rosters templates or query by organ ID
1418
- * @param {number} [organId]
1419
- * @param {*} [options] Override http request option.
1420
- * @throws {RequiredError}
1421
- */
1422
- getRosterTemplates(organId?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<RosterTemplate>> {
1423
- return localVarFp.getRosterTemplates(organId, options).then((request) => request(axios, basePath));
1424
- },
1425
- /**
1426
- *
1427
- * @summary Get all rosters or query by date and organ
1428
- * @param {string} [date] Date filter (ISO format)
1429
- * @param {number} [organId] Organ ID filter
1430
- * @param {*} [options] Override http request option.
1431
- * @throws {RequiredError}
1432
- */
1433
- getRosters(date?: string, organId?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<Roster>> {
1434
- return localVarFp.getRosters(date, organId, options).then((request) => request(axios, basePath));
1435
- },
1436
- /**
1437
- *
1438
- * @summary Update a roster
1439
- * @param {number} id Roster ID
1440
- * @param {RosterUpdateRequest} updateParams Roster input
1441
- * @param {*} [options] Override http request option.
1442
- * @throws {RequiredError}
1443
- */
1444
- updateRoster(id: number, updateParams: RosterUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<Roster> {
1445
- return localVarFp.updateRoster(id, updateParams, options).then((request) => request(axios, basePath));
1446
- },
1447
- /**
1448
- *
1449
- * @summary Updates a roster template by ID
1450
- * @param {number} id Template ID
1451
- * @param {RosterTemplateUpdateParams} [params] Update params
1452
- * @param {*} [options] Override http request option.
1453
- * @throws {RequiredError}
1454
- */
1455
- updateRosterTemplate(id: number, params?: RosterTemplateUpdateParams, options?: RawAxiosRequestConfig): AxiosPromise<RosterTemplate> {
1456
- return localVarFp.updateRosterTemplate(id, params, options).then((request) => request(axios, basePath));
1457
- },
1458
- };
1459
- };
1460
-
1461
- /**
1462
- * RosterApi - object-oriented interface
1463
- * @export
1464
- * @class RosterApi
1465
- * @extends {BaseAPI}
1466
- */
1467
- export class RosterApi extends BaseAPI {
1468
- /**
1469
- *
1470
- * @summary CreateRoster a new roster
1471
- * @param {RosterCreateRequest} createParams Roster input
1472
- * @param {*} [options] Override http request option.
1473
- * @throws {RequiredError}
1474
- * @memberof RosterApi
1475
- */
1476
- public createRoster(createParams: RosterCreateRequest, options?: RawAxiosRequestConfig) {
1477
- return RosterApiFp(this.configuration).createRoster(createParams, options).then((request) => request(this.axios, this.basePath));
1478
- }
1479
-
1480
- /**
1481
- *
1482
- * @summary Creates a template of a roster by defining the name of the shifts
1483
- * @param {RosterTemplateCreateRequest} [params] Template Params
1484
- * @param {*} [options] Override http request option.
1485
- * @throws {RequiredError}
1486
- * @memberof RosterApi
1487
- */
1488
- public createRosterTemplate(params?: RosterTemplateCreateRequest, options?: RawAxiosRequestConfig) {
1489
- return RosterApiFp(this.configuration).createRosterTemplate(params, options).then((request) => request(this.axios, this.basePath));
1490
- }
1491
-
1492
- /**
1493
- *
1494
- * @summary DeleteRoster a roster
1495
- * @param {number} id Roster ID
1496
- * @param {*} [options] Override http request option.
1497
- * @throws {RequiredError}
1498
- * @memberof RosterApi
1499
- */
1500
- public deleteRoster(id: number, options?: RawAxiosRequestConfig) {
1501
- return RosterApiFp(this.configuration).deleteRoster(id, options).then((request) => request(this.axios, this.basePath));
1502
- }
1503
-
1504
- /**
1505
- *
1506
- * @summary Deletes a roster template by ID
1507
- * @param {number} id Template ID
1508
- * @param {*} [options] Override http request option.
1509
- * @throws {RequiredError}
1510
- * @memberof RosterApi
1511
- */
1512
- public deleteRosterTemplate(id: number, options?: RawAxiosRequestConfig) {
1513
- return RosterApiFp(this.configuration).deleteRosterTemplate(id, options).then((request) => request(this.axios, this.basePath));
1514
- }
1515
-
1516
- /**
1517
- *
1518
- * @summary Get a specific roster by id
1519
- * @param {number} id Roster ID
1520
- * @param {*} [options] Override http request option.
1521
- * @throws {RequiredError}
1522
- * @memberof RosterApi
1523
- */
1524
- public getRoster(id: number, options?: RawAxiosRequestConfig) {
1525
- return RosterApiFp(this.configuration).getRoster(id, options).then((request) => request(this.axios, this.basePath));
1526
- }
1527
-
1528
- /**
1529
- *
1530
- * @summary Get a roster template by ID
1531
- * @param {number} id Template ID
1532
- * @param {*} [options] Override http request option.
1533
- * @throws {RequiredError}
1534
- * @memberof RosterApi
1535
- */
1536
- public getRosterTemplate(id: number, options?: RawAxiosRequestConfig) {
1537
- return RosterApiFp(this.configuration).getRosterTemplate(id, options).then((request) => request(this.axios, this.basePath));
1538
- }
1539
-
1540
- /**
1541
- *
1542
- * @summary Get all rosters templates or query by organ ID
1543
- * @param {number} [organId]
1544
- * @param {*} [options] Override http request option.
1545
- * @throws {RequiredError}
1546
- * @memberof RosterApi
1547
- */
1548
- public getRosterTemplates(organId?: number, options?: RawAxiosRequestConfig) {
1549
- return RosterApiFp(this.configuration).getRosterTemplates(organId, options).then((request) => request(this.axios, this.basePath));
1550
- }
1551
-
1552
- /**
1553
- *
1554
- * @summary Get all rosters or query by date and organ
1555
- * @param {string} [date] Date filter (ISO format)
1556
- * @param {number} [organId] Organ ID filter
1557
- * @param {*} [options] Override http request option.
1558
- * @throws {RequiredError}
1559
- * @memberof RosterApi
1560
- */
1561
- public getRosters(date?: string, organId?: number, options?: RawAxiosRequestConfig) {
1562
- return RosterApiFp(this.configuration).getRosters(date, organId, options).then((request) => request(this.axios, this.basePath));
1563
- }
1564
-
1565
- /**
1566
- *
1567
- * @summary Update a roster
1568
- * @param {number} id Roster ID
1569
- * @param {RosterUpdateRequest} updateParams Roster input
1570
- * @param {*} [options] Override http request option.
1571
- * @throws {RequiredError}
1572
- * @memberof RosterApi
1573
- */
1574
- public updateRoster(id: number, updateParams: RosterUpdateRequest, options?: RawAxiosRequestConfig) {
1575
- return RosterApiFp(this.configuration).updateRoster(id, updateParams, options).then((request) => request(this.axios, this.basePath));
1576
- }
1577
-
1578
- /**
1579
- *
1580
- * @summary Updates a roster template by ID
1581
- * @param {number} id Template ID
1582
- * @param {RosterTemplateUpdateParams} [params] Update params
1583
- * @param {*} [options] Override http request option.
1584
- * @throws {RequiredError}
1585
- * @memberof RosterApi
1586
- */
1587
- public updateRosterTemplate(id: number, params?: RosterTemplateUpdateParams, options?: RawAxiosRequestConfig) {
1588
- return RosterApiFp(this.configuration).updateRosterTemplate(id, params, options).then((request) => request(this.axios, this.basePath));
1589
- }
1590
- }
1591
-
1592
-
1593
-
1594
- /**
1595
- * RosterAnswerApi - axios parameter creator
1596
- * @export
1597
- */
1598
- export const RosterAnswerApiAxiosParamCreator = function (configuration?: Configuration) {
1599
- return {
1600
- /**
1601
- *
1602
- * @summary Create a new roster shift answer
1603
- * @param {RosterAnswerCreateRequest} createParams Roster answer input
1604
- * @param {*} [options] Override http request option.
1605
- * @throws {RequiredError}
1606
- */
1607
- createRosterAnswer: async (createParams: RosterAnswerCreateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1608
- // verify required parameter 'createParams' is not null or undefined
1609
- assertParamExists('createRosterAnswer', 'createParams', createParams)
1610
- const localVarPath = `/roster/answer`;
1611
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1612
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1613
- let baseOptions;
1614
- if (configuration) {
1615
- baseOptions = configuration.baseOptions;
1616
- }
1617
-
1618
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1619
- const localVarHeaderParameter = {} as any;
1620
- const localVarQueryParameter = {} as any;
1621
-
1622
- // authentication BearerAuth required
1623
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1624
-
1625
-
1626
-
1627
- localVarHeaderParameter['Content-Type'] = 'application/json';
1628
-
1629
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1630
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1631
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1632
- localVarRequestOptions.data = serializeDataIfNeeded(createParams, localVarRequestOptions, configuration)
1633
-
1634
- return {
1635
- url: toPathString(localVarUrlObj),
1636
- options: localVarRequestOptions,
1637
- };
1638
- },
1639
- /**
1640
- *
1641
- * @summary Updates a roster answer with the new value
1642
- * @param {number} id Roster Answer ID
1643
- * @param {RosterAnswerUpdateRequest} updateParams New answer value
1644
- * @param {*} [options] Override http request option.
1645
- * @throws {RequiredError}
1646
- */
1647
- updateRosterAnswer: async (id: number, updateParams: RosterAnswerUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1648
- // verify required parameter 'id' is not null or undefined
1649
- assertParamExists('updateRosterAnswer', 'id', id)
1650
- // verify required parameter 'updateParams' is not null or undefined
1651
- assertParamExists('updateRosterAnswer', 'updateParams', updateParams)
1652
- const localVarPath = `/roster/answer/{id}`
1653
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1654
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1655
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1656
- let baseOptions;
1657
- if (configuration) {
1658
- baseOptions = configuration.baseOptions;
1659
- }
1660
-
1661
- const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
1662
- const localVarHeaderParameter = {} as any;
1663
- const localVarQueryParameter = {} as any;
1664
-
1665
- // authentication BearerAuth required
1666
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1667
-
1668
-
1669
-
1670
- localVarHeaderParameter['Content-Type'] = 'application/json';
1671
-
1672
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1673
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1674
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1675
- localVarRequestOptions.data = serializeDataIfNeeded(updateParams, localVarRequestOptions, configuration)
1676
-
1677
- return {
1678
- url: toPathString(localVarUrlObj),
1679
- options: localVarRequestOptions,
1680
- };
1681
- },
1682
- }
1683
- };
1684
-
1685
- /**
1686
- * RosterAnswerApi - functional programming interface
1687
- * @export
1688
- */
1689
- export const RosterAnswerApiFp = function(configuration?: Configuration) {
1690
- const localVarAxiosParamCreator = RosterAnswerApiAxiosParamCreator(configuration)
1691
- return {
1692
- /**
1693
- *
1694
- * @summary Create a new roster shift answer
1695
- * @param {RosterAnswerCreateRequest} createParams Roster answer input
1696
- * @param {*} [options] Override http request option.
1697
- * @throws {RequiredError}
1698
- */
1699
- async createRosterAnswer(createParams: RosterAnswerCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RosterAnswer>> {
1700
- const localVarAxiosArgs = await localVarAxiosParamCreator.createRosterAnswer(createParams, options);
1701
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1702
- const localVarOperationServerBasePath = operationServerMap['RosterAnswerApi.createRosterAnswer']?.[localVarOperationServerIndex]?.url;
1703
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1704
- },
1705
- /**
1706
- *
1707
- * @summary Updates a roster answer with the new value
1708
- * @param {number} id Roster Answer ID
1709
- * @param {RosterAnswerUpdateRequest} updateParams New answer value
1710
- * @param {*} [options] Override http request option.
1711
- * @throws {RequiredError}
1712
- */
1713
- async updateRosterAnswer(id: number, updateParams: RosterAnswerUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RosterAnswer>> {
1714
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateRosterAnswer(id, updateParams, options);
1715
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1716
- const localVarOperationServerBasePath = operationServerMap['RosterAnswerApi.updateRosterAnswer']?.[localVarOperationServerIndex]?.url;
1717
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1718
- },
1719
- }
1720
- };
1721
-
1722
- /**
1723
- * RosterAnswerApi - factory interface
1724
- * @export
1725
- */
1726
- export const RosterAnswerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1727
- const localVarFp = RosterAnswerApiFp(configuration)
1728
- return {
1729
- /**
1730
- *
1731
- * @summary Create a new roster shift answer
1732
- * @param {RosterAnswerCreateRequest} createParams Roster answer input
1733
- * @param {*} [options] Override http request option.
1734
- * @throws {RequiredError}
1735
- */
1736
- createRosterAnswer(createParams: RosterAnswerCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise<RosterAnswer> {
1737
- return localVarFp.createRosterAnswer(createParams, options).then((request) => request(axios, basePath));
1738
- },
1739
- /**
1740
- *
1741
- * @summary Updates a roster answer with the new value
1742
- * @param {number} id Roster Answer ID
1743
- * @param {RosterAnswerUpdateRequest} updateParams New answer value
1744
- * @param {*} [options] Override http request option.
1745
- * @throws {RequiredError}
1746
- */
1747
- updateRosterAnswer(id: number, updateParams: RosterAnswerUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<RosterAnswer> {
1748
- return localVarFp.updateRosterAnswer(id, updateParams, options).then((request) => request(axios, basePath));
1749
- },
1750
- };
1751
- };
1752
-
1753
- /**
1754
- * RosterAnswerApi - object-oriented interface
1755
- * @export
1756
- * @class RosterAnswerApi
1757
- * @extends {BaseAPI}
1758
- */
1759
- export class RosterAnswerApi extends BaseAPI {
1760
- /**
1761
- *
1762
- * @summary Create a new roster shift answer
1763
- * @param {RosterAnswerCreateRequest} createParams Roster answer input
1764
- * @param {*} [options] Override http request option.
1765
- * @throws {RequiredError}
1766
- * @memberof RosterAnswerApi
1767
- */
1768
- public createRosterAnswer(createParams: RosterAnswerCreateRequest, options?: RawAxiosRequestConfig) {
1769
- return RosterAnswerApiFp(this.configuration).createRosterAnswer(createParams, options).then((request) => request(this.axios, this.basePath));
1770
- }
1771
-
1772
- /**
1773
- *
1774
- * @summary Updates a roster answer with the new value
1775
- * @param {number} id Roster Answer ID
1776
- * @param {RosterAnswerUpdateRequest} updateParams New answer value
1777
- * @param {*} [options] Override http request option.
1778
- * @throws {RequiredError}
1779
- * @memberof RosterAnswerApi
1780
- */
1781
- public updateRosterAnswer(id: number, updateParams: RosterAnswerUpdateRequest, options?: RawAxiosRequestConfig) {
1782
- return RosterAnswerApiFp(this.configuration).updateRosterAnswer(id, updateParams, options).then((request) => request(this.axios, this.basePath));
1783
- }
1784
- }
1785
-
1786
-
1787
-
1788
- /**
1789
- * RosterShiftApi - axios parameter creator
1790
- * @export
1791
- */
1792
- export const RosterShiftApiAxiosParamCreator = function (configuration?: Configuration) {
1793
- return {
1794
- /**
1795
- *
1796
- * @summary Create a new roster shift
1797
- * @param {RosterShiftCreateRequest} createParams Roster shift input
1798
- * @param {*} [options] Override http request option.
1799
- * @throws {RequiredError}
1800
- */
1801
- createRosterShift: async (createParams: RosterShiftCreateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1802
- // verify required parameter 'createParams' is not null or undefined
1803
- assertParamExists('createRosterShift', 'createParams', createParams)
1804
- const localVarPath = `/roster/shift`;
1805
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1806
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1807
- let baseOptions;
1808
- if (configuration) {
1809
- baseOptions = configuration.baseOptions;
1810
- }
1811
-
1812
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1813
- const localVarHeaderParameter = {} as any;
1814
- const localVarQueryParameter = {} as any;
1815
-
1816
- // authentication BearerAuth required
1817
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1818
-
1819
-
1820
-
1821
- localVarHeaderParameter['Content-Type'] = 'application/json';
1822
-
1823
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1824
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1825
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1826
- localVarRequestOptions.data = serializeDataIfNeeded(createParams, localVarRequestOptions, configuration)
1827
-
1828
- return {
1829
- url: toPathString(localVarUrlObj),
1830
- options: localVarRequestOptions,
1831
- };
1832
- },
1833
- /**
1834
- *
1835
- * @summary Deletes a roster shift
1836
- * @param {number} id Roster Answer ID
1837
- * @param {*} [options] Override http request option.
1838
- * @throws {RequiredError}
1839
- */
1840
- deleteRosterShift: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1841
- // verify required parameter 'id' is not null or undefined
1842
- assertParamExists('deleteRosterShift', 'id', id)
1843
- const localVarPath = `/roster/shift/{id}`
1844
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1845
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1846
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1847
- let baseOptions;
1848
- if (configuration) {
1849
- baseOptions = configuration.baseOptions;
1850
- }
1851
-
1852
- const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
1853
- const localVarHeaderParameter = {} as any;
1854
- const localVarQueryParameter = {} as any;
1855
-
1856
- // authentication BearerAuth required
1857
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1858
-
1859
-
1860
-
1861
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1862
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1863
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1864
-
1865
- return {
1866
- url: toPathString(localVarUrlObj),
1867
- options: localVarRequestOptions,
1868
- };
1869
- },
1870
- }
1871
- };
1872
-
1873
- /**
1874
- * RosterShiftApi - functional programming interface
1875
- * @export
1876
- */
1877
- export const RosterShiftApiFp = function(configuration?: Configuration) {
1878
- const localVarAxiosParamCreator = RosterShiftApiAxiosParamCreator(configuration)
1879
- return {
1880
- /**
1881
- *
1882
- * @summary Create a new roster shift
1883
- * @param {RosterShiftCreateRequest} createParams Roster shift input
1884
- * @param {*} [options] Override http request option.
1885
- * @throws {RequiredError}
1886
- */
1887
- async createRosterShift(createParams: RosterShiftCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RosterShift>> {
1888
- const localVarAxiosArgs = await localVarAxiosParamCreator.createRosterShift(createParams, options);
1889
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1890
- const localVarOperationServerBasePath = operationServerMap['RosterShiftApi.createRosterShift']?.[localVarOperationServerIndex]?.url;
1891
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1892
- },
1893
- /**
1894
- *
1895
- * @summary Deletes a roster shift
1896
- * @param {number} id Roster Answer ID
1897
- * @param {*} [options] Override http request option.
1898
- * @throws {RequiredError}
1899
- */
1900
- async deleteRosterShift(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
1901
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRosterShift(id, options);
1902
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1903
- const localVarOperationServerBasePath = operationServerMap['RosterShiftApi.deleteRosterShift']?.[localVarOperationServerIndex]?.url;
1904
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1905
- },
1906
- }
1907
- };
1908
-
1909
- /**
1910
- * RosterShiftApi - factory interface
1911
- * @export
1912
- */
1913
- export const RosterShiftApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1914
- const localVarFp = RosterShiftApiFp(configuration)
1915
- return {
1916
- /**
1917
- *
1918
- * @summary Create a new roster shift
1919
- * @param {RosterShiftCreateRequest} createParams Roster shift input
1920
- * @param {*} [options] Override http request option.
1921
- * @throws {RequiredError}
1922
- */
1923
- createRosterShift(createParams: RosterShiftCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise<RosterShift> {
1924
- return localVarFp.createRosterShift(createParams, options).then((request) => request(axios, basePath));
1925
- },
1926
- /**
1927
- *
1928
- * @summary Deletes a roster shift
1929
- * @param {number} id Roster Answer ID
1930
- * @param {*} [options] Override http request option.
1931
- * @throws {RequiredError}
1932
- */
1933
- deleteRosterShift(id: number, options?: RawAxiosRequestConfig): AxiosPromise<string> {
1934
- return localVarFp.deleteRosterShift(id, options).then((request) => request(axios, basePath));
1935
- },
1936
- };
1937
- };
1938
-
1939
- /**
1940
- * RosterShiftApi - object-oriented interface
1941
- * @export
1942
- * @class RosterShiftApi
1943
- * @extends {BaseAPI}
1944
- */
1945
- export class RosterShiftApi extends BaseAPI {
1946
- /**
1947
- *
1948
- * @summary Create a new roster shift
1949
- * @param {RosterShiftCreateRequest} createParams Roster shift input
1950
- * @param {*} [options] Override http request option.
1951
- * @throws {RequiredError}
1952
- * @memberof RosterShiftApi
1953
- */
1954
- public createRosterShift(createParams: RosterShiftCreateRequest, options?: RawAxiosRequestConfig) {
1955
- return RosterShiftApiFp(this.configuration).createRosterShift(createParams, options).then((request) => request(this.axios, this.basePath));
1956
- }
1957
-
1958
- /**
1959
- *
1960
- * @summary Deletes a roster shift
1961
- * @param {number} id Roster Answer ID
1962
- * @param {*} [options] Override http request option.
1963
- * @throws {RequiredError}
1964
- * @memberof RosterShiftApi
1965
- */
1966
- public deleteRosterShift(id: number, options?: RawAxiosRequestConfig) {
1967
- return RosterShiftApiFp(this.configuration).deleteRosterShift(id, options).then((request) => request(this.axios, this.basePath));
1968
- }
1969
- }
1970
-
1971
-
1972
-
1973
- /**
1974
- * SavedShiftApi - axios parameter creator
1975
- * @export
1976
- */
1977
- export const SavedShiftApiAxiosParamCreator = function (configuration?: Configuration) {
1978
- return {
1979
- /**
1980
- *
1981
- * @summary Get all saved shifts for a specific roster
1982
- * @param {number} id Roster ID
1983
- * @param {*} [options] Override http request option.
1984
- * @throws {RequiredError}
1985
- */
1986
- getSavedRoster: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1987
- // verify required parameter 'id' is not null or undefined
1988
- assertParamExists('getSavedRoster', 'id', id)
1989
- const localVarPath = `/roster/saved-shift/{id}`
1990
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1991
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1992
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1993
- let baseOptions;
1994
- if (configuration) {
1995
- baseOptions = configuration.baseOptions;
1996
- }
1997
-
1998
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1999
- const localVarHeaderParameter = {} as any;
2000
- const localVarQueryParameter = {} as any;
2001
-
2002
- // authentication BearerAuth required
2003
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2004
-
2005
-
2006
-
2007
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2008
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2009
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2010
-
2011
- return {
2012
- url: toPathString(localVarUrlObj),
2013
- options: localVarRequestOptions,
2014
- };
2015
- },
2016
- /**
2017
- *
2018
- * @summary Save a specific roster
2019
- * @param {number} id Roster ID
2020
- * @param {*} [options] Override http request option.
2021
- * @throws {RequiredError}
2022
- */
2023
- rosterSave: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2024
- // verify required parameter 'id' is not null or undefined
2025
- assertParamExists('rosterSave', 'id', id)
2026
- const localVarPath = `/roster/{id}/save`
2027
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2028
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2029
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2030
- let baseOptions;
2031
- if (configuration) {
2032
- baseOptions = configuration.baseOptions;
2033
- }
2034
-
2035
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2036
- const localVarHeaderParameter = {} as any;
2037
- const localVarQueryParameter = {} as any;
2038
-
2039
- // authentication BearerAuth required
2040
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2041
-
2042
-
2043
-
2044
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2045
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2046
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2047
-
2048
- return {
2049
- url: toPathString(localVarUrlObj),
2050
- options: localVarRequestOptions,
2051
- };
2052
- },
2053
- /**
2054
- *
2055
- * @summary Update a specific saved shift
2056
- * @param {number} id SavedShift ID
2057
- * @param {SavedShiftUpdateRequest} updateParams Update data
2058
- * @param {*} [options] Override http request option.
2059
- * @throws {RequiredError}
2060
- */
2061
- updateSavedShift: async (id: number, updateParams: SavedShiftUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2062
- // verify required parameter 'id' is not null or undefined
2063
- assertParamExists('updateSavedShift', 'id', id)
2064
- // verify required parameter 'updateParams' is not null or undefined
2065
- assertParamExists('updateSavedShift', 'updateParams', updateParams)
2066
- const localVarPath = `/roster/saved-shift/{id}`
2067
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2068
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2069
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2070
- let baseOptions;
2071
- if (configuration) {
2072
- baseOptions = configuration.baseOptions;
2073
- }
2074
-
2075
- const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
2076
- const localVarHeaderParameter = {} as any;
2077
- const localVarQueryParameter = {} as any;
2078
-
2079
- // authentication BearerAuth required
2080
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2081
-
2082
-
2083
-
2084
- localVarHeaderParameter['Content-Type'] = 'application/json';
2085
-
2086
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2087
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2088
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2089
- localVarRequestOptions.data = serializeDataIfNeeded(updateParams, localVarRequestOptions, configuration)
2090
-
2091
- return {
2092
- url: toPathString(localVarUrlObj),
2093
- options: localVarRequestOptions,
2094
- };
2095
- },
2096
- }
2097
- };
2098
-
2099
- /**
2100
- * SavedShiftApi - functional programming interface
2101
- * @export
2102
- */
2103
- export const SavedShiftApiFp = function(configuration?: Configuration) {
2104
- const localVarAxiosParamCreator = SavedShiftApiAxiosParamCreator(configuration)
2105
- return {
2106
- /**
2107
- *
2108
- * @summary Get all saved shifts for a specific roster
2109
- * @param {number} id Roster ID
2110
- * @param {*} [options] Override http request option.
2111
- * @throws {RequiredError}
2112
- */
2113
- async getSavedRoster(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SavedShift>>> {
2114
- const localVarAxiosArgs = await localVarAxiosParamCreator.getSavedRoster(id, options);
2115
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2116
- const localVarOperationServerBasePath = operationServerMap['SavedShiftApi.getSavedRoster']?.[localVarOperationServerIndex]?.url;
2117
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2118
- },
2119
- /**
2120
- *
2121
- * @summary Save a specific roster
2122
- * @param {number} id Roster ID
2123
- * @param {*} [options] Override http request option.
2124
- * @throws {RequiredError}
2125
- */
2126
- async rosterSave(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
2127
- const localVarAxiosArgs = await localVarAxiosParamCreator.rosterSave(id, options);
2128
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2129
- const localVarOperationServerBasePath = operationServerMap['SavedShiftApi.rosterSave']?.[localVarOperationServerIndex]?.url;
2130
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2131
- },
2132
- /**
2133
- *
2134
- * @summary Update a specific saved shift
2135
- * @param {number} id SavedShift ID
2136
- * @param {SavedShiftUpdateRequest} updateParams Update data
2137
- * @param {*} [options] Override http request option.
2138
- * @throws {RequiredError}
2139
- */
2140
- async updateSavedShift(id: number, updateParams: SavedShiftUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SavedShift>> {
2141
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateSavedShift(id, updateParams, options);
2142
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2143
- const localVarOperationServerBasePath = operationServerMap['SavedShiftApi.updateSavedShift']?.[localVarOperationServerIndex]?.url;
2144
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2145
- },
2146
- }
2147
- };
2148
-
2149
- /**
2150
- * SavedShiftApi - factory interface
2151
- * @export
2152
- */
2153
- export const SavedShiftApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2154
- const localVarFp = SavedShiftApiFp(configuration)
2155
- return {
2156
- /**
2157
- *
2158
- * @summary Get all saved shifts for a specific roster
2159
- * @param {number} id Roster ID
2160
- * @param {*} [options] Override http request option.
2161
- * @throws {RequiredError}
2162
- */
2163
- getSavedRoster(id: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<SavedShift>> {
2164
- return localVarFp.getSavedRoster(id, options).then((request) => request(axios, basePath));
2165
- },
2166
- /**
2167
- *
2168
- * @summary Save a specific roster
2169
- * @param {number} id Roster ID
2170
- * @param {*} [options] Override http request option.
2171
- * @throws {RequiredError}
2172
- */
2173
- rosterSave(id: number, options?: RawAxiosRequestConfig): AxiosPromise<string> {
2174
- return localVarFp.rosterSave(id, options).then((request) => request(axios, basePath));
2175
- },
2176
- /**
2177
- *
2178
- * @summary Update a specific saved shift
2179
- * @param {number} id SavedShift ID
2180
- * @param {SavedShiftUpdateRequest} updateParams Update data
2181
- * @param {*} [options] Override http request option.
2182
- * @throws {RequiredError}
2183
- */
2184
- updateSavedShift(id: number, updateParams: SavedShiftUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<SavedShift> {
2185
- return localVarFp.updateSavedShift(id, updateParams, options).then((request) => request(axios, basePath));
2186
- },
2187
- };
2188
- };
2189
-
2190
- /**
2191
- * SavedShiftApi - object-oriented interface
2192
- * @export
2193
- * @class SavedShiftApi
2194
- * @extends {BaseAPI}
2195
- */
2196
- export class SavedShiftApi extends BaseAPI {
2197
- /**
2198
- *
2199
- * @summary Get all saved shifts for a specific roster
2200
- * @param {number} id Roster ID
2201
- * @param {*} [options] Override http request option.
2202
- * @throws {RequiredError}
2203
- * @memberof SavedShiftApi
2204
- */
2205
- public getSavedRoster(id: number, options?: RawAxiosRequestConfig) {
2206
- return SavedShiftApiFp(this.configuration).getSavedRoster(id, options).then((request) => request(this.axios, this.basePath));
2207
- }
2208
-
2209
- /**
2210
- *
2211
- * @summary Save a specific roster
2212
- * @param {number} id Roster ID
2213
- * @param {*} [options] Override http request option.
2214
- * @throws {RequiredError}
2215
- * @memberof SavedShiftApi
2216
- */
2217
- public rosterSave(id: number, options?: RawAxiosRequestConfig) {
2218
- return SavedShiftApiFp(this.configuration).rosterSave(id, options).then((request) => request(this.axios, this.basePath));
2219
- }
2220
-
2221
- /**
2222
- *
2223
- * @summary Update a specific saved shift
2224
- * @param {number} id SavedShift ID
2225
- * @param {SavedShiftUpdateRequest} updateParams Update data
2226
- * @param {*} [options] Override http request option.
2227
- * @throws {RequiredError}
2228
- * @memberof SavedShiftApi
2229
- */
2230
- public updateSavedShift(id: number, updateParams: SavedShiftUpdateRequest, options?: RawAxiosRequestConfig) {
2231
- return SavedShiftApiFp(this.configuration).updateSavedShift(id, updateParams, options).then((request) => request(this.axios, this.basePath));
2232
- }
2233
- }
2234
-
2235
-
2236
-
2237
- /**
2238
- * UserApi - axios parameter creator
2239
- * @export
2240
- */
2241
- export const UserApiAxiosParamCreator = function (configuration?: Configuration) {
2242
- return {
2243
- /**
2244
- * create user
2245
- * @summary CreateRoster a new user
2246
- * @param {UserCreateRequest} createParams User input
2247
- * @param {*} [options] Override http request option.
2248
- * @throws {RequiredError}
2249
- */
2250
- userCreatePost: async (createParams: UserCreateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2251
- // verify required parameter 'createParams' is not null or undefined
2252
- assertParamExists('userCreatePost', 'createParams', createParams)
2253
- const localVarPath = `/user/create`;
2254
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2255
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2256
- let baseOptions;
2257
- if (configuration) {
2258
- baseOptions = configuration.baseOptions;
2259
- }
2260
-
2261
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2262
- const localVarHeaderParameter = {} as any;
2263
- const localVarQueryParameter = {} as any;
2264
-
2265
- // authentication BearerAuth required
2266
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2267
-
2268
-
2269
-
2270
- localVarHeaderParameter['Content-Type'] = 'application/json';
2271
-
2272
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2273
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2274
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2275
- localVarRequestOptions.data = serializeDataIfNeeded(createParams, localVarRequestOptions, configuration)
2276
-
2277
- return {
2278
- url: toPathString(localVarUrlObj),
2279
- options: localVarRequestOptions,
2280
- };
2281
- },
2282
- /**
2283
- * Retrieve a list of users with optional query parameter filtering
2284
- * @summary Get all users with optional filtering
2285
- * @param {number} [organId] Organ ID
2286
- * @param {number} [gewisId] GEWIS ID
2287
- * @param {*} [options] Override http request option.
2288
- * @throws {RequiredError}
2289
- */
2290
- userGet: async (organId?: number, gewisId?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2291
- const localVarPath = `/user/`;
2292
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2293
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2294
- let baseOptions;
2295
- if (configuration) {
2296
- baseOptions = configuration.baseOptions;
2297
- }
2298
-
2299
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2300
- const localVarHeaderParameter = {} as any;
2301
- const localVarQueryParameter = {} as any;
2302
-
2303
- // authentication BearerAuth required
2304
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2305
-
2306
- if (organId !== undefined) {
2307
- localVarQueryParameter['organId'] = organId;
2308
- }
2309
-
2310
- if (gewisId !== undefined) {
2311
- localVarQueryParameter['gewisId'] = gewisId;
2312
- }
2313
-
2314
-
2315
-
2316
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2317
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2318
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2319
-
2320
- return {
2321
- url: toPathString(localVarUrlObj),
2322
- options: localVarRequestOptions,
2323
- };
2324
- },
2325
- /**
2326
- *
2327
- * @summary DeleteRoster a user
2328
- * @param {number} id User ID
2329
- * @param {*} [options] Override http request option.
2330
- * @throws {RequiredError}
2331
- */
2332
- userIdDelete: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2333
- // verify required parameter 'id' is not null or undefined
2334
- assertParamExists('userIdDelete', 'id', id)
2335
- const localVarPath = `/user/{id}`
2336
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2337
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2338
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2339
- let baseOptions;
2340
- if (configuration) {
2341
- baseOptions = configuration.baseOptions;
2342
- }
2343
-
2344
- const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
2345
- const localVarHeaderParameter = {} as any;
2346
- const localVarQueryParameter = {} as any;
2347
-
2348
- // authentication BearerAuth required
2349
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2350
-
2351
-
2352
-
2353
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2354
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2355
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2356
-
2357
- return {
2358
- url: toPathString(localVarUrlObj),
2359
- options: localVarRequestOptions,
2360
- };
2361
- },
2362
- /**
2363
- * Retrieve a specific user by their unique ID
2364
- * @summary Get user by ID
2365
- * @param {number} id User ID
2366
- * @param {*} [options] Override http request option.
2367
- * @throws {RequiredError}
2368
- */
2369
- userIdGet: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2370
- // verify required parameter 'id' is not null or undefined
2371
- assertParamExists('userIdGet', 'id', id)
2372
- const localVarPath = `/user/{id}`
2373
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2374
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2375
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2376
- let baseOptions;
2377
- if (configuration) {
2378
- baseOptions = configuration.baseOptions;
2379
- }
2380
-
2381
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2382
- const localVarHeaderParameter = {} as any;
2383
- const localVarQueryParameter = {} as any;
2384
-
2385
- // authentication BearerAuth required
2386
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2387
-
2388
-
2389
-
2390
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2391
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2392
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2393
-
2394
- return {
2395
- url: toPathString(localVarUrlObj),
2396
- options: localVarRequestOptions,
2397
- };
2398
- },
2399
- }
2400
- };
2401
-
2402
- /**
2403
- * UserApi - functional programming interface
2404
- * @export
2405
- */
2406
- export const UserApiFp = function(configuration?: Configuration) {
2407
- const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration)
2408
- return {
2409
- /**
2410
- * create user
2411
- * @summary CreateRoster a new user
2412
- * @param {UserCreateRequest} createParams User input
2413
- * @param {*} [options] Override http request option.
2414
- * @throws {RequiredError}
2415
- */
2416
- async userCreatePost(createParams: UserCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
2417
- const localVarAxiosArgs = await localVarAxiosParamCreator.userCreatePost(createParams, options);
2418
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2419
- const localVarOperationServerBasePath = operationServerMap['UserApi.userCreatePost']?.[localVarOperationServerIndex]?.url;
2420
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2421
- },
2422
- /**
2423
- * Retrieve a list of users with optional query parameter filtering
2424
- * @summary Get all users with optional filtering
2425
- * @param {number} [organId] Organ ID
2426
- * @param {number} [gewisId] GEWIS ID
2427
- * @param {*} [options] Override http request option.
2428
- * @throws {RequiredError}
2429
- */
2430
- async userGet(organId?: number, gewisId?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<User>>> {
2431
- const localVarAxiosArgs = await localVarAxiosParamCreator.userGet(organId, gewisId, options);
2432
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2433
- const localVarOperationServerBasePath = operationServerMap['UserApi.userGet']?.[localVarOperationServerIndex]?.url;
2434
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2435
- },
2436
- /**
2437
- *
2438
- * @summary DeleteRoster a user
2439
- * @param {number} id User ID
2440
- * @param {*} [options] Override http request option.
2441
- * @throws {RequiredError}
2442
- */
2443
- async userIdDelete(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
2444
- const localVarAxiosArgs = await localVarAxiosParamCreator.userIdDelete(id, options);
2445
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2446
- const localVarOperationServerBasePath = operationServerMap['UserApi.userIdDelete']?.[localVarOperationServerIndex]?.url;
2447
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2448
- },
2449
- /**
2450
- * Retrieve a specific user by their unique ID
2451
- * @summary Get user by ID
2452
- * @param {number} id User ID
2453
- * @param {*} [options] Override http request option.
2454
- * @throws {RequiredError}
2455
- */
2456
- async userIdGet(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
2457
- const localVarAxiosArgs = await localVarAxiosParamCreator.userIdGet(id, options);
2458
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2459
- const localVarOperationServerBasePath = operationServerMap['UserApi.userIdGet']?.[localVarOperationServerIndex]?.url;
2460
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2461
- },
2462
- }
2463
- };
2464
-
2465
- /**
2466
- * UserApi - factory interface
2467
- * @export
2468
- */
2469
- export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2470
- const localVarFp = UserApiFp(configuration)
2471
- return {
2472
- /**
2473
- * create user
2474
- * @summary CreateRoster a new user
2475
- * @param {UserCreateRequest} createParams User input
2476
- * @param {*} [options] Override http request option.
2477
- * @throws {RequiredError}
2478
- */
2479
- userCreatePost(createParams: UserCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise<User> {
2480
- return localVarFp.userCreatePost(createParams, options).then((request) => request(axios, basePath));
2481
- },
2482
- /**
2483
- * Retrieve a list of users with optional query parameter filtering
2484
- * @summary Get all users with optional filtering
2485
- * @param {number} [organId] Organ ID
2486
- * @param {number} [gewisId] GEWIS ID
2487
- * @param {*} [options] Override http request option.
2488
- * @throws {RequiredError}
2489
- */
2490
- userGet(organId?: number, gewisId?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<User>> {
2491
- return localVarFp.userGet(organId, gewisId, options).then((request) => request(axios, basePath));
2492
- },
2493
- /**
2494
- *
2495
- * @summary DeleteRoster a user
2496
- * @param {number} id User ID
2497
- * @param {*} [options] Override http request option.
2498
- * @throws {RequiredError}
2499
- */
2500
- userIdDelete(id: number, options?: RawAxiosRequestConfig): AxiosPromise<string> {
2501
- return localVarFp.userIdDelete(id, options).then((request) => request(axios, basePath));
2502
- },
2503
- /**
2504
- * Retrieve a specific user by their unique ID
2505
- * @summary Get user by ID
2506
- * @param {number} id User ID
2507
- * @param {*} [options] Override http request option.
2508
- * @throws {RequiredError}
2509
- */
2510
- userIdGet(id: number, options?: RawAxiosRequestConfig): AxiosPromise<User> {
2511
- return localVarFp.userIdGet(id, options).then((request) => request(axios, basePath));
2512
- },
2513
- };
2514
- };
2515
-
2516
- /**
2517
- * UserApi - object-oriented interface
2518
- * @export
2519
- * @class UserApi
2520
- * @extends {BaseAPI}
2521
- */
2522
- export class UserApi extends BaseAPI {
2523
- /**
2524
- * create user
2525
- * @summary CreateRoster a new user
2526
- * @param {UserCreateRequest} createParams User input
2527
- * @param {*} [options] Override http request option.
2528
- * @throws {RequiredError}
2529
- * @memberof UserApi
2530
- */
2531
- public userCreatePost(createParams: UserCreateRequest, options?: RawAxiosRequestConfig) {
2532
- return UserApiFp(this.configuration).userCreatePost(createParams, options).then((request) => request(this.axios, this.basePath));
2533
- }
2534
-
2535
- /**
2536
- * Retrieve a list of users with optional query parameter filtering
2537
- * @summary Get all users with optional filtering
2538
- * @param {number} [organId] Organ ID
2539
- * @param {number} [gewisId] GEWIS ID
2540
- * @param {*} [options] Override http request option.
2541
- * @throws {RequiredError}
2542
- * @memberof UserApi
2543
- */
2544
- public userGet(organId?: number, gewisId?: number, options?: RawAxiosRequestConfig) {
2545
- return UserApiFp(this.configuration).userGet(organId, gewisId, options).then((request) => request(this.axios, this.basePath));
2546
- }
2547
-
2548
- /**
2549
- *
2550
- * @summary DeleteRoster a user
2551
- * @param {number} id User ID
2552
- * @param {*} [options] Override http request option.
2553
- * @throws {RequiredError}
2554
- * @memberof UserApi
2555
- */
2556
- public userIdDelete(id: number, options?: RawAxiosRequestConfig) {
2557
- return UserApiFp(this.configuration).userIdDelete(id, options).then((request) => request(this.axios, this.basePath));
2558
- }
2559
-
2560
- /**
2561
- * Retrieve a specific user by their unique ID
2562
- * @summary Get user by ID
2563
- * @param {number} id User ID
2564
- * @param {*} [options] Override http request option.
2565
- * @throws {RequiredError}
2566
- * @memberof UserApi
2567
- */
2568
- public userIdGet(id: number, options?: RawAxiosRequestConfig) {
2569
- return UserApiFp(this.configuration).userIdGet(id, options).then((request) => request(this.axios, this.basePath));
2570
- }
2571
- }
2572
-
2573
-
2574
-