@iblai/iblai-api 3.47.2-core → 3.48.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.
Files changed (52) hide show
  1. package/dist/index.cjs.js +512 -72
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +512 -72
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +512 -72
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +17 -3
  8. package/dist/types/models/PaginatedRbacGroupList.d.ts +7 -0
  9. package/dist/types/models/PaginatedRbacGroupRoleList.d.ts +7 -0
  10. package/dist/types/models/PaginatedRbacPolicyList.d.ts +7 -0
  11. package/dist/types/models/PaginatedRbacRoleList.d.ts +7 -0
  12. package/dist/types/models/PaginatedRbacUserRoleList.d.ts +7 -0
  13. package/dist/types/models/PatchedRbacGroup.d.ts +34 -0
  14. package/dist/types/models/PatchedRbacGroupRole.d.ts +13 -0
  15. package/dist/types/models/PatchedRbacPolicy.d.ts +28 -0
  16. package/dist/types/models/PatchedRbacRole.d.ts +20 -0
  17. package/dist/types/models/PatchedRbacUserRole.d.ts +28 -0
  18. package/dist/types/models/RbacGroup.d.ts +34 -0
  19. package/dist/types/models/RbacGroupRole.d.ts +13 -0
  20. package/dist/types/models/RbacPlatform.d.ts +14 -0
  21. package/dist/types/models/RbacPolicy.d.ts +28 -0
  22. package/dist/types/models/RbacRole.d.ts +20 -0
  23. package/dist/types/models/RbacUser.d.ts +13 -0
  24. package/dist/types/models/RbacUserRole.d.ts +28 -0
  25. package/dist/types/services/CoreService.d.ts +232 -43
  26. package/package.json +1 -1
  27. package/src/core/OpenAPI.ts +1 -1
  28. package/src/index.ts +17 -3
  29. package/src/models/PaginatedRbacGroupList.ts +12 -0
  30. package/src/models/PaginatedRbacGroupRoleList.ts +12 -0
  31. package/src/models/PaginatedRbacPolicyList.ts +12 -0
  32. package/src/models/PaginatedRbacRoleList.ts +12 -0
  33. package/src/models/PaginatedRbacUserRoleList.ts +12 -0
  34. package/src/models/PatchedRbacGroup.ts +39 -0
  35. package/src/models/PatchedRbacGroupRole.ts +18 -0
  36. package/src/models/PatchedRbacPolicy.ts +33 -0
  37. package/src/models/PatchedRbacRole.ts +25 -0
  38. package/src/models/PatchedRbacUserRole.ts +33 -0
  39. package/src/models/RbacGroup.ts +39 -0
  40. package/src/models/RbacGroupRole.ts +18 -0
  41. package/src/models/RbacPlatform.ts +19 -0
  42. package/src/models/RbacPolicy.ts +33 -0
  43. package/src/models/RbacRole.ts +25 -0
  44. package/src/models/RbacUser.ts +18 -0
  45. package/src/models/RbacUserRole.ts +33 -0
  46. package/src/services/CoreService.ts +610 -80
  47. package/dist/types/models/CheckPermissionRequest.d.ts +0 -22
  48. package/dist/types/models/RolePermissions.d.ts +0 -17
  49. package/dist/types/models/UserRole.d.ts +0 -25
  50. package/src/models/CheckPermissionRequest.ts +0 -27
  51. package/src/models/RolePermissions.ts +0 -22
  52. package/src/models/UserRole.ts +0 -30
package/dist/index.umd.js CHANGED
@@ -114,7 +114,7 @@
114
114
 
115
115
  const OpenAPI = {
116
116
  BASE: 'https://base.manager.iblai.app',
117
- VERSION: '3.47.2-core',
117
+ VERSION: '3.48.0-core',
118
118
  WITH_CREDENTIALS: false,
119
119
  CREDENTIALS: 'include',
120
120
  TOKEN: undefined,
@@ -9579,201 +9579,641 @@
9579
9579
  });
9580
9580
  }
