@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.
Files changed (309) hide show
  1. package/CHANGELOG.md +121 -22
  2. package/README.md +147 -669
  3. package/lib/cjs/AccessControlClient.d.ts +26 -9
  4. package/lib/cjs/AccessControlClient.d.ts.map +1 -1
  5. package/lib/cjs/AccessControlClient.js +21 -5
  6. package/lib/cjs/AccessControlClient.js.map +1 -1
  7. package/lib/cjs/access-control-client.d.ts +30 -1
  8. package/lib/cjs/access-control-client.d.ts.map +1 -1
  9. package/lib/cjs/access-control-client.js +42 -6
  10. package/lib/cjs/access-control-client.js.map +1 -1
  11. package/lib/cjs/accessControlClientInterfaces/GroupClient.d.ts +19 -0
  12. package/lib/cjs/accessControlClientInterfaces/GroupClient.d.ts.map +1 -0
  13. package/lib/cjs/accessControlClientInterfaces/GroupClient.js +7 -0
  14. package/lib/cjs/accessControlClientInterfaces/GroupClient.js.map +1 -0
  15. package/lib/cjs/accessControlClientInterfaces/GroupMemberInvitationClient.d.ts +15 -0
  16. package/lib/cjs/accessControlClientInterfaces/GroupMemberInvitationClient.d.ts.map +1 -0
  17. package/lib/cjs/accessControlClientInterfaces/GroupMemberInvitationClient.js +7 -0
  18. package/lib/cjs/accessControlClientInterfaces/GroupMemberInvitationClient.js.map +1 -0
  19. package/lib/cjs/accessControlClientInterfaces/GroupMembersClient.d.ts +19 -0
  20. package/lib/cjs/accessControlClientInterfaces/GroupMembersClient.d.ts.map +1 -0
  21. package/lib/cjs/accessControlClientInterfaces/GroupMembersClient.js +7 -0
  22. package/lib/cjs/accessControlClientInterfaces/GroupMembersClient.js.map +1 -0
  23. package/lib/cjs/accessControlClientInterfaces/ITwinJobsClient.d.ts +12 -0
  24. package/lib/cjs/accessControlClientInterfaces/ITwinJobsClient.d.ts.map +1 -0
  25. package/lib/cjs/accessControlClientInterfaces/ITwinJobsClient.js +7 -0
  26. package/lib/cjs/accessControlClientInterfaces/ITwinJobsClient.js.map +1 -0
  27. package/lib/cjs/accessControlClientInterfaces/ItwinSharesClient.d.ts +25 -0
  28. package/lib/cjs/accessControlClientInterfaces/ItwinSharesClient.d.ts.map +1 -0
  29. package/lib/cjs/accessControlClientInterfaces/ItwinSharesClient.js +7 -0
  30. package/lib/cjs/accessControlClientInterfaces/ItwinSharesClient.js.map +1 -0
  31. package/lib/cjs/accessControlClientInterfaces/MemberInvitationsClient.d.ts +10 -0
  32. package/lib/cjs/accessControlClientInterfaces/MemberInvitationsClient.d.ts.map +1 -0
  33. package/lib/cjs/accessControlClientInterfaces/MemberInvitationsClient.js +7 -0
  34. package/lib/cjs/accessControlClientInterfaces/MemberInvitationsClient.js.map +1 -0
  35. package/lib/cjs/accessControlClientInterfaces/OwnerMembersClient .d.ts +13 -0
  36. package/lib/cjs/accessControlClientInterfaces/OwnerMembersClient .d.ts.map +1 -0
  37. package/lib/cjs/accessControlClientInterfaces/OwnerMembersClient .js +7 -0
  38. package/lib/cjs/accessControlClientInterfaces/OwnerMembersClient .js.map +1 -0
  39. package/lib/cjs/accessControlClientInterfaces/PermissionsClient.d.ts +10 -0
  40. package/lib/cjs/accessControlClientInterfaces/PermissionsClient.d.ts.map +1 -0
  41. package/lib/cjs/accessControlClientInterfaces/PermissionsClient.js +7 -0
  42. package/lib/cjs/accessControlClientInterfaces/PermissionsClient.js.map +1 -0
  43. package/lib/cjs/accessControlClientInterfaces/RolesClient.d.ts +16 -0
  44. package/lib/cjs/accessControlClientInterfaces/RolesClient.d.ts.map +1 -0
  45. package/lib/cjs/accessControlClientInterfaces/RolesClient.js +7 -0
  46. package/lib/cjs/accessControlClientInterfaces/RolesClient.js.map +1 -0
  47. package/lib/cjs/accessControlClientInterfaces/UserMembersClient.d.ts +16 -0
  48. package/lib/cjs/accessControlClientInterfaces/UserMembersClient.d.ts.map +1 -0
  49. package/lib/cjs/accessControlClientInterfaces/UserMembersClient.js +7 -0
  50. package/lib/cjs/accessControlClientInterfaces/UserMembersClient.js.map +1 -0
  51. package/lib/cjs/accessControlClientInterfaces/accessControl.d.ts +23 -0
  52. package/lib/cjs/accessControlClientInterfaces/accessControl.d.ts.map +1 -0
  53. package/lib/cjs/accessControlClientInterfaces/accessControl.js +7 -0
  54. package/lib/cjs/accessControlClientInterfaces/accessControl.js.map +1 -0
  55. package/lib/cjs/subClients/BaseClient.d.ts +88 -22
  56. package/lib/cjs/subClients/BaseClient.d.ts.map +1 -1
  57. package/lib/cjs/subClients/BaseClient.js +174 -34
  58. package/lib/cjs/subClients/BaseClient.js.map +1 -1
  59. package/lib/cjs/subClients/GroupMemberInvitationsClient.d.ts +33 -0
  60. package/lib/cjs/subClients/GroupMemberInvitationsClient.d.ts.map +1 -0
  61. package/lib/cjs/subClients/GroupMemberInvitationsClient.js +48 -0
  62. package/lib/cjs/subClients/GroupMemberInvitationsClient.js.map +1 -0
  63. package/lib/cjs/subClients/GroupMembersClient.d.ts +16 -6
  64. package/lib/cjs/subClients/GroupMembersClient.d.ts.map +1 -1
  65. package/lib/cjs/subClients/GroupMembersClient.js +22 -13
  66. package/lib/cjs/subClients/GroupMembersClient.js.map +1 -1
  67. package/lib/cjs/subClients/GroupsClient.d.ts +17 -9
  68. package/lib/cjs/subClients/GroupsClient.d.ts.map +1 -1
  69. package/lib/cjs/subClients/GroupsClient.js +22 -10
  70. package/lib/cjs/subClients/GroupsClient.js.map +1 -1
  71. package/lib/cjs/subClients/ITwinJobsClient.d.ts +12 -5
  72. package/lib/cjs/subClients/ITwinJobsClient.d.ts.map +1 -1
  73. package/lib/cjs/subClients/ITwinJobsClient.js +15 -3
  74. package/lib/cjs/subClients/ITwinJobsClient.js.map +1 -1
  75. package/lib/cjs/subClients/ItwinShares.d.ts +61 -0
  76. package/lib/cjs/subClients/ItwinShares.d.ts.map +1 -0
  77. package/lib/cjs/subClients/ItwinShares.js +77 -0
  78. package/lib/cjs/subClients/ItwinShares.js.map +1 -0
  79. package/lib/cjs/subClients/MemberInvitationsClient.d.ts +16 -3
  80. package/lib/cjs/subClients/MemberInvitationsClient.d.ts.map +1 -1
  81. package/lib/cjs/subClients/MemberInvitationsClient.js +22 -7
  82. package/lib/cjs/subClients/MemberInvitationsClient.js.map +1 -1
  83. package/lib/cjs/subClients/OwnerMembersClient.d.ts +45 -6
  84. package/lib/cjs/subClients/OwnerMembersClient.d.ts.map +1 -1
  85. package/lib/cjs/subClients/OwnerMembersClient.js +50 -10
  86. package/lib/cjs/subClients/OwnerMembersClient.js.map +1 -1
  87. package/lib/cjs/subClients/PermissionsClient.d.ts +10 -3
  88. package/lib/cjs/subClients/PermissionsClient.d.ts.map +1 -1
  89. package/lib/cjs/subClients/PermissionsClient.js +14 -2
  90. package/lib/cjs/subClients/PermissionsClient.js.map +1 -1
  91. package/lib/cjs/subClients/RolesClient.d.ts +13 -8
  92. package/lib/cjs/subClients/RolesClient.d.ts.map +1 -1
  93. package/lib/cjs/subClients/RolesClient.js +18 -6
  94. package/lib/cjs/subClients/RolesClient.js.map +1 -1
  95. package/lib/cjs/subClients/UserMembersClient.d.ts +13 -6
  96. package/lib/cjs/subClients/UserMembersClient.d.ts.map +1 -1
  97. package/lib/cjs/subClients/UserMembersClient.js +21 -9
  98. package/lib/cjs/subClients/UserMembersClient.js.map +1 -1
  99. package/lib/cjs/types/CommonApiTypes.d.ts +78 -0
  100. package/lib/cjs/types/CommonApiTypes.d.ts.map +1 -0
  101. package/lib/cjs/types/CommonApiTypes.js +7 -0
  102. package/lib/cjs/types/CommonApiTypes.js.map +1 -0
  103. package/lib/cjs/types/GroupMember.d.ts +75 -0
  104. package/lib/cjs/types/GroupMember.d.ts.map +1 -0
  105. package/lib/cjs/types/GroupMember.js +7 -0
  106. package/lib/cjs/types/GroupMember.js.map +1 -0
  107. package/lib/cjs/types/Groups.d.ts +64 -0
  108. package/lib/cjs/types/Groups.d.ts.map +1 -0
  109. package/lib/cjs/types/Groups.js +7 -0
  110. package/lib/cjs/types/Groups.js.map +1 -0
  111. package/lib/cjs/types/ITwinJob.d.ts +70 -0
  112. package/lib/cjs/types/ITwinJob.d.ts.map +1 -0
  113. package/lib/cjs/types/ITwinJob.js +7 -0
  114. package/lib/cjs/types/ITwinJob.js.map +1 -0
  115. package/lib/cjs/types/Invitations.d.ts +128 -0
  116. package/lib/cjs/types/Invitations.d.ts.map +1 -0
  117. package/lib/cjs/types/Invitations.js +7 -0
  118. package/lib/cjs/types/Invitations.js.map +1 -0
  119. package/lib/cjs/types/Members.d.ts +71 -0
  120. package/lib/cjs/types/Members.d.ts.map +1 -0
  121. package/lib/cjs/types/Members.js +7 -0
  122. package/lib/cjs/types/Members.js.map +1 -0
  123. package/lib/cjs/types/OwnerMember.d.ts +105 -0
  124. package/lib/cjs/types/OwnerMember.d.ts.map +1 -0
  125. package/lib/cjs/types/OwnerMember.js +7 -0
  126. package/lib/cjs/types/OwnerMember.js.map +1 -0
  127. package/lib/cjs/types/Permission.d.ts +5 -0
  128. package/lib/cjs/types/Permission.d.ts.map +1 -0
  129. package/lib/cjs/types/Permission.js +7 -0
  130. package/lib/cjs/types/Permission.js.map +1 -0
  131. package/lib/cjs/types/Role.d.ts +33 -0
  132. package/lib/cjs/types/Role.d.ts.map +1 -0
  133. package/lib/cjs/types/Role.js +7 -0
  134. package/lib/cjs/types/Role.js.map +1 -0
  135. package/lib/cjs/types/ShareContract.d.ts +80 -0
  136. package/lib/cjs/types/ShareContract.d.ts.map +1 -0
  137. package/lib/cjs/types/ShareContract.js +7 -0
  138. package/lib/cjs/types/ShareContract.js.map +1 -0
  139. package/lib/cjs/types/UserMembers.d.ts +115 -0
  140. package/lib/cjs/types/UserMembers.d.ts.map +1 -0
  141. package/lib/cjs/types/UserMembers.js +7 -0
  142. package/lib/cjs/types/UserMembers.js.map +1 -0
  143. package/lib/cjs/types/links.d.ts +20 -0
  144. package/lib/cjs/types/links.d.ts.map +1 -0
  145. package/lib/cjs/types/links.js +7 -0
  146. package/lib/cjs/types/links.js.map +1 -0
  147. package/lib/cjs/types/typeUtils.d.ts +42 -0
  148. package/lib/cjs/types/typeUtils.d.ts.map +1 -0
  149. package/lib/cjs/types/typeUtils.js +25 -0
  150. package/lib/cjs/types/typeUtils.js.map +1 -0
  151. package/lib/esm/AccessControlClient.d.ts +26 -9
  152. package/lib/esm/AccessControlClient.d.ts.map +1 -1
  153. package/lib/esm/AccessControlClient.js +31 -5
  154. package/lib/esm/AccessControlClient.js.map +1 -1
  155. package/lib/esm/access-control-client.d.ts +30 -1
  156. package/lib/esm/access-control-client.d.ts.map +1 -1
  157. package/lib/esm/access-control-client.js +33 -1
  158. package/lib/esm/access-control-client.js.map +1 -1
  159. package/lib/esm/accessControlClientInterfaces/GroupClient.d.ts +19 -0
  160. package/lib/esm/accessControlClientInterfaces/GroupClient.d.ts.map +1 -0
  161. package/lib/esm/accessControlClientInterfaces/GroupClient.js +6 -0
  162. package/lib/esm/accessControlClientInterfaces/GroupClient.js.map +1 -0
  163. package/lib/esm/accessControlClientInterfaces/GroupMemberInvitationClient.d.ts +15 -0
  164. package/lib/esm/accessControlClientInterfaces/GroupMemberInvitationClient.d.ts.map +1 -0
  165. package/lib/esm/accessControlClientInterfaces/GroupMemberInvitationClient.js +6 -0
  166. package/lib/esm/accessControlClientInterfaces/GroupMemberInvitationClient.js.map +1 -0
  167. package/lib/esm/accessControlClientInterfaces/GroupMembersClient.d.ts +19 -0
  168. package/lib/esm/accessControlClientInterfaces/GroupMembersClient.d.ts.map +1 -0
  169. package/lib/esm/accessControlClientInterfaces/GroupMembersClient.js +6 -0
  170. package/lib/esm/accessControlClientInterfaces/GroupMembersClient.js.map +1 -0
  171. package/lib/esm/accessControlClientInterfaces/ITwinJobsClient.d.ts +12 -0
  172. package/lib/esm/accessControlClientInterfaces/ITwinJobsClient.d.ts.map +1 -0
  173. package/lib/esm/accessControlClientInterfaces/ITwinJobsClient.js +6 -0
  174. package/lib/esm/accessControlClientInterfaces/ITwinJobsClient.js.map +1 -0
  175. package/lib/esm/accessControlClientInterfaces/ItwinSharesClient.d.ts +25 -0
  176. package/lib/esm/accessControlClientInterfaces/ItwinSharesClient.d.ts.map +1 -0
  177. package/lib/esm/accessControlClientInterfaces/ItwinSharesClient.js +6 -0
  178. package/lib/esm/accessControlClientInterfaces/ItwinSharesClient.js.map +1 -0
  179. package/lib/esm/accessControlClientInterfaces/MemberInvitationsClient.d.ts +10 -0
  180. package/lib/esm/accessControlClientInterfaces/MemberInvitationsClient.d.ts.map +1 -0
  181. package/lib/esm/accessControlClientInterfaces/MemberInvitationsClient.js +6 -0
  182. package/lib/esm/accessControlClientInterfaces/MemberInvitationsClient.js.map +1 -0
  183. package/lib/esm/accessControlClientInterfaces/OwnerMembersClient .d.ts +13 -0
  184. package/lib/esm/accessControlClientInterfaces/OwnerMembersClient .d.ts.map +1 -0
  185. package/lib/esm/accessControlClientInterfaces/OwnerMembersClient .js +6 -0
  186. package/lib/esm/accessControlClientInterfaces/OwnerMembersClient .js.map +1 -0
  187. package/lib/esm/accessControlClientInterfaces/PermissionsClient.d.ts +10 -0
  188. package/lib/esm/accessControlClientInterfaces/PermissionsClient.d.ts.map +1 -0
  189. package/lib/esm/accessControlClientInterfaces/PermissionsClient.js +6 -0
  190. package/lib/esm/accessControlClientInterfaces/PermissionsClient.js.map +1 -0
  191. package/lib/esm/accessControlClientInterfaces/RolesClient.d.ts +16 -0
  192. package/lib/esm/accessControlClientInterfaces/RolesClient.d.ts.map +1 -0
  193. package/lib/esm/accessControlClientInterfaces/RolesClient.js +6 -0
  194. package/lib/esm/accessControlClientInterfaces/RolesClient.js.map +1 -0
  195. package/lib/esm/accessControlClientInterfaces/UserMembersClient.d.ts +16 -0
  196. package/lib/esm/accessControlClientInterfaces/UserMembersClient.d.ts.map +1 -0
  197. package/lib/esm/accessControlClientInterfaces/UserMembersClient.js +6 -0
  198. package/lib/esm/accessControlClientInterfaces/UserMembersClient.js.map +1 -0
  199. package/lib/esm/accessControlClientInterfaces/accessControl.d.ts +23 -0
  200. package/lib/esm/accessControlClientInterfaces/accessControl.d.ts.map +1 -0
  201. package/lib/esm/accessControlClientInterfaces/accessControl.js +6 -0
  202. package/lib/esm/accessControlClientInterfaces/accessControl.js.map +1 -0
  203. package/lib/esm/subClients/BaseClient.d.ts +88 -22
  204. package/lib/esm/subClients/BaseClient.d.ts.map +1 -1
  205. package/lib/esm/subClients/BaseClient.js +175 -35
  206. package/lib/esm/subClients/BaseClient.js.map +1 -1
  207. package/lib/esm/subClients/GroupMemberInvitationsClient.d.ts +33 -0
  208. package/lib/esm/subClients/GroupMemberInvitationsClient.d.ts.map +1 -0
  209. package/lib/esm/subClients/GroupMemberInvitationsClient.js +44 -0
  210. package/lib/esm/subClients/GroupMemberInvitationsClient.js.map +1 -0
  211. package/lib/esm/subClients/GroupMembersClient.d.ts +16 -6
  212. package/lib/esm/subClients/GroupMembersClient.d.ts.map +1 -1
  213. package/lib/esm/subClients/GroupMembersClient.js +22 -13
  214. package/lib/esm/subClients/GroupMembersClient.js.map +1 -1
  215. package/lib/esm/subClients/GroupsClient.d.ts +17 -9
  216. package/lib/esm/subClients/GroupsClient.d.ts.map +1 -1
  217. package/lib/esm/subClients/GroupsClient.js +22 -10
  218. package/lib/esm/subClients/GroupsClient.js.map +1 -1
  219. package/lib/esm/subClients/ITwinJobsClient.d.ts +12 -5
  220. package/lib/esm/subClients/ITwinJobsClient.d.ts.map +1 -1
  221. package/lib/esm/subClients/ITwinJobsClient.js +15 -3
  222. package/lib/esm/subClients/ITwinJobsClient.js.map +1 -1
  223. package/lib/esm/subClients/ItwinShares.d.ts +61 -0
  224. package/lib/esm/subClients/ItwinShares.d.ts.map +1 -0
  225. package/lib/esm/subClients/ItwinShares.js +73 -0
  226. package/lib/esm/subClients/ItwinShares.js.map +1 -0
  227. package/lib/esm/subClients/MemberInvitationsClient.d.ts +16 -3
  228. package/lib/esm/subClients/MemberInvitationsClient.d.ts.map +1 -1
  229. package/lib/esm/subClients/MemberInvitationsClient.js +22 -7
  230. package/lib/esm/subClients/MemberInvitationsClient.js.map +1 -1
  231. package/lib/esm/subClients/OwnerMembersClient.d.ts +45 -6
  232. package/lib/esm/subClients/OwnerMembersClient.d.ts.map +1 -1
  233. package/lib/esm/subClients/OwnerMembersClient.js +50 -10
  234. package/lib/esm/subClients/OwnerMembersClient.js.map +1 -1
  235. package/lib/esm/subClients/PermissionsClient.d.ts +10 -3
  236. package/lib/esm/subClients/PermissionsClient.d.ts.map +1 -1
  237. package/lib/esm/subClients/PermissionsClient.js +14 -2
  238. package/lib/esm/subClients/PermissionsClient.js.map +1 -1
  239. package/lib/esm/subClients/RolesClient.d.ts +13 -8
  240. package/lib/esm/subClients/RolesClient.d.ts.map +1 -1
  241. package/lib/esm/subClients/RolesClient.js +18 -6
  242. package/lib/esm/subClients/RolesClient.js.map +1 -1
  243. package/lib/esm/subClients/UserMembersClient.d.ts +13 -6
  244. package/lib/esm/subClients/UserMembersClient.d.ts.map +1 -1
  245. package/lib/esm/subClients/UserMembersClient.js +21 -9
  246. package/lib/esm/subClients/UserMembersClient.js.map +1 -1
  247. package/lib/esm/types/CommonApiTypes.d.ts +78 -0
  248. package/lib/esm/types/CommonApiTypes.d.ts.map +1 -0
  249. package/lib/esm/types/CommonApiTypes.js +6 -0
  250. package/lib/esm/types/CommonApiTypes.js.map +1 -0
  251. package/lib/esm/types/GroupMember.d.ts +75 -0
  252. package/lib/esm/types/GroupMember.d.ts.map +1 -0
  253. package/lib/esm/types/GroupMember.js +6 -0
  254. package/lib/esm/types/GroupMember.js.map +1 -0
  255. package/lib/esm/types/Groups.d.ts +64 -0
  256. package/lib/esm/types/Groups.d.ts.map +1 -0
  257. package/lib/esm/types/Groups.js +6 -0
  258. package/lib/esm/types/Groups.js.map +1 -0
  259. package/lib/esm/types/ITwinJob.d.ts +70 -0
  260. package/lib/esm/types/ITwinJob.d.ts.map +1 -0
  261. package/lib/esm/types/ITwinJob.js +6 -0
  262. package/lib/esm/types/ITwinJob.js.map +1 -0
  263. package/lib/esm/types/Invitations.d.ts +128 -0
  264. package/lib/esm/types/Invitations.d.ts.map +1 -0
  265. package/lib/esm/types/Invitations.js +6 -0
  266. package/lib/esm/types/Invitations.js.map +1 -0
  267. package/lib/esm/types/Members.d.ts +71 -0
  268. package/lib/esm/types/Members.d.ts.map +1 -0
  269. package/lib/esm/types/Members.js +6 -0
  270. package/lib/esm/types/Members.js.map +1 -0
  271. package/lib/esm/types/OwnerMember.d.ts +105 -0
  272. package/lib/esm/types/OwnerMember.d.ts.map +1 -0
  273. package/lib/esm/types/OwnerMember.js +6 -0
  274. package/lib/esm/types/OwnerMember.js.map +1 -0
  275. package/lib/esm/types/Permission.d.ts +5 -0
  276. package/lib/esm/types/Permission.d.ts.map +1 -0
  277. package/lib/esm/types/Permission.js +6 -0
  278. package/lib/esm/types/Permission.js.map +1 -0
  279. package/lib/esm/types/Role.d.ts +33 -0
  280. package/lib/esm/types/Role.d.ts.map +1 -0
  281. package/lib/esm/types/Role.js +6 -0
  282. package/lib/esm/types/Role.js.map +1 -0
  283. package/lib/esm/types/ShareContract.d.ts +80 -0
  284. package/lib/esm/types/ShareContract.d.ts.map +1 -0
  285. package/lib/esm/types/ShareContract.js +6 -0
  286. package/lib/esm/types/ShareContract.js.map +1 -0
  287. package/lib/esm/types/UserMembers.d.ts +115 -0
  288. package/lib/esm/types/UserMembers.d.ts.map +1 -0
  289. package/lib/esm/types/UserMembers.js +6 -0
  290. package/lib/esm/types/UserMembers.js.map +1 -0
  291. package/lib/esm/types/links.d.ts +20 -0
  292. package/lib/esm/types/links.d.ts.map +1 -0
  293. package/lib/esm/types/links.js +6 -0
  294. package/lib/esm/types/links.js.map +1 -0
  295. package/lib/esm/types/typeUtils.d.ts +42 -0
  296. package/lib/esm/types/typeUtils.d.ts.map +1 -0
  297. package/lib/esm/types/typeUtils.js +22 -0
  298. package/lib/esm/types/typeUtils.js.map +1 -0
  299. package/package.json +58 -47
  300. package/CONTRIBUTING.md +0 -90
  301. package/GETTINGSTARTED.md +0 -35
  302. package/lib/cjs/accessControlTypes.d.ts +0 -229
  303. package/lib/cjs/accessControlTypes.d.ts.map +0 -1
  304. package/lib/cjs/accessControlTypes.js +0 -25
  305. package/lib/cjs/accessControlTypes.js.map +0 -1
  306. package/lib/esm/accessControlTypes.d.ts +0 -229
  307. package/lib/esm/accessControlTypes.d.ts.map +0 -1
  308. package/lib/esm/accessControlTypes.js +0 -22
  309. package/lib/esm/accessControlTypes.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"UserMembersClient.js","sourceRoot":"","sources":["../../../src/subClients/UserMembersClient.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,OAAO,iBACX,SAAQ,UAAU;IAElB,YAAmB,GAAY;QAC7B,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,0BAA0B,CACrC,WAAwB,EACxB,OAAe,EACf,GAA2B;QAE3B,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,gBAAgB,CAAC;QAEtD,IAAI,GAAG,EAAE;YACP,GAAG,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;SACvC;QAED,OAAO,IAAI,CAAC,qBAAqB,CAC/B,WAAW,EACX,KAAK,EACL,GAAG,EACH,SAAS,EACT,SAAS,CACV,CAAC,CAAC,sCAAsC;IAC3C,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,uBAAuB,CAClC,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,EACT,QAAQ,CACT,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,wBAAwB,CACnC,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,0BAA0B,CACrC,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,0BAA0B,CACrC,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,EACJ,QAAQ,CACT,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 */\nimport type { AccessToken } from \"@itwin/core-bentley\";\nimport type {\n AccessControlAPIResponse,\n AccessControlQueryArg,\n AddUserMember,\n AddUserMemberResponse,\n IUserMembersClient,\n UserMember,\n} from \"../accessControlTypes\";\nimport { BaseClient } from \"./BaseClient\";\n\nexport class UserMembersClient\n extends BaseClient\n implements IUserMembersClient {\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 queryITwinUserMembersAsync(\n accessToken: AccessToken,\n iTwinId: string,\n arg?: AccessControlQueryArg\n ): Promise<AccessControlAPIResponse<UserMember[]>> {\n let url = `${this._baseUrl}/${iTwinId}/members/users`;\n\n if (arg) {\n url += `?${this.getQueryString(arg)}`;\n }\n\n return this.sendGenericAPIRequest(\n accessToken,\n \"GET\",\n url,\n undefined,\n \"members\"\n ); // TODO: Consider how to handle paging\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 getITwinUserMemberAsync(\n accessToken: AccessToken,\n iTwinId: string,\n memberId: string\n ): Promise<AccessControlAPIResponse<UserMember>> {\n const url = `${this._baseUrl}/${iTwinId}/members/users/${memberId}`;\n return this.sendGenericAPIRequest(\n accessToken,\n \"GET\",\n url,\n undefined,\n \"member\"\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 addITwinUserMembersAsync(\n accessToken: AccessToken,\n iTwinId: string,\n newMembers: AddUserMember[],\n customMessage?: string\n ): Promise<AccessControlAPIResponse<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 removeITwinUserMemberAsync(\n accessToken: AccessToken,\n iTwinId: string,\n memberId: string\n ): Promise<AccessControlAPIResponse<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 updateITwinUserMemberAsync(\n accessToken: AccessToken,\n iTwinId: string,\n memberId: string,\n roleIds: string[]\n ): Promise<AccessControlAPIResponse<UserMember>> {\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 \"member\"\n );\n }\n}\n"]}
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,64 @@
1
+ import type { GroupUser } from "./Members";
2
+ /**
3
+ * Represents an access control group within an iTwin.
4
+ *
5
+ * @remarks
6
+ * Access Control groups provide the ability to manage groups of users at one time.
7
+ * You can create groups on the Account iTwin to manage access across iTwins or
8
+ * create a group for an individual iTwin. Groups created on an individual iTwin
9
+ * are available only on that iTwin.
10
+ *
11
+ * Groups can contain individual users. Groups can also reference Bentley Identity
12
+ * Management System (IMS) groups. By referencing an IMS group, you can manage
13
+ * groups of individuals in your Active Directory, while providing them access to
14
+ * iTwin Platform using role assignments.
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * const projectGroup: Group = {
19
+ * id: "550e8400-e29b-41d4-a716-446655440000",
20
+ * name: "Project Managers",
21
+ * description: "Users with project management responsibilities",
22
+ * members: [
23
+ * { id: "user123", email: "manager@company.com", firstName: "John", lastName: "Smith" }
24
+ * ],
25
+ * imsGroups: ["COMPANY_ADMINS", "PROJECT_LEADS"]
26
+ * };
27
+ * ```
28
+ */
29
+ export interface Group {
30
+ /** The Group id */
31
+ id: string;
32
+ /** The name of your Group */
33
+ name: string;
34
+ /** A description of your Group */
35
+ description: string;
36
+ /** List of members assigned to the Group. Max size of 50 */
37
+ members: GroupUser[];
38
+ /** List of IMS Groups assigned to the Group. Max size of 50 */
39
+ imsGroups: string[];
40
+ }
41
+ /**
42
+ * API response wrapper for a single group operation.
43
+ *
44
+ * @remarks
45
+ * This interface is used for API responses that return a single group,
46
+ * such as GET /groups/{id}, POST /groups, and PATCH /groups/{id} operations.
47
+ */
48
+ export interface SingleGroupResponse {
49
+ /** The group data returned by the API */
50
+ group: Group;
51
+ }
52
+ /**
53
+ * API response wrapper for multiple groups operations.
54
+ *
55
+ * @remarks
56
+ * This interface is used for API responses that return multiple groups,
57
+ * such as GET /groups operations. The array may be empty if no groups
58
+ * match the query criteria or if the iTwin has no groups defined.
59
+ */
60
+ export interface MultipleGroupsResponse {
61
+ /** Array of groups returned by the API */
62
+ groups: Group[];
63
+ }
64
+ //# 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,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;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,0CAA0C;IAC1C,MAAM,EAAE,KAAK,EAAE,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=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 { 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/**\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}\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,128 @@
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
+ * Represents an invitation sent to a group member to join an iTwin.
81
+ *
82
+ * @remarks
83
+ * Retrieves a list of iTwin group member invitations. By default, users will receive the invitations they have sent.
84
+ * If the user is an iTwin Owner, they will receive all invitations for the iTwin.
85
+ * Invitations have an expiration of 7 days after their creation. Once that expiration passes, the invitation will not be returned.
86
+ *
87
+ * @example
88
+ * ```typescript
89
+ * const groupInvitation: GroupMemberInvitation = {
90
+ * id: "550e8400-e29b-41d4-a716-446655440000",
91
+ * email: "group.member@external.com",
92
+ * invitedByEmail: "admin@mycompany.com",
93
+ * status: "Pending",
94
+ * createdDate: "2023-10-15T10:30:00Z",
95
+ * expirationDate: "2023-11-15T10:30:00Z"
96
+ * };
97
+ * ```
98
+ */
99
+ export type GroupMemberInvitation = Omit<MemberInvitation, "roles">;
100
+ /**
101
+ * API response wrapper for multiple group member invitations with pagination support.
102
+ *
103
+ * @remarks
104
+ * This interface is used for API responses that return collections of group member invitations.
105
+ * Includes HAL-style navigation links for pagination to handle large numbers of group invitations efficiently.
106
+ *
107
+ * @example
108
+ * ```typescript
109
+ * const response: MultipleGroupMemberInvitationResponse = {
110
+ * invitations: [
111
+ * { id: "inv1", email: "user1@external.com", status: "Pending", ... },
112
+ * { id: "inv2", email: "user2@external.com", status: "Accepted", ... }
113
+ * ],
114
+ * _links: {
115
+ * self: { href: "/groups/invitations?$skip=0&$top=100" },
116
+ * next: { href: "/groups/invitations?$skip=100&$top=100" },
117
+ * prev: { href: "/groups/invitations?$skip=0&$top=100" }
118
+ * }
119
+ * };
120
+ * ```
121
+ */
122
+ export interface MultipleGroupMemberInvitationResponse {
123
+ /** Array of group member invitations in the current page */
124
+ invitations: GroupMemberInvitation[];
125
+ /** HAL-style navigation links for pagination (first, next, prev, last) */
126
+ _links: Links;
127
+ }
128
+ //# 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;;;;;;;;;;;;;;;;;;;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 * 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}"]}
@@ -0,0 +1,71 @@
1
+ import type { Role } from "./Role";
2
+ interface UserBase {
3
+ /** Unique identifier for the user */
4
+ id: string;
5
+ /** Email address of the user */
6
+ email: string;
7
+ /** First name of the user */
8
+ givenName: string;
9
+ /** Last name of the user */
10
+ surname: string;
11
+ /** Organization the user belongs to */
12
+ organization: string;
13
+ }
14
+ /**
15
+ * Represents a user within a group in the access control system.
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * const groupUser: GroupUser = {
20
+ * id: "550e8400-e29b-41d4-a716-446655440000",
21
+ * email: "sarah.connor@techcorp.com",
22
+ * givenName: "Sarah",
23
+ * surname: "Connor",
24
+ * organization: "TechCorp Industries"
25
+ * };
26
+ * ```
27
+ */
28
+ export type GroupUser = UserBase;
29
+ /**
30
+ * Represents a user who is a member of an iTwin with associated roles and profile information.
31
+ *
32
+ * @remarks
33
+ * User members are individuals who have been added to an iTwin and assigned specific roles.
34
+ * This provides information about the user's identity, assigned roles, and organization.
35
+ *
36
+ * @example
37
+ * ```typescript
38
+ * const userMember: UserMember = {
39
+ * id: "550e8400-e29b-41d4-a716-446655440000",
40
+ * email: "john.smith@company.com",
41
+ * givenName: "John",
42
+ * surname: "Smith",
43
+ * organization: "ACME Corporation",
44
+ * roles: [
45
+ * { id: "admin-role", displayName: "Administrator", description : "Has full access to all resources" },
46
+ * { id: "viewer-role", displayName: "Project Viewer", description : "Can view project details" }
47
+ * ]
48
+ * };
49
+ * ```
50
+ */
51
+ export interface UserMember extends UserBase {
52
+ /** Array of roles assigned to this user member */
53
+ roles: Role[];
54
+ }
55
+ /**
56
+ * Represents an iTwin owner member with their basic information.
57
+ *
58
+ * @example
59
+ * ```typescript
60
+ * const ownerMember: OwnerMember = {
61
+ * id: "550e8400-e29b-41d4-a716-446655440000",
62
+ * email: "john.doe@company.com",
63
+ * givenName: "John",
64
+ * surname: "Doe",
65
+ * organization: "Acme Corporation"
66
+ * };
67
+ * ```
68
+ */
69
+ export type OwnerMember = UserBase;
70
+ export {};
71
+ //# sourceMappingURL=Members.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Members.d.ts","sourceRoot":"","sources":["../../../src/types/Members.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAGnC,UAAU,QAAQ;IAChB,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;AAEjC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,UAAW,SAAQ,QAAQ;IAC1C,kDAAkD;IAClD,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC"}