@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
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* authentik
|
|
5
|
+
* Making authentication simple.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024.6.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
|
+
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const CountryCodeEnum = {
|
|
21
|
+
Af: 'AF',
|
|
22
|
+
Ax: 'AX',
|
|
23
|
+
Al: 'AL',
|
|
24
|
+
Dz: 'DZ',
|
|
25
|
+
As: 'AS',
|
|
26
|
+
Ad: 'AD',
|
|
27
|
+
Ao: 'AO',
|
|
28
|
+
Ai: 'AI',
|
|
29
|
+
Aq: 'AQ',
|
|
30
|
+
Ag: 'AG',
|
|
31
|
+
Ar: 'AR',
|
|
32
|
+
Am: 'AM',
|
|
33
|
+
Aw: 'AW',
|
|
34
|
+
Au: 'AU',
|
|
35
|
+
At: 'AT',
|
|
36
|
+
Az: 'AZ',
|
|
37
|
+
Bs: 'BS',
|
|
38
|
+
Bh: 'BH',
|
|
39
|
+
Bd: 'BD',
|
|
40
|
+
Bb: 'BB',
|
|
41
|
+
By: 'BY',
|
|
42
|
+
Be: 'BE',
|
|
43
|
+
Bz: 'BZ',
|
|
44
|
+
Bj: 'BJ',
|
|
45
|
+
Bm: 'BM',
|
|
46
|
+
Bt: 'BT',
|
|
47
|
+
Bo: 'BO',
|
|
48
|
+
Bq: 'BQ',
|
|
49
|
+
Ba: 'BA',
|
|
50
|
+
Bw: 'BW',
|
|
51
|
+
Bv: 'BV',
|
|
52
|
+
Br: 'BR',
|
|
53
|
+
Io: 'IO',
|
|
54
|
+
Bn: 'BN',
|
|
55
|
+
Bg: 'BG',
|
|
56
|
+
Bf: 'BF',
|
|
57
|
+
Bi: 'BI',
|
|
58
|
+
Cv: 'CV',
|
|
59
|
+
Kh: 'KH',
|
|
60
|
+
Cm: 'CM',
|
|
61
|
+
Ca: 'CA',
|
|
62
|
+
Ky: 'KY',
|
|
63
|
+
Cf: 'CF',
|
|
64
|
+
Td: 'TD',
|
|
65
|
+
Cl: 'CL',
|
|
66
|
+
Cn: 'CN',
|
|
67
|
+
Cx: 'CX',
|
|
68
|
+
Cc: 'CC',
|
|
69
|
+
Co: 'CO',
|
|
70
|
+
Km: 'KM',
|
|
71
|
+
Cg: 'CG',
|
|
72
|
+
Cd: 'CD',
|
|
73
|
+
Ck: 'CK',
|
|
74
|
+
Cr: 'CR',
|
|
75
|
+
Ci: 'CI',
|
|
76
|
+
Hr: 'HR',
|
|
77
|
+
Cu: 'CU',
|
|
78
|
+
Cw: 'CW',
|
|
79
|
+
Cy: 'CY',
|
|
80
|
+
Cz: 'CZ',
|
|
81
|
+
Dk: 'DK',
|
|
82
|
+
Dj: 'DJ',
|
|
83
|
+
Dm: 'DM',
|
|
84
|
+
Do: 'DO',
|
|
85
|
+
Ec: 'EC',
|
|
86
|
+
Eg: 'EG',
|
|
87
|
+
Sv: 'SV',
|
|
88
|
+
Gq: 'GQ',
|
|
89
|
+
Er: 'ER',
|
|
90
|
+
Ee: 'EE',
|
|
91
|
+
Sz: 'SZ',
|
|
92
|
+
Et: 'ET',
|
|
93
|
+
Fk: 'FK',
|
|
94
|
+
Fo: 'FO',
|
|
95
|
+
Fj: 'FJ',
|
|
96
|
+
Fi: 'FI',
|
|
97
|
+
Fr: 'FR',
|
|
98
|
+
Gf: 'GF',
|
|
99
|
+
Pf: 'PF',
|
|
100
|
+
Tf: 'TF',
|
|
101
|
+
Ga: 'GA',
|
|
102
|
+
Gm: 'GM',
|
|
103
|
+
Ge: 'GE',
|
|
104
|
+
De: 'DE',
|
|
105
|
+
Gh: 'GH',
|
|
106
|
+
Gi: 'GI',
|
|
107
|
+
Gr: 'GR',
|
|
108
|
+
Gl: 'GL',
|
|
109
|
+
Gd: 'GD',
|
|
110
|
+
Gp: 'GP',
|
|
111
|
+
Gu: 'GU',
|
|
112
|
+
Gt: 'GT',
|
|
113
|
+
Gg: 'GG',
|
|
114
|
+
Gn: 'GN',
|
|
115
|
+
Gw: 'GW',
|
|
116
|
+
Gy: 'GY',
|
|
117
|
+
Ht: 'HT',
|
|
118
|
+
Hm: 'HM',
|
|
119
|
+
Va: 'VA',
|
|
120
|
+
Hn: 'HN',
|
|
121
|
+
Hk: 'HK',
|
|
122
|
+
Hu: 'HU',
|
|
123
|
+
Is: 'IS',
|
|
124
|
+
In: 'IN',
|
|
125
|
+
Id: 'ID',
|
|
126
|
+
Ir: 'IR',
|
|
127
|
+
Iq: 'IQ',
|
|
128
|
+
Ie: 'IE',
|
|
129
|
+
Im: 'IM',
|
|
130
|
+
Il: 'IL',
|
|
131
|
+
It: 'IT',
|
|
132
|
+
Jm: 'JM',
|
|
133
|
+
Jp: 'JP',
|
|
134
|
+
Je: 'JE',
|
|
135
|
+
Jo: 'JO',
|
|
136
|
+
Kz: 'KZ',
|
|
137
|
+
Ke: 'KE',
|
|
138
|
+
Ki: 'KI',
|
|
139
|
+
Kw: 'KW',
|
|
140
|
+
Kg: 'KG',
|
|
141
|
+
La: 'LA',
|
|
142
|
+
Lv: 'LV',
|
|
143
|
+
Lb: 'LB',
|
|
144
|
+
Ls: 'LS',
|
|
145
|
+
Lr: 'LR',
|
|
146
|
+
Ly: 'LY',
|
|
147
|
+
Li: 'LI',
|
|
148
|
+
Lt: 'LT',
|
|
149
|
+
Lu: 'LU',
|
|
150
|
+
Mo: 'MO',
|
|
151
|
+
Mg: 'MG',
|
|
152
|
+
Mw: 'MW',
|
|
153
|
+
My: 'MY',
|
|
154
|
+
Mv: 'MV',
|
|
155
|
+
Ml: 'ML',
|
|
156
|
+
Mt: 'MT',
|
|
157
|
+
Mh: 'MH',
|
|
158
|
+
Mq: 'MQ',
|
|
159
|
+
Mr: 'MR',
|
|
160
|
+
Mu: 'MU',
|
|
161
|
+
Yt: 'YT',
|
|
162
|
+
Mx: 'MX',
|
|
163
|
+
Fm: 'FM',
|
|
164
|
+
Md: 'MD',
|
|
165
|
+
Mc: 'MC',
|
|
166
|
+
Mn: 'MN',
|
|
167
|
+
Me: 'ME',
|
|
168
|
+
Ms: 'MS',
|
|
169
|
+
Ma: 'MA',
|
|
170
|
+
Mz: 'MZ',
|
|
171
|
+
Mm: 'MM',
|
|
172
|
+
Na: 'NA',
|
|
173
|
+
Nr: 'NR',
|
|
174
|
+
Np: 'NP',
|
|
175
|
+
Nl: 'NL',
|
|
176
|
+
Nc: 'NC',
|
|
177
|
+
Nz: 'NZ',
|
|
178
|
+
Ni: 'NI',
|
|
179
|
+
Ne: 'NE',
|
|
180
|
+
Ng: 'NG',
|
|
181
|
+
Nu: 'NU',
|
|
182
|
+
Nf: 'NF',
|
|
183
|
+
Kp: 'KP',
|
|
184
|
+
Mk: 'MK',
|
|
185
|
+
Mp: 'MP',
|
|
186
|
+
No: 'NO',
|
|
187
|
+
Om: 'OM',
|
|
188
|
+
Pk: 'PK',
|
|
189
|
+
Pw: 'PW',
|
|
190
|
+
Ps: 'PS',
|
|
191
|
+
Pa: 'PA',
|
|
192
|
+
Pg: 'PG',
|
|
193
|
+
Py: 'PY',
|
|
194
|
+
Pe: 'PE',
|
|
195
|
+
Ph: 'PH',
|
|
196
|
+
Pn: 'PN',
|
|
197
|
+
Pl: 'PL',
|
|
198
|
+
Pt: 'PT',
|
|
199
|
+
Pr: 'PR',
|
|
200
|
+
Qa: 'QA',
|
|
201
|
+
Re: 'RE',
|
|
202
|
+
Ro: 'RO',
|
|
203
|
+
Ru: 'RU',
|
|
204
|
+
Rw: 'RW',
|
|
205
|
+
Bl: 'BL',
|
|
206
|
+
Sh: 'SH',
|
|
207
|
+
Kn: 'KN',
|
|
208
|
+
Lc: 'LC',
|
|
209
|
+
Mf: 'MF',
|
|
210
|
+
Pm: 'PM',
|
|
211
|
+
Vc: 'VC',
|
|
212
|
+
Ws: 'WS',
|
|
213
|
+
Sm: 'SM',
|
|
214
|
+
St: 'ST',
|
|
215
|
+
Sa: 'SA',
|
|
216
|
+
Sn: 'SN',
|
|
217
|
+
Rs: 'RS',
|
|
218
|
+
Sc: 'SC',
|
|
219
|
+
Sl: 'SL',
|
|
220
|
+
Sg: 'SG',
|
|
221
|
+
Sx: 'SX',
|
|
222
|
+
Sk: 'SK',
|
|
223
|
+
Si: 'SI',
|
|
224
|
+
Sb: 'SB',
|
|
225
|
+
So: 'SO',
|
|
226
|
+
Za: 'ZA',
|
|
227
|
+
Gs: 'GS',
|
|
228
|
+
Kr: 'KR',
|
|
229
|
+
Ss: 'SS',
|
|
230
|
+
Es: 'ES',
|
|
231
|
+
Lk: 'LK',
|
|
232
|
+
Sd: 'SD',
|
|
233
|
+
Sr: 'SR',
|
|
234
|
+
Sj: 'SJ',
|
|
235
|
+
Se: 'SE',
|
|
236
|
+
Ch: 'CH',
|
|
237
|
+
Sy: 'SY',
|
|
238
|
+
Tw: 'TW',
|
|
239
|
+
Tj: 'TJ',
|
|
240
|
+
Tz: 'TZ',
|
|
241
|
+
Th: 'TH',
|
|
242
|
+
Tl: 'TL',
|
|
243
|
+
Tg: 'TG',
|
|
244
|
+
Tk: 'TK',
|
|
245
|
+
To: 'TO',
|
|
246
|
+
Tt: 'TT',
|
|
247
|
+
Tn: 'TN',
|
|
248
|
+
Tr: 'TR',
|
|
249
|
+
Tm: 'TM',
|
|
250
|
+
Tc: 'TC',
|
|
251
|
+
Tv: 'TV',
|
|
252
|
+
Ug: 'UG',
|
|
253
|
+
Ua: 'UA',
|
|
254
|
+
Ae: 'AE',
|
|
255
|
+
Gb: 'GB',
|
|
256
|
+
Um: 'UM',
|
|
257
|
+
Us: 'US',
|
|
258
|
+
Uy: 'UY',
|
|
259
|
+
Uz: 'UZ',
|
|
260
|
+
Vu: 'VU',
|
|
261
|
+
Ve: 'VE',
|
|
262
|
+
Vn: 'VN',
|
|
263
|
+
Vg: 'VG',
|
|
264
|
+
Vi: 'VI',
|
|
265
|
+
Wf: 'WF',
|
|
266
|
+
Eh: 'EH',
|
|
267
|
+
Ye: 'YE',
|
|
268
|
+
Zm: 'ZM',
|
|
269
|
+
Zw: 'ZW',
|
|
270
|
+
UnknownDefaultOpenApi: '11184809'
|
|
271
|
+
} as const;
|
|
272
|
+
export type CountryCodeEnum = typeof CountryCodeEnum[keyof typeof CountryCodeEnum];
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
export function CountryCodeEnumFromJSON(json: any): CountryCodeEnum {
|
|
276
|
+
return CountryCodeEnumFromJSONTyped(json, false);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export function CountryCodeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): CountryCodeEnum {
|
|
280
|
+
return json as CountryCodeEnum;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export function CountryCodeEnumToJSON(value?: CountryCodeEnum | null): any {
|
|
284
|
+
return value as any;
|
|
285
|
+
}
|
|
286
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* authentik
|
|
5
|
+
* Making authentication simple.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024.6.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 { exists, mapValues } from '../runtime';
|
|
16
|
+
import type { CountryCodeEnum } from './CountryCodeEnum';
|
|
17
|
+
import {
|
|
18
|
+
CountryCodeEnumFromJSON,
|
|
19
|
+
CountryCodeEnumFromJSONTyped,
|
|
20
|
+
CountryCodeEnumToJSON,
|
|
21
|
+
} from './CountryCodeEnum';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface DetailedCountry
|
|
27
|
+
*/
|
|
28
|
+
export interface DetailedCountry {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {CountryCodeEnum}
|
|
32
|
+
* @memberof DetailedCountry
|
|
33
|
+
*/
|
|
34
|
+
code: CountryCodeEnum;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof DetailedCountry
|
|
39
|
+
*/
|
|
40
|
+
name: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the DetailedCountry interface.
|
|
45
|
+
*/
|
|
46
|
+
export function instanceOfDetailedCountry(value: object): boolean {
|
|
47
|
+
let isInstance = true;
|
|
48
|
+
isInstance = isInstance && "code" in value;
|
|
49
|
+
isInstance = isInstance && "name" in value;
|
|
50
|
+
|
|
51
|
+
return isInstance;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function DetailedCountryFromJSON(json: any): DetailedCountry {
|
|
55
|
+
return DetailedCountryFromJSONTyped(json, false);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function DetailedCountryFromJSONTyped(json: any, ignoreDiscriminator: boolean): DetailedCountry {
|
|
59
|
+
if ((json === undefined) || (json === null)) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
|
|
64
|
+
'code': CountryCodeEnumFromJSON(json['code']),
|
|
65
|
+
'name': json['name'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function DetailedCountryToJSON(value?: DetailedCountry | null): any {
|
|
70
|
+
if (value === undefined) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
if (value === null) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'code': CountryCodeEnumToJSON(value.code),
|
|
79
|
+
'name': value.name,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* authentik
|
|
5
|
+
* Making authentication simple.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024.6.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 { exists, mapValues } from '../runtime';
|
|
16
|
+
import type { CountryCodeEnum } from './CountryCodeEnum';
|
|
17
|
+
import {
|
|
18
|
+
CountryCodeEnumFromJSON,
|
|
19
|
+
CountryCodeEnumFromJSONTyped,
|
|
20
|
+
CountryCodeEnumToJSON,
|
|
21
|
+
} from './CountryCodeEnum';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface DetailedCountryField
|
|
27
|
+
*/
|
|
28
|
+
export interface DetailedCountryField {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {CountryCodeEnum}
|
|
32
|
+
* @memberof DetailedCountryField
|
|
33
|
+
*/
|
|
34
|
+
code: CountryCodeEnum;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof DetailedCountryField
|
|
39
|
+
*/
|
|
40
|
+
name: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the DetailedCountryField interface.
|
|
45
|
+
*/
|
|
46
|
+
export function instanceOfDetailedCountryField(value: object): boolean {
|
|
47
|
+
let isInstance = true;
|
|
48
|
+
isInstance = isInstance && "code" in value;
|
|
49
|
+
isInstance = isInstance && "name" in value;
|
|
50
|
+
|
|
51
|
+
return isInstance;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function DetailedCountryFieldFromJSON(json: any): DetailedCountryField {
|
|
55
|
+
return DetailedCountryFieldFromJSONTyped(json, false);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function DetailedCountryFieldFromJSONTyped(json: any, ignoreDiscriminator: boolean): DetailedCountryField {
|
|
59
|
+
if ((json === undefined) || (json === null)) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
|
|
64
|
+
'code': CountryCodeEnumFromJSON(json['code']),
|
|
65
|
+
'name': json['name'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function DetailedCountryFieldToJSON(value?: DetailedCountryField | null): any {
|
|
70
|
+
if (value === undefined) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
if (value === null) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'code': CountryCodeEnumToJSON(value.code),
|
|
79
|
+
'name': value.name,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* authentik
|
|
5
|
+
* Making authentication simple.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024.6.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 { exists, mapValues } from '../runtime';
|
|
16
|
+
import type { CountryCodeEnum } from './CountryCodeEnum';
|
|
17
|
+
import {
|
|
18
|
+
CountryCodeEnumFromJSON,
|
|
19
|
+
CountryCodeEnumFromJSONTyped,
|
|
20
|
+
CountryCodeEnumToJSON,
|
|
21
|
+
} from './CountryCodeEnum';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface DetailedCountryFieldRequest
|
|
27
|
+
*/
|
|
28
|
+
export interface DetailedCountryFieldRequest {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {CountryCodeEnum}
|
|
32
|
+
* @memberof DetailedCountryFieldRequest
|
|
33
|
+
*/
|
|
34
|
+
code: CountryCodeEnum;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof DetailedCountryFieldRequest
|
|
39
|
+
*/
|
|
40
|
+
name: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the DetailedCountryFieldRequest interface.
|
|
45
|
+
*/
|
|
46
|
+
export function instanceOfDetailedCountryFieldRequest(value: object): boolean {
|
|
47
|
+
let isInstance = true;
|
|
48
|
+
isInstance = isInstance && "code" in value;
|
|
49
|
+
isInstance = isInstance && "name" in value;
|
|
50
|
+
|
|
51
|
+
return isInstance;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function DetailedCountryFieldRequestFromJSON(json: any): DetailedCountryFieldRequest {
|
|
55
|
+
return DetailedCountryFieldRequestFromJSONTyped(json, false);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function DetailedCountryFieldRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DetailedCountryFieldRequest {
|
|
59
|
+
if ((json === undefined) || (json === null)) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
|
|
64
|
+
'code': CountryCodeEnumFromJSON(json['code']),
|
|
65
|
+
'name': json['name'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function DetailedCountryFieldRequestToJSON(value?: DetailedCountryFieldRequest | null): any {
|
|
70
|
+
if (value === undefined) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
if (value === null) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'code': CountryCodeEnumToJSON(value.code),
|
|
79
|
+
'name': value.name,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* authentik
|
|
5
|
+
* Making authentication simple.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024.6.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 { exists, mapValues } from '../runtime';
|
|
16
|
+
import type { CountryCodeEnum } from './CountryCodeEnum';
|
|
17
|
+
import {
|
|
18
|
+
CountryCodeEnumFromJSON,
|
|
19
|
+
CountryCodeEnumFromJSONTyped,
|
|
20
|
+
CountryCodeEnumToJSON,
|
|
21
|
+
} from './CountryCodeEnum';
|
|
22
|
+
import type { DetailedCountryField } from './DetailedCountryField';
|
|
23
|
+
import {
|
|
24
|
+
DetailedCountryFieldFromJSON,
|
|
25
|
+
DetailedCountryFieldFromJSONTyped,
|
|
26
|
+
DetailedCountryFieldToJSON,
|
|
27
|
+
} from './DetailedCountryField';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* GeoIP Policy Serializer
|
|
31
|
+
* @export
|
|
32
|
+
* @interface GeoIPPolicy
|
|
33
|
+
*/
|
|
34
|
+
export interface GeoIPPolicy {
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof GeoIPPolicy
|
|
39
|
+
*/
|
|
40
|
+
readonly pk: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof GeoIPPolicy
|
|
45
|
+
*/
|
|
46
|
+
name: string;
|
|
47
|
+
/**
|
|
48
|
+
* When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged.
|
|
49
|
+
* @type {boolean}
|
|
50
|
+
* @memberof GeoIPPolicy
|
|
51
|
+
*/
|
|
52
|
+
executionLogging?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Get object component so that we know how to edit the object
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @memberof GeoIPPolicy
|
|
57
|
+
*/
|
|
58
|
+
readonly component: string;
|
|
59
|
+
/**
|
|
60
|
+
* Return object's verbose_name
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @memberof GeoIPPolicy
|
|
63
|
+
*/
|
|
64
|
+
readonly verboseName: string;
|
|
65
|
+
/**
|
|
66
|
+
* Return object's plural verbose_name
|
|
67
|
+
* @type {string}
|
|
68
|
+
* @memberof GeoIPPolicy
|
|
69
|
+
*/
|
|
70
|
+
readonly verboseNamePlural: string;
|
|
71
|
+
/**
|
|
72
|
+
* Return internal model name
|
|
73
|
+
* @type {string}
|
|
74
|
+
* @memberof GeoIPPolicy
|
|
75
|
+
*/
|
|
76
|
+
readonly metaModelName: string;
|
|
77
|
+
/**
|
|
78
|
+
* Return objects policy is bound to
|
|
79
|
+
* @type {number}
|
|
80
|
+
* @memberof GeoIPPolicy
|
|
81
|
+
*/
|
|
82
|
+
readonly boundTo: number;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {Array<number>}
|
|
86
|
+
* @memberof GeoIPPolicy
|
|
87
|
+
*/
|
|
88
|
+
asns?: Array<number>;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @type {Array<CountryCodeEnum>}
|
|
92
|
+
* @memberof GeoIPPolicy
|
|
93
|
+
*/
|
|
94
|
+
countries: Array<CountryCodeEnum>;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @type {Array<DetailedCountryField>}
|
|
98
|
+
* @memberof GeoIPPolicy
|
|
99
|
+
*/
|
|
100
|
+
readonly countriesObj: Array<DetailedCountryField>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Check if a given object implements the GeoIPPolicy interface.
|
|
105
|
+
*/
|
|
106
|
+
export function instanceOfGeoIPPolicy(value: object): boolean {
|
|
107
|
+
let isInstance = true;
|
|
108
|
+
isInstance = isInstance && "pk" in value;
|
|
109
|
+
isInstance = isInstance && "name" in value;
|
|
110
|
+
isInstance = isInstance && "component" in value;
|
|
111
|
+
isInstance = isInstance && "verboseName" in value;
|
|
112
|
+
isInstance = isInstance && "verboseNamePlural" in value;
|
|
113
|
+
isInstance = isInstance && "metaModelName" in value;
|
|
114
|
+
isInstance = isInstance && "boundTo" in value;
|
|
115
|
+
isInstance = isInstance && "countries" in value;
|
|
116
|
+
isInstance = isInstance && "countriesObj" in value;
|
|
117
|
+
|
|
118
|
+
return isInstance;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function GeoIPPolicyFromJSON(json: any): GeoIPPolicy {
|
|
122
|
+
return GeoIPPolicyFromJSONTyped(json, false);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function GeoIPPolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): GeoIPPolicy {
|
|
126
|
+
if ((json === undefined) || (json === null)) {
|
|
127
|
+
return json;
|
|
128
|
+
}
|
|
129
|
+
return {
|
|
130
|
+
|
|
131
|
+
'pk': json['pk'],
|
|
132
|
+
'name': json['name'],
|
|
133
|
+
'executionLogging': !exists(json, 'execution_logging') ? undefined : json['execution_logging'],
|
|
134
|
+
'component': json['component'],
|
|
135
|
+
'verboseName': json['verbose_name'],
|
|
136
|
+
'verboseNamePlural': json['verbose_name_plural'],
|
|
137
|
+
'metaModelName': json['meta_model_name'],
|
|
138
|
+
'boundTo': json['bound_to'],
|
|
139
|
+
'asns': !exists(json, 'asns') ? undefined : json['asns'],
|
|
140
|
+
'countries': ((json['countries'] as Array<any>).map(CountryCodeEnumFromJSON)),
|
|
141
|
+
'countriesObj': ((json['countries_obj'] as Array<any>).map(DetailedCountryFieldFromJSON)),
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function GeoIPPolicyToJSON(value?: GeoIPPolicy | null): any {
|
|
146
|
+
if (value === undefined) {
|
|
147
|
+
return undefined;
|
|
148
|
+
}
|
|
149
|
+
if (value === null) {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
|
|
154
|
+
'name': value.name,
|
|
155
|
+
'execution_logging': value.executionLogging,
|
|
156
|
+
'asns': value.asns,
|
|
157
|
+
'countries': ((value.countries as Array<any>).map(CountryCodeEnumToJSON)),
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
|