@iblai/iblai-api 4.43.1-core → 4.43.1-rbac-core
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/index.cjs.js +95 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +95 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +95 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/models/MentorPolicy.d.ts +47 -0
- package/dist/types/models/PatchedRbacGroup.d.ts +1 -0
- package/dist/types/models/RbacGroup.d.ts +1 -0
- package/dist/types/models/StudentLLMAccessResponse.d.ts +0 -4
- package/dist/types/models/UserGroupAccess.d.ts +34 -0
- package/dist/types/models/UserGroupAccessInfo.d.ts +21 -0
- package/dist/types/services/CoreService.d.ts +64 -8
- package/package.json +1 -1
- package/sdk_schema.yml +329 -3
- package/src/index.ts +3 -0
- package/src/models/MentorPolicy.ts +52 -0
- package/src/models/PatchedRbacGroup.ts +1 -0
- package/src/models/RbacGroup.ts +1 -0
- package/src/models/StudentLLMAccessResponse.ts +0 -4
- package/src/models/UserGroupAccess.ts +39 -0
- package/src/models/UserGroupAccessInfo.ts +26 -0
- package/src/services/CoreService.ts +129 -8
package/dist/types/index.d.ts
CHANGED
|
@@ -150,6 +150,7 @@ export type { MediaResource } from './models/MediaResource';
|
|
|
150
150
|
export { MediaTypeEnum } from './models/MediaTypeEnum';
|
|
151
151
|
export type { MentorDetail } from './models/MentorDetail';
|
|
152
152
|
export type { MentorInteractions } from './models/MentorInteractions';
|
|
153
|
+
export type { MentorPolicy } from './models/MentorPolicy';
|
|
153
154
|
export type { MetricDetail } from './models/MetricDetail';
|
|
154
155
|
export { ModeEnum } from './models/ModeEnum';
|
|
155
156
|
export type { NewPerLearnerList } from './models/NewPerLearnerList';
|
|
@@ -392,6 +393,8 @@ export type { UserApp } from './models/UserApp';
|
|
|
392
393
|
export type { UserDeleteAPIError } from './models/UserDeleteAPIError';
|
|
393
394
|
export type { UserDeleteAPIRequest } from './models/UserDeleteAPIRequest';
|
|
394
395
|
export type { UserDeleteAPIResponse } from './models/UserDeleteAPIResponse';
|
|
396
|
+
export type { UserGroupAccess } from './models/UserGroupAccess';
|
|
397
|
+
export type { UserGroupAccessInfo } from './models/UserGroupAccessInfo';
|
|
395
398
|
export type { UserInfo } from './models/UserInfo';
|
|
396
399
|
export type { UserLicenseAssignmentCreate } from './models/UserLicenseAssignmentCreate';
|
|
397
400
|
export type { UserLicenseAssignmentDetail } from './models/UserLicenseAssignmentDetail';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { RbacPolicyGroup } from './RbacPolicyGroup';
|
|
2
|
+
import type { RbacUser } from './RbacUser';
|
|
3
|
+
/**
|
|
4
|
+
* Serializer for mentor-specific RBAC policies using ModelSerializer pattern.
|
|
5
|
+
* Accepts mentor_id and role, generates resources and role internally.
|
|
6
|
+
*/
|
|
7
|
+
export type MentorPolicy = {
|
|
8
|
+
readonly id: number;
|
|
9
|
+
/**
|
|
10
|
+
* Policy name. If not supplied, defaults to a UUID4
|
|
11
|
+
*/
|
|
12
|
+
readonly name: string;
|
|
13
|
+
/**
|
|
14
|
+
* Platform key where the mentor belongs
|
|
15
|
+
*/
|
|
16
|
+
platform_key: string;
|
|
17
|
+
/**
|
|
18
|
+
* ID of the mentor to manage access for
|
|
19
|
+
*/
|
|
20
|
+
mentor_id: number;
|
|
21
|
+
/**
|
|
22
|
+
* Role for accessing this mentor (viewer or editor)
|
|
23
|
+
*/
|
|
24
|
+
role: string;
|
|
25
|
+
/**
|
|
26
|
+
* List of resources this policy applies to
|
|
27
|
+
*/
|
|
28
|
+
readonly resources: any;
|
|
29
|
+
readonly users: Array<RbacUser>;
|
|
30
|
+
readonly groups: Array<RbacPolicyGroup>;
|
|
31
|
+
/**
|
|
32
|
+
* List of group IDs to grant access to this mentor
|
|
33
|
+
*/
|
|
34
|
+
groups_to_add?: Array<number>;
|
|
35
|
+
/**
|
|
36
|
+
* List of group IDs to revoke access from this mentor
|
|
37
|
+
*/
|
|
38
|
+
groups_to_remove?: Array<number>;
|
|
39
|
+
/**
|
|
40
|
+
* List of user IDs to grant access to this mentor
|
|
41
|
+
*/
|
|
42
|
+
users_to_add?: Array<number>;
|
|
43
|
+
/**
|
|
44
|
+
* List of user IDs to revoke access from this mentor
|
|
45
|
+
*/
|
|
46
|
+
users_to_remove?: Array<number>;
|
|
47
|
+
};
|
|
@@ -10,8 +10,4 @@ export type StudentLLMAccessResponse = {
|
|
|
10
10
|
* List of LLM resource paths that students can access. Format: ['llms/openai/models/gpt-4', 'llms/openai/', 'llms/']
|
|
11
11
|
*/
|
|
12
12
|
llm_resources: Array<string>;
|
|
13
|
-
/**
|
|
14
|
-
* Success message (only in set access response)
|
|
15
|
-
*/
|
|
16
|
-
message?: string;
|
|
17
13
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { UserGroupAccessInfo } from './UserGroupAccessInfo';
|
|
2
|
+
/**
|
|
3
|
+
* ModelSerializer for user group access policies
|
|
4
|
+
*/
|
|
5
|
+
export type UserGroupAccess = {
|
|
6
|
+
/**
|
|
7
|
+
* Platform key where the groups exist
|
|
8
|
+
*/
|
|
9
|
+
platform_key: string;
|
|
10
|
+
/**
|
|
11
|
+
* ID of the user to manage group access for
|
|
12
|
+
*/
|
|
13
|
+
user_id: number;
|
|
14
|
+
/**
|
|
15
|
+
* List of group IDs to grant access to
|
|
16
|
+
*/
|
|
17
|
+
groups_to_add?: Array<number>;
|
|
18
|
+
/**
|
|
19
|
+
* List of group IDs to revoke access from
|
|
20
|
+
*/
|
|
21
|
+
groups_to_remove?: Array<number>;
|
|
22
|
+
/**
|
|
23
|
+
* Policy ID
|
|
24
|
+
*/
|
|
25
|
+
readonly policy_id: number;
|
|
26
|
+
/**
|
|
27
|
+
* Policy name
|
|
28
|
+
*/
|
|
29
|
+
readonly policy_name: string;
|
|
30
|
+
/**
|
|
31
|
+
* Groups with access
|
|
32
|
+
*/
|
|
33
|
+
readonly groups_with_access: Array<UserGroupAccessInfo>;
|
|
34
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serializer for group access information in responses
|
|
3
|
+
*/
|
|
4
|
+
export type UserGroupAccessInfo = {
|
|
5
|
+
/**
|
|
6
|
+
* Group ID
|
|
7
|
+
*/
|
|
8
|
+
id: number;
|
|
9
|
+
/**
|
|
10
|
+
* Group name
|
|
11
|
+
*/
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* Group description
|
|
15
|
+
*/
|
|
16
|
+
description: string;
|
|
17
|
+
/**
|
|
18
|
+
* List of permissions user has for this group (e.g., ['read', 'manageMentors'])
|
|
19
|
+
*/
|
|
20
|
+
permissions: Array<string>;
|
|
21
|
+
};
|
|
@@ -7,6 +7,7 @@ import type { LauncherViewPostRequest } from '../models/LauncherViewPostRequest'
|
|
|
7
7
|
import type { LtiKey } from '../models/LtiKey';
|
|
8
8
|
import type { LtiMentor } from '../models/LtiMentor';
|
|
9
9
|
import type { LtiTool } from '../models/LtiTool';
|
|
10
|
+
import type { MentorPolicy } from '../models/MentorPolicy';
|
|
10
11
|
import type { PaginatedRbacGroupList } from '../models/PaginatedRbacGroupList';
|
|
11
12
|
import type { PaginatedRbacPolicyList } from '../models/PaginatedRbacPolicyList';
|
|
12
13
|
import type { PaginatedRbacRoleList } from '../models/PaginatedRbacRoleList';
|
|
@@ -38,6 +39,7 @@ import type { TokenProxyInput } from '../models/TokenProxyInput';
|
|
|
38
39
|
import type { TokenProxyOutput } from '../models/TokenProxyOutput';
|
|
39
40
|
import type { UserDeleteAPIRequest } from '../models/UserDeleteAPIRequest';
|
|
40
41
|
import type { UserDeleteAPIResponse } from '../models/UserDeleteAPIResponse';
|
|
42
|
+
import type { UserGroupAccess } from '../models/UserGroupAccess';
|
|
41
43
|
import type { UserPlatformLink } from '../models/UserPlatformLink';
|
|
42
44
|
import type { UserPlatformManagementListViewGetResponse } from '../models/UserPlatformManagementListViewGetResponse';
|
|
43
45
|
import type { UserPlatformSelfLinkRequest } from '../models/UserPlatformSelfLinkRequest';
|
|
@@ -634,7 +636,15 @@ export declare class CoreService {
|
|
|
634
636
|
* @returns PaginatedRbacGroupList
|
|
635
637
|
* @throws ApiError
|
|
636
638
|
*/
|
|
637
|
-
static coreRbacGroupsList({ page, pageSize,
|
|
639
|
+
static coreRbacGroupsList({ platformKey, owner, page, pageSize, }: {
|
|
640
|
+
/**
|
|
641
|
+
* Filter groups by platform key
|
|
642
|
+
*/
|
|
643
|
+
platformKey: string;
|
|
644
|
+
/**
|
|
645
|
+
* Filter groups by owner username
|
|
646
|
+
*/
|
|
647
|
+
owner?: string;
|
|
638
648
|
/**
|
|
639
649
|
* A page number within the paginated result set.
|
|
640
650
|
*/
|
|
@@ -643,10 +653,6 @@ export declare class CoreService {
|
|
|
643
653
|
* Number of results to return per page.
|
|
644
654
|
*/
|
|
645
655
|
pageSize?: number;
|
|
646
|
-
/**
|
|
647
|
-
* Filter groups by platform key
|
|
648
|
-
*/
|
|
649
|
-
platformKey?: string;
|
|
650
656
|
}): CancelablePromise<PaginatedRbacGroupList>;
|
|
651
657
|
/**
|
|
652
658
|
* Create RBAC group
|
|
@@ -709,8 +715,33 @@ export declare class CoreService {
|
|
|
709
715
|
/**
|
|
710
716
|
* platform key for authorization check
|
|
711
717
|
*/
|
|
712
|
-
platformKey
|
|
718
|
+
platformKey: string;
|
|
713
719
|
}): CancelablePromise<void>;
|
|
720
|
+
/**
|
|
721
|
+
* Get mentor access status
|
|
722
|
+
* Retrieve current access information for a specific mentor, including all groups and users that have access with their respective roles.
|
|
723
|
+
* @returns MentorPolicy
|
|
724
|
+
* @throws ApiError
|
|
725
|
+
*/
|
|
726
|
+
static coreRbacMentorAccessList({ mentorId, platformKey, }: {
|
|
727
|
+
/**
|
|
728
|
+
* ID of the mentor to get access information for
|
|
729
|
+
*/
|
|
730
|
+
mentorId: number;
|
|
731
|
+
/**
|
|
732
|
+
* Platform key where the mentor belongs
|
|
733
|
+
*/
|
|
734
|
+
platformKey: string;
|
|
735
|
+
}): CancelablePromise<Array<MentorPolicy>>;
|
|
736
|
+
/**
|
|
737
|
+
* Control which RbacGroups and/or Users have access to a mentor and with what Role
|
|
738
|
+
* Create or update RBAC policies to manage group and user access to specific mentors. Creates role-specific policies and handles adding/removing groups and users.
|
|
739
|
+
* @returns MentorPolicy
|
|
740
|
+
* @throws ApiError
|
|
741
|
+
*/
|
|
742
|
+
static coreRbacMentorAccessCreate({ requestBody, }: {
|
|
743
|
+
requestBody: MentorPolicy;
|
|
744
|
+
}): CancelablePromise<MentorPolicy>;
|
|
714
745
|
/**
|
|
715
746
|
* Check user permissions
|
|
716
747
|
* Check user permissions for specified resources
|
|
@@ -805,7 +836,7 @@ export declare class CoreService {
|
|
|
805
836
|
/**
|
|
806
837
|
* platform key for authorization check
|
|
807
838
|
*/
|
|
808
|
-
platformKey
|
|
839
|
+
platformKey: string;
|
|
809
840
|
}): CancelablePromise<void>;
|
|
810
841
|
/**
|
|
811
842
|
* List RBAC roles
|
|
@@ -888,7 +919,7 @@ export declare class CoreService {
|
|
|
888
919
|
/**
|
|
889
920
|
* platform key for authorization check
|
|
890
921
|
*/
|
|
891
|
-
platformKey
|
|
922
|
+
platformKey: string;
|
|
892
923
|
}): CancelablePromise<void>;
|
|
893
924
|
/**
|
|
894
925
|
* Set student LLM access permissions
|
|
@@ -932,6 +963,31 @@ export declare class CoreService {
|
|
|
932
963
|
*/
|
|
933
964
|
platformKey: string;
|
|
934
965
|
}): CancelablePromise<StudentMentorCreationPermissionResponse>;
|
|
966
|
+
/**
|
|
967
|
+
* Get user group access status
|
|
968
|
+
* Retrieve current group access information for a specific user, including all groups the user has access to and whether they have mentor management permissions.
|
|
969
|
+
* @returns UserGroupAccess
|
|
970
|
+
* @throws ApiError
|
|
971
|
+
*/
|
|
972
|
+
static coreRbacUserGroupAccessRetrieve({ platformKey, userId, }: {
|
|
973
|
+
/**
|
|
974
|
+
* Platform key where the groups exist
|
|
975
|
+
*/
|
|
976
|
+
platformKey: string;
|
|
977
|
+
/**
|
|
978
|
+
* ID of the user to check group access for
|
|
979
|
+
*/
|
|
980
|
+
userId: number;
|
|
981
|
+
}): CancelablePromise<UserGroupAccess>;
|
|
982
|
+
/**
|
|
983
|
+
* Manage user access to groups
|
|
984
|
+
* Create or update user access to groups by adding/removing group access. Creates one policy per user with GROUP_MENTOR_MANAGER role for managing mentor access.
|
|
985
|
+
* @returns UserGroupAccess
|
|
986
|
+
* @throws ApiError
|
|
987
|
+
*/
|
|
988
|
+
static coreRbacUserGroupAccessCreate({ requestBody, }: {
|
|
989
|
+
requestBody: UserGroupAccess;
|
|
990
|
+
}): CancelablePromise<UserGroupAccess>;
|
|
935
991
|
/**
|
|
936
992
|
* Invalidate all tokens for the authenticated user
|
|
937
993
|
* @returns any No response body
|