@iblai/iblai-api 4.43.5-core → 4.44.0-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/sdk_schema.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  openapi: 3.0.3
2
2
  info:
3
3
  title: ibl-data-manager
4
- version: 4.43.5-core
4
+ version: 4.44.0-core
5
5
  description: API for iblai
6
6
  paths:
7
7
  /api/analytics/learner/details:
@@ -15613,6 +15613,12 @@ paths:
15613
15613
  description: Retrieve a list of RBAC groups. Can be filtered by platform_key.
15614
15614
  summary: List RBAC groups
15615
15615
  parameters:
15616
+ - in: query
15617
+ name: owner
15618
+ schema:
15619
+ type: string
15620
+ minLength: 1
15621
+ description: Filter groups by owner username
15616
15622
  - name: page
15617
15623
  required: false
15618
15624
  in: query
@@ -15631,6 +15637,7 @@ paths:
15631
15637
  type: string
15632
15638
  minLength: 1
15633
15639
  description: Filter groups by platform key
15640
+ required: true
15634
15641
  tags:
15635
15642
  - core
15636
15643
  security:
@@ -15818,6 +15825,7 @@ paths:
15818
15825
  type: string
15819
15826
  minLength: 1
15820
15827
  description: platform key for authorization check
15828
+ required: true
15821
15829
  tags:
15822
15830
  - core
15823
15831
  security:
@@ -15827,6 +15835,94 @@ paths:
15827
15835
  description: Group deleted successfully
15828
15836
  '404':
15829
15837
  description: Group not found
15838
+ /api/core/rbac/mentor-access/:
15839
+ get:
15840
+ operationId: core_rbac_mentor_access_list
15841
+ description: Retrieve current access information for a specific mentor, including
15842
+ all groups and users that have access with their respective roles.
15843
+ summary: Get mentor access status
15844
+ parameters:
15845
+ - in: query
15846
+ name: mentor_id
15847
+ schema:
15848
+ type: integer
15849
+ description: ID of the mentor to get access information for
15850
+ required: true
15851
+ - in: query
15852
+ name: platform_key
15853
+ schema:
15854
+ type: string
15855
+ description: Platform key where the mentor belongs
15856
+ required: true
15857
+ tags:
15858
+ - core
15859
+ security:
15860
+ - PlatformApiKeyAuthentication: []
15861
+ responses:
15862
+ '200':
15863
+ content:
15864
+ application/json:
15865
+ schema:
15866
+ type: array
15867
+ items:
15868
+ $ref: '#/components/schemas/MentorPolicy'
15869
+ description: ''
15870
+ '400':
15871
+ description: Missing or invalid query parameters
15872
+ '403':
15873
+ description: Permission denied - ShareMentor permission required
15874
+ '404':
15875
+ description: Platform not found
15876
+ '500':
15877
+ description: Internal server error
15878
+ post:
15879
+ operationId: core_rbac_mentor_access_create
15880
+ description: Create or update RBAC policies to manage group and user access
15881
+ to specific mentors. Creates role-specific policies and handles adding/removing
15882
+ groups and users.
15883
+ summary: Control which RbacGroups and/or Users have access to a mentor and with
15884
+ what Role
15885
+ tags:
15886
+ - core
15887
+ requestBody:
15888
+ content:
15889
+ application/json:
15890
+ schema:
15891
+ $ref: '#/components/schemas/MentorPolicy'
15892
+ application/scim+json:
15893
+ schema:
15894
+ $ref: '#/components/schemas/MentorPolicy'
15895
+ application/x-www-form-urlencoded:
15896
+ schema:
15897
+ $ref: '#/components/schemas/MentorPolicy'
15898
+ multipart/form-data:
15899
+ schema:
15900
+ $ref: '#/components/schemas/MentorPolicy'
15901
+ '*/*':
15902
+ schema:
15903
+ $ref: '#/components/schemas/MentorPolicy'
15904
+ required: true
15905
+ security:
15906
+ - PlatformApiKeyAuthentication: []
15907
+ responses:
15908
+ '200':
15909
+ content:
15910
+ application/json:
15911
+ schema:
15912
+ $ref: '#/components/schemas/MentorPolicy'
15913
+ description: ''
15914
+ '201':
15915
+ content:
15916
+ application/json:
15917
+ schema:
15918
+ $ref: '#/components/schemas/MentorPolicy'
15919
+ description: ''
15920
+ '400':
15921
+ description: Invalid request data or validation errors
15922
+ '403':
15923
+ description: Permission denied - ShareMentor permission required
15924
+ '404':
15925
+ description: Platform or mentor not found
15830
15926
  /api/core/rbac/permissions/check/:
