@itwin/access-control-client 3.7.0 → 4.1.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 +124 -25
- 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 +12 -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 -29
- package/lib/cjs/subClients/BaseClient.d.ts.map +1 -1
- package/lib/cjs/subClients/BaseClient.js +165 -40
- 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 +18 -10
- package/lib/cjs/subClients/GroupsClient.d.ts.map +1 -1
- package/lib/cjs/subClients/GroupsClient.js +27 -12
- 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 +23 -3
- package/lib/cjs/subClients/MemberInvitationsClient.d.ts.map +1 -1
- package/lib/cjs/subClients/MemberInvitationsClient.js +32 -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 +83 -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 +146 -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 +12 -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 -29
- package/lib/esm/subClients/BaseClient.d.ts.map +1 -1
- package/lib/esm/subClients/BaseClient.js +166 -41
- 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 +18 -10
- package/lib/esm/subClients/GroupsClient.d.ts.map +1 -1
- package/lib/esm/subClients/GroupsClient.js +27 -12
- 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 +23 -3
- package/lib/esm/subClients/MemberInvitationsClient.d.ts.map +1 -1
- package/lib/esm/subClients/MemberInvitationsClient.js +32 -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 +83 -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 +146 -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 +59 -45
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserMembersClient.js","sourceRoot":"","sources":["../../../src/subClients/UserMembersClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UserMembersClient.js","sourceRoot":"","sources":["../../../src/subClients/UserMembersClient.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAMH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;GACG;AACH,MAAM,OAAO,iBACX,SAAQ,UAAU;IAElB;;OAEG;IACH,YAAmB,GAAY;QAC7B,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,qBAAqB,CAChC,WAAwB,EACxB,OAAe,EACf,GAA4C;QAE5C,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,gBAAgB,CAAC;QAEtD,IAAI,GAAG,EAAE,CAAC;YACR,GAAG,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;QAC/G,CAAC;QAED,OAAO,IAAI,CAAC,qBAAqB,CAC/B,WAAW,EACX,KAAK,EACL,GAAG,EACH,SAAS,CACV,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,kBAAkB,CAC7B,WAAwB,EACxB,OAAe,EACf,QAAgB;QAEhB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,kBAAkB,QAAQ,EAAE,CAAC;QACpE,OAAO,IAAI,CAAC,qBAAqB,CAC/B,WAAW,EACX,KAAK,EACL,GAAG,EACH,SAAS,CACV,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,mBAAmB,CAC9B,WAAwB,EACxB,OAAe,EACf,UAA2B,EAC3B,aAAsB;QAEtB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,gBAAgB,CAAC;QACxD,MAAM,IAAI,GAAG;YACX,OAAO,EAAE,UAAU;YACnB,aAAa;SACd,CAAC;QACF,OAAO,IAAI,CAAC,qBAAqB,CAC/B,WAAW,EACX,MAAM,EACN,GAAG,EACH,IAAI,CACL,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,qBAAqB,CAChC,WAAwB,EACxB,OAAe,EACf,QAAgB;QAEhB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,kBAAkB,QAAQ,EAAE,CAAC;QACpE,OAAO,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,qBAAqB,CAChC,WAAwB,EACxB,OAAe,EACf,QAAgB,EAChB,OAAiB;QAEjB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,kBAAkB,QAAQ,EAAE,CAAC;QACpE,MAAM,IAAI,GAAG;YACX,OAAO;SACR,CAAC;QACF,OAAO,IAAI,CAAC,qBAAqB,CAC/B,WAAW,EACX,OAAO,EACP,GAAG,EACH,IAAI,CACL,CAAC;IACJ,CAAC;CACF","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 { IUserMembersClient } from \"../accessControlClientInterfaces/UserMembersClient\";\nimport type { BentleyAPIResponse, ODataQueryParams } from \"../types/CommonApiTypes\";\nimport type { AddUserMember, AddUserMemberResponse, MultipleUserMembersResponse, SingleUserMemberResponse } from \"../types/UserMembers\";\nimport { BaseClient } from \"./BaseClient\";\n\n/** Client API to perform user members operations.\n */\nexport class UserMembersClient\n extends BaseClient\n implements IUserMembersClient {\n /** Create a new UserMembersClient 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 user members and their roles assignments.\n * @param accessToken The client access token string\n * @param iTwinId The id of the iTwin\n * @returns Array of members\n */\n public async queryITwinUserMembers(\n accessToken: AccessToken,\n iTwinId: string,\n arg?: Pick<ODataQueryParams, \"top\" | \"skip\">\n ): Promise<BentleyAPIResponse<MultipleUserMembersResponse>> {\n let url = `${this._baseUrl}/${iTwinId}/members/users`;\n\n if (arg) {\n url += `?${this.getQueryString(UserMembersClient.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 /** Retrieves a specific user member for a specified 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 Member\n */\n public async getITwinUserMember(\n accessToken: AccessToken,\n iTwinId: string,\n memberId: string\n ): Promise<BentleyAPIResponse<SingleUserMemberResponse>> {\n const url = `${this._baseUrl}/${iTwinId}/members/users/${memberId}`;\n return this.sendGenericAPIRequest(\n accessToken,\n \"GET\",\n url,\n undefined\n );\n }\n\n /** Add new iTwin user members\n * @param accessToken The client access token string\n * @param iTwinId The id of the iTwin\n * @param newMembers The list of members to add or invite, along with their role\n * @param customMessage Send custom message in welcome email when adding new members\n * @returns AddUserMemberResponse -- the added or invited user members\n */\n public async addITwinUserMembers(\n accessToken: AccessToken,\n iTwinId: string,\n newMembers: AddUserMember[],\n customMessage?: string\n ): Promise<BentleyAPIResponse<AddUserMemberResponse>> {\n const url = `${this._baseUrl}/${iTwinId}/members/users`;\n const body = {\n members: newMembers,\n customMessage,\n };\n return this.sendGenericAPIRequest(\n accessToken,\n \"POST\",\n url,\n body\n );\n }\n\n /** Remove the specified user 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 removeITwinUserMember(\n accessToken: AccessToken,\n iTwinId: string,\n memberId: string\n ): Promise<BentleyAPIResponse<undefined>> {\n const url = `${this._baseUrl}/${iTwinId}/members/users/${memberId}`;\n return this.sendGenericAPIRequest(accessToken, \"DELETE\", url);\n }\n\n /** Update iTwin user member roles\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 * @param roleIds The ids of the roles to be assigned\n * @returns Member\n */\n public async updateITwinUserMember(\n accessToken: AccessToken,\n iTwinId: string,\n memberId: string,\n roleIds: string[]\n ): Promise<BentleyAPIResponse<SingleUserMemberResponse>> {\n const url = `${this._baseUrl}/${iTwinId}/members/users/${memberId}`;\n const body = {\n roleIds,\n };\n return this.sendGenericAPIRequest(\n accessToken,\n \"PATCH\",\n url,\n body\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
var IMJS_URL_PREFIX: string | undefined;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Common HTTP methods used in API requests
|
|
6
|
+
*/
|
|
7
|
+
export type Method = "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
8
|
+
/**
|
|
9
|
+
* Configuration object for HTTP requests
|
|
10
|
+
*/
|
|
11
|
+
export interface RequestConfig {
|
|
12
|
+
method: Method;
|
|
13
|
+
url: string;
|
|
14
|
+
body?: string | Blob;
|
|
15
|
+
headers?: Record<string, string>;
|
|
16
|
+
validateStatus?: (status: number) => boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Standard response structure for all Bentley public API operations
|
|
20
|
+
* @template T The type of data returned in the response
|
|
21
|
+
*/
|
|
22
|
+
export interface BentleyAPIResponse<T> {
|
|
23
|
+
data?: T;
|
|
24
|
+
status: number;
|
|
25
|
+
error?: ApimError;
|
|
26
|
+
headers: Record<string, string>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Error response structure from iTwins API
|
|
30
|
+
*/
|
|
31
|
+
export interface ApimError {
|
|
32
|
+
code: string;
|
|
33
|
+
message: string;
|
|
34
|
+
details?: ErrorDetail[];
|
|
35
|
+
target?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Detailed error information from iTwins API responses
|
|
39
|
+
*/
|
|
40
|
+
export interface ErrorDetail {
|
|
41
|
+
code: string;
|
|
42
|
+
message: string;
|
|
43
|
+
target?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Result mode preference for API responses.
|
|
47
|
+
* - minimal: Returns only essential data fields
|
|
48
|
+
* - representation: Returns complete data with all available properties
|
|
49
|
+
*/
|
|
50
|
+
export type ResultMode = "minimal" | "representation";
|
|
51
|
+
/**
|
|
52
|
+
* OData query parameters interface for filtering, pagination, and data manipulation.
|
|
53
|
+
* Supports standard OData v4 query options for flexible API data retrieval.
|
|
54
|
+
* @see {@link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html} OData URL Conventions
|
|
55
|
+
*/
|
|
56
|
+
export interface ODataQueryParams {
|
|
57
|
+
/** Maximum number of results to return (for pagination) */
|
|
58
|
+
top?: number;
|
|
59
|
+
/** Number of results to skip (for pagination) */
|
|
60
|
+
skip?: number;
|
|
61
|
+
/** Search string to filter results by keyword */
|
|
62
|
+
search?: string;
|
|
63
|
+
/** Filter expression to apply to the query */
|
|
64
|
+
filter?: string;
|
|
65
|
+
/** Comma-separated list of properties to include in the response */
|
|
66
|
+
select?: string;
|
|
67
|
+
/** Comma-separated list of properties to expand with related data */
|
|
68
|
+
expand?: string;
|
|
69
|
+
/** Comma-separated list of properties to order results by (append ' desc' for descending) */
|
|
70
|
+
orderby?: string;
|
|
71
|
+
/** Include total count of matching records in response metadata */
|
|
72
|
+
count?: boolean;
|
|
73
|
+
/** Apply aggregation transformations to the data */
|
|
74
|
+
apply?: string;
|
|
75
|
+
/** Specify response format (json, xml, etc.) */
|
|
76
|
+
format?: string;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=CommonApiTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommonApiTypes.d.ts","sourceRoot":"","sources":["../../../src/types/CommonApiTypes.ts"],"names":[],"mappings":"AAMA,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;CAC9C;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,gBAAgB,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,2DAA2D;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6FAA6F;IAC7F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=CommonApiTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommonApiTypes.js","sourceRoot":"","sources":["../../../src/types/CommonApiTypes.ts"],"names":[],"mappings":"AAAA;;;+FAG+F","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\n// Add this at the top of the file or in a types file\ndeclare global {\n var IMJS_URL_PREFIX: string | undefined;\n}\n\n/**\n * Common HTTP methods used in API requests\n */\nexport type Method = \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"PATCH\";\n\n/**\n * Configuration object for HTTP requests\n */\nexport interface RequestConfig {\n method: Method;\n url: string;\n body?: string | Blob;\n headers?: Record<string, string>;\n validateStatus?: (status: number) => boolean;\n}\n\n/**\n * Standard response structure for all Bentley public API operations\n * @template T The type of data returned in the response\n */\nexport interface BentleyAPIResponse<T> {\n data?: T;\n status: number;\n error?: ApimError;\n headers: Record<string, string>;\n}\n\n/**\n * Error response structure from iTwins API\n */\nexport interface ApimError {\n code: string;\n message: string;\n details?: ErrorDetail[];\n target?: string;\n}\n\n/**\n * Detailed error information from iTwins API responses\n */\nexport interface ErrorDetail {\n code: string;\n message: string;\n target?: string;\n}\n\n/**\n * Result mode preference for API responses.\n * - minimal: Returns only essential data fields\n * - representation: Returns complete data with all available properties\n */\nexport type ResultMode = \"minimal\" | \"representation\";\n\n/**\n * OData query parameters interface for filtering, pagination, and data manipulation.\n * Supports standard OData v4 query options for flexible API data retrieval.\n * @see {@link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html} OData URL Conventions\n */\nexport interface ODataQueryParams {\n /** Maximum number of results to return (for pagination) */\n top?: number;\n /** Number of results to skip (for pagination) */\n skip?: number;\n /** Search string to filter results by keyword */\n search?: string;\n /** Filter expression to apply to the query */\n filter?: string;\n /** Comma-separated list of properties to include in the response */\n select?: string;\n /** Comma-separated list of properties to expand with related data */\n expand?: string;\n /** Comma-separated list of properties to order results by (append ' desc' for descending) */\n orderby?: string;\n /** Include total count of matching records in response metadata */\n count?: boolean;\n /** Apply aggregation transformations to the data */\n apply?: string;\n /** Specify response format (json, xml, etc.) */\n format?: string;\n}"]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { Role } from "./Role";
|
|
2
|
+
/**
|
|
3
|
+
* Represents a group that is a member of an iTwin with associated roles and metadata.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Group members are groups that have been added to an iTwin and assigned specific roles.
|
|
7
|
+
* This provides information about the group's identity, assigned roles, and aggregate
|
|
8
|
+
* counts of its nested membership structure.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const groupMember: GroupMember = {
|
|
13
|
+
* id: "550e8400-e29b-41d4-a716-446655440000",
|
|
14
|
+
* groupName: "Engineering Team",
|
|
15
|
+
* groupDescription: "Software engineering team members",
|
|
16
|
+
* roles: [
|
|
17
|
+
* { id: "admin-role", displayName: "Administrator" },
|
|
18
|
+
* { id: "viewer-role", displayName: "Viewer" }
|
|
19
|
+
* ],
|
|
20
|
+
* };
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export interface GroupMember {
|
|
24
|
+
/** Unique identifier for the group member */
|
|
25
|
+
id: string;
|
|
26
|
+
/** Display name of the group */
|
|
27
|
+
groupName: string;
|
|
28
|
+
/** Human-readable description of the group's purpose */
|
|
29
|
+
groupDescription: string;
|
|
30
|
+
/** Array of roles assigned to this group member (excludes permissions for security) */
|
|
31
|
+
roles: Role[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Request to add group members to an iTwin with role assignments.
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* The total number of roles assigned in this request must not exceed 50.
|
|
38
|
+
* This can be achieved with many different configurations. For example,
|
|
39
|
+
* 1 role can be assigned to 50 groups, or 5 roles can be assigned to 10 groups,
|
|
40
|
+
* both resulting in 50 role assignments.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const request: AddGroupMembers = {
|
|
45
|
+
* members: [{
|
|
46
|
+
* groupId: "6abbfcea-0eab-472a-b5f5-5c5a43df34b4",
|
|
47
|
+
* roleIds: ["5abbfcef-0eab-472a-b5f5-5c5a43df34b1", "83ee0d80-dea3-495a-b6c0-7bb102ebbcc3"]
|
|
48
|
+
* }]
|
|
49
|
+
* };
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export interface GroupMemberAssignment {
|
|
53
|
+
/** Array of groups to add as members with their assigned roles */
|
|
54
|
+
members: {
|
|
55
|
+
/** The ID of the group to add as a member */
|
|
56
|
+
groupId: string;
|
|
57
|
+
/** Array of role IDs to assign to this group member */
|
|
58
|
+
roleIds: string[];
|
|
59
|
+
}[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* API response wrapper for a single group member operation.
|
|
63
|
+
*/
|
|
64
|
+
export interface SingleGroupMemberResponse {
|
|
65
|
+
/** The group member data returned by the API */
|
|
66
|
+
member: GroupMember;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* API response wrapper for multiple group members operations.
|
|
70
|
+
*/
|
|
71
|
+
export interface MultipleGroupMembersResponse {
|
|
72
|
+
/** Array of group members returned by the API */
|
|
73
|
+
members: GroupMember[];
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=GroupMember.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupMember.d.ts","sourceRoot":"","sources":["../../../src/types/GroupMember.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,WAAW;IAC1B,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,gBAAgB,EAAE,MAAM,CAAC;IACzB,uFAAuF;IACvF,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,qBAAqB;IACpC,kEAAkE;IAClE,OAAO,EAAE;QACP,6CAA6C;QAC7C,OAAO,EAAE,MAAM,CAAC;QAChB,uDAAuD;QACvD,OAAO,EAAE,MAAM,EAAE,CAAC;KACnB,EAAE,CAAC;CACL;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,gDAAgD;IAChD,MAAM,EAAE,WAAW,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,iDAAiD;IACjD,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=GroupMember.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupMember.js","sourceRoot":"","sources":["../../../src/types/GroupMember.ts"],"names":[],"mappings":"AAAA;;;gGAGgG","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\nimport type { Role } from \"./Role\";\n\n/**\n * Represents a group that is a member of an iTwin with associated roles and metadata.\n *\n * @remarks\n * Group members are groups that have been added to an iTwin and assigned specific roles.\n * This provides information about the group's identity, assigned roles, and aggregate\n * counts of its nested membership structure.\n *\n * @example\n * ```typescript\n * const groupMember: GroupMember = {\n * id: \"550e8400-e29b-41d4-a716-446655440000\",\n * groupName: \"Engineering Team\",\n * groupDescription: \"Software engineering team members\",\n * roles: [\n * { id: \"admin-role\", displayName: \"Administrator\" },\n * { id: \"viewer-role\", displayName: \"Viewer\" }\n * ],\n * };\n * ```\n */\nexport interface GroupMember {\n /** Unique identifier for the group member */\n id: string;\n /** Display name of the group */\n groupName: string;\n /** Human-readable description of the group's purpose */\n groupDescription: string;\n /** Array of roles assigned to this group member (excludes permissions for security) */\n roles: Role[];\n}\n\n/**\n * Request to add group members to an iTwin with role assignments.\n *\n * @remarks\n * The total number of roles assigned in this request must not exceed 50.\n * This can be achieved with many different configurations. For example,\n * 1 role can be assigned to 50 groups, or 5 roles can be assigned to 10 groups,\n * both resulting in 50 role assignments.\n *\n * @example\n * ```typescript\n * const request: AddGroupMembers = {\n * members: [{\n * groupId: \"6abbfcea-0eab-472a-b5f5-5c5a43df34b4\",\n * roleIds: [\"5abbfcef-0eab-472a-b5f5-5c5a43df34b1\", \"83ee0d80-dea3-495a-b6c0-7bb102ebbcc3\"]\n * }]\n * };\n * ```\n */\nexport interface GroupMemberAssignment {\n /** Array of groups to add as members with their assigned roles */\n members: {\n /** The ID of the group to add as a member */\n groupId: string;\n /** Array of role IDs to assign to this group member */\n roleIds: string[];\n }[];\n}\n\n/**\n * API response wrapper for a single group member operation.\n */\nexport interface SingleGroupMemberResponse {\n /** The group member data returned by the API */\n member: GroupMember;\n}\n\n/**\n * API response wrapper for multiple group members operations.\n */\nexport interface MultipleGroupMembersResponse {\n /** Array of group members returned by the API */\n members: GroupMember[];\n}"]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { Links } from "./links";
|
|
2
|
+
import type { GroupUser } from "./Members";
|
|
3
|
+
/**
|
|
4
|
+
* Represents an access control group within an iTwin.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Access Control groups provide the ability to manage groups of users at one time.
|
|
8
|
+
* You can create groups on the Account iTwin to manage access across iTwins or
|
|
9
|
+
* create a group for an individual iTwin. Groups created on an individual iTwin
|
|
10
|
+
* are available only on that iTwin.
|
|
11
|
+
*
|
|
12
|
+
* Groups can contain individual users. Groups can also reference Bentley Identity
|
|
13
|
+
* Management System (IMS) groups. By referencing an IMS group, you can manage
|
|
14
|
+
* groups of individuals in your Active Directory, while providing them access to
|
|
15
|
+
* iTwin Platform using role assignments.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* const projectGroup: Group = {
|
|
20
|
+
* id: "550e8400-e29b-41d4-a716-446655440000",
|
|
21
|
+
* name: "Project Managers",
|
|
22
|
+
* description: "Users with project management responsibilities",
|
|
23
|
+
* members: [
|
|
24
|
+
* { id: "user123", email: "manager@company.com", firstName: "John", lastName: "Smith" }
|
|
25
|
+
* ],
|
|
26
|
+
* imsGroups: ["COMPANY_ADMINS", "PROJECT_LEADS"]
|
|
27
|
+
* };
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export interface Group {
|
|
31
|
+
/** The Group id */
|
|
32
|
+
id: string;
|
|
33
|
+
/** The name of your Group */
|
|
34
|
+
name: string;
|
|
35
|
+
/** A description of your Group */
|
|
36
|
+
description: string;
|
|
37
|
+
/** List of members assigned to the Group. Max size of 50 */
|
|
38
|
+
members: GroupUser[];
|
|
39
|
+
/** List of IMS Groups assigned to the Group. Max size of 50 */
|
|
40
|
+
imsGroups: string[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* API response wrapper for a single group operation.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* This interface is used for API responses that return a single group,
|
|
47
|
+
* such as GET /groups/{id}, POST /groups, and PATCH /groups/{id} operations.
|
|
48
|
+
*/
|
|
49
|
+
export interface SingleGroupResponse {
|
|
50
|
+
/** The group data returned by the API */
|
|
51
|
+
group: Group;
|
|
52
|
+
}
|
|
53
|
+
/** Utility type to determine if any pagination parameters are present */
|
|
54
|
+
export type HasAnyPaginationParam<T> = T extends {
|
|
55
|
+
top?: unknown;
|
|
56
|
+
} | {
|
|
57
|
+
skip?: unknown;
|
|
58
|
+
} ? true : false;
|
|
59
|
+
/**
|
|
60
|
+
* API response wrapper for multiple groups operations.
|
|
61
|
+
* Conditional inclusion of HAL-style links based on pagination parameters.
|
|
62
|
+
*
|
|
63
|
+
* @remarks
|
|
64
|
+
* This interface is used for API responses that return multiple groups,
|
|
65
|
+
* such as GET /groups operations. The array may be empty if no groups
|
|
66
|
+
* match the query criteria or if the iTwin has no groups defined.
|
|
67
|
+
*/
|
|
68
|
+
export type GroupsResponseWithConditionalLinks<T> = HasAnyPaginationParam<T> extends true ? MultipleGroupsResponse : Omit<MultipleGroupsResponse, "_links">;
|
|
69
|
+
/**
|
|
70
|
+
* API response wrapper for multiple groups operations.
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* This interface is used for API responses that return multiple groups,
|
|
74
|
+
* such as GET /groups operations. The array may be empty if no groups
|
|
75
|
+
* match the query criteria or if the iTwin has no groups defined.
|
|
76
|
+
*/
|
|
77
|
+
export interface MultipleGroupsResponse {
|
|
78
|
+
/** Array of groups returned by the API */
|
|
79
|
+
groups: Group[];
|
|
80
|
+
/** HAL-style links for pagination and related resources */
|
|
81
|
+
_links: Links;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=Groups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Groups.d.ts","sourceRoot":"","sources":["../../../src/types/Groups.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,KAAK;IACpB,mBAAmB;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,+DAA+D;IAC/D,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,yCAAyC;IACzC,KAAK,EAAE,KAAK,CAAC;CACd;AAED,yEAAyE;AACzE,MAAM,MAAM,qBAAqB,CAAC,CAAC,IACjC,CAAC,SAAS;IAAE,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,GAAG,KAAK,CAAC;AAElE;;;;;;;;GAQG;AACH,MAAM,MAAM,kCAAkC,CAAC,CAAC,IAC9C,qBAAqB,CAAC,CAAC,CAAC,SAAS,IAAI,GACjC,sBAAsB,GACtB,IAAI,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC;AAE7C;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,0CAA0C;IAC1C,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,2DAA2D;IAE3D,MAAM,EAAE,KAAK,CAAC;CACf"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=Groups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Groups.js","sourceRoot":"","sources":["../../../src/types/Groups.ts"],"names":[],"mappings":"AAAA;;;gGAGgG","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\nimport type { Links } from \"./links\";\nimport type { GroupUser } from \"./Members\";\n\n/**\n * Represents an access control group within an iTwin.\n *\n * @remarks\n * Access Control groups provide the ability to manage groups of users at one time.\n * You can create groups on the Account iTwin to manage access across iTwins or\n * create a group for an individual iTwin. Groups created on an individual iTwin\n * are available only on that iTwin.\n *\n * Groups can contain individual users. Groups can also reference Bentley Identity\n * Management System (IMS) groups. By referencing an IMS group, you can manage\n * groups of individuals in your Active Directory, while providing them access to\n * iTwin Platform using role assignments.\n *\n * @example\n * ```typescript\n * const projectGroup: Group = {\n * id: \"550e8400-e29b-41d4-a716-446655440000\",\n * name: \"Project Managers\",\n * description: \"Users with project management responsibilities\",\n * members: [\n * { id: \"user123\", email: \"manager@company.com\", firstName: \"John\", lastName: \"Smith\" }\n * ],\n * imsGroups: [\"COMPANY_ADMINS\", \"PROJECT_LEADS\"]\n * };\n * ```\n */\nexport interface Group {\n /** The Group id */\n id: string;\n /** The name of your Group */\n name: string;\n /** A description of your Group */\n description: string;\n /** List of members assigned to the Group. Max size of 50 */\n members: GroupUser[];\n /** List of IMS Groups assigned to the Group. Max size of 50 */\n imsGroups: string[];\n}\n\n/**\n * API response wrapper for a single group operation.\n *\n * @remarks\n * This interface is used for API responses that return a single group,\n * such as GET /groups/{id}, POST /groups, and PATCH /groups/{id} operations.\n */\nexport interface SingleGroupResponse {\n /** The group data returned by the API */\n group: Group;\n}\n\n/** Utility type to determine if any pagination parameters are present */\nexport type HasAnyPaginationParam<T> =\n T extends { top?: unknown } | { skip?: unknown } ? true : false;\n\n/**\n * API response wrapper for multiple groups operations.\n * Conditional inclusion of HAL-style links based on pagination parameters.\n *\n * @remarks\n * This interface is used for API responses that return multiple groups,\n * such as GET /groups operations. The array may be empty if no groups\n * match the query criteria or if the iTwin has no groups defined.\n */\nexport type GroupsResponseWithConditionalLinks<T> =\n HasAnyPaginationParam<T> extends true\n ? MultipleGroupsResponse\n : Omit<MultipleGroupsResponse, \"_links\">;\n\n/**\n * API response wrapper for multiple groups operations.\n *\n * @remarks\n * This interface is used for API responses that return multiple groups,\n * such as GET /groups operations. The array may be empty if no groups\n * match the query criteria or if the iTwin has no groups defined.\n */\nexport interface MultipleGroupsResponse {\n /** Array of groups returned by the API */\n groups: Group[];\n /** HAL-style links for pagination and related resources */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n _links: Links;\n}\n"]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ErrorDetail } from "./CommonApiTypes";
|
|
2
|
+
/**
|
|
3
|
+
* Represents the current status of an iTwin job operation.
|
|
4
|
+
* Jobs progress through these states as they are processed by the system.
|
|
5
|
+
*/
|
|
6
|
+
export type ITwinJobStatus = "Active" | "Completed" | "PartialCompleted" | "Failed";
|
|
7
|
+
/**
|
|
8
|
+
* This interface represents a job that manages user access control operations
|
|
9
|
+
* such as assigning roles, removing members, etc.
|
|
10
|
+
*/
|
|
11
|
+
export interface ITwinJob {
|
|
12
|
+
/** Unique identifier for the job */
|
|
13
|
+
id: string;
|
|
14
|
+
/** The iTwin ID this job operates on */
|
|
15
|
+
itwinId: string;
|
|
16
|
+
/** Current status of the job */
|
|
17
|
+
status: ITwinJobStatus;
|
|
18
|
+
/** Error details if the job encountered issues, empty array if no errors */
|
|
19
|
+
error: ErrorDetail[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Available action types that can be performed in an iTwin job.
|
|
23
|
+
* These represent the different operations that can be batched together.
|
|
24
|
+
*/
|
|
25
|
+
export type ItwinJobActions = "assignRoles" | "unassignRoles" | "removeMembers";
|
|
26
|
+
/**
|
|
27
|
+
* Defines the structure for iTwin job actions with type-safe action payloads.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* - `assignRoles` and `unassignRoles` actions include both email and roleIds
|
|
31
|
+
* - `removeMembers` actions only include email (roleIds are omitted)
|
|
32
|
+
* - Additional options can be provided for job configuration
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const jobActions: ITwinJobActions = {
|
|
37
|
+
* assignRoles: [
|
|
38
|
+
* { email: "user@example.com", roleIds: ["admin", "viewer"] }
|
|
39
|
+
* ],
|
|
40
|
+
* removeMembers: [
|
|
41
|
+
* { email: "former-user@example.com" } // No roleIds needed
|
|
42
|
+
* ],
|
|
43
|
+
* options: {
|
|
44
|
+
* timeout: 30000,
|
|
45
|
+
* retries: 3
|
|
46
|
+
* }
|
|
47
|
+
* };
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export type ITwinJobActions = {
|
|
51
|
+
[K in ItwinJobActions]?: K extends "removeMembers" ? Omit<ITwinJobAction, "roleIds">[] : ITwinJobAction[];
|
|
52
|
+
} & {
|
|
53
|
+
/** Additional configuration options for the job */
|
|
54
|
+
options?: Record<string, unknown>;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Represents a single action within an iTwin job that affects a user's access.
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* This interface defines the core structure for user-related operations.
|
|
61
|
+
* When used with `removeMembers` actions, the `roleIds` property should be
|
|
62
|
+
* omitted.
|
|
63
|
+
*/
|
|
64
|
+
export interface ITwinJobAction {
|
|
65
|
+
/** Email address of the user to be affected by this action */
|
|
66
|
+
email: string;
|
|
67
|
+
/** Array of role IDs to assign or unassign (not used for removeMembers) */
|
|
68
|
+
roleIds: string[];
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=ITwinJob.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITwinJob.d.ts","sourceRoot":"","sources":["../../../src/types/ITwinJob.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,WAAW,GACX,kBAAkB,GAClB,QAAQ,CAAC;AAEb;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,oCAAoC;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,MAAM,EAAE,cAAc,CAAC;IACvB,4EAA4E;IAC5E,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,eAAe,GAAG,eAAe,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,eAAe,GAAG;KAC3B,CAAC,IAAI,eAAe,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,GAC9C,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,EAAE,GACjC,cAAc,EAAE;CACrB,GAAG;IACF,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=ITwinJob.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITwinJob.js","sourceRoot":"","sources":["../../../src/types/ITwinJob.ts"],"names":[],"mappings":"AAAA;;;gGAGgG","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\nimport type { ErrorDetail } from \"./CommonApiTypes\";\n\n/**\n * Represents the current status of an iTwin job operation.\n * Jobs progress through these states as they are processed by the system.\n */\nexport type ITwinJobStatus =\n | \"Active\" // Job is currently being processed\n | \"Completed\" // Job has finished successfully\n | \"PartialCompleted\" // Job completed with some failures\n | \"Failed\"; // Job failed to complete\n\n/**\n * This interface represents a job that manages user access control operations\n * such as assigning roles, removing members, etc.\n */\nexport interface ITwinJob {\n /** Unique identifier for the job */\n id: string;\n /** The iTwin ID this job operates on */\n itwinId: string;\n /** Current status of the job */\n status: ITwinJobStatus;\n /** Error details if the job encountered issues, empty array if no errors */\n error: ErrorDetail[];\n}\n\n/**\n * Available action types that can be performed in an iTwin job.\n * These represent the different operations that can be batched together.\n */\nexport type ItwinJobActions = \"assignRoles\" | \"unassignRoles\" | \"removeMembers\";\n\n/**\n * Defines the structure for iTwin job actions with type-safe action payloads.\n *\n * @remarks\n * - `assignRoles` and `unassignRoles` actions include both email and roleIds\n * - `removeMembers` actions only include email (roleIds are omitted)\n * - Additional options can be provided for job configuration\n *\n * @example\n * ```typescript\n * const jobActions: ITwinJobActions = {\n * assignRoles: [\n * { email: \"user@example.com\", roleIds: [\"admin\", \"viewer\"] }\n * ],\n * removeMembers: [\n * { email: \"former-user@example.com\" } // No roleIds needed\n * ],\n * options: {\n * timeout: 30000,\n * retries: 3\n * }\n * };\n * ```\n */\nexport type ITwinJobActions = {\n [K in ItwinJobActions]?: K extends \"removeMembers\"\n ? Omit<ITwinJobAction, \"roleIds\">[]\n : ITwinJobAction[];\n} & {\n /** Additional configuration options for the job */\n options?: Record<string, unknown>;\n};\n\n/**\n * Represents a single action within an iTwin job that affects a user's access.\n *\n * @remarks\n * This interface defines the core structure for user-related operations.\n * When used with `removeMembers` actions, the `roleIds` property should be\n * omitted.\n */\nexport interface ITwinJobAction {\n /** Email address of the user to be affected by this action */\n email: string;\n /** Array of role IDs to assign or unassign (not used for removeMembers) */\n roleIds: string[];\n}"]}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import type { Links } from "./links";
|
|
2
|
+
import type { Role } from "./Role";
|
|
3
|
+
/**
|
|
4
|
+
* Represents an invitation sent to a user to join an iTwin as a member.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Member invitations are created when external users (not in the same organization as the iTwin)
|
|
8
|
+
* are invited to join an iTwin. The invited user receives an email invitation and must accept it
|
|
9
|
+
* to become a member. Invitations have expiration dates and can be in various states.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const invitation: MemberInvitation = {
|
|
14
|
+
* id: "550e8400-e29b-41d4-a716-446655440000",
|
|
15
|
+
* email: "external.user@othercompany.com",
|
|
16
|
+
* invitedByEmail: "admin@mycompany.com",
|
|
17
|
+
* status: "Pending",
|
|
18
|
+
* createdDate: "2023-10-15T10:30:00Z",
|
|
19
|
+
* expirationDate: "2023-11-15T10:30:00Z",
|
|
20
|
+
* roles: [
|
|
21
|
+
* { id: "viewer-role", displayName: "Project Viewer", description : "Can view project details" }
|
|
22
|
+
* ]
|
|
23
|
+
* };
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export interface MemberInvitation {
|
|
27
|
+
/** Unique identifier for the invitation */
|
|
28
|
+
id: string;
|
|
29
|
+
/** Email address of the invited user */
|
|
30
|
+
email: string;
|
|
31
|
+
/** Email address of the user who sent the invitation */
|
|
32
|
+
invitedByEmail: string;
|
|
33
|
+
/** Current status of the invitation */
|
|
34
|
+
status: MemberInvitationStatus;
|
|
35
|
+
/** ISO 8601 timestamp when the invitation was created */
|
|
36
|
+
createdDate: string;
|
|
37
|
+
/** ISO 8601 timestamp when the invitation expires */
|
|
38
|
+
expirationDate: string;
|
|
39
|
+
/** Optional array of roles that will be assigned upon acceptance (excludes permissions) */
|
|
40
|
+
roles?: Role[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Represents the current state of a member invitation.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* Invitations start as "Pending" when first sent and transition to "Accepted"
|
|
47
|
+
* when the invited user accepts the invitation.
|
|
48
|
+
*/
|
|
49
|
+
export type MemberInvitationStatus = "Pending" | "Accepted";
|
|
50
|
+
/**
|
|
51
|
+
* API response wrapper for multiple member invitations with pagination support.
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* This interface is used for API responses that return collections of member invitations,
|
|
55
|
+
* such as GET /invitations operations. Includes HAL-style navigation links for pagination
|
|
56
|
+
* to handle large numbers of invitations efficiently.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```typescript
|
|
60
|
+
* const response: MultipleMemberInvitationResponse = {
|
|
61
|
+
* invitations: [
|
|
62
|
+
* { id: "inv1", email: "user1@external.com", status: "Pending", ... },
|
|
63
|
+
* { id: "inv2", email: "user2@external.com", status: "Accepted", ... }
|
|
64
|
+
* ],
|
|
65
|
+
* _links: {
|
|
66
|
+
* self: { href: "/members/invitations?$skip=0&$top=100" },
|
|
67
|
+
* next: { href: "/members/invitations?$skip=100&$top=100" },
|
|
68
|
+
* prev: { href: "/members/invitations?$skip=0&$top=100" }
|
|
69
|
+
* }
|
|
70
|
+
* };
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export interface MultipleMemberInvitationResponse {
|
|
74
|
+
/** Array of member invitations in the current page */
|
|
75
|
+
invitations: MemberInvitation[];
|
|
76
|
+
/** HAL-style navigation links for pagination (first, next, prev, last) */
|
|
77
|
+
_links: Links;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* API response wrapper for a member invitation.
|
|
81
|
+
*
|
|
82
|
+
* @remarks
|
|
83
|
+
* This interface is used for API responses that a single member invitation,
|
|
84
|
+
* such as GET /invitations operations.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```typescript
|
|
88
|
+
* const response: MultipleMemberInvitationResponse = {
|
|
89
|
+
* invitation: {{ id: "inv1", email: "user1@external.com", status: "Pending", ... }} ,
|
|
90
|
+
* };
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
export interface SingleMemberInvitationResponse {
|
|
94
|
+
/** The member invitation */
|
|
95
|
+
invitation: MemberInvitation;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Represents an invitation sent to a group member to join an iTwin.
|
|
99
|
+
*
|
|
100
|
+
* @remarks
|
|
101
|
+
* Retrieves a list of iTwin group member invitations. By default, users will receive the invitations they have sent.
|
|
102
|
+
* If the user is an iTwin Owner, they will receive all invitations for the iTwin.
|
|
103
|
+
* Invitations have an expiration of 7 days after their creation. Once that expiration passes, the invitation will not be returned.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```typescript
|
|
107
|
+
* const groupInvitation: GroupMemberInvitation = {
|
|
108
|
+
* id: "550e8400-e29b-41d4-a716-446655440000",
|
|
109
|
+
* email: "group.member@external.com",
|
|
110
|
+
* invitedByEmail: "admin@mycompany.com",
|
|
111
|
+
* status: "Pending",
|
|
112
|
+
* createdDate: "2023-10-15T10:30:00Z",
|
|
113
|
+
* expirationDate: "2023-11-15T10:30:00Z"
|
|
114
|
+
* };
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
export type GroupMemberInvitation = Omit<MemberInvitation, "roles">;
|
|
118
|
+
/**
|
|
119
|
+
* API response wrapper for multiple group member invitations with pagination support.
|
|
120
|
+
*
|
|
121
|
+
* @remarks
|
|
122
|
+
* This interface is used for API responses that return collections of group member invitations.
|
|
123
|
+
* Includes HAL-style navigation links for pagination to handle large numbers of group invitations efficiently.
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```typescript
|
|
127
|
+
* const response: MultipleGroupMemberInvitationResponse = {
|
|
128
|
+
* invitations: [
|
|
129
|
+
* { id: "inv1", email: "user1@external.com", status: "Pending", ... },
|
|
130
|
+
* { id: "inv2", email: "user2@external.com", status: "Accepted", ... }
|
|
131
|
+
* ],
|
|
132
|
+
* _links: {
|
|
133
|
+
* self: { href: "/groups/invitations?$skip=0&$top=100" },
|
|
134
|
+
* next: { href: "/groups/invitations?$skip=100&$top=100" },
|
|
135
|
+
* prev: { href: "/groups/invitations?$skip=0&$top=100" }
|
|
136
|
+
* }
|
|
137
|
+
* };
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
export interface MultipleGroupMemberInvitationResponse {
|
|
141
|
+
/** Array of group member invitations in the current page */
|
|
142
|
+
invitations: GroupMemberInvitation[];
|
|
143
|
+
/** HAL-style navigation links for pagination (first, next, prev, last) */
|
|
144
|
+
_links: Links;
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=Invitations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Invitations.d.ts","sourceRoot":"","sources":["../../../src/types/Invitations.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,cAAc,EAAE,MAAM,CAAC;IACvB,uCAAuC;IACvC,MAAM,EAAE,sBAAsB,CAAC;IAC/B,yDAAyD;IACzD,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,cAAc,EAAE,MAAM,CAAC;IACvB,2FAA2F;IAC3F,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;CAChB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,UAAU,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,gCAAgC;IAC/C,sDAAsD;IACtD,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,0EAA0E;IAE1E,MAAM,EAAE,KAAK,CAAC;CACf;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,8BAA8B;IAC7C,4BAA4B;IAC5B,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,qCAAqC;IACpD,4DAA4D;IAC5D,WAAW,EAAE,qBAAqB,EAAE,CAAC;IACrC,0EAA0E;IAE1E,MAAM,EAAE,KAAK,CAAC;CACf"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=Invitations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Invitations.js","sourceRoot":"","sources":["../../../src/types/Invitations.ts"],"names":[],"mappings":"AAAA;;;gGAGgG","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\nimport type { Links } from \"./links\";\nimport type { Role } from \"./Role\";\n\n/**\n * Represents an invitation sent to a user to join an iTwin as a member.\n *\n * @remarks\n * Member invitations are created when external users (not in the same organization as the iTwin)\n * are invited to join an iTwin. The invited user receives an email invitation and must accept it\n * to become a member. Invitations have expiration dates and can be in various states.\n *\n * @example\n * ```typescript\n * const invitation: MemberInvitation = {\n * id: \"550e8400-e29b-41d4-a716-446655440000\",\n * email: \"external.user@othercompany.com\",\n * invitedByEmail: \"admin@mycompany.com\",\n * status: \"Pending\",\n * createdDate: \"2023-10-15T10:30:00Z\",\n * expirationDate: \"2023-11-15T10:30:00Z\",\n * roles: [\n * { id: \"viewer-role\", displayName: \"Project Viewer\", description : \"Can view project details\" }\n * ]\n * };\n * ```\n */\nexport interface MemberInvitation {\n /** Unique identifier for the invitation */\n id: string;\n /** Email address of the invited user */\n email: string;\n /** Email address of the user who sent the invitation */\n invitedByEmail: string;\n /** Current status of the invitation */\n status: MemberInvitationStatus;\n /** ISO 8601 timestamp when the invitation was created */\n createdDate: string;\n /** ISO 8601 timestamp when the invitation expires */\n expirationDate: string;\n /** Optional array of roles that will be assigned upon acceptance (excludes permissions) */\n roles?: Role[];\n}\n\n/**\n * Represents the current state of a member invitation.\n *\n * @remarks\n * Invitations start as \"Pending\" when first sent and transition to \"Accepted\"\n * when the invited user accepts the invitation.\n */\nexport type MemberInvitationStatus = \"Pending\" | \"Accepted\";\n\n/**\n * API response wrapper for multiple member invitations with pagination support.\n *\n * @remarks\n * This interface is used for API responses that return collections of member invitations,\n * such as GET /invitations operations. Includes HAL-style navigation links for pagination\n * to handle large numbers of invitations efficiently.\n *\n * @example\n * ```typescript\n * const response: MultipleMemberInvitationResponse = {\n * invitations: [\n * { id: \"inv1\", email: \"user1@external.com\", status: \"Pending\", ... },\n * { id: \"inv2\", email: \"user2@external.com\", status: \"Accepted\", ... }\n * ],\n * _links: {\n * self: { href: \"/members/invitations?$skip=0&$top=100\" },\n * next: { href: \"/members/invitations?$skip=100&$top=100\" },\n * prev: { href: \"/members/invitations?$skip=0&$top=100\" }\n * }\n * };\n * ```\n */\nexport interface MultipleMemberInvitationResponse {\n /** Array of member invitations in the current page */\n invitations: MemberInvitation[];\n /** HAL-style navigation links for pagination (first, next, prev, last) */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n _links: Links;\n}\n\n/**\n * API response wrapper for a member invitation.\n *\n * @remarks\n * This interface is used for API responses that a single member invitation,\n * such as GET /invitations operations.\n *\n * @example\n * ```typescript\n * const response: MultipleMemberInvitationResponse = {\n * invitation: {{ id: \"inv1\", email: \"user1@external.com\", status: \"Pending\", ... }} ,\n * };\n * ```\n */\nexport interface SingleMemberInvitationResponse {\n /** The member invitation */\n invitation: MemberInvitation;\n}\n\n/**\n * Represents an invitation sent to a group member to join an iTwin.\n *\n * @remarks\n * Retrieves a list of iTwin group member invitations. By default, users will receive the invitations they have sent.\n * If the user is an iTwin Owner, they will receive all invitations for the iTwin.\n * Invitations have an expiration of 7 days after their creation. Once that expiration passes, the invitation will not be returned.\n *\n * @example\n * ```typescript\n * const groupInvitation: GroupMemberInvitation = {\n * id: \"550e8400-e29b-41d4-a716-446655440000\",\n * email: \"group.member@external.com\",\n * invitedByEmail: \"admin@mycompany.com\",\n * status: \"Pending\",\n * createdDate: \"2023-10-15T10:30:00Z\",\n * expirationDate: \"2023-11-15T10:30:00Z\"\n * };\n * ```\n */\nexport type GroupMemberInvitation = Omit<MemberInvitation, \"roles\">;\n\n/**\n * API response wrapper for multiple group member invitations with pagination support.\n *\n * @remarks\n * This interface is used for API responses that return collections of group member invitations.\n * Includes HAL-style navigation links for pagination to handle large numbers of group invitations efficiently.\n *\n * @example\n * ```typescript\n * const response: MultipleGroupMemberInvitationResponse = {\n * invitations: [\n * { id: \"inv1\", email: \"user1@external.com\", status: \"Pending\", ... },\n * { id: \"inv2\", email: \"user2@external.com\", status: \"Accepted\", ... }\n * ],\n * _links: {\n * self: { href: \"/groups/invitations?$skip=0&$top=100\" },\n * next: { href: \"/groups/invitations?$skip=100&$top=100\" },\n * prev: { href: \"/groups/invitations?$skip=0&$top=100\" }\n * }\n * };\n * ```\n */\nexport interface MultipleGroupMemberInvitationResponse {\n /** Array of group member invitations in the current page */\n invitations: GroupMemberInvitation[];\n /** HAL-style navigation links for pagination (first, next, prev, last) */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n _links: Links;\n}"]}
|