@goauthentik/api 2024.6.3-1722881330 → 2024.6.3-1722940666
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 +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/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/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/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
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',
|