15831
15927
  post:
15832
15928
  operationId: core_rbac_permissions_check_create
@@ -16073,6 +16169,7 @@ paths:
16073
16169
  type: string
16074
16170
  minLength: 1
16075
16171
  description: platform key for authorization check
16172
+ required: true
16076
16173
  tags:
16077
16174
  - core
16078
16175
  security:
@@ -16281,6 +16378,7 @@ paths:
16281
16378
  type: string
16282
16379
  minLength: 1
16283
16380
  description: platform key for authorization check
16381
+ required: true
16284
16382
  tags:
16285
16383
  - core
16286
16384
  security:
@@ -16436,6 +16534,90 @@ paths:
16436
16534
  description: Permission denied - Tenant Admin access required
16437
16535
  '404':
16438
16536
  description: Platform not found
16537
+ /api/core/rbac/user-group-access/:
16538
+ get:
16539
+ operationId: core_rbac_user_group_access_retrieve
16540
+ description: Retrieve current group access information for a specific user,
16541
+ including all groups the user has access to and whether they have mentor management
16542
+ permissions.
16543
+ summary: Get user group access status
16544
+ parameters:
16545
+ - in: query
16546
+ name: platform_key
16547
+ schema:
16548
+ type: string
16549
+ description: Platform key where the groups exist
16550
+ required: true
16551
+ - in: query
16552
+ name: user_id
16553
+ schema:
16554
+ type: integer
16555
+ description: ID of the user to check group access for
16556
+ required: true
16557
+ tags:
16558
+ - core
16559
+ security:
16560
+ - PlatformApiKeyAuthentication: []
16561
+ responses:
16562
+ '200':
16563
+ content:
16564
+ application/json:
16565
+ schema:
16566
+ $ref: '#/components/schemas/UserGroupAccess'
16567
+ description: ''
16568
+ '400':
16569
+ description: Missing or invalid query parameters
16570
+ '404':
16571
+ description: Platform or user not found
16572
+ '500':
16573
+ description: Internal server error
16574
+ post:
16575
+ operationId: core_rbac_user_group_access_create
16576
+ description: Create or update user access to groups by adding/removing group
16577
+ access. Creates one policy per user with GROUP_MENTOR_MANAGER role for managing
16578
+ mentor access.
16579
+ summary: Manage user access to groups
16580
+ tags:
16581
+ - core
16582
+ requestBody:
16583
+ content:
16584
+ application/json:
16585
+ schema:
16586
+ $ref: '#/components/schemas/UserGroupAccess'
16587
+ application/scim+json:
16588
+ schema:
16589
+ $ref: '#/components/schemas/UserGroupAccess'
16590
+ application/x-www-form-urlencoded:
16591
+ schema:
16592
+ $ref: '#/components/schemas/UserGroupAccess'
16593
+ multipart/form-data:
16594
+ schema:
16595
+ $ref: '#/components/schemas/UserGroupAccess'
16596
+ '*/*':
16597
+ schema:
16598
+ $ref: '#/components/schemas/UserGroupAccess'
16599
+ required: true
16600
+ security:
16601
+ - PlatformApiKeyAuthentication: []
16602
+ responses:
16603
+ '200':
16604
+ content:
16605
+ application/json:
16606
+ schema:
16607
+ $ref: '#/components/schemas/UserGroupAccess'
16608
+ description: ''
16609
+ '201':
16610
+ content:
16611
+ application/json:
16612
+ schema:
16613
+ $ref: '#/components/schemas/UserGroupAccess'
16614
+ description: ''
16615
+ '400':
16616
+ description: Invalid request data or validation errors
16617
+ '404':
16618
+ description: Platform or user not found
16619
+ '500':
16620
+ description: Internal server error
16439
16621
  /api/core/session/logout/:
