@goauthentik/api 2024.12.3-1739200400 → 2024.12.3-1739801838
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/.openapi-generator/FILES +10 -0
- package/dist/apis/AuthenticatorsApi.d.ts +145 -1
- package/dist/apis/AuthenticatorsApi.js +458 -0
- package/dist/apis/RbacApi.d.ts +4 -0
- package/dist/apis/RbacApi.js +4 -0
- package/dist/apis/SourcesApi.d.ts +1 -0
- package/dist/apis/SourcesApi.js +3 -0
- package/dist/apis/StagesApi.d.ts +99 -1
- package/dist/apis/StagesApi.js +310 -0
- package/dist/esm/apis/AuthenticatorsApi.d.ts +145 -1
- package/dist/esm/apis/AuthenticatorsApi.js +459 -1
- package/dist/esm/apis/RbacApi.d.ts +4 -0
- package/dist/esm/apis/RbacApi.js +4 -0
- package/dist/esm/apis/SourcesApi.d.ts +1 -0
- package/dist/esm/apis/SourcesApi.js +3 -0
- package/dist/esm/apis/StagesApi.d.ts +99 -1
- package/dist/esm/apis/StagesApi.js +311 -1
- package/dist/esm/models/AppEnum.d.ts +1 -0
- package/dist/esm/models/AppEnum.js +1 -0
- package/dist/esm/models/AuthenticatorEmailChallenge.d.ts +72 -0
- package/dist/esm/models/AuthenticatorEmailChallenge.js +58 -0
- package/dist/esm/models/AuthenticatorEmailChallengeResponseRequest.d.ts +44 -0
- package/dist/esm/models/AuthenticatorEmailChallengeResponseRequest.js +45 -0
- package/dist/esm/models/AuthenticatorEmailStage.d.ts +153 -0
- package/dist/esm/models/AuthenticatorEmailStage.js +89 -0
- package/dist/esm/models/AuthenticatorEmailStageRequest.d.ts +123 -0
- package/dist/esm/models/AuthenticatorEmailStageRequest.js +74 -0
- package/dist/esm/models/ChallengeTypes.d.ts +3 -0
- package/dist/esm/models/ChallengeTypes.js +5 -0
- package/dist/esm/models/DeviceClassesEnum.d.ts +1 -0
- package/dist/esm/models/DeviceClassesEnum.js +1 -0
- package/dist/esm/models/EmailDevice.d.ts +51 -0
- package/dist/esm/models/EmailDevice.js +53 -0
- package/dist/esm/models/EmailDeviceRequest.d.ts +32 -0
- package/dist/esm/models/EmailDeviceRequest.js +43 -0
- package/dist/esm/models/FlowChallengeResponseRequest.d.ts +3 -0
- package/dist/esm/models/FlowChallengeResponseRequest.js +5 -0
- package/dist/esm/models/ModelEnum.d.ts +2 -0
- package/dist/esm/models/ModelEnum.js +2 -0
- package/dist/esm/models/PaginatedAuthenticatorEmailStageList.d.ts +40 -0
- package/dist/esm/models/PaginatedAuthenticatorEmailStageList.js +49 -0
- package/dist/esm/models/PaginatedEmailDeviceList.d.ts +40 -0
- package/dist/esm/models/PaginatedEmailDeviceList.js +49 -0
- package/dist/esm/models/PatchedAuthenticatorEmailStageRequest.d.ts +123 -0
- package/dist/esm/models/PatchedAuthenticatorEmailStageRequest.js +72 -0
- package/dist/esm/models/PatchedEmailDeviceRequest.d.ts +32 -0
- package/dist/esm/models/PatchedEmailDeviceRequest.js +41 -0
- package/dist/esm/models/index.d.ts +10 -0
- package/dist/esm/models/index.js +10 -0
- package/dist/models/AppEnum.d.ts +1 -0
- package/dist/models/AppEnum.js +1 -0
- package/dist/models/AuthenticatorEmailChallenge.d.ts +72 -0
- package/dist/models/AuthenticatorEmailChallenge.js +65 -0
- package/dist/models/AuthenticatorEmailChallengeResponseRequest.d.ts +44 -0
- package/dist/models/AuthenticatorEmailChallengeResponseRequest.js +52 -0
- package/dist/models/AuthenticatorEmailStage.d.ts +153 -0
- package/dist/models/AuthenticatorEmailStage.js +96 -0
- package/dist/models/AuthenticatorEmailStageRequest.d.ts +123 -0
- package/dist/models/AuthenticatorEmailStageRequest.js +81 -0
- package/dist/models/ChallengeTypes.d.ts +3 -0
- package/dist/models/ChallengeTypes.js +5 -0
- package/dist/models/DeviceClassesEnum.d.ts +1 -0
- package/dist/models/DeviceClassesEnum.js +1 -0
- package/dist/models/EmailDevice.d.ts +51 -0
- package/dist/models/EmailDevice.js +60 -0
- package/dist/models/EmailDeviceRequest.d.ts +32 -0
- package/dist/models/EmailDeviceRequest.js +50 -0
- package/dist/models/FlowChallengeResponseRequest.d.ts +3 -0
- package/dist/models/FlowChallengeResponseRequest.js +5 -0
- package/dist/models/ModelEnum.d.ts +2 -0
- package/dist/models/ModelEnum.js +2 -0
- package/dist/models/PaginatedAuthenticatorEmailStageList.d.ts +40 -0
- package/dist/models/PaginatedAuthenticatorEmailStageList.js +56 -0
- package/dist/models/PaginatedEmailDeviceList.d.ts +40 -0
- package/dist/models/PaginatedEmailDeviceList.js +56 -0
- package/dist/models/PatchedAuthenticatorEmailStageRequest.d.ts +123 -0
- package/dist/models/PatchedAuthenticatorEmailStageRequest.js +79 -0
- package/dist/models/PatchedEmailDeviceRequest.d.ts +32 -0
- package/dist/models/PatchedEmailDeviceRequest.js +48 -0
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +10 -0
- package/package.json +1 -1
- package/src/apis/AuthenticatorsApi.ts +617 -0
- package/src/apis/RbacApi.ts +4 -0
- package/src/apis/SourcesApi.ts +5 -0
- package/src/apis/StagesApi.ts +436 -0
- package/src/models/AppEnum.ts +1 -0
- package/src/models/AuthenticatorEmailChallenge.ts +130 -0
- package/src/models/AuthenticatorEmailChallengeResponseRequest.ts +81 -0
- package/src/models/AuthenticatorEmailStage.ts +234 -0
- package/src/models/AuthenticatorEmailStageRequest.ts +194 -0
- package/src/models/ChallengeTypes.ts +12 -1
- package/src/models/DeviceClassesEnum.ts +1 -0
- package/src/models/EmailDevice.ts +98 -0
- package/src/models/EmailDeviceRequest.ts +66 -0
- package/src/models/FlowChallengeResponseRequest.ts +12 -1
- package/src/models/ModelEnum.ts +2 -0
- package/src/models/PaginatedAuthenticatorEmailStageList.ts +90 -0
- package/src/models/PaginatedEmailDeviceList.ts +90 -0
- package/src/models/PatchedAuthenticatorEmailStageRequest.ts +193 -0
- package/src/models/PatchedEmailDeviceRequest.ts +65 -0
- package/src/models/index.ts +10 -0
package/src/apis/SourcesApi.ts
CHANGED
|
@@ -278,6 +278,7 @@ export interface SourcesAllListRequest {
|
|
|
278
278
|
ordering?: string;
|
|
279
279
|
page?: number;
|
|
280
280
|
pageSize?: number;
|
|
281
|
+
pbmUuid?: string;
|
|
281
282
|
search?: string;
|
|
282
283
|
slug?: string;
|
|
283
284
|
}
|
|
@@ -1061,6 +1062,10 @@ export class SourcesApi extends runtime.BaseAPI {
|
|
|
1061
1062
|
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
1062
1063
|
}
|
|
1063
1064
|
|
|
1065
|
+
if (requestParameters['pbmUuid'] != null) {
|
|
1066
|
+
queryParameters['pbm_uuid'] = requestParameters['pbmUuid'];
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1064
1069
|
if (requestParameters['search'] != null) {
|
|
1065
1070
|
queryParameters['search'] = requestParameters['search'];
|
|
1066
1071
|
}
|
package/src/apis/StagesApi.ts
CHANGED
|
@@ -19,6 +19,8 @@ import type {
|
|
|
19
19
|
AuthenticatorDuoStageDeviceImportResponse,
|
|
20
20
|
AuthenticatorDuoStageManualDeviceImportRequest,
|
|
21
21
|
AuthenticatorDuoStageRequest,
|
|
22
|
+
AuthenticatorEmailStage,
|
|
23
|
+
AuthenticatorEmailStageRequest,
|
|
22
24
|
AuthenticatorEndpointGDTCStage,
|
|
23
25
|
AuthenticatorEndpointGDTCStageRequest,
|
|
24
26
|
AuthenticatorSMSStage,
|
|
@@ -50,6 +52,7 @@ import type {
|
|
|
50
52
|
InvitationStage,
|
|
51
53
|
InvitationStageRequest,
|
|
52
54
|
PaginatedAuthenticatorDuoStageList,
|
|
55
|
+
PaginatedAuthenticatorEmailStageList,
|
|
53
56
|
PaginatedAuthenticatorEndpointGDTCStageList,
|
|
54
57
|
PaginatedAuthenticatorSMSStageList,
|
|
55
58
|
PaginatedAuthenticatorStaticStageList,
|
|
@@ -78,6 +81,7 @@ import type {
|
|
|
78
81
|
PasswordStage,
|
|
79
82
|
PasswordStageRequest,
|
|
80
83
|
PatchedAuthenticatorDuoStageRequest,
|
|
84
|
+
PatchedAuthenticatorEmailStageRequest,
|
|
81
85
|
PatchedAuthenticatorEndpointGDTCStageRequest,
|
|
82
86
|
PatchedAuthenticatorSMSStageRequest,
|
|
83
87
|
PatchedAuthenticatorStaticStageRequest,
|
|
@@ -134,6 +138,10 @@ import {
|
|
|
134
138
|
AuthenticatorDuoStageManualDeviceImportRequestToJSON,
|
|
135
139
|
AuthenticatorDuoStageRequestFromJSON,
|
|
136
140
|
AuthenticatorDuoStageRequestToJSON,
|
|
141
|
+
AuthenticatorEmailStageFromJSON,
|
|
142
|
+
AuthenticatorEmailStageToJSON,
|
|
143
|
+
AuthenticatorEmailStageRequestFromJSON,
|
|
144
|
+
AuthenticatorEmailStageRequestToJSON,
|
|
137
145
|
AuthenticatorEndpointGDTCStageFromJSON,
|
|
138
146
|
AuthenticatorEndpointGDTCStageToJSON,
|
|
139
147
|
AuthenticatorEndpointGDTCStageRequestFromJSON,
|
|
@@ -196,6 +204,8 @@ import {
|
|
|
196
204
|
InvitationStageRequestToJSON,
|
|
197
205
|
PaginatedAuthenticatorDuoStageListFromJSON,
|
|
198
206
|
PaginatedAuthenticatorDuoStageListToJSON,
|
|
207
|
+
PaginatedAuthenticatorEmailStageListFromJSON,
|
|
208
|
+
PaginatedAuthenticatorEmailStageListToJSON,
|
|
199
209
|
PaginatedAuthenticatorEndpointGDTCStageListFromJSON,
|
|
200
210
|
PaginatedAuthenticatorEndpointGDTCStageListToJSON,
|
|
201
211
|
PaginatedAuthenticatorSMSStageListFromJSON,
|
|
@@ -252,6 +262,8 @@ import {
|
|
|
252
262
|
PasswordStageRequestToJSON,
|
|
253
263
|
PatchedAuthenticatorDuoStageRequestFromJSON,
|
|
254
264
|
PatchedAuthenticatorDuoStageRequestToJSON,
|
|
265
|
+
PatchedAuthenticatorEmailStageRequestFromJSON,
|
|
266
|
+
PatchedAuthenticatorEmailStageRequestToJSON,
|
|
255
267
|
PatchedAuthenticatorEndpointGDTCStageRequestFromJSON,
|
|
256
268
|
PatchedAuthenticatorEndpointGDTCStageRequestToJSON,
|
|
257
269
|
PatchedAuthenticatorSMSStageRequestFromJSON,
|
|
@@ -416,6 +428,55 @@ export interface StagesAuthenticatorDuoUsedByListRequest {
|
|
|
416
428
|
stageUuid: string;
|
|
417
429
|
}
|
|
418
430
|
|
|
431
|
+
export interface StagesAuthenticatorEmailCreateRequest {
|
|
432
|
+
authenticatorEmailStageRequest: AuthenticatorEmailStageRequest;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export interface StagesAuthenticatorEmailDestroyRequest {
|
|
436
|
+
stageUuid: string;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
export interface StagesAuthenticatorEmailListRequest {
|
|
440
|
+
configureFlow?: string;
|
|
441
|
+
friendlyName?: string;
|
|
442
|
+
fromAddress?: string;
|
|
443
|
+
host?: string;
|
|
444
|
+
name?: string;
|
|
445
|
+
ordering?: string;
|
|
446
|
+
page?: number;
|
|
447
|
+
pageSize?: number;
|
|
448
|
+
password?: string;
|
|
449
|
+
port?: number;
|
|
450
|
+
search?: string;
|
|
451
|
+
stageUuid?: string;
|
|
452
|
+
subject?: string;
|
|
453
|
+
template?: string;
|
|
454
|
+
timeout?: number;
|
|
455
|
+
tokenExpiry?: string;
|
|
456
|
+
useGlobalSettings?: boolean;
|
|
457
|
+
useSsl?: boolean;
|
|
458
|
+
useTls?: boolean;
|
|
459
|
+
username?: string;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
export interface StagesAuthenticatorEmailPartialUpdateRequest {
|
|
463
|
+
stageUuid: string;
|
|
464
|
+
patchedAuthenticatorEmailStageRequest?: PatchedAuthenticatorEmailStageRequest;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
export interface StagesAuthenticatorEmailRetrieveRequest {
|
|
468
|
+
stageUuid: string;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export interface StagesAuthenticatorEmailUpdateRequest {
|
|
472
|
+
stageUuid: string;
|
|
473
|
+
authenticatorEmailStageRequest: AuthenticatorEmailStageRequest;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export interface StagesAuthenticatorEmailUsedByListRequest {
|
|
477
|
+
stageUuid: string;
|
|
478
|
+
}
|
|
479
|
+
|
|
419
480
|
export interface StagesAuthenticatorEndpointGdtcCreateRequest {
|
|
420
481
|
authenticatorEndpointGDTCStageRequest: AuthenticatorEndpointGDTCStageRequest;
|
|
421
482
|
}
|
|
@@ -2015,6 +2076,381 @@ export class StagesApi extends runtime.BaseAPI {
|
|
|
2015
2076
|
return await response.value();
|
|
2016
2077
|
}
|
|
2017
2078
|
|
|
2079
|
+
/**
|
|
2080
|
+
* AuthenticatorEmailStage Viewset
|
|
2081
|
+
*/
|
|
2082
|
+
async stagesAuthenticatorEmailCreateRaw(requestParameters: StagesAuthenticatorEmailCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthenticatorEmailStage>> {
|
|
2083
|
+
if (requestParameters['authenticatorEmailStageRequest'] == null) {
|
|
2084
|
+
throw new runtime.RequiredError(
|
|
2085
|
+
'authenticatorEmailStageRequest',
|
|
2086
|
+
'Required parameter "authenticatorEmailStageRequest" was null or undefined when calling stagesAuthenticatorEmailCreate().'
|
|
2087
|
+
);
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
const queryParameters: any = {};
|
|
2091
|
+
|
|
2092
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2093
|
+
|
|
2094
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2095
|
+
|
|
2096
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2097
|
+
const token = this.configuration.accessToken;
|
|
2098
|
+
const tokenString = await token("authentik", []);
|
|
2099
|
+
|
|
2100
|
+
if (tokenString) {
|
|
2101
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
const response = await this.request({
|
|
2105
|
+
path: `/stages/authenticator/email/`,
|
|
2106
|
+
method: 'POST',
|
|
2107
|
+
headers: headerParameters,
|
|
2108
|
+
query: queryParameters,
|
|
2109
|
+
body: AuthenticatorEmailStageRequestToJSON(requestParameters['authenticatorEmailStageRequest']),
|
|
2110
|
+
}, initOverrides);
|
|
2111
|
+
|
|
2112
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorEmailStageFromJSON(jsonValue));
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
/**
|
|
2116
|
+
* AuthenticatorEmailStage Viewset
|
|
2117
|
+
*/
|
|
2118
|
+
async stagesAuthenticatorEmailCreate(requestParameters: StagesAuthenticatorEmailCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthenticatorEmailStage> {
|
|
2119
|
+
const response = await this.stagesAuthenticatorEmailCreateRaw(requestParameters, initOverrides);
|
|
2120
|
+
return await response.value();
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
/**
|
|
2124
|
+
* AuthenticatorEmailStage Viewset
|
|
2125
|
+
*/
|
|
2126
|
+
async stagesAuthenticatorEmailDestroyRaw(requestParameters: StagesAuthenticatorEmailDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
2127
|
+
if (requestParameters['stageUuid'] == null) {
|
|
2128
|
+
throw new runtime.RequiredError(
|
|
2129
|
+
'stageUuid',
|
|
2130
|
+
'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorEmailDestroy().'
|
|
2131
|
+
);
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
const queryParameters: any = {};
|
|
2135
|
+
|
|
2136
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2137
|
+
|
|
2138
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2139
|
+
const token = this.configuration.accessToken;
|
|
2140
|
+
const tokenString = await token("authentik", []);
|
|
2141
|
+
|
|
2142
|
+
if (tokenString) {
|
|
2143
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
2146
|
+
const response = await this.request({
|
|
2147
|
+
path: `/stages/authenticator/email/{stage_uuid}/`.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))),
|
|
2148
|
+
method: 'DELETE',
|
|
2149
|
+
headers: headerParameters,
|
|
2150
|
+
query: queryParameters,
|
|
2151
|
+
}, initOverrides);
|
|
2152
|
+
|
|
2153
|
+
return new runtime.VoidApiResponse(response);
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
/**
|
|
2157
|
+
* AuthenticatorEmailStage Viewset
|
|
2158
|
+
*/
|
|
2159
|
+
async stagesAuthenticatorEmailDestroy(requestParameters: StagesAuthenticatorEmailDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
2160
|
+
await this.stagesAuthenticatorEmailDestroyRaw(requestParameters, initOverrides);
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
/**
|
|
2164
|
+
* AuthenticatorEmailStage Viewset
|
|
2165
|
+
*/
|
|
2166
|
+
async stagesAuthenticatorEmailListRaw(requestParameters: StagesAuthenticatorEmailListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedAuthenticatorEmailStageList>> {
|
|
2167
|
+
const queryParameters: any = {};
|
|
2168
|
+
|
|
2169
|
+
if (requestParameters['configureFlow'] != null) {
|
|
2170
|
+
queryParameters['configure_flow'] = requestParameters['configureFlow'];
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
if (requestParameters['friendlyName'] != null) {
|
|
2174
|
+
queryParameters['friendly_name'] = requestParameters['friendlyName'];
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
if (requestParameters['fromAddress'] != null) {
|
|
2178
|
+
queryParameters['from_address'] = requestParameters['fromAddress'];
|
|
2179
|
+
}
|
|
2180
|
+
|
|
2181
|
+
if (requestParameters['host'] != null) {
|
|
2182
|
+
queryParameters['host'] = requestParameters['host'];
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
if (requestParameters['name'] != null) {
|
|
2186
|
+
queryParameters['name'] = requestParameters['name'];
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2189
|
+
if (requestParameters['ordering'] != null) {
|
|
2190
|
+
queryParameters['ordering'] = requestParameters['ordering'];
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
if (requestParameters['page'] != null) {
|
|
2194
|
+
queryParameters['page'] = requestParameters['page'];
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2197
|
+
if (requestParameters['pageSize'] != null) {
|
|
2198
|
+
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
if (requestParameters['password'] != null) {
|
|
2202
|
+
queryParameters['password'] = requestParameters['password'];
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
if (requestParameters['port'] != null) {
|
|
2206
|
+
queryParameters['port'] = requestParameters['port'];
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2209
|
+
if (requestParameters['search'] != null) {
|
|
2210
|
+
queryParameters['search'] = requestParameters['search'];
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
if (requestParameters['stageUuid'] != null) {
|
|
2214
|
+
queryParameters['stage_uuid'] = requestParameters['stageUuid'];
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
if (requestParameters['subject'] != null) {
|
|
2218
|
+
queryParameters['subject'] = requestParameters['subject'];
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
if (requestParameters['template'] != null) {
|
|
2222
|
+
queryParameters['template'] = requestParameters['template'];
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
if (requestParameters['timeout'] != null) {
|
|
2226
|
+
queryParameters['timeout'] = requestParameters['timeout'];
|
|
2227
|
+
}
|
|
2228
|
+
|
|
2229
|
+
if (requestParameters['tokenExpiry'] != null) {
|
|
2230
|
+
queryParameters['token_expiry'] = requestParameters['tokenExpiry'];
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2233
|
+
if (requestParameters['useGlobalSettings'] != null) {
|
|
2234
|
+
queryParameters['use_global_settings'] = requestParameters['useGlobalSettings'];
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
if (requestParameters['useSsl'] != null) {
|
|
2238
|
+
queryParameters['use_ssl'] = requestParameters['useSsl'];
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2241
|
+
if (requestParameters['useTls'] != null) {
|
|
2242
|
+
queryParameters['use_tls'] = requestParameters['useTls'];
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
if (requestParameters['username'] != null) {
|
|
2246
|
+
queryParameters['username'] = requestParameters['username'];
|
|
2247
|
+
}
|
|
2248
|
+
|
|
2249
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2250
|
+
|
|
2251
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2252
|
+
const token = this.configuration.accessToken;
|
|
2253
|
+
const tokenString = await token("authentik", []);
|
|
2254
|
+
|
|
2255
|
+
if (tokenString) {
|
|
2256
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2257
|
+
}
|
|
2258
|
+
}
|
|
2259
|
+
const response = await this.request({
|
|
2260
|
+
path: `/stages/authenticator/email/`,
|
|
2261
|
+
method: 'GET',
|
|
2262
|
+
headers: headerParameters,
|
|
2263
|
+
query: queryParameters,
|
|
2264
|
+
}, initOverrides);
|
|
2265
|
+
|
|
2266
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedAuthenticatorEmailStageListFromJSON(jsonValue));
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2269
|
+
/**
|
|
2270
|
+
* AuthenticatorEmailStage Viewset
|
|
2271
|
+
*/
|
|
2272
|
+
async stagesAuthenticatorEmailList(requestParameters: StagesAuthenticatorEmailListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedAuthenticatorEmailStageList> {
|
|
2273
|
+
const response = await this.stagesAuthenticatorEmailListRaw(requestParameters, initOverrides);
|
|
2274
|
+
return await response.value();
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
/**
|
|
2278
|
+
* AuthenticatorEmailStage Viewset
|
|
2279
|
+
*/
|
|
2280
|
+
async stagesAuthenticatorEmailPartialUpdateRaw(requestParameters: StagesAuthenticatorEmailPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthenticatorEmailStage>> {
|
|
2281
|
+
if (requestParameters['stageUuid'] == null) {
|
|
2282
|
+
throw new runtime.RequiredError(
|
|
2283
|
+
'stageUuid',
|
|
2284
|
+
'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorEmailPartialUpdate().'
|
|
2285
|
+
);
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
const queryParameters: any = {};
|
|
2289
|
+
|
|
2290
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2291
|
+
|
|
2292
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2293
|
+
|
|
2294
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2295
|
+
const token = this.configuration.accessToken;
|
|
2296
|
+
const tokenString = await token("authentik", []);
|
|
2297
|
+
|
|
2298
|
+
if (tokenString) {
|
|
2299
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
const response = await this.request({
|
|
2303
|
+
path: `/stages/authenticator/email/{stage_uuid}/`.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))),
|
|
2304
|
+
method: 'PATCH',
|
|
2305
|
+
headers: headerParameters,
|
|
2306
|
+
query: queryParameters,
|
|
2307
|
+
body: PatchedAuthenticatorEmailStageRequestToJSON(requestParameters['patchedAuthenticatorEmailStageRequest']),
|
|
2308
|
+
}, initOverrides);
|
|
2309
|
+
|
|
2310
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorEmailStageFromJSON(jsonValue));
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
/**
|
|
2314
|
+
* AuthenticatorEmailStage Viewset
|
|
2315
|
+
*/
|
|
2316
|
+
async stagesAuthenticatorEmailPartialUpdate(requestParameters: StagesAuthenticatorEmailPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthenticatorEmailStage> {
|
|
2317
|
+
const response = await this.stagesAuthenticatorEmailPartialUpdateRaw(requestParameters, initOverrides);
|
|
2318
|
+
return await response.value();
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
/**
|
|
2322
|
+
* AuthenticatorEmailStage Viewset
|
|
2323
|
+
*/
|
|
2324
|
+
async stagesAuthenticatorEmailRetrieveRaw(requestParameters: StagesAuthenticatorEmailRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthenticatorEmailStage>> {
|
|
2325
|
+
if (requestParameters['stageUuid'] == null) {
|
|
2326
|
+
throw new runtime.RequiredError(
|
|
2327
|
+
'stageUuid',
|
|
2328
|
+
'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorEmailRetrieve().'
|
|
2329
|
+
);
|
|
2330
|
+
}
|
|
2331
|
+
|
|
2332
|
+
const queryParameters: any = {};
|
|
2333
|
+
|
|
2334
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2335
|
+
|
|
2336
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2337
|
+
const token = this.configuration.accessToken;
|
|
2338
|
+
const tokenString = await token("authentik", []);
|
|
2339
|
+
|
|
2340
|
+
if (tokenString) {
|
|
2341
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2344
|
+
const response = await this.request({
|
|
2345
|
+
path: `/stages/authenticator/email/{stage_uuid}/`.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))),
|
|
2346
|
+
method: 'GET',
|
|
2347
|
+
headers: headerParameters,
|
|
2348
|
+
query: queryParameters,
|
|
2349
|
+
}, initOverrides);
|
|
2350
|
+
|
|
2351
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorEmailStageFromJSON(jsonValue));
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2354
|
+
/**
|
|
2355
|
+
* AuthenticatorEmailStage Viewset
|
|
2356
|
+
*/
|
|
2357
|
+
async stagesAuthenticatorEmailRetrieve(requestParameters: StagesAuthenticatorEmailRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthenticatorEmailStage> {
|
|
2358
|
+
const response = await this.stagesAuthenticatorEmailRetrieveRaw(requestParameters, initOverrides);
|
|
2359
|
+
return await response.value();
|
|
2360
|
+
}
|
|
2361
|
+
|
|
2362
|
+
/**
|
|
2363
|
+
* AuthenticatorEmailStage Viewset
|
|
2364
|
+
*/
|
|
2365
|
+
async stagesAuthenticatorEmailUpdateRaw(requestParameters: StagesAuthenticatorEmailUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthenticatorEmailStage>> {
|
|
2366
|
+
if (requestParameters['stageUuid'] == null) {
|
|
2367
|
+
throw new runtime.RequiredError(
|
|
2368
|
+
'stageUuid',
|
|
2369
|
+
'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorEmailUpdate().'
|
|
2370
|
+
);
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
if (requestParameters['authenticatorEmailStageRequest'] == null) {
|
|
2374
|
+
throw new runtime.RequiredError(
|
|
2375
|
+
'authenticatorEmailStageRequest',
|
|
2376
|
+
'Required parameter "authenticatorEmailStageRequest" was null or undefined when calling stagesAuthenticatorEmailUpdate().'
|
|
2377
|
+
);
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2380
|
+
const queryParameters: any = {};
|
|
2381
|
+
|
|
2382
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2383
|
+
|
|
2384
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2385
|
+
|
|
2386
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2387
|
+
const token = this.configuration.accessToken;
|
|
2388
|
+
const tokenString = await token("authentik", []);
|
|
2389
|
+
|
|
2390
|
+
if (tokenString) {
|
|
2391
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
const response = await this.request({
|
|
2395
|
+
path: `/stages/authenticator/email/{stage_uuid}/`.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))),
|
|
2396
|
+
method: 'PUT',
|
|
2397
|
+
headers: headerParameters,
|
|
2398
|
+
query: queryParameters,
|
|
2399
|
+
body: AuthenticatorEmailStageRequestToJSON(requestParameters['authenticatorEmailStageRequest']),
|
|
2400
|
+
}, initOverrides);
|
|
2401
|
+
|
|
2402
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorEmailStageFromJSON(jsonValue));
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
/**
|
|
2406
|
+
* AuthenticatorEmailStage Viewset
|
|
2407
|
+
*/
|
|
2408
|
+
async stagesAuthenticatorEmailUpdate(requestParameters: StagesAuthenticatorEmailUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthenticatorEmailStage> {
|
|
2409
|
+
const response = await this.stagesAuthenticatorEmailUpdateRaw(requestParameters, initOverrides);
|
|
2410
|
+
return await response.value();
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
/**
|
|
2414
|
+
* Get a list of all objects that use this object
|
|
2415
|
+
*/
|
|
2416
|
+
async stagesAuthenticatorEmailUsedByListRaw(requestParameters: StagesAuthenticatorEmailUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<UsedBy>>> {
|
|
2417
|
+
if (requestParameters['stageUuid'] == null) {
|
|
2418
|
+
throw new runtime.RequiredError(
|
|
2419
|
+
'stageUuid',
|
|
2420
|
+
'Required parameter "stageUuid" was null or undefined when calling stagesAuthenticatorEmailUsedByList().'
|
|
2421
|
+
);
|
|
2422
|
+
}
|
|
2423
|
+
|
|
2424
|
+
const queryParameters: any = {};
|
|
2425
|
+
|
|
2426
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2427
|
+
|
|
2428
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2429
|
+
const token = this.configuration.accessToken;
|
|
2430
|
+
const tokenString = await token("authentik", []);
|
|
2431
|
+
|
|
2432
|
+
if (tokenString) {
|
|
2433
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2434
|
+
}
|
|
2435
|
+
}
|
|
2436
|
+
const response = await this.request({
|
|
2437
|
+
path: `/stages/authenticator/email/{stage_uuid}/used_by/`.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters['stageUuid']))),
|
|
2438
|
+
method: 'GET',
|
|
2439
|
+
headers: headerParameters,
|
|
2440
|
+
query: queryParameters,
|
|
2441
|
+
}, initOverrides);
|
|
2442
|
+
|
|
2443
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON));
|
|
2444
|
+
}
|
|
2445
|
+
|
|
2446
|
+
/**
|
|
2447
|
+
* Get a list of all objects that use this object
|
|
2448
|
+
*/
|
|
2449
|
+
async stagesAuthenticatorEmailUsedByList(requestParameters: StagesAuthenticatorEmailUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<UsedBy>> {
|
|
2450
|
+
const response = await this.stagesAuthenticatorEmailUsedByListRaw(requestParameters, initOverrides);
|
|
2451
|
+
return await response.value();
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2018
2454
|
/**
|
|
2019
2455
|
* AuthenticatorEndpointGDTCStage Viewset
|
|
2020
2456
|
*/
|
package/src/models/AppEnum.ts
CHANGED
|
@@ -48,6 +48,7 @@ export const AppEnum = {
|
|
|
48
48
|
AuthentikSourcesScim: 'authentik.sources.scim',
|
|
49
49
|
AuthentikStagesAuthenticator: 'authentik.stages.authenticator',
|
|
50
50
|
AuthentikStagesAuthenticatorDuo: 'authentik.stages.authenticator_duo',
|
|
51
|
+
AuthentikStagesAuthenticatorEmail: 'authentik.stages.authenticator_email',
|
|
51
52
|
AuthentikStagesAuthenticatorSms: 'authentik.stages.authenticator_sms',
|
|
52
53
|
AuthentikStagesAuthenticatorStatic: 'authentik.stages.authenticator_static',
|
|
53
54
|
AuthentikStagesAuthenticatorTotp: 'authentik.stages.authenticator_totp',
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* authentik
|
|
5
|
+
* Making authentication simple.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024.12.3
|
|
8
|
+
* Contact: hello@goauthentik.io
|
|
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 { mapValues } from '../runtime';
|
|
16
|
+
import type { ErrorDetail } from './ErrorDetail';
|
|
17
|
+
import {
|
|
18
|
+
ErrorDetailFromJSON,
|
|
19
|
+
ErrorDetailFromJSONTyped,
|
|
20
|
+
ErrorDetailToJSON,
|
|
21
|
+
ErrorDetailToJSONTyped,
|
|
22
|
+
} from './ErrorDetail';
|
|
23
|
+
import type { ContextualFlowInfo } from './ContextualFlowInfo';
|
|
24
|
+
import {
|
|
25
|
+
ContextualFlowInfoFromJSON,
|
|
26
|
+
ContextualFlowInfoFromJSONTyped,
|
|
27
|
+
ContextualFlowInfoToJSON,
|
|
28
|
+
ContextualFlowInfoToJSONTyped,
|
|
29
|
+
} from './ContextualFlowInfo';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Authenticator Email Setup challenge
|
|
33
|
+
* @export
|
|
34
|
+
* @interface AuthenticatorEmailChallenge
|
|
35
|
+
*/
|
|
36
|
+
export interface AuthenticatorEmailChallenge {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {ContextualFlowInfo}
|
|
40
|
+
* @memberof AuthenticatorEmailChallenge
|
|
41
|
+
*/
|
|
42
|
+
flowInfo?: ContextualFlowInfo;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof AuthenticatorEmailChallenge
|
|
47
|
+
*/
|
|
48
|
+
component?: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {{ [key: string]: Array<ErrorDetail>; }}
|
|
52
|
+
* @memberof AuthenticatorEmailChallenge
|
|
53
|
+
*/
|
|
54
|
+
responseErrors?: { [key: string]: Array<ErrorDetail>; };
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof AuthenticatorEmailChallenge
|
|
59
|
+
*/
|
|
60
|
+
pendingUser: string;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof AuthenticatorEmailChallenge
|
|
65
|
+
*/
|
|
66
|
+
pendingUserAvatar: string;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof AuthenticatorEmailChallenge
|
|
71
|
+
*/
|
|
72
|
+
email?: string | null;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {boolean}
|
|
76
|
+
* @memberof AuthenticatorEmailChallenge
|
|
77
|
+
*/
|
|
78
|
+
emailRequired?: boolean;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Check if a given object implements the AuthenticatorEmailChallenge interface.
|
|
83
|
+
*/
|
|
84
|
+
export function instanceOfAuthenticatorEmailChallenge(value: object): value is AuthenticatorEmailChallenge {
|
|
85
|
+
if (!('pendingUser' in value) || value['pendingUser'] === undefined) return false;
|
|
86
|
+
if (!('pendingUserAvatar' in value) || value['pendingUserAvatar'] === undefined) return false;
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function AuthenticatorEmailChallengeFromJSON(json: any): AuthenticatorEmailChallenge {
|
|
91
|
+
return AuthenticatorEmailChallengeFromJSONTyped(json, false);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function AuthenticatorEmailChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthenticatorEmailChallenge {
|
|
95
|
+
if (json == null) {
|
|
96
|
+
return json;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
|
|
100
|
+
'flowInfo': json['flow_info'] == null ? undefined : ContextualFlowInfoFromJSON(json['flow_info']),
|
|
101
|
+
'component': json['component'] == null ? undefined : json['component'],
|
|
102
|
+
'responseErrors': json['response_errors'] == null ? undefined : json['response_errors'],
|
|
103
|
+
'pendingUser': json['pending_user'],
|
|
104
|
+
'pendingUserAvatar': json['pending_user_avatar'],
|
|
105
|
+
'email': json['email'] == null ? undefined : json['email'],
|
|
106
|
+
'emailRequired': json['email_required'] == null ? undefined : json['email_required'],
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function AuthenticatorEmailChallengeToJSON(json: any): AuthenticatorEmailChallenge {
|
|
111
|
+
return AuthenticatorEmailChallengeToJSONTyped(json, false);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function AuthenticatorEmailChallengeToJSONTyped(value?: AuthenticatorEmailChallenge | null, ignoreDiscriminator: boolean = false): any {
|
|
115
|
+
if (value == null) {
|
|
116
|
+
return value;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return {
|
|
120
|
+
|
|
121
|
+
'flow_info': ContextualFlowInfoToJSON(value['flowInfo']),
|
|
122
|
+
'component': value['component'],
|
|
123
|
+
'response_errors': value['responseErrors'],
|
|
124
|
+
'pending_user': value['pendingUser'],
|
|
125
|
+
'pending_user_avatar': value['pendingUserAvatar'],
|
|
126
|
+
'email': value['email'],
|
|
127
|
+
'email_required': value['emailRequired'],
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|