@goauthentik/api 2023.10.7-1707429127 → 2023.10.7-1707933453

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.
Files changed (47) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/dist/apis/RacApi.d.ts +75 -1
  3. package/dist/apis/RacApi.js +210 -0
  4. package/dist/esm/apis/RacApi.d.ts +75 -1
  5. package/dist/esm/apis/RacApi.js +211 -1
  6. package/dist/esm/models/ConnectionToken.d.ts +64 -0
  7. package/dist/esm/models/ConnectionToken.js +56 -0
  8. package/dist/esm/models/ConnectionTokenRequest.d.ts +31 -0
  9. package/dist/esm/models/ConnectionTokenRequest.js +43 -0
  10. package/dist/esm/models/PaginatedConnectionTokenList.d.ts +39 -0
  11. package/dist/esm/models/PaginatedConnectionTokenList.js +48 -0
  12. package/dist/esm/models/PatchedConnectionTokenRequest.d.ts +31 -0
  13. package/dist/esm/models/PatchedConnectionTokenRequest.js +43 -0
  14. package/dist/esm/models/PatchedRACProviderRequest.d.ts +6 -0
  15. package/dist/esm/models/PatchedRACProviderRequest.js +2 -0
  16. package/dist/esm/models/RACProvider.d.ts +6 -0
  17. package/dist/esm/models/RACProvider.js +2 -0
  18. package/dist/esm/models/RACProviderRequest.d.ts +6 -0
  19. package/dist/esm/models/RACProviderRequest.js +2 -0
  20. package/dist/esm/models/index.d.ts +4 -0
  21. package/dist/esm/models/index.js +4 -0
  22. package/dist/models/ConnectionToken.d.ts +64 -0
  23. package/dist/models/ConnectionToken.js +63 -0
  24. package/dist/models/ConnectionTokenRequest.d.ts +31 -0
  25. package/dist/models/ConnectionTokenRequest.js +50 -0
  26. package/dist/models/PaginatedConnectionTokenList.d.ts +39 -0
  27. package/dist/models/PaginatedConnectionTokenList.js +55 -0
  28. package/dist/models/PatchedConnectionTokenRequest.d.ts +31 -0
  29. package/dist/models/PatchedConnectionTokenRequest.js +50 -0
  30. package/dist/models/PatchedRACProviderRequest.d.ts +6 -0
  31. package/dist/models/PatchedRACProviderRequest.js +2 -0
  32. package/dist/models/RACProvider.d.ts +6 -0
  33. package/dist/models/RACProvider.js +2 -0
  34. package/dist/models/RACProviderRequest.d.ts +6 -0
  35. package/dist/models/RACProviderRequest.js +2 -0
  36. package/dist/models/index.d.ts +4 -0
  37. package/dist/models/index.js +4 -0
  38. package/package.json +1 -1
  39. package/src/apis/RacApi.ts +281 -0
  40. package/src/models/ConnectionToken.ts +125 -0
  41. package/src/models/ConnectionTokenRequest.ts +66 -0
  42. package/src/models/PaginatedConnectionTokenList.ts +88 -0
  43. package/src/models/PatchedConnectionTokenRequest.ts +65 -0
  44. package/src/models/PatchedRACProviderRequest.ts +8 -0
  45. package/src/models/RACProvider.ts +8 -0
  46. package/src/models/RACProviderRequest.ts +8 -0
  47. package/src/models/index.ts +4 -0
@@ -15,23 +15,35 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
+ ConnectionToken,
19
+ ConnectionTokenRequest,
18
20
  Endpoint,
19
21
  EndpointRequest,
20
22
  GenericError,
23
+ PaginatedConnectionTokenList,
21
24
  PaginatedEndpointList,
25
+ PatchedConnectionTokenRequest,
22
26
  PatchedEndpointRequest,
23
27
  UsedBy,
24
28
  ValidationError,
25
29
  } from '../models';