16440
16622
  post:
16441
16623
  operationId: core_session_logout_create
@@ -33277,6 +33459,76 @@ components:
33277
33459
  nullable: true
33278
33460
  required:
33279
33461
  - total_messages
33462
+ MentorPolicy:
33463
+ type: object
33464
+ description: |-
33465
+ Serializer for mentor-specific RBAC policies using ModelSerializer pattern.
33466
+ Accepts mentor_id and role, generates resources and role internally.
33467
+ properties:
33468
+ id:
33469
+ type: integer
33470
+ readOnly: true
33471
+ name:
33472
+ type: string
33473
+ readOnly: true
33474
+ description: Policy name. If not supplied, defaults to a UUID4
33475
+ platform_key:
33476
+ type: string
33477
+ description: Platform key where the mentor belongs
33478
+ writeOnly: true
33479
+ mentor_id:
33480
+ type: integer
33481
+ writeOnly: true
33482
+ description: ID of the mentor to manage access for
33483
+ role:
33484
+ type: string
33485
+ description: Role for accessing this mentor (viewer or editor)
33486
+ resources:
33487
+ readOnly: true
33488
+ description: List of resources this policy applies to
33489
+ users:
33490
+ type: array
33491
+ items:
33492
+ $ref: '#/components/schemas/RbacUser'
33493
+ readOnly: true
33494
+ groups:
33495
+ type: array
33496
+ items:
33497
+ $ref: '#/components/schemas/RbacPolicyGroup'
33498
+ readOnly: true
33499
+ groups_to_add:
33500
+ type: array
33501
+ items:
33502
+ type: integer
33503
+ writeOnly: true
33504
+ description: List of group IDs to grant access to this mentor
33505
+ groups_to_remove:
33506
+ type: array
33507
+ items:
33508
+ type: integer
33509
+ writeOnly: true
33510
+ description: List of group IDs to revoke access from this mentor
33511
+ users_to_add:
33512
+ type: array
33513
+ items:
33514
+ type: integer
33515
+ writeOnly: true
33516
+ description: List of user IDs to grant access to this mentor
33517
+ users_to_remove:
33518
+ type: array
33519
+ items:
33520
+ type: integer
33521
+ writeOnly: true
33522
+ description: List of user IDs to revoke access from this mentor
33523
+ required:
33524
+ - groups
33525
+ - id
33526
+ - mentor_id
33527
+ - name
33528
+ - platform_key
33529
+ - resources
33530
+ - role
33531
+ - users
33280
33532
  MetricDetail:
33281
33533
  type: object
33282
33534
  description: Base serializer for detailed metric data.
@@ -34500,6 +34752,10 @@ components:
34500
34752
  description:
34501
34753
  type: string
34502
34754
  description: Optional group description
34755
+ owner:
34756
+ allOf:
34757
+ - $ref: '#/components/schemas/RbacUser'
34758
+ readOnly: true
34503
34759
  users:
34504
34760
  type: array
34505
34761
  items:
@@ -37814,6 +38070,10 @@ components:
37814
38070
  description:
37815
38071
  type: string
37816
38072
  description: Optional group description
38073
+ owner:
38074
+ allOf:
38075
+ - $ref: '#/components/schemas/RbacUser'
38076
+ readOnly: true
37817
38077
  users:
37818
38078
  type: array
37819
38079
  items:
@@ -37833,6 +38093,7 @@ components:
37833
38093
  description: List of user IDs to remove from this group
37834
38094
  required:
37835
38095
  - id
38096
+ - owner
37836
38097
  - platform
37837
38098
  - platform_key
37838
38099
  - unique_id
@@ -39303,9 +39564,6 @@ components:
39303
39564
  type: string
39304
39565
  description: 'List of LLM resource paths that students can access. Format:
39305
39566
  [''llms/openai/models/gpt-4'', ''llms/openai/'', ''llms/'']'
39306
- message:
39307
- type: string
39308
- description: Success message (only in set access response)
39309
39567
  required:
39310
39568
  - llm_resources
39311
39569
  - platform_key
@@ -39924,6 +40182,74 @@ components:
39924
40182
  type: string
39925
40183
  required:
