@goauthentik/api 2024.6.3-1722881330 → 2024.6.3-1723032607
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/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,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
|
+
|
package/src/models/Device.ts
CHANGED
|
@@ -61,6 +61,24 @@ export interface Device {
|
|
|
61
61
|
* @memberof Device
|
|
62
62
|
*/
|
|
63
63
|
confirmed: boolean;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {Date}
|
|
67
|
+
* @memberof Device
|
|
68
|
+
*/
|
|
69
|
+
readonly created: Date;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {Date}
|
|
73
|
+
* @memberof Device
|
|
74
|
+
*/
|
|
75
|
+
readonly lastUpdated: Date;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {Date}
|
|
79
|
+
* @memberof Device
|
|
80
|
+
*/
|
|
81
|
+
readonly lastUsed: Date | null;
|
|
64
82
|
}
|
|
65
83
|
|
|
66
84
|
/**
|
|
@@ -75,6 +93,9 @@ export function instanceOfDevice(value: object): boolean {
|
|
|
75
93
|
isInstance = isInstance && "name" in value;
|
|
76
94
|
isInstance = isInstance && "type" in value;
|
|
77
95
|
isInstance = isInstance && "confirmed" in value;
|
|
96
|
+
isInstance = isInstance && "created" in value;
|
|
97
|
+
isInstance = isInstance && "lastUpdated" in value;
|
|
98
|
+
isInstance = isInstance && "lastUsed" in value;
|
|
78
99
|
|
|
79
100
|
return isInstance;
|
|
80
101
|
}
|
|
@@ -96,6 +117,9 @@ export function DeviceFromJSONTyped(json: any, ignoreDiscriminator: boolean): De
|
|
|
96
117
|
'name': json['name'],
|
|
97
118
|
'type': json['type'],
|
|
98
119
|
'confirmed': json['confirmed'],
|
|
120
|
+
'created': (new Date(json['created'])),
|
|
121
|
+
'lastUpdated': (new Date(json['last_updated'])),
|
|
122
|
+
'lastUsed': (json['last_used'] === null ? null : new Date(json['last_used'])),
|
|
99
123
|
};
|
|
100
124
|
}
|
|
101
125
|
|