@goauthentik/api 2024.6.3-1722881330 → 2024.6.3-1723032607
Sign up to get free protection for your applications and to get access to all the features.
- package/.openapi-generator/FILES +8 -0
- package/dist/apis/PoliciesApi.d.ts +92 -1
- package/dist/apis/PoliciesApi.js +297 -0
- package/dist/apis/RbacApi.d.ts +2 -0
- package/dist/apis/RbacApi.js +2 -0
- package/dist/esm/apis/PoliciesApi.d.ts +92 -1
- package/dist/esm/apis/PoliciesApi.js +298 -1
- package/dist/esm/apis/RbacApi.d.ts +2 -0
- package/dist/esm/apis/RbacApi.js +2 -0
- package/dist/esm/models/AppEnum.d.ts +1 -0
- package/dist/esm/models/AppEnum.js +1 -0
- package/dist/esm/models/CountryCodeEnum.d.ts +271 -0
- package/dist/esm/models/CountryCodeEnum.js +278 -0
- package/dist/esm/models/DetailedCountry.d.ts +38 -0
- package/dist/esm/models/DetailedCountry.js +47 -0
- package/dist/esm/models/DetailedCountryField.d.ts +38 -0
- package/dist/esm/models/DetailedCountryField.js +47 -0
- package/dist/esm/models/DetailedCountryFieldRequest.d.ts +38 -0
- package/dist/esm/models/DetailedCountryFieldRequest.js +47 -0
- package/dist/esm/models/Device.d.ts +18 -0
- package/dist/esm/models/Device.js +6 -0
- package/dist/esm/models/GeoIPPolicy.d.ts +93 -0
- package/dist/esm/models/GeoIPPolicy.js +67 -0
- package/dist/esm/models/GeoIPPolicyRequest.d.ts +50 -0
- package/dist/esm/models/GeoIPPolicyRequest.js +52 -0
- package/dist/esm/models/ModelEnum.d.ts +1 -0
- package/dist/esm/models/ModelEnum.js +1 -0
- package/dist/esm/models/PaginatedGeoIPPolicyList.d.ts +39 -0
- package/dist/esm/models/PaginatedGeoIPPolicyList.js +48 -0
- package/dist/esm/models/PatchedGeoIPPolicyRequest.d.ts +50 -0
- package/dist/esm/models/PatchedGeoIPPolicyRequest.js +50 -0
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/models/AppEnum.d.ts +1 -0
- package/dist/models/AppEnum.js +1 -0
- package/dist/models/CountryCodeEnum.d.ts +271 -0
- package/dist/models/CountryCodeEnum.js +284 -0
- package/dist/models/DetailedCountry.d.ts +38 -0
- package/dist/models/DetailedCountry.js +54 -0
- package/dist/models/DetailedCountryField.d.ts +38 -0
- package/dist/models/DetailedCountryField.js +54 -0
- package/dist/models/DetailedCountryFieldRequest.d.ts +38 -0
- package/dist/models/DetailedCountryFieldRequest.js +54 -0
- package/dist/models/Device.d.ts +18 -0
- package/dist/models/Device.js +6 -0
- package/dist/models/GeoIPPolicy.d.ts +93 -0
- package/dist/models/GeoIPPolicy.js +74 -0
- package/dist/models/GeoIPPolicyRequest.d.ts +50 -0
- package/dist/models/GeoIPPolicyRequest.js +59 -0
- package/dist/models/ModelEnum.d.ts +1 -0
- package/dist/models/ModelEnum.js +1 -0
- package/dist/models/PaginatedGeoIPPolicyList.d.ts +39 -0
- package/dist/models/PaginatedGeoIPPolicyList.js +55 -0
- package/dist/models/PatchedGeoIPPolicyRequest.d.ts +50 -0
- package/dist/models/PatchedGeoIPPolicyRequest.js +57 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/package.json +1 -1
- package/src/apis/PoliciesApi.ts +377 -0
- package/src/apis/RbacApi.ts +2 -0
- package/src/models/AppEnum.ts +1 -0
- package/src/models/CountryCodeEnum.ts +286 -0
- package/src/models/DetailedCountry.ts +82 -0
- package/src/models/DetailedCountryField.ts +82 -0
- package/src/models/DetailedCountryFieldRequest.ts +82 -0
- package/src/models/Device.ts +24 -0
- package/src/models/GeoIPPolicy.ts +160 -0
- package/src/models/GeoIPPolicyRequest.ts +98 -0
- package/src/models/ModelEnum.ts +1 -0
- package/src/models/PaginatedGeoIPPolicyList.ts +88 -0
- package/src/models/PatchedGeoIPPolicyRequest.ts +96 -0
- package/src/models/index.ts +8 -0
@@ -0,0 +1,57 @@
|
|
1
|
+
"use strict";
|
2
|
+
/* tslint:disable */
|
3
|
+
/* eslint-disable */
|
4
|
+
/**
|
5
|
+
* authentik
|
6
|
+
* Making authentication simple.
|
7
|
+
*
|
8
|
+
* The version of the OpenAPI document: 2024.6.3
|
9
|
+
* Contact: hello@goauthentik.io
|
10
|
+
*
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
12
|
+
* https://openapi-generator.tech
|
13
|
+
* Do not edit the class manually.
|
14
|
+
*/
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
+
exports.PatchedGeoIPPolicyRequestToJSON = exports.PatchedGeoIPPolicyRequestFromJSONTyped = exports.PatchedGeoIPPolicyRequestFromJSON = exports.instanceOfPatchedGeoIPPolicyRequest = void 0;
|
17
|
+
const runtime_1 = require("../runtime");
|
18
|
+
const CountryCodeEnum_1 = require("./CountryCodeEnum");
|
19
|
+
/**
|
20
|
+
* Check if a given object implements the PatchedGeoIPPolicyRequest interface.
|
21
|
+
*/
|
22
|
+
function instanceOfPatchedGeoIPPolicyRequest(value) {
|
23
|
+
let isInstance = true;
|
24
|
+
return isInstance;
|
25
|
+
}
|
26
|
+
exports.instanceOfPatchedGeoIPPolicyRequest = instanceOfPatchedGeoIPPolicyRequest;
|
27
|
+
function PatchedGeoIPPolicyRequestFromJSON(json) {
|
28
|
+
return PatchedGeoIPPolicyRequestFromJSONTyped(json, false);
|
29
|
+
}
|
30
|
+
exports.PatchedGeoIPPolicyRequestFromJSON = PatchedGeoIPPolicyRequestFromJSON;
|
31
|
+
function PatchedGeoIPPolicyRequestFromJSONTyped(json, ignoreDiscriminator) {
|
32
|
+
if ((json === undefined) || (json === null)) {
|
33
|
+
return json;
|
34
|
+
}
|
35
|
+
return {
|
36
|
+
'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
|
37
|
+
'executionLogging': !(0, runtime_1.exists)(json, 'execution_logging') ? undefined : json['execution_logging'],
|
38
|
+
'asns': !(0, runtime_1.exists)(json, 'asns') ? undefined : json['asns'],
|
39
|
+
'countries': !(0, runtime_1.exists)(json, 'countries') ? undefined : (json['countries'].map(CountryCodeEnum_1.CountryCodeEnumFromJSON)),
|
40
|
+
};
|
41
|
+
}
|
42
|
+
exports.PatchedGeoIPPolicyRequestFromJSONTyped = PatchedGeoIPPolicyRequestFromJSONTyped;
|
43
|
+
function PatchedGeoIPPolicyRequestToJSON(value) {
|
44
|
+
if (value === undefined) {
|
45
|
+
return undefined;
|
46
|
+
}
|
47
|
+
if (value === null) {
|
48
|
+
return null;
|
49
|
+
}
|
50
|
+
return {
|
51
|
+
'name': value.name,
|
52
|
+
'execution_logging': value.executionLogging,
|
53
|
+
'asns': value.asns,
|
54
|
+
'countries': value.countries === undefined ? undefined : (value.countries.map(CountryCodeEnum_1.CountryCodeEnumToJSON)),
|
55
|
+
};
|
56
|
+
}
|
57
|
+
exports.PatchedGeoIPPolicyRequestToJSON = PatchedGeoIPPolicyRequestToJSON;
|
package/dist/models/index.d.ts
CHANGED
@@ -77,10 +77,14 @@ export * from './ConsentStageRequest';
|
|
77
77
|
export * from './ContextualFlowInfo';
|
78
78
|
export * from './ContextualFlowInfoLayoutEnum';
|
79
79
|
export * from './Coordinate';
|
80
|
+
export * from './CountryCodeEnum';
|
80
81
|
export * from './CurrentBrand';
|
81
82
|
export * from './DeniedActionEnum';
|
82
83
|
export * from './DenyStage';
|
83
84
|
export * from './DenyStageRequest';
|
85
|
+
export * from './DetailedCountry';
|
86
|
+
export * from './DetailedCountryField';
|
87
|
+
export * from './DetailedCountryFieldRequest';
|
84
88
|
export * from './Device';
|
85
89
|
export * from './DeviceChallenge';
|
86
90
|
export * from './DeviceChallengeRequest';
|
@@ -139,6 +143,8 @@ export * from './FlowStageBinding';
|
|
139
143
|
export * from './FlowStageBindingRequest';
|
140
144
|
export * from './FooterLink';
|
141
145
|
export * from './GenericError';
|
146
|
+
export * from './GeoIPPolicy';
|
147
|
+
export * from './GeoIPPolicyRequest';
|
142
148
|
export * from './GeoipBindingEnum';
|
143
149
|
export * from './GoogleWorkspaceProvider';
|
144
150
|
export * from './GoogleWorkspaceProviderGroup';
|
@@ -255,6 +261,7 @@ export * from './PaginatedExtraRoleObjectPermissionList';
|
|
255
261
|
export * from './PaginatedExtraUserObjectPermissionList';
|
256
262
|
export * from './PaginatedFlowList';
|
257
263
|
export * from './PaginatedFlowStageBindingList';
|
264
|
+
export * from './PaginatedGeoIPPolicyList';
|
258
265
|
export * from './PaginatedGoogleWorkspaceProviderGroupList';
|
259
266
|
export * from './PaginatedGoogleWorkspaceProviderList';
|
260
267
|
export * from './PaginatedGoogleWorkspaceProviderMappingList';
|
@@ -375,6 +382,7 @@ export * from './PatchedExtraRoleObjectPermissionRequest';
|
|
375
382
|
export * from './PatchedExtraUserObjectPermissionRequest';
|
376
383
|
export * from './PatchedFlowRequest';
|
377
384
|
export * from './PatchedFlowStageBindingRequest';
|
385
|
+
export * from './PatchedGeoIPPolicyRequest';
|
378
386
|
export * from './PatchedGoogleWorkspaceProviderMappingRequest';
|
379
387
|
export * from './PatchedGoogleWorkspaceProviderRequest';
|
380
388
|
export * from './PatchedGroupRequest';
|
package/dist/models/index.js
CHANGED
@@ -95,10 +95,14 @@ __exportStar(require("./ConsentStageRequest"), exports);
|
|
95
95
|
__exportStar(require("./ContextualFlowInfo"), exports);
|
96
96
|
__exportStar(require("./ContextualFlowInfoLayoutEnum"), exports);
|
97
97
|
__exportStar(require("./Coordinate"), exports);
|
98
|
+
__exportStar(require("./CountryCodeEnum"), exports);
|
98
99
|
__exportStar(require("./CurrentBrand"), exports);
|
99
100
|
__exportStar(require("./DeniedActionEnum"), exports);
|
100
101
|
__exportStar(require("./DenyStage"), exports);
|
101
102
|
__exportStar(require("./DenyStageRequest"), exports);
|
103
|
+
__exportStar(require("./DetailedCountry"), exports);
|
104
|
+
__exportStar(require("./DetailedCountryField"), exports);
|
105
|
+
__exportStar(require("./DetailedCountryFieldRequest"), exports);
|
102
106
|
__exportStar(require("./Device"), exports);
|
103
107
|
__exportStar(require("./DeviceChallenge"), exports);
|
104
108
|
__exportStar(require("./DeviceChallengeRequest"), exports);
|
@@ -157,6 +161,8 @@ __exportStar(require("./FlowStageBinding"), exports);
|
|
157
161
|
__exportStar(require("./FlowStageBindingRequest"), exports);
|
158
162
|
__exportStar(require("./FooterLink"), exports);
|
159
163
|
__exportStar(require("./GenericError"), exports);
|
164
|
+
__exportStar(require("./GeoIPPolicy"), exports);
|
165
|
+
__exportStar(require("./GeoIPPolicyRequest"), exports);
|
160
166
|
__exportStar(require("./GeoipBindingEnum"), exports);
|
161
167
|
__exportStar(require("./GoogleWorkspaceProvider"), exports);
|
162
168
|
__exportStar(require("./GoogleWorkspaceProviderGroup"), exports);
|
@@ -273,6 +279,7 @@ __exportStar(require("./PaginatedExtraRoleObjectPermissionList"), exports);
|
|
273
279
|
__exportStar(require("./PaginatedExtraUserObjectPermissionList"), exports);
|
274
280
|
__exportStar(require("./PaginatedFlowList"), exports);
|
275
281
|
__exportStar(require("./PaginatedFlowStageBindingList"), exports);
|
282
|
+
__exportStar(require("./PaginatedGeoIPPolicyList"), exports);
|
276
283
|
__exportStar(require("./PaginatedGoogleWorkspaceProviderGroupList"), exports);
|
277
284
|
__exportStar(require("./PaginatedGoogleWorkspaceProviderList"), exports);
|
278
285
|
__exportStar(require("./PaginatedGoogleWorkspaceProviderMappingList"), exports);
|
@@ -393,6 +400,7 @@ __exportStar(require("./PatchedExtraRoleObjectPermissionRequest"), exports);
|
|
393
400
|
__exportStar(require("./PatchedExtraUserObjectPermissionRequest"), exports);
|
394
401
|
__exportStar(require("./PatchedFlowRequest"), exports);
|
395
402
|
__exportStar(require("./PatchedFlowStageBindingRequest"), exports);
|
403
|
+
__exportStar(require("./PatchedGeoIPPolicyRequest"), exports);
|
396
404
|
__exportStar(require("./PatchedGoogleWorkspaceProviderMappingRequest"), exports);
|
397
405
|
__exportStar(require("./PatchedGoogleWorkspaceProviderRequest"), exports);
|
398
406
|
__exportStar(require("./PatchedGroupRequest"), exports);
|
package/package.json
CHANGED
package/src/apis/PoliciesApi.ts
CHANGED
@@ -16,6 +16,7 @@
|
|
16
16
|
import * as runtime from '../runtime';
|
17
17
|
import type {
|
18
18
|
Cache,
|
19
|
+
DetailedCountry,
|
19
20
|
DummyPolicy,
|
20
21
|
DummyPolicyRequest,
|
21
22
|
EventMatcherPolicy,
|
@@ -23,9 +24,12 @@ import type {
|
|
23
24
|
ExpressionPolicy,
|
24
25
|
ExpressionPolicyRequest,
|
25
26
|
GenericError,
|
27
|
+
GeoIPPolicy,
|
28
|
+
GeoIPPolicyRequest,
|
26
29
|
PaginatedDummyPolicyList,
|
27
30
|
PaginatedEventMatcherPolicyList,
|
28
31
|
PaginatedExpressionPolicyList,
|
32
|
+
PaginatedGeoIPPolicyList,
|
29
33
|
PaginatedPasswordExpiryPolicyList,
|
30
34
|
PaginatedPasswordPolicyList,
|
31
35
|
PaginatedPolicyBindingList,
|
@@ -39,6 +43,7 @@ import type {
|
|
39
43
|
PatchedDummyPolicyRequest,
|
40
44
|
PatchedEventMatcherPolicyRequest,
|
41
45
|
PatchedExpressionPolicyRequest,
|
46
|
+
PatchedGeoIPPolicyRequest,
|
42
47
|
PatchedPasswordExpiryPolicyRequest,
|
43
48
|
PatchedPasswordPolicyRequest,
|
44
49
|
PatchedPolicyBindingRequest,
|
@@ -58,6 +63,8 @@ import type {
|
|
58
63
|
import {
|
59
64
|
CacheFromJSON,
|
60
65
|
CacheToJSON,
|
66
|
+
DetailedCountryFromJSON,
|
67
|
+
DetailedCountryToJSON,
|
61
68
|
DummyPolicyFromJSON,
|
62
69
|
DummyPolicyToJSON,
|
63
70
|
DummyPolicyRequestFromJSON,
|
@@ -72,12 +79,18 @@ import {
|
|
72
79
|
ExpressionPolicyRequestToJSON,
|
73
80
|
GenericErrorFromJSON,
|
74
81
|
GenericErrorToJSON,
|
82
|
+
GeoIPPolicyFromJSON,
|
83
|
+
GeoIPPolicyToJSON,
|
84
|
+
GeoIPPolicyRequestFromJSON,
|
85
|
+
GeoIPPolicyRequestToJSON,
|
75
86
|
PaginatedDummyPolicyListFromJSON,
|
76
87
|
PaginatedDummyPolicyListToJSON,
|
77
88
|
PaginatedEventMatcherPolicyListFromJSON,
|
78
89
|
PaginatedEventMatcherPolicyListToJSON,
|
79
90
|
PaginatedExpressionPolicyListFromJSON,
|
80
91
|
PaginatedExpressionPolicyListToJSON,
|
92
|
+
PaginatedGeoIPPolicyListFromJSON,
|
93
|
+
PaginatedGeoIPPolicyListToJSON,
|
81
94
|
PaginatedPasswordExpiryPolicyListFromJSON,
|
82
95
|
PaginatedPasswordExpiryPolicyListToJSON,
|
83
96
|
PaginatedPasswordPolicyListFromJSON,
|
@@ -104,6 +117,8 @@ import {
|
|
104
117
|
PatchedEventMatcherPolicyRequestToJSON,
|
105
118
|
PatchedExpressionPolicyRequestFromJSON,
|
106
119
|
PatchedExpressionPolicyRequestToJSON,
|
120
|
+
PatchedGeoIPPolicyRequestFromJSON,
|
121
|
+
PatchedGeoIPPolicyRequestToJSON,
|
107
122
|
PatchedPasswordExpiryPolicyRequestFromJSON,
|
108
123
|
PatchedPasswordExpiryPolicyRequestToJSON,
|
109
124
|
PatchedPasswordPolicyRequestFromJSON,
|
@@ -324,6 +339,40 @@ export interface PoliciesExpressionUsedByListRequest {
|
|
324
339
|
policyUuid: string;
|
325
340
|
}
|
326
341
|
|
342
|
+
export interface PoliciesGeoipCreateRequest {
|
343
|
+
geoIPPolicyRequest: GeoIPPolicyRequest;
|
344
|
+
}
|
345
|
+
|
346
|
+
export interface PoliciesGeoipDestroyRequest {
|
347
|
+
policyUuid: string;
|
348
|
+
}
|
349
|
+
|
350
|
+
export interface PoliciesGeoipListRequest {
|
351
|
+
name?: string;
|
352
|
+
ordering?: string;
|
353
|
+
page?: number;
|
354
|
+
pageSize?: number;
|
355
|
+
search?: string;
|
356
|
+
}
|
357
|
+
|
358
|
+
export interface PoliciesGeoipPartialUpdateRequest {
|
359
|
+
policyUuid: string;
|
360
|
+
patchedGeoIPPolicyRequest?: PatchedGeoIPPolicyRequest;
|
361
|
+
}
|
362
|
+
|
363
|
+
export interface PoliciesGeoipRetrieveRequest {
|
364
|
+
policyUuid: string;
|
365
|
+
}
|
366
|
+
|
367
|
+
export interface PoliciesGeoipUpdateRequest {
|
368
|
+
policyUuid: string;
|
369
|
+
geoIPPolicyRequest: GeoIPPolicyRequest;
|
370
|
+
}
|
371
|
+
|
372
|
+
export interface PoliciesGeoipUsedByListRequest {
|
373
|
+
policyUuid: string;
|
374
|
+
}
|
375
|
+
|
327
376
|
export interface PoliciesPasswordCreateRequest {
|
328
377
|
passwordPolicyRequest: PasswordPolicyRequest;
|
329
378
|
}
|
@@ -2081,6 +2130,334 @@ export class PoliciesApi extends runtime.BaseAPI {
|
|
2081
2130
|
return await response.value();
|
2082
2131
|
}
|
2083
2132
|
|
2133
|
+
/**
|
2134
|
+
* GeoIP Viewset
|
2135
|
+
*/
|
2136
|
+
async policiesGeoipCreateRaw(requestParameters: PoliciesGeoipCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GeoIPPolicy>> {
|
2137
|
+
if (requestParameters.geoIPPolicyRequest === null || requestParameters.geoIPPolicyRequest === undefined) {
|
2138
|
+
throw new runtime.RequiredError('geoIPPolicyRequest','Required parameter requestParameters.geoIPPolicyRequest was null or undefined when calling policiesGeoipCreate.');
|
2139
|
+
}
|
2140
|
+
|
2141
|
+
const queryParameters: any = {};
|
2142
|
+
|
2143
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
2144
|
+
|
2145
|
+
headerParameters['Content-Type'] = 'application/json';
|
2146
|
+
|
2147
|
+
if (this.configuration && this.configuration.accessToken) {
|
2148
|
+
const token = this.configuration.accessToken;
|
2149
|
+
const tokenString = await token("authentik", []);
|
2150
|
+
|
2151
|
+
if (tokenString) {
|
2152
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
2153
|
+
}
|
2154
|
+
}
|
2155
|
+
const response = await this.request({
|
2156
|
+
path: `/policies/geoip/`,
|
2157
|
+
method: 'POST',
|
2158
|
+
headers: headerParameters,
|
2159
|
+
query: queryParameters,
|
2160
|
+
body: GeoIPPolicyRequestToJSON(requestParameters.geoIPPolicyRequest),
|
2161
|
+
}, initOverrides);
|
2162
|
+
|
2163
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GeoIPPolicyFromJSON(jsonValue));
|
2164
|
+
}
|
2165
|
+
|
2166
|
+
/**
|
2167
|
+
* GeoIP Viewset
|
2168
|
+
*/
|
2169
|
+
async policiesGeoipCreate(requestParameters: PoliciesGeoipCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GeoIPPolicy> {
|
2170
|
+
const response = await this.policiesGeoipCreateRaw(requestParameters, initOverrides);
|
2171
|
+
return await response.value();
|
2172
|
+
}
|
2173
|
+
|
2174
|
+
/**
|
2175
|
+
* GeoIP Viewset
|
2176
|
+
*/
|
2177
|
+
async policiesGeoipDestroyRaw(requestParameters: PoliciesGeoipDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
2178
|
+
if (requestParameters.policyUuid === null || requestParameters.policyUuid === undefined) {
|
2179
|
+
throw new runtime.RequiredError('policyUuid','Required parameter requestParameters.policyUuid was null or undefined when calling policiesGeoipDestroy.');
|
2180
|
+
}
|
2181
|
+
|
2182
|
+
const queryParameters: any = {};
|
2183
|
+
|
2184
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
2185
|
+
|
2186
|
+
if (this.configuration && this.configuration.accessToken) {
|
2187
|
+
const token = this.configuration.accessToken;
|
2188
|
+
const tokenString = await token("authentik", []);
|
2189
|
+
|
2190
|
+
if (tokenString) {
|
2191
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
2192
|
+
}
|
2193
|
+
}
|
2194
|
+
const response = await this.request({
|
2195
|
+
path: `/policies/geoip/{policy_uuid}/`.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters.policyUuid))),
|
2196
|
+
method: 'DELETE',
|
2197
|
+
headers: headerParameters,
|
2198
|
+
query: queryParameters,
|
2199
|
+
}, initOverrides);
|
2200
|
+
|
2201
|
+
return new runtime.VoidApiResponse(response);
|
2202
|
+
}
|
2203
|
+
|
2204
|
+
/**
|
2205
|
+
* GeoIP Viewset
|
2206
|
+
*/
|
2207
|
+
async policiesGeoipDestroy(requestParameters: PoliciesGeoipDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
2208
|
+
await this.policiesGeoipDestroyRaw(requestParameters, initOverrides);
|
2209
|
+
}
|
2210
|
+
|
2211
|
+
/**
|
2212
|
+
* Get all countries in ISO-3166-1
|
2213
|
+
*/
|
2214
|
+
async policiesGeoipIso3166ListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<DetailedCountry>>> {
|
2215
|
+
const queryParameters: any = {};
|
2216
|
+
|
2217
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
2218
|
+
|
2219
|
+
if (this.configuration && this.configuration.accessToken) {
|
2220
|
+
const token = this.configuration.accessToken;
|
2221
|
+
const tokenString = await token("authentik", []);
|
2222
|
+
|
2223
|
+
if (tokenString) {
|
2224
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
2225
|
+
}
|
2226
|
+
}
|
2227
|
+
const response = await this.request({
|
2228
|
+
path: `/policies/geoip_iso3166/`,
|
2229
|
+
method: 'GET',
|
2230
|
+
headers: headerParameters,
|
2231
|
+
query: queryParameters,
|
2232
|
+
}, initOverrides);
|
2233
|
+
|
2234
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(DetailedCountryFromJSON));
|
2235
|
+
}
|
2236
|
+
|
2237
|
+
/**
|
2238
|
+
* Get all countries in ISO-3166-1
|
2239
|
+
*/
|
2240
|
+
async policiesGeoipIso3166List(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<DetailedCountry>> {
|
2241
|
+
const response = await this.policiesGeoipIso3166ListRaw(initOverrides);
|
2242
|
+
return await response.value();
|
2243
|
+
}
|
2244
|
+
|
2245
|
+
/**
|
2246
|
+
* GeoIP Viewset
|
2247
|
+
*/
|
2248
|
+
async policiesGeoipListRaw(requestParameters: PoliciesGeoipListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedGeoIPPolicyList>> {
|
2249
|
+
const queryParameters: any = {};
|
2250
|
+
|
2251
|
+
if (requestParameters.name !== undefined) {
|
2252
|
+
queryParameters['name'] = requestParameters.name;
|
2253
|
+
}
|
2254
|
+
|
2255
|
+
if (requestParameters.ordering !== undefined) {
|
2256
|
+
queryParameters['ordering'] = requestParameters.ordering;
|
2257
|
+
}
|
2258
|
+
|
2259
|
+
if (requestParameters.page !== undefined) {
|
2260
|
+
queryParameters['page'] = requestParameters.page;
|
2261
|
+
}
|
2262
|
+
|
2263
|
+
if (requestParameters.pageSize !== undefined) {
|
2264
|
+
queryParameters['page_size'] = requestParameters.pageSize;
|
2265
|
+
}
|
2266
|
+
|
2267
|
+
if (requestParameters.search !== undefined) {
|
2268
|
+
queryParameters['search'] = requestParameters.search;
|
2269
|
+
}
|
2270
|
+
|
2271
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
2272
|
+
|
2273
|
+
if (this.configuration && this.configuration.accessToken) {
|
2274
|
+
const token = this.configuration.accessToken;
|
2275
|
+
const tokenString = await token("authentik", []);
|
2276
|
+
|
2277
|
+
if (tokenString) {
|
2278
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
2279
|
+
}
|
2280
|
+
}
|
2281
|
+
const response = await this.request({
|
2282
|
+
path: `/policies/geoip/`,
|
2283
|
+
method: 'GET',
|
2284
|
+
headers: headerParameters,
|
2285
|
+
query: queryParameters,
|
2286
|
+
}, initOverrides);
|
2287
|
+
|
2288
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGeoIPPolicyListFromJSON(jsonValue));
|
2289
|
+
}
|
2290
|
+
|
2291
|
+
/**
|
2292
|
+
* GeoIP Viewset
|
2293
|
+
*/
|
2294
|
+
async policiesGeoipList(requestParameters: PoliciesGeoipListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedGeoIPPolicyList> {
|
2295
|
+
const response = await this.policiesGeoipListRaw(requestParameters, initOverrides);
|
2296
|
+
return await response.value();
|
2297
|
+
}
|
2298
|
+
|
2299
|
+
/**
|
2300
|
+
* GeoIP Viewset
|
2301
|
+
*/
|
2302
|
+
async policiesGeoipPartialUpdateRaw(requestParameters: PoliciesGeoipPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GeoIPPolicy>> {
|
2303
|
+
if (requestParameters.policyUuid === null || requestParameters.policyUuid === undefined) {
|
2304
|
+
throw new runtime.RequiredError('policyUuid','Required parameter requestParameters.policyUuid was null or undefined when calling policiesGeoipPartialUpdate.');
|
2305
|
+
}
|
2306
|
+
|
2307
|
+
const queryParameters: any = {};
|
2308
|
+
|
2309
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
2310
|
+
|
2311
|
+
headerParameters['Content-Type'] = 'application/json';
|
2312
|
+
|
2313
|
+
if (this.configuration && this.configuration.accessToken) {
|
2314
|
+
const token = this.configuration.accessToken;
|
2315
|
+
const tokenString = await token("authentik", []);
|
2316
|
+
|
2317
|
+
if (tokenString) {
|
2318
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
2319
|
+
}
|
2320
|
+
}
|
2321
|
+
const response = await this.request({
|
2322
|
+
path: `/policies/geoip/{policy_uuid}/`.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters.policyUuid))),
|
2323
|
+
method: 'PATCH',
|
2324
|
+
headers: headerParameters,
|
2325
|
+
query: queryParameters,
|
2326
|
+
body: PatchedGeoIPPolicyRequestToJSON(requestParameters.patchedGeoIPPolicyRequest),
|
2327
|
+
}, initOverrides);
|
2328
|
+
|
2329
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GeoIPPolicyFromJSON(jsonValue));
|
2330
|
+
}
|
2331
|
+
|
2332
|
+
/**
|
2333
|
+
* GeoIP Viewset
|
2334
|
+
*/
|
2335
|
+
async policiesGeoipPartialUpdate(requestParameters: PoliciesGeoipPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GeoIPPolicy> {
|
2336
|
+
const response = await this.policiesGeoipPartialUpdateRaw(requestParameters, initOverrides);
|
2337
|
+
return await response.value();
|
2338
|
+
}
|
2339
|
+
|
2340
|
+
/**
|
2341
|
+
* GeoIP Viewset
|
2342
|
+
*/
|
2343
|
+
async policiesGeoipRetrieveRaw(requestParameters: PoliciesGeoipRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GeoIPPolicy>> {
|
2344
|
+
if (requestParameters.policyUuid === null || requestParameters.policyUuid === undefined) {
|
2345
|
+
throw new runtime.RequiredError('policyUuid','Required parameter requestParameters.policyUuid was null or undefined when calling policiesGeoipRetrieve.');
|
2346
|
+
}
|
2347
|
+
|
2348
|
+
const queryParameters: any = {};
|
2349
|
+
|
2350
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
2351
|
+
|
2352
|
+
if (this.configuration && this.configuration.accessToken) {
|
2353
|
+
const token = this.configuration.accessToken;
|
2354
|
+
const tokenString = await token("authentik", []);
|
2355
|
+
|
2356
|
+
if (tokenString) {
|
2357
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
2358
|
+
}
|
2359
|
+
}
|
2360
|
+
const response = await this.request({
|
2361
|
+
path: `/policies/geoip/{policy_uuid}/`.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters.policyUuid))),
|
2362
|
+
method: 'GET',
|
2363
|
+
headers: headerParameters,
|
2364
|
+
query: queryParameters,
|
2365
|
+
}, initOverrides);
|
2366
|
+
|
2367
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GeoIPPolicyFromJSON(jsonValue));
|
2368
|
+
}
|
2369
|
+
|
2370
|
+
/**
|
2371
|
+
* GeoIP Viewset
|
2372
|
+
*/
|
2373
|
+
async policiesGeoipRetrieve(requestParameters: PoliciesGeoipRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GeoIPPolicy> {
|
2374
|
+
const response = await this.policiesGeoipRetrieveRaw(requestParameters, initOverrides);
|
2375
|
+
return await response.value();
|
2376
|
+
}
|
2377
|
+
|
2378
|
+
/**
|
2379
|
+
* GeoIP Viewset
|
2380
|
+
*/
|
2381
|
+
async policiesGeoipUpdateRaw(requestParameters: PoliciesGeoipUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GeoIPPolicy>> {
|
2382
|
+
if (requestParameters.policyUuid === null || requestParameters.policyUuid === undefined) {
|
2383
|
+
throw new runtime.RequiredError('policyUuid','Required parameter requestParameters.policyUuid was null or undefined when calling policiesGeoipUpdate.');
|
2384
|
+
}
|
2385
|
+
|
2386
|
+
if (requestParameters.geoIPPolicyRequest === null || requestParameters.geoIPPolicyRequest === undefined) {
|
2387
|
+
throw new runtime.RequiredError('geoIPPolicyRequest','Required parameter requestParameters.geoIPPolicyRequest was null or undefined when calling policiesGeoipUpdate.');
|
2388
|
+
}
|
2389
|
+
|
2390
|
+
const queryParameters: any = {};
|
2391
|
+
|
2392
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
2393
|
+
|
2394
|
+
headerParameters['Content-Type'] = 'application/json';
|
2395
|
+
|
2396
|
+
if (this.configuration && this.configuration.accessToken) {
|
2397
|
+
const token = this.configuration.accessToken;
|
2398
|
+
const tokenString = await token("authentik", []);
|
2399
|
+
|
2400
|
+
if (tokenString) {
|
2401
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
2402
|
+
}
|
2403
|
+
}
|
2404
|
+
const response = await this.request({
|
2405
|
+
path: `/policies/geoip/{policy_uuid}/`.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters.policyUuid))),
|
2406
|
+
method: 'PUT',
|
2407
|
+
headers: headerParameters,
|
2408
|
+
query: queryParameters,
|
2409
|
+
body: GeoIPPolicyRequestToJSON(requestParameters.geoIPPolicyRequest),
|
2410
|
+
}, initOverrides);
|
2411
|
+
|
2412
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GeoIPPolicyFromJSON(jsonValue));
|
2413
|
+
}
|
2414
|
+
|
2415
|
+
/**
|
2416
|
+
* GeoIP Viewset
|
2417
|
+
*/
|
2418
|
+
async policiesGeoipUpdate(requestParameters: PoliciesGeoipUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GeoIPPolicy> {
|
2419
|
+
const response = await this.policiesGeoipUpdateRaw(requestParameters, initOverrides);
|
2420
|
+
return await response.value();
|
2421
|
+
}
|
2422
|
+
|
2423
|
+
/**
|
2424
|
+
* Get a list of all objects that use this object
|
2425
|
+
*/
|
2426
|
+
async policiesGeoipUsedByListRaw(requestParameters: PoliciesGeoipUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<UsedBy>>> {
|
2427
|
+
if (requestParameters.policyUuid === null || requestParameters.policyUuid === undefined) {
|
2428
|
+
throw new runtime.RequiredError('policyUuid','Required parameter requestParameters.policyUuid was null or undefined when calling policiesGeoipUsedByList.');
|
2429
|
+
}
|
2430
|
+
|
2431
|
+
const queryParameters: any = {};
|
2432
|
+
|
2433
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
2434
|
+
|
2435
|
+
if (this.configuration && this.configuration.accessToken) {
|
2436
|
+
const token = this.configuration.accessToken;
|
2437
|
+
const tokenString = await token("authentik", []);
|
2438
|
+
|
2439
|
+
if (tokenString) {
|
2440
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
2441
|
+
}
|
2442
|
+
}
|
2443
|
+
const response = await this.request({
|
2444
|
+
path: `/policies/geoip/{policy_uuid}/used_by/`.replace(`{${"policy_uuid"}}`, encodeURIComponent(String(requestParameters.policyUuid))),
|
2445
|
+
method: 'GET',
|
2446
|
+
headers: headerParameters,
|
2447
|
+
query: queryParameters,
|
2448
|
+
}, initOverrides);
|
2449
|
+
|
2450
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON));
|
2451
|
+
}
|
2452
|
+
|
2453
|
+
/**
|
2454
|
+
* Get a list of all objects that use this object
|
2455
|
+
*/
|
2456
|
+
async policiesGeoipUsedByList(requestParameters: PoliciesGeoipUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<UsedBy>> {
|
2457
|
+
const response = await this.policiesGeoipUsedByListRaw(requestParameters, initOverrides);
|
2458
|
+
return await response.value();
|
2459
|
+
}
|
2460
|
+
|
2084
2461
|
/**
|
2085
2462
|
* Password Policy Viewset
|
2086
2463
|
*/
|
package/src/apis/RbacApi.ts
CHANGED
@@ -1385,6 +1385,7 @@ export const RbacPermissionsAssignedByRolesListModelEnum = {
|
|
1385
1385
|
PoliciesEventMatcherEventmatcherpolicy: 'authentik_policies_event_matcher.eventmatcherpolicy',
|
1386
1386
|
PoliciesExpiryPasswordexpirypolicy: 'authentik_policies_expiry.passwordexpirypolicy',
|
1387
1387
|
PoliciesExpressionExpressionpolicy: 'authentik_policies_expression.expressionpolicy',
|
1388
|
+
PoliciesGeoipGeoippolicy: 'authentik_policies_geoip.geoippolicy',
|
1388
1389
|
PoliciesPasswordPasswordpolicy: 'authentik_policies_password.passwordpolicy',
|
1389
1390
|
PoliciesReputationReputationpolicy: 'authentik_policies_reputation.reputationpolicy',
|
1390
1391
|
ProvidersGoogleWorkspaceGoogleworkspaceprovider: 'authentik_providers_google_workspace.googleworkspaceprovider',
|
@@ -1474,6 +1475,7 @@ export const RbacPermissionsAssignedByUsersListModelEnum = {
|
|
1474
1475
|
PoliciesEventMatcherEventmatcherpolicy: 'authentik_policies_event_matcher.eventmatcherpolicy',
|
1475
1476
|
PoliciesExpiryPasswordexpirypolicy: 'authentik_policies_expiry.passwordexpirypolicy',
|
1476
1477
|
PoliciesExpressionExpressionpolicy: 'authentik_policies_expression.expressionpolicy',
|
1478
|
+
PoliciesGeoipGeoippolicy: 'authentik_policies_geoip.geoippolicy',
|
1477
1479
|
PoliciesPasswordPasswordpolicy: 'authentik_policies_password.passwordpolicy',
|
1478
1480
|
PoliciesReputationReputationpolicy: 'authentik_policies_reputation.reputationpolicy',
|
1479
1481
|
ProvidersGoogleWorkspaceGoogleworkspaceprovider: 'authentik_providers_google_workspace.googleworkspaceprovider',
|
package/src/models/AppEnum.ts
CHANGED
@@ -28,6 +28,7 @@ export const AppEnum = {
|
|
28
28
|
PoliciesEventMatcher: 'authentik.policies.event_matcher',
|
29
29
|
PoliciesExpiry: 'authentik.policies.expiry',
|
30
30
|
PoliciesExpression: 'authentik.policies.expression',
|
31
|
+
PoliciesGeoip: 'authentik.policies.geoip',
|
31
32
|
PoliciesPassword: 'authentik.policies.password',
|
32
33
|
PoliciesReputation: 'authentik.policies.reputation',
|
33
34
|
Policies: 'authentik.policies',
|