39926
40184
  - message
40185
+ UserGroupAccess:
40186
+ type: object
40187
+ description: ModelSerializer for user group access policies
40188
+ properties:
40189
+ platform_key:
40190
+ type: string
40191
+ description: Platform key where the groups exist
40192
+ writeOnly: true
40193
+ user_id:
40194
+ type: integer
40195
+ description: ID of the user to manage group access for
40196
+ writeOnly: true
40197
+ groups_to_add:
40198
+ type: array
40199
+ items:
40200
+ type: integer
40201
+ writeOnly: true
40202
+ description: List of group IDs to grant access to
40203
+ groups_to_remove:
40204
+ type: array
40205
+ items:
40206
+ type: integer
40207
+ writeOnly: true
40208
+ description: List of group IDs to revoke access from
40209
+ policy_id:
40210
+ type: integer
40211
+ readOnly: true
40212
+ description: Policy ID
40213
+ policy_name:
40214
+ type: string
40215
+ readOnly: true
40216
+ description: Policy name
40217
+ groups_with_access:
40218
+ type: array
40219
+ items:
40220
+ $ref: '#/components/schemas/UserGroupAccessInfo'
40221
+ readOnly: true
40222
+ description: Groups with access
40223
+ required:
40224
+ - groups_with_access
40225
+ - platform_key
40226
+ - policy_id
40227
+ - policy_name
40228
+ - user_id
40229
+ UserGroupAccessInfo:
40230
+ type: object
40231
+ description: Serializer for group access information in responses
40232
+ properties:
40233
+ id:
40234
+ type: integer
40235
+ description: Group ID
40236
+ name:
40237
+ type: string
40238
+ description: Group name
40239
+ description:
40240
+ type: string
40241
+ description: Group description
40242
+ permissions:
40243
+ type: array
40244
+ items:
40245
+ type: string
40246
+ description: List of permissions user has for this group (e.g., ['read',
40247
+ 'manageMentors'])
40248
+ required:
40249
+ - description
40250
+ - id
40251
+ - name
40252
+ - permissions
39927
40253
  UserInfo:
39928
40254
  type: object
39929
40255
  description: Serializer for user information.
