@goauthentik/api 2022.6.3-1656197218 → 2022.6.3-1656258767
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/dist/esm/models/ConsentChallenge.d.ts +7 -1
- package/dist/esm/models/ConsentChallenge.js +3 -1
- package/dist/esm/models/UserConsent.d.ts +6 -0
- package/dist/esm/models/UserConsent.js +2 -0
- package/dist/models/ConsentChallenge.d.ts +7 -1
- package/dist/models/ConsentChallenge.js +3 -1
- package/dist/models/UserConsent.d.ts +6 -0
- package/dist/models/UserConsent.js +2 -0
- package/package.json +1 -1
- package/src/models/ConsentChallenge.ts +10 -2
- package/src/models/UserConsent.ts +8 -0
- package/README.md +0 -38
|
@@ -62,13 +62,19 @@ export interface ConsentChallenge {
|
|
|
62
62
|
* @type {string}
|
|
63
63
|
* @memberof ConsentChallenge
|
|
64
64
|
*/
|
|
65
|
-
headerText
|
|
65
|
+
headerText?: string;
|
|
66
66
|
/**
|
|
67
67
|
*
|
|
68
68
|
* @type {Array<Permission>}
|
|
69
69
|
* @memberof ConsentChallenge
|
|
70
70
|
*/
|
|
71
71
|
permissions: Array<Permission>;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {Array<Permission>}
|
|
75
|
+
* @memberof ConsentChallenge
|
|
76
|
+
*/
|
|
77
|
+
additionalPermissions: Array<Permission>;
|
|
72
78
|
}
|
|
73
79
|
export declare function ConsentChallengeFromJSON(json: any): ConsentChallenge;
|
|
74
80
|
export declare function ConsentChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsentChallenge;
|
|
@@ -29,8 +29,9 @@ export function ConsentChallengeFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
29
29
|
'responseErrors': !exists(json, 'response_errors') ? undefined : json['response_errors'],
|
|
30
30
|
'pendingUser': json['pending_user'],
|
|
31
31
|
'pendingUserAvatar': json['pending_user_avatar'],
|
|
32
|
-
'headerText': json['header_text'],
|
|
32
|
+
'headerText': !exists(json, 'header_text') ? undefined : json['header_text'],
|
|
33
33
|
'permissions': (json['permissions'].map(PermissionFromJSON)),
|
|
34
|
+
'additionalPermissions': (json['additional_permissions'].map(PermissionFromJSON)),
|
|
34
35
|
};
|
|
35
36
|
}
|
|
36
37
|
export function ConsentChallengeToJSON(value) {
|
|
@@ -49,5 +50,6 @@ export function ConsentChallengeToJSON(value) {
|
|
|
49
50
|
'pending_user_avatar': value.pendingUserAvatar,
|
|
50
51
|
'header_text': value.headerText,
|
|
51
52
|
'permissions': (value.permissions.map(PermissionToJSON)),
|
|
53
|
+
'additional_permissions': (value.additionalPermissions.map(PermissionToJSON)),
|
|
52
54
|
};
|
|
53
55
|
}
|
|
@@ -41,6 +41,12 @@ export interface UserConsent {
|
|
|
41
41
|
* @memberof UserConsent
|
|
42
42
|
*/
|
|
43
43
|
application: Application;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof UserConsent
|
|
48
|
+
*/
|
|
49
|
+
permissions?: string;
|
|
44
50
|
}
|
|
45
51
|
export declare function UserConsentFromJSON(json: any): UserConsent;
|
|
46
52
|
export declare function UserConsentFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserConsent;
|
|
@@ -26,6 +26,7 @@ export function UserConsentFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26
26
|
'expires': !exists(json, 'expires') ? undefined : (new Date(json['expires'])),
|
|
27
27
|
'user': UserFromJSON(json['user']),
|
|
28
28
|
'application': ApplicationFromJSON(json['application']),
|
|
29
|
+
'permissions': !exists(json, 'permissions') ? undefined : json['permissions'],
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
32
|
export function UserConsentToJSON(value) {
|
|
@@ -39,5 +40,6 @@ export function UserConsentToJSON(value) {
|
|
|
39
40
|
'expires': value.expires === undefined ? undefined : (value.expires.toISOString()),
|
|
40
41
|
'user': UserToJSON(value.user),
|
|
41
42
|
'application': ApplicationToJSON(value.application),
|
|
43
|
+
'permissions': value.permissions,
|
|
42
44
|
};
|
|
43
45
|
}
|
|
@@ -62,13 +62,19 @@ export interface ConsentChallenge {
|
|
|
62
62
|
* @type {string}
|
|
63
63
|
* @memberof ConsentChallenge
|
|
64
64
|
*/
|
|
65
|
-
headerText
|
|
65
|
+
headerText?: string;
|
|
66
66
|
/**
|
|
67
67
|
*
|
|
68
68
|
* @type {Array<Permission>}
|
|
69
69
|
* @memberof ConsentChallenge
|
|
70
70
|
*/
|
|
71
71
|
permissions: Array<Permission>;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {Array<Permission>}
|
|
75
|
+
* @memberof ConsentChallenge
|
|
76
|
+
*/
|
|
77
|
+
additionalPermissions: Array<Permission>;
|
|
72
78
|
}
|
|
73
79
|
export declare function ConsentChallengeFromJSON(json: any): ConsentChallenge;
|
|
74
80
|
export declare function ConsentChallengeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsentChallenge;
|
|
@@ -33,8 +33,9 @@ function ConsentChallengeFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
33
33
|
'responseErrors': !(0, runtime_1.exists)(json, 'response_errors') ? undefined : json['response_errors'],
|
|
34
34
|
'pendingUser': json['pending_user'],
|
|
35
35
|
'pendingUserAvatar': json['pending_user_avatar'],
|
|
36
|
-
'headerText': json['header_text'],
|
|
36
|
+
'headerText': !(0, runtime_1.exists)(json, 'header_text') ? undefined : json['header_text'],
|
|
37
37
|
'permissions': (json['permissions'].map(Permission_1.PermissionFromJSON)),
|
|
38
|
+
'additionalPermissions': (json['additional_permissions'].map(Permission_1.PermissionFromJSON)),
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
41
|
exports.ConsentChallengeFromJSONTyped = ConsentChallengeFromJSONTyped;
|
|
@@ -54,6 +55,7 @@ function ConsentChallengeToJSON(value) {
|
|
|
54
55
|
'pending_user_avatar': value.pendingUserAvatar,
|
|
55
56
|
'header_text': value.headerText,
|
|
56
57
|
'permissions': (value.permissions.map(Permission_1.PermissionToJSON)),
|
|
58
|
+
'additional_permissions': (value.additionalPermissions.map(Permission_1.PermissionToJSON)),
|
|
57
59
|
};
|
|
58
60
|
}
|
|
59
61
|
exports.ConsentChallengeToJSON = ConsentChallengeToJSON;
|
|
@@ -41,6 +41,12 @@ export interface UserConsent {
|
|
|
41
41
|
* @memberof UserConsent
|
|
42
42
|
*/
|
|
43
43
|
application: Application;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof UserConsent
|
|
48
|
+
*/
|
|
49
|
+
permissions?: string;
|
|
44
50
|
}
|
|
45
51
|
export declare function UserConsentFromJSON(json: any): UserConsent;
|
|
46
52
|
export declare function UserConsentFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserConsent;
|
|
@@ -30,6 +30,7 @@ function UserConsentFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
30
30
|
'expires': !(0, runtime_1.exists)(json, 'expires') ? undefined : (new Date(json['expires'])),
|
|
31
31
|
'user': (0, User_1.UserFromJSON)(json['user']),
|
|
32
32
|
'application': (0, Application_1.ApplicationFromJSON)(json['application']),
|
|
33
|
+
'permissions': !(0, runtime_1.exists)(json, 'permissions') ? undefined : json['permissions'],
|
|
33
34
|
};
|
|
34
35
|
}
|
|
35
36
|
exports.UserConsentFromJSONTyped = UserConsentFromJSONTyped;
|
|
@@ -44,6 +45,7 @@ function UserConsentToJSON(value) {
|
|
|
44
45
|
'expires': value.expires === undefined ? undefined : (value.expires.toISOString()),
|
|
45
46
|
'user': (0, User_1.UserToJSON)(value.user),
|
|
46
47
|
'application': (0, Application_1.ApplicationToJSON)(value.application),
|
|
48
|
+
'permissions': value.permissions,
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
exports.UserConsentToJSON = UserConsentToJSON;
|
package/package.json
CHANGED
|
@@ -85,13 +85,19 @@ export interface ConsentChallenge {
|
|
|
85
85
|
* @type {string}
|
|
86
86
|
* @memberof ConsentChallenge
|
|
87
87
|
*/
|
|
88
|
-
headerText
|
|
88
|
+
headerText?: string;
|
|
89
89
|
/**
|
|
90
90
|
*
|
|
91
91
|
* @type {Array<Permission>}
|
|
92
92
|
* @memberof ConsentChallenge
|
|
93
93
|
*/
|
|
94
94
|
permissions: Array<Permission>;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @type {Array<Permission>}
|
|
98
|
+
* @memberof ConsentChallenge
|
|
99
|
+
*/
|
|
100
|
+
additionalPermissions: Array<Permission>;
|
|
95
101
|
}
|
|
96
102
|
|
|
97
103
|
export function ConsentChallengeFromJSON(json: any): ConsentChallenge {
|
|
@@ -110,8 +116,9 @@ export function ConsentChallengeFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
110
116
|
'responseErrors': !exists(json, 'response_errors') ? undefined : json['response_errors'],
|
|
111
117
|
'pendingUser': json['pending_user'],
|
|
112
118
|
'pendingUserAvatar': json['pending_user_avatar'],
|
|
113
|
-
'headerText': json['header_text'],
|
|
119
|
+
'headerText': !exists(json, 'header_text') ? undefined : json['header_text'],
|
|
114
120
|
'permissions': ((json['permissions'] as Array<any>).map(PermissionFromJSON)),
|
|
121
|
+
'additionalPermissions': ((json['additional_permissions'] as Array<any>).map(PermissionFromJSON)),
|
|
115
122
|
};
|
|
116
123
|
}
|
|
117
124
|
|
|
@@ -132,6 +139,7 @@ export function ConsentChallengeToJSON(value?: ConsentChallenge | null): any {
|
|
|
132
139
|
'pending_user_avatar': value.pendingUserAvatar,
|
|
133
140
|
'header_text': value.headerText,
|
|
134
141
|
'permissions': ((value.permissions as Array<any>).map(PermissionToJSON)),
|
|
142
|
+
'additional_permissions': ((value.additionalPermissions as Array<any>).map(PermissionToJSON)),
|
|
135
143
|
};
|
|
136
144
|
}
|
|
137
145
|
|
|
@@ -56,6 +56,12 @@ export interface UserConsent {
|
|
|
56
56
|
* @memberof UserConsent
|
|
57
57
|
*/
|
|
58
58
|
application: Application;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @memberof UserConsent
|
|
63
|
+
*/
|
|
64
|
+
permissions?: string;
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
export function UserConsentFromJSON(json: any): UserConsent {
|
|
@@ -72,6 +78,7 @@ export function UserConsentFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
72
78
|
'expires': !exists(json, 'expires') ? undefined : (new Date(json['expires'])),
|
|
73
79
|
'user': UserFromJSON(json['user']),
|
|
74
80
|
'application': ApplicationFromJSON(json['application']),
|
|
81
|
+
'permissions': !exists(json, 'permissions') ? undefined : json['permissions'],
|
|
75
82
|
};
|
|
76
83
|
}
|
|
77
84
|
|
|
@@ -87,6 +94,7 @@ export function UserConsentToJSON(value?: UserConsent | null): any {
|
|
|
87
94
|
'expires': value.expires === undefined ? undefined : (value.expires.toISOString()),
|
|
88
95
|
'user': UserToJSON(value.user),
|
|
89
96
|
'application': ApplicationToJSON(value.application),
|
|
97
|
+
'permissions': value.permissions,
|
|
90
98
|
};
|
|
91
99
|
}
|
|
92
100
|
|
package/README.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
## @goauthentik/api
|
|
2
|
-
|
|
3
|
-
This package provides a generated API Client for [authentik](https://goauthentik.io?utm_source=npm-api-package).
|
|
4
|
-
|
|
5
|
-
### Building
|
|
6
|
-
|
|
7
|
-
See https://goauthentik.io/developer-docs/making-schema-changes
|
|
8
|
-
|
|
9
|
-
### Consuming
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
npm install @goauthentik/api --save
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Create a configuration:
|
|
16
|
-
|
|
17
|
-
```typescript
|
|
18
|
-
import { Configuration } from "@goauthentik/api";
|
|
19
|
-
|
|
20
|
-
export const DEFAULT_CONFIG = new Configuration({
|
|
21
|
-
// Configure where the API is located
|
|
22
|
-
// Can be a full host, ensure CORS is configured
|
|
23
|
-
basePath: "",
|
|
24
|
-
// Required for POST/PUT/DELETE requests
|
|
25
|
-
// getCookie function must return the cookie's contents
|
|
26
|
-
headers: {
|
|
27
|
-
"X-authentik-CSRF": getCookie("authentik_csrf"),
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Then use the API:
|
|
33
|
-
|
|
34
|
-
```typescript
|
|
35
|
-
import { CoreApi } from "@goauthentik/api";
|
|
36
|
-
|
|
37
|
-
const user = await new CoreApi(DEFAULT_CONFIG).coreUsersMeRetrieve();
|
|
38
|
-
```
|