@goauthentik/api 2024.2.2-1712833564 → 2024.2.2-1712922569

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. package/dist/apis/AdminApi.js +60 -20
  2. package/dist/apis/AuthenticatorsApi.js +372 -124
  3. package/dist/apis/CoreApi.js +372 -124
  4. package/dist/apis/CryptoApi.js +60 -20
  5. package/dist/apis/EnterpriseApi.js +60 -20
  6. package/dist/apis/EventsApi.js +210 -70
  7. package/dist/apis/FlowsApi.js +150 -50
  8. package/dist/apis/ManagedApi.js +54 -18
  9. package/dist/apis/Oauth2Api.js +72 -24
  10. package/dist/apis/OutpostsApi.js +210 -70
  11. package/dist/apis/PoliciesApi.js +366 -122
  12. package/dist/apis/PropertymappingsApi.js +288 -96
  13. package/dist/apis/ProvidersApi.js +360 -120
  14. package/dist/apis/RacApi.js +78 -26
  15. package/dist/apis/RbacApi.js +102 -34
  16. package/dist/apis/RootApi.js +6 -2
  17. package/dist/apis/SchemaApi.js +6 -2
  18. package/dist/apis/SourcesApi.js +414 -138
  19. package/dist/apis/StagesApi.js +1002 -334
  20. package/dist/esm/apis/AdminApi.js +60 -20
  21. package/dist/esm/apis/AuthenticatorsApi.js +372 -124
  22. package/dist/esm/apis/CoreApi.js +372 -124
  23. package/dist/esm/apis/CryptoApi.js +60 -20
  24. package/dist/esm/apis/EnterpriseApi.js +60 -20
  25. package/dist/esm/apis/EventsApi.js +210 -70
  26. package/dist/esm/apis/FlowsApi.js +150 -50
  27. package/dist/esm/apis/ManagedApi.js +54 -18
  28. package/dist/esm/apis/Oauth2Api.js +72 -24
  29. package/dist/esm/apis/OutpostsApi.js +210 -70
  30. package/dist/esm/apis/PoliciesApi.js +366 -122
  31. package/dist/esm/apis/PropertymappingsApi.js +288 -96
  32. package/dist/esm/apis/ProvidersApi.js +360 -120
  33. package/dist/esm/apis/RacApi.js +78 -26
  34. package/dist/esm/apis/RbacApi.js +102 -34
  35. package/dist/esm/apis/RootApi.js +6 -2
  36. package/dist/esm/apis/SchemaApi.js +6 -2
  37. package/dist/esm/apis/SourcesApi.js +414 -138
  38. package/dist/esm/apis/StagesApi.js +1002 -334
  39. package/dist/esm/models/AuthenticatorValidateStage.d.ts +13 -0
  40. package/dist/esm/models/AuthenticatorValidateStage.js +5 -0
  41. package/dist/esm/models/AuthenticatorValidateStageRequest.d.ts +6 -0
  42. package/dist/esm/models/AuthenticatorValidateStageRequest.js +2 -0
  43. package/dist/esm/models/PatchedAuthenticatorValidateStageRequest.d.ts +6 -0
  44. package/dist/esm/models/PatchedAuthenticatorValidateStageRequest.js +2 -0
  45. package/dist/models/AuthenticatorValidateStage.d.ts +13 -0
  46. package/dist/models/AuthenticatorValidateStage.js +5 -0
  47. package/dist/models/AuthenticatorValidateStageRequest.d.ts +6 -0
  48. package/dist/models/AuthenticatorValidateStageRequest.js +2 -0
  49. package/dist/models/PatchedAuthenticatorValidateStageRequest.d.ts +6 -0
  50. package/dist/models/PatchedAuthenticatorValidateStageRequest.js +2 -0
  51. package/package.json +1 -1
  52. package/src/apis/AdminApi.ts +70 -30
  53. package/src/apis/AuthenticatorsApi.ts +434 -186
  54. package/src/apis/CoreApi.ts +434 -186
  55. package/src/apis/CryptoApi.ts +70 -30
  56. package/src/apis/EnterpriseApi.ts +70 -30
  57. package/src/apis/EventsApi.ts +245 -105
  58. package/src/apis/FlowsApi.ts +175 -75
  59. package/src/apis/ManagedApi.ts +63 -27
  60. package/src/apis/Oauth2Api.ts +84 -36
  61. package/src/apis/OutpostsApi.ts +245 -105
  62. package/src/apis/PoliciesApi.ts +427 -183
  63. package/src/apis/PropertymappingsApi.ts +336 -144
  64. package/src/apis/ProvidersApi.ts +420 -180
  65. package/src/apis/RacApi.ts +91 -39
  66. package/src/apis/RbacApi.ts +119 -51
  67. package/src/apis/RootApi.ts +7 -3
  68. package/src/apis/SchemaApi.ts +7 -3
  69. package/src/apis/SourcesApi.ts +483 -207
  70. package/src/apis/StagesApi.ts +1169 -501
  71. package/src/models/AuthenticatorValidateStage.ts +22 -0
  72. package/src/models/AuthenticatorValidateStageRequest.ts +8 -0
  73. package/src/models/PatchedAuthenticatorValidateStageRequest.ts +8 -0
@@ -36,8 +36,12 @@ export class SourcesApi extends runtime.BaseAPI {
36
36
  }
37
37
  const queryParameters = {};
38
38
  const headerParameters = {};
