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