9581
9581
  /**
9582
- * Check if a user has permission to perform an action on a resource.
9582
+ * List group role assignments
9583
+ * Retrieve a list of group role assignments. Can be filtered by platform_key, group_id, or role_id.
9584
+ * @param groupId Filter group roles by group ID
9585
+ * @param page A page number within the paginated result set.
9586
+ * @param pageSize Number of results to return per page.
9587
+ * @param platformKey Filter group roles by platform key
9588
+ * @param roleId Filter group roles by role ID
9589
+ * @returns PaginatedRbacGroupRoleList
9590
+ * @throws ApiError
9591
+ */
9592
+ static coreRbacGroupRolesList(groupId, page, pageSize, platformKey, roleId) {
9593
+ return request(OpenAPI, {
9594
+ method: 'GET',
9595
+ url: '/api/core/rbac/group-roles/',
9596
+ query: {
9597
+ 'group_id': groupId,
9598
+ 'page': page,
9599
+ 'page_size': pageSize,
9600
+ 'platform_key': platformKey,
9601
+ 'role_id': roleId
9602
+ }
9603
+ });
9604
+ }
9605
+ /**
9606
+ * Create group role assignment
9607
+ * Assign a role to a group. The group and role must belong to the same platform.
9583
9608
  * @param requestBody
9584
- * @returns any User has permission to perform the action on the resource.
9609
+ * @returns RbacGroupRole
9585
9610
  * @throws ApiError
9586
9611
  */