39
- if (this.configuration && this.configuration.apiKey) {
40
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
39
+ if (this.configuration && this.configuration.accessToken) {
40
+ const token = this.configuration.accessToken;
41
+ const tokenString = yield token("authentik", []);
42
+ if (tokenString) {
43
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
44
+ }
41
45
  }
42
46
  const response = yield this.request({
43
47
  path: `/sources/all/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -84,8 +88,12 @@ export class SourcesApi extends runtime.BaseAPI {
84
88
  queryParameters['slug'] = requestParameters.slug;
85
89
  }
86
90
  const headerParameters = {};
87
- if (this.configuration && this.configuration.apiKey) {
88
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
91
+ if (this.configuration && this.configuration.accessToken) {
92
+ const token = this.configuration.accessToken;
93
+ const tokenString = yield token("authentik", []);
94
+ if (tokenString) {
95
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
96
+ }
89
97
  }
90
98
  const response = yield this.request({
91
99
  path: `/sources/all/`,
@@ -115,8 +123,12 @@ export class SourcesApi extends runtime.BaseAPI {
115
123
  }
116
124
  const queryParameters = {};
117
125
  const headerParameters = {};
118
- if (this.configuration && this.configuration.apiKey) {
119
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
126
+ if (this.configuration && this.configuration.accessToken) {
127
+ const token = this.configuration.accessToken;
128
+ const tokenString = yield token("authentik", []);
129
+ if (tokenString) {
130
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
131
+ }
120
132
  }
121
133
  const response = yield this.request({
122
134
  path: `/sources/all/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -146,8 +158,12 @@ export class SourcesApi extends runtime.BaseAPI {
146
158
  }
147
159
  const queryParameters = {};
148
160
  const headerParameters = {};
149
- if (this.configuration && this.configuration.apiKey) {
150
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
161
+ if (this.configuration && this.configuration.accessToken) {
162
+ const token = this.configuration.accessToken;
163
+ const tokenString = yield token("authentik", []);
164
+ if (tokenString) {
165
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
166
+ }
151
167
  }
152
168
  const consumes = [
153
169
  { contentType: 'multipart/form-data' },
@@ -202,8 +218,12 @@ export class SourcesApi extends runtime.BaseAPI {
202
218
  const queryParameters = {};
203
219
  const headerParameters = {};
204
220
  headerParameters['Content-Type'] = 'application/json';
205
- if (this.configuration && this.configuration.apiKey) {
206
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
221
+ if (this.configuration && this.configuration.accessToken) {
222
+ const token = this.configuration.accessToken;
223
+ const tokenString = yield token("authentik", []);
224
+ if (tokenString) {
225
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
226
+ }
207
227
  }
208
228
  const response = yield this.request({
209
229
  path: `/sources/all/{slug}/set_icon_url/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -230,8 +250,12 @@ export class SourcesApi extends runtime.BaseAPI {
230
250
  return __awaiter(this, void 0, void 0, function* () {
231
251
  const queryParameters = {};
232
252
  const headerParameters = {};
233
- if (this.configuration && this.configuration.apiKey) {
234
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
253
+ if (this.configuration && this.configuration.accessToken) {
254
+ const token = this.configuration.accessToken;
255
+ const tokenString = yield token("authentik", []);
256
+ if (tokenString) {
257
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
258
+ }
235
259
  }
236
260
  const response = yield this.request({
237
261
  path: `/sources/all/types/`,
@@ -261,8 +285,12 @@ export class SourcesApi extends runtime.BaseAPI {
261
285
  }
262
286
  const queryParameters = {};
263
287
  const headerParameters = {};
264
- if (this.configuration && this.configuration.apiKey) {
265
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
288
+ if (this.configuration && this.configuration.accessToken) {
289
+ const token = this.configuration.accessToken;
290
+ const tokenString = yield token("authentik", []);
291
+ if (tokenString) {
292
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
293
+ }
266
294
  }
267
295
  const response = yield this.request({
268
296
  path: `/sources/all/{slug}/used_by/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -289,8 +317,12 @@ export class SourcesApi extends runtime.BaseAPI {
289
317
  return __awaiter(this, void 0, void 0, function* () {
290
318
  const queryParameters = {};
291
319
  const headerParameters = {};
292
- if (this.configuration && this.configuration.apiKey) {
293
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
320
+ if (this.configuration && this.configuration.accessToken) {
321
+ const token = this.configuration.accessToken;
322
+ const tokenString = yield token("authentik", []);
323
+ if (tokenString) {
324
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
325
+ }
294
326
  }
295
327
  const response = yield this.request({
296
328
  path: `/sources/all/user_settings/`,
@@ -321,8 +353,12 @@ export class SourcesApi extends runtime.BaseAPI {
321
353
  const queryParameters = {};
322
354
  const headerParameters = {};
323
355
  headerParameters['Content-Type'] = 'application/json';
324
- if (this.configuration && this.configuration.apiKey) {
325
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
356
+ if (this.configuration && this.configuration.accessToken) {
357
+ const token = this.configuration.accessToken;
358
+ const tokenString = yield token("authentik", []);
359
+ if (tokenString) {
360
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
361
+ }
326
362
  }
327
363
  const response = yield this.request({
328
364
  path: `/sources/ldap/`,
@@ -353,8 +389,12 @@ export class SourcesApi extends runtime.BaseAPI {
353
389
  }
354
390
  const queryParameters = {};
355
391
  const headerParameters = {};
356
- if (this.configuration && this.configuration.apiKey) {
357
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
392
+ if (this.configuration && this.configuration.accessToken) {
393
+ const token = this.configuration.accessToken;
394
+ const tokenString = yield token("authentik", []);
395
+ if (tokenString) {
396
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
397
+ }
358
398
  }
359
399
  const response = yield this.request({
360
400
  path: `/sources/ldap/{slug}/debug/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -384,8 +424,12 @@ export class SourcesApi extends runtime.BaseAPI {
384
424
  }
385
425
  const queryParameters = {};
386
426
  const headerParameters = {};
387
- if (this.configuration && this.configuration.apiKey) {
388
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
427
+ if (this.configuration && this.configuration.accessToken) {
428
+ const token = this.configuration.accessToken;
429
+ const tokenString = yield token("authentik", []);
430
+ if (tokenString) {
431
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
432
+ }
389
433
  }
390
434
  const response = yield this.request({
391
435
  path: `/sources/ldap/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -492,8 +536,12 @@ export class SourcesApi extends runtime.BaseAPI {
492
536
  queryParameters['user_object_filter'] = requestParameters.userObjectFilter;
493
537
  }
494
538
  const headerParameters = {};
495
- if (this.configuration && this.configuration.apiKey) {
496
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
539
+ if (this.configuration && this.configuration.accessToken) {
540
+ const token = this.configuration.accessToken;
541
+ const tokenString = yield token("authentik", []);
542
+ if (tokenString) {
543
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
544
+ }
497
545
  }
498
546
  const response = yield this.request({
499
547
  path: `/sources/ldap/`,
@@ -524,8 +572,12 @@ export class SourcesApi extends runtime.BaseAPI {
524
572
  const queryParameters = {};
525
573
  const headerParameters = {};
526
574
  headerParameters['Content-Type'] = 'application/json';
527
- if (this.configuration && this.configuration.apiKey) {
528
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
575
+ if (this.configuration && this.configuration.accessToken) {
576
+ const token = this.configuration.accessToken;
577
+ const tokenString = yield token("authentik", []);
578
+ if (tokenString) {
579
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
580
+ }
529
581
  }
530
582
  const response = yield this.request({
531
583
  path: `/sources/ldap/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -556,8 +608,12 @@ export class SourcesApi extends runtime.BaseAPI {
556
608
  }
557
609
  const queryParameters = {};
558
610
  const headerParameters = {};
559
- if (this.configuration && this.configuration.apiKey) {
560
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
611
+ if (this.configuration && this.configuration.accessToken) {
612
+ const token = this.configuration.accessToken;
613
+ const tokenString = yield token("authentik", []);
614
+ if (tokenString) {
615
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
616
+ }
561
617
  }
562
618
  const response = yield this.request({
563
619
  path: `/sources/ldap/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -587,8 +643,12 @@ export class SourcesApi extends runtime.BaseAPI {
587
643
  }
588
644
  const queryParameters = {};
589
645
  const headerParameters = {};
590
- if (this.configuration && this.configuration.apiKey) {
591
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
646
+ if (this.configuration && this.configuration.accessToken) {
647
+ const token = this.configuration.accessToken;
648
+ const tokenString = yield token("authentik", []);
649
+ if (tokenString) {
650
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
651
+ }
592
652
  }
593
653
  const response = yield this.request({
594
654
  path: `/sources/ldap/{slug}/sync_status/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -622,8 +682,12 @@ export class SourcesApi extends runtime.BaseAPI {
622
682
  const queryParameters = {};
623
683
  const headerParameters = {};
624
684
  headerParameters['Content-Type'] = 'application/json';
625
- if (this.configuration && this.configuration.apiKey) {
626
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
685
+ if (this.configuration && this.configuration.accessToken) {
686
+ const token = this.configuration.accessToken;
687
+ const tokenString = yield token("authentik", []);
688
+ if (tokenString) {
689
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
690
+ }
627
691
  }
628
692
  const response = yield this.request({
629
693
  path: `/sources/ldap/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -654,8 +718,12 @@ export class SourcesApi extends runtime.BaseAPI {
654
718
  }
655
719
  const queryParameters = {};
656
720
  const headerParameters = {};
657
- if (this.configuration && this.configuration.apiKey) {
658
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
721
+ if (this.configuration && this.configuration.accessToken) {
722
+ const token = this.configuration.accessToken;
723
+ const tokenString = yield token("authentik", []);
724
+ if (tokenString) {
725
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
726
+ }
659
727
  }
660
728
  const response = yield this.request({
661
729
  path: `/sources/ldap/{slug}/used_by/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -686,8 +754,12 @@ export class SourcesApi extends runtime.BaseAPI {
686
754
  const queryParameters = {};
687
755
  const headerParameters = {};
688
756
  headerParameters['Content-Type'] = 'application/json';
689
- if (this.configuration && this.configuration.apiKey) {
690
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
757
+ if (this.configuration && this.configuration.accessToken) {
758
+ const token = this.configuration.accessToken;
759
+ const tokenString = yield token("authentik", []);
760
+ if (tokenString) {
761
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
762
+ }
691
763
  }
692
764
  const response = yield this.request({
693
765
  path: `/sources/oauth/`,
@@ -718,8 +790,12 @@ export class SourcesApi extends runtime.BaseAPI {
718
790
  }
719
791
  const queryParameters = {};
720
792
  const headerParameters = {};
721
- if (this.configuration && this.configuration.apiKey) {
722
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
793
+ if (this.configuration && this.configuration.accessToken) {
794
+ const token = this.configuration.accessToken;
795
+ const tokenString = yield token("authentik", []);
796
+ if (tokenString) {
797
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
798
+ }
723
799
  }
724
800
  const response = yield this.request({
725
801
  path: `/sources/oauth/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -802,8 +878,12 @@ export class SourcesApi extends runtime.BaseAPI {
802
878
  queryParameters['user_matching_mode'] = requestParameters.userMatchingMode;
803
879
  }
804
880
  const headerParameters = {};
805
- if (this.configuration && this.configuration.apiKey) {
806
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
881
+ if (this.configuration && this.configuration.accessToken) {
882
+ const token = this.configuration.accessToken;
883
+ const tokenString = yield token("authentik", []);
884
+ if (tokenString) {
885
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
886
+ }
807
887
  }
808
888
  const response = yield this.request({
809
889
  path: `/sources/oauth/`,
@@ -834,8 +914,12 @@ export class SourcesApi extends runtime.BaseAPI {
834
914
  const queryParameters = {};
835
915
  const headerParameters = {};
836
916
  headerParameters['Content-Type'] = 'application/json';
837
- if (this.configuration && this.configuration.apiKey) {
838
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
917
+ if (this.configuration && this.configuration.accessToken) {
918
+ const token = this.configuration.accessToken;
919
+ const tokenString = yield token("authentik", []);
920
+ if (tokenString) {
921
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
922
+ }
839
923
  }
840
924
  const response = yield this.request({
841
925
  path: `/sources/oauth/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -866,8 +950,12 @@ export class SourcesApi extends runtime.BaseAPI {
866
950
  }
867
951
  const queryParameters = {};
868
952
  const headerParameters = {};
869
- if (this.configuration && this.configuration.apiKey) {
870
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
953
+ if (this.configuration && this.configuration.accessToken) {
954
+ const token = this.configuration.accessToken;
955
+ const tokenString = yield token("authentik", []);
956
+ if (tokenString) {
957
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
958
+ }
871
959
  }
872
960
  const response = yield this.request({
873
961
  path: `/sources/oauth/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -897,8 +985,12 @@ export class SourcesApi extends runtime.BaseAPI {
897
985
  queryParameters['name'] = requestParameters.name;
898
986
  }
899
987
  const headerParameters = {};
900
- if (this.configuration && this.configuration.apiKey) {
901
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
988
+ if (this.configuration && this.configuration.accessToken) {
989
+ const token = this.configuration.accessToken;
990
+ const tokenString = yield token("authentik", []);
991
+ if (tokenString) {
992
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
993
+ }
902
994
  }
903
995
  const response = yield this.request({
904
996
  path: `/sources/oauth/source_types/`,
@@ -932,8 +1024,12 @@ export class SourcesApi extends runtime.BaseAPI {
932
1024
  const queryParameters = {};
933
1025
  const headerParameters = {};
934
1026
  headerParameters['Content-Type'] = 'application/json';
935
- if (this.configuration && this.configuration.apiKey) {
936
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1027
+ if (this.configuration && this.configuration.accessToken) {
1028
+ const token = this.configuration.accessToken;
1029
+ const tokenString = yield token("authentik", []);
1030
+ if (tokenString) {
1031
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1032
+ }
937
1033
  }
938
1034
  const response = yield this.request({
939
1035
  path: `/sources/oauth/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -964,8 +1060,12 @@ export class SourcesApi extends runtime.BaseAPI {
964
1060
  }
965
1061
  const queryParameters = {};
966
1062
  const headerParameters = {};
967
- if (this.configuration && this.configuration.apiKey) {
968
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1063
+ if (this.configuration && this.configuration.accessToken) {
1064
+ const token = this.configuration.accessToken;
1065
+ const tokenString = yield token("authentik", []);
1066
+ if (tokenString) {
1067
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1068
+ }
969
1069
  }
970
1070
  const response = yield this.request({
971
1071
  path: `/sources/oauth/{slug}/used_by/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -996,8 +1096,12 @@ export class SourcesApi extends runtime.BaseAPI {
996
1096
  const queryParameters = {};
997
1097
  const headerParameters = {};
998
1098
  headerParameters['Content-Type'] = 'application/json';
999
- if (this.configuration && this.configuration.apiKey) {
1000
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1099
+ if (this.configuration && this.configuration.accessToken) {
1100
+ const token = this.configuration.accessToken;
1101
+ const tokenString = yield token("authentik", []);
1102
+ if (tokenString) {
1103
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1104
+ }
1001
1105
  }
1002
1106
  const response = yield this.request({
1003
1107
  path: `/sources/plex/`,
@@ -1028,8 +1132,12 @@ export class SourcesApi extends runtime.BaseAPI {
1028
1132
  }
1029
1133
  const queryParameters = {};
1030
1134
  const headerParameters = {};
1031
- if (this.configuration && this.configuration.apiKey) {
1032
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1135
+ if (this.configuration && this.configuration.accessToken) {
1136
+ const token = this.configuration.accessToken;
1137
+ const tokenString = yield token("authentik", []);
1138
+ if (tokenString) {
1139
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1140
+ }
1033
1141
  }
1034
1142
  const response = yield this.request({
1035
1143
  path: `/sources/plex/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -1094,8 +1202,12 @@ export class SourcesApi extends runtime.BaseAPI {
1094
1202
  queryParameters['user_matching_mode'] = requestParameters.userMatchingMode;
1095
1203
  }
1096
1204
  const headerParameters = {};
1097
- if (this.configuration && this.configuration.apiKey) {
1098
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1205
+ if (this.configuration && this.configuration.accessToken) {
1206
+ const token = this.configuration.accessToken;
1207
+ const tokenString = yield token("authentik", []);
1208
+ if (tokenString) {
1209
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1210
+ }
1099
1211
  }
1100
1212
  const response = yield this.request({
1101
1213
  path: `/sources/plex/`,
@@ -1126,8 +1238,12 @@ export class SourcesApi extends runtime.BaseAPI {
1126
1238
  const queryParameters = {};
1127
1239
  const headerParameters = {};
1128
1240
  headerParameters['Content-Type'] = 'application/json';
1129
- if (this.configuration && this.configuration.apiKey) {
1130
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1241
+ if (this.configuration && this.configuration.accessToken) {
1242
+ const token = this.configuration.accessToken;
1243
+ const tokenString = yield token("authentik", []);
1244
+ if (tokenString) {
1245
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1246
+ }
1131
1247
  }
1132
1248
  const response = yield this.request({
1133
1249
  path: `/sources/plex/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -1162,8 +1278,12 @@ export class SourcesApi extends runtime.BaseAPI {
1162
1278
  }
1163
1279
  const headerParameters = {};
1164
1280
  headerParameters['Content-Type'] = 'application/json';
1165
- if (this.configuration && this.configuration.apiKey) {
1166
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1281
+ if (this.configuration && this.configuration.accessToken) {
1282
+ const token = this.configuration.accessToken;
1283
+ const tokenString = yield token("authentik", []);
1284
+ if (tokenString) {
1285
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1286
+ }
1167
1287
  }
1168
1288
  const response = yield this.request({
1169
1289
  path: `/sources/plex/redeem_token_authenticated/`,
@@ -1197,8 +1317,12 @@ export class SourcesApi extends runtime.BaseAPI {
1197
1317
  }
1198
1318
  const headerParameters = {};
1199
1319
  headerParameters['Content-Type'] = 'application/json';
1200
- if (this.configuration && this.configuration.apiKey) {
1201
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1320
+ if (this.configuration && this.configuration.accessToken) {
1321
+ const token = this.configuration.accessToken;
1322
+ const tokenString = yield token("authentik", []);
1323
+ if (tokenString) {
1324
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1325
+ }
1202
1326
  }
1203
1327
  const response = yield this.request({
1204
1328
  path: `/sources/plex/redeem_token/`,
@@ -1229,8 +1353,12 @@ export class SourcesApi extends runtime.BaseAPI {
1229
1353
  }
1230
1354
  const queryParameters = {};
1231
1355
  const headerParameters = {};
1232
- if (this.configuration && this.configuration.apiKey) {
1233
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1356
+ if (this.configuration && this.configuration.accessToken) {
1357
+ const token = this.configuration.accessToken;
1358
+ const tokenString = yield token("authentik", []);
1359
+ if (tokenString) {
1360
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1361
+ }
1234
1362
  }
1235
1363
  const response = yield this.request({
1236
1364
  path: `/sources/plex/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -1264,8 +1392,12 @@ export class SourcesApi extends runtime.BaseAPI {
1264
1392
  const queryParameters = {};
1265
1393
  const headerParameters = {};
1266
1394
  headerParameters['Content-Type'] = 'application/json';
1267
- if (this.configuration && this.configuration.apiKey) {
1268
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1395
+ if (this.configuration && this.configuration.accessToken) {
1396
+ const token = this.configuration.accessToken;
1397
+ const tokenString = yield token("authentik", []);
1398
+ if (tokenString) {
1399
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1400
+ }
1269
1401
  }
1270
1402
  const response = yield this.request({
1271
1403
  path: `/sources/plex/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -1296,8 +1428,12 @@ export class SourcesApi extends runtime.BaseAPI {
1296
1428
  }
1297
1429
  const queryParameters = {};
1298
1430
  const headerParameters = {};
1299
- if (this.configuration && this.configuration.apiKey) {
1300
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1431
+ if (this.configuration && this.configuration.accessToken) {
1432
+ const token = this.configuration.accessToken;
1433
+ const tokenString = yield token("authentik", []);
1434
+ if (tokenString) {
1435
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1436
+ }
1301
1437
  }
1302
1438
  const response = yield this.request({
1303
1439
  path: `/sources/plex/{slug}/used_by/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -1328,8 +1464,12 @@ export class SourcesApi extends runtime.BaseAPI {
1328
1464
  const queryParameters = {};
1329
1465
  const headerParameters = {};
1330
1466
  headerParameters['Content-Type'] = 'application/json';
1331
- if (this.configuration && this.configuration.apiKey) {
1332
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1467
+ if (this.configuration && this.configuration.accessToken) {
1468
+ const token = this.configuration.accessToken;
1469
+ const tokenString = yield token("authentik", []);
1470
+ if (tokenString) {
1471
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1472
+ }
1333
1473
  }
1334
1474
  const response = yield this.request({
1335
1475
  path: `/sources/saml/`,
@@ -1360,8 +1500,12 @@ export class SourcesApi extends runtime.BaseAPI {
1360
1500
  }
1361
1501
  const queryParameters = {};
1362
1502
  const headerParameters = {};
1363
- if (this.configuration && this.configuration.apiKey) {
1364
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1503
+ if (this.configuration && this.configuration.accessToken) {
1504
+ const token = this.configuration.accessToken;
1505
+ const tokenString = yield token("authentik", []);
1506
+ if (tokenString) {
1507
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1508
+ }
1365
1509
  }
1366
1510
  const response = yield this.request({
1367
1511
  path: `/sources/saml/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -1459,8 +1603,12 @@ export class SourcesApi extends runtime.BaseAPI {
1459
1603
  queryParameters['verification_kp'] = requestParameters.verificationKp;
1460
1604
  }
1461
1605
  const headerParameters = {};
1462
- if (this.configuration && this.configuration.apiKey) {
1463
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1606
+ if (this.configuration && this.configuration.accessToken) {
1607
+ const token = this.configuration.accessToken;
1608
+ const tokenString = yield token("authentik", []);
1609
+ if (tokenString) {
1610
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1611
+ }
1464
1612
  }
1465
1613
  const response = yield this.request({
1466
1614
  path: `/sources/saml/`,
@@ -1490,8 +1638,12 @@ export class SourcesApi extends runtime.BaseAPI {
1490
1638
  }
1491
1639
  const queryParameters = {};
1492
1640
  const headerParameters = {};
1493
- if (this.configuration && this.configuration.apiKey) {
1494
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1641
+ if (this.configuration && this.configuration.accessToken) {
1642
+ const token = this.configuration.accessToken;
1643
+ const tokenString = yield token("authentik", []);
1644
+ if (tokenString) {
1645
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1646
+ }
1495
1647
  }
1496
1648
  const response = yield this.request({
1497
1649
  path: `/sources/saml/{slug}/metadata/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -1522,8 +1674,12 @@ export class SourcesApi extends runtime.BaseAPI {
1522
1674
  const queryParameters = {};
1523
1675
  const headerParameters = {};
1524
1676
  headerParameters['Content-Type'] = 'application/json';
1525
- if (this.configuration && this.configuration.apiKey) {
1526
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1677
+ if (this.configuration && this.configuration.accessToken) {
1678
+ const token = this.configuration.accessToken;
1679
+ const tokenString = yield token("authentik", []);
1680
+ if (tokenString) {
1681
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1682
+ }
1527
1683
  }
1528
1684
  const response = yield this.request({
1529
1685
  path: `/sources/saml/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -1554,8 +1710,12 @@ export class SourcesApi extends runtime.BaseAPI {
1554
1710
  }
1555
1711
  const queryParameters = {};
1556
1712
  const headerParameters = {};
1557
- if (this.configuration && this.configuration.apiKey) {
1558
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1713
+ if (this.configuration && this.configuration.accessToken) {
1714
+ const token = this.configuration.accessToken;
1715
+ const tokenString = yield token("authentik", []);
1716
+ if (tokenString) {
1717
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1718
+ }
1559
1719
  }
1560
1720
  const response = yield this.request({
1561
1721
  path: `/sources/saml/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -1589,8 +1749,12 @@ export class SourcesApi extends runtime.BaseAPI {
1589
1749
  const queryParameters = {};
1590
1750
  const headerParameters = {};
1591
1751
  headerParameters['Content-Type'] = 'application/json';
1592
- if (this.configuration && this.configuration.apiKey) {
1593
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1752
+ if (this.configuration && this.configuration.accessToken) {
1753
+ const token = this.configuration.accessToken;
1754
+ const tokenString = yield token("authentik", []);
1755
+ if (tokenString) {
1756
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1757
+ }
1594
1758
  }
1595
1759
  const response = yield this.request({
1596
1760
  path: `/sources/saml/{slug}/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -1621,8 +1785,12 @@ export class SourcesApi extends runtime.BaseAPI {
1621
1785
  }
1622
1786
  const queryParameters = {};
1623
1787
  const headerParameters = {};
1624
- if (this.configuration && this.configuration.apiKey) {
1625
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1788
+ if (this.configuration && this.configuration.accessToken) {
1789
+ const token = this.configuration.accessToken;
1790
+ const tokenString = yield token("authentik", []);
1791
+ if (tokenString) {
1792
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1793
+ }
1626
1794
  }
1627
1795
  const response = yield this.request({
1628
1796
  path: `/sources/saml/{slug}/used_by/`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters.slug))),
@@ -1652,8 +1820,12 @@ export class SourcesApi extends runtime.BaseAPI {
1652
1820
  }
1653
1821
  const queryParameters = {};
1654
1822
  const headerParameters = {};
1655
- if (this.configuration && this.configuration.apiKey) {
1656
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1823
+ if (this.configuration && this.configuration.accessToken) {
1824
+ const token = this.configuration.accessToken;
1825
+ const tokenString = yield token("authentik", []);
1826
+ if (tokenString) {
1827
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1828
+ }
1657
1829
  }
1658
1830
  const response = yield this.request({
1659
1831
  path: `/sources/user_connections/all/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -1694,8 +1866,12 @@ export class SourcesApi extends runtime.BaseAPI {
1694
1866
  queryParameters['user'] = requestParameters.user;
1695
1867
  }
1696
1868
  const headerParameters = {};
1697
- if (this.configuration && this.configuration.apiKey) {
1698
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1869
+ if (this.configuration && this.configuration.accessToken) {
1870
+ const token = this.configuration.accessToken;
1871
+ const tokenString = yield token("authentik", []);
1872
+ if (tokenString) {
1873
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1874
+ }
1699
1875
  }
1700
1876
  const response = yield this.request({
1701
1877
  path: `/sources/user_connections/all/`,
@@ -1725,8 +1901,12 @@ export class SourcesApi extends runtime.BaseAPI {
1725
1901
  }
1726
1902
  const queryParameters = {};
1727
1903
  const headerParameters = {};
1728
- if (this.configuration && this.configuration.apiKey) {
1729
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1904
+ if (this.configuration && this.configuration.accessToken) {
1905
+ const token = this.configuration.accessToken;
1906
+ const tokenString = yield token("authentik", []);
1907
+ if (tokenString) {
1908
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1909
+ }
1730
1910
  }
1731
1911
  const response = yield this.request({
1732
1912
  path: `/sources/user_connections/all/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -1756,8 +1936,12 @@ export class SourcesApi extends runtime.BaseAPI {
1756
1936
  }
1757
1937
  const queryParameters = {};
1758
1938
  const headerParameters = {};
1759
- if (this.configuration && this.configuration.apiKey) {
1760
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1939
+ if (this.configuration && this.configuration.accessToken) {
1940
+ const token = this.configuration.accessToken;
1941
+ const tokenString = yield token("authentik", []);
1942
+ if (tokenString) {
1943
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1944
+ }
1761
1945
  }
1762
1946
  const response = yield this.request({
1763
1947
  path: `/sources/user_connections/all/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -1787,8 +1971,12 @@ export class SourcesApi extends runtime.BaseAPI {
1787
1971
  }
1788
1972
  const queryParameters = {};
1789
1973
  const headerParameters = {};
1790
- if (this.configuration && this.configuration.apiKey) {
1791
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1974
+ if (this.configuration && this.configuration.accessToken) {
1975
+ const token = this.configuration.accessToken;
1976
+ const tokenString = yield token("authentik", []);
1977
+ if (tokenString) {
1978
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1979
+ }
1792
1980
  }
1793
1981
  const response = yield this.request({
1794
1982
  path: `/sources/user_connections/all/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -1818,8 +2006,12 @@ export class SourcesApi extends runtime.BaseAPI {
1818
2006
  }
1819
2007
  const queryParameters = {};
1820
2008
  const headerParameters = {};
1821
- if (this.configuration && this.configuration.apiKey) {
1822
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2009
+ if (this.configuration && this.configuration.accessToken) {
2010
+ const token = this.configuration.accessToken;
2011
+ const tokenString = yield token("authentik", []);
2012
+ if (tokenString) {
2013
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2014
+ }
1823
2015
  }
1824
2016
  const response = yield this.request({
1825
2017
  path: `/sources/user_connections/all/{id}/used_by/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -1850,8 +2042,12 @@ export class SourcesApi extends runtime.BaseAPI {
1850
2042
  const queryParameters = {};
1851
2043
  const headerParameters = {};
1852
2044
  headerParameters['Content-Type'] = 'application/json';
1853
- if (this.configuration && this.configuration.apiKey) {
1854
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2045
+ if (this.configuration && this.configuration.accessToken) {
2046
+ const token = this.configuration.accessToken;
2047
+ const tokenString = yield token("authentik", []);
2048
+ if (tokenString) {
2049
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2050
+ }
1855
2051
  }
1856
2052
  const response = yield this.request({
1857
2053
  path: `/sources/user_connections/oauth/`,
@@ -1882,8 +2078,12 @@ export class SourcesApi extends runtime.BaseAPI {
1882
2078
  }
1883
2079
  const queryParameters = {};
1884
2080
  const headerParameters = {};
1885
- if (this.configuration && this.configuration.apiKey) {
1886
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2081
+ if (this.configuration && this.configuration.accessToken) {
2082
+ const token = this.configuration.accessToken;
2083
+ const tokenString = yield token("authentik", []);
2084
+ if (tokenString) {
2085
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2086
+ }
1887
2087
  }
1888
2088
  const response = yield this.request({
1889
2089
  path: `/sources/user_connections/oauth/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -1924,8 +2124,12 @@ export class SourcesApi extends runtime.BaseAPI {
1924
2124
  queryParameters['source__slug'] = requestParameters.sourceSlug;
1925
2125
  }
1926
2126
  const headerParameters = {};
1927
- if (this.configuration && this.configuration.apiKey) {
1928
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2127
+ if (this.configuration && this.configuration.accessToken) {
2128
+ const token = this.configuration.accessToken;
2129
+ const tokenString = yield token("authentik", []);
2130
+ if (tokenString) {
2131
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2132
+ }
1929
2133
  }
1930
2134
  const response = yield this.request({
1931
2135
  path: `/sources/user_connections/oauth/`,
@@ -1956,8 +2160,12 @@ export class SourcesApi extends runtime.BaseAPI {
1956
2160
  const queryParameters = {};
1957
2161
  const headerParameters = {};
1958
2162
  headerParameters['Content-Type'] = 'application/json';
1959
- if (this.configuration && this.configuration.apiKey) {
1960
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2163
+ if (this.configuration && this.configuration.accessToken) {
2164
+ const token = this.configuration.accessToken;
2165
+ const tokenString = yield token("authentik", []);
2166
+ if (tokenString) {
2167
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2168
+ }
1961
2169
  }
1962
2170
  const response = yield this.request({
1963
2171
  path: `/sources/user_connections/oauth/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -1988,8 +2196,12 @@ export class SourcesApi extends runtime.BaseAPI {
1988
2196
  }
1989
2197
  const queryParameters = {};
1990
2198
  const headerParameters = {};
1991
- if (this.configuration && this.configuration.apiKey) {
1992
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2199
+ if (this.configuration && this.configuration.accessToken) {
2200
+ const token = this.configuration.accessToken;
2201
+ const tokenString = yield token("authentik", []);
2202
+ if (tokenString) {
2203
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2204
+ }
1993
2205
  }
1994
2206
  const response = yield this.request({
1995
2207
  path: `/sources/user_connections/oauth/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -2023,8 +2235,12 @@ export class SourcesApi extends runtime.BaseAPI {
2023
2235
  const queryParameters = {};
2024
2236
  const headerParameters = {};
2025
2237
  headerParameters['Content-Type'] = 'application/json';
2026
- if (this.configuration && this.configuration.apiKey) {
2027
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2238
+ if (this.configuration && this.configuration.accessToken) {
2239
+ const token = this.configuration.accessToken;
2240
+ const tokenString = yield token("authentik", []);
2241
+ if (tokenString) {
2242
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2243
+ }
2028
2244
  }
2029
2245
  const response = yield this.request({
2030
2246
  path: `/sources/user_connections/oauth/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -2055,8 +2271,12 @@ export class SourcesApi extends runtime.BaseAPI {
2055
2271
  }
2056
2272
  const queryParameters = {};
2057
2273
  const headerParameters = {};
2058
- if (this.configuration && this.configuration.apiKey) {
2059
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2274
+ if (this.configuration && this.configuration.accessToken) {
2275
+ const token = this.configuration.accessToken;
2276
+ const tokenString = yield token("authentik", []);
2277
+ if (tokenString) {
2278
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2279
+ }
2060
2280
  }
2061
2281
  const response = yield this.request({
2062
2282
  path: `/sources/user_connections/oauth/{id}/used_by/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -2087,8 +2307,12 @@ export class SourcesApi extends runtime.BaseAPI {
2087
2307
  const queryParameters = {};
2088
2308
  const headerParameters = {};
2089
2309
  headerParameters['Content-Type'] = 'application/json';
2090
- if (this.configuration && this.configuration.apiKey) {
2091
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2310
+ if (this.configuration && this.configuration.accessToken) {
2311
+ const token = this.configuration.accessToken;
2312
+ const tokenString = yield token("authentik", []);
2313
+ if (tokenString) {
2314
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2315
+ }
2092
2316
  }
2093
2317
  const response = yield this.request({
2094
2318
  path: `/sources/user_connections/plex/`,
@@ -2119,8 +2343,12 @@ export class SourcesApi extends runtime.BaseAPI {
2119
2343
  }
2120
2344
  const queryParameters = {};
2121
2345
  const headerParameters = {};
2122
- if (this.configuration && this.configuration.apiKey) {
2123
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2346
+ if (this.configuration && this.configuration.accessToken) {
2347
+ const token = this.configuration.accessToken;
2348
+ const tokenString = yield token("authentik", []);
2349
+ if (tokenString) {
2350
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2351
+ }
2124
2352
  }
2125
2353
  const response = yield this.request({
2126
2354
  path: `/sources/user_connections/plex/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -2161,8 +2389,12 @@ export class SourcesApi extends runtime.BaseAPI {
2161
2389
  queryParameters['source__slug'] = requestParameters.sourceSlug;
2162
2390
  }
2163
2391
  const headerParameters = {};
2164
- if (this.configuration && this.configuration.apiKey) {
2165
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2392
+ if (this.configuration && this.configuration.accessToken) {
2393
+ const token = this.configuration.accessToken;
2394
+ const tokenString = yield token("authentik", []);
2395
+ if (tokenString) {
2396
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2397
+ }
2166
2398
  }
2167
2399
  const response = yield this.request({
2168
2400
  path: `/sources/user_connections/plex/`,
@@ -2193,8 +2425,12 @@ export class SourcesApi extends runtime.BaseAPI {
2193
2425
  const queryParameters = {};
2194
2426
  const headerParameters = {};
2195
2427
  headerParameters['Content-Type'] = 'application/json';
2196
- if (this.configuration && this.configuration.apiKey) {
2197
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2428
+ if (this.configuration && this.configuration.accessToken) {
2429
+ const token = this.configuration.accessToken;
2430
+ const tokenString = yield token("authentik", []);
2431
+ if (tokenString) {
2432
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2433
+ }
2198
2434
  }
2199
2435
  const response = yield this.request({
2200
2436
  path: `/sources/user_connections/plex/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -2225,8 +2461,12 @@ export class SourcesApi extends runtime.BaseAPI {
2225
2461
  }
2226
2462
  const queryParameters = {};
2227
2463
  const headerParameters = {};
2228
- if (this.configuration && this.configuration.apiKey) {
2229
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2464
+ if (this.configuration && this.configuration.accessToken) {
2465
+ const token = this.configuration.accessToken;
2466
+ const tokenString = yield token("authentik", []);
2467
+ if (tokenString) {
2468
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2469
+ }
2230
2470
  }
2231
2471
  const response = yield this.request({
2232
2472
  path: `/sources/user_connections/plex/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -2260,8 +2500,12 @@ export class SourcesApi extends runtime.BaseAPI {
2260
2500
  const queryParameters = {};
2261
2501
  const headerParameters = {};
2262
2502
  headerParameters['Content-Type'] = 'application/json';
2263
- if (this.configuration && this.configuration.apiKey) {
2264
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2503
+ if (this.configuration && this.configuration.accessToken) {
2504
+ const token = this.configuration.accessToken;
2505
+ const tokenString = yield token("authentik", []);
2506
+ if (tokenString) {
2507
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2508
+ }
2265
2509
  }
2266
2510
  const response = yield this.request({
2267
2511
  path: `/sources/user_connections/plex/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -2292,8 +2536,12 @@ export class SourcesApi extends runtime.BaseAPI {
2292
2536
  }
2293
2537
  const queryParameters = {};
2294
2538
  const headerParameters = {};
2295
- if (this.configuration && this.configuration.apiKey) {
2296
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2539
+ if (this.configuration && this.configuration.accessToken) {
2540
+ const token = this.configuration.accessToken;
2541
+ const tokenString = yield token("authentik", []);
2542
+ if (tokenString) {
2543
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2544
+ }
2297
2545
  }
2298
2546
  const response = yield this.request({
2299
2547
  path: `/sources/user_connections/plex/{id}/used_by/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -2324,8 +2572,12 @@ export class SourcesApi extends runtime.BaseAPI {
2324
2572
  const queryParameters = {};
2325
2573
  const headerParameters = {};
2326
2574
  headerParameters['Content-Type'] = 'application/json';
2327
- if (this.configuration && this.configuration.apiKey) {
2328
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2575
+ if (this.configuration && this.configuration.accessToken) {
2576
+ const token = this.configuration.accessToken;
2577
+ const tokenString = yield token("authentik", []);
2578
+ if (tokenString) {
2579
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2580
+ }
2329
2581
  }
2330
2582
  const response = yield this.request({
2331
2583
  path: `/sources/user_connections/saml/`,
@@ -2356,8 +2608,12 @@ export class SourcesApi extends runtime.BaseAPI {
2356
2608
  }
2357
2609
  const queryParameters = {};
2358
2610
  const headerParameters = {};
2359
- if (this.configuration && this.configuration.apiKey) {
2360
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2611
+ if (this.configuration && this.configuration.accessToken) {
2612
+ const token = this.configuration.accessToken;
2613
+ const tokenString = yield token("authentik", []);
2614
+ if (tokenString) {
2615
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2616
+ }
2361
2617
  }
2362
2618
  const response = yield this.request({
2363
2619
  path: `/sources/user_connections/saml/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -2398,8 +2654,12 @@ export class SourcesApi extends runtime.BaseAPI {
2398
2654
  queryParameters['source__slug'] = requestParameters.sourceSlug;
2399
2655
  }
2400
2656
  const headerParameters = {};
2401
- if (this.configuration && this.configuration.apiKey) {
2402
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2657
+ if (this.configuration && this.configuration.accessToken) {
2658
+ const token = this.configuration.accessToken;
2659
+ const tokenString = yield token("authentik", []);
2660
+ if (tokenString) {
2661
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2662
+ }
2403
2663
  }
2404
2664
  const response = yield this.request({
2405
2665
  path: `/sources/user_connections/saml/`,
@@ -2430,8 +2690,12 @@ export class SourcesApi extends runtime.BaseAPI {
2430
2690
  const queryParameters = {};
2431
2691
  const headerParameters = {};
2432
2692
  headerParameters['Content-Type'] = 'application/json';
2433
- if (this.configuration && this.configuration.apiKey) {
2434
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2693
+ if (this.configuration && this.configuration.accessToken) {
2694
+ const token = this.configuration.accessToken;
2695
+ const tokenString = yield token("authentik", []);
2696
+ if (tokenString) {
2697
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2698
+ }
2435
2699
  }
2436
2700
  const response = yield this.request({
2437
2701
  path: `/sources/user_connections/saml/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -2462,8 +2726,12 @@ export class SourcesApi extends runtime.BaseAPI {
2462
2726
  }
2463
2727
  const queryParameters = {};
2464
2728
  const headerParameters = {};
2465
- if (this.configuration && this.configuration.apiKey) {
2466
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2729
+ if (this.configuration && this.configuration.accessToken) {
2730
+ const token = this.configuration.accessToken;
2731
+ const tokenString = yield token("authentik", []);
2732
+ if (tokenString) {
2733
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2734
+ }
2467
2735
  }
2468
2736
  const response = yield this.request({
2469
2737
  path: `/sources/user_connections/saml/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -2497,8 +2765,12 @@ export class SourcesApi extends runtime.BaseAPI {
2497
2765
  const queryParameters = {};
2498
2766
  const headerParameters = {};
2499
2767
  headerParameters['Content-Type'] = 'application/json';
2500
- if (this.configuration && this.configuration.apiKey) {
2501
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2768
+ if (this.configuration && this.configuration.accessToken) {
2769
+ const token = this.configuration.accessToken;
2770
+ const tokenString = yield token("authentik", []);
2771
+ if (tokenString) {
2772
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2773
+ }
2502
2774
  }
2503
2775
  const response = yield this.request({
2504
2776
  path: `/sources/user_connections/saml/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
@@ -2529,8 +2801,12 @@ export class SourcesApi extends runtime.BaseAPI {
2529
2801
  }
2530
2802
  const queryParameters = {};
2531
2803
  const headerParameters = {};
2532
- if (this.configuration && this.configuration.apiKey) {
2533
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
2804
+ if (this.configuration && this.configuration.accessToken) {
2805
+ const token = this.configuration.accessToken;
2806
+ const tokenString = yield token("authentik", []);
2807
+ if (tokenString) {
2808
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2809
+ }
2534
2810
  }
2535
2811
  const response = yield this.request({
2536
2812
  path: `/sources/user_connections/saml/{id}/used_by/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),