@goauthentik/api 2022.11.4-1671976031 → 2022.11.4-1672221153

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.
@@ -457,6 +457,7 @@ src/models/TypeCreate.ts
457
457
  src/models/UsedBy.ts
458
458
  src/models/UsedByActionEnum.ts
459
459
  src/models/User.ts
460
+ src/models/UserAccountRequest.ts
460
461
  src/models/UserConsent.ts
461
462
  src/models/UserDeleteStage.ts
462
463
  src/models/UserDeleteStageRequest.ts
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { Application, ApplicationRequest, AuthenticatedSession, Coordinate, CurrentTenant, FilePathRequest, Group, GroupRequest, Link, PaginatedApplicationList, PaginatedAuthenticatedSessionList, PaginatedGroupList, PaginatedTenantList, PaginatedTokenList, PaginatedUserConsentList, PaginatedUserList, PatchedApplicationRequest, PatchedGroupRequest, PatchedTenantRequest, PatchedTokenRequest, PatchedUserRequest, PolicyTestResult, SessionUser, Tenant, TenantRequest, Token, TokenRequest, TokenSetKeyRequest, TokenView, UsedBy, User, UserConsent, UserMetrics, UserPasswordSetRequest, UserPath, UserRequest, UserServiceAccountRequest, UserServiceAccountResponse } from '../models';
13
+ import { Application, ApplicationRequest, AuthenticatedSession, Coordinate, CurrentTenant, FilePathRequest, Group, GroupRequest, Link, PaginatedApplicationList, PaginatedAuthenticatedSessionList, PaginatedGroupList, PaginatedTenantList, PaginatedTokenList, PaginatedUserConsentList, PaginatedUserList, PatchedApplicationRequest, PatchedGroupRequest, PatchedTenantRequest, PatchedTokenRequest, PatchedUserRequest, PolicyTestResult, SessionUser, Tenant, TenantRequest, Token, TokenRequest, TokenSetKeyRequest, TokenView, UsedBy, User, UserAccountRequest, UserConsent, UserMetrics, UserPasswordSetRequest, UserPath, UserRequest, UserServiceAccountRequest, UserServiceAccountResponse } from '../models';
14
14
  export interface CoreApplicationsCheckAccessRetrieveRequest {
15
15
  slug: string;
16
16
  forUser?: number;
@@ -78,6 +78,10 @@ export interface CoreAuthenticatedSessionsRetrieveRequest {
78
78
  export interface CoreAuthenticatedSessionsUsedByListRequest {
79
79
  uuid: string;
80
80
  }
81
+ export interface CoreGroupsAddUserCreateRequest {
82
+ groupUuid: string;
83
+ userAccountRequest: UserAccountRequest;
84
+ }
81
85
  export interface CoreGroupsCreateRequest {
82
86
  groupRequest: GroupRequest;
83
87
  }
@@ -99,6 +103,10 @@ export interface CoreGroupsPartialUpdateRequest {
99
103
  groupUuid: string;
100
104
  patchedGroupRequest?: PatchedGroupRequest;
101
105
  }
106
+ export interface CoreGroupsRemoveUserCreateRequest {
107
+ groupUuid: string;
108
+ userAccountRequest: UserAccountRequest;
109
+ }
102
110
  export interface CoreGroupsRetrieveRequest {
103
111
  groupUuid: string;
104
112
  }
@@ -387,6 +395,14 @@ export declare class CoreApi extends runtime.BaseAPI {
387
395
  * Get a list of all objects that use this object
388
396
  */
389
397
  coreAuthenticatedSessionsUsedByList(requestParameters: CoreAuthenticatedSessionsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<Array<UsedBy>>;
398
+ /**
399
+ * Add user to group
400
+ */
401
+ coreGroupsAddUserCreateRaw(requestParameters: CoreGroupsAddUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>>;
402
+ /**
403
+ * Add user to group
404
+ */
405
+ coreGroupsAddUserCreate(requestParameters: CoreGroupsAddUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void>;
390
406
  /**
391
407
  * Group Viewset
392
408
  */
@@ -419,6 +435,14 @@ export declare class CoreApi extends runtime.BaseAPI {
419
435
  * Group Viewset
420
436
  */
421
437
  coreGroupsPartialUpdate(requestParameters: CoreGroupsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<Group>;
438
+ /**
439
+ * Add user to group
440
+ */
441
+ coreGroupsRemoveUserCreateRaw(requestParameters: CoreGroupsRemoveUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>>;
442
+ /**
443
+ * Add user to group
444
+ */
445
+ coreGroupsRemoveUserCreate(requestParameters: CoreGroupsRemoveUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void>;
422
446
  /**
423
447
  * Group Viewset
424
448
  */
@@ -577,6 +577,41 @@ class CoreApi extends runtime.BaseAPI {
577
577
  return yield response.value();
578
578
  });
579
579
  }
580
+ /**
581
+ * Add user to group
582
+ */
583
+ coreGroupsAddUserCreateRaw(requestParameters, initOverrides) {
584
+ return __awaiter(this, void 0, void 0, function* () {
585
+ if (requestParameters.groupUuid === null || requestParameters.groupUuid === undefined) {
586
+ throw new runtime.RequiredError('groupUuid', 'Required parameter requestParameters.groupUuid was null or undefined when calling coreGroupsAddUserCreate.');
587
+ }
588
+ if (requestParameters.userAccountRequest === null || requestParameters.userAccountRequest === undefined) {
589
+ throw new runtime.RequiredError('userAccountRequest', 'Required parameter requestParameters.userAccountRequest was null or undefined when calling coreGroupsAddUserCreate.');
590
+ }
591
+ const queryParameters = {};
592
+ const headerParameters = {};
593
+ headerParameters['Content-Type'] = 'application/json';
594
+ if (this.configuration && this.configuration.apiKey) {
595
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
596
+ }
597
+ const response = yield this.request({
598
+ path: `/core/groups/{group_uuid}/add_user/`.replace(`{${"group_uuid"}}`, encodeURIComponent(String(requestParameters.groupUuid))),
599
+ method: 'POST',
600
+ headers: headerParameters,
601
+ query: queryParameters,
602
+ body: (0, models_1.UserAccountRequestToJSON)(requestParameters.userAccountRequest),
603
+ }, initOverrides);
604
+ return new runtime.VoidApiResponse(response);
605
+ });
606
+ }
607
+ /**
608
+ * Add user to group
609
+ */
610
+ coreGroupsAddUserCreate(requestParameters, initOverrides) {
611
+ return __awaiter(this, void 0, void 0, function* () {
612
+ yield this.coreGroupsAddUserCreateRaw(requestParameters, initOverrides);
613
+ });
614
+ }
580
615
  /**
581
616
  * Group Viewset
582
617
  */
@@ -728,6 +763,41 @@ class CoreApi extends runtime.BaseAPI {
728
763
  return yield response.value();
729
764
  });
730
765
  }
766
+ /**
767
+ * Add user to group
768
+ */
769
+ coreGroupsRemoveUserCreateRaw(requestParameters, initOverrides) {
770
+ return __awaiter(this, void 0, void 0, function* () {
771
+ if (requestParameters.groupUuid === null || requestParameters.groupUuid === undefined) {
772
+ throw new runtime.RequiredError('groupUuid', 'Required parameter requestParameters.groupUuid was null or undefined when calling coreGroupsRemoveUserCreate.');
773
+ }
774
+ if (requestParameters.userAccountRequest === null || requestParameters.userAccountRequest === undefined) {
775
+ throw new runtime.RequiredError('userAccountRequest', 'Required parameter requestParameters.userAccountRequest was null or undefined when calling coreGroupsRemoveUserCreate.');
776
+ }
777
+ const queryParameters = {};
778
+ const headerParameters = {};
779
+ headerParameters['Content-Type'] = 'application/json';
780
+ if (this.configuration && this.configuration.apiKey) {
781
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
782
+ }
783
+ const response = yield this.request({
784
+ path: `/core/groups/{group_uuid}/remove_user/`.replace(`{${"group_uuid"}}`, encodeURIComponent(String(requestParameters.groupUuid))),
785
+ method: 'POST',
786
+ headers: headerParameters,
787
+ query: queryParameters,
788
+ body: (0, models_1.UserAccountRequestToJSON)(requestParameters.userAccountRequest),
789
+ }, initOverrides);
790
+ return new runtime.VoidApiResponse(response);
791
+ });
792
+ }
793
+ /**
794
+ * Add user to group
795
+ */
796
+ coreGroupsRemoveUserCreate(requestParameters, initOverrides) {
797
+ return __awaiter(this, void 0, void 0, function* () {
798
+ yield this.coreGroupsRemoveUserCreateRaw(requestParameters, initOverrides);
799
+ });
800
+ }
731
801
  /**
732
802
  * Group Viewset
733
803
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { Application, ApplicationRequest, AuthenticatedSession, Coordinate, CurrentTenant, FilePathRequest, Group, GroupRequest, Link, PaginatedApplicationList, PaginatedAuthenticatedSessionList, PaginatedGroupList, PaginatedTenantList, PaginatedTokenList, PaginatedUserConsentList, PaginatedUserList, PatchedApplicationRequest, PatchedGroupRequest, PatchedTenantRequest, PatchedTokenRequest, PatchedUserRequest, PolicyTestResult, SessionUser, Tenant, TenantRequest, Token, TokenRequest, TokenSetKeyRequest, TokenView, UsedBy, User, UserConsent, UserMetrics, UserPasswordSetRequest, UserPath, UserRequest, UserServiceAccountRequest, UserServiceAccountResponse } from '../models';
13
+ import { Application, ApplicationRequest, AuthenticatedSession, Coordinate, CurrentTenant, FilePathRequest, Group, GroupRequest, Link, PaginatedApplicationList, PaginatedAuthenticatedSessionList, PaginatedGroupList, PaginatedTenantList, PaginatedTokenList, PaginatedUserConsentList, PaginatedUserList, PatchedApplicationRequest, PatchedGroupRequest, PatchedTenantRequest, PatchedTokenRequest, PatchedUserRequest, PolicyTestResult, SessionUser, Tenant, TenantRequest, Token, TokenRequest, TokenSetKeyRequest, TokenView, UsedBy, User, UserAccountRequest, UserConsent, UserMetrics, UserPasswordSetRequest, UserPath, UserRequest, UserServiceAccountRequest, UserServiceAccountResponse } from '../models';
14
14
  export interface CoreApplicationsCheckAccessRetrieveRequest {
15
15
  slug: string;
16
16
  forUser?: number;
@@ -78,6 +78,10 @@ export interface CoreAuthenticatedSessionsRetrieveRequest {
78
78
  export interface CoreAuthenticatedSessionsUsedByListRequest {
79
79
  uuid: string;
80
80
  }
81
+ export interface CoreGroupsAddUserCreateRequest {
82
+ groupUuid: string;
83
+ userAccountRequest: UserAccountRequest;
84
+ }
81
85
  export interface CoreGroupsCreateRequest {
82
86
  groupRequest: GroupRequest;
83
87
  }
@@ -99,6 +103,10 @@ export interface CoreGroupsPartialUpdateRequest {
99
103
  groupUuid: string;
100
104
  patchedGroupRequest?: PatchedGroupRequest;
101
105
  }
106
+ export interface CoreGroupsRemoveUserCreateRequest {
107
+ groupUuid: string;
108
+ userAccountRequest: UserAccountRequest;
109
+ }
102
110
  export interface CoreGroupsRetrieveRequest {
103
111
  groupUuid: string;
104
112
  }
@@ -387,6 +395,14 @@ export declare class CoreApi extends runtime.BaseAPI {
387
395
  * Get a list of all objects that use this object
388
396
  */
389
397
  coreAuthenticatedSessionsUsedByList(requestParameters: CoreAuthenticatedSessionsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<Array<UsedBy>>;
398
+ /**
399
+ * Add user to group
400
+ */
401
+ coreGroupsAddUserCreateRaw(requestParameters: CoreGroupsAddUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>>;
402
+ /**
403
+ * Add user to group
404
+ */
405
+ coreGroupsAddUserCreate(requestParameters: CoreGroupsAddUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void>;
390
406
  /**
391
407
  * Group Viewset
392
408
  */
@@ -419,6 +435,14 @@ export declare class CoreApi extends runtime.BaseAPI {
419
435
  * Group Viewset
420
436
  */
421
437
  coreGroupsPartialUpdate(requestParameters: CoreGroupsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<Group>;
438
+ /**
439
+ * Add user to group
440
+ */
441
+ coreGroupsRemoveUserCreateRaw(requestParameters: CoreGroupsRemoveUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>>;
442
+ /**
443
+ * Add user to group
444
+ */
445
+ coreGroupsRemoveUserCreate(requestParameters: CoreGroupsRemoveUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void>;
422
446
  /**
423
447
  * Group Viewset
424
448
  */
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { ApplicationFromJSON, ApplicationRequestToJSON, AuthenticatedSessionFromJSON, CoordinateFromJSON, CurrentTenantFromJSON, FilePathRequestToJSON, GroupFromJSON, GroupRequestToJSON, LinkFromJSON, PaginatedApplicationListFromJSON, PaginatedAuthenticatedSessionListFromJSON, PaginatedGroupListFromJSON, PaginatedTenantListFromJSON, PaginatedTokenListFromJSON, PaginatedUserConsentListFromJSON, PaginatedUserListFromJSON, PatchedApplicationRequestToJSON, PatchedGroupRequestToJSON, PatchedTenantRequestToJSON, PatchedTokenRequestToJSON, PatchedUserRequestToJSON, PolicyTestResultFromJSON, SessionUserFromJSON, TenantFromJSON, TenantRequestToJSON, TokenFromJSON, TokenRequestToJSON, TokenSetKeyRequestToJSON, TokenViewFromJSON, UsedByFromJSON, UserFromJSON, UserConsentFromJSON, UserMetricsFromJSON, UserPasswordSetRequestToJSON, UserPathFromJSON, UserRequestToJSON, UserServiceAccountRequestToJSON, UserServiceAccountResponseFromJSON, } from '../models';
24
+ import { ApplicationFromJSON, ApplicationRequestToJSON, AuthenticatedSessionFromJSON, CoordinateFromJSON, CurrentTenantFromJSON, FilePathRequestToJSON, GroupFromJSON, GroupRequestToJSON, LinkFromJSON, PaginatedApplicationListFromJSON, PaginatedAuthenticatedSessionListFromJSON, PaginatedGroupListFromJSON, PaginatedTenantListFromJSON, PaginatedTokenListFromJSON, PaginatedUserConsentListFromJSON, PaginatedUserListFromJSON, PatchedApplicationRequestToJSON, PatchedGroupRequestToJSON, PatchedTenantRequestToJSON, PatchedTokenRequestToJSON, PatchedUserRequestToJSON, PolicyTestResultFromJSON, SessionUserFromJSON, TenantFromJSON, TenantRequestToJSON, TokenFromJSON, TokenRequestToJSON, TokenSetKeyRequestToJSON, TokenViewFromJSON, UsedByFromJSON, UserFromJSON, UserAccountRequestToJSON, UserConsentFromJSON, UserMetricsFromJSON, UserPasswordSetRequestToJSON, UserPathFromJSON, UserRequestToJSON, UserServiceAccountRequestToJSON, UserServiceAccountResponseFromJSON, } from '../models';
25
25
  /**
26
26
  *
27
27
  */
@@ -574,6 +574,41 @@ export class CoreApi extends runtime.BaseAPI {
574
574
  return yield response.value();
575
575
  });
576
576
  }
577
+ /**
578
+ * Add user to group
579
+ */
580
+ coreGroupsAddUserCreateRaw(requestParameters, initOverrides) {
581
+ return __awaiter(this, void 0, void 0, function* () {
582
+ if (requestParameters.groupUuid === null || requestParameters.groupUuid === undefined) {
583
+ throw new runtime.RequiredError('groupUuid', 'Required parameter requestParameters.groupUuid was null or undefined when calling coreGroupsAddUserCreate.');
584
+ }
585
+ if (requestParameters.userAccountRequest === null || requestParameters.userAccountRequest === undefined) {
586
+ throw new runtime.RequiredError('userAccountRequest', 'Required parameter requestParameters.userAccountRequest was null or undefined when calling coreGroupsAddUserCreate.');
587
+ }
588
+ const queryParameters = {};
589
+ const headerParameters = {};
590
+ headerParameters['Content-Type'] = 'application/json';
591
+ if (this.configuration && this.configuration.apiKey) {
592
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
593
+ }
594
+ const response = yield this.request({
595
+ path: `/core/groups/{group_uuid}/add_user/`.replace(`{${"group_uuid"}}`, encodeURIComponent(String(requestParameters.groupUuid))),
596
+ method: 'POST',
597
+ headers: headerParameters,
598
+ query: queryParameters,
599
+ body: UserAccountRequestToJSON(requestParameters.userAccountRequest),
600
+ }, initOverrides);
601
+ return new runtime.VoidApiResponse(response);
602
+ });
603
+ }
604
+ /**
605
+ * Add user to group
606
+ */
607
+ coreGroupsAddUserCreate(requestParameters, initOverrides) {
608
+ return __awaiter(this, void 0, void 0, function* () {
609
+ yield this.coreGroupsAddUserCreateRaw(requestParameters, initOverrides);
610
+ });
611
+ }
577
612
  /**
578
613
  * Group Viewset
579
614
  */
@@ -725,6 +760,41 @@ export class CoreApi extends runtime.BaseAPI {
725
760
  return yield response.value();
726
761
  });
727
762
  }
763
+ /**
764
+ * Add user to group
765
+ */
766
+ coreGroupsRemoveUserCreateRaw(requestParameters, initOverrides) {
767
+ return __awaiter(this, void 0, void 0, function* () {
768
+ if (requestParameters.groupUuid === null || requestParameters.groupUuid === undefined) {
769
+ throw new runtime.RequiredError('groupUuid', 'Required parameter requestParameters.groupUuid was null or undefined when calling coreGroupsRemoveUserCreate.');
770
+ }
771
+ if (requestParameters.userAccountRequest === null || requestParameters.userAccountRequest === undefined) {
772
+ throw new runtime.RequiredError('userAccountRequest', 'Required parameter requestParameters.userAccountRequest was null or undefined when calling coreGroupsRemoveUserCreate.');
773
+ }
774
+ const queryParameters = {};
775
+ const headerParameters = {};
776
+ headerParameters['Content-Type'] = 'application/json';
777
+ if (this.configuration && this.configuration.apiKey) {
778
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
779
+ }
780
+ const response = yield this.request({
781
+ path: `/core/groups/{group_uuid}/remove_user/`.replace(`{${"group_uuid"}}`, encodeURIComponent(String(requestParameters.groupUuid))),
782
+ method: 'POST',
783
+ headers: headerParameters,
784
+ query: queryParameters,
785
+ body: UserAccountRequestToJSON(requestParameters.userAccountRequest),
786
+ }, initOverrides);
787
+ return new runtime.VoidApiResponse(response);
788
+ });
789
+ }
790
+ /**
791
+ * Add user to group
792
+ */
793
+ coreGroupsRemoveUserCreate(requestParameters, initOverrides) {
794
+ return __awaiter(this, void 0, void 0, function* () {
795
+ yield this.coreGroupsRemoveUserCreateRaw(requestParameters, initOverrides);
796
+ });
797
+ }
728
798
  /**
729
799
  * Group Viewset
730
800
  */
@@ -0,0 +1,27 @@
1
+ /**
2
+ * authentik
3
+ * Making authentication simple.
4
+ *
5
+ * The version of the OpenAPI document: 2022.11.4
6
+ * Contact: hello@goauthentik.io
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface UserAccountRequest
16
+ */
17
+ export interface UserAccountRequest {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof UserAccountRequest
22
+ */
23
+ pk: number;
24
+ }
25
+ export declare function UserAccountRequestFromJSON(json: any): UserAccountRequest;
26
+ export declare function UserAccountRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserAccountRequest;
27
+ export declare function UserAccountRequestToJSON(value?: UserAccountRequest | null): any;
@@ -0,0 +1,35 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * authentik
5
+ * Making authentication simple.
6
+ *
7
+ * The version of the OpenAPI document: 2022.11.4
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
+ export function UserAccountRequestFromJSON(json) {
15
+ return UserAccountRequestFromJSONTyped(json, false);
16
+ }
17
+ export function UserAccountRequestFromJSONTyped(json, ignoreDiscriminator) {
18
+ if ((json === undefined) || (json === null)) {
19
+ return json;
20
+ }
21
+ return {
22
+ 'pk': json['pk'],
23
+ };
24
+ }
25
+ export function UserAccountRequestToJSON(value) {
26
+ if (value === undefined) {
27
+ return undefined;
28
+ }
29
+ if (value === null) {
30
+ return null;
31
+ }
32
+ return {
33
+ 'pk': value.pk,
34
+ };
35
+ }
@@ -434,6 +434,7 @@ export * from './TypeCreate';
434
434
  export * from './UsedBy';
435
435
  export * from './UsedByActionEnum';
436
436
  export * from './User';
437
+ export * from './UserAccountRequest';
437
438
  export * from './UserConsent';
438
439
  export * from './UserDeleteStage';
439
440
  export * from './UserDeleteStageRequest';
@@ -436,6 +436,7 @@ export * from './TypeCreate';
436
436
  export * from './UsedBy';
437
437
  export * from './UsedByActionEnum';
438
438
  export * from './User';
439
+ export * from './UserAccountRequest';
439
440
  export * from './UserConsent';
440
441
  export * from './UserDeleteStage';
441
442
  export * from './UserDeleteStageRequest';
@@ -0,0 +1,27 @@
1
+ /**
2
+ * authentik
3
+ * Making authentication simple.
4
+ *
5
+ * The version of the OpenAPI document: 2022.11.4
6
+ * Contact: hello@goauthentik.io
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface UserAccountRequest
16
+ */
17
+ export interface UserAccountRequest {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof UserAccountRequest
22
+ */
23
+ pk: number;
24
+ }
25
+ export declare function UserAccountRequestFromJSON(json: any): UserAccountRequest;
26
+ export declare function UserAccountRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserAccountRequest;
27
+ export declare function UserAccountRequestToJSON(value?: UserAccountRequest | null): any;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * authentik
6
+ * Making authentication simple.
7
+ *
8
+ * The version of the OpenAPI document: 2022.11.4
9
+ * Contact: hello@goauthentik.io
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.UserAccountRequestToJSON = exports.UserAccountRequestFromJSONTyped = exports.UserAccountRequestFromJSON = void 0;
17
+ function UserAccountRequestFromJSON(json) {
18
+ return UserAccountRequestFromJSONTyped(json, false);
19
+ }
20
+ exports.UserAccountRequestFromJSON = UserAccountRequestFromJSON;
21
+ function UserAccountRequestFromJSONTyped(json, ignoreDiscriminator) {
22
+ if ((json === undefined) || (json === null)) {
23
+ return json;
24
+ }
25
+ return {
26
+ 'pk': json['pk'],
27
+ };
28
+ }
29
+ exports.UserAccountRequestFromJSONTyped = UserAccountRequestFromJSONTyped;
30
+ function UserAccountRequestToJSON(value) {
31
+ if (value === undefined) {
32
+ return undefined;
33
+ }
34
+ if (value === null) {
35
+ return null;
36
+ }
37
+ return {
38
+ 'pk': value.pk,
39
+ };
40
+ }
41
+ exports.UserAccountRequestToJSON = UserAccountRequestToJSON;
@@ -434,6 +434,7 @@ export * from './TypeCreate';
434
434
  export * from './UsedBy';
435
435
  export * from './UsedByActionEnum';
436
436
  export * from './User';
437
+ export * from './UserAccountRequest';
437
438
  export * from './UserConsent';
438
439
  export * from './UserDeleteStage';
439
440
  export * from './UserDeleteStageRequest';
@@ -452,6 +452,7 @@ __exportStar(require("./TypeCreate"), exports);
452
452
  __exportStar(require("./UsedBy"), exports);
453
453
  __exportStar(require("./UsedByActionEnum"), exports);
454
454
  __exportStar(require("./User"), exports);
455
+ __exportStar(require("./UserAccountRequest"), exports);
455
456
  __exportStar(require("./UserConsent"), exports);
456
457
  __exportStar(require("./UserDeleteStage"), exports);
457
458
  __exportStar(require("./UserDeleteStageRequest"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goauthentik/api",
3
- "version": "2022.11.4-1671976031",
3
+ "version": "2022.11.4-1672221153",
4
4
  "description": "OpenAPI client for @goauthentik/api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -111,6 +111,9 @@ import {
111
111
  User,
112
112
  UserFromJSON,
113
113
  UserToJSON,
114
+ UserAccountRequest,
115
+ UserAccountRequestFromJSON,
116
+ UserAccountRequestToJSON,
114
117
  UserConsent,
115
118
  UserConsentFromJSON,
116
119
  UserConsentToJSON,
@@ -219,6 +222,11 @@ export interface CoreAuthenticatedSessionsUsedByListRequest {
219
222
  uuid: string;
220
223
  }
221
224
 
225
+ export interface CoreGroupsAddUserCreateRequest {
226
+ groupUuid: string;
227
+ userAccountRequest: UserAccountRequest;
228
+ }
229
+
222
230
  export interface CoreGroupsCreateRequest {
223
231
  groupRequest: GroupRequest;
224
232
  }
@@ -244,6 +252,11 @@ export interface CoreGroupsPartialUpdateRequest {
244
252
  patchedGroupRequest?: PatchedGroupRequest;
245
253
  }
246
254
 
255
+ export interface CoreGroupsRemoveUserCreateRequest {
256
+ groupUuid: string;
257
+ userAccountRequest: UserAccountRequest;
258
+ }
259
+
247
260
  export interface CoreGroupsRetrieveRequest {
248
261
  groupUuid: string;
249
262
  }
@@ -1068,6 +1081,46 @@ export class CoreApi extends runtime.BaseAPI {
1068
1081
  return await response.value();
1069
1082
  }
1070
1083
 
1084
+ /**
1085
+ * Add user to group
1086
+ */
1087
+ async coreGroupsAddUserCreateRaw(requestParameters: CoreGroupsAddUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>> {
1088
+ if (requestParameters.groupUuid === null || requestParameters.groupUuid === undefined) {
1089
+ throw new runtime.RequiredError('groupUuid','Required parameter requestParameters.groupUuid was null or undefined when calling coreGroupsAddUserCreate.');
1090
+ }
1091
+
1092
+ if (requestParameters.userAccountRequest === null || requestParameters.userAccountRequest === undefined) {
1093
+ throw new runtime.RequiredError('userAccountRequest','Required parameter requestParameters.userAccountRequest was null or undefined when calling coreGroupsAddUserCreate.');
1094
+ }
1095
+
1096
+ const queryParameters: any = {};
1097
+
1098
+ const headerParameters: runtime.HTTPHeaders = {};
1099
+
1100
+ headerParameters['Content-Type'] = 'application/json';
1101
+
1102
+ if (this.configuration && this.configuration.apiKey) {
1103
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1104
+ }
1105
+
1106
+ const response = await this.request({
1107
+ path: `/core/groups/{group_uuid}/add_user/`.replace(`{${"group_uuid"}}`, encodeURIComponent(String(requestParameters.groupUuid))),
1108
+ method: 'POST',
1109
+ headers: headerParameters,
1110
+ query: queryParameters,
1111
+ body: UserAccountRequestToJSON(requestParameters.userAccountRequest),
1112
+ }, initOverrides);
1113
+
1114
+ return new runtime.VoidApiResponse(response);
1115
+ }
1116
+
1117
+ /**
1118
+ * Add user to group
1119
+ */
1120
+ async coreGroupsAddUserCreate(requestParameters: CoreGroupsAddUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void> {
1121
+ await this.coreGroupsAddUserCreateRaw(requestParameters, initOverrides);
1122
+ }
1123
+
1071
1124
  /**
1072
1125
  * Group Viewset
1073
1126
  */
@@ -1241,6 +1294,46 @@ export class CoreApi extends runtime.BaseAPI {
1241
1294
  return await response.value();
1242
1295
  }
1243
1296
 
1297
+ /**
1298
+ * Add user to group
1299
+ */
1300
+ async coreGroupsRemoveUserCreateRaw(requestParameters: CoreGroupsRemoveUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>> {
1301
+ if (requestParameters.groupUuid === null || requestParameters.groupUuid === undefined) {
1302
+ throw new runtime.RequiredError('groupUuid','Required parameter requestParameters.groupUuid was null or undefined when calling coreGroupsRemoveUserCreate.');
1303
+ }
1304
+
1305
+ if (requestParameters.userAccountRequest === null || requestParameters.userAccountRequest === undefined) {
1306
+ throw new runtime.RequiredError('userAccountRequest','Required parameter requestParameters.userAccountRequest was null or undefined when calling coreGroupsRemoveUserCreate.');
1307
+ }
1308
+
1309
+ const queryParameters: any = {};
1310
+
1311
+ const headerParameters: runtime.HTTPHeaders = {};
1312
+
1313
+ headerParameters['Content-Type'] = 'application/json';
1314
+
1315
+ if (this.configuration && this.configuration.apiKey) {
1316
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // authentik authentication
1317
+ }
1318
+
1319
+ const response = await this.request({
1320
+ path: `/core/groups/{group_uuid}/remove_user/`.replace(`{${"group_uuid"}}`, encodeURIComponent(String(requestParameters.groupUuid))),
1321
+ method: 'POST',
1322
+ headers: headerParameters,
1323
+ query: queryParameters,
1324
+ body: UserAccountRequestToJSON(requestParameters.userAccountRequest),
1325
+ }, initOverrides);
1326
+
1327
+ return new runtime.VoidApiResponse(response);
1328
+ }
1329
+
1330
+ /**
1331
+ * Add user to group
1332
+ */
1333
+ async coreGroupsRemoveUserCreate(requestParameters: CoreGroupsRemoveUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void> {
1334
+ await this.coreGroupsRemoveUserCreateRaw(requestParameters, initOverrides);
1335
+ }
1336
+
1244
1337
  /**
1245
1338
  * Group Viewset
1246
1339
  */
@@ -0,0 +1,56 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * authentik
5
+ * Making authentication simple.
6
+ *
7
+ * The version of the OpenAPI document: 2022.11.4
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
+ *
18
+ * @export
19
+ * @interface UserAccountRequest
20
+ */
21
+ export interface UserAccountRequest {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof UserAccountRequest
26
+ */
27
+ pk: number;
28
+ }
29
+
30
+ export function UserAccountRequestFromJSON(json: any): UserAccountRequest {
31
+ return UserAccountRequestFromJSONTyped(json, false);
32
+ }
33
+
34
+ export function UserAccountRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserAccountRequest {
35
+ if ((json === undefined) || (json === null)) {
36
+ return json;
37
+ }
38
+ return {
39
+
40
+ 'pk': json['pk'],
41
+ };
42
+ }
43
+
44
+ export function UserAccountRequestToJSON(value?: UserAccountRequest | null): any {
45
+ if (value === undefined) {
46
+ return undefined;
47
+ }
48
+ if (value === null) {
49
+ return null;
50
+ }
51
+ return {
52
+
53
+ 'pk': value.pk,
54
+ };
55
+ }
56
+
@@ -436,6 +436,7 @@ export * from './TypeCreate';
436
436
  export * from './UsedBy';
437
437
  export * from './UsedByActionEnum';
438
438
  export * from './User';
439
+ export * from './UserAccountRequest';
439
440
  export * from './UserConsent';
440
441
  export * from './UserDeleteStage';
441
442
  export * from './UserDeleteStageRequest';