@goauthentik/api 2021.10.4-1638699310 → 2021.10.4-1639438851

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/.openapi-generator/FILES +2 -0
  2. package/dist/apis/CoreApi.d.ts +1 -0
  3. package/dist/apis/CoreApi.js +3 -0
  4. package/dist/apis/OutpostsApi.d.ts +2 -0
  5. package/dist/apis/OutpostsApi.js +6 -0
  6. package/dist/apis/SchemaApi.d.ts +1 -0
  7. package/dist/apis/SchemaApi.js +1 -0
  8. package/dist/apis/SourcesApi.d.ts +22 -0
  9. package/dist/apis/SourcesApi.js +66 -0
  10. package/dist/esm/apis/CoreApi.d.ts +1 -0
  11. package/dist/esm/apis/CoreApi.js +3 -0
  12. package/dist/esm/apis/OutpostsApi.d.ts +2 -0
  13. package/dist/esm/apis/OutpostsApi.js +6 -0
  14. package/dist/esm/apis/SchemaApi.d.ts +1 -0
  15. package/dist/esm/apis/SchemaApi.js +1 -0
  16. package/dist/esm/apis/SourcesApi.d.ts +22 -0
  17. package/dist/esm/apis/SourcesApi.js +66 -0
  18. package/dist/esm/models/AppleChallengeResponseRequest.d.ts +27 -0
  19. package/dist/esm/models/AppleChallengeResponseRequest.js +36 -0
  20. package/dist/esm/models/AppleLoginChallenge.d.ts +74 -0
  21. package/dist/esm/models/AppleLoginChallenge.js +52 -0
  22. package/dist/esm/models/ChallengeTypes.d.ts +3 -0
  23. package/dist/esm/models/ChallengeTypes.js +5 -0
  24. package/dist/esm/models/FlowChallengeResponseRequest.d.ts +3 -0
  25. package/dist/esm/models/FlowChallengeResponseRequest.js +5 -0
  26. package/dist/esm/models/LoginChallengeTypes.d.ts +3 -0
  27. package/dist/esm/models/LoginChallengeTypes.js +5 -0
  28. package/dist/esm/models/PatchedUserOAuthSourceConnectionRequest.d.ts +6 -0
  29. package/dist/esm/models/PatchedUserOAuthSourceConnectionRequest.js +2 -0
  30. package/dist/esm/models/ProviderTypeEnum.d.ts +1 -0
  31. package/dist/esm/models/ProviderTypeEnum.js +1 -0
  32. package/dist/esm/models/UserOAuthSourceConnectionRequest.d.ts +6 -0
  33. package/dist/esm/models/UserOAuthSourceConnectionRequest.js +3 -0
  34. package/dist/esm/models/index.d.ts +2 -0
  35. package/dist/esm/models/index.js +2 -0
  36. package/dist/models/AppleChallengeResponseRequest.d.ts +27 -0
  37. package/dist/models/AppleChallengeResponseRequest.js +42 -0
  38. package/dist/models/AppleLoginChallenge.d.ts +74 -0
  39. package/dist/models/AppleLoginChallenge.js +58 -0
  40. package/dist/models/ChallengeTypes.d.ts +3 -0
  41. package/dist/models/ChallengeTypes.js +5 -0
  42. package/dist/models/FlowChallengeResponseRequest.d.ts +3 -0
  43. package/dist/models/FlowChallengeResponseRequest.js +5 -0
  44. package/dist/models/LoginChallengeTypes.d.ts +3 -0
  45. package/dist/models/LoginChallengeTypes.js +5 -0
  46. package/dist/models/PatchedUserOAuthSourceConnectionRequest.d.ts +6 -0
  47. package/dist/models/PatchedUserOAuthSourceConnectionRequest.js +2 -0
  48. package/dist/models/ProviderTypeEnum.d.ts +1 -0
  49. package/dist/models/ProviderTypeEnum.js +1 -0
  50. package/dist/models/UserOAuthSourceConnectionRequest.d.ts +6 -0
  51. package/dist/models/UserOAuthSourceConnectionRequest.js +3 -0
  52. package/dist/models/index.d.ts +2 -0
  53. package/dist/models/index.js +2 -0
  54. package/package.json +1 -1
  55. package/src/apis/CoreApi.ts +5 -0
  56. package/src/apis/OutpostsApi.ts +10 -0
  57. package/src/apis/SchemaApi.ts +1 -0
  58. package/src/apis/SourcesApi.ts +82 -0
  59. package/src/models/AppleChallengeResponseRequest.ts +56 -0
  60. package/src/models/AppleLoginChallenge.ts +131 -0
  61. package/src/models/ChallengeTypes.ts +11 -1
  62. package/src/models/FlowChallengeResponseRequest.ts +11 -1
  63. package/src/models/LoginChallengeTypes.ts +11 -1
  64. package/src/models/PatchedUserOAuthSourceConnectionRequest.ts +8 -0
  65. package/src/models/ProviderTypeEnum.ts +1 -0
  66. package/src/models/UserOAuthSourceConnectionRequest.ts +8 -0
  67. package/src/models/index.ts +2 -0
