@goauthentik/api 2024.10.5-1734524927 → 2024.10.5-1734636687
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 +4 -0
- package/dist/apis/CoreApi.d.ts +86 -1
- package/dist/apis/CoreApi.js +271 -0
- package/dist/apis/RbacApi.d.ts +2 -0
- package/dist/apis/RbacApi.js +2 -0
- package/dist/esm/apis/CoreApi.d.ts +86 -1
- package/dist/esm/apis/CoreApi.js +272 -1
- package/dist/esm/apis/RbacApi.d.ts +2 -0
- package/dist/esm/apis/RbacApi.js +2 -0
- package/dist/esm/models/ApplicationEntitlement.d.ts +49 -0
- package/dist/esm/models/ApplicationEntitlement.js +51 -0
- package/dist/esm/models/ApplicationEntitlementRequest.d.ts +43 -0
- package/dist/esm/models/ApplicationEntitlementRequest.js +49 -0
- package/dist/esm/models/IdentificationChallenge.d.ts +1 -1
- package/dist/esm/models/ModelEnum.d.ts +1 -0
- package/dist/esm/models/ModelEnum.js +1 -0
- package/dist/esm/models/PaginatedApplicationEntitlementList.d.ts +39 -0
- package/dist/esm/models/PaginatedApplicationEntitlementList.js +48 -0
- package/dist/esm/models/PatchedApplicationEntitlementRequest.d.ts +43 -0
- package/dist/esm/models/PatchedApplicationEntitlementRequest.js +47 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/ApplicationEntitlement.d.ts +49 -0
- package/dist/models/ApplicationEntitlement.js +58 -0
- package/dist/models/ApplicationEntitlementRequest.d.ts +43 -0
- package/dist/models/ApplicationEntitlementRequest.js +56 -0
- package/dist/models/IdentificationChallenge.d.ts +1 -1
- package/dist/models/ModelEnum.d.ts +1 -0
- package/dist/models/ModelEnum.js +1 -0
- package/dist/models/PaginatedApplicationEntitlementList.d.ts +39 -0
- package/dist/models/PaginatedApplicationEntitlementList.js +55 -0
- package/dist/models/PatchedApplicationEntitlementRequest.d.ts +43 -0
- package/dist/models/PatchedApplicationEntitlementRequest.js +54 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
- package/src/apis/CoreApi.ts +350 -0
- package/src/apis/RbacApi.ts +2 -0
- package/src/models/ApplicationEntitlement.ts +91 -0
- package/src/models/ApplicationEntitlementRequest.ts +83 -0
- package/src/models/IdentificationChallenge.ts +1 -1
- package/src/models/ModelEnum.ts +1 -0
- package/src/models/PaginatedApplicationEntitlementList.ts +88 -0
- package/src/models/PatchedApplicationEntitlementRequest.ts +81 -0
- package/src/models/index.ts +4 -0
package/src/apis/CoreApi.ts
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
Application,
|
|
19
|
+
ApplicationEntitlement,
|
|
20
|
+
ApplicationEntitlementRequest,
|
|
19
21
|
ApplicationRequest,
|
|
20
22
|
AuthenticatedSession,
|
|
21
23
|
Brand,
|
|
@@ -28,6 +30,7 @@ import type {
|
|
|
28
30
|
GroupRequest,
|
|
29
31
|
ImpersonationRequest,
|
|
30
32
|
Link,
|
|
33
|
+
PaginatedApplicationEntitlementList,
|
|
31
34
|
PaginatedApplicationList,
|
|
32
35
|
PaginatedAuthenticatedSessionList,
|
|
33
36
|
PaginatedBrandList,
|
|
@@ -35,6 +38,7 @@ import type {
|
|
|
35
38
|
PaginatedTokenList,
|
|
36
39
|
PaginatedUserConsentList,
|
|
37
40
|
PaginatedUserList,
|
|
41
|
+
PatchedApplicationEntitlementRequest,
|
|
38
42
|
PatchedApplicationRequest,
|
|
39
43
|
PatchedBrandRequest,
|
|
40
44
|
PatchedGroupRequest,
|
|
@@ -63,6 +67,10 @@ import type {
|
|
|
63
67
|
import {
|
|
64
68
|
ApplicationFromJSON,
|
|
65
69
|
ApplicationToJSON,
|
|
70
|
+
ApplicationEntitlementFromJSON,
|
|
71
|
+
ApplicationEntitlementToJSON,
|
|
72
|
+
ApplicationEntitlementRequestFromJSON,
|
|
73
|
+
ApplicationEntitlementRequestToJSON,
|
|
66
74
|
ApplicationRequestFromJSON,
|
|
67
75
|
ApplicationRequestToJSON,
|
|
68
76
|
AuthenticatedSessionFromJSON,
|
|
@@ -87,6 +95,8 @@ import {
|
|
|
87
95
|
ImpersonationRequestToJSON,
|
|
88
96
|
LinkFromJSON,
|
|
89
97
|
LinkToJSON,
|
|
98
|
+
PaginatedApplicationEntitlementListFromJSON,
|
|
99
|
+
PaginatedApplicationEntitlementListToJSON,
|
|
90
100
|
PaginatedApplicationListFromJSON,
|
|
91
101
|
PaginatedApplicationListToJSON,
|
|
92
102
|
PaginatedAuthenticatedSessionListFromJSON,
|
|
@@ -101,6 +111,8 @@ import {
|
|
|
101
111
|
PaginatedUserConsentListToJSON,
|
|
102
112
|
PaginatedUserListFromJSON,
|
|
103
113
|
PaginatedUserListToJSON,
|
|
114
|
+
PatchedApplicationEntitlementRequestFromJSON,
|
|
115
|
+
PatchedApplicationEntitlementRequestToJSON,
|
|
104
116
|
PatchedApplicationRequestFromJSON,
|
|
105
117
|
PatchedApplicationRequestToJSON,
|
|
106
118
|
PatchedBrandRequestFromJSON,
|
|
@@ -151,6 +163,42 @@ import {
|
|
|
151
163
|
ValidationErrorToJSON,
|
|
152
164
|
} from '../models';
|
|
153
165
|
|
|
166
|
+
export interface CoreApplicationEntitlementsCreateRequest {
|
|
167
|
+
applicationEntitlementRequest: ApplicationEntitlementRequest;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface CoreApplicationEntitlementsDestroyRequest {
|
|
171
|
+
pbmUuid: string;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface CoreApplicationEntitlementsListRequest {
|
|
175
|
+
app?: string;
|
|
176
|
+
name?: string;
|
|
177
|
+
ordering?: string;
|
|
178
|
+
page?: number;
|
|
179
|
+
pageSize?: number;
|
|
180
|
+
pbmUuid?: string;
|
|
181
|
+
search?: string;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export interface CoreApplicationEntitlementsPartialUpdateRequest {
|
|
185
|
+
pbmUuid: string;
|
|
186
|
+
patchedApplicationEntitlementRequest?: PatchedApplicationEntitlementRequest;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface CoreApplicationEntitlementsRetrieveRequest {
|
|
190
|
+
pbmUuid: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface CoreApplicationEntitlementsUpdateRequest {
|
|
194
|
+
pbmUuid: string;
|
|
195
|
+
applicationEntitlementRequest: ApplicationEntitlementRequest;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export interface CoreApplicationEntitlementsUsedByListRequest {
|
|
199
|
+
pbmUuid: string;
|
|
200
|
+
}
|
|
201
|
+
|
|
154
202
|
export interface CoreApplicationsCheckAccessRetrieveRequest {
|
|
155
203
|
slug: string;
|
|
156
204
|
forUser?: number;
|
|
@@ -487,6 +535,308 @@ export interface CoreUsersUsedByListRequest {
|
|
|
487
535
|
*/
|
|
488
536
|
export class CoreApi extends runtime.BaseAPI {
|
|
489
537
|
|
|
538
|
+
/**
|
|
539
|
+
* ApplicationEntitlement Viewset
|
|
540
|
+
*/
|
|
541
|
+
async coreApplicationEntitlementsCreateRaw(requestParameters: CoreApplicationEntitlementsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationEntitlement>> {
|
|
542
|
+
if (requestParameters.applicationEntitlementRequest === null || requestParameters.applicationEntitlementRequest === undefined) {
|
|
543
|
+
throw new runtime.RequiredError('applicationEntitlementRequest','Required parameter requestParameters.applicationEntitlementRequest was null or undefined when calling coreApplicationEntitlementsCreate.');
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
const queryParameters: any = {};
|
|
547
|
+
|
|
548
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
549
|
+
|
|
550
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
551
|
+
|
|
552
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
553
|
+
const token = this.configuration.accessToken;
|
|
554
|
+
const tokenString = await token("authentik", []);
|
|
555
|
+
|
|
556
|
+
if (tokenString) {
|
|
557
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
const response = await this.request({
|
|
561
|
+
path: `/core/application_entitlements/`,
|
|
562
|
+
method: 'POST',
|
|
563
|
+
headers: headerParameters,
|
|
564
|
+
query: queryParameters,
|
|
565
|
+
body: ApplicationEntitlementRequestToJSON(requestParameters.applicationEntitlementRequest),
|
|
566
|
+
}, initOverrides);
|
|
567
|
+
|
|
568
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationEntitlementFromJSON(jsonValue));
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* ApplicationEntitlement Viewset
|
|
573
|
+
*/
|
|
574
|
+
async coreApplicationEntitlementsCreate(requestParameters: CoreApplicationEntitlementsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationEntitlement> {
|
|
575
|
+
const response = await this.coreApplicationEntitlementsCreateRaw(requestParameters, initOverrides);
|
|
576
|
+
return await response.value();
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* ApplicationEntitlement Viewset
|
|
581
|
+
*/
|
|
582
|
+
async coreApplicationEntitlementsDestroyRaw(requestParameters: CoreApplicationEntitlementsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
583
|
+
if (requestParameters.pbmUuid === null || requestParameters.pbmUuid === undefined) {
|
|
584
|
+
throw new runtime.RequiredError('pbmUuid','Required parameter requestParameters.pbmUuid was null or undefined when calling coreApplicationEntitlementsDestroy.');
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
const queryParameters: any = {};
|
|
588
|
+
|
|
589
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
590
|
+
|
|
591
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
592
|
+
const token = this.configuration.accessToken;
|
|
593
|
+
const tokenString = await token("authentik", []);
|
|
594
|
+
|
|
595
|
+
if (tokenString) {
|
|
596
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
const response = await this.request({
|
|
600
|
+
path: `/core/application_entitlements/{pbm_uuid}/`.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters.pbmUuid))),
|
|
601
|
+
method: 'DELETE',
|
|
602
|
+
headers: headerParameters,
|
|
603
|
+
query: queryParameters,
|
|
604
|
+
}, initOverrides);
|
|
605
|
+
|
|
606
|
+
return new runtime.VoidApiResponse(response);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* ApplicationEntitlement Viewset
|
|
611
|
+
*/
|
|
612
|
+
async coreApplicationEntitlementsDestroy(requestParameters: CoreApplicationEntitlementsDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
613
|
+
await this.coreApplicationEntitlementsDestroyRaw(requestParameters, initOverrides);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* ApplicationEntitlement Viewset
|
|
618
|
+
*/
|
|
619
|
+
async coreApplicationEntitlementsListRaw(requestParameters: CoreApplicationEntitlementsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedApplicationEntitlementList>> {
|
|
620
|
+
const queryParameters: any = {};
|
|
621
|
+
|
|
622
|
+
if (requestParameters.app !== undefined) {
|
|
623
|
+
queryParameters['app'] = requestParameters.app;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
if (requestParameters.name !== undefined) {
|
|
627
|
+
queryParameters['name'] = requestParameters.name;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
if (requestParameters.ordering !== undefined) {
|
|
631
|
+
queryParameters['ordering'] = requestParameters.ordering;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
if (requestParameters.page !== undefined) {
|
|
635
|
+
queryParameters['page'] = requestParameters.page;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
if (requestParameters.pageSize !== undefined) {
|
|
639
|
+
queryParameters['page_size'] = requestParameters.pageSize;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
if (requestParameters.pbmUuid !== undefined) {
|
|
643
|
+
queryParameters['pbm_uuid'] = requestParameters.pbmUuid;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
if (requestParameters.search !== undefined) {
|
|
647
|
+
queryParameters['search'] = requestParameters.search;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
651
|
+
|
|
652
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
653
|
+
const token = this.configuration.accessToken;
|
|
654
|
+
const tokenString = await token("authentik", []);
|
|
655
|
+
|
|
656
|
+
if (tokenString) {
|
|
657
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
const response = await this.request({
|
|
661
|
+
path: `/core/application_entitlements/`,
|
|
662
|
+
method: 'GET',
|
|
663
|
+
headers: headerParameters,
|
|
664
|
+
query: queryParameters,
|
|
665
|
+
}, initOverrides);
|
|
666
|
+
|
|
667
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedApplicationEntitlementListFromJSON(jsonValue));
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* ApplicationEntitlement Viewset
|
|
672
|
+
*/
|
|
673
|
+
async coreApplicationEntitlementsList(requestParameters: CoreApplicationEntitlementsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedApplicationEntitlementList> {
|
|
674
|
+
const response = await this.coreApplicationEntitlementsListRaw(requestParameters, initOverrides);
|
|
675
|
+
return await response.value();
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* ApplicationEntitlement Viewset
|
|
680
|
+
*/
|
|
681
|
+
async coreApplicationEntitlementsPartialUpdateRaw(requestParameters: CoreApplicationEntitlementsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationEntitlement>> {
|
|
682
|
+
if (requestParameters.pbmUuid === null || requestParameters.pbmUuid === undefined) {
|
|
683
|
+
throw new runtime.RequiredError('pbmUuid','Required parameter requestParameters.pbmUuid was null or undefined when calling coreApplicationEntitlementsPartialUpdate.');
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
const queryParameters: any = {};
|
|
687
|
+
|
|
688
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
689
|
+
|
|
690
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
691
|
+
|
|
692
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
693
|
+
const token = this.configuration.accessToken;
|
|
694
|
+
const tokenString = await token("authentik", []);
|
|
695
|
+
|
|
696
|
+
if (tokenString) {
|
|
697
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
const response = await this.request({
|
|
701
|
+
path: `/core/application_entitlements/{pbm_uuid}/`.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters.pbmUuid))),
|
|
702
|
+
method: 'PATCH',
|
|
703
|
+
headers: headerParameters,
|
|
704
|
+
query: queryParameters,
|
|
705
|
+
body: PatchedApplicationEntitlementRequestToJSON(requestParameters.patchedApplicationEntitlementRequest),
|
|
706
|
+
}, initOverrides);
|
|
707
|
+
|
|
708
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationEntitlementFromJSON(jsonValue));
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* ApplicationEntitlement Viewset
|
|
713
|
+
*/
|
|
714
|
+
async coreApplicationEntitlementsPartialUpdate(requestParameters: CoreApplicationEntitlementsPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationEntitlement> {
|
|
715
|
+
const response = await this.coreApplicationEntitlementsPartialUpdateRaw(requestParameters, initOverrides);
|
|
716
|
+
return await response.value();
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* ApplicationEntitlement Viewset
|
|
721
|
+
*/
|
|
722
|
+
async coreApplicationEntitlementsRetrieveRaw(requestParameters: CoreApplicationEntitlementsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationEntitlement>> {
|
|
723
|
+
if (requestParameters.pbmUuid === null || requestParameters.pbmUuid === undefined) {
|
|
724
|
+
throw new runtime.RequiredError('pbmUuid','Required parameter requestParameters.pbmUuid was null or undefined when calling coreApplicationEntitlementsRetrieve.');
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
const queryParameters: any = {};
|
|
728
|
+
|
|
729
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
730
|
+
|
|
731
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
732
|
+
const token = this.configuration.accessToken;
|
|
733
|
+
const tokenString = await token("authentik", []);
|
|
734
|
+
|
|
735
|
+
if (tokenString) {
|
|
736
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
const response = await this.request({
|
|
740
|
+
path: `/core/application_entitlements/{pbm_uuid}/`.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters.pbmUuid))),
|
|
741
|
+
method: 'GET',
|
|
742
|
+
headers: headerParameters,
|
|
743
|
+
query: queryParameters,
|
|
744
|
+
}, initOverrides);
|
|
745
|
+
|
|
746
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationEntitlementFromJSON(jsonValue));
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* ApplicationEntitlement Viewset
|
|
751
|
+
*/
|
|
752
|
+
async coreApplicationEntitlementsRetrieve(requestParameters: CoreApplicationEntitlementsRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationEntitlement> {
|
|
753
|
+
const response = await this.coreApplicationEntitlementsRetrieveRaw(requestParameters, initOverrides);
|
|
754
|
+
return await response.value();
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* ApplicationEntitlement Viewset
|
|
759
|
+
*/
|
|
760
|
+
async coreApplicationEntitlementsUpdateRaw(requestParameters: CoreApplicationEntitlementsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplicationEntitlement>> {
|
|
761
|
+
if (requestParameters.pbmUuid === null || requestParameters.pbmUuid === undefined) {
|
|
762
|
+
throw new runtime.RequiredError('pbmUuid','Required parameter requestParameters.pbmUuid was null or undefined when calling coreApplicationEntitlementsUpdate.');
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
if (requestParameters.applicationEntitlementRequest === null || requestParameters.applicationEntitlementRequest === undefined) {
|
|
766
|
+
throw new runtime.RequiredError('applicationEntitlementRequest','Required parameter requestParameters.applicationEntitlementRequest was null or undefined when calling coreApplicationEntitlementsUpdate.');
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
const queryParameters: any = {};
|
|
770
|
+
|
|
771
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
772
|
+
|
|
773
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
774
|
+
|
|
775
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
776
|
+
const token = this.configuration.accessToken;
|
|
777
|
+
const tokenString = await token("authentik", []);
|
|
778
|
+
|
|
779
|
+
if (tokenString) {
|
|
780
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
const response = await this.request({
|
|
784
|
+
path: `/core/application_entitlements/{pbm_uuid}/`.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters.pbmUuid))),
|
|
785
|
+
method: 'PUT',
|
|
786
|
+
headers: headerParameters,
|
|
787
|
+
query: queryParameters,
|
|
788
|
+
body: ApplicationEntitlementRequestToJSON(requestParameters.applicationEntitlementRequest),
|
|
789
|
+
}, initOverrides);
|
|
790
|
+
|
|
791
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationEntitlementFromJSON(jsonValue));
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* ApplicationEntitlement Viewset
|
|
796
|
+
*/
|
|
797
|
+
async coreApplicationEntitlementsUpdate(requestParameters: CoreApplicationEntitlementsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplicationEntitlement> {
|
|
798
|
+
const response = await this.coreApplicationEntitlementsUpdateRaw(requestParameters, initOverrides);
|
|
799
|
+
return await response.value();
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* Get a list of all objects that use this object
|
|
804
|
+
*/
|
|
805
|
+
async coreApplicationEntitlementsUsedByListRaw(requestParameters: CoreApplicationEntitlementsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<UsedBy>>> {
|
|
806
|
+
if (requestParameters.pbmUuid === null || requestParameters.pbmUuid === undefined) {
|
|
807
|
+
throw new runtime.RequiredError('pbmUuid','Required parameter requestParameters.pbmUuid was null or undefined when calling coreApplicationEntitlementsUsedByList.');
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
const queryParameters: any = {};
|
|
811
|
+
|
|
812
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
813
|
+
|
|
814
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
815
|
+
const token = this.configuration.accessToken;
|
|
816
|
+
const tokenString = await token("authentik", []);
|
|
817
|
+
|
|
818
|
+
if (tokenString) {
|
|
819
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
const response = await this.request({
|
|
823
|
+
path: `/core/application_entitlements/{pbm_uuid}/used_by/`.replace(`{${"pbm_uuid"}}`, encodeURIComponent(String(requestParameters.pbmUuid))),
|
|
824
|
+
method: 'GET',
|
|
825
|
+
headers: headerParameters,
|
|
826
|
+
query: queryParameters,
|
|
827
|
+
}, initOverrides);
|
|
828
|
+
|
|
829
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON));
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* Get a list of all objects that use this object
|
|
834
|
+
*/
|
|
835
|
+
async coreApplicationEntitlementsUsedByList(requestParameters: CoreApplicationEntitlementsUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<UsedBy>> {
|
|
836
|
+
const response = await this.coreApplicationEntitlementsUsedByListRaw(requestParameters, initOverrides);
|
|
837
|
+
return await response.value();
|
|
838
|
+
}
|
|
839
|
+
|
|
490
840
|
/**
|
|
491
841
|
* Check access to a single application by slug
|
|
492
842
|
*/
|
package/src/apis/RbacApi.ts
CHANGED
|
@@ -1365,6 +1365,7 @@ export const RbacPermissionsAssignedByRolesListModelEnum = {
|
|
|
1365
1365
|
BlueprintsBlueprintinstance: 'authentik_blueprints.blueprintinstance',
|
|
1366
1366
|
BrandsBrand: 'authentik_brands.brand',
|
|
1367
1367
|
CoreApplication: 'authentik_core.application',
|
|
1368
|
+
CoreApplicationentitlement: 'authentik_core.applicationentitlement',
|
|
1368
1369
|
CoreGroup: 'authentik_core.group',
|
|
1369
1370
|
CoreToken: 'authentik_core.token',
|
|
1370
1371
|
CoreUser: 'authentik_core.user',
|
|
@@ -1467,6 +1468,7 @@ export const RbacPermissionsAssignedByUsersListModelEnum = {
|
|
|
1467
1468
|
BlueprintsBlueprintinstance: 'authentik_blueprints.blueprintinstance',
|
|
1468
1469
|
BrandsBrand: 'authentik_brands.brand',
|
|
1469
1470
|
CoreApplication: 'authentik_core.application',
|
|
1471
|
+
CoreApplicationentitlement: 'authentik_core.applicationentitlement',
|
|
1470
1472
|
CoreGroup: 'authentik_core.group',
|
|
1471
1473
|
CoreToken: 'authentik_core.token',
|
|
1472
1474
|
CoreUser: 'authentik_core.user',
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* authentik
|
|
5
|
+
* Making authentication simple.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024.10.5
|
|
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
|
+
* ApplicationEntitlement Serializer
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ApplicationEntitlement
|
|
20
|
+
*/
|
|
21
|
+
export interface ApplicationEntitlement {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ApplicationEntitlement
|
|
26
|
+
*/
|
|
27
|
+
readonly pbmUuid: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ApplicationEntitlement
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof ApplicationEntitlement
|
|
38
|
+
*/
|
|
39
|
+
app: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {any}
|
|
43
|
+
* @memberof ApplicationEntitlement
|
|
44
|
+
*/
|
|
45
|
+
attributes?: any | null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the ApplicationEntitlement interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfApplicationEntitlement(value: object): boolean {
|
|
52
|
+
let isInstance = true;
|
|
53
|
+
isInstance = isInstance && "pbmUuid" in value;
|
|
54
|
+
isInstance = isInstance && "name" in value;
|
|
55
|
+
isInstance = isInstance && "app" in value;
|
|
56
|
+
|
|
57
|
+
return isInstance;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function ApplicationEntitlementFromJSON(json: any): ApplicationEntitlement {
|
|
61
|
+
return ApplicationEntitlementFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function ApplicationEntitlementFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplicationEntitlement {
|
|
65
|
+
if ((json === undefined) || (json === null)) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'pbmUuid': json['pbm_uuid'],
|
|
71
|
+
'name': json['name'],
|
|
72
|
+
'app': json['app'],
|
|
73
|
+
'attributes': !exists(json, 'attributes') ? undefined : json['attributes'],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function ApplicationEntitlementToJSON(value?: ApplicationEntitlement | null): any {
|
|
78
|
+
if (value === undefined) {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
if (value === null) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'name': value.name,
|
|
87
|
+
'app': value.app,
|
|
88
|
+
'attributes': value.attributes,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* authentik
|
|
5
|
+
* Making authentication simple.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024.10.5
|
|
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
|
+
* ApplicationEntitlement Serializer
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ApplicationEntitlementRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface ApplicationEntitlementRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ApplicationEntitlementRequest
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ApplicationEntitlementRequest
|
|
32
|
+
*/
|
|
33
|
+
app: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {any}
|
|
37
|
+
* @memberof ApplicationEntitlementRequest
|
|
38
|
+
*/
|
|
39
|
+
attributes?: any | null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the ApplicationEntitlementRequest interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfApplicationEntitlementRequest(value: object): boolean {
|
|
46
|
+
let isInstance = true;
|
|
47
|
+
isInstance = isInstance && "name" in value;
|
|
48
|
+
isInstance = isInstance && "app" in value;
|
|
49
|
+
|
|
50
|
+
return isInstance;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function ApplicationEntitlementRequestFromJSON(json: any): ApplicationEntitlementRequest {
|
|
54
|
+
return ApplicationEntitlementRequestFromJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function ApplicationEntitlementRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplicationEntitlementRequest {
|
|
58
|
+
if ((json === undefined) || (json === null)) {
|
|
59
|
+
return json;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'name': json['name'],
|
|
64
|
+
'app': json['app'],
|
|
65
|
+
'attributes': !exists(json, 'attributes') ? undefined : json['attributes'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function ApplicationEntitlementRequestToJSON(value?: ApplicationEntitlementRequest | null): any {
|
|
70
|
+
if (value === undefined) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
if (value === null) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'name': value.name,
|
|
79
|
+
'app': value.app,
|
|
80
|
+
'attributes': value.attributes,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
package/src/models/ModelEnum.ts
CHANGED
|
@@ -97,6 +97,7 @@ export const ModelEnum = {
|
|
|
97
97
|
CoreGroup: 'authentik_core.group',
|
|
98
98
|
CoreUser: 'authentik_core.user',
|
|
99
99
|
CoreApplication: 'authentik_core.application',
|
|
100
|
+
CoreApplicationentitlement: 'authentik_core.applicationentitlement',
|
|
100
101
|
CoreToken: 'authentik_core.token',
|
|
101
102
|
EnterpriseLicense: 'authentik_enterprise.license',
|
|
102
103
|
ProvidersGoogleWorkspaceGoogleworkspaceprovider: 'authentik_providers_google_workspace.googleworkspaceprovider',
|