26
30
  import {
31
+ ConnectionTokenFromJSON,
32
+ ConnectionTokenToJSON,
33
+ ConnectionTokenRequestFromJSON,
34
+ ConnectionTokenRequestToJSON,
27
35
  EndpointFromJSON,
28
36
  EndpointToJSON,
29
37
  EndpointRequestFromJSON,
30
38
  EndpointRequestToJSON,
31
39
  GenericErrorFromJSON,
32
40
  GenericErrorToJSON,
41
+ PaginatedConnectionTokenListFromJSON,
42
+ PaginatedConnectionTokenListToJSON,
33
43
  PaginatedEndpointListFromJSON,
34
44
  PaginatedEndpointListToJSON,
45
+ PatchedConnectionTokenRequestFromJSON,
46
+ PatchedConnectionTokenRequestToJSON,
35
47
  PatchedEndpointRequestFromJSON,
36
48
  PatchedEndpointRequestToJSON,
37
49
  UsedByFromJSON,
@@ -40,6 +52,38 @@ import {
40
52
  ValidationErrorToJSON,
41
53
  } from '../models';
42
54
 
55
+ export interface RacConnectionTokensDestroyRequest {
56
+ connectionTokenUuid: string;
57
+ }
58
+
59
+ export interface RacConnectionTokensListRequest {
60
+ endpoint?: string;
61
+ ordering?: string;
62
+ page?: number;
63
+ pageSize?: number;
64
+ provider?: number;
65
+ search?: string;
66
+ sessionUser?: number;
67
+ }
68
+
69
+ export interface RacConnectionTokensPartialUpdateRequest {
70
+ connectionTokenUuid: string;
71
+ patchedConnectionTokenRequest?: PatchedConnectionTokenRequest;
72
+ }
73
+
74
+ export interface RacConnectionTokensRetrieveRequest {
75
+ connectionTokenUuid: string;
76
+ }
77
+
78
+ export interface RacConnectionTokensUpdateRequest {
79
+ connectionTokenUuid: string;
80
+ connectionTokenRequest: ConnectionTokenRequest;
81
+ }
82
+
83
+ export interface RacConnectionTokensUsedByListRequest {
84
+ connectionTokenUuid: string;
85
+ }
86
+
43
87
  export interface RacEndpointsCreateRequest {
44
88
  endpointRequest: EndpointRequest;
45
89
  }
@@ -81,6 +125,243 @@ export interface RacEndpointsUsedByListRequest {
81
125
  */
82
126
  export class RacApi extends runtime.BaseAPI {
83
127
 
128
+ /**
129
+ * ConnectionToken Viewset
130
+ */
131
+ async racConnectionTokensDestroyRaw(requestParameters: RacConnectionTokensDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
132
+ if (requestParameters.connectionTokenUuid === null || requestParameters.connectionTokenUuid === undefined) {
133
+ throw new runtime.RequiredError('connectionTokenUuid','Required parameter requestParameters.connectionTokenUuid was null or undefined when calling racConnectionTokensDestroy.');
134
+ }
135
+
136
+ const queryParameters: any = {};
137
+
138
+ const headerParameters: runtime.HTTPHeaders = {};
139
+
140
+ if (this.configuration && this.configuration.apiKey) {
141
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
142
+ }
143
+
144
+ const response = await this.request({
145
+ path: `/rac/connection_tokens/{connection_token_uuid}/`.replace(`{${"connection_token_uuid"}}`, encodeURIComponent(String(requestParameters.connectionTokenUuid))),
146
+ method: 'DELETE',
147
+ headers: headerParameters,
148
+ query: queryParameters,
149
+ }, initOverrides);
150
+
151
+ return new runtime.VoidApiResponse(response);
152
+ }
153
+
154
+ /**
155
+ * ConnectionToken Viewset
156
+ */
157
+ async racConnectionTokensDestroy(requestParameters: RacConnectionTokensDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
158
+ await this.racConnectionTokensDestroyRaw(requestParameters, initOverrides);
159
+ }
160
+
161
+ /**
162
+ * ConnectionToken Viewset
163
+ */
164
+ async racConnectionTokensListRaw(requestParameters: RacConnectionTokensListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedConnectionTokenList>> {
165
+ const queryParameters: any = {};
166
+
167
+ if (requestParameters.endpoint !== undefined) {
168
+ queryParameters['endpoint'] = requestParameters.endpoint;
169
+ }
170
+
171
+ if (requestParameters.ordering !== undefined) {
172
+ queryParameters['ordering'] = requestParameters.ordering;
173
+ }
174
+
175
+ if (requestParameters.page !== undefined) {
176
+ queryParameters['page'] = requestParameters.page;
177
+ }
178
+
179
+ if (requestParameters.pageSize !== undefined) {
180
+ queryParameters['page_size'] = requestParameters.pageSize;
181
+ }
182
+
183
+ if (requestParameters.provider !== undefined) {
184
+ queryParameters['provider'] = requestParameters.provider;
185
+ }
186
+
187
+ if (requestParameters.search !== undefined) {
188
+ queryParameters['search'] = requestParameters.search;
189
+ }
190
+
191
+ if (requestParameters.sessionUser !== undefined) {
192
+ queryParameters['session__user'] = requestParameters.sessionUser;
193
+ }
194
+
195
+ const headerParameters: runtime.HTTPHeaders = {};
196
+
197
+ if (this.configuration && this.configuration.apiKey) {
198
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
199
+ }
200
+
201
+ const response = await this.request({
202
+ path: `/rac/connection_tokens/`,
203
+ method: 'GET',
204
+ headers: headerParameters,
205
+ query: queryParameters,
206
+ }, initOverrides);
207
+
208
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedConnectionTokenListFromJSON(jsonValue));
209
+ }
210
+
211
+ /**
212
+ * ConnectionToken Viewset
213
+ */
214
+ async racConnectionTokensList(requestParameters: RacConnectionTokensListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedConnectionTokenList> {
215
+ const response = await this.racConnectionTokensListRaw(requestParameters, initOverrides);
216
+ return await response.value();
217
+ }
218
+
219
+ /**
220
+ * ConnectionToken Viewset
221
+ */
222
+ async racConnectionTokensPartialUpdateRaw(requestParameters: RacConnectionTokensPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConnectionToken>> {
223
+ if (requestParameters.connectionTokenUuid === null || requestParameters.connectionTokenUuid === undefined) {
224
+ throw new runtime.RequiredError('connectionTokenUuid','Required parameter requestParameters.connectionTokenUuid was null or undefined when calling racConnectionTokensPartialUpdate.');
225
+ }
226
+
227
+ const queryParameters: any = {};
228
+
229
+ const headerParameters: runtime.HTTPHeaders = {};
230
+
231
+ headerParameters['Content-Type'] = 'application/json';
232
+
233
+ if (this.configuration && this.configuration.apiKey) {
234
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
235
+ }
236
+
237
+ const response = await this.request({
238
+ path: `/rac/connection_tokens/{connection_token_uuid}/`.replace(`{${"connection_token_uuid"}}`, encodeURIComponent(String(requestParameters.connectionTokenUuid))),
239
+ method: 'PATCH',
240
+ headers: headerParameters,
241
+ query: queryParameters,
242
+ body: PatchedConnectionTokenRequestToJSON(requestParameters.patchedConnectionTokenRequest),
243
+ }, initOverrides);
244
+
245
+ return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionTokenFromJSON(jsonValue));
246
+ }
247
+
248
+ /**
249
+ * ConnectionToken Viewset
250
+ */
251
+ async racConnectionTokensPartialUpdate(requestParameters: RacConnectionTokensPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConnectionToken> {
252
+ const response = await this.racConnectionTokensPartialUpdateRaw(requestParameters, initOverrides);
253
+ return await response.value();
254
+ }
255
+
256
+ /**
257
+ * ConnectionToken Viewset
258
+ */
259
+ async racConnectionTokensRetrieveRaw(requestParameters: RacConnectionTokensRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConnectionToken>> {
260
+ if (requestParameters.connectionTokenUuid === null || requestParameters.connectionTokenUuid === undefined) {
261
+ throw new runtime.RequiredError('connectionTokenUuid','Required parameter requestParameters.connectionTokenUuid was null or undefined when calling racConnectionTokensRetrieve.');
262
+ }
263
+
264
+ const queryParameters: any = {};
265
+
266
+ const headerParameters: runtime.HTTPHeaders = {};
267
+
268
+ if (this.configuration && this.configuration.apiKey) {
269
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
270
+ }
271
+
272
+ const response = await this.request({
273
+ path: `/rac/connection_tokens/{connection_token_uuid}/`.replace(`{${"connection_token_uuid"}}`, encodeURIComponent(String(requestParameters.connectionTokenUuid))),
274
+ method: 'GET',
275
+ headers: headerParameters,
276
+ query: queryParameters,
277
+ }, initOverrides);
278
+
279
+ return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionTokenFromJSON(jsonValue));
280
+ }
281
+
282
+ /**
283
+ * ConnectionToken Viewset
284
+ */
285
+ async racConnectionTokensRetrieve(requestParameters: RacConnectionTokensRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConnectionToken> {
286
+ const response = await this.racConnectionTokensRetrieveRaw(requestParameters, initOverrides);
287
+ return await response.value();
288
+ }
289
+
290
+ /**
291
+ * ConnectionToken Viewset
292
+ */
293
+ async racConnectionTokensUpdateRaw(requestParameters: RacConnectionTokensUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConnectionToken>> {
294
+ if (requestParameters.connectionTokenUuid === null || requestParameters.connectionTokenUuid === undefined) {
295
+ throw new runtime.RequiredError('connectionTokenUuid','Required parameter requestParameters.connectionTokenUuid was null or undefined when calling racConnectionTokensUpdate.');
296
+ }
297
+
298
+ if (requestParameters.connectionTokenRequest === null || requestParameters.connectionTokenRequest === undefined) {
299
+ throw new runtime.RequiredError('connectionTokenRequest','Required parameter requestParameters.connectionTokenRequest was null or undefined when calling racConnectionTokensUpdate.');
300
+ }
301
+
302
+ const queryParameters: any = {};
303
+
304
+ const headerParameters: runtime.HTTPHeaders = {};
305
+
306
+ headerParameters['Content-Type'] = 'application/json';
307
+
308
+ if (this.configuration && this.configuration.apiKey) {
309
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
310
+ }
311
+
312
+ const response = await this.request({
313
+ path: `/rac/connection_tokens/{connection_token_uuid}/`.replace(`{${"connection_token_uuid"}}`, encodeURIComponent(String(requestParameters.connectionTokenUuid))),
314
+ method: 'PUT',
315
+ headers: headerParameters,
316
+ query: queryParameters,
317
+ body: ConnectionTokenRequestToJSON(requestParameters.connectionTokenRequest),
318
+ }, initOverrides);
319
+
320
+ return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionTokenFromJSON(jsonValue));
321
+ }
322
+
323
+ /**
324
+ * ConnectionToken Viewset
325
+ */
326
+ async racConnectionTokensUpdate(requestParameters: RacConnectionTokensUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConnectionToken> {
327
+ const response = await this.racConnectionTokensUpdateRaw(requestParameters, initOverrides);
328
+ return await response.value();
329
+ }
330
+
331
+ /**
332
+ * Get a list of all objects that use this object
333
+ */
334
+ async racConnectionTokensUsedByListRaw(requestParameters: RacConnectionTokensUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<UsedBy>>> {
335
+ if (requestParameters.connectionTokenUuid === null || requestParameters.connectionTokenUuid === undefined) {
336
+ throw new runtime.RequiredError('connectionTokenUuid','Required parameter requestParameters.connectionTokenUuid was null or undefined when calling racConnectionTokensUsedByList.');
337
+ }
338
+
339
+ const queryParameters: any = {};
340
+
341
+ const headerParameters: runtime.HTTPHeaders = {};
342
+
343
+ if (this.configuration && this.configuration.apiKey) {
344
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
345
+ }
346
+
347
+ const response = await this.request({
348
+ path: `/rac/connection_tokens/{connection_token_uuid}/used_by/`.replace(`{${"connection_token_uuid"}}`, encodeURIComponent(String(requestParameters.connectionTokenUuid))),
349
+ method: 'GET',
350
+ headers: headerParameters,
351
+ query: queryParameters,
352
+ }, initOverrides);
353
+
354
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON));
355
+ }
356
+
357
+ /**
358
+ * Get a list of all objects that use this object
359
+ */
360
+ async racConnectionTokensUsedByList(requestParameters: RacConnectionTokensUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<UsedBy>> {
361
+ const response = await this.racConnectionTokensUsedByListRaw(requestParameters, initOverrides);
362
+ return await response.value();
363
+ }
364
+
84
365
  /**
85
366
  * Endpoint Viewset
86
367
  */
@@ -0,0 +1,125 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * authentik
5
+ * Making authentication simple.
6
+ *
7
+ * The version of the OpenAPI document: 2023.10.7
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 { Endpoint } from './Endpoint';
17
+ import {
18
+ EndpointFromJSON,
19
+ EndpointFromJSONTyped,
20
+ EndpointToJSON,
21
+ } from './Endpoint';
22
+ import type { GroupMember } from './GroupMember';
23
+ import {
24
+ GroupMemberFromJSON,
25
+ GroupMemberFromJSONTyped,
26
+ GroupMemberToJSON,
27
+ } from './GroupMember';
28
+ import type { RACProvider } from './RACProvider';
29
+ import {
30
+ RACProviderFromJSON,
31
+ RACProviderFromJSONTyped,
32
+ RACProviderToJSON,
33
+ } from './RACProvider';
34
+
35
+ /**
36
+ * ConnectionToken Serializer
37
+ * @export
38
+ * @interface ConnectionToken
39
+ */
40
+ export interface ConnectionToken {
41
+ /**
42
+ *
43
+ * @type {string}
44
+ * @memberof ConnectionToken
45
+ */
46
+ readonly pk: string;
47
+ /**
48
+ *
49
+ * @type {number}
50
+ * @memberof ConnectionToken
51
+ */
52
+ provider: number;
53
+ /**
54
+ *
55
+ * @type {RACProvider}
56
+ * @memberof ConnectionToken
57
+ */
58
+ readonly providerObj: RACProvider;
59
+ /**
60
+ *
61
+ * @type {string}
62
+ * @memberof ConnectionToken
63
+ */
64
+ readonly endpoint: string;
65
+ /**
66
+ *
67
+ * @type {Endpoint}
68
+ * @memberof ConnectionToken
69
+ */
70
+ readonly endpointObj: Endpoint;
71
+ /**
72
+ *
73
+ * @type {GroupMember}
74
+ * @memberof ConnectionToken
75
+ */
76
+ readonly user: GroupMember;
77
+ }
78
+
79
+ /**
80
+ * Check if a given object implements the ConnectionToken interface.
81
+ */
82
+ export function instanceOfConnectionToken(value: object): boolean {
83
+ let isInstance = true;
84
+ isInstance = isInstance && "pk" in value;
85
+ isInstance = isInstance && "provider" in value;
86
+ isInstance = isInstance && "providerObj" in value;
87
+ isInstance = isInstance && "endpoint" in value;
88
+ isInstance = isInstance && "endpointObj" in value;
89
+ isInstance = isInstance && "user" in value;
90
+
91
+ return isInstance;
92
+ }
93
+
94
+ export function ConnectionTokenFromJSON(json: any): ConnectionToken {
95
+ return ConnectionTokenFromJSONTyped(json, false);
96
+ }
97
+
98
+ export function ConnectionTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectionToken {
99
+ if ((json === undefined) || (json === null)) {
100
+ return json;
101
+ }
102
+ return {
103
+
104
+ 'pk': json['pk'],
105
+ 'provider': json['provider'],
106
+ 'providerObj': RACProviderFromJSON(json['provider_obj']),
107
+ 'endpoint': json['endpoint'],
108
+ 'endpointObj': EndpointFromJSON(json['endpoint_obj']),
109
+ 'user': GroupMemberFromJSON(json['user']),
110
+ };
111
+ }
112
+
113
+ export function ConnectionTokenToJSON(value?: ConnectionToken | null): any {
114
+ if (value === undefined) {
115
+ return undefined;
116
+ }
117
+ if (value === null) {
118
+ return null;
119
+ }
120
+ return {
121
+
122
+ 'provider': value.provider,
123
+ };
124
+ }
125
+
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * authentik
5
+ * Making authentication simple.
6
+ *
7
+ * The version of the OpenAPI document: 2023.10.7
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
+ /**
17
+ * ConnectionToken Serializer
18
+ * @export
19
+ * @interface ConnectionTokenRequest
20
+ */
21
+ export interface ConnectionTokenRequest {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof ConnectionTokenRequest
26
+ */
27
+ provider: number;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the ConnectionTokenRequest interface.
32
+ */
33
+ export function instanceOfConnectionTokenRequest(value: object): boolean {
34
+ let isInstance = true;
35
+ isInstance = isInstance && "provider" in value;
36
+
37
+ return isInstance;
38
+ }
39
+
40
+ export function ConnectionTokenRequestFromJSON(json: any): ConnectionTokenRequest {
41
+ return ConnectionTokenRequestFromJSONTyped(json, false);
42
+ }
43
+
44
+ export function ConnectionTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectionTokenRequest {
45
+ if ((json === undefined) || (json === null)) {
46
+ return json;
47
+ }
48
+ return {
49
+
50
+ 'provider': json['provider'],
51
+ };
52
+ }
53
+
54
+ export function ConnectionTokenRequestToJSON(value?: ConnectionTokenRequest | null): any {
55
+ if (value === undefined) {
56
+ return undefined;
57
+ }
58
+ if (value === null) {
59
+ return null;
60
+ }
61
+ return {
62
+
63
+ 'provider': value.provider,
64
+ };
65
+ }
66
+
@@ -0,0 +1,88 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * authentik
5
+ * Making authentication simple.
6
+ *
7
+ * The version of the OpenAPI document: 2023.10.7
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 { ConnectionToken } from './ConnectionToken';
17
+ import {
18
+ ConnectionTokenFromJSON,
19
+ ConnectionTokenFromJSONTyped,
20
+ ConnectionTokenToJSON,
21
+ } from './ConnectionToken';
22
+ import type { Pagination } from './Pagination';
23
+ import {
24
+ PaginationFromJSON,
25
+ PaginationFromJSONTyped,
26
+ PaginationToJSON,
27
+ } from './Pagination';
28
+
29
+ /**
30
+ *
31
+ * @export
32
+ * @interface PaginatedConnectionTokenList
33
+ */
34
+ export interface PaginatedConnectionTokenList {
35
+ /**
36
+ *
37
+ * @type {Pagination}
38
+ * @memberof PaginatedConnectionTokenList
39
+ */
40
+ pagination: Pagination;
41
+ /**
42
+ *
43
+ * @type {Array<ConnectionToken>}
44
+ * @memberof PaginatedConnectionTokenList
45
+ */
46
+ results: Array<ConnectionToken>;
47
+ }
48
+
49
+ /**
50
+ * Check if a given object implements the PaginatedConnectionTokenList interface.
51
+ */
52
+ export function instanceOfPaginatedConnectionTokenList(value: object): boolean {
53
+ let isInstance = true;
54
+ isInstance = isInstance && "pagination" in value;
55
+ isInstance = isInstance && "results" in value;
56
+
57
+ return isInstance;
58
+ }
59
+
60
+ export function PaginatedConnectionTokenListFromJSON(json: any): PaginatedConnectionTokenList {
61
+ return PaginatedConnectionTokenListFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function PaginatedConnectionTokenListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedConnectionTokenList {
65
+ if ((json === undefined) || (json === null)) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'pagination': PaginationFromJSON(json['pagination']),
71
+ 'results': ((json['results'] as Array<any>).map(ConnectionTokenFromJSON)),
72
+ };
73
+ }
74
+
75
+ export function PaginatedConnectionTokenListToJSON(value?: PaginatedConnectionTokenList | null): any {
76
+ if (value === undefined) {
77
+ return undefined;
78
+ }
79
+ if (value === null) {
80
+ return null;
81
+ }
82
+ return {
83
+
84
+ 'pagination': PaginationToJSON(value.pagination),
85
+ 'results': ((value.results as Array<any>).map(ConnectionTokenToJSON)),
86
+ };
87
+ }
88
+
@@ -0,0 +1,65 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * authentik
5
+ * Making authentication simple.
6
+ *
7
+ * The version of the OpenAPI document: 2023.10.7
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
+ /**
17
+ * ConnectionToken Serializer
18
+ * @export
19
+ * @interface PatchedConnectionTokenRequest
20
+ */
21
+ export interface PatchedConnectionTokenRequest {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof PatchedConnectionTokenRequest
26
+ */
27
+ provider?: number;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the PatchedConnectionTokenRequest interface.
32
+ */
33
+ export function instanceOfPatchedConnectionTokenRequest(value: object): boolean {
34
+ let isInstance = true;
35
+
36
+ return isInstance;
37
+ }
38
+
39
+ export function PatchedConnectionTokenRequestFromJSON(json: any): PatchedConnectionTokenRequest {
40
+ return PatchedConnectionTokenRequestFromJSONTyped(json, false);
41
+ }
42
+
43
+ export function PatchedConnectionTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedConnectionTokenRequest {
44
+ if ((json === undefined) || (json === null)) {
45
+ return json;
46
+ }
47
+ return {
48
+
49
+ 'provider': !exists(json, 'provider') ? undefined : json['provider'],
50
+ };
51
+ }
52
+
53
+ export function PatchedConnectionTokenRequestToJSON(value?: PatchedConnectionTokenRequest | null): any {
54
+ if (value === undefined) {
55
+ return undefined;
56
+ }
57
+ if (value === null) {
58
+ return null;
59
+ }
60
+ return {
61
+
62
+ 'provider': value.provider,
63
+ };
64
+ }
65
+
@@ -55,6 +55,12 @@ export interface PatchedRACProviderRequest {
55
55
  * @memberof PatchedRACProviderRequest
56
56
  */
57
57
  connectionExpiry?: string;
58
+ /**
59
+ * When set to true, connection tokens will be deleted upon disconnect.
60
+ * @type {boolean}
61
+ * @memberof PatchedRACProviderRequest
62
+ */
63
+ deleteTokenOnDisconnect?: boolean;
58
64
  }
59
65
 
60
66
  /**
@@ -82,6 +88,7 @@ export function PatchedRACProviderRequestFromJSONTyped(json: any, ignoreDiscrimi
82
88
  'propertyMappings': !exists(json, 'property_mappings') ? undefined : json['property_mappings'],
83
89
  'settings': !exists(json, 'settings') ? undefined : json['settings'],
84
90
  'connectionExpiry': !exists(json, 'connection_expiry') ? undefined : json['connection_expiry'],
91
+ 'deleteTokenOnDisconnect': !exists(json, 'delete_token_on_disconnect') ? undefined : json['delete_token_on_disconnect'],
85
92
  };
86
93
  }
87
94
 
@@ -100,6 +107,7 @@ export function PatchedRACProviderRequestToJSON(value?: PatchedRACProviderReques
100
107
  'property_mappings': value.propertyMappings,
101
108
  'settings': value.settings,
102
109
  'connection_expiry': value.connectionExpiry,
110
+ 'delete_token_on_disconnect': value.deleteTokenOnDisconnect,
103
111
  };
104
112
  }
105
113