@@ -23,6 +23,8 @@ src/index.ts
23
23
  src/models/AccessDeniedChallenge.ts
24
24
  src/models/App.ts
25
25
  src/models/AppEnum.ts
26
+ src/models/AppleChallengeResponseRequest.ts
27
+ src/models/AppleLoginChallenge.ts
26
28
  src/models/Application.ts
27
29
  src/models/ApplicationRequest.ts
28
30
  src/models/AuthTypeEnum.ts
@@ -79,6 +79,7 @@ export interface CoreGroupsDestroyRequest {
79
79
  groupUuid: string;
80
80
  }
81
81
  export interface CoreGroupsListRequest {
82
+ attributes?: string;
82
83
  isSuperuser?: boolean;
83
84
  membersByPk?: Array<number>;
84
85
  membersByUsername?: Array<string>;
@@ -628,6 +628,9 @@ class CoreApi extends runtime.BaseAPI {
628
628
  coreGroupsListRaw(requestParameters, initOverrides) {
629
629
  return __awaiter(this, void 0, void 0, function* () {
630
630
  const queryParameters = {};
631
+ if (requestParameters.attributes !== undefined) {
632
+ queryParameters['attributes'] = requestParameters.attributes;
633
+ }
631
634
  if (requestParameters.isSuperuser !== undefined) {
632
635
  queryParameters['is_superuser'] = requestParameters.isSuperuser;
633
636
  }
@@ -23,6 +23,7 @@ export interface OutpostsInstancesHealthListRequest {
23
23
  nameIexact?: string;
24
24
  ordering?: string;
25
25
  providersIsnull?: boolean;
26
+ providersByPk?: Array<number>;
26
27
  search?: string;
27
28
  serviceConnectionNameIcontains?: string;
28
29
  serviceConnectionNameIexact?: string;
@@ -34,6 +35,7 @@ export interface OutpostsInstancesListRequest {
34
35
  page?: number;
35
36
  pageSize?: number;
36
37
  providersIsnull?: boolean;
38
+ providersByPk?: Array<number>;
37
39
  search?: string;
38
40
  serviceConnectionNameIcontains?: string;
39
41
  serviceConnectionNameIexact?: string;
@@ -141,6 +141,9 @@ class OutpostsApi extends runtime.BaseAPI {
141
141
  if (requestParameters.providersIsnull !== undefined) {
142
142
  queryParameters['providers__isnull'] = requestParameters.providersIsnull;
143
143
  }
144
+ if (requestParameters.providersByPk) {
145
+ queryParameters['providers_by_pk'] = requestParameters.providersByPk;
146
+ }
144
147
  if (requestParameters.search !== undefined) {
145
148
  queryParameters['search'] = requestParameters.search;
146
149
  }
@@ -196,6 +199,9 @@ class OutpostsApi extends runtime.BaseAPI {
196
199
  if (requestParameters.providersIsnull !== undefined) {
197
200
  queryParameters['providers__isnull'] = requestParameters.providersIsnull;
198
201
  }
202
+ if (requestParameters.providersByPk) {
203
+ queryParameters['providers_by_pk'] = requestParameters.providersByPk;
204
+ }
199
205
  if (requestParameters.search !== undefined) {
200
206
  queryParameters['search'] = requestParameters.search;
201
207
  }
@@ -107,6 +107,7 @@ export declare enum SchemaRetrieveLangEnum {
107
107
  Ml = "ml",
108
108
  Mn = "mn",
109
109
  Mr = "mr",
110
+ Ms = "ms",
110
111
  My = "my",
111
112
  Nb = "nb",
112
113
  Ne = "ne",
@@ -142,6 +142,7 @@ var SchemaRetrieveLangEnum;
142
142
  SchemaRetrieveLangEnum["Ml"] = "ml";
143
143
  SchemaRetrieveLangEnum["Mn"] = "mn";
144
144
  SchemaRetrieveLangEnum["Mr"] = "mr";
145
+ SchemaRetrieveLangEnum["Ms"] = "ms";
145
146
  SchemaRetrieveLangEnum["My"] = "my";
146
147
  SchemaRetrieveLangEnum["Nb"] = "nb";
147
148
  SchemaRetrieveLangEnum["Ne"] = "ne";
@@ -232,6 +232,9 @@ export interface SourcesUserConnectionsAllUpdateRequest {
232
232
  export interface SourcesUserConnectionsAllUsedByListRequest {
233
233
  id: number;
234
234
  }
235
+ export interface SourcesUserConnectionsOauthCreateRequest {
236
+ userOAuthSourceConnectionRequest: UserOAuthSourceConnectionRequest;
237
+ }
235
238
  export interface SourcesUserConnectionsOauthDestroyRequest {
236
239
  id: number;
237
240
  }
@@ -256,6 +259,9 @@ export interface SourcesUserConnectionsOauthUpdateRequest {
256
259
  export interface SourcesUserConnectionsOauthUsedByListRequest {
257
260
  id: number;
258
261
  }
262
+ export interface SourcesUserConnectionsPlexCreateRequest {
263
+ plexSourceConnectionRequest: PlexSourceConnectionRequest;
264
+ }
259
265
  export interface SourcesUserConnectionsPlexDestroyRequest {
260
266
  id: number;
261
267
  }
@@ -644,6 +650,14 @@ export declare class SourcesApi extends runtime.BaseAPI {
644
650
  * Get a list of all objects that use this object
645
651
  */
646
652
  sourcesUserConnectionsAllUsedByList(requestParameters: SourcesUserConnectionsAllUsedByListRequest, initOverrides?: RequestInit): Promise<Array<UsedBy>>;
653
+ /**
654
+ * Source Viewset
655
+ */
656
+ sourcesUserConnectionsOauthCreateRaw(requestParameters: SourcesUserConnectionsOauthCreateRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<UserOAuthSourceConnection>>;
657
+ /**
658
+ * Source Viewset
659
+ */
660
+ sourcesUserConnectionsOauthCreate(requestParameters: SourcesUserConnectionsOauthCreateRequest, initOverrides?: RequestInit): Promise<UserOAuthSourceConnection>;
647
661
  /**
648
662
  * Source Viewset
649
663
  */
@@ -692,6 +706,14 @@ export declare class SourcesApi extends runtime.BaseAPI {
692
706
  * Get a list of all objects that use this object
693
707
  */
694
708
  sourcesUserConnectionsOauthUsedByList(requestParameters: SourcesUserConnectionsOauthUsedByListRequest, initOverrides?: RequestInit): Promise<Array<UsedBy>>;
709
+ /**
710
+ * Plex Source connection Serializer
711
+ */
712
+ sourcesUserConnectionsPlexCreateRaw(requestParameters: SourcesUserConnectionsPlexCreateRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<PlexSourceConnection>>;
713
+ /**
714
+ * Plex Source connection Serializer
715
+ */
716
+ sourcesUserConnectionsPlexCreate(requestParameters: SourcesUserConnectionsPlexCreateRequest, initOverrides?: RequestInit): Promise<PlexSourceConnection>;
695
717
  /**
696
718
  * Plex Source connection Serializer
697
719
  */
@@ -1703,6 +1703,39 @@ class SourcesApi extends runtime.BaseAPI {
1703
1703
  return yield response.value();
1704
1704
  });
1705
1705
  }
1706
+ /**
1707
+ * Source Viewset
1708
+ */
1709
+ sourcesUserConnectionsOauthCreateRaw(requestParameters, initOverrides) {
1710
+ return __awaiter(this, void 0, void 0, function* () {
1711
+ if (requestParameters.userOAuthSourceConnectionRequest === null || requestParameters.userOAuthSourceConnectionRequest === undefined) {
1712
+ throw new runtime.RequiredError('userOAuthSourceConnectionRequest', 'Required parameter requestParameters.userOAuthSourceConnectionRequest was null or undefined when calling sourcesUserConnectionsOauthCreate.');
1713
+ }
1714
+ const queryParameters = {};
1715
+ const headerParameters = {};
1716
+ headerParameters['Content-Type'] = 'application/json';
1717
+ if (this.configuration && this.configuration.apiKey) {
1718
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1719
+ }
1720
+ const response = yield this.request({
1721
+ path: `/sources/user_connections/oauth/`,
1722
+ method: 'POST',
1723
+ headers: headerParameters,
1724
+ query: queryParameters,
1725
+ body: models_1.UserOAuthSourceConnectionRequestToJSON(requestParameters.userOAuthSourceConnectionRequest),
1726
+ }, initOverrides);
1727
+ return new runtime.JSONApiResponse(response, (jsonValue) => models_1.UserOAuthSourceConnectionFromJSON(jsonValue));
1728
+ });
1729
+ }
1730
+ /**
1731
+ * Source Viewset
1732
+ */
1733
+ sourcesUserConnectionsOauthCreate(requestParameters, initOverrides) {
1734
+ return __awaiter(this, void 0, void 0, function* () {
1735
+ const response = yield this.sourcesUserConnectionsOauthCreateRaw(requestParameters, initOverrides);
1736
+ return yield response.value();
1737
+ });
1738
+ }
1706
1739
  /**
1707
1740
  * Source Viewset
1708
1741
  */
@@ -1907,6 +1940,39 @@ class SourcesApi extends runtime.BaseAPI {
1907
1940
  return yield response.value();
1908
1941
  });
1909
1942
  }
1943
+ /**
1944
+ * Plex Source connection Serializer
1945
+ */
1946
+ sourcesUserConnectionsPlexCreateRaw(requestParameters, initOverrides) {
1947
+ return __awaiter(this, void 0, void 0, function* () {
1948
+ if (requestParameters.plexSourceConnectionRequest === null || requestParameters.plexSourceConnectionRequest === undefined) {
1949
+ throw new runtime.RequiredError('plexSourceConnectionRequest', 'Required parameter requestParameters.plexSourceConnectionRequest was null or undefined when calling sourcesUserConnectionsPlexCreate.');
1950
+ }
1951
+ const queryParameters = {};
1952
+ const headerParameters = {};
1953
+ headerParameters['Content-Type'] = 'application/json';
1954
+ if (this.configuration && this.configuration.apiKey) {
1955
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1956
+ }
1957
+ const response = yield this.request({
1958
+ path: `/sources/user_connections/plex/`,
1959
+ method: 'POST',
1960
+ headers: headerParameters,
1961
+ query: queryParameters,
1962
+ body: models_1.PlexSourceConnectionRequestToJSON(requestParameters.plexSourceConnectionRequest),
1963
+ }, initOverrides);
1964
+ return new runtime.JSONApiResponse(response, (jsonValue) => models_1.PlexSourceConnectionFromJSON(jsonValue));
1965
+ });
1966
+ }
1967
+ /**
1968
+ * Plex Source connection Serializer
1969
+ */
1970
+ sourcesUserConnectionsPlexCreate(requestParameters, initOverrides) {
1971
+ return __awaiter(this, void 0, void 0, function* () {
1972
+ const response = yield this.sourcesUserConnectionsPlexCreateRaw(requestParameters, initOverrides);
1973
+ return yield response.value();
1974
+ });
1975
+ }
1910
1976
  /**
1911
1977
  * Plex Source connection Serializer
1912
1978
  */
@@ -79,6 +79,7 @@ export interface CoreGroupsDestroyRequest {
79
79
  groupUuid: string;
80
80
  }
81
81
  export interface CoreGroupsListRequest {
82
+ attributes?: string;
82
83
  isSuperuser?: boolean;
83
84
  membersByPk?: Array<number>;
84
85
  membersByUsername?: Array<string>;
@@ -625,6 +625,9 @@ export class CoreApi extends runtime.BaseAPI {
625
625
  coreGroupsListRaw(requestParameters, initOverrides) {
626
626
  return __awaiter(this, void 0, void 0, function* () {
627
627
  const queryParameters = {};
628
+ if (requestParameters.attributes !== undefined) {
629
+ queryParameters['attributes'] = requestParameters.attributes;
630
+ }
628
631
  if (requestParameters.isSuperuser !== undefined) {
629
632
  queryParameters['is_superuser'] = requestParameters.isSuperuser;
630
633
  }
@@ -23,6 +23,7 @@ export interface OutpostsInstancesHealthListRequest {
23
23
  nameIexact?: string;
24
24
  ordering?: string;
25
25
  providersIsnull?: boolean;
26
+ providersByPk?: Array<number>;
26
27
  search?: string;
27
28
  serviceConnectionNameIcontains?: string;
28
29
  serviceConnectionNameIexact?: string;
@@ -34,6 +35,7 @@ export interface OutpostsInstancesListRequest {
34
35
  page?: number;
35
36
  pageSize?: number;
36
37
  providersIsnull?: boolean;
38
+ providersByPk?: Array<number>;
37
39
  search?: string;
38
40
  serviceConnectionNameIcontains?: string;
39
41
  serviceConnectionNameIexact?: string;
@@ -138,6 +138,9 @@ export class OutpostsApi extends runtime.BaseAPI {
138
138
  if (requestParameters.providersIsnull !== undefined) {
139
139
  queryParameters['providers__isnull'] = requestParameters.providersIsnull;
140
140
  }
141
+ if (requestParameters.providersByPk) {
142
+ queryParameters['providers_by_pk'] = requestParameters.providersByPk;
143
+ }
141
144
  if (requestParameters.search !== undefined) {
142
145
  queryParameters['search'] = requestParameters.search;
143
146
  }
@@ -193,6 +196,9 @@ export class OutpostsApi extends runtime.BaseAPI {
193
196
  if (requestParameters.providersIsnull !== undefined) {
194
197
  queryParameters['providers__isnull'] = requestParameters.providersIsnull;
195
198
  }
199
+ if (requestParameters.providersByPk) {
200
+ queryParameters['providers_by_pk'] = requestParameters.providersByPk;
201
+ }
196
202
  if (requestParameters.search !== undefined) {
197
203
  queryParameters['search'] = requestParameters.search;
198
204
  }
@@ -107,6 +107,7 @@ export declare enum SchemaRetrieveLangEnum {
107
107
  Ml = "ml",
108
108
  Mn = "mn",
109
109
  Mr = "mr",
110
+ Ms = "ms",
110
111
  My = "my",
111
112
  Nb = "nb",
112
113
  Ne = "ne",
@@ -138,6 +138,7 @@ export var SchemaRetrieveLangEnum;
138
138
  SchemaRetrieveLangEnum["Ml"] = "ml";
139
139
  SchemaRetrieveLangEnum["Mn"] = "mn";
140
140
  SchemaRetrieveLangEnum["Mr"] = "mr";
141
+ SchemaRetrieveLangEnum["Ms"] = "ms";
141
142
  SchemaRetrieveLangEnum["My"] = "my";
142
143
  SchemaRetrieveLangEnum["Nb"] = "nb";
143
144
  SchemaRetrieveLangEnum["Ne"] = "ne";
@@ -232,6 +232,9 @@ export interface SourcesUserConnectionsAllUpdateRequest {
232
232
  export interface SourcesUserConnectionsAllUsedByListRequest {
233
233
  id: number;
234
234
  }
235
+ export interface SourcesUserConnectionsOauthCreateRequest {
236
+ userOAuthSourceConnectionRequest: UserOAuthSourceConnectionRequest;
237
+ }
235
238
  export interface SourcesUserConnectionsOauthDestroyRequest {
236
239
  id: number;
237
240
  }
@@ -256,6 +259,9 @@ export interface SourcesUserConnectionsOauthUpdateRequest {
256
259
  export interface SourcesUserConnectionsOauthUsedByListRequest {
257
260
  id: number;
258
261
  }
262
+ export interface SourcesUserConnectionsPlexCreateRequest {
263
+ plexSourceConnectionRequest: PlexSourceConnectionRequest;
264
+ }
259
265
  export interface SourcesUserConnectionsPlexDestroyRequest {
260
266
  id: number;
261
267
  }
@@ -644,6 +650,14 @@ export declare class SourcesApi extends runtime.BaseAPI {
644
650
  * Get a list of all objects that use this object
645
651
  */
646
652
  sourcesUserConnectionsAllUsedByList(requestParameters: SourcesUserConnectionsAllUsedByListRequest, initOverrides?: RequestInit): Promise<Array<UsedBy>>;
653
+ /**
654
+ * Source Viewset
655
+ */
656
+ sourcesUserConnectionsOauthCreateRaw(requestParameters: SourcesUserConnectionsOauthCreateRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<UserOAuthSourceConnection>>;
657
+ /**
658
+ * Source Viewset
659
+ */
660
+ sourcesUserConnectionsOauthCreate(requestParameters: SourcesUserConnectionsOauthCreateRequest, initOverrides?: RequestInit): Promise<UserOAuthSourceConnection>;
647
661
  /**
648
662
  * Source Viewset
649
663
  */
@@ -692,6 +706,14 @@ export declare class SourcesApi extends runtime.BaseAPI {
692
706
  * Get a list of all objects that use this object
693
707
  */
694
708
  sourcesUserConnectionsOauthUsedByList(requestParameters: SourcesUserConnectionsOauthUsedByListRequest, initOverrides?: RequestInit): Promise<Array<UsedBy>>;
709
+ /**
710
+ * Plex Source connection Serializer
711
+ */
712
+ sourcesUserConnectionsPlexCreateRaw(requestParameters: SourcesUserConnectionsPlexCreateRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<PlexSourceConnection>>;
713
+ /**
714
+ * Plex Source connection Serializer
715
+ */
716
+ sourcesUserConnectionsPlexCreate(requestParameters: SourcesUserConnectionsPlexCreateRequest, initOverrides?: RequestInit): Promise<PlexSourceConnection>;
695
717
  /**
696
718
  * Plex Source connection Serializer
697
719
  */
@@ -1700,6 +1700,39 @@ export class SourcesApi extends runtime.BaseAPI {
1700
1700
  return yield response.value();
1701
1701
  });
1702
1702
  }
1703
+ /**
1704
+ * Source Viewset
1705
+ */
1706
+ sourcesUserConnectionsOauthCreateRaw(requestParameters, initOverrides) {
1707
+ return __awaiter(this, void 0, void 0, function* () {
1708
+ if (requestParameters.userOAuthSourceConnectionRequest === null || requestParameters.userOAuthSourceConnectionRequest === undefined) {
1709
+ throw new runtime.RequiredError('userOAuthSourceConnectionRequest', 'Required parameter requestParameters.userOAuthSourceConnectionRequest was null or undefined when calling sourcesUserConnectionsOauthCreate.');
1710
+ }
1711
+ const queryParameters = {};
1712
+ const headerParameters = {};
1713
+ headerParameters['Content-Type'] = 'application/json';
1714
+ if (this.configuration && this.configuration.apiKey) {
1715
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1716
+ }
1717
+ const response = yield this.request({
1718
+ path: `/sources/user_connections/oauth/`,
1719
+ method: 'POST',
1720
+ headers: headerParameters,
1721
+ query: queryParameters,
1722
+ body: UserOAuthSourceConnectionRequestToJSON(requestParameters.userOAuthSourceConnectionRequest),
1723
+ }, initOverrides);
1724
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserOAuthSourceConnectionFromJSON(jsonValue));
1725
+ });
1726
+ }
1727
+ /**
1728
+ * Source Viewset
1729
+ */
1730
+ sourcesUserConnectionsOauthCreate(requestParameters, initOverrides) {
1731
+ return __awaiter(this, void 0, void 0, function* () {
1732
+ const response = yield this.sourcesUserConnectionsOauthCreateRaw(requestParameters, initOverrides);
1733
+ return yield response.value();
1734
+ });
1735
+ }
1703
1736
  /**
1704
1737
  * Source Viewset
1705
1738
  */
@@ -1904,6 +1937,39 @@ export class SourcesApi extends runtime.BaseAPI {
1904
1937
  return yield response.value();
1905
1938
  });
1906
1939
  }
1940
+ /**
1941
+ * Plex Source connection Serializer
1942
+ */
1943
+ sourcesUserConnectionsPlexCreateRaw(requestParameters, initOverrides) {
1944
+ return __awaiter(this, void 0, void 0, function* () {
1945
+ if (requestParameters.plexSourceConnectionRequest === null || requestParameters.plexSourceConnectionRequest === undefined) {
1946
+ throw new runtime.RequiredError('plexSourceConnectionRequest', 'Required parameter requestParameters.plexSourceConnectionRequest was null or undefined when calling sourcesUserConnectionsPlexCreate.');
1947
+ }
1948
+ const queryParameters = {};
1949
+ const headerParameters = {};
1950
+ headerParameters['Content-Type'] = 'application/json';
1951
+ if (this.configuration && this.configuration.apiKey) {
1952
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1953
+ }
1954
+ const response = yield this.request({
1955
+ path: `/sources/user_connections/plex/`,
1956
+ method: 'POST',
1957
+ headers: headerParameters,
1958
+ query: queryParameters,
1959
+ body: PlexSourceConnectionRequestToJSON(requestParameters.plexSourceConnectionRequest),
1960
+ }, initOverrides);
1961
+ return new runtime.JSONApiResponse(response, (jsonValue) => PlexSourceConnectionFromJSON(jsonValue));
1962
+ });
1963
+ }
1964
+ /**
1965
+ * Plex Source connection Serializer
1966
+ */
1967
+ sourcesUserConnectionsPlexCreate(requestParameters, initOverrides) {
1968
+ return __awaiter(this, void 0, void 0, function* () {
1969
+ const response = yield this.sourcesUserConnectionsPlexCreateRaw(requestParameters, initOverrides);
1970
+ return yield response.value();
1971
+ });
1972
+ }
1907
1973
  /**
1908
1974
  * Plex Source connection Serializer
1909
1975
  */
@@ -0,0 +1,27 @@
1
+ /**
2
+ * authentik
3
+ * Making authentication simple.
4
+ *
5
+ * The version of the OpenAPI document: 2021.10.4
6
+ * Contact: hello@beryju.org
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Pseudo class for plex response
14
+ * @export
15
+ * @interface AppleChallengeResponseRequest
16
+ */
17
+ export interface AppleChallengeResponseRequest {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AppleChallengeResponseRequest
22
+ */
23
+ component?: string;
24
+ }
25
+ export declare function AppleChallengeResponseRequestFromJSON(json: any): AppleChallengeResponseRequest;
26
+ export declare function AppleChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppleChallengeResponseRequest;
27
+ export declare function AppleChallengeResponseRequestToJSON(value?: AppleChallengeResponseRequest | null): any;
@@ -0,0 +1,36 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * authentik
5
+ * Making authentication simple.
6
+ *
7
+ * The version of the OpenAPI document: 2021.10.4
8
+ * Contact: hello@beryju.org
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
+ import { exists } from '../runtime';
15
+ export function AppleChallengeResponseRequestFromJSON(json) {
16
+ return AppleChallengeResponseRequestFromJSONTyped(json, false);
17
+ }
18
+ export function AppleChallengeResponseRequestFromJSONTyped(json, ignoreDiscriminator) {
19
+ if ((json === undefined) || (json === null)) {
20
+ return json;
21
+ }
22
+ return {
23
+ 'component': !exists(json, 'component') ? undefined : json['component'],
24
+ };
25
+ }
26
+ export function AppleChallengeResponseRequestToJSON(value) {
27
+ if (value === undefined) {
28
+ return undefined;
29
+ }
30
+ if (value === null) {
31
+ return null;
32
+ }
33
+ return {
34
+ 'component': value.component,
35
+ };
36
+ }
@@ -0,0 +1,74 @@
1
+ /**
2
+ * authentik
3
+ * Making authentication simple.
4
+ *
5
+ * The version of the OpenAPI document: 2021.10.4
6
+ * Contact: hello@beryju.org
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { ChallengeChoices } from './ChallengeChoices';
13
+ import { ContextualFlowInfo } from './ContextualFlowInfo';
14
+ import { ErrorDetail } from './ErrorDetail';
15
+ /**
16
+ * Special challenge for apple-native authentication flow, which happens on the client.
17
+ * @export
18
+ * @interface AppleLoginChallenge
19
+ */
20
+ export interface AppleLoginChallenge {
21
+ /**
22
+ *
23
+ * @type {ChallengeChoices}
24
+ * @memberof AppleLoginChallenge
25
+ */
26
+ type: ChallengeChoices;
27
+ /**
28
+ *
29
+ * @type {ContextualFlowInfo}
30
+ * @memberof AppleLoginChallenge
31
+ */
32
+ flowInfo?: ContextualFlowInfo;
33
+ /**
34
+ *
35
+ * @type {string}
36
+ * @memberof AppleLoginChallenge
37
+ */
38
+ component?: string;
39
+ /**
40
+ *
41
+ * @type {{ [key: string]: Array<ErrorDetail>; }}
42
+ * @memberof AppleLoginChallenge
43
+ */
44
+ responseErrors?: {
45
+ [key: string]: Array<ErrorDetail>;
46
+ };
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof AppleLoginChallenge
51
+ */
52
+ clientId: string;
53
+ /**
54
+ *
55
+ * @type {string}
56
+ * @memberof AppleLoginChallenge
57
+ */
58
+ scope: string;
59
+ /**
60
+ *
61
+ * @type {string}
62
+ * @memberof AppleLoginChallenge
63
+ */
64
+ redirectUri: string;
65
+ /**
66
+ *
67
+ * @type {string}
68
+ * @memberof AppleLoginChallenge
69
+ */
70
+ state: string;
71
+ }
72
+ export declare function AppleLoginChallengeFromJSON(json: any): AppleLoginChallenge;
73
+ export declare function AppleLoginChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppleLoginChallenge;
74
+ export declare function AppleLoginChallengeToJSON(value?: AppleLoginChallenge | null): any;
@@ -0,0 +1,52 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * authentik
5
+ * Making authentication simple.
6
+ *
7
+ * The version of the OpenAPI document: 2021.10.4
8
+ * Contact: hello@beryju.org
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
+ import { exists } from '../runtime';
15
+ import { ChallengeChoicesFromJSON, ChallengeChoicesToJSON, } from './ChallengeChoices';
16
+ import { ContextualFlowInfoFromJSON, ContextualFlowInfoToJSON, } from './ContextualFlowInfo';
17
+ export function AppleLoginChallengeFromJSON(json) {
18
+ return AppleLoginChallengeFromJSONTyped(json, false);
19
+ }
20
+ export function AppleLoginChallengeFromJSONTyped(json, ignoreDiscriminator) {
21
+ if ((json === undefined) || (json === null)) {
22
+ return json;
23
+ }
24
+ return {
25
+ 'type': ChallengeChoicesFromJSON(json['type']),
26
+ 'flowInfo': !exists(json, 'flow_info') ? undefined : ContextualFlowInfoFromJSON(json['flow_info']),
27
+ 'component': !exists(json, 'component') ? undefined : json['component'],
28
+ 'responseErrors': !exists(json, 'response_errors') ? undefined : json['response_errors'],
29
+ 'clientId': json['client_id'],
30
+ 'scope': json['scope'],
31
+ 'redirectUri': json['redirect_uri'],
32
+ 'state': json['state'],
33
+ };
34
+ }
35
+ export function AppleLoginChallengeToJSON(value) {
36
+ if (value === undefined) {
37
+ return undefined;
38
+ }
39
+ if (value === null) {
40
+ return null;
41
+ }
42
+ return {
43
+ 'type': ChallengeChoicesToJSON(value.type),
44
+ 'flow_info': ContextualFlowInfoToJSON(value.flowInfo),
45
+ 'component': value.component,
46
+ 'response_errors': value.responseErrors,
47
+ 'client_id': value.clientId,
48
+ 'scope': value.scope,
49
+ 'redirect_uri': value.redirectUri,
50
+ 'state': value.state,
51
+ };
52
+ }
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { AccessDeniedChallenge } from './AccessDeniedChallenge';
13
+ import { AppleLoginChallenge } from './AppleLoginChallenge';
13
14
  import { AuthenticatorDuoChallenge } from './AuthenticatorDuoChallenge';
14
15
  import { AuthenticatorSMSChallenge } from './AuthenticatorSMSChallenge';
15
16
  import { AuthenticatorStaticChallenge } from './AuthenticatorStaticChallenge';
@@ -33,6 +34,8 @@ import { ShellChallenge } from './ShellChallenge';
33
34
  * @export
34
35
  */
35
36
  export declare type ChallengeTypes = {
37
+ component: 'ak-flow-sources-oauth-apple';
38
+ } & AppleLoginChallenge | {
36
39
  component: 'ak-flow-sources-plex';
37
40
  } & PlexAuthenticationChallenge | {
38
41
  component: 'ak-stage-access-denied';
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { AccessDeniedChallengeFromJSONTyped, AccessDeniedChallengeToJSON, } from './AccessDeniedChallenge';
15
+ import { AppleLoginChallengeFromJSONTyped, AppleLoginChallengeToJSON, } from './AppleLoginChallenge';
15
16
  import { AuthenticatorDuoChallengeFromJSONTyped, AuthenticatorDuoChallengeToJSON, } from './AuthenticatorDuoChallenge';
16
17
  import { AuthenticatorSMSChallengeFromJSONTyped, AuthenticatorSMSChallengeToJSON, } from './AuthenticatorSMSChallenge';
17
18
  import { AuthenticatorStaticChallengeFromJSONTyped, AuthenticatorStaticChallengeToJSON, } from './AuthenticatorStaticChallenge';
@@ -37,6 +38,8 @@ export function ChallengeTypesFromJSONTyped(json, ignoreDiscriminator) {
37
38
  return json;
38
39
  }
39
40
  switch (json['component']) {
41
+ case 'ak-flow-sources-oauth-apple':
42
+ return Object.assign(Object.assign({}, AppleLoginChallengeFromJSONTyped(json, true)), { component: 'ak-flow-sources-oauth-apple' });
40
43
  case 'ak-flow-sources-plex':
41
44
  return Object.assign(Object.assign({}, PlexAuthenticationChallengeFromJSONTyped(json, true)), { component: 'ak-flow-sources-plex' });
42
45
  case 'ak-stage-access-denied':
@@ -85,6 +88,8 @@ export function ChallengeTypesToJSON(value) {
85
88
  return null;
86
89
  }
87
90
  switch (value['component']) {
91
+ case 'ak-flow-sources-oauth-apple':
92
+ return AppleLoginChallengeToJSON(value);
88
93
  case 'ak-flow-sources-plex':
89
94
  return PlexAuthenticationChallengeToJSON(value);
90
95
  case 'ak-stage-access-denied':