9587
- static coreRbacCheckPermissionsCreate(requestBody) {
9612
+ static coreRbacGroupRolesCreate(requestBody) {
9588
9613
  return request(OpenAPI, {
9589
9614
  method: 'POST',
9590
- url: '/api/core/rbac/check-permissions/',
9615
+ url: '/api/core/rbac/group-roles/',
9591
9616
  body: requestBody,
9592
9617
  mediaType: 'application/json',
9593
9618
  errors: {
9594
- 403: `User does not have permission to perform the action on the resource.`,
9595
- 404: `Platform not found.`
9619
+ 400: `Invalid input data. Common errors include:
9620
+ - Group does not belong to the specified platform
9621
+ - Role does not belong to the specified platform
9622
+ - Group and role belong to different platforms`
9596
9623
  }
9597
9624
  });
9598
9625
  }
9599
9626
  /**
9600
- * Get all associations for a resource.
9601
- * @returns any No response body
9627
+ * Retrieve group role assignment
9628
+ * Retrieve details of a specific group role assignment.
9629
+ * @param id A unique integer value identifying this RBAC Group Role.
9630
+ * @returns RbacGroupRole
9602
9631
  * @throws ApiError
9603
9632
  */
9604
- static coreRbacResourceAssociationRetrieve() {
9633
+ static coreRbacGroupRolesRetrieve(id) {
9605
9634
  return request(OpenAPI, {
9606
9635
  method: 'GET',
9607
- url: '/api/core/rbac/resource/association/'
9636
+ url: '/api/core/rbac/group-roles/{id}/',
9637
+ path: {
9638
+ 'id': id
9639
+ },
9640
+ errors: {
9641
+ 404: `Group role assignment not found`
9642
+ }
9608
9643
  });
9609
9644
  }
9610
9645
  /**
9611
- * Associate a resource with a resource.
9612
- * @returns any No response body
9646
+ * Update group role assignment
9647
+ * Update an existing group role assignment. Platform validation applies.
9648
+ * @param id A unique integer value identifying this RBAC Group Role.
9649
+ * @param requestBody
9650
+ * @returns RbacGroupRole
9613
9651
  * @throws ApiError
9614
9652
  */
9615
- static coreRbacResourceAssociationCreate() {
9653
+ static coreRbacGroupRolesUpdate(id, requestBody) {
9616
9654
  return request(OpenAPI, {
9617
- method: 'POST',
9618
- url: '/api/core/rbac/resource/association/'
9655
+ method: 'PUT',
9656
+ url: '/api/core/rbac/group-roles/{id}/',
9657
+ path: {
9658
+ 'id': id
9659
+ },
9660
+ body: requestBody,
9661
+ mediaType: 'application/json',
9662
+ errors: {
9663
+ 400: `Invalid input data. Common errors include:
9664
+ - Group does not belong to the specified platform
9665
+ - Role does not belong to the specified platform
9666
+ - Group and role belong to different platforms`,
9667
+ 404: `Group role assignment not found`
9668
+ }
9619
9669
  });
9620
9670
  }
9621
9671
  /**
9622
- * Disassociate a resource from a resource.
9672
+ * Partially update group role assignment
9673
+ * Partially update an existing group role assignment. Platform validation applies.
9674
+ * @param id A unique integer value identifying this RBAC Group Role.
9675
+ * @param requestBody
9676
+ * @returns RbacGroupRole
9677
+ * @throws ApiError
9678
+ */
9679
+ static coreRbacGroupRolesPartialUpdate(id, requestBody) {
9680
+ return request(OpenAPI, {
9681
+ method: 'PATCH',
9682
+ url: '/api/core/rbac/group-roles/{id}/',
9683
+ path: {
9684
+ 'id': id
9685
+ },
9686
+ body: requestBody,
9687
+ mediaType: 'application/json',
9688
+ errors: {
9689
+ 400: `Invalid input data. Common errors include:
9690
+ - Group does not belong to the specified platform
9691
+ - Role does not belong to the specified platform
9692
+ - Group and role belong to different platforms`,
9693
+ 404: `Group role assignment not found`
9694
+ }
9695
+ });
9696
+ }
9697
+ /**
9698
+ * Delete group role assignment
9699
+ * Remove a role assignment from a group.
9700
+ * @param id A unique integer value identifying this RBAC Group Role.
9623
9701
  * @returns void
9624
9702
  * @throws ApiError
9625
9703
  */
9626
- static coreRbacResourceAssociationDestroy() {
9704
+ static coreRbacGroupRolesDestroy(id) {
9627
9705
  return request(OpenAPI, {
9628
9706
  method: 'DELETE',
9629
- url: '/api/core/rbac/resource/association/'
9707
+ url: '/api/core/rbac/group-roles/{id}/',
9708
+ path: {
9709
+ 'id': id
9710
+ },
9711
+ errors: {
9712
+ 404: `Group role assignment not found`
9713
+ }
9630
9714
  });
9631
9715
  }
9632
9716
  /**
9633
- * Get all permissions for a role.
9634
- * @returns any List of permissions for the role.
9717
+ * List RBAC groups
9718
+ * Retrieve a list of RBAC groups. Can be filtered by platform_key.
9719
+ * @param page A page number within the paginated result set.
9720
+ * @param pageSize Number of results to return per page.
9721
+ * @param platformKey Filter groups by platform key
9722
+ * @returns PaginatedRbacGroupList
9635
9723
  * @throws ApiError
9636
9724
  */
9637
- static coreRbacRolePermissionsRetrieve() {
9725
+ static coreRbacGroupsList(page, pageSize, platformKey) {
9638
9726
  return request(OpenAPI, {
9639
9727
  method: 'GET',
9640
- url: '/api/core/rbac/role/permissions/',
9641
- errors: {
9642
- 404: `Platform not found.`
9728
+ url: '/api/core/rbac/groups/',
9729
+ query: {
9730
+ 'page': page,
9731
+ 'page_size': pageSize,
9732
+ 'platform_key': platformKey
9643
9733
  }
9644
9734
  });
9645
9735
  }
9646
9736
  /**
9647
- * Add a permission to a role.
9737
+ * Create RBAC group
9738
+ * Create a new RBAC group for a platform. Users can be assigned during creation.
9648
9739
  * @param requestBody
9649
- * @returns any Permission already exists for this role.
9740
+ * @returns RbacGroup
9650
9741
  * @throws ApiError
9651
9742
  */
9652
- static coreRbacRolePermissionsCreate(requestBody) {
9743
+ static coreRbacGroupsCreate(requestBody) {
9653
9744
  return request(OpenAPI, {
9654
9745
  method: 'POST',
9655
- url: '/api/core/rbac/role/permissions/',
9746
+ url: '/api/core/rbac/groups/',
9656
9747
  body: requestBody,
9657
9748
  mediaType: 'application/json',
9658
9749
  errors: {
9659
- 400: `Invalid request data.`,
9660
- 404: `Platform not found.`
9750
+ 400: `Invalid input data. Common errors include:
9751
+ - Users do not belong to the specified platform
9752
+ - Invalid user IDs provided`
9753
+ }
9754
+ });
9755
+ }
9756
+ /**
9757
+ * Retrieve RBAC group
9758
+ * Retrieve details of a specific RBAC group including assigned users.
9759
+ * @param id A unique integer value identifying this RBAC Group.
9760
+ * @returns RbacGroup
9761
+ * @throws ApiError
9762
+ */
9763
+ static coreRbacGroupsRetrieve(id) {
9764
+ return request(OpenAPI, {
9765
+ method: 'GET',
9766
+ url: '/api/core/rbac/groups/{id}/',
9767
+ path: {
9768
+ 'id': id
9769
+ },
9770
+ errors: {
9771
+ 404: `Group not found`
9661
9772
  }
9662
9773
  });
9663
9774
  }
9664
9775
  /**
9665
- * Remove a permission from a role.
9666
- * @returns any Permission does not exist for this role.
9776
+ * Update RBAC group
9777
+ * Update an existing RBAC group. Platform validation applies for user assignments.
9778
+ * @param id A unique integer value identifying this RBAC Group.
9779
+ * @param requestBody
9780
+ * @returns RbacGroup
9667
9781
  * @throws ApiError
9668
9782
  */
9669
- static coreRbacRolePermissionsDestroy() {
9783
+ static coreRbacGroupsUpdate(id, requestBody) {
9784
+ return request(OpenAPI, {
9785
+ method: 'PUT',
9786
+ url: '/api/core/rbac/groups/{id}/',
9787
+ path: {
9788
+ 'id': id
9789
+ },
9790
+ body: requestBody,
9791
+ mediaType: 'application/json',
9792
+ errors: {
9793
+ 400: `Invalid input data. Common errors include:
9794
+ - Users do not belong to the specified platform
9795
+ - Invalid user IDs provided`,
9796
+ 404: `Group not found`
9797
+ }
9798
+ });
9799
+ }
9800
+ /**
9801
+ * Partially update RBAC group
9802
+ * Partially update an existing RBAC group. Platform validation applies for user assignments.
9803
+ * @param id A unique integer value identifying this RBAC Group.
9804
+ * @param requestBody
9805
+ * @returns RbacGroup
9806
+ * @throws ApiError
9807
+ */
9808
+ static coreRbacGroupsPartialUpdate(id, requestBody) {
9809
+ return request(OpenAPI, {
9810
+ method: 'PATCH',
9811
+ url: '/api/core/rbac/groups/{id}/',
9812
+ path: {
9813
+ 'id': id
9814
+ },
9815
+ body: requestBody,
9816
+ mediaType: 'application/json',
9817
+ errors: {
9818
+ 400: `Invalid input data. Common errors include:
9819
+ - Users do not belong to the specified platform
9820
+ - Invalid user IDs provided`,
9821
+ 404: `Group not found`
9822
+ }
9823
+ });
9824
+ }
9825
+ /**
9826
+ * Delete RBAC group
9827
+ * Delete an RBAC group and all associated group role assignments.
9828
+ * @param id A unique integer value identifying this RBAC Group.
9829
+ * @returns void
9830
+ * @throws ApiError
9831
+ */
9832
+ static coreRbacGroupsDestroy(id) {
9670
9833
  return request(OpenAPI, {
9671
9834
  method: 'DELETE',
9672
- url: '/api/core/rbac/role/permissions/',
9835
+ url: '/api/core/rbac/groups/{id}/',
9836
+ path: {
9837
+ 'id': id
9838
+ },
9673
9839
  errors: {
9674
- 400: `Invalid request data.`,
9675
- 404: `Platform not found.`
9840
+ 404: `Group not found`
9676
9841
  }
9677
9842
  });
9678
9843
  }
9679
9844
  /**
9680
- * Get all users in a role.
9681
- * @returns any List of users in the role.
9845
+ * List RBAC policies
9846
+ * Retrieve a list of RBAC policies. Can be filtered by platform_key or role_id.
9847
+ * @param page A page number within the paginated result set.
9848
+ * @param pageSize Number of results to return per page.
9849
+ * @param platformKey Filter policies by platform key
9850
+ * @param roleId Filter policies by role ID
9851
+ * @returns PaginatedRbacPolicyList
9682
9852
  * @throws ApiError
9683
9853
  */
9684
- static coreRbacRoleUsersRetrieve() {
9854
+ static coreRbacPoliciesList(page, pageSize, platformKey, roleId) {
9685
9855
  return request(OpenAPI, {
9686
9856
  method: 'GET',
9687
- url: '/api/core/rbac/role/users/',
9857
+ url: '/api/core/rbac/policies/',
9858
+ query: {
9859
+ 'page': page,
9860
+ 'page_size': pageSize,
9861
+ 'platform_key': platformKey,
9862
+ 'role_id': roleId
9863
+ }
9864
+ });
9865
+ }
9866
+ /**
9867
+ * Create RBAC policy
9868
+ * Create a new RBAC policy that defines resource access for a role.
9869
+ * @param requestBody
9870
+ * @returns RbacPolicy
9871
+ * @throws ApiError
9872
+ */
9873
+ static coreRbacPoliciesCreate(requestBody) {
9874
+ return request(OpenAPI, {
9875
+ method: 'POST',
9876
+ url: '/api/core/rbac/policies/',
9877
+ body: requestBody,
9878
+ mediaType: 'application/json',
9688
9879
  errors: {
9689
- 404: `Platform not found.`
9880
+ 400: `Invalid input data`
9690
9881
  }
9691
9882
  });
9692
9883
  }
9693
9884
  /**
9694
- * Get all roles for a platform.
9695
- * @returns any List of roles for the platform.
9885
+ * Retrieve RBAC policy
9886
+ * Retrieve details of a specific RBAC policy.
9887
+ * @param id A unique integer value identifying this RBAC Policy.
9888
+ * @returns RbacPolicy
9696
9889
  * @throws ApiError
9697
9890
  */
9698
- static coreRbacRolesRetrieve() {
9891
+ static coreRbacPoliciesRetrieve(id) {
9699
9892
  return request(OpenAPI, {
9700
9893
  method: 'GET',
9701
- url: '/api/core/rbac/roles/',
9894
+ url: '/api/core/rbac/policies/{id}/',
9895
+ path: {
9896
+ 'id': id
9897
+ },
9702
9898
  errors: {
9703
- 404: `Platform not found.`
9899
+ 404: `Policy not found`
9704
9900
  }
9705
9901
  });
9706
9902
  }
9707
9903
  /**
9708
- * Create a new role.
9709
- * @returns any No response body
9904
+ * Update RBAC policy
9905
+ * Update an existing RBAC policy.
9906
+ * @param id A unique integer value identifying this RBAC Policy.
9907
+ * @param requestBody
9908
+ * @returns RbacPolicy
9710
9909
  * @throws ApiError
9711
9910
  */
9712
- static coreRbacRolesCreate() {
9911
+ static coreRbacPoliciesUpdate(id, requestBody) {
9713
9912
  return request(OpenAPI, {
9714
- method: 'POST',
9715
- url: '/api/core/rbac/roles/'
9913
+ method: 'PUT',
9914
+ url: '/api/core/rbac/policies/{id}/',
9915
+ path: {
9916
+ 'id': id
9917
+ },
9918
+ body: requestBody,
9919
+ mediaType: 'application/json',
9920
+ errors: {
9921
+ 400: `Invalid input data`,
9922
+ 404: `Policy not found`
9923
+ }
9716
9924
  });
9717
9925
  }
9718
9926
  /**
9719
- * Delete a role.
9927
+ * Partially update RBAC policy
9928
+ * Partially update an existing RBAC policy.
9929
+ * @param id A unique integer value identifying this RBAC Policy.
9930
+ * @param requestBody
9931
+ * @returns RbacPolicy
9932
+ * @throws ApiError
9933
+ */
9934
+ static coreRbacPoliciesPartialUpdate(id, requestBody) {
9935
+ return request(OpenAPI, {
9936
+ method: 'PATCH',
9937
+ url: '/api/core/rbac/policies/{id}/',
9938
+ path: {
9939
+ 'id': id
9940
+ },
9941
+ body: requestBody,
9942
+ mediaType: 'application/json',
9943
+ errors: {
9944
+ 400: `Invalid input data`,
9945
+ 404: `Policy not found`
9946
+ }
9947
+ });
9948
+ }
9949
+ /**
9950
+ * Delete RBAC policy
9951
+ * Delete an RBAC policy.
9952
+ * @param id A unique integer value identifying this RBAC Policy.
9720
9953
  * @returns void
9721
9954
  * @throws ApiError
9722
9955
  */
9723
- static coreRbacRolesDestroy() {
9956
+ static coreRbacPoliciesDestroy(id) {
9724
9957
  return request(OpenAPI, {
9725
9958
  method: 'DELETE',
9959
+ url: '/api/core/rbac/policies/{id}/',
9960
+ path: {
9961
+ 'id': id
9962
+ },
9963
+ errors: {
9964
+ 404: `Policy not found`
9965
+ }
9966
+ });
9967
+ }
9968
+ /**
9969
+ * List RBAC roles
9970
+ * Retrieve a list of RBAC roles. Can be filtered by platform_key.
9971
+ * @param page A page number within the paginated result set.
9972
+ * @param pageSize Number of results to return per page.
9973
+ * @param platformKey Filter roles by platform key
9974
+ * @returns PaginatedRbacRoleList
9975
+ * @throws ApiError
9976
+ */
9977
+ static coreRbacRolesList(page, pageSize, platformKey) {
9978
+ return request(OpenAPI, {
9979
+ method: 'GET',
9980
+ url: '/api/core/rbac/roles/',
9981
+ query: {
9982
+ 'page': page,
9983
+ 'page_size': pageSize,
9984
+ 'platform_key': platformKey
9985
+ }
9986
+ });
9987
+ }
9988
+ /**
9989
+ * Create RBAC role
9990
+ * Create a new RBAC role for a platform.
9991
+ * @param requestBody
9992
+ * @returns RbacRole
9993
+ * @throws ApiError
9994
+ */
9995
+ static coreRbacRolesCreate(requestBody) {
9996
+ return request(OpenAPI, {
9997
+ method: 'POST',
9726
9998
  url: '/api/core/rbac/roles/',
9999
+ body: requestBody,
10000
+ mediaType: 'application/json',
9727
10001
  errors: {
9728
- 400: `Invalid request data.`,
9729
- 404: `Platform not found or role does not exist.`
10002
+ 400: `Invalid input data`
9730
10003
  }
9731
10004
  });
9732
10005
  }
9733
10006
  /**
9734
- * Get all roles for a user.
9735
- * @returns any List of roles for the user.
10007
+ * Retrieve RBAC role
10008
+ * Retrieve details of a specific RBAC role.
10009
+ * @param id A unique integer value identifying this RBAC Role.
10010
+ * @returns RbacRole
9736
10011
  * @throws ApiError
9737
10012
  */
9738
- static coreRbacUserRolesRetrieve() {
10013
+ static coreRbacRolesRetrieve(id) {
9739
10014
  return request(OpenAPI, {
9740
10015
  method: 'GET',
9741
- url: '/api/core/rbac/user/roles/',
10016
+ url: '/api/core/rbac/roles/{id}/',
10017
+ path: {
10018
+ 'id': id
10019
+ },
10020
+ errors: {
10021
+ 404: `Role not found`
10022
+ }
10023
+ });
10024
+ }
10025
+ /**
10026
+ * Update RBAC role
10027
+ * Update an existing RBAC role.
10028
+ * @param id A unique integer value identifying this RBAC Role.
10029
+ * @param requestBody
10030
+ * @returns RbacRole
10031
+ * @throws ApiError
10032
+ */
10033
+ static coreRbacRolesUpdate(id, requestBody) {
10034
+ return request(OpenAPI, {
10035
+ method: 'PUT',
10036
+ url: '/api/core/rbac/roles/{id}/',
10037
+ path: {
10038
+ 'id': id
10039
+ },
10040
+ body: requestBody,
10041
+ mediaType: 'application/json',
10042
+ errors: {
10043
+ 400: `Invalid input data`,
10044
+ 404: `Role not found`
10045
+ }
10046
+ });
10047
+ }
10048
+ /**
10049
+ * Partially update RBAC role
10050
+ * Partially update an existing RBAC role.
10051
+ * @param id A unique integer value identifying this RBAC Role.
10052
+ * @param requestBody
10053
+ * @returns RbacRole
10054
+ * @throws ApiError
10055
+ */
10056
+ static coreRbacRolesPartialUpdate(id, requestBody) {
10057
+ return request(OpenAPI, {
10058
+ method: 'PATCH',
10059
+ url: '/api/core/rbac/roles/{id}/',
10060
+ path: {
10061
+ 'id': id
10062
+ },
10063
+ body: requestBody,
10064
+ mediaType: 'application/json',
10065
+ errors: {
10066
+ 400: `Invalid input data`,
10067
+ 404: `Role not found`
10068
+ }
10069
+ });
10070
+ }
10071
+ /**
10072
+ * Delete RBAC role
10073
+ * Delete an RBAC role.
10074
+ * @param id A unique integer value identifying this RBAC Role.
10075
+ * @returns void
10076
+ * @throws ApiError
10077
+ */
10078
+ static coreRbacRolesDestroy(id) {
10079
+ return request(OpenAPI, {
10080
+ method: 'DELETE',
10081
+ url: '/api/core/rbac/roles/{id}/',
10082
+ path: {
10083
+ 'id': id
10084
+ },
9742
10085
  errors: {
9743
- 404: `Platform not found.`
10086
+ 404: `Role not found`
10087
+ }
10088
+ });
10089
+ }
10090
+ /**
10091
+ * List user role assignments
10092
+ * Retrieve a list of user role assignments. Can be filtered by platform_key or user_id.
10093
+ * @param page A page number within the paginated result set.
10094
+ * @param pageSize Number of results to return per page.
10095
+ * @param platformKey Filter user roles by platform key
10096
+ * @param userId Filter user roles by user ID
10097
+ * @returns PaginatedRbacUserRoleList
10098
+ * @throws ApiError
10099
+ */
10100
+ static coreRbacUserRolesList(page, pageSize, platformKey, userId) {
10101
+ return request(OpenAPI, {
10102
+ method: 'GET',
10103
+ url: '/api/core/rbac/user-roles/',
10104
+ query: {
10105
+ 'page': page,
10106
+ 'page_size': pageSize,
10107
+ 'platform_key': platformKey,
10108
+ 'user_id': userId
9744
10109
  }
9745
10110
  });
9746
10111
  }
9747
10112
  /**
9748
- * Add a user to a role.
10113
+ * Create user role assignment
10114
+ * Assign a role to a user. The user must belong to the same platform as the role.
9749
10115
  * @param requestBody
9750
- * @returns any Role already exists for this user.
10116
+ * @returns RbacUserRole
9751
10117
  * @throws ApiError
9752
10118
  */
9753
10119
  static coreRbacUserRolesCreate(requestBody) {
9754
10120
  return request(OpenAPI, {
9755
10121
  method: 'POST',
9756
- url: '/api/core/rbac/user/roles/',
10122
+ url: '/api/core/rbac/user-roles/',
10123
+ body: requestBody,
10124
+ mediaType: 'application/json',
10125
+ errors: {
10126
+ 400: `Invalid input data. Common errors include:
10127
+ - User does not belong to the specified platform
10128
+ - Role platform does not match provided platform_key`
10129
+ }
10130
+ });
10131
+ }
10132
+ /**
10133
+ * Retrieve user role assignment
10134
+ * Retrieve details of a specific user role assignment.
10135
+ * @param id A unique integer value identifying this RBAC User Role.
10136
+ * @returns RbacUserRole
10137
+ * @throws ApiError
10138
+ */
10139
+ static coreRbacUserRolesRetrieve(id) {
10140
+ return request(OpenAPI, {
10141
+ method: 'GET',
10142
+ url: '/api/core/rbac/user-roles/{id}/',
10143
+ path: {
10144
+ 'id': id
10145
+ },
10146
+ errors: {
10147
+ 404: `User role assignment not found`
10148
+ }
10149
+ });
10150
+ }
10151
+ /**
10152
+ * Update user role assignment
10153
+ * Update an existing user role assignment. Platform validation applies.
10154
+ * @param id A unique integer value identifying this RBAC User Role.
10155
+ * @param requestBody
10156
+ * @returns RbacUserRole
10157
+ * @throws ApiError
10158
+ */
10159
+ static coreRbacUserRolesUpdate(id, requestBody) {
10160
+ return request(OpenAPI, {
10161
+ method: 'PUT',
10162
+ url: '/api/core/rbac/user-roles/{id}/',
10163
+ path: {
10164
+ 'id': id
10165
+ },
10166
+ body: requestBody,
10167
+ mediaType: 'application/json',
10168
+ errors: {
10169
+ 400: `Invalid input data. Common errors include:
10170
+ - User does not belong to the specified platform
10171
+ - Role platform does not match provided platform_key`,
10172
+ 404: `User role assignment not found`
10173
+ }
10174
+ });
10175
+ }
10176
+ /**
10177
+ * Partially update user role assignment
10178
+ * Partially update an existing user role assignment. Platform validation applies.
10179
+ * @param id A unique integer value identifying this RBAC User Role.
10180
+ * @param requestBody
10181
+ * @returns RbacUserRole
10182
+ * @throws ApiError
10183
+ */
10184
+ static coreRbacUserRolesPartialUpdate(id, requestBody) {
10185
+ return request(OpenAPI, {
10186
+ method: 'PATCH',
10187
+ url: '/api/core/rbac/user-roles/{id}/',
10188
+ path: {
10189
+ 'id': id
10190
+ },
9757
10191
  body: requestBody,
9758
10192
  mediaType: 'application/json',
9759
10193
  errors: {
9760
- 400: `Invalid request data.`,
9761
- 404: `Platform not found.`
10194
+ 400: `Invalid input data. Common errors include:
10195
+ - User does not belong to the specified platform
10196
+ - Role platform does not match provided platform_key`,
10197
+ 404: `User role assignment not found`
9762
10198
  }
9763
10199
  });
9764
10200
  }
9765
10201
  /**
9766
- * Remove a user from a role.
9767
- * @returns any Role does not exist for this user.
10202
+ * Delete user role assignment
10203
+ * Remove a role assignment from a user.
10204
+ * @param id A unique integer value identifying this RBAC User Role.
10205
+ * @returns void
9768
10206
  * @throws ApiError
9769
10207
  */
9770
- static coreRbacUserRolesDestroy() {
10208
+ static coreRbacUserRolesDestroy(id) {
9771
10209
  return request(OpenAPI, {
9772
10210
  method: 'DELETE',
9773
- url: '/api/core/rbac/user/roles/',
10211
+ url: '/api/core/rbac/user-roles/{id}/',
10212
+ path: {
10213
+ 'id': id
10214
+ },
9774
10215
  errors: {
9775
- 400: `Invalid request data.`,
9776
- 404: `Platform not found.`
10216
+ 404: `User role assignment not found`
9777
10217
  }
9778
10218
  });
9779
10219
  }