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