@@ -21,7 +21,7 @@ export type OpenAPIConfig = {
21
21
 
22
22
  export const OpenAPI: OpenAPIConfig = {
23
23
  BASE: 'https://base.manager.iblai.app',
24
- VERSION: '4.43.5-core',
24
+ VERSION: '4.44.0-core',
25
25
  WITH_CREDENTIALS: false,
26
26
  CREDENTIALS: 'include',
27
27
  TOKEN: undefined,
package/src/index.ts CHANGED
@@ -155,6 +155,7 @@ export type { MediaResource } from './models/MediaResource';
155
155
  export { MediaTypeEnum } from './models/MediaTypeEnum';
156
156
  export type { MentorDetail } from './models/MentorDetail';
157
157
  export type { MentorInteractions } from './models/MentorInteractions';
158
+ export type { MentorPolicy } from './models/MentorPolicy';
158
159
  export type { MetricDetail } from './models/MetricDetail';
159
160
  export { ModeEnum } from './models/ModeEnum';
160
161
  export type { NewPerLearnerList } from './models/NewPerLearnerList';
@@ -397,6 +398,8 @@ export type { UserApp } from './models/UserApp';
397
398
  export type { UserDeleteAPIError } from './models/UserDeleteAPIError';
398
399
  export type { UserDeleteAPIRequest } from './models/UserDeleteAPIRequest';
399
400
  export type { UserDeleteAPIResponse } from './models/UserDeleteAPIResponse';
401
+ export type { UserGroupAccess } from './models/UserGroupAccess';
402
+ export type { UserGroupAccessInfo } from './models/UserGroupAccessInfo';
400
403
  export type { UserInfo } from './models/UserInfo';
401
404
  export type { UserLicenseAssignmentCreate } from './models/UserLicenseAssignmentCreate';
402
405
  export type { UserLicenseAssignmentDetail } from './models/UserLicenseAssignmentDetail';
@@ -0,0 +1,52 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ import type { RbacPolicyGroup } from './RbacPolicyGroup';
6
+ import type { RbacUser } from './RbacUser';
7
+ /**
8
+ * Serializer for mentor-specific RBAC policies using ModelSerializer pattern.
9
+ * Accepts mentor_id and role, generates resources and role internally.
10
+ */
11
+ export type MentorPolicy = {
12
+ readonly id: number;
13
+ /**
14
+ * Policy name. If not supplied, defaults to a UUID4
15
+ */
16
+ readonly name: string;
17
+ /**
18
+ * Platform key where the mentor belongs
19
+ */
20
+ platform_key: string;
21
+ /**
22
+ * ID of the mentor to manage access for
23
+ */
24
+ mentor_id: number;
25
+ /**
26
+ * Role for accessing this mentor (viewer or editor)
27
+ */
28
+ role: string;
29
+ /**
30
+ * List of resources this policy applies to
31
+ */
32
+ readonly resources: any;
33
+ readonly users: Array<RbacUser>;
34
+ readonly groups: Array<RbacPolicyGroup>;
35
+ /**
36
+ * List of group IDs to grant access to this mentor
37
+ */
38
+ groups_to_add?: Array<number>;
39
+ /**
40
+ * List of group IDs to revoke access from this mentor
41
+ */
42
+ groups_to_remove?: Array<number>;
43
+ /**
44
+ * List of user IDs to grant access to this mentor
45
+ */
46
+ users_to_add?: Array<number>;
47
+ /**
48
+ * List of user IDs to revoke access from this mentor
49
+ */
50
+ users_to_remove?: Array<number>;
51
+ };
52
+
@@ -26,6 +26,7 @@ export type PatchedRbacGroup = {
26
26
  * Optional group description
27
27
  */
28
28
  description?: string;
29
+ readonly owner?: RbacUser;
29
30
  readonly users?: Array<RbacUser>;
30
31
  /**
31
32
  * List of user IDs to add to this group
@@ -26,6 +26,7 @@ export type RbacGroup = {
26
26
  * Optional group description
27
27
  */
28
28
  description?: string;
29
+ readonly owner: RbacUser;
29
30
  readonly users: Array<RbacUser>;
30
31
  /**
31
32
  * List of user IDs to add to this group
@@ -14,9 +14,5 @@ export type StudentLLMAccessResponse = {
14
14
  * List of LLM resource paths that students can access. Format: ['llms/openai/models/gpt-4', 'llms/openai/', 'llms/']
15
15
  */
16
16
  llm_resources: Array<string>;
17
- /**
18
- * Success message (only in set access response)
19
- */
20
- message?: string;
21
17
  };
22
18
 
@@ -0,0 +1,39 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ import type { UserGroupAccessInfo } from './UserGroupAccessInfo';
6
+ /**
7
+ * ModelSerializer for user group access policies
8
+ */
9
+ export type UserGroupAccess = {
10
+ /**
11
+ * Platform key where the groups exist
12
+ */
13
+ platform_key: string;
14
+ /**
15
+ * ID of the user to manage group access for
16
+ */
17
+ user_id: number;
18
+ /**
19
+ * List of group IDs to grant access to
20
+ */
21
+ groups_to_add?: Array<number>;
22
+ /**
23
+ * List of group IDs to revoke access from
24
+ */
25
+ groups_to_remove?: Array<number>;
26
+ /**
27
+ * Policy ID
28
+ */
29
+ readonly policy_id: number;
30
+ /**
31
+ * Policy name
32
+ */
33
+ readonly policy_name: string;
34
+ /**
35
+ * Groups with access
36
+ */
37
+ readonly groups_with_access: Array<UserGroupAccessInfo>;
38
+ };
39
+
@@ -0,0 +1,26 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * Serializer for group access information in responses
7
+ */
8
+ export type UserGroupAccessInfo = {
9
+ /**
10
+ * Group ID
11
+ */
12
+ id: number;
13
+ /**
14
+ * Group name
15
+ */
16
+ name: string;
17
+ /**
18
+ * Group description
19
+ */
20
+ description: string;
21
+ /**
22
+ * List of permissions user has for this group (e.g., ['read', 'manageMentors'])
23
+ */
24
+ permissions: Array<string>;
25
+ };
26
+