@itwin/access-control-client 3.6.0 → 4.0.0
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/CHANGELOG.md +121 -22
- package/README.md +147 -669
- package/lib/cjs/AccessControlClient.d.ts +26 -9
- package/lib/cjs/AccessControlClient.d.ts.map +1 -1
- package/lib/cjs/AccessControlClient.js +21 -5
- package/lib/cjs/AccessControlClient.js.map +1 -1
- package/lib/cjs/access-control-client.d.ts +30 -1
- package/lib/cjs/access-control-client.d.ts.map +1 -1
- package/lib/cjs/access-control-client.js +42 -6
- package/lib/cjs/access-control-client.js.map +1 -1
- package/lib/cjs/accessControlClientInterfaces/GroupClient.d.ts +19 -0
- package/lib/cjs/accessControlClientInterfaces/GroupClient.d.ts.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/GroupClient.js +7 -0
- package/lib/cjs/accessControlClientInterfaces/GroupClient.js.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/GroupMemberInvitationClient.d.ts +15 -0
- package/lib/cjs/accessControlClientInterfaces/GroupMemberInvitationClient.d.ts.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/GroupMemberInvitationClient.js +7 -0
- package/lib/cjs/accessControlClientInterfaces/GroupMemberInvitationClient.js.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/GroupMembersClient.d.ts +19 -0
- package/lib/cjs/accessControlClientInterfaces/GroupMembersClient.d.ts.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/GroupMembersClient.js +7 -0
- package/lib/cjs/accessControlClientInterfaces/GroupMembersClient.js.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/ITwinJobsClient.d.ts +12 -0
- package/lib/cjs/accessControlClientInterfaces/ITwinJobsClient.d.ts.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/ITwinJobsClient.js +7 -0
- package/lib/cjs/accessControlClientInterfaces/ITwinJobsClient.js.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/ItwinSharesClient.d.ts +25 -0
- package/lib/cjs/accessControlClientInterfaces/ItwinSharesClient.d.ts.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/ItwinSharesClient.js +7 -0
- package/lib/cjs/accessControlClientInterfaces/ItwinSharesClient.js.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/MemberInvitationsClient.d.ts +10 -0
- package/lib/cjs/accessControlClientInterfaces/MemberInvitationsClient.d.ts.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/MemberInvitationsClient.js +7 -0
- package/lib/cjs/accessControlClientInterfaces/MemberInvitationsClient.js.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/OwnerMembersClient .d.ts +13 -0
- package/lib/cjs/accessControlClientInterfaces/OwnerMembersClient .d.ts.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/OwnerMembersClient .js +7 -0
- package/lib/cjs/accessControlClientInterfaces/OwnerMembersClient .js.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/PermissionsClient.d.ts +10 -0
- package/lib/cjs/accessControlClientInterfaces/PermissionsClient.d.ts.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/PermissionsClient.js +7 -0
- package/lib/cjs/accessControlClientInterfaces/PermissionsClient.js.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/RolesClient.d.ts +16 -0
- package/lib/cjs/accessControlClientInterfaces/RolesClient.d.ts.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/RolesClient.js +7 -0
- package/lib/cjs/accessControlClientInterfaces/RolesClient.js.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/UserMembersClient.d.ts +16 -0
- package/lib/cjs/accessControlClientInterfaces/UserMembersClient.d.ts.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/UserMembersClient.js +7 -0
- package/lib/cjs/accessControlClientInterfaces/UserMembersClient.js.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/accessControl.d.ts +23 -0
- package/lib/cjs/accessControlClientInterfaces/accessControl.d.ts.map +1 -0
- package/lib/cjs/accessControlClientInterfaces/accessControl.js +7 -0
- package/lib/cjs/accessControlClientInterfaces/accessControl.js.map +1 -0
- package/lib/cjs/subClients/BaseClient.d.ts +88 -22
- package/lib/cjs/subClients/BaseClient.d.ts.map +1 -1
- package/lib/cjs/subClients/BaseClient.js +174 -34
- package/lib/cjs/subClients/BaseClient.js.map +1 -1
- package/lib/cjs/subClients/GroupMemberInvitationsClient.d.ts +33 -0
- package/lib/cjs/subClients/GroupMemberInvitationsClient.d.ts.map +1 -0
- package/lib/cjs/subClients/GroupMemberInvitationsClient.js +48 -0
- package/lib/cjs/subClients/GroupMemberInvitationsClient.js.map +1 -0
- package/lib/cjs/subClients/GroupMembersClient.d.ts +16 -6
- package/lib/cjs/subClients/GroupMembersClient.d.ts.map +1 -1
- package/lib/cjs/subClients/GroupMembersClient.js +22 -13
- package/lib/cjs/subClients/GroupMembersClient.js.map +1 -1
- package/lib/cjs/subClients/GroupsClient.d.ts +17 -9
- package/lib/cjs/subClients/GroupsClient.d.ts.map +1 -1
- package/lib/cjs/subClients/GroupsClient.js +22 -10
- package/lib/cjs/subClients/GroupsClient.js.map +1 -1
- package/lib/cjs/subClients/ITwinJobsClient.d.ts +12 -5
- package/lib/cjs/subClients/ITwinJobsClient.d.ts.map +1 -1
- package/lib/cjs/subClients/ITwinJobsClient.js +15 -3
- package/lib/cjs/subClients/ITwinJobsClient.js.map +1 -1
- package/lib/cjs/subClients/ItwinShares.d.ts +61 -0
- package/lib/cjs/subClients/ItwinShares.d.ts.map +1 -0
- package/lib/cjs/subClients/ItwinShares.js +77 -0
- package/lib/cjs/subClients/ItwinShares.js.map +1 -0
- package/lib/cjs/subClients/MemberInvitationsClient.d.ts +16 -3
- package/lib/cjs/subClients/MemberInvitationsClient.d.ts.map +1 -1
- package/lib/cjs/subClients/MemberInvitationsClient.js +22 -7
- package/lib/cjs/subClients/MemberInvitationsClient.js.map +1 -1
- package/lib/cjs/subClients/OwnerMembersClient.d.ts +45 -6
- package/lib/cjs/subClients/OwnerMembersClient.d.ts.map +1 -1
- package/lib/cjs/subClients/OwnerMembersClient.js +50 -10
- package/lib/cjs/subClients/OwnerMembersClient.js.map +1 -1
- package/lib/cjs/subClients/PermissionsClient.d.ts +10 -3
- package/lib/cjs/subClients/PermissionsClient.d.ts.map +1 -1
- package/lib/cjs/subClients/PermissionsClient.js +14 -2
- package/lib/cjs/subClients/PermissionsClient.js.map +1 -1
- package/lib/cjs/subClients/RolesClient.d.ts +13 -8
- package/lib/cjs/subClients/RolesClient.d.ts.map +1 -1
- package/lib/cjs/subClients/RolesClient.js +18 -6
- package/lib/cjs/subClients/RolesClient.js.map +1 -1
- package/lib/cjs/subClients/UserMembersClient.d.ts +13 -6
- package/lib/cjs/subClients/UserMembersClient.d.ts.map +1 -1
- package/lib/cjs/subClients/UserMembersClient.js +21 -9
- package/lib/cjs/subClients/UserMembersClient.js.map +1 -1
- package/lib/cjs/types/CommonApiTypes.d.ts +78 -0
- package/lib/cjs/types/CommonApiTypes.d.ts.map +1 -0
- package/lib/cjs/types/CommonApiTypes.js +7 -0
- package/lib/cjs/types/CommonApiTypes.js.map +1 -0
- package/lib/cjs/types/GroupMember.d.ts +75 -0
- package/lib/cjs/types/GroupMember.d.ts.map +1 -0
- package/lib/cjs/types/GroupMember.js +7 -0
- package/lib/cjs/types/GroupMember.js.map +1 -0
- package/lib/cjs/types/Groups.d.ts +64 -0
- package/lib/cjs/types/Groups.d.ts.map +1 -0
- package/lib/cjs/types/Groups.js +7 -0
- package/lib/cjs/types/Groups.js.map +1 -0
- package/lib/cjs/types/ITwinJob.d.ts +70 -0
- package/lib/cjs/types/ITwinJob.d.ts.map +1 -0
- package/lib/cjs/types/ITwinJob.js +7 -0
- package/lib/cjs/types/ITwinJob.js.map +1 -0
- package/lib/cjs/types/Invitations.d.ts +128 -0
- package/lib/cjs/types/Invitations.d.ts.map +1 -0
- package/lib/cjs/types/Invitations.js +7 -0
- package/lib/cjs/types/Invitations.js.map +1 -0
- package/lib/cjs/types/Members.d.ts +71 -0
- package/lib/cjs/types/Members.d.ts.map +1 -0
- package/lib/cjs/types/Members.js +7 -0
- package/lib/cjs/types/Members.js.map +1 -0
- package/lib/cjs/types/OwnerMember.d.ts +105 -0
- package/lib/cjs/types/OwnerMember.d.ts.map +1 -0
- package/lib/cjs/types/OwnerMember.js +7 -0
- package/lib/cjs/types/OwnerMember.js.map +1 -0
- package/lib/cjs/types/Permission.d.ts +5 -0
- package/lib/cjs/types/Permission.d.ts.map +1 -0
- package/lib/cjs/types/Permission.js +7 -0
- package/lib/cjs/types/Permission.js.map +1 -0
- package/lib/cjs/types/Role.d.ts +33 -0
- package/lib/cjs/types/Role.d.ts.map +1 -0
- package/lib/cjs/types/Role.js +7 -0
- package/lib/cjs/types/Role.js.map +1 -0
- package/lib/cjs/types/ShareContract.d.ts +80 -0
- package/lib/cjs/types/ShareContract.d.ts.map +1 -0
- package/lib/cjs/types/ShareContract.js +7 -0
- package/lib/cjs/types/ShareContract.js.map +1 -0
- package/lib/cjs/types/UserMembers.d.ts +115 -0
- package/lib/cjs/types/UserMembers.d.ts.map +1 -0
- package/lib/cjs/types/UserMembers.js +7 -0
- package/lib/cjs/types/UserMembers.js.map +1 -0
- package/lib/cjs/types/links.d.ts +20 -0
- package/lib/cjs/types/links.d.ts.map +1 -0
- package/lib/cjs/types/links.js +7 -0
- package/lib/cjs/types/links.js.map +1 -0
- package/lib/cjs/types/typeUtils.d.ts +42 -0
- package/lib/cjs/types/typeUtils.d.ts.map +1 -0
- package/lib/cjs/types/typeUtils.js +25 -0
- package/lib/cjs/types/typeUtils.js.map +1 -0
- package/lib/esm/AccessControlClient.d.ts +26 -9
- package/lib/esm/AccessControlClient.d.ts.map +1 -1
- package/lib/esm/AccessControlClient.js +31 -5
- package/lib/esm/AccessControlClient.js.map +1 -1
- package/lib/esm/access-control-client.d.ts +30 -1
- package/lib/esm/access-control-client.d.ts.map +1 -1
- package/lib/esm/access-control-client.js +33 -1
- package/lib/esm/access-control-client.js.map +1 -1
- package/lib/esm/accessControlClientInterfaces/GroupClient.d.ts +19 -0
- package/lib/esm/accessControlClientInterfaces/GroupClient.d.ts.map +1 -0
- package/lib/esm/accessControlClientInterfaces/GroupClient.js +6 -0
- package/lib/esm/accessControlClientInterfaces/GroupClient.js.map +1 -0
- package/lib/esm/accessControlClientInterfaces/GroupMemberInvitationClient.d.ts +15 -0
- package/lib/esm/accessControlClientInterfaces/GroupMemberInvitationClient.d.ts.map +1 -0
- package/lib/esm/accessControlClientInterfaces/GroupMemberInvitationClient.js +6 -0
- package/lib/esm/accessControlClientInterfaces/GroupMemberInvitationClient.js.map +1 -0
- package/lib/esm/accessControlClientInterfaces/GroupMembersClient.d.ts +19 -0
- package/lib/esm/accessControlClientInterfaces/GroupMembersClient.d.ts.map +1 -0
- package/lib/esm/accessControlClientInterfaces/GroupMembersClient.js +6 -0
- package/lib/esm/accessControlClientInterfaces/GroupMembersClient.js.map +1 -0
- package/lib/esm/accessControlClientInterfaces/ITwinJobsClient.d.ts +12 -0
- package/lib/esm/accessControlClientInterfaces/ITwinJobsClient.d.ts.map +1 -0
- package/lib/esm/accessControlClientInterfaces/ITwinJobsClient.js +6 -0
- package/lib/esm/accessControlClientInterfaces/ITwinJobsClient.js.map +1 -0
- package/lib/esm/accessControlClientInterfaces/ItwinSharesClient.d.ts +25 -0
- package/lib/esm/accessControlClientInterfaces/ItwinSharesClient.d.ts.map +1 -0
- package/lib/esm/accessControlClientInterfaces/ItwinSharesClient.js +6 -0
- package/lib/esm/accessControlClientInterfaces/ItwinSharesClient.js.map +1 -0
- package/lib/esm/accessControlClientInterfaces/MemberInvitationsClient.d.ts +10 -0
- package/lib/esm/accessControlClientInterfaces/MemberInvitationsClient.d.ts.map +1 -0
- package/lib/esm/accessControlClientInterfaces/MemberInvitationsClient.js +6 -0
- package/lib/esm/accessControlClientInterfaces/MemberInvitationsClient.js.map +1 -0
- package/lib/esm/accessControlClientInterfaces/OwnerMembersClient .d.ts +13 -0
- package/lib/esm/accessControlClientInterfaces/OwnerMembersClient .d.ts.map +1 -0
- package/lib/esm/accessControlClientInterfaces/OwnerMembersClient .js +6 -0
- package/lib/esm/accessControlClientInterfaces/OwnerMembersClient .js.map +1 -0
- package/lib/esm/accessControlClientInterfaces/PermissionsClient.d.ts +10 -0
- package/lib/esm/accessControlClientInterfaces/PermissionsClient.d.ts.map +1 -0
- package/lib/esm/accessControlClientInterfaces/PermissionsClient.js +6 -0
- package/lib/esm/accessControlClientInterfaces/PermissionsClient.js.map +1 -0
- package/lib/esm/accessControlClientInterfaces/RolesClient.d.ts +16 -0
- package/lib/esm/accessControlClientInterfaces/RolesClient.d.ts.map +1 -0
- package/lib/esm/accessControlClientInterfaces/RolesClient.js +6 -0
- package/lib/esm/accessControlClientInterfaces/RolesClient.js.map +1 -0
- package/lib/esm/accessControlClientInterfaces/UserMembersClient.d.ts +16 -0
- package/lib/esm/accessControlClientInterfaces/UserMembersClient.d.ts.map +1 -0
- package/lib/esm/accessControlClientInterfaces/UserMembersClient.js +6 -0
- package/lib/esm/accessControlClientInterfaces/UserMembersClient.js.map +1 -0
- package/lib/esm/accessControlClientInterfaces/accessControl.d.ts +23 -0
- package/lib/esm/accessControlClientInterfaces/accessControl.d.ts.map +1 -0
- package/lib/esm/accessControlClientInterfaces/accessControl.js +6 -0
- package/lib/esm/accessControlClientInterfaces/accessControl.js.map +1 -0
- package/lib/esm/subClients/BaseClient.d.ts +88 -22
- package/lib/esm/subClients/BaseClient.d.ts.map +1 -1
- package/lib/esm/subClients/BaseClient.js +175 -35
- package/lib/esm/subClients/BaseClient.js.map +1 -1
- package/lib/esm/subClients/GroupMemberInvitationsClient.d.ts +33 -0
- package/lib/esm/subClients/GroupMemberInvitationsClient.d.ts.map +1 -0
- package/lib/esm/subClients/GroupMemberInvitationsClient.js +44 -0
- package/lib/esm/subClients/GroupMemberInvitationsClient.js.map +1 -0
- package/lib/esm/subClients/GroupMembersClient.d.ts +16 -6
- package/lib/esm/subClients/GroupMembersClient.d.ts.map +1 -1
- package/lib/esm/subClients/GroupMembersClient.js +22 -13
- package/lib/esm/subClients/GroupMembersClient.js.map +1 -1
- package/lib/esm/subClients/GroupsClient.d.ts +17 -9
- package/lib/esm/subClients/GroupsClient.d.ts.map +1 -1
- package/lib/esm/subClients/GroupsClient.js +22 -10
- package/lib/esm/subClients/GroupsClient.js.map +1 -1
- package/lib/esm/subClients/ITwinJobsClient.d.ts +12 -5
- package/lib/esm/subClients/ITwinJobsClient.d.ts.map +1 -1
- package/lib/esm/subClients/ITwinJobsClient.js +15 -3
- package/lib/esm/subClients/ITwinJobsClient.js.map +1 -1
- package/lib/esm/subClients/ItwinShares.d.ts +61 -0
- package/lib/esm/subClients/ItwinShares.d.ts.map +1 -0
- package/lib/esm/subClients/ItwinShares.js +73 -0
- package/lib/esm/subClients/ItwinShares.js.map +1 -0
- package/lib/esm/subClients/MemberInvitationsClient.d.ts +16 -3
- package/lib/esm/subClients/MemberInvitationsClient.d.ts.map +1 -1
- package/lib/esm/subClients/MemberInvitationsClient.js +22 -7
- package/lib/esm/subClients/MemberInvitationsClient.js.map +1 -1
- package/lib/esm/subClients/OwnerMembersClient.d.ts +45 -6
- package/lib/esm/subClients/OwnerMembersClient.d.ts.map +1 -1
- package/lib/esm/subClients/OwnerMembersClient.js +50 -10
- package/lib/esm/subClients/OwnerMembersClient.js.map +1 -1
- package/lib/esm/subClients/PermissionsClient.d.ts +10 -3
- package/lib/esm/subClients/PermissionsClient.d.ts.map +1 -1
- package/lib/esm/subClients/PermissionsClient.js +14 -2
- package/lib/esm/subClients/PermissionsClient.js.map +1 -1
- package/lib/esm/subClients/RolesClient.d.ts +13 -8
- package/lib/esm/subClients/RolesClient.d.ts.map +1 -1
- package/lib/esm/subClients/RolesClient.js +18 -6
- package/lib/esm/subClients/RolesClient.js.map +1 -1
- package/lib/esm/subClients/UserMembersClient.d.ts +13 -6
- package/lib/esm/subClients/UserMembersClient.d.ts.map +1 -1
- package/lib/esm/subClients/UserMembersClient.js +21 -9
- package/lib/esm/subClients/UserMembersClient.js.map +1 -1
- package/lib/esm/types/CommonApiTypes.d.ts +78 -0
- package/lib/esm/types/CommonApiTypes.d.ts.map +1 -0
- package/lib/esm/types/CommonApiTypes.js +6 -0
- package/lib/esm/types/CommonApiTypes.js.map +1 -0
- package/lib/esm/types/GroupMember.d.ts +75 -0
- package/lib/esm/types/GroupMember.d.ts.map +1 -0
- package/lib/esm/types/GroupMember.js +6 -0
- package/lib/esm/types/GroupMember.js.map +1 -0
- package/lib/esm/types/Groups.d.ts +64 -0
- package/lib/esm/types/Groups.d.ts.map +1 -0
- package/lib/esm/types/Groups.js +6 -0
- package/lib/esm/types/Groups.js.map +1 -0
- package/lib/esm/types/ITwinJob.d.ts +70 -0
- package/lib/esm/types/ITwinJob.d.ts.map +1 -0
- package/lib/esm/types/ITwinJob.js +6 -0
- package/lib/esm/types/ITwinJob.js.map +1 -0
- package/lib/esm/types/Invitations.d.ts +128 -0
- package/lib/esm/types/Invitations.d.ts.map +1 -0
- package/lib/esm/types/Invitations.js +6 -0
- package/lib/esm/types/Invitations.js.map +1 -0
- package/lib/esm/types/Members.d.ts +71 -0
- package/lib/esm/types/Members.d.ts.map +1 -0
- package/lib/esm/types/Members.js +6 -0
- package/lib/esm/types/Members.js.map +1 -0
- package/lib/esm/types/OwnerMember.d.ts +105 -0
- package/lib/esm/types/OwnerMember.d.ts.map +1 -0
- package/lib/esm/types/OwnerMember.js +6 -0
- package/lib/esm/types/OwnerMember.js.map +1 -0
- package/lib/esm/types/Permission.d.ts +5 -0
- package/lib/esm/types/Permission.d.ts.map +1 -0
- package/lib/esm/types/Permission.js +6 -0
- package/lib/esm/types/Permission.js.map +1 -0
- package/lib/esm/types/Role.d.ts +33 -0
- package/lib/esm/types/Role.d.ts.map +1 -0
- package/lib/esm/types/Role.js +6 -0
- package/lib/esm/types/Role.js.map +1 -0
- package/lib/esm/types/ShareContract.d.ts +80 -0
- package/lib/esm/types/ShareContract.d.ts.map +1 -0
- package/lib/esm/types/ShareContract.js +6 -0
- package/lib/esm/types/ShareContract.js.map +1 -0
- package/lib/esm/types/UserMembers.d.ts +115 -0
- package/lib/esm/types/UserMembers.d.ts.map +1 -0
- package/lib/esm/types/UserMembers.js +6 -0
- package/lib/esm/types/UserMembers.js.map +1 -0
- package/lib/esm/types/links.d.ts +20 -0
- package/lib/esm/types/links.d.ts.map +1 -0
- package/lib/esm/types/links.js +6 -0
- package/lib/esm/types/links.js.map +1 -0
- package/lib/esm/types/typeUtils.d.ts +42 -0
- package/lib/esm/types/typeUtils.d.ts.map +1 -0
- package/lib/esm/types/typeUtils.js +22 -0
- package/lib/esm/types/typeUtils.js.map +1 -0
- package/package.json +58 -47
- package/CONTRIBUTING.md +0 -90
- package/GETTINGSTARTED.md +0 -35
- package/lib/cjs/accessControlTypes.d.ts +0 -229
- package/lib/cjs/accessControlTypes.d.ts.map +0 -1
- package/lib/cjs/accessControlTypes.js +0 -25
- package/lib/cjs/accessControlTypes.js.map +0 -1
- package/lib/esm/accessControlTypes.d.ts +0 -229
- package/lib/esm/accessControlTypes.d.ts.map +0 -1
- package/lib/esm/accessControlTypes.js +0 -22
- package/lib/esm/accessControlTypes.js.map +0 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module AccessControlClient
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.ITwinSharesClient = void 0;
|
|
11
|
+
const BaseClient_1 = require("./BaseClient");
|
|
12
|
+
/** Client API to perform iTwin share operations.
|
|
13
|
+
* @beta
|
|
14
|
+
*/
|
|
15
|
+
class ITwinSharesClient extends BaseClient_1.BaseClient {
|
|
16
|
+
/** Create a new ITwinSharesClient instance
|
|
17
|
+
* @param url Optional base URL for the access control service. If not provided, defaults to base url.
|
|
18
|
+
*/
|
|
19
|
+
constructor(url) {
|
|
20
|
+
super(url);
|
|
21
|
+
}
|
|
22
|
+
/** Create a new iTwin share
|
|
23
|
+
* @param accessToken The client access token string
|
|
24
|
+
* @param iTwinId The id of the iTwin
|
|
25
|
+
* @param iTwinShare The details of the iTwin share to be created
|
|
26
|
+
* @remarks
|
|
27
|
+
* #### Create
|
|
28
|
+
* Creating an iTwin Share allows your iTwin to be publicly accessible, enabling anyone with the `shareKey` to view its data without needing to sign in. To use a share, take the value of the `shareKey` property and prepend it with the `Basic` prefix in the authorization header of your request.
|
|
29
|
+
*
|
|
30
|
+
* #### Share Contract
|
|
31
|
+
* Each share is governed by a share contract that specifies the APIs available for the share and its associated iTwin.
|
|
32
|
+
* Only an iTwin admin can create iTwin Shares, and only a maximum of 10 shares can be active at a time per application that created it.
|
|
33
|
+
* The share contract expires after 90 days unless a shorter expiration is specified in the request body, with 90 days being the maximum duration. If the expiration property in the request body is left empty, it will default to the maximum duration from the moment of creation.
|
|
34
|
+
* A share can be revoked at any time using the Revoke iTwin Share endpoint.
|
|
35
|
+
* @returns ITwin Share
|
|
36
|
+
* @beta
|
|
37
|
+
*/
|
|
38
|
+
async createITwinShare(accessToken, iTwinId, iTwinShare) {
|
|
39
|
+
const url = `${this._baseUrl}/${iTwinId}/shares`;
|
|
40
|
+
return this.sendGenericAPIRequest(accessToken, "POST", url, iTwinShare);
|
|
41
|
+
}
|
|
42
|
+
/** Get iTwin share
|
|
43
|
+
* @param accessToken The client access token string
|
|
44
|
+
* @param iTwinId The id of the iTwin
|
|
45
|
+
* @param sharedId The id of the iTwin share to be retrieved
|
|
46
|
+
* @returns The iTwin share details
|
|
47
|
+
* @beta
|
|
48
|
+
*/
|
|
49
|
+
async getITwinShare(accessToken, iTwinId, sharedId) {
|
|
50
|
+
const url = `${this._baseUrl}/${iTwinId}/shares/${sharedId}`;
|
|
51
|
+
return this.sendGenericAPIRequest(accessToken, "GET", url);
|
|
52
|
+
}
|
|
53
|
+
/** Get iTwin shares
|
|
54
|
+
* @param accessToken The client access token string
|
|
55
|
+
* @param iTwinId The id of the iTwin
|
|
56
|
+
* @param sharedId The id of the iTwin share to be retrieved
|
|
57
|
+
* @returns The iTwin share details
|
|
58
|
+
* @beta
|
|
59
|
+
*/
|
|
60
|
+
async getITwinShares(accessToken, iTwinId) {
|
|
61
|
+
const url = `${this._baseUrl}/${iTwinId}/shares`;
|
|
62
|
+
return this.sendGenericAPIRequest(accessToken, "GET", url);
|
|
63
|
+
}
|
|
64
|
+
/** Revoke iTwin share
|
|
65
|
+
* @param accessToken The client access token string
|
|
66
|
+
* @param iTwinId The id of the iTwin
|
|
67
|
+
* @param sharedId The id of the iTwin share to be revoked
|
|
68
|
+
* @returns No Content
|
|
69
|
+
* @beta
|
|
70
|
+
*/
|
|
71
|
+
async revokeITwinShare(accessToken, iTwinId, sharedId) {
|
|
72
|
+
const url = `${this._baseUrl}/${iTwinId}/shares/${sharedId}`;
|
|
73
|
+
return this.sendGenericAPIRequest(accessToken, "DELETE", url);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.ITwinSharesClient = ITwinSharesClient;
|
|
77
|
+
//# sourceMappingURL=ItwinShares.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ItwinShares.js","sourceRoot":"","sources":["../../../src/subClients/ItwinShares.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAMH,6CAA0C;AAE1C;;GAEG;AACH,MAAa,iBACX,SAAQ,uBAAU;IAGlB;;OAEG;IACH,YAAmB,GAAY;QAC7B,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACI,KAAK,CAAC,gBAAgB,CAC3B,WAAwB,EACxB,OAAe,EACf,UAAyF;QAEzF,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,SAAS,CAAC;QACjD,OAAO,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC;IAC1E,CAAC;IAEC;;;;;;KAMC;IACI,KAAK,CAAC,aAAa,CACxB,WAAwB,EACxB,OAAe,EACf,QAAgB;QAEhB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,WAAW,QAAQ,EAAE,CAAC;QAC7D,OAAO,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,cAAc,CACzB,WAAwB,EACxB,OAAe;QAEf,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,SAAS,CAAC;QACjD,OAAO,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;IAC7D,CAAC;IAEC;;;;;;KAMC;IACI,KAAK,CAAC,gBAAgB,CAC3B,WAAwB,EACxB,OAAe,EACf,QAAgB;QAEhB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,WAAW,QAAQ,EAAE,CAAC;QAC7D,OAAO,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;IAChE,CAAC;CAEF;AAnFD,8CAmFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module AccessControlClient\n */\n\nimport type { AccessToken } from \"@itwin/core-bentley\";\nimport type { IITwinSharesClient } from \"../accessControlClientInterfaces/ItwinSharesClient\";\nimport type { BentleyAPIResponse } from \"../types/CommonApiTypes\";\nimport type { MultiShareContractResponse, ShareContract, SingleShareContractResponse } from \"../types/ShareContract\";\nimport { BaseClient } from \"./BaseClient\";\n\n/** Client API to perform iTwin share operations.\n * @beta\n */\nexport class ITwinSharesClient\n extends BaseClient\n implements IITwinSharesClient\n{\n /** Create a new ITwinSharesClient instance\n * @param url Optional base URL for the access control service. If not provided, defaults to base url.\n */\n public constructor(url?: string) {\n super(url);\n }\n\n /** Create a new iTwin share\n * @param accessToken The client access token string\n * @param iTwinId The id of the iTwin\n * @param iTwinShare The details of the iTwin share to be created\n * @remarks\n * #### Create\n * Creating an iTwin Share allows your iTwin to be publicly accessible, enabling anyone with the `shareKey` to view its data without needing to sign in. To use a share, take the value of the `shareKey` property and prepend it with the `Basic` prefix in the authorization header of your request.\n *\n * #### Share Contract\n * Each share is governed by a share contract that specifies the APIs available for the share and its associated iTwin.\n * Only an iTwin admin can create iTwin Shares, and only a maximum of 10 shares can be active at a time per application that created it.\n * The share contract expires after 90 days unless a shorter expiration is specified in the request body, with 90 days being the maximum duration. If the expiration property in the request body is left empty, it will default to the maximum duration from the moment of creation.\n * A share can be revoked at any time using the Revoke iTwin Share endpoint.\n * @returns ITwin Share\n * @beta\n */\n public async createITwinShare(\n accessToken: AccessToken,\n iTwinId: string,\n iTwinShare: Partial<Pick<ShareContract, \"shareContract\"> & { expiration: string | null }>\n ): Promise<BentleyAPIResponse<SingleShareContractResponse>> {\n const url = `${this._baseUrl}/${iTwinId}/shares`;\n return this.sendGenericAPIRequest(accessToken, \"POST\", url, iTwinShare);\n }\n\n /** Get iTwin share\n * @param accessToken The client access token string\n * @param iTwinId The id of the iTwin\n * @param sharedId The id of the iTwin share to be retrieved\n * @returns The iTwin share details\n * @beta\n */\n public async getITwinShare(\n accessToken: AccessToken,\n iTwinId: string,\n sharedId: string,\n ): Promise<BentleyAPIResponse<SingleShareContractResponse>> {\n const url = `${this._baseUrl}/${iTwinId}/shares/${sharedId}`;\n return this.sendGenericAPIRequest(accessToken, \"GET\", url);\n }\n\n /** Get iTwin shares\n * @param accessToken The client access token string\n * @param iTwinId The id of the iTwin\n * @param sharedId The id of the iTwin share to be retrieved\n * @returns The iTwin share details\n * @beta\n */\n public async getITwinShares(\n accessToken: AccessToken,\n iTwinId: string,\n ): Promise<BentleyAPIResponse<MultiShareContractResponse>> {\n const url = `${this._baseUrl}/${iTwinId}/shares`;\n return this.sendGenericAPIRequest(accessToken, \"GET\", url);\n }\n\n /** Revoke iTwin share\n * @param accessToken The client access token string\n * @param iTwinId The id of the iTwin\n * @param sharedId The id of the iTwin share to be revoked\n * @returns No Content\n * @beta\n */\n public async revokeITwinShare(\n accessToken: AccessToken,\n iTwinId: string,\n sharedId: string,\n ): Promise<BentleyAPIResponse<undefined>> {\n const url = `${this._baseUrl}/${iTwinId}/shares/${sharedId}`;\n return this.sendGenericAPIRequest(accessToken, \"DELETE\", url);\n }\n\n}\n"]}
|
|
@@ -2,16 +2,29 @@
|
|
|
2
2
|
* @module AccessControlClient
|
|
3
3
|
*/
|
|
4
4
|
import type { AccessToken } from "@itwin/core-bentley";
|
|
5
|
-
import type {
|
|
5
|
+
import type { IMemberInvitationsClient } from "../accessControlClientInterfaces/MemberInvitationsClient";
|
|
6
|
+
import type { BentleyAPIResponse, ODataQueryParams } from "../types/CommonApiTypes";
|
|
7
|
+
import type { MultipleMemberInvitationResponse } from "../types/Invitations";
|
|
6
8
|
import { BaseClient } from "./BaseClient";
|
|
9
|
+
/** Client API to perform iTwin member invitation operations.
|
|
10
|
+
*/
|
|
7
11
|
export declare class MemberInvitationsClient extends BaseClient implements IMemberInvitationsClient {
|
|
12
|
+
/** Create a new MemberInvitationsClient instance
|
|
13
|
+
* @param url Optional base URL for the access control service. If not provided, defaults to base url.
|
|
14
|
+
*/
|
|
8
15
|
constructor(url?: string);
|
|
9
16
|
/** Retrieves a list of iTwin member invitations.
|
|
10
17
|
* @param accessToken The client access token string
|
|
11
18
|
* @param iTwinId The id of the iTwin
|
|
12
19
|
* @returns Array of member invitations
|
|
13
20
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
21
|
+
queryITwinMemberInvitations(accessToken: AccessToken, iTwinId: string, arg?: Pick<ODataQueryParams, "top" | "skip">): Promise<BentleyAPIResponse<MultipleMemberInvitationResponse>>;
|
|
22
|
+
/** Deletes a member invitations.
|
|
23
|
+
* @param accessToken The client access token string
|
|
24
|
+
* @param iTwinId The id of the iTwin
|
|
25
|
+
* @param invitationId The id of the invitation id
|
|
26
|
+
* @returns No Content
|
|
27
|
+
*/
|
|
28
|
+
deleteITwinMemberInvitation(accessToken: AccessToken, iTwinId: string, invitationId: string): Promise<BentleyAPIResponse<undefined>>;
|
|
16
29
|
}
|
|
17
30
|
//# sourceMappingURL=MemberInvitationsClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemberInvitationsClient.d.ts","sourceRoot":"","sources":["../../../src/subClients/MemberInvitationsClient.ts"],"names":[],"mappings":"AAIA;;GAEG;
|
|
1
|
+
{"version":3,"file":"MemberInvitationsClient.d.ts","sourceRoot":"","sources":["../../../src/subClients/MemberInvitationsClient.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0DAA0D,CAAC;AACzG,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;GACG;AACH,qBAAa,uBACX,SAAQ,UACR,YAAW,wBAAwB;IACnC;;OAEG;gBACgB,GAAG,CAAC,EAAE,MAAM;IAI/B;;;;OAIG;IACU,2BAA2B,CACtC,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,EACf,GAAG,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,KAAK,GAAG,MAAM,CAAC,GAC3C,OAAO,CAAC,kBAAkB,CAAC,gCAAgC,CAAC,CAAC;IAahE;;;;;OAKG;IACU,2BAA2B,CACtC,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;CAI1C"}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module AccessControlClient
|
|
8
|
+
*/
|
|
2
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
10
|
exports.MemberInvitationsClient = void 0;
|
|
4
11
|
const BaseClient_1 = require("./BaseClient");
|
|
12
|
+
/** Client API to perform iTwin member invitation operations.
|
|
13
|
+
*/
|
|
5
14
|
class MemberInvitationsClient extends BaseClient_1.BaseClient {
|
|
15
|
+
/** Create a new MemberInvitationsClient instance
|
|
16
|
+
* @param url Optional base URL for the access control service. If not provided, defaults to base url.
|
|
17
|
+
*/
|
|
6
18
|
constructor(url) {
|
|
7
19
|
super(url);
|
|
8
20
|
}
|
|
@@ -11,14 +23,17 @@ class MemberInvitationsClient extends BaseClient_1.BaseClient {
|
|
|
11
23
|
* @param iTwinId The id of the iTwin
|
|
12
24
|
* @returns Array of member invitations
|
|
13
25
|
*/
|
|
14
|
-
async
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
url += `?${this.getQueryString(arg)}`;
|
|
18
|
-
}
|
|
19
|
-
return this.sendGenericAPIRequest(accessToken, "GET", url, undefined, "invitations");
|
|
26
|
+
async queryITwinMemberInvitations(accessToken, iTwinId, arg) {
|
|
27
|
+
const url = `${this._baseUrl}/${iTwinId}/members/invitations${arg ? `?${this.getQueryString(MemberInvitationsClient.paginationParamMapping, { top: arg.top, skip: arg.skip })}` : ''}`;
|
|
28
|
+
return this.sendGenericAPIRequest(accessToken, "GET", url, undefined);
|
|
20
29
|
}
|
|
21
|
-
|
|
30
|
+
/** Deletes a member invitations.
|
|
31
|
+
* @param accessToken The client access token string
|
|
32
|
+
* @param iTwinId The id of the iTwin
|
|
33
|
+
* @param invitationId The id of the invitation id
|
|
34
|
+
* @returns No Content
|
|
35
|
+
*/
|
|
36
|
+
async deleteITwinMemberInvitation(accessToken, iTwinId, invitationId) {
|
|
22
37
|
const url = `${this._baseUrl}/${iTwinId}/members/invitations/${invitationId}`;
|
|
23
38
|
return this.sendGenericAPIRequest(accessToken, "DELETE", url);
|
|
24
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemberInvitationsClient.js","sourceRoot":"","sources":["../../../src/subClients/MemberInvitationsClient.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"MemberInvitationsClient.js","sourceRoot":"","sources":["../../../src/subClients/MemberInvitationsClient.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAMH,6CAA0C;AAE1C;GACG;AACH,MAAa,uBACX,SAAQ,uBAAU;IAElB;;OAEG;IACH,YAAmB,GAAY;QAC7B,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,2BAA2B,CACtC,WAAwB,EACxB,OAAe,EACf,GAA4C;QAE5C,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,uBACrC,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,uBAAuB,CAAC,sBAAsB,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EACtH,EAAE,CAAC;QAEH,OAAO,IAAI,CAAC,qBAAqB,CAC/B,WAAW,EACX,KAAK,EACL,GAAG,EACH,SAAS,CACV,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,2BAA2B,CACtC,WAAwB,EACxB,OAAe,EACf,YAAoB;QAEpB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,wBAAwB,YAAY,EAAE,CAAC;QAC9E,OAAO,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;IAChE,CAAC;CACF;AA9CD,0DA8CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module AccessControlClient\n */\n\nimport type { AccessToken } from \"@itwin/core-bentley\";\nimport type { IMemberInvitationsClient } from \"../accessControlClientInterfaces/MemberInvitationsClient\";\nimport type { BentleyAPIResponse, ODataQueryParams } from \"../types/CommonApiTypes\";\nimport type { MultipleMemberInvitationResponse } from \"../types/Invitations\";\nimport { BaseClient } from \"./BaseClient\";\n\n/** Client API to perform iTwin member invitation operations.\n */\nexport class MemberInvitationsClient\n extends BaseClient\n implements IMemberInvitationsClient {\n /** Create a new MemberInvitationsClient instance\n * @param url Optional base URL for the access control service. If not provided, defaults to base url.\n */\n public constructor(url?: string) {\n super(url);\n }\n\n /** Retrieves a list of iTwin member invitations.\n * @param accessToken The client access token string\n * @param iTwinId The id of the iTwin\n * @returns Array of member invitations\n */\n public async queryITwinMemberInvitations(\n accessToken: AccessToken,\n iTwinId: string,\n arg?: Pick<ODataQueryParams, \"top\" | \"skip\">\n ): Promise<BentleyAPIResponse<MultipleMemberInvitationResponse>> {\n const url = `${this._baseUrl}/${iTwinId}/members/invitations${\n arg ? `?${this.getQueryString(MemberInvitationsClient.paginationParamMapping, { top: arg.top, skip: arg.skip })}` : ''\n }`;\n\n return this.sendGenericAPIRequest(\n accessToken,\n \"GET\",\n url,\n undefined,\n );\n }\n\n /** Deletes a member invitations.\n * @param accessToken The client access token string\n * @param iTwinId The id of the iTwin\n * @param invitationId The id of the invitation id\n * @returns No Content\n */\n public async deleteITwinMemberInvitation(\n accessToken: AccessToken,\n iTwinId: string,\n invitationId: string\n ): Promise<BentleyAPIResponse<undefined>> {\n const url = `${this._baseUrl}/${iTwinId}/members/invitations/${invitationId}`;\n return this.sendGenericAPIRequest(accessToken, \"DELETE\", url);\n }\n}\n"]}
|
|
@@ -2,29 +2,68 @@
|
|
|
2
2
|
* @module AccessControlClient
|
|
3
3
|
*/
|
|
4
4
|
import type { AccessToken } from "@itwin/core-bentley";
|
|
5
|
-
import type {
|
|
5
|
+
import type { IOwnerMembersClient } from "../accessControlClientInterfaces/OwnerMembersClient ";
|
|
6
|
+
import type { BentleyAPIResponse, ODataQueryParams } from "../types/CommonApiTypes";
|
|
7
|
+
import type { OwnerMember } from "../types/Members";
|
|
8
|
+
import type { AddOwnerMemberResponse, OwnerMemberMultiResponse } from "../types/OwnerMember";
|
|
6
9
|
import { BaseClient } from "./BaseClient";
|
|
10
|
+
/** Client API to perform owner member operations.
|
|
11
|
+
*/
|
|
7
12
|
export declare class OwnerMembersClient extends BaseClient implements IOwnerMembersClient {
|
|
13
|
+
/** Create a new OwnerMembersClient instance
|
|
14
|
+
* @param url Optional base URL for the access control service. If not provided, defaults to base url.
|
|
15
|
+
*/
|
|
8
16
|
constructor(url?: string);
|
|
9
17
|
/** Retrieves a list of iTwin owner members on an iTwin.
|
|
10
18
|
* @param accessToken The client access token string
|
|
11
19
|
* @param iTwinId The id of the iTwin
|
|
12
|
-
* @
|
|
20
|
+
* @param arg Optional query parameters for pagination (top, skip)
|
|
21
|
+
* @returns Array of owner members, including any "missing users" with null profile data
|
|
22
|
+
* @remarks
|
|
23
|
+
* **Missing Users**
|
|
24
|
+
*
|
|
25
|
+
* When members are removed from the Bentley Identity Management System, they are not
|
|
26
|
+
* automatically removed from the iTwin. Therefore, it is possible to have a situation
|
|
27
|
+
* where the user is no longer valid, yet they are still a member of the iTwin. When
|
|
28
|
+
* this happens, the user member will be returned from this API endpoint with the
|
|
29
|
+
* following values:
|
|
30
|
+
*
|
|
31
|
+
* ```json
|
|
32
|
+
* {
|
|
33
|
+
* "id": "<memberId>",
|
|
34
|
+
* "email": null,
|
|
35
|
+
* "givenName": null,
|
|
36
|
+
* "surname": null,
|
|
37
|
+
* "organization": null,
|
|
38
|
+
* ...
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* You should account for this in your software if you do not want to show these users.
|
|
43
|
+
*
|
|
44
|
+
* **Cleanup**
|
|
45
|
+
*
|
|
46
|
+
* The Access Control API will perform a once-a-week cleanup to remove these "Missing Users".
|
|
47
|
+
* You can rely on this automated clean-up if this timeline is sufficient.
|
|
48
|
+
*
|
|
49
|
+
* If not, you can use the Remove iTwin Owner Member API (use the memberId) to remove
|
|
50
|
+
* the owner member from the iTwin.
|
|
51
|
+
*
|
|
13
52
|
*/
|
|
14
|
-
|
|
15
|
-
/** Add new iTwin owner member
|
|
53
|
+
queryITwinOwnerMembers(accessToken: AccessToken, iTwinId: string, arg?: Pick<ODataQueryParams, "top" | "skip">): Promise<BentleyAPIResponse<OwnerMemberMultiResponse>>;
|
|
54
|
+
/** Add new iTwin owner member.
|
|
16
55
|
* @param accessToken The client access token string
|
|
17
56
|
* @param iTwinId The id of the iTwin
|
|
18
57
|
* @param newMember The new owner member to add or invite
|
|
19
58
|
* @returns AddOwnerMemberResponse -- the added or invited owner
|
|
20
59
|
*/
|
|
21
|
-
|
|
60
|
+
addITwinOwnerMember(accessToken: AccessToken, iTwinId: string, newMember: Pick<OwnerMember, "email">): Promise<BentleyAPIResponse<AddOwnerMemberResponse>>;
|
|
22
61
|
/** Remove the specified owner member from the iTwin
|
|
23
62
|
* @param accessToken The client access token string
|
|
24
63
|
* @param iTwinId The id of the iTwin
|
|
25
64
|
* @param memberId The id of the member
|
|
26
65
|
* @returns No Content
|
|
27
66
|
*/
|
|
28
|
-
|
|
67
|
+
removeITwinOwnerMember(accessToken: AccessToken, iTwinId: string, memberId: string): Promise<BentleyAPIResponse<undefined>>;
|
|
29
68
|
}
|
|
30
69
|
//# sourceMappingURL=OwnerMembersClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwnerMembersClient.d.ts","sourceRoot":"","sources":["../../../src/subClients/OwnerMembersClient.ts"],"names":[],"mappings":"AAIA;;GAEG;
|
|
1
|
+
{"version":3,"file":"OwnerMembersClient.d.ts","sourceRoot":"","sources":["../../../src/subClients/OwnerMembersClient.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAChG,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;GACG;AACH,qBAAa,kBACX,SAAQ,UACR,YAAW,mBAAmB;IAC9B;;OAEG;gBACgB,GAAG,CAAC,EAAE,MAAM;IAI/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACU,sBAAsB,CACjC,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,EACf,GAAG,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,KAAK,GAAG,MAAM,CAAC,GAC3C,OAAO,CAAC,kBAAkB,CAAC,wBAAwB,CAAC,CAAC;IAaxD;;;;;OAKG;IACU,mBAAmB,CAC9B,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,GACpC,OAAO,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IAUtD;;;;;OAKG;IACU,sBAAsB,CACjC,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;CAI1C"}
|
|
@@ -1,30 +1,70 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module AccessControlClient
|
|
8
|
+
*/
|
|
2
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
10
|
exports.OwnerMembersClient = void 0;
|
|
4
11
|
const BaseClient_1 = require("./BaseClient");
|
|
12
|
+
/** Client API to perform owner member operations.
|
|
13
|
+
*/
|
|
5
14
|
class OwnerMembersClient extends BaseClient_1.BaseClient {
|
|
15
|
+
/** Create a new OwnerMembersClient instance
|
|
16
|
+
* @param url Optional base URL for the access control service. If not provided, defaults to base url.
|
|
17
|
+
*/
|
|
6
18
|
constructor(url) {
|
|
7
19
|
super(url);
|
|
8
20
|
}
|
|
9
21
|
/** Retrieves a list of iTwin owner members on an iTwin.
|
|
10
22
|
* @param accessToken The client access token string
|
|
11
23
|
* @param iTwinId The id of the iTwin
|
|
12
|
-
* @
|
|
24
|
+
* @param arg Optional query parameters for pagination (top, skip)
|
|
25
|
+
* @returns Array of owner members, including any "missing users" with null profile data
|
|
26
|
+
* @remarks
|
|
27
|
+
* **Missing Users**
|
|
28
|
+
*
|
|
29
|
+
* When members are removed from the Bentley Identity Management System, they are not
|
|
30
|
+
* automatically removed from the iTwin. Therefore, it is possible to have a situation
|
|
31
|
+
* where the user is no longer valid, yet they are still a member of the iTwin. When
|
|
32
|
+
* this happens, the user member will be returned from this API endpoint with the
|
|
33
|
+
* following values:
|
|
34
|
+
*
|
|
35
|
+
* ```json
|
|
36
|
+
* {
|
|
37
|
+
* "id": "<memberId>",
|
|
38
|
+
* "email": null,
|
|
39
|
+
* "givenName": null,
|
|
40
|
+
* "surname": null,
|
|
41
|
+
* "organization": null,
|
|
42
|
+
* ...
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* You should account for this in your software if you do not want to show these users.
|
|
47
|
+
*
|
|
48
|
+
* **Cleanup**
|
|
49
|
+
*
|
|
50
|
+
* The Access Control API will perform a once-a-week cleanup to remove these "Missing Users".
|
|
51
|
+
* You can rely on this automated clean-up if this timeline is sufficient.
|
|
52
|
+
*
|
|
53
|
+
* If not, you can use the Remove iTwin Owner Member API (use the memberId) to remove
|
|
54
|
+
* the owner member from the iTwin.
|
|
55
|
+
*
|
|
13
56
|
*/
|
|
14
|
-
async
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
url += `?${this.getQueryString(arg)}`;
|
|
18
|
-
}
|
|
19
|
-
return this.sendGenericAPIRequest(accessToken, "GET", url, undefined, "members"); // TODO: Consider how to handle paging
|
|
57
|
+
async queryITwinOwnerMembers(accessToken, iTwinId, arg) {
|
|
58
|
+
const url = `${this._baseUrl}/${iTwinId}/members/owners${arg ? `?${this.getQueryString(OwnerMembersClient.paginationParamMapping, { top: arg.top, skip: arg.skip })}` : ''}`;
|
|
59
|
+
return this.sendGenericAPIRequest(accessToken, "GET", url, undefined);
|
|
20
60
|
}
|
|
21
|
-
/** Add new iTwin owner member
|
|
61
|
+
/** Add new iTwin owner member.
|
|
22
62
|
* @param accessToken The client access token string
|
|
23
63
|
* @param iTwinId The id of the iTwin
|
|
24
64
|
* @param newMember The new owner member to add or invite
|
|
25
65
|
* @returns AddOwnerMemberResponse -- the added or invited owner
|
|
26
66
|
*/
|
|
27
|
-
async
|
|
67
|
+
async addITwinOwnerMember(accessToken, iTwinId, newMember) {
|
|
28
68
|
const url = `${this._baseUrl}/${iTwinId}/members/owners`;
|
|
29
69
|
return this.sendGenericAPIRequest(accessToken, "POST", url, newMember);
|
|
30
70
|
}
|
|
@@ -34,7 +74,7 @@ class OwnerMembersClient extends BaseClient_1.BaseClient {
|
|
|
34
74
|
* @param memberId The id of the member
|
|
35
75
|
* @returns No Content
|
|
36
76
|
*/
|
|
37
|
-
async
|
|
77
|
+
async removeITwinOwnerMember(accessToken, iTwinId, memberId) {
|
|
38
78
|
const url = `${this._baseUrl}/${iTwinId}/members/owners/${memberId}`;
|
|
39
79
|
return this.sendGenericAPIRequest(accessToken, "DELETE", url);
|
|
40
80
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwnerMembersClient.js","sourceRoot":"","sources":["../../../src/subClients/OwnerMembersClient.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"OwnerMembersClient.js","sourceRoot":"","sources":["../../../src/subClients/OwnerMembersClient.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAOH,6CAA0C;AAE1C;GACG;AACH,MAAa,kBACX,SAAQ,uBAAU;IAElB;;OAEG;IACH,YAAmB,GAAY;QAC7B,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACI,KAAK,CAAC,sBAAsB,CACjC,WAAwB,EACxB,OAAe,EACf,GAA4C;QAE5C,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,kBACrC,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EACjH,EAAE,CAAC;QAEH,OAAO,IAAI,CAAC,qBAAqB,CAC/B,WAAW,EACX,KAAK,EACL,GAAG,EACH,SAAS,CACV,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,mBAAmB,CAC9B,WAAwB,EACxB,OAAe,EACf,SAAqC;QAErC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,iBAAiB,CAAC;QACzD,OAAO,IAAI,CAAC,qBAAqB,CAC/B,WAAW,EACX,MAAM,EACN,GAAG,EACH,SAAS,CACV,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,sBAAsB,CACjC,WAAwB,EACxB,OAAe,EACf,QAAgB;QAEhB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,mBAAmB,QAAQ,EAAE,CAAC;QACrE,OAAO,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;IAChE,CAAC;CACF;AAjGD,gDAiGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module AccessControlClient\n */\n\nimport type { AccessToken } from \"@itwin/core-bentley\";\nimport type { IOwnerMembersClient } from \"../accessControlClientInterfaces/OwnerMembersClient \";\nimport type { BentleyAPIResponse, ODataQueryParams } from \"../types/CommonApiTypes\";\nimport type { OwnerMember } from \"../types/Members\";\nimport type { AddOwnerMemberResponse, OwnerMemberMultiResponse } from \"../types/OwnerMember\";\nimport { BaseClient } from \"./BaseClient\";\n\n/** Client API to perform owner member operations.\n */\nexport class OwnerMembersClient\n extends BaseClient\n implements IOwnerMembersClient {\n /** Create a new OwnerMembersClient instance\n * @param url Optional base URL for the access control service. If not provided, defaults to base url.\n */\n public constructor(url?: string) {\n super(url);\n }\n\n /** Retrieves a list of iTwin owner members on an iTwin.\n * @param accessToken The client access token string\n * @param iTwinId The id of the iTwin\n * @param arg Optional query parameters for pagination (top, skip)\n * @returns Array of owner members, including any \"missing users\" with null profile data\n * @remarks\n * **Missing Users**\n *\n * When members are removed from the Bentley Identity Management System, they are not\n * automatically removed from the iTwin. Therefore, it is possible to have a situation\n * where the user is no longer valid, yet they are still a member of the iTwin. When\n * this happens, the user member will be returned from this API endpoint with the\n * following values:\n *\n * ```json\n * {\n * \"id\": \"<memberId>\",\n * \"email\": null,\n * \"givenName\": null,\n * \"surname\": null,\n * \"organization\": null,\n * ...\n * }\n * ```\n *\n * You should account for this in your software if you do not want to show these users.\n *\n * **Cleanup**\n *\n * The Access Control API will perform a once-a-week cleanup to remove these \"Missing Users\".\n * You can rely on this automated clean-up if this timeline is sufficient.\n *\n * If not, you can use the Remove iTwin Owner Member API (use the memberId) to remove\n * the owner member from the iTwin.\n *\n */\n public async queryITwinOwnerMembers(\n accessToken: AccessToken,\n iTwinId: string,\n arg?: Pick<ODataQueryParams, \"top\" | \"skip\">\n ): Promise<BentleyAPIResponse<OwnerMemberMultiResponse>> {\n const url = `${this._baseUrl}/${iTwinId}/members/owners${\n arg ? `?${this.getQueryString(OwnerMembersClient.paginationParamMapping, { top: arg.top, skip: arg.skip })}` : ''\n }`;\n\n return this.sendGenericAPIRequest(\n accessToken,\n \"GET\",\n url,\n undefined,\n );\n }\n\n /** Add new iTwin owner member.\n * @param accessToken The client access token string\n * @param iTwinId The id of the iTwin\n * @param newMember The new owner member to add or invite\n * @returns AddOwnerMemberResponse -- the added or invited owner\n */\n public async addITwinOwnerMember(\n accessToken: AccessToken,\n iTwinId: string,\n newMember: Pick<OwnerMember, \"email\">\n ): Promise<BentleyAPIResponse<AddOwnerMemberResponse>> {\n const url = `${this._baseUrl}/${iTwinId}/members/owners`;\n return this.sendGenericAPIRequest(\n accessToken,\n \"POST\",\n url,\n newMember\n );\n }\n\n /** Remove the specified owner member from the iTwin\n * @param accessToken The client access token string\n * @param iTwinId The id of the iTwin\n * @param memberId The id of the member\n * @returns No Content\n */\n public async removeITwinOwnerMember(\n accessToken: AccessToken,\n iTwinId: string,\n memberId: string\n ): Promise<BentleyAPIResponse<undefined>> {\n const url = `${this._baseUrl}/${iTwinId}/members/owners/${memberId}`;\n return this.sendGenericAPIRequest(accessToken, \"DELETE\", url);\n }\n}\n"]}
|
|
@@ -2,20 +2,27 @@
|
|
|
2
2
|
* @module AccessControlClient
|
|
3
3
|
*/
|
|
4
4
|
import type { AccessToken } from "@itwin/core-bentley";
|
|
5
|
-
import type {
|
|
5
|
+
import type { IPermissionsClient } from "../accessControlClientInterfaces/PermissionsClient";
|
|
6
|
+
import type { BentleyAPIResponse } from "../types/CommonApiTypes";
|
|
7
|
+
import type { Permission } from "../types/Permission";
|
|
6
8
|
import { BaseClient } from "./BaseClient";
|
|
9
|
+
/** Client API to perform iTwin permission operations.
|
|
10
|
+
*/
|
|
7
11
|
export declare class PermissionsClient extends BaseClient implements IPermissionsClient {
|
|
12
|
+
/** Create a new PermissionsClient instance
|
|
13
|
+
* @param url Optional base URL for the access control service. If not provided, defaults to base url.
|
|
14
|
+
*/
|
|
8
15
|
constructor(url?: string);
|
|
9
16
|
/** Retrieves the list of all available permissions
|
|
10
17
|
* @param accessToken The client access token string
|
|
11
18
|
* @returns Array of permissions
|
|
12
19
|
*/
|
|
13
|
-
|
|
20
|
+
getPermissions(accessToken: AccessToken): Promise<BentleyAPIResponse<Permission[]>>;
|
|
14
21
|
/** Retrieves a list of permissions the identity has for a specified iTwin
|
|
15
22
|
* @param accessToken The client access token string
|
|
16
23
|
* @param iTwinId The id of the iTwin
|
|
17
24
|
* @returns Array of permissions
|
|
18
25
|
*/
|
|
19
|
-
|
|
26
|
+
getITwinPermissions(accessToken: AccessToken, iTwinId: string): Promise<BentleyAPIResponse<Permission[]>>;
|
|
20
27
|
}
|
|
21
28
|
//# sourceMappingURL=PermissionsClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PermissionsClient.d.ts","sourceRoot":"","sources":["../../../src/subClients/PermissionsClient.ts"],"names":[],"mappings":"AAIA;;GAEG;
|
|
1
|
+
{"version":3,"file":"PermissionsClient.d.ts","sourceRoot":"","sources":["../../../src/subClients/PermissionsClient.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAC7F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;GACG;AACH,qBAAa,iBAAkB,SAAQ,UAAW,YAAW,kBAAkB;IAC7E;;OAEG;gBACgB,GAAG,CAAC,EAAE,MAAM;IAI/B;;;QAGI;IACS,cAAc,CACzB,WAAW,EAAE,WAAW,GACvB,OAAO,CAAC,kBAAkB,CAAC,UAAU,EAAE,CAAC,CAAC;IAK5C;;;;QAII;IACS,mBAAmB,CAC9B,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,kBAAkB,CAAC,UAAU,EAAE,CAAC,CAAC;CAI7C"}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module AccessControlClient
|
|
8
|
+
*/
|
|
2
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
10
|
exports.PermissionsClient = void 0;
|
|
4
11
|
const BaseClient_1 = require("./BaseClient");
|
|
12
|
+
/** Client API to perform iTwin permission operations.
|
|
13
|
+
*/
|
|
5
14
|
class PermissionsClient extends BaseClient_1.BaseClient {
|
|
15
|
+
/** Create a new PermissionsClient instance
|
|
16
|
+
* @param url Optional base URL for the access control service. If not provided, defaults to base url.
|
|
17
|
+
*/
|
|
6
18
|
constructor(url) {
|
|
7
19
|
super(url);
|
|
8
20
|
}
|
|
@@ -10,7 +22,7 @@ class PermissionsClient extends BaseClient_1.BaseClient {
|
|
|
10
22
|
* @param accessToken The client access token string
|
|
11
23
|
* @returns Array of permissions
|
|
12
24
|
*/
|
|
13
|
-
async
|
|
25
|
+
async getPermissions(accessToken) {
|
|
14
26
|
const url = `${this._baseUrl}/permissions`;
|
|
15
27
|
return this.sendGenericAPIRequest(accessToken, "GET", url, undefined, "permissions");
|
|
16
28
|
}
|
|
@@ -19,7 +31,7 @@ class PermissionsClient extends BaseClient_1.BaseClient {
|
|
|
19
31
|
* @param iTwinId The id of the iTwin
|
|
20
32
|
* @returns Array of permissions
|
|
21
33
|
*/
|
|
22
|
-
async
|
|
34
|
+
async getITwinPermissions(accessToken, iTwinId) {
|
|
23
35
|
const url = `${this._baseUrl}/${iTwinId}/permissions`;
|
|
24
36
|
return this.sendGenericAPIRequest(accessToken, "GET", url, undefined, "permissions");
|
|
25
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PermissionsClient.js","sourceRoot":"","sources":["../../../src/subClients/PermissionsClient.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PermissionsClient.js","sourceRoot":"","sources":["../../../src/subClients/PermissionsClient.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAMH,6CAA0C;AAE1C;GACG;AACH,MAAa,iBAAkB,SAAQ,uBAAU;IAC/C;;OAEG;IACH,YAAmB,GAAY;QAC7B,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAED;;;QAGI;IACG,KAAK,CAAC,cAAc,CACzB,WAAwB;QAExB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,cAAc,CAAC;QAC3C,OAAO,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;IACvF,CAAC;IAED;;;;QAII;IACG,KAAK,CAAC,mBAAmB,CAC9B,WAAwB,EACxB,OAAe;QAEf,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,cAAc,CAAC;QACtD,OAAO,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;IACvF,CAAC;CACF;AA/BD,8CA+BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module AccessControlClient\r\n */\r\n\r\nimport type { AccessToken } from \"@itwin/core-bentley\";\r\nimport type { IPermissionsClient } from \"../accessControlClientInterfaces/PermissionsClient\";\r\nimport type { BentleyAPIResponse } from \"../types/CommonApiTypes\";\r\nimport type { Permission } from \"../types/Permission\";\r\nimport { BaseClient } from \"./BaseClient\";\r\n\r\n/** Client API to perform iTwin permission operations.\r\n */\r\nexport class PermissionsClient extends BaseClient implements IPermissionsClient{\r\n /** Create a new PermissionsClient instance\r\n * @param url Optional base URL for the access control service. If not provided, defaults to base url.\r\n */\r\n public constructor(url?: string) {\r\n super(url);\r\n }\r\n\r\n /** Retrieves the list of all available permissions\r\n * @param accessToken The client access token string\r\n * @returns Array of permissions\r\n */\r\n public async getPermissions(\r\n accessToken: AccessToken,\r\n ): Promise<BentleyAPIResponse<Permission[]>>{\r\n const url = `${this._baseUrl}/permissions`;\r\n return this.sendGenericAPIRequest(accessToken, \"GET\", url, undefined, \"permissions\");\r\n }\r\n\r\n /** Retrieves a list of permissions the identity has for a specified iTwin\r\n * @param accessToken The client access token string\r\n * @param iTwinId The id of the iTwin\r\n * @returns Array of permissions\r\n */\r\n public async getITwinPermissions(\r\n accessToken: AccessToken,\r\n iTwinId: string,\r\n ): Promise<BentleyAPIResponse<Permission[]>>{\r\n const url = `${this._baseUrl}/${iTwinId}/permissions`;\r\n return this.sendGenericAPIRequest(accessToken, \"GET\", url, undefined, \"permissions\");\r\n }\r\n}\r\n"]}
|
|
@@ -2,38 +2,43 @@
|
|
|
2
2
|
* @module AccessControlClient
|
|
3
3
|
*/
|
|
4
4
|
import type { AccessToken } from "@itwin/core-bentley";
|
|
5
|
-
import type {
|
|
5
|
+
import type { IRolesClient } from "../accessControlClientInterfaces/RolesClient";
|
|
6
|
+
import type { BentleyAPIResponse } from "../types/CommonApiTypes";
|
|
7
|
+
import type { Role } from "../types/Role";
|
|
6
8
|
import { BaseClient } from "./BaseClient";
|
|
9
|
+
/** Client API to perform iTwin role operations.
|
|
10
|
+
*/
|
|
7
11
|
export declare class RolesClient extends BaseClient implements IRolesClient {
|
|
12
|
+
/** Create a new RolesClient instance
|
|
13
|
+
* @param url Optional base URL for the access control service. If not provided, defaults to base url.
|
|
14
|
+
*/
|
|
8
15
|
constructor(url?: string);
|
|
9
16
|
/** Retrieves a list of available user roles that are defined for a specified iTwin
|
|
10
17
|
* @param accessToken The client access token string
|
|
11
18
|
* @param iTwinId The id of the iTwin
|
|
12
19
|
* @returns Roles
|
|
13
20
|
*/
|
|
14
|
-
|
|
15
|
-
[key: string]: string;
|
|
16
|
-
}): Promise<AccessControlAPIResponse<Role[]>>;
|
|
21
|
+
getITwinRoles(accessToken: AccessToken, iTwinId: string): Promise<BentleyAPIResponse<Role[]>>;
|
|
17
22
|
/** Retrieves the specified role for the specified iTwin
|
|
18
23
|
* @param accessToken The client access token string
|
|
19
24
|
* @param iTwinId The id of the iTwin
|
|
20
25
|
* @returns Role
|
|
21
26
|
*/
|
|
22
|
-
|
|
27
|
+
getITwinRole(accessToken: AccessToken, iTwinId: string, roleId: string): Promise<BentleyAPIResponse<Role>>;
|
|
23
28
|
/** Creates a new iTwin Role
|
|
24
29
|
* @param accessToken The client access token string
|
|
25
30
|
* @param iTwinId The id of the iTwin
|
|
26
31
|
* @param role The role to be created
|
|
27
32
|
* @returns Role
|
|
28
33
|
*/
|
|
29
|
-
|
|
34
|
+
createITwinRole(accessToken: AccessToken, iTwinId: string, role: Pick<Role, "displayName" | "description">): Promise<BentleyAPIResponse<Pick<Role, "id" | "displayName" | "description">>>;
|
|
30
35
|
/** Delete the specified iTwin role
|
|
31
36
|
* @param accessToken The client access token string
|
|
32
37
|
* @param iTwinId The id of the iTwin
|
|
33
38
|
* @param roleId The id of the role to remove
|
|
34
39
|
* @returns No Content
|
|
35
40
|
*/
|
|
36
|
-
|
|
41
|
+
deleteITwinRole(accessToken: AccessToken, iTwinId: string, roleId: string): Promise<BentleyAPIResponse<undefined>>;
|
|
37
42
|
/** Update the specified iTwin role
|
|
38
43
|
* @param accessToken The client access token string
|
|
39
44
|
* @param iTwinId The id of the iTwin
|
|
@@ -41,6 +46,6 @@ export declare class RolesClient extends BaseClient implements IRolesClient {
|
|
|
41
46
|
* @param role The updated role
|
|
42
47
|
* @returns Role
|
|
43
48
|
*/
|
|
44
|
-
|
|
49
|
+
updateITwinRole(accessToken: AccessToken, iTwinId: string, roleId: string, role: Partial<Omit<Role, "id">>): Promise<BentleyAPIResponse<Role>>;
|
|
45
50
|
}
|
|
46
51
|
//# sourceMappingURL=RolesClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RolesClient.d.ts","sourceRoot":"","sources":["../../../src/subClients/RolesClient.ts"],"names":[],"mappings":"AAIA;;GAEG;
|
|
1
|
+
{"version":3,"file":"RolesClient.d.ts","sourceRoot":"","sources":["../../../src/subClients/RolesClient.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;GACG;AACH,qBAAa,WAAY,SAAQ,UAAW,YAAW,YAAY;IACjE;;OAEG;gBACgB,GAAG,CAAC,EAAE,MAAM;IAI/B;;;;QAII;IACS,aAAa,CACxB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC,CAAC;IAKtC;;;;QAII;IACS,YAAY,CACvB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAKpC;;;;;QAKI;IACS,eAAe,CAC1B,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,aAAa,GAAG,aAAa,CAAC,GAC9C,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,aAAa,GAAG,aAAa,CAAC,CAAC,CAAC;IAKhF;;;;;QAKI;IACS,eAAe,CAC1B,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAKzC;;;;;;QAMI;IACS,eAAe,CAC1B,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAC9B,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;CAIrC"}
|