@gewis/grooster-backend-ts 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/api.ts ADDED
@@ -0,0 +1,3454 @@
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
+ import type { Configuration } from "./configuration";
16
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios";
17
+ import globalAxios from "axios";
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import {
21
+ DUMMY_BASE_URL,
22
+ assertParamExists,
23
+ setApiKeyToObject,
24
+ setBasicAuthToObject,
25
+ setBearerAuthToObject,
26
+ setOAuthToObject,
27
+ setSearchParams,
28
+ serializeDataIfNeeded,
29
+ toPathString,
30
+ createRequestFunction,
31
+ } from "./common";
32
+ import type { RequestArgs } from "./base";
33
+ // @ts-ignore
34
+ import {
35
+ BASE_PATH,
36
+ COLLECTION_FORMATS,
37
+ BaseAPI,
38
+ RequiredError,
39
+ operationServerMap,
40
+ } from "./base";
41
+
42
+ /**
43
+ *
44
+ * @export
45
+ * @interface GormDeletedAt
46
+ */
47
+ export interface GormDeletedAt {
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof GormDeletedAt
52
+ */
53
+ time?: string;
54
+ /**
55
+ * Valid is true if Time is not NULL
56
+ * @type {boolean}
57
+ * @memberof GormDeletedAt
58
+ */
59
+ valid?: boolean;
60
+ }
61
+ /**
62
+ * An organ that users can be part of.
63
+ * @export
64
+ * @interface Organ
65
+ */
66
+ export interface Organ {
67
+ /**
68
+ *
69
+ * @type {string}
70
+ * @memberof Organ
71
+ */
72
+ createdAt?: string;
73
+ /**
74
+ *
75
+ * @type {GormDeletedAt}
76
+ * @memberof Organ
77
+ */
78
+ deletedAt?: GormDeletedAt;
79
+ /**
80
+ *
81
+ * @type {number}
82
+ * @memberof Organ
83
+ */
84
+ id?: number;
85
+ /**
86
+ *
87
+ * @type {string}
88
+ * @memberof Organ
89
+ */
90
+ name?: string;
91
+ /**
92
+ *
93
+ * @type {string}
94
+ * @memberof Organ
95
+ */
96
+ updatedAt?: string;
97
+ /**
98
+ *
99
+ * @type {Array<User>}
100
+ * @memberof Organ
101
+ */
102
+ users?: Array<User>;
103
+ }
104
+ /**
105
+ *
106
+ * @export
107
+ * @interface Roster
108
+ */
109
+ export interface Roster {
110
+ /**
111
+ *
112
+ * @type {string}
113
+ * @memberof Roster
114
+ */
115
+ createdAt?: string;
116
+ /**
117
+ *
118
+ * @type {string}
119
+ * @memberof Roster
120
+ */
121
+ date?: string;
122
+ /**
123
+ *
124
+ * @type {GormDeletedAt}
125
+ * @memberof Roster
126
+ */
127
+ deletedAt?: GormDeletedAt;
128
+ /**
129
+ *
130
+ * @type {number}
131
+ * @memberof Roster
132
+ */
133
+ id?: number;
134
+ /**
135
+ *
136
+ * @type {string}
137
+ * @memberof Roster
138
+ */
139
+ name?: string;
140
+ /**
141
+ *
142
+ * @type {Organ}
143
+ * @memberof Roster
144
+ */
145
+ organ?: Organ;
146
+ /**
147
+ *
148
+ * @type {number}
149
+ * @memberof Roster
150
+ */
151
+ organId?: number;
152
+ /**
153
+ *
154
+ * @type {Array<RosterAnswer>}
155
+ * @memberof Roster
156
+ */
157
+ rosterAnswer?: Array<RosterAnswer>;
158
+ /**
159
+ *
160
+ * @type {Array<RosterShift>}
161
+ * @memberof Roster
162
+ */
163
+ rosterShift?: Array<RosterShift>;
164
+ /**
165
+ *
166
+ * @type {boolean}
167
+ * @memberof Roster
168
+ */
169
+ saved?: boolean;
170
+ /**
171
+ *
172
+ * @type {string}
173
+ * @memberof Roster
174
+ */
175
+ updatedAt?: string;
176
+ /**
177
+ *
178
+ * @type {Array<string>}
179
+ * @memberof Roster
180
+ */
181
+ values?: Array<string>;
182
+ }
183
+ /**
184
+ *
185
+ * @export
186
+ * @interface RosterAnswer
187
+ */
188
+ export interface RosterAnswer {
189
+ /**
190
+ *
191
+ * @type {string}
192
+ * @memberof RosterAnswer
193
+ */
194
+ createdAt?: string;
195
+ /**
196
+ *
197
+ * @type {GormDeletedAt}
198
+ * @memberof RosterAnswer
199
+ */
200
+ deletedAt?: GormDeletedAt;
201
+ /**
202
+ *
203
+ * @type {number}
204
+ * @memberof RosterAnswer
205
+ */
206
+ id?: number;
207
+ /**
208
+ *
209
+ * @type {number}
210
+ * @memberof RosterAnswer
211
+ */
212
+ rosterId?: number;
213
+ /**
214
+ *
215
+ * @type {number}
216
+ * @memberof RosterAnswer
217
+ */
218
+ rosterShiftId?: number;
219
+ /**
220
+ *
221
+ * @type {string}
222
+ * @memberof RosterAnswer
223
+ */
224
+ updatedAt?: string;
225
+ /**
226
+ *
227
+ * @type {number}
228
+ * @memberof RosterAnswer
229
+ */
230
+ userId?: number;
231
+ /**
232
+ *
233
+ * @type {string}
234
+ * @memberof RosterAnswer
235
+ */
236
+ value?: string;
237
+ }
238
+ /**
239
+ *
240
+ * @export
241
+ * @interface RosterAnswerCreateRequest
242
+ */
243
+ export interface RosterAnswerCreateRequest {
244
+ /**
245
+ *
246
+ * @type {number}
247
+ * @memberof RosterAnswerCreateRequest
248
+ */
249
+ rosterId?: number;
250
+ /**
251
+ *
252
+ * @type {number}
253
+ * @memberof RosterAnswerCreateRequest
254
+ */
255
+ rosterShiftId?: number;
256
+ /**
257
+ *
258
+ * @type {number}
259
+ * @memberof RosterAnswerCreateRequest
260
+ */
261
+ userId?: number;
262
+ /**
263
+ *
264
+ * @type {string}
265
+ * @memberof RosterAnswerCreateRequest
266
+ */
267
+ value?: string;
268
+ }
269
+ /**
270
+ *
271
+ * @export
272
+ * @interface RosterAnswerUpdateRequest
273
+ */
274
+ export interface RosterAnswerUpdateRequest {
275
+ /**
276
+ *
277
+ * @type {string}
278
+ * @memberof RosterAnswerUpdateRequest
279
+ */
280
+ value?: string;
281
+ }
282
+ /**
283
+ *
284
+ * @export
285
+ * @interface RosterCreateRequest
286
+ */
287
+ export interface RosterCreateRequest {
288
+ /**
289
+ *
290
+ * @type {string}
291
+ * @memberof RosterCreateRequest
292
+ */
293
+ date?: string;
294
+ /**
295
+ *
296
+ * @type {string}
297
+ * @memberof RosterCreateRequest
298
+ */
299
+ name?: string;
300
+ /**
301
+ *
302
+ * @type {number}
303
+ * @memberof RosterCreateRequest
304
+ */
305
+ organId?: number;
306
+ /**
307
+ *
308
+ * @type {Array<string>}
309
+ * @memberof RosterCreateRequest
310
+ */
311
+ shifts?: Array<string>;
312
+ }
313
+ /**
314
+ *
315
+ * @export
316
+ * @interface RosterShift
317
+ */
318
+ export interface RosterShift {
319
+ /**
320
+ *
321
+ * @type {string}
322
+ * @memberof RosterShift
323
+ */
324
+ createdAt?: string;
325
+ /**
326
+ *
327
+ * @type {GormDeletedAt}
328
+ * @memberof RosterShift
329
+ */
330
+ deletedAt?: GormDeletedAt;
331
+ /**
332
+ *
333
+ * @type {number}
334
+ * @memberof RosterShift
335
+ */
336
+ id?: number;
337
+ /**
338
+ *
339
+ * @type {string}
340
+ * @memberof RosterShift
341
+ */
342
+ name?: string;
343
+ /**
344
+ *
345
+ * @type {number}
346
+ * @memberof RosterShift
347
+ */
348
+ rosterId?: number;
349
+ /**
350
+ *
351
+ * @type {string}
352
+ * @memberof RosterShift
353
+ */
354
+ updatedAt?: string;
355
+ }
356
+ /**
357
+ *
358
+ * @export
359
+ * @interface RosterShiftCreateRequest
360
+ */
361
+ export interface RosterShiftCreateRequest {
362
+ /**
363
+ *
364
+ * @type {string}
365
+ * @memberof RosterShiftCreateRequest
366
+ */
367
+ name?: string;
368
+ /**
369
+ *
370
+ * @type {number}
371
+ * @memberof RosterShiftCreateRequest
372
+ */
373
+ rosterId?: number;
374
+ }
375
+ /**
376
+ *
377
+ * @export
378
+ * @interface RosterTemplate
379
+ */
380
+ export interface RosterTemplate {
381
+ /**
382
+ *
383
+ * @type {string}
384
+ * @memberof RosterTemplate
385
+ */
386
+ createdAt?: string;
387
+ /**
388
+ *
389
+ * @type {GormDeletedAt}
390
+ * @memberof RosterTemplate
391
+ */
392
+ deletedAt?: GormDeletedAt;
393
+ /**
394
+ *
395
+ * @type {number}
396
+ * @memberof RosterTemplate
397
+ */
398
+ id?: number;
399
+ /**
400
+ *
401
+ * @type {number}
402
+ * @memberof RosterTemplate
403
+ */
404
+ organId?: number;
405
+ /**
406
+ *
407
+ * @type {Array<string>}
408
+ * @memberof RosterTemplate
409
+ */
410
+ shifts?: Array<string>;
411
+ /**
412
+ *
413
+ * @type {string}
414
+ * @memberof RosterTemplate
415
+ */
416
+ updatedAt?: string;
417
+ }
418
+ /**
419
+ *
420
+ * @export
421
+ * @interface RosterTemplateCreateRequest
422
+ */
423
+ export interface RosterTemplateCreateRequest {
424
+ /**
425
+ *
426
+ * @type {number}
427
+ * @memberof RosterTemplateCreateRequest
428
+ */
429
+ organId?: number;
430
+ /**
431
+ *
432
+ * @type {Array<string>}
433
+ * @memberof RosterTemplateCreateRequest
434
+ */
435
+ shifts?: Array<string>;
436
+ }
437
+ /**
438
+ *
439
+ * @export
440
+ * @interface RosterUpdateRequest
441
+ */
442
+ export interface RosterUpdateRequest {
443
+ /**
444
+ *
445
+ * @type {string}
446
+ * @memberof RosterUpdateRequest
447
+ */
448
+ date?: string;
449
+ /**
450
+ *
451
+ * @type {string}
452
+ * @memberof RosterUpdateRequest
453
+ */
454
+ name?: string;
455
+ }
456
+ /**
457
+ *
458
+ * @export
459
+ * @interface SavedShift
460
+ */
461
+ export interface SavedShift {
462
+ /**
463
+ *
464
+ * @type {string}
465
+ * @memberof SavedShift
466
+ */
467
+ createdAt?: string;
468
+ /**
469
+ *
470
+ * @type {GormDeletedAt}
471
+ * @memberof SavedShift
472
+ */
473
+ deletedAt?: GormDeletedAt;
474
+ /**
475
+ *
476
+ * @type {number}
477
+ * @memberof SavedShift
478
+ */
479
+ id?: number;
480
+ /**
481
+ *
482
+ * @type {number}
483
+ * @memberof SavedShift
484
+ */
485
+ rosterId?: number;
486
+ /**
487
+ *
488
+ * @type {RosterShift}
489
+ * @memberof SavedShift
490
+ */
491
+ rosterShift?: RosterShift;
492
+ /**
493
+ *
494
+ * @type {number}
495
+ * @memberof SavedShift
496
+ */
497
+ rosterShiftId?: number;
498
+ /**
499
+ *
500
+ * @type {string}
501
+ * @memberof SavedShift
502
+ */
503
+ updatedAt?: string;
504
+ /**
505
+ *
506
+ * @type {Array<User>}
507
+ * @memberof SavedShift
508
+ */
509
+ users?: Array<User>;
510
+ }
511
+ /**
512
+ *
513
+ * @export
514
+ * @interface SavedShiftUpdateRequest
515
+ */
516
+ export interface SavedShiftUpdateRequest {
517
+ /**
518
+ *
519
+ * @type {Array<number>}
520
+ * @memberof SavedShiftUpdateRequest
521
+ */
522
+ users?: Array<number>;
523
+ }
524
+ /**
525
+ *
526
+ * @export
527
+ * @interface User
528
+ */
529
+ export interface User {
530
+ /**
531
+ *
532
+ * @type {string}
533
+ * @memberof User
534
+ */
535
+ createdAt?: string;
536
+ /**
537
+ *
538
+ * @type {GormDeletedAt}
539
+ * @memberof User
540
+ */
541
+ deletedAt?: GormDeletedAt;
542
+ /**
543
+ *
544
+ * @type {number}
545
+ * @memberof User
546
+ */
547
+ gewis_id?: number;
548
+ /**
549
+ *
550
+ * @type {number}
551
+ * @memberof User
552
+ */
553
+ id?: number;
554
+ /**
555
+ *
556
+ * @type {string}
557
+ * @memberof User
558
+ */
559
+ name?: string;
560
+ /**
561
+ *
562
+ * @type {Array<Organ>}
563
+ * @memberof User
564
+ */
565
+ organs?: Array<Organ>;
566
+ /**
567
+ *
568
+ * @type {string}
569
+ * @memberof User
570
+ */
571
+ updatedAt?: string;
572
+ }
573
+ /**
574
+ *
575
+ * @export
576
+ * @interface UserCreateRequest
577
+ */
578
+ export interface UserCreateRequest {
579
+ /**
580
+ *
581
+ * @type {number}
582
+ * @memberof UserCreateRequest
583
+ */
584
+ gewisid?: number;
585
+ /**
586
+ *
587
+ * @type {string}
588
+ * @memberof UserCreateRequest
589
+ */
590
+ name?: string;
591
+ /**
592
+ *
593
+ * @type {Array<Organ>}
594
+ * @memberof UserCreateRequest
595
+ */
596
+ organs?: Array<Organ>;
597
+ }
598
+
599
+ /**
600
+ * AuthApi - axios parameter creator
601
+ * @export
602
+ */
603
+ export const AuthApiAxiosParamCreator = function (
604
+ configuration?: Configuration,
605
+ ) {
606
+ return {
607
+ /**
608
+ * Validates state, exchanges code for token, and returns user info
609
+ * @summary Handle OAuth2 Callback
610
+ * @param {string} state State returned from provider
611
+ * @param {string} code Authorization code from provider
612
+ * @param {*} [options] Override http request option.
613
+ * @throws {RequiredError}
614
+ */
615
+ authCallbackGet: async (
616
+ state: string,
617
+ code: string,
618
+ options: RawAxiosRequestConfig = {},
619
+ ): Promise<RequestArgs> => {
620
+ // verify required parameter 'state' is not null or undefined
621
+ assertParamExists("authCallbackGet", "state", state);
622
+ // verify required parameter 'code' is not null or undefined
623
+ assertParamExists("authCallbackGet", "code", code);
624
+ const localVarPath = `/auth/callback`;
625
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
626
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
627
+ let baseOptions;
628
+ if (configuration) {
629
+ baseOptions = configuration.baseOptions;
630
+ }
631
+
632
+ const localVarRequestOptions = {
633
+ method: "GET",
634
+ ...baseOptions,
635
+ ...options,
636
+ };
637
+ const localVarHeaderParameter = {} as any;
638
+ const localVarQueryParameter = {} as any;
639
+
640
+ if (state !== undefined) {
641
+ localVarQueryParameter["state"] = state;
642
+ }
643
+
644
+ if (code !== undefined) {
645
+ localVarQueryParameter["code"] = code;
646
+ }
647
+
648
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
649
+ let headersFromBaseOptions =
650
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
651
+ localVarRequestOptions.headers = {
652
+ ...localVarHeaderParameter,
653
+ ...headersFromBaseOptions,
654
+ ...options.headers,
655
+ };
656
+
657
+ return {
658
+ url: toPathString(localVarUrlObj),
659
+ options: localVarRequestOptions,
660
+ };
661
+ },
662
+ /**
663
+ * Generates state, sets a cookie, and redirects to Google OIDC
664
+ * @summary Redirect to OIDC provider
665
+ * @param {string} state State returned from provider
666
+ * @param {*} [options] Override http request option.
667
+ * @throws {RequiredError}
668
+ */
669
+ authRedirectGet: async (
670
+ state: string,
671
+ options: RawAxiosRequestConfig = {},
672
+ ): Promise<RequestArgs> => {
673
+ // verify required parameter 'state' is not null or undefined
674
+ assertParamExists("authRedirectGet", "state", state);
675
+ const localVarPath = `/auth/redirect`;
676
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
677
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
678
+ let baseOptions;
679
+ if (configuration) {
680
+ baseOptions = configuration.baseOptions;
681
+ }
682
+
683
+ const localVarRequestOptions = {
684
+ method: "GET",
685
+ ...baseOptions,
686
+ ...options,
687
+ };
688
+ const localVarHeaderParameter = {} as any;
689
+ const localVarQueryParameter = {} as any;
690
+
691
+ if (state !== undefined) {
692
+ localVarQueryParameter["state"] = state;
693
+ }
694
+
695
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
696
+ let headersFromBaseOptions =
697
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
698
+ localVarRequestOptions.headers = {
699
+ ...localVarHeaderParameter,
700
+ ...headersFromBaseOptions,
701
+ ...options.headers,
702
+ };
703
+
704
+ return {
705
+ url: toPathString(localVarUrlObj),
706
+ options: localVarRequestOptions,
707
+ };
708
+ },
709
+ };
710
+ };
711
+
712
+ /**
713
+ * AuthApi - functional programming interface
714
+ * @export
715
+ */
716
+ export const AuthApiFp = function (configuration?: Configuration) {
717
+ const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration);
718
+ return {
719
+ /**
720
+ * Validates state, exchanges code for token, and returns user info
721
+ * @summary Handle OAuth2 Callback
722
+ * @param {string} state State returned from provider
723
+ * @param {string} code Authorization code from provider
724
+ * @param {*} [options] Override http request option.
725
+ * @throws {RequiredError}
726
+ */
727
+ async authCallbackGet(
728
+ state: string,
729
+ code: string,
730
+ options?: RawAxiosRequestConfig,
731
+ ): Promise<
732
+ (
733
+ axios?: AxiosInstance,
734
+ basePath?: string,
735
+ ) => AxiosPromise<{ [key: string]: string }>
736
+ > {
737
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authCallbackGet(
738
+ state,
739
+ code,
740
+ options,
741
+ );
742
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
743
+ const localVarOperationServerBasePath =
744
+ operationServerMap["AuthApi.authCallbackGet"]?.[
745
+ localVarOperationServerIndex
746
+ ]?.url;
747
+ return (axios, basePath) =>
748
+ createRequestFunction(
749
+ localVarAxiosArgs,
750
+ globalAxios,
751
+ BASE_PATH,
752
+ configuration,
753
+ )(axios, localVarOperationServerBasePath || basePath);
754
+ },
755
+ /**
756
+ * Generates state, sets a cookie, and redirects to Google OIDC
757
+ * @summary Redirect to OIDC provider
758
+ * @param {string} state State returned from provider
759
+ * @param {*} [options] Override http request option.
760
+ * @throws {RequiredError}
761
+ */
762
+ async authRedirectGet(
763
+ state: string,
764
+ options?: RawAxiosRequestConfig,
765
+ ): Promise<
766
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>
767
+ > {
768
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authRedirectGet(
769
+ state,
770
+ options,
771
+ );
772
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
773
+ const localVarOperationServerBasePath =
774
+ operationServerMap["AuthApi.authRedirectGet"]?.[
775
+ localVarOperationServerIndex
776
+ ]?.url;
777
+ return (axios, basePath) =>
778
+ createRequestFunction(
779
+ localVarAxiosArgs,
780
+ globalAxios,
781
+ BASE_PATH,
782
+ configuration,
783
+ )(axios, localVarOperationServerBasePath || basePath);
784
+ },
785
+ };
786
+ };
787
+
788
+ /**
789
+ * AuthApi - factory interface
790
+ * @export
791
+ */
792
+ export const AuthApiFactory = function (
793
+ configuration?: Configuration,
794
+ basePath?: string,
795
+ axios?: AxiosInstance,
796
+ ) {
797
+ const localVarFp = AuthApiFp(configuration);
798
+ return {
799
+ /**
800
+ * Validates state, exchanges code for token, and returns user info
801
+ * @summary Handle OAuth2 Callback
802
+ * @param {string} state State returned from provider
803
+ * @param {string} code Authorization code from provider
804
+ * @param {*} [options] Override http request option.
805
+ * @throws {RequiredError}
806
+ */
807
+ authCallbackGet(
808
+ state: string,
809
+ code: string,
810
+ options?: RawAxiosRequestConfig,
811
+ ): AxiosPromise<{ [key: string]: string }> {
812
+ return localVarFp
813
+ .authCallbackGet(state, code, options)
814
+ .then((request) => request(axios, basePath));
815
+ },
816
+ /**
817
+ * Generates state, sets a cookie, and redirects to Google OIDC
818
+ * @summary Redirect to OIDC provider
819
+ * @param {string} state State returned from provider
820
+ * @param {*} [options] Override http request option.
821
+ * @throws {RequiredError}
822
+ */
823
+ authRedirectGet(
824
+ state: string,
825
+ options?: RawAxiosRequestConfig,
826
+ ): AxiosPromise<string> {
827
+ return localVarFp
828
+ .authRedirectGet(state, options)
829
+ .then((request) => request(axios, basePath));
830
+ },
831
+ };
832
+ };
833
+
834
+ /**
835
+ * AuthApi - object-oriented interface
836
+ * @export
837
+ * @class AuthApi
838
+ * @extends {BaseAPI}
839
+ */
840
+ export class AuthApi extends BaseAPI {
841
+ /**
842
+ * Validates state, exchanges code for token, and returns user info
843
+ * @summary Handle OAuth2 Callback
844
+ * @param {string} state State returned from provider
845
+ * @param {string} code Authorization code from provider
846
+ * @param {*} [options] Override http request option.
847
+ * @throws {RequiredError}
848
+ * @memberof AuthApi
849
+ */
850
+ public authCallbackGet(
851
+ state: string,
852
+ code: string,
853
+ options?: RawAxiosRequestConfig,
854
+ ) {
855
+ return AuthApiFp(this.configuration)
856
+ .authCallbackGet(state, code, options)
857
+ .then((request) => request(this.axios, this.basePath));
858
+ }
859
+
860
+ /**
861
+ * Generates state, sets a cookie, and redirects to Google OIDC
862
+ * @summary Redirect to OIDC provider
863
+ * @param {string} state State returned from provider
864
+ * @param {*} [options] Override http request option.
865
+ * @throws {RequiredError}
866
+ * @memberof AuthApi
867
+ */
868
+ public authRedirectGet(state: string, options?: RawAxiosRequestConfig) {
869
+ return AuthApiFp(this.configuration)
870
+ .authRedirectGet(state, options)
871
+ .then((request) => request(this.axios, this.basePath));
872
+ }
873
+ }
874
+
875
+ /**
876
+ * RosterApi - axios parameter creator
877
+ * @export
878
+ */
879
+ export const RosterApiAxiosParamCreator = function (
880
+ configuration?: Configuration,
881
+ ) {
882
+ return {
883
+ /**
884
+ *
885
+ * @summary CreateRoster a new roster
886
+ * @param {RosterCreateRequest} createParams Roster input
887
+ * @param {*} [options] Override http request option.
888
+ * @throws {RequiredError}
889
+ */
890
+ createRoster: async (
891
+ createParams: RosterCreateRequest,
892
+ options: RawAxiosRequestConfig = {},
893
+ ): Promise<RequestArgs> => {
894
+ // verify required parameter 'createParams' is not null or undefined
895
+ assertParamExists("createRoster", "createParams", createParams);
896
+ const localVarPath = `/roster`;
897
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
898
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
899
+ let baseOptions;
900
+ if (configuration) {
901
+ baseOptions = configuration.baseOptions;
902
+ }
903
+
904
+ const localVarRequestOptions = {
905
+ method: "POST",
906
+ ...baseOptions,
907
+ ...options,
908
+ };
909
+ const localVarHeaderParameter = {} as any;
910
+ const localVarQueryParameter = {} as any;
911
+
912
+ // authentication BearerAuth required
913
+ await setApiKeyToObject(
914
+ localVarHeaderParameter,
915
+ "Authorization",
916
+ configuration,
917
+ );
918
+
919
+ localVarHeaderParameter["Content-Type"] = "application/json";
920
+
921
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
922
+ let headersFromBaseOptions =
923
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
924
+ localVarRequestOptions.headers = {
925
+ ...localVarHeaderParameter,
926
+ ...headersFromBaseOptions,
927
+ ...options.headers,
928
+ };
929
+ localVarRequestOptions.data = serializeDataIfNeeded(
930
+ createParams,
931
+ localVarRequestOptions,
932
+ configuration,
933
+ );
934
+
935
+ return {
936
+ url: toPathString(localVarUrlObj),
937
+ options: localVarRequestOptions,
938
+ };
939
+ },
940
+ /**
941
+ *
942
+ * @summary Creates a template of a roster by defining the name of the shifts
943
+ * @param {RosterTemplateCreateRequest} [params] Template Params
944
+ * @param {*} [options] Override http request option.
945
+ * @throws {RequiredError}
946
+ */
947
+ createRosterTemplate: async (
948
+ params?: RosterTemplateCreateRequest,
949
+ options: RawAxiosRequestConfig = {},
950
+ ): Promise<RequestArgs> => {
951
+ const localVarPath = `/roster/template`;
952
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
953
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
954
+ let baseOptions;
955
+ if (configuration) {
956
+ baseOptions = configuration.baseOptions;
957
+ }
958
+
959
+ const localVarRequestOptions = {
960
+ method: "POST",
961
+ ...baseOptions,
962
+ ...options,
963
+ };
964
+ const localVarHeaderParameter = {} as any;
965
+ const localVarQueryParameter = {} as any;
966
+
967
+ // authentication BearerAuth required
968
+ await setApiKeyToObject(
969
+ localVarHeaderParameter,
970
+ "Authorization",
971
+ configuration,
972
+ );
973
+
974
+ localVarHeaderParameter["Content-Type"] = "application/json";
975
+
976
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
977
+ let headersFromBaseOptions =
978
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
979
+ localVarRequestOptions.headers = {
980
+ ...localVarHeaderParameter,
981
+ ...headersFromBaseOptions,
982
+ ...options.headers,
983
+ };
984
+ localVarRequestOptions.data = serializeDataIfNeeded(
985
+ params,
986
+ localVarRequestOptions,
987
+ configuration,
988
+ );
989
+
990
+ return {
991
+ url: toPathString(localVarUrlObj),
992
+ options: localVarRequestOptions,
993
+ };
994
+ },
995
+ /**
996
+ *
997
+ * @summary DeleteRoster a roster
998
+ * @param {number} id Roster ID
999
+ * @param {*} [options] Override http request option.
1000
+ * @throws {RequiredError}
1001
+ */
1002
+ deleteRoster: async (
1003
+ id: number,
1004
+ options: RawAxiosRequestConfig = {},
1005
+ ): Promise<RequestArgs> => {
1006
+ // verify required parameter 'id' is not null or undefined
1007
+ assertParamExists("deleteRoster", "id", id);
1008
+ const localVarPath = `/roster/{id}`.replace(
1009
+ `{${"id"}}`,
1010
+ encodeURIComponent(String(id)),
1011
+ );
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 = {
1020
+ method: "DELETE",
1021
+ ...baseOptions,
1022
+ ...options,
1023
+ };
1024
+ const localVarHeaderParameter = {} as any;
1025
+ const localVarQueryParameter = {} as any;
1026
+
1027
+ // authentication BearerAuth required
1028
+ await setApiKeyToObject(
1029
+ localVarHeaderParameter,
1030
+ "Authorization",
1031
+ configuration,
1032
+ );
1033
+
1034
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1035
+ let headersFromBaseOptions =
1036
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
1037
+ localVarRequestOptions.headers = {
1038
+ ...localVarHeaderParameter,
1039
+ ...headersFromBaseOptions,
1040
+ ...options.headers,
1041
+ };
1042
+
1043
+ return {
1044
+ url: toPathString(localVarUrlObj),
1045
+ options: localVarRequestOptions,
1046
+ };
1047
+ },
1048
+ /**
1049
+ *
1050
+ * @summary Deletes a roster template by ID
1051
+ * @param {number} id Template ID
1052
+ * @param {*} [options] Override http request option.
1053
+ * @throws {RequiredError}
1054
+ */
1055
+ deleteRosterTemplate: async (
1056
+ id: number,
1057
+ options: RawAxiosRequestConfig = {},
1058
+ ): Promise<RequestArgs> => {
1059
+ // verify required parameter 'id' is not null or undefined
1060
+ assertParamExists("deleteRosterTemplate", "id", id);
1061
+ const localVarPath = `/roster/template/{id}`.replace(
1062
+ `{${"id"}}`,
1063
+ encodeURIComponent(String(id)),
1064
+ );
1065
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1066
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1067
+ let baseOptions;
1068
+ if (configuration) {
1069
+ baseOptions = configuration.baseOptions;
1070
+ }
1071
+
1072
+ const localVarRequestOptions = {
1073
+ method: "DELETE",
1074
+ ...baseOptions,
1075
+ ...options,
1076
+ };
1077
+ const localVarHeaderParameter = {} as any;
1078
+ const localVarQueryParameter = {} as any;
1079
+
1080
+ // authentication BearerAuth required
1081
+ await setApiKeyToObject(
1082
+ localVarHeaderParameter,
1083
+ "Authorization",
1084
+ configuration,
1085
+ );
1086
+
1087
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1088
+ let headersFromBaseOptions =
1089
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
1090
+ localVarRequestOptions.headers = {
1091
+ ...localVarHeaderParameter,
1092
+ ...headersFromBaseOptions,
1093
+ ...options.headers,
1094
+ };
1095
+
1096
+ return {
1097
+ url: toPathString(localVarUrlObj),
1098
+ options: localVarRequestOptions,
1099
+ };
1100
+ },
1101
+ /**
1102
+ *
1103
+ * @summary Get a specific roster by id
1104
+ * @param {number} id Roster ID
1105
+ * @param {*} [options] Override http request option.
1106
+ * @throws {RequiredError}
1107
+ */
1108
+ getRoster: async (
1109
+ id: number,
1110
+ options: RawAxiosRequestConfig = {},
1111
+ ): Promise<RequestArgs> => {
1112
+ // verify required parameter 'id' is not null or undefined
1113
+ assertParamExists("getRoster", "id", id);
1114
+ const localVarPath = `/roster/{id}`.replace(
1115
+ `{${"id"}}`,
1116
+ encodeURIComponent(String(id)),
1117
+ );
1118
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1119
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1120
+ let baseOptions;
1121
+ if (configuration) {
1122
+ baseOptions = configuration.baseOptions;
1123
+ }
1124
+
1125
+ const localVarRequestOptions = {
1126
+ method: "GET",
1127
+ ...baseOptions,
1128
+ ...options,
1129
+ };
1130
+ const localVarHeaderParameter = {} as any;
1131
+ const localVarQueryParameter = {} as any;
1132
+
1133
+ // authentication BearerAuth required
1134
+ await setApiKeyToObject(
1135
+ localVarHeaderParameter,
1136
+ "Authorization",
1137
+ configuration,
1138
+ );
1139
+
1140
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1141
+ let headersFromBaseOptions =
1142
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
1143
+ localVarRequestOptions.headers = {
1144
+ ...localVarHeaderParameter,
1145
+ ...headersFromBaseOptions,
1146
+ ...options.headers,
1147
+ };
1148
+
1149
+ return {
1150
+ url: toPathString(localVarUrlObj),
1151
+ options: localVarRequestOptions,
1152
+ };
1153
+ },
1154
+ /**
1155
+ *
1156
+ * @summary Get a roster template by ID
1157
+ * @param {number} id Template ID
1158
+ * @param {*} [options] Override http request option.
1159
+ * @throws {RequiredError}
1160
+ */
1161
+ getRosterTemplate: async (
1162
+ id: number,
1163
+ options: RawAxiosRequestConfig = {},
1164
+ ): Promise<RequestArgs> => {
1165
+ // verify required parameter 'id' is not null or undefined
1166
+ assertParamExists("getRosterTemplate", "id", id);
1167
+ const localVarPath = `/roster/template/{id}`.replace(
1168
+ `{${"id"}}`,
1169
+ encodeURIComponent(String(id)),
1170
+ );
1171
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1172
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1173
+ let baseOptions;
1174
+ if (configuration) {
1175
+ baseOptions = configuration.baseOptions;
1176
+ }
1177
+
1178
+ const localVarRequestOptions = {
1179
+ method: "GET",
1180
+ ...baseOptions,
1181
+ ...options,
1182
+ };
1183
+ const localVarHeaderParameter = {} as any;
1184
+ const localVarQueryParameter = {} as any;
1185
+
1186
+ // authentication BearerAuth required
1187
+ await setApiKeyToObject(
1188
+ localVarHeaderParameter,
1189
+ "Authorization",
1190
+ configuration,
1191
+ );
1192
+
1193
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1194
+ let headersFromBaseOptions =
1195
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
1196
+ localVarRequestOptions.headers = {
1197
+ ...localVarHeaderParameter,
1198
+ ...headersFromBaseOptions,
1199
+ ...options.headers,
1200
+ };
1201
+
1202
+ return {
1203
+ url: toPathString(localVarUrlObj),
1204
+ options: localVarRequestOptions,
1205
+ };
1206
+ },
1207
+ /**
1208
+ *
1209
+ * @summary Get all rosters templates or query by organ ID
1210
+ * @param {number} [organId]
1211
+ * @param {*} [options] Override http request option.
1212
+ * @throws {RequiredError}
1213
+ */
1214
+ getRosterTemplates: async (
1215
+ organId?: number,
1216
+ options: RawAxiosRequestConfig = {},
1217
+ ): Promise<RequestArgs> => {
1218
+ const localVarPath = `/roster/template`;
1219
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1220
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1221
+ let baseOptions;
1222
+ if (configuration) {
1223
+ baseOptions = configuration.baseOptions;
1224
+ }
1225
+
1226
+ const localVarRequestOptions = {
1227
+ method: "GET",
1228
+ ...baseOptions,
1229
+ ...options,
1230
+ };
1231
+ const localVarHeaderParameter = {} as any;
1232
+ const localVarQueryParameter = {} as any;
1233
+
1234
+ // authentication BearerAuth required
1235
+ await setApiKeyToObject(
1236
+ localVarHeaderParameter,
1237
+ "Authorization",
1238
+ configuration,
1239
+ );
1240
+
1241
+ if (organId !== undefined) {
1242
+ localVarQueryParameter["organId"] = organId;
1243
+ }
1244
+
1245
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1246
+ let headersFromBaseOptions =
1247
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
1248
+ localVarRequestOptions.headers = {
1249
+ ...localVarHeaderParameter,
1250
+ ...headersFromBaseOptions,
1251
+ ...options.headers,
1252
+ };
1253
+
1254
+ return {
1255
+ url: toPathString(localVarUrlObj),
1256
+ options: localVarRequestOptions,
1257
+ };
1258
+ },
1259
+ /**
1260
+ *
1261
+ * @summary Get all rosters or query by date and organ
1262
+ * @param {string} [date] Date filter (ISO format)
1263
+ * @param {number} [organId] Organ ID filter
1264
+ * @param {*} [options] Override http request option.
1265
+ * @throws {RequiredError}
1266
+ */
1267
+ getRosters: async (
1268
+ date?: string,
1269
+ organId?: number,
1270
+ options: RawAxiosRequestConfig = {},
1271
+ ): Promise<RequestArgs> => {
1272
+ const localVarPath = `/roster`;
1273
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1274
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1275
+ let baseOptions;
1276
+ if (configuration) {
1277
+ baseOptions = configuration.baseOptions;
1278
+ }
1279
+
1280
+ const localVarRequestOptions = {
1281
+ method: "GET",
1282
+ ...baseOptions,
1283
+ ...options,
1284
+ };
1285
+ const localVarHeaderParameter = {} as any;
1286
+ const localVarQueryParameter = {} as any;
1287
+
1288
+ // authentication BearerAuth required
1289
+ await setApiKeyToObject(
1290
+ localVarHeaderParameter,
1291
+ "Authorization",
1292
+ configuration,
1293
+ );
1294
+
1295
+ if (date !== undefined) {
1296
+ localVarQueryParameter["date"] = date;
1297
+ }
1298
+
1299
+ if (organId !== undefined) {
1300
+ localVarQueryParameter["organId"] = organId;
1301
+ }
1302
+
1303
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1304
+ let headersFromBaseOptions =
1305
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
1306
+ localVarRequestOptions.headers = {
1307
+ ...localVarHeaderParameter,
1308
+ ...headersFromBaseOptions,
1309
+ ...options.headers,
1310
+ };
1311
+
1312
+ return {
1313
+ url: toPathString(localVarUrlObj),
1314
+ options: localVarRequestOptions,
1315
+ };
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
+ updateRoster: async (
1326
+ id: number,
1327
+ updateParams: RosterUpdateRequest,
1328
+ options: RawAxiosRequestConfig = {},
1329
+ ): Promise<RequestArgs> => {
1330
+ // verify required parameter 'id' is not null or undefined
1331
+ assertParamExists("updateRoster", "id", id);
1332
+ // verify required parameter 'updateParams' is not null or undefined
1333
+ assertParamExists("updateRoster", "updateParams", updateParams);
1334
+ const localVarPath = `/roster/{id}`.replace(
1335
+ `{${"id"}}`,
1336
+ encodeURIComponent(String(id)),
1337
+ );
1338
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1339
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1340
+ let baseOptions;
1341
+ if (configuration) {
1342
+ baseOptions = configuration.baseOptions;
1343
+ }
1344
+
1345
+ const localVarRequestOptions = {
1346
+ method: "PATCH",
1347
+ ...baseOptions,
1348
+ ...options,
1349
+ };
1350
+ const localVarHeaderParameter = {} as any;
1351
+ const localVarQueryParameter = {} as any;
1352
+
1353
+ // authentication BearerAuth required
1354
+ await setApiKeyToObject(
1355
+ localVarHeaderParameter,
1356
+ "Authorization",
1357
+ configuration,
1358
+ );
1359
+
1360
+ localVarHeaderParameter["Content-Type"] = "application/json";
1361
+
1362
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1363
+ let headersFromBaseOptions =
1364
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
1365
+ localVarRequestOptions.headers = {
1366
+ ...localVarHeaderParameter,
1367
+ ...headersFromBaseOptions,
1368
+ ...options.headers,
1369
+ };
1370
+ localVarRequestOptions.data = serializeDataIfNeeded(
1371
+ updateParams,
1372
+ localVarRequestOptions,
1373
+ configuration,
1374
+ );
1375
+
1376
+ return {
1377
+ url: toPathString(localVarUrlObj),
1378
+ options: localVarRequestOptions,
1379
+ };
1380
+ },
1381
+ };
1382
+ };
1383
+
1384
+ /**
1385
+ * RosterApi - functional programming interface
1386
+ * @export
1387
+ */
1388
+ export const RosterApiFp = function (configuration?: Configuration) {
1389
+ const localVarAxiosParamCreator = RosterApiAxiosParamCreator(configuration);
1390
+ return {
1391
+ /**
1392
+ *
1393
+ * @summary CreateRoster a new roster
1394
+ * @param {RosterCreateRequest} createParams Roster input
1395
+ * @param {*} [options] Override http request option.
1396
+ * @throws {RequiredError}
1397
+ */
1398
+ async createRoster(
1399
+ createParams: RosterCreateRequest,
1400
+ options?: RawAxiosRequestConfig,
1401
+ ): Promise<
1402
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Roster>
1403
+ > {
1404
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createRoster(
1405
+ createParams,
1406
+ options,
1407
+ );
1408
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1409
+ const localVarOperationServerBasePath =
1410
+ operationServerMap["RosterApi.createRoster"]?.[
1411
+ localVarOperationServerIndex
1412
+ ]?.url;
1413
+ return (axios, basePath) =>
1414
+ createRequestFunction(
1415
+ localVarAxiosArgs,
1416
+ globalAxios,
1417
+ BASE_PATH,
1418
+ configuration,
1419
+ )(axios, localVarOperationServerBasePath || basePath);
1420
+ },
1421
+ /**
1422
+ *
1423
+ * @summary Creates a template of a roster by defining the name of the shifts
1424
+ * @param {RosterTemplateCreateRequest} [params] Template Params
1425
+ * @param {*} [options] Override http request option.
1426
+ * @throws {RequiredError}
1427
+ */
1428
+ async createRosterTemplate(
1429
+ params?: RosterTemplateCreateRequest,
1430
+ options?: RawAxiosRequestConfig,
1431
+ ): Promise<
1432
+ (
1433
+ axios?: AxiosInstance,
1434
+ basePath?: string,
1435
+ ) => AxiosPromise<Array<SavedShift>>
1436
+ > {
1437
+ const localVarAxiosArgs =
1438
+ await localVarAxiosParamCreator.createRosterTemplate(params, options);
1439
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1440
+ const localVarOperationServerBasePath =
1441
+ operationServerMap["RosterApi.createRosterTemplate"]?.[
1442
+ localVarOperationServerIndex
1443
+ ]?.url;
1444
+ return (axios, basePath) =>
1445
+ createRequestFunction(
1446
+ localVarAxiosArgs,
1447
+ globalAxios,
1448
+ BASE_PATH,
1449
+ configuration,
1450
+ )(axios, localVarOperationServerBasePath || basePath);
1451
+ },
1452
+ /**
1453
+ *
1454
+ * @summary DeleteRoster a roster
1455
+ * @param {number} id Roster ID
1456
+ * @param {*} [options] Override http request option.
1457
+ * @throws {RequiredError}
1458
+ */
1459
+ async deleteRoster(
1460
+ id: number,
1461
+ options?: RawAxiosRequestConfig,
1462
+ ): Promise<
1463
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>
1464
+ > {
1465
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRoster(
1466
+ id,
1467
+ options,
1468
+ );
1469
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1470
+ const localVarOperationServerBasePath =
1471
+ operationServerMap["RosterApi.deleteRoster"]?.[
1472
+ localVarOperationServerIndex
1473
+ ]?.url;
1474
+ return (axios, basePath) =>
1475
+ createRequestFunction(
1476
+ localVarAxiosArgs,
1477
+ globalAxios,
1478
+ BASE_PATH,
1479
+ configuration,
1480
+ )(axios, localVarOperationServerBasePath || basePath);
1481
+ },
1482
+ /**
1483
+ *
1484
+ * @summary Deletes a roster template by ID
1485
+ * @param {number} id Template ID
1486
+ * @param {*} [options] Override http request option.
1487
+ * @throws {RequiredError}
1488
+ */
1489
+ async deleteRosterTemplate(
1490
+ id: number,
1491
+ options?: RawAxiosRequestConfig,
1492
+ ): Promise<
1493
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>
1494
+ > {
1495
+ const localVarAxiosArgs =
1496
+ await localVarAxiosParamCreator.deleteRosterTemplate(id, options);
1497
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1498
+ const localVarOperationServerBasePath =
1499
+ operationServerMap["RosterApi.deleteRosterTemplate"]?.[
1500
+ localVarOperationServerIndex
1501
+ ]?.url;
1502
+ return (axios, basePath) =>
1503
+ createRequestFunction(
1504
+ localVarAxiosArgs,
1505
+ globalAxios,
1506
+ BASE_PATH,
1507
+ configuration,
1508
+ )(axios, localVarOperationServerBasePath || basePath);
1509
+ },
1510
+ /**
1511
+ *
1512
+ * @summary Get a specific roster by id
1513
+ * @param {number} id Roster ID
1514
+ * @param {*} [options] Override http request option.
1515
+ * @throws {RequiredError}
1516
+ */
1517
+ async getRoster(
1518
+ id: number,
1519
+ options?: RawAxiosRequestConfig,
1520
+ ): Promise<
1521
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Roster>
1522
+ > {
1523
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRoster(
1524
+ id,
1525
+ options,
1526
+ );
1527
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1528
+ const localVarOperationServerBasePath =
1529
+ operationServerMap["RosterApi.getRoster"]?.[
1530
+ localVarOperationServerIndex
1531
+ ]?.url;
1532
+ return (axios, basePath) =>
1533
+ createRequestFunction(
1534
+ localVarAxiosArgs,
1535
+ globalAxios,
1536
+ BASE_PATH,
1537
+ configuration,
1538
+ )(axios, localVarOperationServerBasePath || basePath);
1539
+ },
1540
+ /**
1541
+ *
1542
+ * @summary Get a roster template by ID
1543
+ * @param {number} id Template ID
1544
+ * @param {*} [options] Override http request option.
1545
+ * @throws {RequiredError}
1546
+ */
1547
+ async getRosterTemplate(
1548
+ id: number,
1549
+ options?: RawAxiosRequestConfig,
1550
+ ): Promise<
1551
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<RosterTemplate>
1552
+ > {
1553
+ const localVarAxiosArgs =
1554
+ await localVarAxiosParamCreator.getRosterTemplate(id, options);
1555
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1556
+ const localVarOperationServerBasePath =
1557
+ operationServerMap["RosterApi.getRosterTemplate"]?.[
1558
+ localVarOperationServerIndex
1559
+ ]?.url;
1560
+ return (axios, basePath) =>
1561
+ createRequestFunction(
1562
+ localVarAxiosArgs,
1563
+ globalAxios,
1564
+ BASE_PATH,
1565
+ configuration,
1566
+ )(axios, localVarOperationServerBasePath || basePath);
1567
+ },
1568
+ /**
1569
+ *
1570
+ * @summary Get all rosters templates or query by organ ID
1571
+ * @param {number} [organId]
1572
+ * @param {*} [options] Override http request option.
1573
+ * @throws {RequiredError}
1574
+ */
1575
+ async getRosterTemplates(
1576
+ organId?: number,
1577
+ options?: RawAxiosRequestConfig,
1578
+ ): Promise<
1579
+ (
1580
+ axios?: AxiosInstance,
1581
+ basePath?: string,
1582
+ ) => AxiosPromise<Array<RosterTemplate>>
1583
+ > {
1584
+ const localVarAxiosArgs =
1585
+ await localVarAxiosParamCreator.getRosterTemplates(organId, options);
1586
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1587
+ const localVarOperationServerBasePath =
1588
+ operationServerMap["RosterApi.getRosterTemplates"]?.[
1589
+ localVarOperationServerIndex
1590
+ ]?.url;
1591
+ return (axios, basePath) =>
1592
+ createRequestFunction(
1593
+ localVarAxiosArgs,
1594
+ globalAxios,
1595
+ BASE_PATH,
1596
+ configuration,
1597
+ )(axios, localVarOperationServerBasePath || basePath);
1598
+ },
1599
+ /**
1600
+ *
1601
+ * @summary Get all rosters or query by date and organ
1602
+ * @param {string} [date] Date filter (ISO format)
1603
+ * @param {number} [organId] Organ ID filter
1604
+ * @param {*} [options] Override http request option.
1605
+ * @throws {RequiredError}
1606
+ */
1607
+ async getRosters(
1608
+ date?: string,
1609
+ organId?: number,
1610
+ options?: RawAxiosRequestConfig,
1611
+ ): Promise<
1612
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Roster>>
1613
+ > {
1614
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRosters(
1615
+ date,
1616
+ organId,
1617
+ options,
1618
+ );
1619
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1620
+ const localVarOperationServerBasePath =
1621
+ operationServerMap["RosterApi.getRosters"]?.[
1622
+ localVarOperationServerIndex
1623
+ ]?.url;
1624
+ return (axios, basePath) =>
1625
+ createRequestFunction(
1626
+ localVarAxiosArgs,
1627
+ globalAxios,
1628
+ BASE_PATH,
1629
+ configuration,
1630
+ )(axios, localVarOperationServerBasePath || basePath);
1631
+ },
1632
+ /**
1633
+ *
1634
+ * @summary Update a roster
1635
+ * @param {number} id Roster ID
1636
+ * @param {RosterUpdateRequest} updateParams Roster input
1637
+ * @param {*} [options] Override http request option.
1638
+ * @throws {RequiredError}
1639
+ */
1640
+ async updateRoster(
1641
+ id: number,
1642
+ updateParams: RosterUpdateRequest,
1643
+ options?: RawAxiosRequestConfig,
1644
+ ): Promise<
1645
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Roster>
1646
+ > {
1647
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateRoster(
1648
+ id,
1649
+ updateParams,
1650
+ options,
1651
+ );
1652
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1653
+ const localVarOperationServerBasePath =
1654
+ operationServerMap["RosterApi.updateRoster"]?.[
1655
+ localVarOperationServerIndex
1656
+ ]?.url;
1657
+ return (axios, basePath) =>
1658
+ createRequestFunction(
1659
+ localVarAxiosArgs,
1660
+ globalAxios,
1661
+ BASE_PATH,
1662
+ configuration,
1663
+ )(axios, localVarOperationServerBasePath || basePath);
1664
+ },
1665
+ };
1666
+ };
1667
+
1668
+ /**
1669
+ * RosterApi - factory interface
1670
+ * @export
1671
+ */
1672
+ export const RosterApiFactory = function (
1673
+ configuration?: Configuration,
1674
+ basePath?: string,
1675
+ axios?: AxiosInstance,
1676
+ ) {
1677
+ const localVarFp = RosterApiFp(configuration);
1678
+ return {
1679
+ /**
1680
+ *
1681
+ * @summary CreateRoster a new roster
1682
+ * @param {RosterCreateRequest} createParams Roster input
1683
+ * @param {*} [options] Override http request option.
1684
+ * @throws {RequiredError}
1685
+ */
1686
+ createRoster(
1687
+ createParams: RosterCreateRequest,
1688
+ options?: RawAxiosRequestConfig,
1689
+ ): AxiosPromise<Roster> {
1690
+ return localVarFp
1691
+ .createRoster(createParams, options)
1692
+ .then((request) => request(axios, basePath));
1693
+ },
1694
+ /**
1695
+ *
1696
+ * @summary Creates a template of a roster by defining the name of the shifts
1697
+ * @param {RosterTemplateCreateRequest} [params] Template Params
1698
+ * @param {*} [options] Override http request option.
1699
+ * @throws {RequiredError}
1700
+ */
1701
+ createRosterTemplate(
1702
+ params?: RosterTemplateCreateRequest,
1703
+ options?: RawAxiosRequestConfig,
1704
+ ): AxiosPromise<Array<SavedShift>> {
1705
+ return localVarFp
1706
+ .createRosterTemplate(params, options)
1707
+ .then((request) => request(axios, basePath));
1708
+ },
1709
+ /**
1710
+ *
1711
+ * @summary DeleteRoster a roster
1712
+ * @param {number} id Roster ID
1713
+ * @param {*} [options] Override http request option.
1714
+ * @throws {RequiredError}
1715
+ */
1716
+ deleteRoster(
1717
+ id: number,
1718
+ options?: RawAxiosRequestConfig,
1719
+ ): AxiosPromise<string> {
1720
+ return localVarFp
1721
+ .deleteRoster(id, options)
1722
+ .then((request) => request(axios, basePath));
1723
+ },
1724
+ /**
1725
+ *
1726
+ * @summary Deletes a roster template by ID
1727
+ * @param {number} id Template ID
1728
+ * @param {*} [options] Override http request option.
1729
+ * @throws {RequiredError}
1730
+ */
1731
+ deleteRosterTemplate(
1732
+ id: number,
1733
+ options?: RawAxiosRequestConfig,
1734
+ ): AxiosPromise<string> {
1735
+ return localVarFp
1736
+ .deleteRosterTemplate(id, options)
1737
+ .then((request) => request(axios, basePath));
1738
+ },
1739
+ /**
1740
+ *
1741
+ * @summary Get a specific roster by id
1742
+ * @param {number} id Roster ID
1743
+ * @param {*} [options] Override http request option.
1744
+ * @throws {RequiredError}
1745
+ */
1746
+ getRoster(
1747
+ id: number,
1748
+ options?: RawAxiosRequestConfig,
1749
+ ): AxiosPromise<Roster> {
1750
+ return localVarFp
1751
+ .getRoster(id, options)
1752
+ .then((request) => request(axios, basePath));
1753
+ },
1754
+ /**
1755
+ *
1756
+ * @summary Get a roster template by ID
1757
+ * @param {number} id Template ID
1758
+ * @param {*} [options] Override http request option.
1759
+ * @throws {RequiredError}
1760
+ */
1761
+ getRosterTemplate(
1762
+ id: number,
1763
+ options?: RawAxiosRequestConfig,
1764
+ ): AxiosPromise<RosterTemplate> {
1765
+ return localVarFp
1766
+ .getRosterTemplate(id, options)
1767
+ .then((request) => request(axios, basePath));
1768
+ },
1769
+ /**
1770
+ *
1771
+ * @summary Get all rosters templates or query by organ ID
1772
+ * @param {number} [organId]
1773
+ * @param {*} [options] Override http request option.
1774
+ * @throws {RequiredError}
1775
+ */
1776
+ getRosterTemplates(
1777
+ organId?: number,
1778
+ options?: RawAxiosRequestConfig,
1779
+ ): AxiosPromise<Array<RosterTemplate>> {
1780
+ return localVarFp
1781
+ .getRosterTemplates(organId, options)
1782
+ .then((request) => request(axios, basePath));
1783
+ },
1784
+ /**
1785
+ *
1786
+ * @summary Get all rosters or query by date and organ
1787
+ * @param {string} [date] Date filter (ISO format)
1788
+ * @param {number} [organId] Organ ID filter
1789
+ * @param {*} [options] Override http request option.
1790
+ * @throws {RequiredError}
1791
+ */
1792
+ getRosters(
1793
+ date?: string,
1794
+ organId?: number,
1795
+ options?: RawAxiosRequestConfig,
1796
+ ): AxiosPromise<Array<Roster>> {
1797
+ return localVarFp
1798
+ .getRosters(date, organId, options)
1799
+ .then((request) => request(axios, basePath));
1800
+ },
1801
+ /**
1802
+ *
1803
+ * @summary Update a roster
1804
+ * @param {number} id Roster ID
1805
+ * @param {RosterUpdateRequest} updateParams Roster input
1806
+ * @param {*} [options] Override http request option.
1807
+ * @throws {RequiredError}
1808
+ */
1809
+ updateRoster(
1810
+ id: number,
1811
+ updateParams: RosterUpdateRequest,
1812
+ options?: RawAxiosRequestConfig,
1813
+ ): AxiosPromise<Roster> {
1814
+ return localVarFp
1815
+ .updateRoster(id, updateParams, options)
1816
+ .then((request) => request(axios, basePath));
1817
+ },
1818
+ };
1819
+ };
1820
+
1821
+ /**
1822
+ * RosterApi - object-oriented interface
1823
+ * @export
1824
+ * @class RosterApi
1825
+ * @extends {BaseAPI}
1826
+ */
1827
+ export class RosterApi extends BaseAPI {
1828
+ /**
1829
+ *
1830
+ * @summary CreateRoster a new roster
1831
+ * @param {RosterCreateRequest} createParams Roster input
1832
+ * @param {*} [options] Override http request option.
1833
+ * @throws {RequiredError}
1834
+ * @memberof RosterApi
1835
+ */
1836
+ public createRoster(
1837
+ createParams: RosterCreateRequest,
1838
+ options?: RawAxiosRequestConfig,
1839
+ ) {
1840
+ return RosterApiFp(this.configuration)
1841
+ .createRoster(createParams, options)
1842
+ .then((request) => request(this.axios, this.basePath));
1843
+ }
1844
+
1845
+ /**
1846
+ *
1847
+ * @summary Creates a template of a roster by defining the name of the shifts
1848
+ * @param {RosterTemplateCreateRequest} [params] Template Params
1849
+ * @param {*} [options] Override http request option.
1850
+ * @throws {RequiredError}
1851
+ * @memberof RosterApi
1852
+ */
1853
+ public createRosterTemplate(
1854
+ params?: RosterTemplateCreateRequest,
1855
+ options?: RawAxiosRequestConfig,
1856
+ ) {
1857
+ return RosterApiFp(this.configuration)
1858
+ .createRosterTemplate(params, options)
1859
+ .then((request) => request(this.axios, this.basePath));
1860
+ }
1861
+
1862
+ /**
1863
+ *
1864
+ * @summary DeleteRoster a roster
1865
+ * @param {number} id Roster ID
1866
+ * @param {*} [options] Override http request option.
1867
+ * @throws {RequiredError}
1868
+ * @memberof RosterApi
1869
+ */
1870
+ public deleteRoster(id: number, options?: RawAxiosRequestConfig) {
1871
+ return RosterApiFp(this.configuration)
1872
+ .deleteRoster(id, options)
1873
+ .then((request) => request(this.axios, this.basePath));
1874
+ }
1875
+
1876
+ /**
1877
+ *
1878
+ * @summary Deletes a roster template by ID
1879
+ * @param {number} id Template ID
1880
+ * @param {*} [options] Override http request option.
1881
+ * @throws {RequiredError}
1882
+ * @memberof RosterApi
1883
+ */
1884
+ public deleteRosterTemplate(id: number, options?: RawAxiosRequestConfig) {
1885
+ return RosterApiFp(this.configuration)
1886
+ .deleteRosterTemplate(id, options)
1887
+ .then((request) => request(this.axios, this.basePath));
1888
+ }
1889
+
1890
+ /**
1891
+ *
1892
+ * @summary Get a specific roster by id
1893
+ * @param {number} id Roster ID
1894
+ * @param {*} [options] Override http request option.
1895
+ * @throws {RequiredError}
1896
+ * @memberof RosterApi
1897
+ */
1898
+ public getRoster(id: number, options?: RawAxiosRequestConfig) {
1899
+ return RosterApiFp(this.configuration)
1900
+ .getRoster(id, options)
1901
+ .then((request) => request(this.axios, this.basePath));
1902
+ }
1903
+
1904
+ /**
1905
+ *
1906
+ * @summary Get a roster template by ID
1907
+ * @param {number} id Template ID
1908
+ * @param {*} [options] Override http request option.
1909
+ * @throws {RequiredError}
1910
+ * @memberof RosterApi
1911
+ */
1912
+ public getRosterTemplate(id: number, options?: RawAxiosRequestConfig) {
1913
+ return RosterApiFp(this.configuration)
1914
+ .getRosterTemplate(id, options)
1915
+ .then((request) => request(this.axios, this.basePath));
1916
+ }
1917
+
1918
+ /**
1919
+ *
1920
+ * @summary Get all rosters templates or query by organ ID
1921
+ * @param {number} [organId]
1922
+ * @param {*} [options] Override http request option.
1923
+ * @throws {RequiredError}
1924
+ * @memberof RosterApi
1925
+ */
1926
+ public getRosterTemplates(organId?: number, options?: RawAxiosRequestConfig) {
1927
+ return RosterApiFp(this.configuration)
1928
+ .getRosterTemplates(organId, options)
1929
+ .then((request) => request(this.axios, this.basePath));
1930
+ }
1931
+
1932
+ /**
1933
+ *
1934
+ * @summary Get all rosters or query by date and organ
1935
+ * @param {string} [date] Date filter (ISO format)
1936
+ * @param {number} [organId] Organ ID filter
1937
+ * @param {*} [options] Override http request option.
1938
+ * @throws {RequiredError}
1939
+ * @memberof RosterApi
1940
+ */
1941
+ public getRosters(
1942
+ date?: string,
1943
+ organId?: number,
1944
+ options?: RawAxiosRequestConfig,
1945
+ ) {
1946
+ return RosterApiFp(this.configuration)
1947
+ .getRosters(date, organId, options)
1948
+ .then((request) => request(this.axios, this.basePath));
1949
+ }
1950
+
1951
+ /**
1952
+ *
1953
+ * @summary Update a roster
1954
+ * @param {number} id Roster ID
1955
+ * @param {RosterUpdateRequest} updateParams Roster input
1956
+ * @param {*} [options] Override http request option.
1957
+ * @throws {RequiredError}
1958
+ * @memberof RosterApi
1959
+ */
1960
+ public updateRoster(
1961
+ id: number,
1962
+ updateParams: RosterUpdateRequest,
1963
+ options?: RawAxiosRequestConfig,
1964
+ ) {
1965
+ return RosterApiFp(this.configuration)
1966
+ .updateRoster(id, updateParams, options)
1967
+ .then((request) => request(this.axios, this.basePath));
1968
+ }
1969
+ }
1970
+
1971
+ /**
1972
+ * RosterAnswerApi - axios parameter creator
1973
+ * @export
1974
+ */
1975
+ export const RosterAnswerApiAxiosParamCreator = function (
1976
+ configuration?: Configuration,
1977
+ ) {
1978
+ return {
1979
+ /**
1980
+ *
1981
+ * @summary Create a new roster shift answer
1982
+ * @param {RosterAnswerCreateRequest} createParams Roster answer input
1983
+ * @param {*} [options] Override http request option.
1984
+ * @throws {RequiredError}
1985
+ */
1986
+ createRosterAnswer: async (
1987
+ createParams: RosterAnswerCreateRequest,
1988
+ options: RawAxiosRequestConfig = {},
1989
+ ): Promise<RequestArgs> => {
1990
+ // verify required parameter 'createParams' is not null or undefined
1991
+ assertParamExists("createRosterAnswer", "createParams", createParams);
1992
+ const localVarPath = `/roster/answer`;
1993
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1994
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1995
+ let baseOptions;
1996
+ if (configuration) {
1997
+ baseOptions = configuration.baseOptions;
1998
+ }
1999
+
2000
+ const localVarRequestOptions = {
2001
+ method: "POST",
2002
+ ...baseOptions,
2003
+ ...options,
2004
+ };
2005
+ const localVarHeaderParameter = {} as any;
2006
+ const localVarQueryParameter = {} as any;
2007
+
2008
+ // authentication BearerAuth required
2009
+ await setApiKeyToObject(
2010
+ localVarHeaderParameter,
2011
+ "Authorization",
2012
+ configuration,
2013
+ );
2014
+
2015
+ localVarHeaderParameter["Content-Type"] = "application/json";
2016
+
2017
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2018
+ let headersFromBaseOptions =
2019
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
2020
+ localVarRequestOptions.headers = {
2021
+ ...localVarHeaderParameter,
2022
+ ...headersFromBaseOptions,
2023
+ ...options.headers,
2024
+ };
2025
+ localVarRequestOptions.data = serializeDataIfNeeded(
2026
+ createParams,
2027
+ localVarRequestOptions,
2028
+ configuration,
2029
+ );
2030
+
2031
+ return {
2032
+ url: toPathString(localVarUrlObj),
2033
+ options: localVarRequestOptions,
2034
+ };
2035
+ },
2036
+ /**
2037
+ *
2038
+ * @summary Updates a roster answer with the new value
2039
+ * @param {number} id Roster Answer ID
2040
+ * @param {RosterAnswerUpdateRequest} updateParams New answer value
2041
+ * @param {*} [options] Override http request option.
2042
+ * @throws {RequiredError}
2043
+ */
2044
+ updateRosterAnswer: async (
2045
+ id: number,
2046
+ updateParams: RosterAnswerUpdateRequest,
2047
+ options: RawAxiosRequestConfig = {},
2048
+ ): Promise<RequestArgs> => {
2049
+ // verify required parameter 'id' is not null or undefined
2050
+ assertParamExists("updateRosterAnswer", "id", id);
2051
+ // verify required parameter 'updateParams' is not null or undefined
2052
+ assertParamExists("updateRosterAnswer", "updateParams", updateParams);
2053
+ const localVarPath = `/roster/answer/{id}`.replace(
2054
+ `{${"id"}}`,
2055
+ encodeURIComponent(String(id)),
2056
+ );
2057
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2058
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2059
+ let baseOptions;
2060
+ if (configuration) {
2061
+ baseOptions = configuration.baseOptions;
2062
+ }
2063
+
2064
+ const localVarRequestOptions = {
2065
+ method: "PATCH",
2066
+ ...baseOptions,
2067
+ ...options,
2068
+ };
2069
+ const localVarHeaderParameter = {} as any;
2070
+ const localVarQueryParameter = {} as any;
2071
+
2072
+ // authentication BearerAuth required
2073
+ await setApiKeyToObject(
2074
+ localVarHeaderParameter,
2075
+ "Authorization",
2076
+ configuration,
2077
+ );
2078
+
2079
+ localVarHeaderParameter["Content-Type"] = "application/json";
2080
+
2081
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2082
+ let headersFromBaseOptions =
2083
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
2084
+ localVarRequestOptions.headers = {
2085
+ ...localVarHeaderParameter,
2086
+ ...headersFromBaseOptions,
2087
+ ...options.headers,
2088
+ };
2089
+ localVarRequestOptions.data = serializeDataIfNeeded(
2090
+ updateParams,
2091
+ localVarRequestOptions,
2092
+ configuration,
2093
+ );
2094
+
2095
+ return {
2096
+ url: toPathString(localVarUrlObj),
2097
+ options: localVarRequestOptions,
2098
+ };
2099
+ },
2100
+ };
2101
+ };
2102
+
2103
+ /**
2104
+ * RosterAnswerApi - functional programming interface
2105
+ * @export
2106
+ */
2107
+ export const RosterAnswerApiFp = function (configuration?: Configuration) {
2108
+ const localVarAxiosParamCreator =
2109
+ RosterAnswerApiAxiosParamCreator(configuration);
2110
+ return {
2111
+ /**
2112
+ *
2113
+ * @summary Create a new roster shift answer
2114
+ * @param {RosterAnswerCreateRequest} createParams Roster answer input
2115
+ * @param {*} [options] Override http request option.
2116
+ * @throws {RequiredError}
2117
+ */
2118
+ async createRosterAnswer(
2119
+ createParams: RosterAnswerCreateRequest,
2120
+ options?: RawAxiosRequestConfig,
2121
+ ): Promise<
2122
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<RosterAnswer>
2123
+ > {
2124
+ const localVarAxiosArgs =
2125
+ await localVarAxiosParamCreator.createRosterAnswer(
2126
+ createParams,
2127
+ options,
2128
+ );
2129
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2130
+ const localVarOperationServerBasePath =
2131
+ operationServerMap["RosterAnswerApi.createRosterAnswer"]?.[
2132
+ localVarOperationServerIndex
2133
+ ]?.url;
2134
+ return (axios, basePath) =>
2135
+ createRequestFunction(
2136
+ localVarAxiosArgs,
2137
+ globalAxios,
2138
+ BASE_PATH,
2139
+ configuration,
2140
+ )(axios, localVarOperationServerBasePath || basePath);
2141
+ },
2142
+ /**
2143
+ *
2144
+ * @summary Updates a roster answer with the new value
2145
+ * @param {number} id Roster Answer ID
2146
+ * @param {RosterAnswerUpdateRequest} updateParams New answer value
2147
+ * @param {*} [options] Override http request option.
2148
+ * @throws {RequiredError}
2149
+ */
2150
+ async updateRosterAnswer(
2151
+ id: number,
2152
+ updateParams: RosterAnswerUpdateRequest,
2153
+ options?: RawAxiosRequestConfig,
2154
+ ): Promise<
2155
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<RosterAnswer>
2156
+ > {
2157
+ const localVarAxiosArgs =
2158
+ await localVarAxiosParamCreator.updateRosterAnswer(
2159
+ id,
2160
+ updateParams,
2161
+ options,
2162
+ );
2163
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2164
+ const localVarOperationServerBasePath =
2165
+ operationServerMap["RosterAnswerApi.updateRosterAnswer"]?.[
2166
+ localVarOperationServerIndex
2167
+ ]?.url;
2168
+ return (axios, basePath) =>
2169
+ createRequestFunction(
2170
+ localVarAxiosArgs,
2171
+ globalAxios,
2172
+ BASE_PATH,
2173
+ configuration,
2174
+ )(axios, localVarOperationServerBasePath || basePath);
2175
+ },
2176
+ };
2177
+ };
2178
+
2179
+ /**
2180
+ * RosterAnswerApi - factory interface
2181
+ * @export
2182
+ */
2183
+ export const RosterAnswerApiFactory = function (
2184
+ configuration?: Configuration,
2185
+ basePath?: string,
2186
+ axios?: AxiosInstance,
2187
+ ) {
2188
+ const localVarFp = RosterAnswerApiFp(configuration);
2189
+ return {
2190
+ /**
2191
+ *
2192
+ * @summary Create a new roster shift answer
2193
+ * @param {RosterAnswerCreateRequest} createParams Roster answer input
2194
+ * @param {*} [options] Override http request option.
2195
+ * @throws {RequiredError}
2196
+ */
2197
+ createRosterAnswer(
2198
+ createParams: RosterAnswerCreateRequest,
2199
+ options?: RawAxiosRequestConfig,
2200
+ ): AxiosPromise<RosterAnswer> {
2201
+ return localVarFp
2202
+ .createRosterAnswer(createParams, options)
2203
+ .then((request) => request(axios, basePath));
2204
+ },
2205
+ /**
2206
+ *
2207
+ * @summary Updates a roster answer with the new value
2208
+ * @param {number} id Roster Answer ID
2209
+ * @param {RosterAnswerUpdateRequest} updateParams New answer value
2210
+ * @param {*} [options] Override http request option.
2211
+ * @throws {RequiredError}
2212
+ */
2213
+ updateRosterAnswer(
2214
+ id: number,
2215
+ updateParams: RosterAnswerUpdateRequest,
2216
+ options?: RawAxiosRequestConfig,
2217
+ ): AxiosPromise<RosterAnswer> {
2218
+ return localVarFp
2219
+ .updateRosterAnswer(id, updateParams, options)
2220
+ .then((request) => request(axios, basePath));
2221
+ },
2222
+ };
2223
+ };
2224
+
2225
+ /**
2226
+ * RosterAnswerApi - object-oriented interface
2227
+ * @export
2228
+ * @class RosterAnswerApi
2229
+ * @extends {BaseAPI}
2230
+ */
2231
+ export class RosterAnswerApi extends BaseAPI {
2232
+ /**
2233
+ *
2234
+ * @summary Create a new roster shift answer
2235
+ * @param {RosterAnswerCreateRequest} createParams Roster answer input
2236
+ * @param {*} [options] Override http request option.
2237
+ * @throws {RequiredError}
2238
+ * @memberof RosterAnswerApi
2239
+ */
2240
+ public createRosterAnswer(
2241
+ createParams: RosterAnswerCreateRequest,
2242
+ options?: RawAxiosRequestConfig,
2243
+ ) {
2244
+ return RosterAnswerApiFp(this.configuration)
2245
+ .createRosterAnswer(createParams, options)
2246
+ .then((request) => request(this.axios, this.basePath));
2247
+ }
2248
+
2249
+ /**
2250
+ *
2251
+ * @summary Updates a roster answer with the new value
2252
+ * @param {number} id Roster Answer ID
2253
+ * @param {RosterAnswerUpdateRequest} updateParams New answer value
2254
+ * @param {*} [options] Override http request option.
2255
+ * @throws {RequiredError}
2256
+ * @memberof RosterAnswerApi
2257
+ */
2258
+ public updateRosterAnswer(
2259
+ id: number,
2260
+ updateParams: RosterAnswerUpdateRequest,
2261
+ options?: RawAxiosRequestConfig,
2262
+ ) {
2263
+ return RosterAnswerApiFp(this.configuration)
2264
+ .updateRosterAnswer(id, updateParams, options)
2265
+ .then((request) => request(this.axios, this.basePath));
2266
+ }
2267
+ }
2268
+
2269
+ /**
2270
+ * RosterShiftApi - axios parameter creator
2271
+ * @export
2272
+ */
2273
+ export const RosterShiftApiAxiosParamCreator = function (
2274
+ configuration?: Configuration,
2275
+ ) {
2276
+ return {
2277
+ /**
2278
+ *
2279
+ * @summary Create a new roster shift
2280
+ * @param {RosterShiftCreateRequest} createParams Roster shift input
2281
+ * @param {*} [options] Override http request option.
2282
+ * @throws {RequiredError}
2283
+ */
2284
+ createRosterShift: async (
2285
+ createParams: RosterShiftCreateRequest,
2286
+ options: RawAxiosRequestConfig = {},
2287
+ ): Promise<RequestArgs> => {
2288
+ // verify required parameter 'createParams' is not null or undefined
2289
+ assertParamExists("createRosterShift", "createParams", createParams);
2290
+ const localVarPath = `/roster/shift`;
2291
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2292
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2293
+ let baseOptions;
2294
+ if (configuration) {
2295
+ baseOptions = configuration.baseOptions;
2296
+ }
2297
+
2298
+ const localVarRequestOptions = {
2299
+ method: "POST",
2300
+ ...baseOptions,
2301
+ ...options,
2302
+ };
2303
+ const localVarHeaderParameter = {} as any;
2304
+ const localVarQueryParameter = {} as any;
2305
+
2306
+ // authentication BearerAuth required
2307
+ await setApiKeyToObject(
2308
+ localVarHeaderParameter,
2309
+ "Authorization",
2310
+ configuration,
2311
+ );
2312
+
2313
+ localVarHeaderParameter["Content-Type"] = "application/json";
2314
+
2315
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2316
+ let headersFromBaseOptions =
2317
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
2318
+ localVarRequestOptions.headers = {
2319
+ ...localVarHeaderParameter,
2320
+ ...headersFromBaseOptions,
2321
+ ...options.headers,
2322
+ };
2323
+ localVarRequestOptions.data = serializeDataIfNeeded(
2324
+ createParams,
2325
+ localVarRequestOptions,
2326
+ configuration,
2327
+ );
2328
+
2329
+ return {
2330
+ url: toPathString(localVarUrlObj),
2331
+ options: localVarRequestOptions,
2332
+ };
2333
+ },
2334
+ /**
2335
+ *
2336
+ * @summary Deletes a roster shift
2337
+ * @param {number} id Roster Answer ID
2338
+ * @param {*} [options] Override http request option.
2339
+ * @throws {RequiredError}
2340
+ */
2341
+ deleteRosterShift: async (
2342
+ id: number,
2343
+ options: RawAxiosRequestConfig = {},
2344
+ ): Promise<RequestArgs> => {
2345
+ // verify required parameter 'id' is not null or undefined
2346
+ assertParamExists("deleteRosterShift", "id", id);
2347
+ const localVarPath = `/roster/shift/{id}`.replace(
2348
+ `{${"id"}}`,
2349
+ encodeURIComponent(String(id)),
2350
+ );
2351
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2352
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2353
+ let baseOptions;
2354
+ if (configuration) {
2355
+ baseOptions = configuration.baseOptions;
2356
+ }
2357
+
2358
+ const localVarRequestOptions = {
2359
+ method: "DELETE",
2360
+ ...baseOptions,
2361
+ ...options,
2362
+ };
2363
+ const localVarHeaderParameter = {} as any;
2364
+ const localVarQueryParameter = {} as any;
2365
+
2366
+ // authentication BearerAuth required
2367
+ await setApiKeyToObject(
2368
+ localVarHeaderParameter,
2369
+ "Authorization",
2370
+ configuration,
2371
+ );
2372
+
2373
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2374
+ let headersFromBaseOptions =
2375
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
2376
+ localVarRequestOptions.headers = {
2377
+ ...localVarHeaderParameter,
2378
+ ...headersFromBaseOptions,
2379
+ ...options.headers,
2380
+ };
2381
+
2382
+ return {
2383
+ url: toPathString(localVarUrlObj),
2384
+ options: localVarRequestOptions,
2385
+ };
2386
+ },
2387
+ };
2388
+ };
2389
+
2390
+ /**
2391
+ * RosterShiftApi - functional programming interface
2392
+ * @export
2393
+ */
2394
+ export const RosterShiftApiFp = function (configuration?: Configuration) {
2395
+ const localVarAxiosParamCreator =
2396
+ RosterShiftApiAxiosParamCreator(configuration);
2397
+ return {
2398
+ /**
2399
+ *
2400
+ * @summary Create a new roster shift
2401
+ * @param {RosterShiftCreateRequest} createParams Roster shift input
2402
+ * @param {*} [options] Override http request option.
2403
+ * @throws {RequiredError}
2404
+ */
2405
+ async createRosterShift(
2406
+ createParams: RosterShiftCreateRequest,
2407
+ options?: RawAxiosRequestConfig,
2408
+ ): Promise<
2409
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<RosterShift>
2410
+ > {
2411
+ const localVarAxiosArgs =
2412
+ await localVarAxiosParamCreator.createRosterShift(
2413
+ createParams,
2414
+ options,
2415
+ );
2416
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2417
+ const localVarOperationServerBasePath =
2418
+ operationServerMap["RosterShiftApi.createRosterShift"]?.[
2419
+ localVarOperationServerIndex
2420
+ ]?.url;
2421
+ return (axios, basePath) =>
2422
+ createRequestFunction(
2423
+ localVarAxiosArgs,
2424
+ globalAxios,
2425
+ BASE_PATH,
2426
+ configuration,
2427
+ )(axios, localVarOperationServerBasePath || basePath);
2428
+ },
2429
+ /**
2430
+ *
2431
+ * @summary Deletes a roster shift
2432
+ * @param {number} id Roster Answer ID
2433
+ * @param {*} [options] Override http request option.
2434
+ * @throws {RequiredError}
2435
+ */
2436
+ async deleteRosterShift(
2437
+ id: number,
2438
+ options?: RawAxiosRequestConfig,
2439
+ ): Promise<
2440
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>
2441
+ > {
2442
+ const localVarAxiosArgs =
2443
+ await localVarAxiosParamCreator.deleteRosterShift(id, options);
2444
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2445
+ const localVarOperationServerBasePath =
2446
+ operationServerMap["RosterShiftApi.deleteRosterShift"]?.[
2447
+ localVarOperationServerIndex
2448
+ ]?.url;
2449
+ return (axios, basePath) =>
2450
+ createRequestFunction(
2451
+ localVarAxiosArgs,
2452
+ globalAxios,
2453
+ BASE_PATH,
2454
+ configuration,
2455
+ )(axios, localVarOperationServerBasePath || basePath);
2456
+ },
2457
+ };
2458
+ };
2459
+
2460
+ /**
2461
+ * RosterShiftApi - factory interface
2462
+ * @export
2463
+ */
2464
+ export const RosterShiftApiFactory = function (
2465
+ configuration?: Configuration,
2466
+ basePath?: string,
2467
+ axios?: AxiosInstance,
2468
+ ) {
2469
+ const localVarFp = RosterShiftApiFp(configuration);
2470
+ return {
2471
+ /**
2472
+ *
2473
+ * @summary Create a new roster shift
2474
+ * @param {RosterShiftCreateRequest} createParams Roster shift input
2475
+ * @param {*} [options] Override http request option.
2476
+ * @throws {RequiredError}
2477
+ */
2478
+ createRosterShift(
2479
+ createParams: RosterShiftCreateRequest,
2480
+ options?: RawAxiosRequestConfig,
2481
+ ): AxiosPromise<RosterShift> {
2482
+ return localVarFp
2483
+ .createRosterShift(createParams, options)
2484
+ .then((request) => request(axios, basePath));
2485
+ },
2486
+ /**
2487
+ *
2488
+ * @summary Deletes a roster shift
2489
+ * @param {number} id Roster Answer ID
2490
+ * @param {*} [options] Override http request option.
2491
+ * @throws {RequiredError}
2492
+ */
2493
+ deleteRosterShift(
2494
+ id: number,
2495
+ options?: RawAxiosRequestConfig,
2496
+ ): AxiosPromise<string> {
2497
+ return localVarFp
2498
+ .deleteRosterShift(id, options)
2499
+ .then((request) => request(axios, basePath));
2500
+ },
2501
+ };
2502
+ };
2503
+
2504
+ /**
2505
+ * RosterShiftApi - object-oriented interface
2506
+ * @export
2507
+ * @class RosterShiftApi
2508
+ * @extends {BaseAPI}
2509
+ */
2510
+ export class RosterShiftApi extends BaseAPI {
2511
+ /**
2512
+ *
2513
+ * @summary Create a new roster shift
2514
+ * @param {RosterShiftCreateRequest} createParams Roster shift input
2515
+ * @param {*} [options] Override http request option.
2516
+ * @throws {RequiredError}
2517
+ * @memberof RosterShiftApi
2518
+ */
2519
+ public createRosterShift(
2520
+ createParams: RosterShiftCreateRequest,
2521
+ options?: RawAxiosRequestConfig,
2522
+ ) {
2523
+ return RosterShiftApiFp(this.configuration)
2524
+ .createRosterShift(createParams, options)
2525
+ .then((request) => request(this.axios, this.basePath));
2526
+ }
2527
+
2528
+ /**
2529
+ *
2530
+ * @summary Deletes a roster shift
2531
+ * @param {number} id Roster Answer ID
2532
+ * @param {*} [options] Override http request option.
2533
+ * @throws {RequiredError}
2534
+ * @memberof RosterShiftApi
2535
+ */
2536
+ public deleteRosterShift(id: number, options?: RawAxiosRequestConfig) {
2537
+ return RosterShiftApiFp(this.configuration)
2538
+ .deleteRosterShift(id, options)
2539
+ .then((request) => request(this.axios, this.basePath));
2540
+ }
2541
+ }
2542
+
2543
+ /**
2544
+ * SavedShiftApi - axios parameter creator
2545
+ * @export
2546
+ */
2547
+ export const SavedShiftApiAxiosParamCreator = function (
2548
+ configuration?: Configuration,
2549
+ ) {
2550
+ return {
2551
+ /**
2552
+ *
2553
+ * @summary Get all saved shifts for a specific roster
2554
+ * @param {number} id Roster ID
2555
+ * @param {*} [options] Override http request option.
2556
+ * @throws {RequiredError}
2557
+ */
2558
+ getSavedRoster: async (
2559
+ id: number,
2560
+ options: RawAxiosRequestConfig = {},
2561
+ ): Promise<RequestArgs> => {
2562
+ // verify required parameter 'id' is not null or undefined
2563
+ assertParamExists("getSavedRoster", "id", id);
2564
+ const localVarPath = `/roster/saved-shift/{id}`.replace(
2565
+ `{${"id"}}`,
2566
+ encodeURIComponent(String(id)),
2567
+ );
2568
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2569
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2570
+ let baseOptions;
2571
+ if (configuration) {
2572
+ baseOptions = configuration.baseOptions;
2573
+ }
2574
+
2575
+ const localVarRequestOptions = {
2576
+ method: "GET",
2577
+ ...baseOptions,
2578
+ ...options,
2579
+ };
2580
+ const localVarHeaderParameter = {} as any;
2581
+ const localVarQueryParameter = {} as any;
2582
+
2583
+ // authentication BearerAuth required
2584
+ await setApiKeyToObject(
2585
+ localVarHeaderParameter,
2586
+ "Authorization",
2587
+ configuration,
2588
+ );
2589
+
2590
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2591
+ let headersFromBaseOptions =
2592
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
2593
+ localVarRequestOptions.headers = {
2594
+ ...localVarHeaderParameter,
2595
+ ...headersFromBaseOptions,
2596
+ ...options.headers,
2597
+ };
2598
+
2599
+ return {
2600
+ url: toPathString(localVarUrlObj),
2601
+ options: localVarRequestOptions,
2602
+ };
2603
+ },
2604
+ /**
2605
+ *
2606
+ * @summary Save a specific roster
2607
+ * @param {number} id Roster ID
2608
+ * @param {*} [options] Override http request option.
2609
+ * @throws {RequiredError}
2610
+ */
2611
+ rosterSave: async (
2612
+ id: number,
2613
+ options: RawAxiosRequestConfig = {},
2614
+ ): Promise<RequestArgs> => {
2615
+ // verify required parameter 'id' is not null or undefined
2616
+ assertParamExists("rosterSave", "id", id);
2617
+ const localVarPath = `/roster/{id}/save`.replace(
2618
+ `{${"id"}}`,
2619
+ encodeURIComponent(String(id)),
2620
+ );
2621
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2622
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2623
+ let baseOptions;
2624
+ if (configuration) {
2625
+ baseOptions = configuration.baseOptions;
2626
+ }
2627
+
2628
+ const localVarRequestOptions = {
2629
+ method: "POST",
2630
+ ...baseOptions,
2631
+ ...options,
2632
+ };
2633
+ const localVarHeaderParameter = {} as any;
2634
+ const localVarQueryParameter = {} as any;
2635
+
2636
+ // authentication BearerAuth required
2637
+ await setApiKeyToObject(
2638
+ localVarHeaderParameter,
2639
+ "Authorization",
2640
+ configuration,
2641
+ );
2642
+
2643
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2644
+ let headersFromBaseOptions =
2645
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
2646
+ localVarRequestOptions.headers = {
2647
+ ...localVarHeaderParameter,
2648
+ ...headersFromBaseOptions,
2649
+ ...options.headers,
2650
+ };
2651
+
2652
+ return {
2653
+ url: toPathString(localVarUrlObj),
2654
+ options: localVarRequestOptions,
2655
+ };
2656
+ },
2657
+ /**
2658
+ *
2659
+ * @summary Update a specific saved shift
2660
+ * @param {number} id SavedShift ID
2661
+ * @param {SavedShiftUpdateRequest} updateParams Update data
2662
+ * @param {*} [options] Override http request option.
2663
+ * @throws {RequiredError}
2664
+ */
2665
+ updateSavedShift: async (
2666
+ id: number,
2667
+ updateParams: SavedShiftUpdateRequest,
2668
+ options: RawAxiosRequestConfig = {},
2669
+ ): Promise<RequestArgs> => {
2670
+ // verify required parameter 'id' is not null or undefined
2671
+ assertParamExists("updateSavedShift", "id", id);
2672
+ // verify required parameter 'updateParams' is not null or undefined
2673
+ assertParamExists("updateSavedShift", "updateParams", updateParams);
2674
+ const localVarPath = `/roster/saved-shift/{id}`.replace(
2675
+ `{${"id"}}`,
2676
+ encodeURIComponent(String(id)),
2677
+ );
2678
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2679
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2680
+ let baseOptions;
2681
+ if (configuration) {
2682
+ baseOptions = configuration.baseOptions;
2683
+ }
2684
+
2685
+ const localVarRequestOptions = {
2686
+ method: "PATCH",
2687
+ ...baseOptions,
2688
+ ...options,
2689
+ };
2690
+ const localVarHeaderParameter = {} as any;
2691
+ const localVarQueryParameter = {} as any;
2692
+
2693
+ // authentication BearerAuth required
2694
+ await setApiKeyToObject(
2695
+ localVarHeaderParameter,
2696
+ "Authorization",
2697
+ configuration,
2698
+ );
2699
+
2700
+ localVarHeaderParameter["Content-Type"] = "application/json";
2701
+
2702
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2703
+ let headersFromBaseOptions =
2704
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
2705
+ localVarRequestOptions.headers = {
2706
+ ...localVarHeaderParameter,
2707
+ ...headersFromBaseOptions,
2708
+ ...options.headers,
2709
+ };
2710
+ localVarRequestOptions.data = serializeDataIfNeeded(
2711
+ updateParams,
2712
+ localVarRequestOptions,
2713
+ configuration,
2714
+ );
2715
+
2716
+ return {
2717
+ url: toPathString(localVarUrlObj),
2718
+ options: localVarRequestOptions,
2719
+ };
2720
+ },
2721
+ };
2722
+ };
2723
+
2724
+ /**
2725
+ * SavedShiftApi - functional programming interface
2726
+ * @export
2727
+ */
2728
+ export const SavedShiftApiFp = function (configuration?: Configuration) {
2729
+ const localVarAxiosParamCreator =
2730
+ SavedShiftApiAxiosParamCreator(configuration);
2731
+ return {
2732
+ /**
2733
+ *
2734
+ * @summary Get all saved shifts for a specific roster
2735
+ * @param {number} id Roster ID
2736
+ * @param {*} [options] Override http request option.
2737
+ * @throws {RequiredError}
2738
+ */
2739
+ async getSavedRoster(
2740
+ id: number,
2741
+ options?: RawAxiosRequestConfig,
2742
+ ): Promise<
2743
+ (
2744
+ axios?: AxiosInstance,
2745
+ basePath?: string,
2746
+ ) => AxiosPromise<Array<SavedShift>>
2747
+ > {
2748
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getSavedRoster(
2749
+ id,
2750
+ options,
2751
+ );
2752
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2753
+ const localVarOperationServerBasePath =
2754
+ operationServerMap["SavedShiftApi.getSavedRoster"]?.[
2755
+ localVarOperationServerIndex
2756
+ ]?.url;
2757
+ return (axios, basePath) =>
2758
+ createRequestFunction(
2759
+ localVarAxiosArgs,
2760
+ globalAxios,
2761
+ BASE_PATH,
2762
+ configuration,
2763
+ )(axios, localVarOperationServerBasePath || basePath);
2764
+ },
2765
+ /**
2766
+ *
2767
+ * @summary Save a specific roster
2768
+ * @param {number} id Roster ID
2769
+ * @param {*} [options] Override http request option.
2770
+ * @throws {RequiredError}
2771
+ */
2772
+ async rosterSave(
2773
+ id: number,
2774
+ options?: RawAxiosRequestConfig,
2775
+ ): Promise<
2776
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>
2777
+ > {
2778
+ const localVarAxiosArgs = await localVarAxiosParamCreator.rosterSave(
2779
+ id,
2780
+ options,
2781
+ );
2782
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2783
+ const localVarOperationServerBasePath =
2784
+ operationServerMap["SavedShiftApi.rosterSave"]?.[
2785
+ localVarOperationServerIndex
2786
+ ]?.url;
2787
+ return (axios, basePath) =>
2788
+ createRequestFunction(
2789
+ localVarAxiosArgs,
2790
+ globalAxios,
2791
+ BASE_PATH,
2792
+ configuration,
2793
+ )(axios, localVarOperationServerBasePath || basePath);
2794
+ },
2795
+ /**
2796
+ *
2797
+ * @summary Update a specific saved shift
2798
+ * @param {number} id SavedShift ID
2799
+ * @param {SavedShiftUpdateRequest} updateParams Update data
2800
+ * @param {*} [options] Override http request option.
2801
+ * @throws {RequiredError}
2802
+ */
2803
+ async updateSavedShift(
2804
+ id: number,
2805
+ updateParams: SavedShiftUpdateRequest,
2806
+ options?: RawAxiosRequestConfig,
2807
+ ): Promise<
2808
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<SavedShift>
2809
+ > {
2810
+ const localVarAxiosArgs =
2811
+ await localVarAxiosParamCreator.updateSavedShift(
2812
+ id,
2813
+ updateParams,
2814
+ options,
2815
+ );
2816
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2817
+ const localVarOperationServerBasePath =
2818
+ operationServerMap["SavedShiftApi.updateSavedShift"]?.[
2819
+ localVarOperationServerIndex
2820
+ ]?.url;
2821
+ return (axios, basePath) =>
2822
+ createRequestFunction(
2823
+ localVarAxiosArgs,
2824
+ globalAxios,
2825
+ BASE_PATH,
2826
+ configuration,
2827
+ )(axios, localVarOperationServerBasePath || basePath);
2828
+ },
2829
+ };
2830
+ };
2831
+
2832
+ /**
2833
+ * SavedShiftApi - factory interface
2834
+ * @export
2835
+ */
2836
+ export const SavedShiftApiFactory = function (
2837
+ configuration?: Configuration,
2838
+ basePath?: string,
2839
+ axios?: AxiosInstance,
2840
+ ) {
2841
+ const localVarFp = SavedShiftApiFp(configuration);
2842
+ return {
2843
+ /**
2844
+ *
2845
+ * @summary Get all saved shifts for a specific roster
2846
+ * @param {number} id Roster ID
2847
+ * @param {*} [options] Override http request option.
2848
+ * @throws {RequiredError}
2849
+ */
2850
+ getSavedRoster(
2851
+ id: number,
2852
+ options?: RawAxiosRequestConfig,
2853
+ ): AxiosPromise<Array<SavedShift>> {
2854
+ return localVarFp
2855
+ .getSavedRoster(id, options)
2856
+ .then((request) => request(axios, basePath));
2857
+ },
2858
+ /**
2859
+ *
2860
+ * @summary Save a specific roster
2861
+ * @param {number} id Roster ID
2862
+ * @param {*} [options] Override http request option.
2863
+ * @throws {RequiredError}
2864
+ */
2865
+ rosterSave(
2866
+ id: number,
2867
+ options?: RawAxiosRequestConfig,
2868
+ ): AxiosPromise<string> {
2869
+ return localVarFp
2870
+ .rosterSave(id, options)
2871
+ .then((request) => request(axios, basePath));
2872
+ },
2873
+ /**
2874
+ *
2875
+ * @summary Update a specific saved shift
2876
+ * @param {number} id SavedShift ID
2877
+ * @param {SavedShiftUpdateRequest} updateParams Update data
2878
+ * @param {*} [options] Override http request option.
2879
+ * @throws {RequiredError}
2880
+ */
2881
+ updateSavedShift(
2882
+ id: number,
2883
+ updateParams: SavedShiftUpdateRequest,
2884
+ options?: RawAxiosRequestConfig,
2885
+ ): AxiosPromise<SavedShift> {
2886
+ return localVarFp
2887
+ .updateSavedShift(id, updateParams, options)
2888
+ .then((request) => request(axios, basePath));
2889
+ },
2890
+ };
2891
+ };
2892
+
2893
+ /**
2894
+ * SavedShiftApi - object-oriented interface
2895
+ * @export
2896
+ * @class SavedShiftApi
2897
+ * @extends {BaseAPI}
2898
+ */
2899
+ export class SavedShiftApi extends BaseAPI {
2900
+ /**
2901
+ *
2902
+ * @summary Get all saved shifts for a specific roster
2903
+ * @param {number} id Roster ID
2904
+ * @param {*} [options] Override http request option.
2905
+ * @throws {RequiredError}
2906
+ * @memberof SavedShiftApi
2907
+ */
2908
+ public getSavedRoster(id: number, options?: RawAxiosRequestConfig) {
2909
+ return SavedShiftApiFp(this.configuration)
2910
+ .getSavedRoster(id, options)
2911
+ .then((request) => request(this.axios, this.basePath));
2912
+ }
2913
+
2914
+ /**
2915
+ *
2916
+ * @summary Save a specific roster
2917
+ * @param {number} id Roster ID
2918
+ * @param {*} [options] Override http request option.
2919
+ * @throws {RequiredError}
2920
+ * @memberof SavedShiftApi
2921
+ */
2922
+ public rosterSave(id: number, options?: RawAxiosRequestConfig) {
2923
+ return SavedShiftApiFp(this.configuration)
2924
+ .rosterSave(id, options)
2925
+ .then((request) => request(this.axios, this.basePath));
2926
+ }
2927
+
2928
+ /**
2929
+ *
2930
+ * @summary Update a specific saved shift
2931
+ * @param {number} id SavedShift ID
2932
+ * @param {SavedShiftUpdateRequest} updateParams Update data
2933
+ * @param {*} [options] Override http request option.
2934
+ * @throws {RequiredError}
2935
+ * @memberof SavedShiftApi
2936
+ */
2937
+ public updateSavedShift(
2938
+ id: number,
2939
+ updateParams: SavedShiftUpdateRequest,
2940
+ options?: RawAxiosRequestConfig,
2941
+ ) {
2942
+ return SavedShiftApiFp(this.configuration)
2943
+ .updateSavedShift(id, updateParams, options)
2944
+ .then((request) => request(this.axios, this.basePath));
2945
+ }
2946
+ }
2947
+
2948
+ /**
2949
+ * UserApi - axios parameter creator
2950
+ * @export
2951
+ */
2952
+ export const UserApiAxiosParamCreator = function (
2953
+ configuration?: Configuration,
2954
+ ) {
2955
+ return {
2956
+ /**
2957
+ * create user
2958
+ * @summary CreateRoster a new user
2959
+ * @param {UserCreateRequest} createParams User input
2960
+ * @param {*} [options] Override http request option.
2961
+ * @throws {RequiredError}
2962
+ */
2963
+ userCreatePost: async (
2964
+ createParams: UserCreateRequest,
2965
+ options: RawAxiosRequestConfig = {},
2966
+ ): Promise<RequestArgs> => {
2967
+ // verify required parameter 'createParams' is not null or undefined
2968
+ assertParamExists("userCreatePost", "createParams", createParams);
2969
+ const localVarPath = `/user/create`;
2970
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2971
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2972
+ let baseOptions;
2973
+ if (configuration) {
2974
+ baseOptions = configuration.baseOptions;
2975
+ }
2976
+
2977
+ const localVarRequestOptions = {
2978
+ method: "POST",
2979
+ ...baseOptions,
2980
+ ...options,
2981
+ };
2982
+ const localVarHeaderParameter = {} as any;
2983
+ const localVarQueryParameter = {} as any;
2984
+
2985
+ // authentication BearerAuth required
2986
+ await setApiKeyToObject(
2987
+ localVarHeaderParameter,
2988
+ "Authorization",
2989
+ configuration,
2990
+ );
2991
+
2992
+ localVarHeaderParameter["Content-Type"] = "application/json";
2993
+
2994
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2995
+ let headersFromBaseOptions =
2996
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
2997
+ localVarRequestOptions.headers = {
2998
+ ...localVarHeaderParameter,
2999
+ ...headersFromBaseOptions,
3000
+ ...options.headers,
3001
+ };
3002
+ localVarRequestOptions.data = serializeDataIfNeeded(
3003
+ createParams,
3004
+ localVarRequestOptions,
3005
+ configuration,
3006
+ );
3007
+
3008
+ return {
3009
+ url: toPathString(localVarUrlObj),
3010
+ options: localVarRequestOptions,
3011
+ };
3012
+ },
3013
+ /**
3014
+ * Retrieve a list of users with optional query parameter filtering
3015
+ * @summary Get all users with optional filtering
3016
+ * @param {number} [organId] Organ ID
3017
+ * @param {number} [gewisId] GEWIS ID
3018
+ * @param {*} [options] Override http request option.
3019
+ * @throws {RequiredError}
3020
+ */
3021
+ userGet: async (
3022
+ organId?: number,
3023
+ gewisId?: number,
3024
+ options: RawAxiosRequestConfig = {},
3025
+ ): Promise<RequestArgs> => {
3026
+ const localVarPath = `/user/`;
3027
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3028
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3029
+ let baseOptions;
3030
+ if (configuration) {
3031
+ baseOptions = configuration.baseOptions;
3032
+ }
3033
+
3034
+ const localVarRequestOptions = {
3035
+ method: "GET",
3036
+ ...baseOptions,
3037
+ ...options,
3038
+ };
3039
+ const localVarHeaderParameter = {} as any;
3040
+ const localVarQueryParameter = {} as any;
3041
+
3042
+ // authentication BearerAuth required
3043
+ await setApiKeyToObject(
3044
+ localVarHeaderParameter,
3045
+ "Authorization",
3046
+ configuration,
3047
+ );
3048
+
3049
+ if (organId !== undefined) {
3050
+ localVarQueryParameter["organId"] = organId;
3051
+ }
3052
+
3053
+ if (gewisId !== undefined) {
3054
+ localVarQueryParameter["gewisId"] = gewisId;
3055
+ }
3056
+
3057
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3058
+ let headersFromBaseOptions =
3059
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
3060
+ localVarRequestOptions.headers = {
3061
+ ...localVarHeaderParameter,
3062
+ ...headersFromBaseOptions,
3063
+ ...options.headers,
3064
+ };
3065
+
3066
+ return {
3067
+ url: toPathString(localVarUrlObj),
3068
+ options: localVarRequestOptions,
3069
+ };
3070
+ },
3071
+ /**
3072
+ *
3073
+ * @summary DeleteRoster a user
3074
+ * @param {number} id User ID
3075
+ * @param {*} [options] Override http request option.
3076
+ * @throws {RequiredError}
3077
+ */
3078
+ userIdDelete: async (
3079
+ id: number,
3080
+ options: RawAxiosRequestConfig = {},
3081
+ ): Promise<RequestArgs> => {
3082
+ // verify required parameter 'id' is not null or undefined
3083
+ assertParamExists("userIdDelete", "id", id);
3084
+ const localVarPath = `/user/{id}`.replace(
3085
+ `{${"id"}}`,
3086
+ encodeURIComponent(String(id)),
3087
+ );
3088
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3089
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3090
+ let baseOptions;
3091
+ if (configuration) {
3092
+ baseOptions = configuration.baseOptions;
3093
+ }
3094
+
3095
+ const localVarRequestOptions = {
3096
+ method: "DELETE",
3097
+ ...baseOptions,
3098
+ ...options,
3099
+ };
3100
+ const localVarHeaderParameter = {} as any;
3101
+ const localVarQueryParameter = {} as any;
3102
+
3103
+ // authentication BearerAuth required
3104
+ await setApiKeyToObject(
3105
+ localVarHeaderParameter,
3106
+ "Authorization",
3107
+ configuration,
3108
+ );
3109
+
3110
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3111
+ let headersFromBaseOptions =
3112
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
3113
+ localVarRequestOptions.headers = {
3114
+ ...localVarHeaderParameter,
3115
+ ...headersFromBaseOptions,
3116
+ ...options.headers,
3117
+ };
3118
+
3119
+ return {
3120
+ url: toPathString(localVarUrlObj),
3121
+ options: localVarRequestOptions,
3122
+ };
3123
+ },
3124
+ /**
3125
+ * Retrieve a specific user by their unique ID
3126
+ * @summary Get user by ID
3127
+ * @param {number} id User ID
3128
+ * @param {*} [options] Override http request option.
3129
+ * @throws {RequiredError}
3130
+ */
3131
+ userIdGet: async (
3132
+ id: number,
3133
+ options: RawAxiosRequestConfig = {},
3134
+ ): Promise<RequestArgs> => {
3135
+ // verify required parameter 'id' is not null or undefined
3136
+ assertParamExists("userIdGet", "id", id);
3137
+ const localVarPath = `/user/{id}`.replace(
3138
+ `{${"id"}}`,
3139
+ encodeURIComponent(String(id)),
3140
+ );
3141
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3142
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3143
+ let baseOptions;
3144
+ if (configuration) {
3145
+ baseOptions = configuration.baseOptions;
3146
+ }
3147
+
3148
+ const localVarRequestOptions = {
3149
+ method: "GET",
3150
+ ...baseOptions,
3151
+ ...options,
3152
+ };
3153
+ const localVarHeaderParameter = {} as any;
3154
+ const localVarQueryParameter = {} as any;
3155
+
3156
+ // authentication BearerAuth required
3157
+ await setApiKeyToObject(
3158
+ localVarHeaderParameter,
3159
+ "Authorization",
3160
+ configuration,
3161
+ );
3162
+
3163
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3164
+ let headersFromBaseOptions =
3165
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
3166
+ localVarRequestOptions.headers = {
3167
+ ...localVarHeaderParameter,
3168
+ ...headersFromBaseOptions,
3169
+ ...options.headers,
3170
+ };
3171
+
3172
+ return {
3173
+ url: toPathString(localVarUrlObj),
3174
+ options: localVarRequestOptions,
3175
+ };
3176
+ },
3177
+ };
3178
+ };
3179
+
3180
+ /**
3181
+ * UserApi - functional programming interface
3182
+ * @export
3183
+ */
3184
+ export const UserApiFp = function (configuration?: Configuration) {
3185
+ const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration);
3186
+ return {
3187
+ /**
3188
+ * create user
3189
+ * @summary CreateRoster a new user
3190
+ * @param {UserCreateRequest} createParams User input
3191
+ * @param {*} [options] Override http request option.
3192
+ * @throws {RequiredError}
3193
+ */
3194
+ async userCreatePost(
3195
+ createParams: UserCreateRequest,
3196
+ options?: RawAxiosRequestConfig,
3197
+ ): Promise<
3198
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>
3199
+ > {
3200
+ const localVarAxiosArgs = await localVarAxiosParamCreator.userCreatePost(
3201
+ createParams,
3202
+ options,
3203
+ );
3204
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3205
+ const localVarOperationServerBasePath =
3206
+ operationServerMap["UserApi.userCreatePost"]?.[
3207
+ localVarOperationServerIndex
3208
+ ]?.url;
3209
+ return (axios, basePath) =>
3210
+ createRequestFunction(
3211
+ localVarAxiosArgs,
3212
+ globalAxios,
3213
+ BASE_PATH,
3214
+ configuration,
3215
+ )(axios, localVarOperationServerBasePath || basePath);
3216
+ },
3217
+ /**
3218
+ * Retrieve a list of users with optional query parameter filtering
3219
+ * @summary Get all users with optional filtering
3220
+ * @param {number} [organId] Organ ID
3221
+ * @param {number} [gewisId] GEWIS ID
3222
+ * @param {*} [options] Override http request option.
3223
+ * @throws {RequiredError}
3224
+ */
3225
+ async userGet(
3226
+ organId?: number,
3227
+ gewisId?: number,
3228
+ options?: RawAxiosRequestConfig,
3229
+ ): Promise<
3230
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<User>>
3231
+ > {
3232
+ const localVarAxiosArgs = await localVarAxiosParamCreator.userGet(
3233
+ organId,
3234
+ gewisId,
3235
+ options,
3236
+ );
3237
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3238
+ const localVarOperationServerBasePath =
3239
+ operationServerMap["UserApi.userGet"]?.[localVarOperationServerIndex]
3240
+ ?.url;
3241
+ return (axios, basePath) =>
3242
+ createRequestFunction(
3243
+ localVarAxiosArgs,
3244
+ globalAxios,
3245
+ BASE_PATH,
3246
+ configuration,
3247
+ )(axios, localVarOperationServerBasePath || basePath);
3248
+ },
3249
+ /**
3250
+ *
3251
+ * @summary DeleteRoster a user
3252
+ * @param {number} id User ID
3253
+ * @param {*} [options] Override http request option.
3254
+ * @throws {RequiredError}
3255
+ */
3256
+ async userIdDelete(
3257
+ id: number,
3258
+ options?: RawAxiosRequestConfig,
3259
+ ): Promise<
3260
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>
3261
+ > {
3262
+ const localVarAxiosArgs = await localVarAxiosParamCreator.userIdDelete(
3263
+ id,
3264
+ options,
3265
+ );
3266
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3267
+ const localVarOperationServerBasePath =
3268
+ operationServerMap["UserApi.userIdDelete"]?.[
3269
+ localVarOperationServerIndex
3270
+ ]?.url;
3271
+ return (axios, basePath) =>
3272
+ createRequestFunction(
3273
+ localVarAxiosArgs,
3274
+ globalAxios,
3275
+ BASE_PATH,
3276
+ configuration,
3277
+ )(axios, localVarOperationServerBasePath || basePath);
3278
+ },
3279
+ /**
3280
+ * Retrieve a specific user by their unique ID
3281
+ * @summary Get user by ID
3282
+ * @param {number} id User ID
3283
+ * @param {*} [options] Override http request option.
3284
+ * @throws {RequiredError}
3285
+ */
3286
+ async userIdGet(
3287
+ id: number,
3288
+ options?: RawAxiosRequestConfig,
3289
+ ): Promise<
3290
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>
3291
+ > {
3292
+ const localVarAxiosArgs = await localVarAxiosParamCreator.userIdGet(
3293
+ id,
3294
+ options,
3295
+ );
3296
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3297
+ const localVarOperationServerBasePath =
3298
+ operationServerMap["UserApi.userIdGet"]?.[localVarOperationServerIndex]
3299
+ ?.url;
3300
+ return (axios, basePath) =>
3301
+ createRequestFunction(
3302
+ localVarAxiosArgs,
3303
+ globalAxios,
3304
+ BASE_PATH,
3305
+ configuration,
3306
+ )(axios, localVarOperationServerBasePath || basePath);
3307
+ },
3308
+ };
3309
+ };
3310
+
3311
+ /**
3312
+ * UserApi - factory interface
3313
+ * @export
3314
+ */
3315
+ export const UserApiFactory = function (
3316
+ configuration?: Configuration,
3317
+ basePath?: string,
3318
+ axios?: AxiosInstance,
3319
+ ) {
3320
+ const localVarFp = UserApiFp(configuration);
3321
+ return {
3322
+ /**
3323
+ * create user
3324
+ * @summary CreateRoster a new user
3325
+ * @param {UserCreateRequest} createParams User input
3326
+ * @param {*} [options] Override http request option.
3327
+ * @throws {RequiredError}
3328
+ */
3329
+ userCreatePost(
3330
+ createParams: UserCreateRequest,
3331
+ options?: RawAxiosRequestConfig,
3332
+ ): AxiosPromise<User> {
3333
+ return localVarFp
3334
+ .userCreatePost(createParams, options)
3335
+ .then((request) => request(axios, basePath));
3336
+ },
3337
+ /**
3338
+ * Retrieve a list of users with optional query parameter filtering
3339
+ * @summary Get all users with optional filtering
3340
+ * @param {number} [organId] Organ ID
3341
+ * @param {number} [gewisId] GEWIS ID
3342
+ * @param {*} [options] Override http request option.
3343
+ * @throws {RequiredError}
3344
+ */
3345
+ userGet(
3346
+ organId?: number,
3347
+ gewisId?: number,
3348
+ options?: RawAxiosRequestConfig,
3349
+ ): AxiosPromise<Array<User>> {
3350
+ return localVarFp
3351
+ .userGet(organId, gewisId, options)
3352
+ .then((request) => request(axios, basePath));
3353
+ },
3354
+ /**
3355
+ *
3356
+ * @summary DeleteRoster a user
3357
+ * @param {number} id User ID
3358
+ * @param {*} [options] Override http request option.
3359
+ * @throws {RequiredError}
3360
+ */
3361
+ userIdDelete(
3362
+ id: number,
3363
+ options?: RawAxiosRequestConfig,
3364
+ ): AxiosPromise<string> {
3365
+ return localVarFp
3366
+ .userIdDelete(id, options)
3367
+ .then((request) => request(axios, basePath));
3368
+ },
3369
+ /**
3370
+ * Retrieve a specific user by their unique ID
3371
+ * @summary Get user by ID
3372
+ * @param {number} id User ID
3373
+ * @param {*} [options] Override http request option.
3374
+ * @throws {RequiredError}
3375
+ */
3376
+ userIdGet(id: number, options?: RawAxiosRequestConfig): AxiosPromise<User> {
3377
+ return localVarFp
3378
+ .userIdGet(id, options)
3379
+ .then((request) => request(axios, basePath));
3380
+ },
3381
+ };
3382
+ };
3383
+
3384
+ /**
3385
+ * UserApi - object-oriented interface
3386
+ * @export
3387
+ * @class UserApi
3388
+ * @extends {BaseAPI}
3389
+ */
3390
+ export class UserApi extends BaseAPI {
3391
+ /**
3392
+ * create user
3393
+ * @summary CreateRoster a new user
3394
+ * @param {UserCreateRequest} createParams User input
3395
+ * @param {*} [options] Override http request option.
3396
+ * @throws {RequiredError}
3397
+ * @memberof UserApi
3398
+ */
3399
+ public userCreatePost(
3400
+ createParams: UserCreateRequest,
3401
+ options?: RawAxiosRequestConfig,
3402
+ ) {
3403
+ return UserApiFp(this.configuration)
3404
+ .userCreatePost(createParams, options)
3405
+ .then((request) => request(this.axios, this.basePath));
3406
+ }
3407
+
3408
+ /**
3409
+ * Retrieve a list of users with optional query parameter filtering
3410
+ * @summary Get all users with optional filtering
3411
+ * @param {number} [organId] Organ ID
3412
+ * @param {number} [gewisId] GEWIS ID
3413
+ * @param {*} [options] Override http request option.
3414
+ * @throws {RequiredError}
3415
+ * @memberof UserApi
3416
+ */
3417
+ public userGet(
3418
+ organId?: number,
3419
+ gewisId?: number,
3420
+ options?: RawAxiosRequestConfig,
3421
+ ) {
3422
+ return UserApiFp(this.configuration)
3423
+ .userGet(organId, gewisId, options)
3424
+ .then((request) => request(this.axios, this.basePath));
3425
+ }
3426
+
3427
+ /**
3428
+ *
3429
+ * @summary DeleteRoster a user
3430
+ * @param {number} id User ID
3431
+ * @param {*} [options] Override http request option.
3432
+ * @throws {RequiredError}
3433
+ * @memberof UserApi
3434
+ */
3435
+ public userIdDelete(id: number, options?: RawAxiosRequestConfig) {
3436
+ return UserApiFp(this.configuration)
3437
+ .userIdDelete(id, options)
3438
+ .then((request) => request(this.axios, this.basePath));
3439
+ }
3440
+
3441
+ /**
3442
+ * Retrieve a specific user by their unique ID
3443
+ * @summary Get user by ID
3444
+ * @param {number} id User ID
3445
+ * @param {*} [options] Override http request option.
3446
+ * @throws {RequiredError}
3447
+ * @memberof UserApi
3448
+ */
3449
+ public userIdGet(id: number, options?: RawAxiosRequestConfig) {
3450
+ return UserApiFp(this.configuration)
3451
+ .userIdGet(id, options)
3452
+ .then((request) => request(this.axios, this.basePath));
3453
+ }
3454
+ }